function Rj(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Zf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function $j(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var i=[null];i.push.apply(i,arguments);var o=Function.bind.apply(t,i);return new o}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var EI={exports:{}},ng={},kI={exports:{}},Re={};/**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var rf=Symbol.for("react.element"),Oj=Symbol.for("react.portal"),Nj=Symbol.for("react.fragment"),Dj=Symbol.for("react.strict_mode"),Mj=Symbol.for("react.profiler"),Lj=Symbol.for("react.provider"),jj=Symbol.for("react.context"),Fj=Symbol.for("react.forward_ref"),zj=Symbol.for("react.suspense"),Vj=Symbol.for("react.memo"),Bj=Symbol.for("react.lazy"),xC=Symbol.iterator;function Uj(e){return e===null||typeof e!="object"?null:(e=xC&&e[xC]||e["@@iterator"],typeof e=="function"?e:null)}var TI={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},PI=Object.assign,II={};function wu(e,t,n){this.props=e,this.context=t,this.refs=II,this.updater=n||TI}wu.prototype.isReactComponent={};wu.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};wu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function AI(){}AI.prototype=wu.prototype;function _w(e,t,n){this.props=e,this.context=t,this.refs=II,this.updater=n||TI}var Cw=_w.prototype=new AI;Cw.constructor=_w;PI(Cw,wu.prototype);Cw.isPureReactComponent=!0;var _C=Array.isArray,RI=Object.prototype.hasOwnProperty,Ew={current:null},$I={key:!0,ref:!0,__self:!0,__source:!0};function OI(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)RI.call(t,r)&&!$I.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:rf,type:e,key:o,ref:s,props:i,_owner:Ew.current}}function Wj(e,t){return{$$typeof:rf,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function kw(e){return typeof e=="object"&&e!==null&&e.$$typeof===rf}function Hj(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var CC=/\/+/g;function l0(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Hj(""+e.key):t.toString(36)}function Vh(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case rf:case Oj:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+l0(s,0):r,_C(i)?(n="",e!=null&&(n=e.replace(CC,"$&/")+"/"),Vh(i,t,n,"",function(u){return u})):i!=null&&(kw(i)&&(i=Wj(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(CC,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",_C(e))for(var a=0;a<e.length;a++){o=e[a];var l=r+l0(o,a);s+=Vh(o,t,n,l,i)}else if(l=Uj(e),typeof l=="function")for(e=l.call(e),a=0;!(o=e.next()).done;)o=o.value,l=r+l0(o,a++),s+=Vh(o,t,n,l,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function eh(e,t,n){if(e==null)return e;var r=[],i=0;return Vh(e,r,"","",function(o){return t.call(n,o,i++)}),r}function qj(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var rr={current:null},Bh={transition:null},Kj={ReactCurrentDispatcher:rr,ReactCurrentBatchConfig:Bh,ReactCurrentOwner:Ew};Re.Children={map:eh,forEach:function(e,t,n){eh(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return eh(e,function(){t++}),t},toArray:function(e){return eh(e,function(t){return t})||[]},only:function(e){if(!kw(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Re.Component=wu;Re.Fragment=Nj;Re.Profiler=Mj;Re.PureComponent=_w;Re.StrictMode=Dj;Re.Suspense=zj;Re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Kj;Re.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=PI({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=Ew.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)RI.call(t,l)&&!$I.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:rf,type:e.type,key:i,ref:o,props:r,_owner:s}};Re.createContext=function(e){return e={$$typeof:jj,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Lj,_context:e},e.Consumer=e};Re.createElement=OI;Re.createFactory=function(e){var t=OI.bind(null,e);return t.type=e,t};Re.createRef=function(){return{current:null}};Re.forwardRef=function(e){return{$$typeof:Fj,render:e}};Re.isValidElement=kw;Re.lazy=function(e){return{$$typeof:Bj,_payload:{_status:-1,_result:e},_init:qj}};Re.memo=function(e,t){return{$$typeof:Vj,type:e,compare:t===void 0?null:t}};Re.startTransition=function(e){var t=Bh.transition;Bh.transition={};try{e()}finally{Bh.transition=t}};Re.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Re.useCallback=function(e,t){return rr.current.useCallback(e,t)};Re.useContext=function(e){return rr.current.useContext(e)};Re.useDebugValue=function(){};Re.useDeferredValue=function(e){return rr.current.useDeferredValue(e)};Re.useEffect=function(e,t){return rr.current.useEffect(e,t)};Re.useId=function(){return rr.current.useId()};Re.useImperativeHandle=function(e,t,n){return rr.current.useImperativeHandle(e,t,n)};Re.useInsertionEffect=function(e,t){return rr.current.useInsertionEffect(e,t)};Re.useLayoutEffect=function(e,t){return rr.current.useLayoutEffect(e,t)};Re.useMemo=function(e,t){return rr.current.useMemo(e,t)};Re.useReducer=function(e,t,n){return rr.current.useReducer(e,t,n)};Re.useRef=function(e){return rr.current.useRef(e)};Re.useState=function(e){return rr.current.useState(e)};Re.useSyncExternalStore=function(e,t,n){return rr.current.useSyncExternalStore(e,t,n)};Re.useTransition=function(){return rr.current.useTransition()};Re.version="18.2.0";kI.exports=Re;var w=kI.exports;const ur=tg(w),i1=Rj({__proto__:null,default:ur},[w]);/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Gj=w,Qj=Symbol.for("react.element"),Yj=Symbol.for("react.fragment"),Xj=Object.prototype.hasOwnProperty,Jj=Gj.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Zj={key:!0,ref:!0,__self:!0,__source:!0};function NI(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Xj.call(t,r)&&!Zj.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Qj,type:e,key:o,ref:s,props:i,_owner:Jj.current}}ng.Fragment=Yj;ng.jsx=NI;ng.jsxs=NI;EI.exports=ng;var g=EI.exports,o1={},DI={exports:{}},Ar={},MI={exports:{}},LI={};/**
 * @license React
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(e){function t(V,ee){var se=V.length;V.push(ee);e:for(;0<se;){var ue=se-1>>>1,ke=V[ue];if(0<i(ke,ee))V[ue]=ee,V[se]=ke,se=ue;else break e}}function n(V){return V.length===0?null:V[0]}function r(V){if(V.length===0)return null;var ee=V[0],se=V.pop();if(se!==ee){V[0]=se;e:for(var ue=0,ke=V.length,Se=ke>>>1;ue<Se;){var Te=2*(ue+1)-1,yt=V[Te],$e=Te+1,Bt=V[$e];if(0>i(yt,se))$e<ke&&0>i(Bt,yt)?(V[ue]=Bt,V[$e]=se,ue=$e):(V[ue]=yt,V[Te]=se,ue=Te);else if($e<ke&&0>i(Bt,se))V[ue]=Bt,V[$e]=se,ue=$e;else break e}}return ee}function i(V,ee){var se=V.sortIndex-ee.sortIndex;return se!==0?se:V.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,p=!1,y=!1,S=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(V){for(var ee=n(u);ee!==null;){if(ee.callback===null)r(u);else if(ee.startTime<=V)r(u),ee.sortIndex=ee.expirationTime,t(l,ee);else break;ee=n(u)}}function C(V){if(y=!1,b(V),!p)if(n(l)!==null)p=!0,Ce(k);else{var ee=n(u);ee!==null&&G(C,ee.startTime-V)}}function k(V,ee){p=!1,y&&(y=!1,v(R),R=-1),h=!0;var se=f;try{for(b(ee),d=n(l);d!==null&&(!(d.expirationTime>ee)||V&&!ne());){var ue=d.callback;if(typeof ue=="function"){d.callback=null,f=d.priorityLevel;var ke=ue(d.expirationTime<=ee);ee=e.unstable_now(),typeof ke=="function"?d.callback=ke:d===n(l)&&r(l),b(ee)}else r(l);d=n(l)}if(d!==null)var Se=!0;else{var Te=n(u);Te!==null&&G(C,Te.startTime-ee),Se=!1}return Se}finally{d=null,f=se,h=!1}}var x=!1,E=null,R=-1,M=5,L=-1;function ne(){return!(e.unstable_now()-L<M)}function Y(){if(E!==null){var V=e.unstable_now();L=V;var ee=!0;try{ee=E(!0,V)}finally{ee?Z():(x=!1,E=null)}}else x=!1}var Z;if(typeof m=="function")Z=function(){m(Y)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,he=ie.port2;ie.port1.onmessage=Y,Z=function(){he.postMessage(null)}}else Z=function(){S(Y,0)};function Ce(V){E=V,x||(x=!0,Z())}function G(V,ee){R=S(function(){V(e.unstable_now())},ee)}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(V){V.callback=null},e.unstable_continueExecution=function(){p||h||(p=!0,Ce(k))},e.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<V?Math.floor(1e3/V):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(V){switch(f){case 1:case 2:case 3:var ee=3;break;default:ee=f}var se=f;f=ee;try{return V()}finally{f=se}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(V,ee){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var se=f;f=V;try{return ee()}finally{f=se}},e.unstable_scheduleCallback=function(V,ee,se){var ue=e.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?ue+se:ue):se=ue,V){case 1:var ke=-1;break;case 2:ke=250;break;case 5:ke=1073741823;break;case 4:ke=1e4;break;default:ke=5e3}return ke=se+ke,V={id:c++,callback:ee,priorityLevel:V,startTime:se,expirationTime:ke,sortIndex:-1},se>ue?(V.sortIndex=se,t(u,V),n(l)===null&&V===n(u)&&(y?(v(R),R=-1):y=!0,G(C,se-ue))):(V.sortIndex=ke,t(l,V),p||h||(p=!0,Ce(k))),V},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(V){var ee=f;return function(){var se=f;f=ee;try{return V.apply(this,arguments)}finally{f=se}}}})(LI);MI.exports=LI;var e3=MI.exports;/**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var jI=w,kr=e3;function U(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var FI=new Set,nd={};function Pa(e,t){Hl(e,t),Hl(e+"Capture",t)}function Hl(e,t){for(nd[e]=t,e=0;e<t.length;e++)FI.add(t[e])}var vo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),s1=Object.prototype.hasOwnProperty,t3=/^[: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]*$/,EC={},kC={};function n3(e){return s1.call(kC,e)?!0:s1.call(EC,e)?!1:t3.test(e)?kC[e]=!0:(EC[e]=!0,!1)}function r3(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function i3(e,t,n,r){if(t===null||typeof t>"u"||r3(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ir(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Tn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Tn[e]=new ir(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Tn[t]=new ir(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Tn[e]=new ir(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Tn[e]=new ir(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Tn[e]=new ir(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Tn[e]=new ir(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Tn[e]=new ir(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Tn[e]=new ir(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Tn[e]=new ir(e,5,!1,e.toLowerCase(),null,!1,!1)});var Tw=/[\-:]([a-z])/g;function Pw(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Tw,Pw);Tn[t]=new ir(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Tw,Pw);Tn[t]=new ir(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Tw,Pw);Tn[t]=new ir(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Tn[e]=new ir(e,1,!1,e.toLowerCase(),null,!1,!1)});Tn.xlinkHref=new ir("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Tn[e]=new ir(e,1,!1,e.toLowerCase(),null,!0,!0)});function Iw(e,t,n,r){var i=Tn.hasOwnProperty(t)?Tn[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(i3(t,n,i,r)&&(n=null),r||i===null?n3(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var $o=jI.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,th=Symbol.for("react.element"),tl=Symbol.for("react.portal"),nl=Symbol.for("react.fragment"),Aw=Symbol.for("react.strict_mode"),a1=Symbol.for("react.profiler"),zI=Symbol.for("react.provider"),VI=Symbol.for("react.context"),Rw=Symbol.for("react.forward_ref"),l1=Symbol.for("react.suspense"),u1=Symbol.for("react.suspense_list"),$w=Symbol.for("react.memo"),Wo=Symbol.for("react.lazy"),BI=Symbol.for("react.offscreen"),TC=Symbol.iterator;function Uu(e){return e===null||typeof e!="object"?null:(e=TC&&e[TC]||e["@@iterator"],typeof e=="function"?e:null)}var $t=Object.assign,u0;function uc(e){if(u0===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);u0=t&&t[1]||""}return`
`+u0+e}var c0=!1;function d0(e,t){if(!e||c0)return"";c0=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
`),o=r.stack.split(`
`),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(s!==1||a!==1)do if(s--,a--,0>a||i[s]!==o[a]){var l=`
`+i[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{c0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?uc(e):""}function o3(e){switch(e.tag){case 5:return uc(e.type);case 16:return uc("Lazy");case 13:return uc("Suspense");case 19:return uc("SuspenseList");case 0:case 2:case 15:return e=d0(e.type,!1),e;case 11:return e=d0(e.type.render,!1),e;case 1:return e=d0(e.type,!0),e;default:return""}}function c1(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case nl:return"Fragment";case tl:return"Portal";case a1:return"Profiler";case Aw:return"StrictMode";case l1:return"Suspense";case u1:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case VI:return(e.displayName||"Context")+".Consumer";case zI:return(e._context.displayName||"Context")+".Provider";case Rw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $w:return t=e.displayName||null,t!==null?t:c1(e.type)||"Memo";case Wo:t=e._payload,e=e._init;try{return c1(e(t))}catch{}}return null}function s3(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return c1(t);case 8:return t===Aw?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Cs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function UI(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function a3(e){var t=UI(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nh(e){e._valueTracker||(e._valueTracker=a3(e))}function WI(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=UI(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ap(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function d1(e,t){var n=t.checked;return $t({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function PC(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Cs(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function HI(e,t){t=t.checked,t!=null&&Iw(e,"checked",t,!1)}function f1(e,t){HI(e,t);var n=Cs(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?h1(e,t.type,n):t.hasOwnProperty("defaultValue")&&h1(e,t.type,Cs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function IC(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function h1(e,t,n){(t!=="number"||Ap(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var cc=Array.isArray;function xl(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=""+Cs(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 p1(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(U(91));return $t({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function AC(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(U(92));if(cc(n)){if(1<n.length)throw Error(U(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Cs(n)}}function qI(e,t){var n=Cs(t.value),r=Cs(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function RC(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function KI(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function m1(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?KI(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var rh,GI=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(rh=rh||document.createElement("div"),rh.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=rh.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function rd(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Rc={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},l3=["Webkit","ms","Moz","O"];Object.keys(Rc).forEach(function(e){l3.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Rc[t]=Rc[e]})});function QI(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Rc.hasOwnProperty(e)&&Rc[e]?(""+t).trim():t+"px"}function YI(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=QI(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var u3=$t({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function g1(e,t){if(t){if(u3[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(U(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(U(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(U(61))}if(t.style!=null&&typeof t.style!="object")throw Error(U(62))}}function y1(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var v1=null;function Ow(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var b1=null,_l=null,Cl=null;function $C(e){if(e=af(e)){if(typeof b1!="function")throw Error(U(280));var t=e.stateNode;t&&(t=ag(t),b1(e.stateNode,e.type,t))}}function XI(e){_l?Cl?Cl.push(e):Cl=[e]:_l=e}function JI(){if(_l){var e=_l,t=Cl;if(Cl=_l=null,$C(e),t)for(e=0;e<t.length;e++)$C(t[e])}}function ZI(e,t){return e(t)}function eA(){}var f0=!1;function tA(e,t,n){if(f0)return e(t,n);f0=!0;try{return ZI(e,t,n)}finally{f0=!1,(_l!==null||Cl!==null)&&(eA(),JI())}}function id(e,t){var n=e.stateNode;if(n===null)return null;var r=ag(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(U(231,t,typeof n));return n}var w1=!1;if(vo)try{var Wu={};Object.defineProperty(Wu,"passive",{get:function(){w1=!0}}),window.addEventListener("test",Wu,Wu),window.removeEventListener("test",Wu,Wu)}catch{w1=!1}function c3(e,t,n,r,i,o,s,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var $c=!1,Rp=null,$p=!1,S1=null,d3={onError:function(e){$c=!0,Rp=e}};function f3(e,t,n,r,i,o,s,a,l){$c=!1,Rp=null,c3.apply(d3,arguments)}function h3(e,t,n,r,i,o,s,a,l){if(f3.apply(this,arguments),$c){if($c){var u=Rp;$c=!1,Rp=null}else throw Error(U(198));$p||($p=!0,S1=u)}}function Ia(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 nA(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 OC(e){if(Ia(e)!==e)throw Error(U(188))}function p3(e){var t=e.alternate;if(!t){if(t=Ia(e),t===null)throw Error(U(188));return t!==e?null:e}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 OC(i),e;if(o===r)return OC(i),t;o=o.sibling}throw Error(U(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s){for(a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s)throw Error(U(189))}}if(n.alternate!==r)throw Error(U(190))}if(n.tag!==3)throw Error(U(188));return n.stateNode.current===n?e:t}function rA(e){return e=p3(e),e!==null?iA(e):null}function iA(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=iA(e);if(t!==null)return t;e=e.sibling}return null}var oA=kr.unstable_scheduleCallback,NC=kr.unstable_cancelCallback,m3=kr.unstable_shouldYield,g3=kr.unstable_requestPaint,Wt=kr.unstable_now,y3=kr.unstable_getCurrentPriorityLevel,Nw=kr.unstable_ImmediatePriority,sA=kr.unstable_UserBlockingPriority,Op=kr.unstable_NormalPriority,v3=kr.unstable_LowPriority,aA=kr.unstable_IdlePriority,rg=null,Di=null;function b3(e){if(Di&&typeof Di.onCommitFiberRoot=="function")try{Di.onCommitFiberRoot(rg,e,void 0,(e.current.flags&128)===128)}catch{}}var fi=Math.clz32?Math.clz32:x3,w3=Math.log,S3=Math.LN2;function x3(e){return e>>>=0,e===0?32:31-(w3(e)/S3|0)|0}var ih=64,oh=4194304;function dc(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Np(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=dc(a):(o&=s,o!==0&&(r=dc(o)))}else s=n&~i,s!==0?r=dc(s):o!==0&&(r=dc(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-fi(t),i=1<<n,r|=e[n],t&=~i;return r}function _3(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function C3(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-fi(o),a=1<<s,l=i[s];l===-1?(!(a&n)||a&r)&&(i[s]=_3(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}function x1(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function lA(){var e=ih;return ih<<=1,!(ih&4194240)&&(ih=64),e}function h0(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function of(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-fi(t),e[t]=n}function E3(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-fi(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function Dw(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-fi(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var et=0;function uA(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var cA,Mw,dA,fA,hA,_1=!1,sh=[],as=null,ls=null,us=null,od=new Map,sd=new Map,Ko=[],k3="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function DC(e,t){switch(e){case"focusin":case"focusout":as=null;break;case"dragenter":case"dragleave":ls=null;break;case"mouseover":case"mouseout":us=null;break;case"pointerover":case"pointerout":od.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":sd.delete(t.pointerId)}}function Hu(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=af(t),t!==null&&Mw(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function T3(e,t,n,r,i){switch(t){case"focusin":return as=Hu(as,e,t,n,r,i),!0;case"dragenter":return ls=Hu(ls,e,t,n,r,i),!0;case"mouseover":return us=Hu(us,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return od.set(o,Hu(od.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,sd.set(o,Hu(sd.get(o)||null,e,t,n,r,i)),!0}return!1}function pA(e){var t=Js(e.target);if(t!==null){var n=Ia(t);if(n!==null){if(t=n.tag,t===13){if(t=nA(n),t!==null){e.blockedOn=t,hA(e.priority,function(){dA(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 Uh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=C1(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);v1=r,n.target.dispatchEvent(r),v1=null}else return t=af(n),t!==null&&Mw(t),e.blockedOn=n,!1;t.shift()}return!0}function MC(e,t,n){Uh(e)&&n.delete(t)}function P3(){_1=!1,as!==null&&Uh(as)&&(as=null),ls!==null&&Uh(ls)&&(ls=null),us!==null&&Uh(us)&&(us=null),od.forEach(MC),sd.forEach(MC)}function qu(e,t){e.blockedOn===t&&(e.blockedOn=null,_1||(_1=!0,kr.unstable_scheduleCallback(kr.unstable_NormalPriority,P3)))}function ad(e){function t(i){return qu(i,e)}if(0<sh.length){qu(sh[0],e);for(var n=1;n<sh.length;n++){var r=sh[n];r.blockedOn===e&&(r.blockedOn=null)}}for(as!==null&&qu(as,e),ls!==null&&qu(ls,e),us!==null&&qu(us,e),od.forEach(t),sd.forEach(t),n=0;n<Ko.length;n++)r=Ko[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Ko.length&&(n=Ko[0],n.blockedOn===null);)pA(n),n.blockedOn===null&&Ko.shift()}var El=$o.ReactCurrentBatchConfig,Dp=!0;function I3(e,t,n,r){var i=et,o=El.transition;El.transition=null;try{et=1,Lw(e,t,n,r)}finally{et=i,El.transition=o}}function A3(e,t,n,r){var i=et,o=El.transition;El.transition=null;try{et=4,Lw(e,t,n,r)}finally{et=i,El.transition=o}}function Lw(e,t,n,r){if(Dp){var i=C1(e,t,n,r);if(i===null)_0(e,t,r,Mp,n),DC(e,r);else if(T3(i,e,t,n,r))r.stopPropagation();else if(DC(e,r),t&4&&-1<k3.indexOf(e)){for(;i!==null;){var o=af(i);if(o!==null&&cA(o),o=C1(e,t,n,r),o===null&&_0(e,t,r,Mp,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else _0(e,t,r,null,n)}}var Mp=null;function C1(e,t,n,r){if(Mp=null,e=Ow(r),e=Js(e),e!==null)if(t=Ia(e),t===null)e=null;else if(n=t.tag,n===13){if(e=nA(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 Mp=e,null}function mA(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(y3()){case Nw:return 1;case sA:return 4;case Op:case v3:return 16;case aA:return 536870912;default:return 16}default:return 16}}var ts=null,jw=null,Wh=null;function gA(){if(Wh)return Wh;var e,t=jw,n=t.length,r,i="value"in ts?ts.value:ts.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[o-r];r++);return Wh=i.slice(e,1<r?1-r:void 0)}function Hh(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 ah(){return!0}function LC(){return!1}function Rr(e){function t(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?ah:LC,this.isPropagationStopped=LC,this}return $t(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ah)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ah)},persist:function(){},isPersistent:ah}),t}var Su={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fw=Rr(Su),sf=$t({},Su,{view:0,detail:0}),R3=Rr(sf),p0,m0,Ku,ig=$t({},sf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zw,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!==Ku&&(Ku&&e.type==="mousemove"?(p0=e.screenX-Ku.screenX,m0=e.screenY-Ku.screenY):m0=p0=0,Ku=e),p0)},movementY:function(e){return"movementY"in e?e.movementY:m0}}),jC=Rr(ig),$3=$t({},ig,{dataTransfer:0}),O3=Rr($3),N3=$t({},sf,{relatedTarget:0}),g0=Rr(N3),D3=$t({},Su,{animationName:0,elapsedTime:0,pseudoElement:0}),M3=Rr(D3),L3=$t({},Su,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),j3=Rr(L3),F3=$t({},Su,{data:0}),FC=Rr(F3),z3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},V3={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"},B3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function U3(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=B3[e])?!!t[e]:!1}function zw(){return U3}var W3=$t({},sf,{key:function(e){if(e.key){var t=z3[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Hh(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?V3[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zw,charCode:function(e){return e.type==="keypress"?Hh(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Hh(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),H3=Rr(W3),q3=$t({},ig,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zC=Rr(q3),K3=$t({},sf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zw}),G3=Rr(K3),Q3=$t({},Su,{propertyName:0,elapsedTime:0,pseudoElement:0}),Y3=Rr(Q3),X3=$t({},ig,{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}),J3=Rr(X3),Z3=[9,13,27,32],Vw=vo&&"CompositionEvent"in window,Oc=null;vo&&"documentMode"in document&&(Oc=document.documentMode);var eF=vo&&"TextEvent"in window&&!Oc,yA=vo&&(!Vw||Oc&&8<Oc&&11>=Oc),VC=String.fromCharCode(32),BC=!1;function vA(e,t){switch(e){case"keyup":return Z3.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bA(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var rl=!1;function tF(e,t){switch(e){case"compositionend":return bA(t);case"keypress":return t.which!==32?null:(BC=!0,VC);case"textInput":return e=t.data,e===VC&&BC?null:e;default:return null}}function nF(e,t){if(rl)return e==="compositionend"||!Vw&&vA(e,t)?(e=gA(),Wh=jw=ts=null,rl=!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 yA&&t.locale!=="ko"?null:t.data;default:return null}}var rF={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 UC(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!rF[e.type]:t==="textarea"}function wA(e,t,n,r){XI(r),t=Lp(t,"onChange"),0<t.length&&(n=new Fw("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Nc=null,ld=null;function iF(e){RA(e,0)}function og(e){var t=sl(e);if(WI(t))return e}function oF(e,t){if(e==="change")return t}var SA=!1;if(vo){var y0;if(vo){var v0="oninput"in document;if(!v0){var WC=document.createElement("div");WC.setAttribute("oninput","return;"),v0=typeof WC.oninput=="function"}y0=v0}else y0=!1;SA=y0&&(!document.documentMode||9<document.documentMode)}function HC(){Nc&&(Nc.detachEvent("onpropertychange",xA),ld=Nc=null)}function xA(e){if(e.propertyName==="value"&&og(ld)){var t=[];wA(t,ld,e,Ow(e)),tA(iF,t)}}function sF(e,t,n){e==="focusin"?(HC(),Nc=t,ld=n,Nc.attachEvent("onpropertychange",xA)):e==="focusout"&&HC()}function aF(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return og(ld)}function lF(e,t){if(e==="click")return og(t)}function uF(e,t){if(e==="input"||e==="change")return og(t)}function cF(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pi=typeof Object.is=="function"?Object.is:cF;function ud(e,t){if(pi(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!s1.call(t,i)||!pi(e[i],t[i]))return!1}return!0}function qC(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function KC(e,t){var n=qC(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=qC(n)}}function _A(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_A(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function CA(){for(var e=window,t=Ap();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ap(e.document)}return t}function Bw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function dF(e){var t=CA(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&_A(n.ownerDocument.documentElement,n)){if(r!==null&&Bw(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=KC(n,o);var s=KC(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var fF=vo&&"documentMode"in document&&11>=document.documentMode,il=null,E1=null,Dc=null,k1=!1;function GC(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;k1||il==null||il!==Ap(r)||(r=il,"selectionStart"in r&&Bw(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}),Dc&&ud(Dc,r)||(Dc=r,r=Lp(E1,"onSelect"),0<r.length&&(t=new Fw("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=il)))}function lh(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ol={animationend:lh("Animation","AnimationEnd"),animationiteration:lh("Animation","AnimationIteration"),animationstart:lh("Animation","AnimationStart"),transitionend:lh("Transition","TransitionEnd")},b0={},EA={};vo&&(EA=document.createElement("div").style,"AnimationEvent"in window||(delete ol.animationend.animation,delete ol.animationiteration.animation,delete ol.animationstart.animation),"TransitionEvent"in window||delete ol.transitionend.transition);function sg(e){if(b0[e])return b0[e];if(!ol[e])return e;var t=ol[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in EA)return b0[e]=t[n];return e}var kA=sg("animationend"),TA=sg("animationiteration"),PA=sg("animationstart"),IA=sg("transitionend"),AA=new Map,QC="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ns(e,t){AA.set(e,t),Pa(t,[e])}for(var w0=0;w0<QC.length;w0++){var S0=QC[w0],hF=S0.toLowerCase(),pF=S0[0].toUpperCase()+S0.slice(1);Ns(hF,"on"+pF)}Ns(kA,"onAnimationEnd");Ns(TA,"onAnimationIteration");Ns(PA,"onAnimationStart");Ns("dblclick","onDoubleClick");Ns("focusin","onFocus");Ns("focusout","onBlur");Ns(IA,"onTransitionEnd");Hl("onMouseEnter",["mouseout","mouseover"]);Hl("onMouseLeave",["mouseout","mouseover"]);Hl("onPointerEnter",["pointerout","pointerover"]);Hl("onPointerLeave",["pointerout","pointerover"]);Pa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Pa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Pa("onBeforeInput",["compositionend","keypress","textInput","paste"]);Pa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Pa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Pa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fc="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(" "),mF=new Set("cancel close invalid load scroll toggle".split(" ").concat(fc));function YC(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,h3(r,t,void 0,e),e.currentTarget=null}function RA(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==o&&i.isPropagationStopped())break e;YC(i,a,u),o=l}else for(s=0;s<r.length;s++){if(a=r[s],l=a.instance,u=a.currentTarget,a=a.listener,l!==o&&i.isPropagationStopped())break e;YC(i,a,u),o=l}}}if($p)throw e=S1,$p=!1,S1=null,e}function ft(e,t){var n=t[R1];n===void 0&&(n=t[R1]=new Set);var r=e+"__bubble";n.has(r)||($A(t,e,2,!1),n.add(r))}function x0(e,t,n){var r=0;t&&(r|=4),$A(n,e,r,t)}var uh="_reactListening"+Math.random().toString(36).slice(2);function cd(e){if(!e[uh]){e[uh]=!0,FI.forEach(function(n){n!=="selectionchange"&&(mF.has(n)||x0(n,!1,e),x0(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[uh]||(t[uh]=!0,x0("selectionchange",!1,t))}}function $A(e,t,n,r){switch(mA(t)){case 1:var i=I3;break;case 4:i=A3;break;default:i=Lw}n=i.bind(null,t,n,e),i=void 0,!w1||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function _0(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;s=s.return}for(;a!==null;){if(s=Js(a),s===null)return;if(l=s.tag,l===5||l===6){r=o=s;continue e}a=a.parentNode}}r=r.return}tA(function(){var u=o,c=Ow(n),d=[];e:{var f=AA.get(e);if(f!==void 0){var h=Fw,p=e;switch(e){case"keypress":if(Hh(n)===0)break e;case"keydown":case"keyup":h=H3;break;case"focusin":p="focus",h=g0;break;case"focusout":p="blur",h=g0;break;case"beforeblur":case"afterblur":h=g0;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=jC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=O3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=G3;break;case kA:case TA:case PA:h=M3;break;case IA:h=Y3;break;case"scroll":h=R3;break;case"wheel":h=J3;break;case"copy":case"cut":case"paste":h=j3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=zC}var y=(t&4)!==0,S=!y&&e==="scroll",v=y?f!==null?f+"Capture":null:f;y=[];for(var m=u,b;m!==null;){b=m;var C=b.stateNode;if(b.tag===5&&C!==null&&(b=C,v!==null&&(C=id(m,v),C!=null&&y.push(dd(m,C,b)))),S)break;m=m.return}0<y.length&&(f=new h(f,p,null,n,c),d.push({event:f,listeners:y}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==v1&&(p=n.relatedTarget||n.fromElement)&&(Js(p)||p[bo]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=u,p=p?Js(p):null,p!==null&&(S=Ia(p),p!==S||p.tag!==5&&p.tag!==6)&&(p=null)):(h=null,p=u),h!==p)){if(y=jC,C="onMouseLeave",v="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(y=zC,C="onPointerLeave",v="onPointerEnter",m="pointer"),S=h==null?f:sl(h),b=p==null?f:sl(p),f=new y(C,m+"leave",h,n,c),f.target=S,f.relatedTarget=b,C=null,Js(c)===u&&(y=new y(v,m+"enter",p,n,c),y.target=b,y.relatedTarget=S,C=y),S=C,h&&p)t:{for(y=h,v=p,m=0,b=y;b;b=Ba(b))m++;for(b=0,C=v;C;C=Ba(C))b++;for(;0<m-b;)y=Ba(y),m--;for(;0<b-m;)v=Ba(v),b--;for(;m--;){if(y===v||v!==null&&y===v.alternate)break t;y=Ba(y),v=Ba(v)}y=null}else y=null;h!==null&&XC(d,f,h,y,!1),p!==null&&S!==null&&XC(d,S,p,y,!0)}}e:{if(f=u?sl(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var k=oF;else if(UC(f))if(SA)k=uF;else{k=aF;var x=sF}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(k=lF);if(k&&(k=k(e,u))){wA(d,k,n,c);break e}x&&x(e,f,u),e==="focusout"&&(x=f._wrapperState)&&x.controlled&&f.type==="number"&&h1(f,"number",f.value)}switch(x=u?sl(u):window,e){case"focusin":(UC(x)||x.contentEditable==="true")&&(il=x,E1=u,Dc=null);break;case"focusout":Dc=E1=il=null;break;case"mousedown":k1=!0;break;case"contextmenu":case"mouseup":case"dragend":k1=!1,GC(d,n,c);break;case"selectionchange":if(fF)break;case"keydown":case"keyup":GC(d,n,c)}var E;if(Vw)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else rl?vA(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(yA&&n.locale!=="ko"&&(rl||R!=="onCompositionStart"?R==="onCompositionEnd"&&rl&&(E=gA()):(ts=c,jw="value"in ts?ts.value:ts.textContent,rl=!0)),x=Lp(u,R),0<x.length&&(R=new FC(R,e,null,n,c),d.push({event:R,listeners:x}),E?R.data=E:(E=bA(n),E!==null&&(R.data=E)))),(E=eF?tF(e,n):nF(e,n))&&(u=Lp(u,"onBeforeInput"),0<u.length&&(c=new FC("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=E))}RA(d,t)})}function dd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Lp(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=id(e,n),o!=null&&r.unshift(dd(e,o,i)),o=id(e,t),o!=null&&r.push(dd(e,o,i))),e=e.return}return r}function Ba(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function XC(e,t,n,r,i){for(var o=t._reactName,s=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=id(n,o),l!=null&&s.unshift(dd(n,l,a))):i||(l=id(n,o),l!=null&&s.push(dd(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var gF=/\r\n?/g,yF=/\u0000|\uFFFD/g;function JC(e){return(typeof e=="string"?e:""+e).replace(gF,`
`).replace(yF,"")}function ch(e,t,n){if(t=JC(t),JC(e)!==t&&n)throw Error(U(425))}function jp(){}var T1=null,P1=null;function I1(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var A1=typeof setTimeout=="function"?setTimeout:void 0,vF=typeof clearTimeout=="function"?clearTimeout:void 0,ZC=typeof Promise=="function"?Promise:void 0,bF=typeof queueMicrotask=="function"?queueMicrotask:typeof ZC<"u"?function(e){return ZC.resolve(null).then(e).catch(wF)}:A1;function wF(e){setTimeout(function(){throw e})}function C0(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==="/$"){if(r===0){e.removeChild(i),ad(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);ad(t)}function cs(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function eE(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var xu=Math.random().toString(36).slice(2),ki="__reactFiber$"+xu,fd="__reactProps$"+xu,bo="__reactContainer$"+xu,R1="__reactEvents$"+xu,SF="__reactListeners$"+xu,xF="__reactHandles$"+xu;function Js(e){var t=e[ki];if(t)return t;for(var n=e.parentNode;n;){if(t=n[bo]||n[ki]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=eE(e);e!==null;){if(n=e[ki])return n;e=eE(e)}return t}e=n,n=e.parentNode}return null}function af(e){return e=e[ki]||e[bo],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function sl(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(U(33))}function ag(e){return e[fd]||null}var $1=[],al=-1;function Ds(e){return{current:e}}function mt(e){0>al||(e.current=$1[al],$1[al]=null,al--)}function ut(e,t){al++,$1[al]=e.current,e.current=t}var Es={},Bn=Ds(Es),fr=Ds(!1),ma=Es;function ql(e,t){var n=e.type.contextTypes;if(!n)return Es;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function hr(e){return e=e.childContextTypes,e!=null}function Fp(){mt(fr),mt(Bn)}function tE(e,t,n){if(Bn.current!==Es)throw Error(U(168));ut(Bn,t),ut(fr,n)}function OA(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(U(108,s3(e)||"Unknown",i));return $t({},n,r)}function zp(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Es,ma=Bn.current,ut(Bn,e),ut(fr,fr.current),!0}function nE(e,t,n){var r=e.stateNode;if(!r)throw Error(U(169));n?(e=OA(e,t,ma),r.__reactInternalMemoizedMergedChildContext=e,mt(fr),mt(Bn),ut(Bn,e)):mt(fr),ut(fr,n)}var to=null,lg=!1,E0=!1;function NA(e){to===null?to=[e]:to.push(e)}function _F(e){lg=!0,NA(e)}function Ms(){if(!E0&&to!==null){E0=!0;var e=0,t=et;try{var n=to;for(et=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}to=null,lg=!1}catch(i){throw to!==null&&(to=to.slice(e+1)),oA(Nw,Ms),i}finally{et=t,E0=!1}}return null}var ll=[],ul=0,Vp=null,Bp=0,Br=[],Ur=0,ga=null,io=1,oo="";function Us(e,t){ll[ul++]=Bp,ll[ul++]=Vp,Vp=e,Bp=t}function DA(e,t,n){Br[Ur++]=io,Br[Ur++]=oo,Br[Ur++]=ga,ga=e;var r=io;e=oo;var i=32-fi(r)-1;r&=~(1<<i),n+=1;var o=32-fi(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,io=1<<32-fi(t)+i|n<<i|r,oo=o+e}else io=1<<o|n<<i|r,oo=e}function Uw(e){e.return!==null&&(Us(e,1),DA(e,1,0))}function Ww(e){for(;e===Vp;)Vp=ll[--ul],ll[ul]=null,Bp=ll[--ul],ll[ul]=null;for(;e===ga;)ga=Br[--Ur],Br[Ur]=null,oo=Br[--Ur],Br[Ur]=null,io=Br[--Ur],Br[Ur]=null}var _r=null,xr=null,_t=!1,ai=null;function MA(e,t){var n=qr(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function rE(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,_r=e,xr=cs(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,_r=e,xr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ga!==null?{id:io,overflow:oo}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=qr(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,_r=e,xr=null,!0):!1;default:return!1}}function O1(e){return(e.mode&1)!==0&&(e.flags&128)===0}function N1(e){if(_t){var t=xr;if(t){var n=t;if(!rE(e,t)){if(O1(e))throw Error(U(418));t=cs(n.nextSibling);var r=_r;t&&rE(e,t)?MA(r,n):(e.flags=e.flags&-4097|2,_t=!1,_r=e)}}else{if(O1(e))throw Error(U(418));e.flags=e.flags&-4097|2,_t=!1,_r=e}}}function iE(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;_r=e}function dh(e){if(e!==_r)return!1;if(!_t)return iE(e),_t=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!I1(e.type,e.memoizedProps)),t&&(t=xr)){if(O1(e))throw LA(),Error(U(418));for(;t;)MA(e,t),t=cs(t.nextSibling)}if(iE(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){xr=cs(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}xr=null}}else xr=_r?cs(e.stateNode.nextSibling):null;return!0}function LA(){for(var e=xr;e;)e=cs(e.nextSibling)}function Kl(){xr=_r=null,_t=!1}function Hw(e){ai===null?ai=[e]:ai.push(e)}var CF=$o.ReactCurrentBatchConfig;function oi(e,t){if(e&&e.defaultProps){t=$t({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var Up=Ds(null),Wp=null,cl=null,qw=null;function Kw(){qw=cl=Wp=null}function Gw(e){var t=Up.current;mt(Up),e._currentValue=t}function D1(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function kl(e,t){Wp=e,qw=cl=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(cr=!0),e.firstContext=null)}function Zr(e){var t=e._currentValue;if(qw!==e)if(e={context:e,memoizedValue:t,next:null},cl===null){if(Wp===null)throw Error(U(308));cl=e,Wp.dependencies={lanes:0,firstContext:e}}else cl=cl.next=e;return t}var Zs=null;function Qw(e){Zs===null?Zs=[e]:Zs.push(e)}function jA(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Qw(t)):(n.next=i.next,i.next=n),t.interleaved=n,wo(e,r)}function wo(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ho=!1;function Yw(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function FA(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function fo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ds(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ze&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,wo(e,n)}return i=r.interleaved,i===null?(t.next=t,Qw(r)):(t.next=i.next,i.next=t),r.interleaved=t,wo(e,n)}function qh(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Dw(e,n)}}function oE(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Hp(e,t,n,r){var i=e.updateQueue;Ho=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?o=u:s.next=u,s=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==s&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(o!==null){var d=i.baseState;s=0,c=u=l=null,a=o;do{var f=a.lane,h=a.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,y=a;switch(f=t,h=n,y.tag){case 1:if(p=y.payload,typeof p=="function"){d=p.call(h,d,f);break e}d=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=y.payload,f=typeof p=="function"?p.call(h,d,f):p,f==null)break e;d=$t({},d,f);break e;case 2:Ho=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=h,l=d):c=c.next=h,s|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(c===null&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);va|=s,e.lanes=s,e.memoizedState=d}}function sE(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(U(191,i));i.call(r)}}}var zA=new jI.Component().refs;function M1(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:$t({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ug={isMounted:function(e){return(e=e._reactInternals)?Ia(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tr(),i=hs(e),o=fo(r,i);o.payload=t,n!=null&&(o.callback=n),t=ds(e,o,i),t!==null&&(hi(t,e,i,r),qh(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tr(),i=hs(e),o=fo(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=ds(e,o,i),t!==null&&(hi(t,e,i,r),qh(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tr(),r=hs(e),i=fo(n,r);i.tag=2,t!=null&&(i.callback=t),t=ds(e,i,r),t!==null&&(hi(t,e,r,n),qh(t,e,r))}};function aE(e,t,n,r,i,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,s):t.prototype&&t.prototype.isPureReactComponent?!ud(n,r)||!ud(i,o):!0}function VA(e,t,n){var r=!1,i=Es,o=t.contextType;return typeof o=="object"&&o!==null?o=Zr(o):(i=hr(t)?ma:Bn.current,r=t.contextTypes,o=(r=r!=null)?ql(e,i):Es),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ug,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function lE(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&&ug.enqueueReplaceState(t,t.state,null)}function L1(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=zA,Yw(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=Zr(o):(o=hr(t)?ma:Bn.current,i.context=ql(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(M1(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&ug.enqueueReplaceState(i,i.state,null),Hp(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Gu(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(U(309));var r=n.stateNode}if(!r)throw Error(U(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var a=i.refs;a===zA&&(a=i.refs={}),s===null?delete a[o]:a[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(U(284));if(!n._owner)throw Error(U(290,e))}return e}function fh(e,t){throw e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function uE(e){var t=e._init;return t(e._payload)}function BA(e){function t(v,m){if(e){var b=v.deletions;b===null?(v.deletions=[m],v.flags|=16):b.push(m)}}function n(v,m){if(!e)return null;for(;m!==null;)t(v,m),m=m.sibling;return null}function r(v,m){for(v=new Map;m!==null;)m.key!==null?v.set(m.key,m):v.set(m.index,m),m=m.sibling;return v}function i(v,m){return v=ps(v,m),v.index=0,v.sibling=null,v}function o(v,m,b){return v.index=b,e?(b=v.alternate,b!==null?(b=b.index,b<m?(v.flags|=2,m):b):(v.flags|=2,m)):(v.flags|=1048576,m)}function s(v){return e&&v.alternate===null&&(v.flags|=2),v}function a(v,m,b,C){return m===null||m.tag!==6?(m=$0(b,v.mode,C),m.return=v,m):(m=i(m,b),m.return=v,m)}function l(v,m,b,C){var k=b.type;return k===nl?c(v,m,b.props.children,C,b.key):m!==null&&(m.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Wo&&uE(k)===m.type)?(C=i(m,b.props),C.ref=Gu(v,m,b),C.return=v,C):(C=Jh(b.type,b.key,b.props,null,v.mode,C),C.ref=Gu(v,m,b),C.return=v,C)}function u(v,m,b,C){return m===null||m.tag!==4||m.stateNode.containerInfo!==b.containerInfo||m.stateNode.implementation!==b.implementation?(m=O0(b,v.mode,C),m.return=v,m):(m=i(m,b.children||[]),m.return=v,m)}function c(v,m,b,C,k){return m===null||m.tag!==7?(m=la(b,v.mode,C,k),m.return=v,m):(m=i(m,b),m.return=v,m)}function d(v,m,b){if(typeof m=="string"&&m!==""||typeof m=="number")return m=$0(""+m,v.mode,b),m.return=v,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case th:return b=Jh(m.type,m.key,m.props,null,v.mode,b),b.ref=Gu(v,null,m),b.return=v,b;case tl:return m=O0(m,v.mode,b),m.return=v,m;case Wo:var C=m._init;return d(v,C(m._payload),b)}if(cc(m)||Uu(m))return m=la(m,v.mode,b,null),m.return=v,m;fh(v,m)}return null}function f(v,m,b,C){var k=m!==null?m.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return k!==null?null:a(v,m,""+b,C);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case th:return b.key===k?l(v,m,b,C):null;case tl:return b.key===k?u(v,m,b,C):null;case Wo:return k=b._init,f(v,m,k(b._payload),C)}if(cc(b)||Uu(b))return k!==null?null:c(v,m,b,C,null);fh(v,b)}return null}function h(v,m,b,C,k){if(typeof C=="string"&&C!==""||typeof C=="number")return v=v.get(b)||null,a(m,v,""+C,k);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case th:return v=v.get(C.key===null?b:C.key)||null,l(m,v,C,k);case tl:return v=v.get(C.key===null?b:C.key)||null,u(m,v,C,k);case Wo:var x=C._init;return h(v,m,b,x(C._payload),k)}if(cc(C)||Uu(C))return v=v.get(b)||null,c(m,v,C,k,null);fh(m,C)}return null}function p(v,m,b,C){for(var k=null,x=null,E=m,R=m=0,M=null;E!==null&&R<b.length;R++){E.index>R?(M=E,E=null):M=E.sibling;var L=f(v,E,b[R],C);if(L===null){E===null&&(E=M);break}e&&E&&L.alternate===null&&t(v,E),m=o(L,m,R),x===null?k=L:x.sibling=L,x=L,E=M}if(R===b.length)return n(v,E),_t&&Us(v,R),k;if(E===null){for(;R<b.length;R++)E=d(v,b[R],C),E!==null&&(m=o(E,m,R),x===null?k=E:x.sibling=E,x=E);return _t&&Us(v,R),k}for(E=r(v,E);R<b.length;R++)M=h(E,v,R,b[R],C),M!==null&&(e&&M.alternate!==null&&E.delete(M.key===null?R:M.key),m=o(M,m,R),x===null?k=M:x.sibling=M,x=M);return e&&E.forEach(function(ne){return t(v,ne)}),_t&&Us(v,R),k}function y(v,m,b,C){var k=Uu(b);if(typeof k!="function")throw Error(U(150));if(b=k.call(b),b==null)throw Error(U(151));for(var x=k=null,E=m,R=m=0,M=null,L=b.next();E!==null&&!L.done;R++,L=b.next()){E.index>R?(M=E,E=null):M=E.sibling;var ne=f(v,E,L.value,C);if(ne===null){E===null&&(E=M);break}e&&E&&ne.alternate===null&&t(v,E),m=o(ne,m,R),x===null?k=ne:x.sibling=ne,x=ne,E=M}if(L.done)return n(v,E),_t&&Us(v,R),k;if(E===null){for(;!L.done;R++,L=b.next())L=d(v,L.value,C),L!==null&&(m=o(L,m,R),x===null?k=L:x.sibling=L,x=L);return _t&&Us(v,R),k}for(E=r(v,E);!L.done;R++,L=b.next())L=h(E,v,R,L.value,C),L!==null&&(e&&L.alternate!==null&&E.delete(L.key===null?R:L.key),m=o(L,m,R),x===null?k=L:x.sibling=L,x=L);return e&&E.forEach(function(Y){return t(v,Y)}),_t&&Us(v,R),k}function S(v,m,b,C){if(typeof b=="object"&&b!==null&&b.type===nl&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case th:e:{for(var k=b.key,x=m;x!==null;){if(x.key===k){if(k=b.type,k===nl){if(x.tag===7){n(v,x.sibling),m=i(x,b.props.children),m.return=v,v=m;break e}}else if(x.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Wo&&uE(k)===x.type){n(v,x.sibling),m=i(x,b.props),m.ref=Gu(v,x,b),m.return=v,v=m;break e}n(v,x);break}else t(v,x);x=x.sibling}b.type===nl?(m=la(b.props.children,v.mode,C,b.key),m.return=v,v=m):(C=Jh(b.type,b.key,b.props,null,v.mode,C),C.ref=Gu(v,m,b),C.return=v,v=C)}return s(v);case tl:e:{for(x=b.key;m!==null;){if(m.key===x)if(m.tag===4&&m.stateNode.containerInfo===b.containerInfo&&m.stateNode.implementation===b.implementation){n(v,m.sibling),m=i(m,b.children||[]),m.return=v,v=m;break e}else{n(v,m);break}else t(v,m);m=m.sibling}m=O0(b,v.mode,C),m.return=v,v=m}return s(v);case Wo:return x=b._init,S(v,m,x(b._payload),C)}if(cc(b))return p(v,m,b,C);if(Uu(b))return y(v,m,b,C);fh(v,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,m!==null&&m.tag===6?(n(v,m.sibling),m=i(m,b),m.return=v,v=m):(n(v,m),m=$0(b,v.mode,C),m.return=v,v=m),s(v)):n(v,m)}return S}var Gl=BA(!0),UA=BA(!1),lf={},Mi=Ds(lf),hd=Ds(lf),pd=Ds(lf);function ea(e){if(e===lf)throw Error(U(174));return e}function Xw(e,t){switch(ut(pd,t),ut(hd,e),ut(Mi,lf),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:m1(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=m1(t,e)}mt(Mi),ut(Mi,t)}function Ql(){mt(Mi),mt(hd),mt(pd)}function WA(e){ea(pd.current);var t=ea(Mi.current),n=m1(t,e.type);t!==n&&(ut(hd,e),ut(Mi,n))}function Jw(e){hd.current===e&&(mt(Mi),mt(hd))}var It=Ds(0);function qp(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var k0=[];function Zw(){for(var e=0;e<k0.length;e++)k0[e]._workInProgressVersionPrimary=null;k0.length=0}var Kh=$o.ReactCurrentDispatcher,T0=$o.ReactCurrentBatchConfig,ya=0,Rt=null,tn=null,hn=null,Kp=!1,Mc=!1,md=0,EF=0;function Pn(){throw Error(U(321))}function eS(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!pi(e[n],t[n]))return!1;return!0}function tS(e,t,n,r,i,o){if(ya=o,Rt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Kh.current=e===null||e.memoizedState===null?IF:AF,e=n(r,i),Mc){o=0;do{if(Mc=!1,md=0,25<=o)throw Error(U(301));o+=1,hn=tn=null,t.updateQueue=null,Kh.current=RF,e=n(r,i)}while(Mc)}if(Kh.current=Gp,t=tn!==null&&tn.next!==null,ya=0,hn=tn=Rt=null,Kp=!1,t)throw Error(U(300));return e}function nS(){var e=md!==0;return md=0,e}function Si(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return hn===null?Rt.memoizedState=hn=e:hn=hn.next=e,hn}function ei(){if(tn===null){var e=Rt.alternate;e=e!==null?e.memoizedState:null}else e=tn.next;var t=hn===null?Rt.memoizedState:hn.next;if(t!==null)hn=t,tn=e;else{if(e===null)throw Error(U(310));tn=e,e={memoizedState:tn.memoizedState,baseState:tn.baseState,baseQueue:tn.baseQueue,queue:tn.queue,next:null},hn===null?Rt.memoizedState=hn=e:hn=hn.next=e}return hn}function gd(e,t){return typeof t=="function"?t(e):t}function P0(e){var t=ei(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var r=tn,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var a=s=null,l=null,u=o;do{var c=u.lane;if((ya&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,s=r):l=l.next=d,Rt.lanes|=c,va|=c}u=u.next}while(u!==null&&u!==o);l===null?s=r:l.next=a,pi(r,t.memoizedState)||(cr=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,Rt.lanes|=o,va|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function I0(e){var t=ei(),n=t.queue;if(n===null)throw Error(U(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);pi(o,t.memoizedState)||(cr=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function HA(){}function qA(e,t){var n=Rt,r=ei(),i=t(),o=!pi(r.memoizedState,i);if(o&&(r.memoizedState=i,cr=!0),r=r.queue,rS(QA.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||hn!==null&&hn.memoizedState.tag&1){if(n.flags|=2048,yd(9,GA.bind(null,n,r,i,t),void 0,null),pn===null)throw Error(U(349));ya&30||KA(n,t,i)}return i}function KA(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Rt.updateQueue,t===null?(t={lastEffect:null,stores:null},Rt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function GA(e,t,n,r){t.value=n,t.getSnapshot=r,YA(t)&&XA(e)}function QA(e,t,n){return n(function(){YA(t)&&XA(e)})}function YA(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!pi(e,n)}catch{return!0}}function XA(e){var t=wo(e,1);t!==null&&hi(t,e,1,-1)}function cE(e){var t=Si();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:gd,lastRenderedState:e},t.queue=e,e=e.dispatch=PF.bind(null,Rt,e),[t.memoizedState,e]}function yd(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Rt.updateQueue,t===null?(t={lastEffect:null,stores:null},Rt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function JA(){return ei().memoizedState}function Gh(e,t,n,r){var i=Si();Rt.flags|=e,i.memoizedState=yd(1|t,n,void 0,r===void 0?null:r)}function cg(e,t,n,r){var i=ei();r=r===void 0?null:r;var o=void 0;if(tn!==null){var s=tn.memoizedState;if(o=s.destroy,r!==null&&eS(r,s.deps)){i.memoizedState=yd(t,n,o,r);return}}Rt.flags|=e,i.memoizedState=yd(1|t,n,o,r)}function dE(e,t){return Gh(8390656,8,e,t)}function rS(e,t){return cg(2048,8,e,t)}function ZA(e,t){return cg(4,2,e,t)}function eR(e,t){return cg(4,4,e,t)}function tR(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function nR(e,t,n){return n=n!=null?n.concat([e]):null,cg(4,4,tR.bind(null,t,e),n)}function iS(){}function rR(e,t){var n=ei();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&eS(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function iR(e,t){var n=ei();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&eS(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function oR(e,t,n){return ya&21?(pi(n,t)||(n=lA(),Rt.lanes|=n,va|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,cr=!0),e.memoizedState=n)}function kF(e,t){var n=et;et=n!==0&&4>n?n:4,e(!0);var r=T0.transition;T0.transition={};try{e(!1),t()}finally{et=n,T0.transition=r}}function sR(){return ei().memoizedState}function TF(e,t,n){var r=hs(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},aR(e))lR(t,n);else if(n=jA(e,t,n,r),n!==null){var i=tr();hi(n,e,r,i),uR(n,t,r)}}function PF(e,t,n){var r=hs(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(aR(e))lR(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,pi(a,s)){var l=t.interleaved;l===null?(i.next=i,Qw(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=jA(e,t,i,r),n!==null&&(i=tr(),hi(n,e,r,i),uR(n,t,r))}}function aR(e){var t=e.alternate;return e===Rt||t!==null&&t===Rt}function lR(e,t){Mc=Kp=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function uR(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Dw(e,n)}}var Gp={readContext:Zr,useCallback:Pn,useContext:Pn,useEffect:Pn,useImperativeHandle:Pn,useInsertionEffect:Pn,useLayoutEffect:Pn,useMemo:Pn,useReducer:Pn,useRef:Pn,useState:Pn,useDebugValue:Pn,useDeferredValue:Pn,useTransition:Pn,useMutableSource:Pn,useSyncExternalStore:Pn,useId:Pn,unstable_isNewReconciler:!1},IF={readContext:Zr,useCallback:function(e,t){return Si().memoizedState=[e,t===void 0?null:t],e},useContext:Zr,useEffect:dE,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gh(4194308,4,tR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gh(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gh(4,2,e,t)},useMemo:function(e,t){var n=Si();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Si();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=TF.bind(null,Rt,e),[r.memoizedState,e]},useRef:function(e){var t=Si();return e={current:e},t.memoizedState=e},useState:cE,useDebugValue:iS,useDeferredValue:function(e){return Si().memoizedState=e},useTransition:function(){var e=cE(!1),t=e[0];return e=kF.bind(null,e[1]),Si().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Rt,i=Si();if(_t){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),pn===null)throw Error(U(349));ya&30||KA(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,dE(QA.bind(null,r,o,e),[e]),r.flags|=2048,yd(9,GA.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Si(),t=pn.identifierPrefix;if(_t){var n=oo,r=io;n=(r&~(1<<32-fi(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=md++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=EF++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},AF={readContext:Zr,useCallback:rR,useContext:Zr,useEffect:rS,useImperativeHandle:nR,useInsertionEffect:ZA,useLayoutEffect:eR,useMemo:iR,useReducer:P0,useRef:JA,useState:function(){return P0(gd)},useDebugValue:iS,useDeferredValue:function(e){var t=ei();return oR(t,tn.memoizedState,e)},useTransition:function(){var e=P0(gd)[0],t=ei().memoizedState;return[e,t]},useMutableSource:HA,useSyncExternalStore:qA,useId:sR,unstable_isNewReconciler:!1},RF={readContext:Zr,useCallback:rR,useContext:Zr,useEffect:rS,useImperativeHandle:nR,useInsertionEffect:ZA,useLayoutEffect:eR,useMemo:iR,useReducer:I0,useRef:JA,useState:function(){return I0(gd)},useDebugValue:iS,useDeferredValue:function(e){var t=ei();return tn===null?t.memoizedState=e:oR(t,tn.memoizedState,e)},useTransition:function(){var e=I0(gd)[0],t=ei().memoizedState;return[e,t]},useMutableSource:HA,useSyncExternalStore:qA,useId:sR,unstable_isNewReconciler:!1};function Yl(e,t){try{var n="",r=t;do n+=o3(r),r=r.return;while(r);var i=n}catch(o){i=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function A0(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function j1(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var $F=typeof WeakMap=="function"?WeakMap:Map;function cR(e,t,n){n=fo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Yp||(Yp=!0,G1=r),j1(e,t)},n}function dR(e,t,n){n=fo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){j1(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){j1(e,t),typeof r!="function"&&(fs===null?fs=new Set([this]):fs.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function fE(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $F;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)||(i.add(n),e=qF.bind(null,e,t,n),t.then(e,e))}function hE(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function pE(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=fo(-1,1),t.tag=2,ds(n,t,1))),n.lanes|=1),e)}var OF=$o.ReactCurrentOwner,cr=!1;function Xn(e,t,n,r){t.child=e===null?UA(t,null,n,r):Gl(t,e.child,n,r)}function mE(e,t,n,r,i){n=n.render;var o=t.ref;return kl(t,i),r=tS(e,t,n,r,o,i),n=nS(),e!==null&&!cr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,So(e,t,i)):(_t&&n&&Uw(t),t.flags|=1,Xn(e,t,r,i),t.child)}function gE(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!fS(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,fR(e,t,o,r,i)):(e=Jh(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:ud,n(s,r)&&e.ref===t.ref)return So(e,t,i)}return t.flags|=1,e=ps(o,r),e.ref=t.ref,e.return=t,t.child=e}function fR(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(ud(o,r)&&e.ref===t.ref)if(cr=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(cr=!0);else return t.lanes=e.lanes,So(e,t,i)}return F1(e,t,n,r,i)}function hR(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ut(fl,wr),wr|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ut(fl,wr),wr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,ut(fl,wr),wr|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,ut(fl,wr),wr|=r;return Xn(e,t,i,n),t.child}function pR(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function F1(e,t,n,r,i){var o=hr(n)?ma:Bn.current;return o=ql(t,o),kl(t,i),n=tS(e,t,n,r,o,i),r=nS(),e!==null&&!cr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,So(e,t,i)):(_t&&r&&Uw(t),t.flags|=1,Xn(e,t,n,i),t.child)}function yE(e,t,n,r,i){if(hr(n)){var o=!0;zp(t)}else o=!1;if(kl(t,i),t.stateNode===null)Qh(e,t),VA(t,n,r),L1(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=Zr(u):(u=hr(n)?ma:Bn.current,u=ql(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&lE(t,s,r,u),Ho=!1;var f=t.memoizedState;s.state=f,Hp(t,r,s,i),l=t.memoizedState,a!==r||f!==l||fr.current||Ho?(typeof c=="function"&&(M1(t,n,c,r),l=t.memoizedState),(a=Ho||aE(t,n,a,r,f,l,u))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,FA(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:oi(t.type,a),s.props=u,d=t.pendingProps,f=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Zr(l):(l=hr(n)?ma:Bn.current,l=ql(t,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==d||f!==l)&&lE(t,s,r,l),Ho=!1,f=t.memoizedState,s.state=f,Hp(t,r,s,i);var p=t.memoizedState;a!==d||f!==p||fr.current||Ho?(typeof h=="function"&&(M1(t,n,h,r),p=t.memoizedState),(u=Ho||aE(t,n,u,r,f,p,l)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,p,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,p,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),s.props=r,s.state=p,s.context=l,r=u):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return z1(e,t,n,r,o,i)}function z1(e,t,n,r,i,o){pR(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&nE(t,n,!1),So(e,t,o);r=t.stateNode,OF.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Gl(t,e.child,null,o),t.child=Gl(t,null,a,o)):Xn(e,t,a,o),t.memoizedState=r.state,i&&nE(t,n,!0),t.child}function mR(e){var t=e.stateNode;t.pendingContext?tE(e,t.pendingContext,t.pendingContext!==t.context):t.context&&tE(e,t.context,!1),Xw(e,t.containerInfo)}function vE(e,t,n,r,i){return Kl(),Hw(i),t.flags|=256,Xn(e,t,n,r),t.child}var V1={dehydrated:null,treeContext:null,retryLane:0};function B1(e){return{baseLanes:e,cachePool:null,transitions:null}}function gR(e,t,n){var r=t.pendingProps,i=It.current,o=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ut(It,i&1),e===null)return N1(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=hg(s,r,0,null),e=la(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=B1(n),t.memoizedState=V1,e):oS(t,s));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return NF(e,t,s,r,a,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=ps(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=ps(a,o):(o=la(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?B1(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=V1,r}return o=e.child,e=o.sibling,r=ps(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function oS(e,t){return t=hg({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function hh(e,t,n,r){return r!==null&&Hw(r),Gl(t,e.child,null,n),e=oS(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function NF(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=A0(Error(U(422))),hh(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=hg({mode:"visible",children:r.children},i,0,null),o=la(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Gl(t,e.child,null,s),t.child.memoizedState=B1(s),t.memoizedState=V1,o);if(!(t.mode&1))return hh(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(U(419)),r=A0(o,r,void 0),hh(e,t,s,r)}if(a=(s&e.childLanes)!==0,cr||a){if(r=pn,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,wo(e,i),hi(r,e,i,-1))}return dS(),r=A0(Error(U(421))),hh(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=KF.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,xr=cs(i.nextSibling),_r=t,_t=!0,ai=null,e!==null&&(Br[Ur++]=io,Br[Ur++]=oo,Br[Ur++]=ga,io=e.id,oo=e.overflow,ga=t),t=oS(t,r.children),t.flags|=4096,t)}function bE(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),D1(e.return,t,n)}function R0(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function yR(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Xn(e,t,r.children,n),r=It.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&bE(e,n,t);else if(e.tag===19)bE(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ut(It,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&qp(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),R0(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&qp(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}R0(t,!0,n,null,o);break;case"together":R0(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Qh(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function So(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),va|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,n=ps(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ps(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function DF(e,t,n){switch(t.tag){case 3:mR(t),Kl();break;case 5:WA(t);break;case 1:hr(t.type)&&zp(t);break;case 4:Xw(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ut(Up,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ut(It,It.current&1),t.flags|=128,null):n&t.child.childLanes?gR(e,t,n):(ut(It,It.current&1),e=So(e,t,n),e!==null?e.sibling:null);ut(It,It.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return yR(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ut(It,It.current),r)break;return null;case 22:case 23:return t.lanes=0,hR(e,t,n)}return So(e,t,n)}var vR,U1,bR,wR;vR=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};U1=function(){};bR=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ea(Mi.current);var o=null;switch(n){case"input":i=d1(e,i),r=d1(e,r),o=[];break;case"select":i=$t({},i,{value:void 0}),r=$t({},r,{value:void 0}),o=[];break;case"textarea":i=p1(e,i),r=p1(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=jp)}g1(n,r);var s;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(nd.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(nd.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ft("scroll",e),o||a===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};wR=function(e,t,n,r){n!==r&&(t.flags|=4)};function Qu(e,t){if(!_t)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 In(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&14680064,r|=i.flags&14680064,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 MF(e,t,n){var r=t.pendingProps;switch(Ww(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return In(t),null;case 1:return hr(t.type)&&Fp(),In(t),null;case 3:return r=t.stateNode,Ql(),mt(fr),mt(Bn),Zw(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(dh(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ai!==null&&(X1(ai),ai=null))),U1(e,t),In(t),null;case 5:Jw(t);var i=ea(pd.current);if(n=t.type,e!==null&&t.stateNode!=null)bR(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(U(166));return In(t),null}if(e=ea(Mi.current),dh(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[ki]=t,r[fd]=o,e=(t.mode&1)!==0,n){case"dialog":ft("cancel",r),ft("close",r);break;case"iframe":case"object":case"embed":ft("load",r);break;case"video":case"audio":for(i=0;i<fc.length;i++)ft(fc[i],r);break;case"source":ft("error",r);break;case"img":case"image":case"link":ft("error",r),ft("load",r);break;case"details":ft("toggle",r);break;case"input":PC(r,o),ft("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},ft("invalid",r);break;case"textarea":AC(r,o),ft("invalid",r)}g1(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var a=o[s];s==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&ch(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&ch(r.textContent,a,e),i=["children",""+a]):nd.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&ft("scroll",r)}switch(n){case"input":nh(r),IC(r,o,!0);break;case"textarea":nh(r),RC(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=jp)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=KI(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[ki]=t,e[fd]=r,vR(e,t,!1,!1),t.stateNode=e;e:{switch(s=y1(n,r),n){case"dialog":ft("cancel",e),ft("close",e),i=r;break;case"iframe":case"object":case"embed":ft("load",e),i=r;break;case"video":case"audio":for(i=0;i<fc.length;i++)ft(fc[i],e);i=r;break;case"source":ft("error",e),i=r;break;case"img":case"image":case"link":ft("error",e),ft("load",e),i=r;break;case"details":ft("toggle",e),i=r;break;case"input":PC(e,r),i=d1(e,r),ft("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=$t({},r,{value:void 0}),ft("invalid",e);break;case"textarea":AC(e,r),i=p1(e,r),ft("invalid",e);break;default:i=r}g1(n,i),a=i;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?YI(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&GI(e,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&rd(e,l):typeof l=="number"&&rd(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(nd.hasOwnProperty(o)?l!=null&&o==="onScroll"&&ft("scroll",e):l!=null&&Iw(e,o,l,s))}switch(n){case"input":nh(e),IC(e,r,!1);break;case"textarea":nh(e),RC(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Cs(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?xl(e,!!r.multiple,o,!1):r.defaultValue!=null&&xl(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=jp)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return In(t),null;case 6:if(e&&t.stateNode!=null)wR(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(U(166));if(n=ea(pd.current),ea(Mi.current),dh(t)){if(r=t.stateNode,n=t.memoizedProps,r[ki]=t,(o=r.nodeValue!==n)&&(e=_r,e!==null))switch(e.tag){case 3:ch(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ch(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ki]=t,t.stateNode=r}return In(t),null;case 13:if(mt(It),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_t&&xr!==null&&t.mode&1&&!(t.flags&128))LA(),Kl(),t.flags|=98560,o=!1;else if(o=dh(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(U(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(U(317));o[ki]=t}else Kl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;In(t),o=!1}else ai!==null&&(X1(ai),ai=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||It.current&1?sn===0&&(sn=3):dS())),t.updateQueue!==null&&(t.flags|=4),In(t),null);case 4:return Ql(),U1(e,t),e===null&&cd(t.stateNode.containerInfo),In(t),null;case 10:return Gw(t.type._context),In(t),null;case 17:return hr(t.type)&&Fp(),In(t),null;case 19:if(mt(It),o=t.memoizedState,o===null)return In(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)Qu(o,!1);else{if(sn!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=qp(e),s!==null){for(t.flags|=128,Qu(o,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ut(It,It.current&1|2),t.child}e=e.sibling}o.tail!==null&&Wt()>Xl&&(t.flags|=128,r=!0,Qu(o,!1),t.lanes=4194304)}else{if(!r)if(e=qp(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Qu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!_t)return In(t),null}else 2*Wt()-o.renderingStartTime>Xl&&n!==1073741824&&(t.flags|=128,r=!0,Qu(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Wt(),t.sibling=null,n=It.current,ut(It,r?n&1|2:n&1),t):(In(t),null);case 22:case 23:return cS(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?wr&1073741824&&(In(t),t.subtreeFlags&6&&(t.flags|=8192)):In(t),null;case 24:return null;case 25:return null}throw Error(U(156,t.tag))}function LF(e,t){switch(Ww(t),t.tag){case 1:return hr(t.type)&&Fp(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ql(),mt(fr),mt(Bn),Zw(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Jw(t),null;case 13:if(mt(It),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));Kl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return mt(It),null;case 4:return Ql(),null;case 10:return Gw(t.type._context),null;case 22:case 23:return cS(),null;case 24:return null;default:return null}}var ph=!1,Nn=!1,jF=typeof WeakSet=="function"?WeakSet:Set,re=null;function dl(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){jt(e,t,r)}else n.current=null}function W1(e,t,n){try{n()}catch(r){jt(e,t,r)}}var wE=!1;function FF(e,t){if(T1=Dp,e=CA(),Bw(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(a=s+i),d!==o||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===i&&(a=s),f===o&&++c===r&&(l=s),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(P1={focusedElem:e,selectionRange:n},Dp=!1,re=t;re!==null;)if(t=re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,re=e;else for(;re!==null;){t=re;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var y=p.memoizedProps,S=p.memoizedState,v=t.stateNode,m=v.getSnapshotBeforeUpdate(t.elementType===t.type?y:oi(t.type,y),S);v.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(U(163))}}catch(C){jt(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,re=e;break}re=t.return}return p=wE,wE=!1,p}function Lc(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&W1(t,n,o)}i=i.next}while(i!==r)}}function dg(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function H1(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function SR(e){var t=e.alternate;t!==null&&(e.alternate=null,SR(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ki],delete t[fd],delete t[R1],delete t[SF],delete t[xF])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function xR(e){return e.tag===5||e.tag===3||e.tag===4}function SE(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xR(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function q1(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=jp));else if(r!==4&&(e=e.child,e!==null))for(q1(e,t,n),e=e.sibling;e!==null;)q1(e,t,n),e=e.sibling}function K1(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(K1(e,t,n),e=e.sibling;e!==null;)K1(e,t,n),e=e.sibling}var wn=null,si=!1;function Lo(e,t,n){for(n=n.child;n!==null;)_R(e,t,n),n=n.sibling}function _R(e,t,n){if(Di&&typeof Di.onCommitFiberUnmount=="function")try{Di.onCommitFiberUnmount(rg,n)}catch{}switch(n.tag){case 5:Nn||dl(n,t);case 6:var r=wn,i=si;wn=null,Lo(e,t,n),wn=r,si=i,wn!==null&&(si?(e=wn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):wn.removeChild(n.stateNode));break;case 18:wn!==null&&(si?(e=wn,n=n.stateNode,e.nodeType===8?C0(e.parentNode,n):e.nodeType===1&&C0(e,n),ad(e)):C0(wn,n.stateNode));break;case 4:r=wn,i=si,wn=n.stateNode.containerInfo,si=!0,Lo(e,t,n),wn=r,si=i;break;case 0:case 11:case 14:case 15:if(!Nn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&W1(n,t,s),i=i.next}while(i!==r)}Lo(e,t,n);break;case 1:if(!Nn&&(dl(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){jt(n,t,a)}Lo(e,t,n);break;case 21:Lo(e,t,n);break;case 22:n.mode&1?(Nn=(r=Nn)||n.memoizedState!==null,Lo(e,t,n),Nn=r):Lo(e,t,n);break;default:Lo(e,t,n)}}function xE(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new jF),t.forEach(function(r){var i=GF.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ri(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:wn=a.stateNode,si=!1;break e;case 3:wn=a.stateNode.containerInfo,si=!0;break e;case 4:wn=a.stateNode.containerInfo,si=!0;break e}a=a.return}if(wn===null)throw Error(U(160));_R(o,s,i),wn=null,si=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){jt(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)CR(t,e),t=t.sibling}function CR(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ri(t,e),bi(e),r&4){try{Lc(3,e,e.return),dg(3,e)}catch(y){jt(e,e.return,y)}try{Lc(5,e,e.return)}catch(y){jt(e,e.return,y)}}break;case 1:ri(t,e),bi(e),r&512&&n!==null&&dl(n,n.return);break;case 5:if(ri(t,e),bi(e),r&512&&n!==null&&dl(n,n.return),e.flags&32){var i=e.stateNode;try{rd(i,"")}catch(y){jt(e,e.return,y)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&HI(i,o),y1(a,s);var u=y1(a,o);for(s=0;s<l.length;s+=2){var c=l[s],d=l[s+1];c==="style"?YI(i,d):c==="dangerouslySetInnerHTML"?GI(i,d):c==="children"?rd(i,d):Iw(i,c,d,u)}switch(a){case"input":f1(i,o);break;case"textarea":qI(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;h!=null?xl(i,!!o.multiple,h,!1):f!==!!o.multiple&&(o.defaultValue!=null?xl(i,!!o.multiple,o.defaultValue,!0):xl(i,!!o.multiple,o.multiple?[]:"",!1))}i[fd]=o}catch(y){jt(e,e.return,y)}}break;case 6:if(ri(t,e),bi(e),r&4){if(e.stateNode===null)throw Error(U(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(y){jt(e,e.return,y)}}break;case 3:if(ri(t,e),bi(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ad(t.containerInfo)}catch(y){jt(e,e.return,y)}break;case 4:ri(t,e),bi(e);break;case 13:ri(t,e),bi(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(lS=Wt())),r&4&&xE(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Nn=(u=Nn)||c,ri(t,e),Nn=u):ri(t,e),bi(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(re=e,c=e.child;c!==null;){for(d=re=c;re!==null;){switch(f=re,h=f.child,f.tag){case 0:case 11:case 14:case 15:Lc(4,f,f.return);break;case 1:dl(f,f.return);var p=f.stateNode;if(typeof p.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(y){jt(r,n,y)}}break;case 5:dl(f,f.return);break;case 22:if(f.memoizedState!==null){CE(d);continue}}h!==null?(h.return=f,re=h):CE(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=d.stateNode,l=d.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=QI("display",s))}catch(y){jt(e,e.return,y)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(y){jt(e,e.return,y)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:ri(t,e),bi(e),r&4&&xE(e);break;case 21:break;default:ri(t,e),bi(e)}}function bi(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(xR(n)){var r=n;break e}n=n.return}throw Error(U(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(rd(i,""),r.flags&=-33);var o=SE(e);K1(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,a=SE(e);q1(e,a,s);break;default:throw Error(U(161))}}catch(l){jt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function zF(e,t,n){re=e,ER(e)}function ER(e,t,n){for(var r=(e.mode&1)!==0;re!==null;){var i=re,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||ph;if(!s){var a=i.alternate,l=a!==null&&a.memoizedState!==null||Nn;a=ph;var u=Nn;if(ph=s,(Nn=l)&&!u)for(re=i;re!==null;)s=re,l=s.child,s.tag===22&&s.memoizedState!==null?EE(i):l!==null?(l.return=s,re=l):EE(i);for(;o!==null;)re=o,ER(o),o=o.sibling;re=i,ph=a,Nn=u}_E(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,re=o):_E(e)}}function _E(e){for(;re!==null;){var t=re;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Nn||dg(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Nn)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:oi(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&sE(t,o,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}sE(t,s,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&ad(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(U(163))}Nn||t.flags&512&&H1(t)}catch(f){jt(t,t.return,f)}}if(t===e){re=null;break}if(n=t.sibling,n!==null){n.return=t.return,re=n;break}re=t.return}}function CE(e){for(;re!==null;){var t=re;if(t===e){re=null;break}var n=t.sibling;if(n!==null){n.return=t.return,re=n;break}re=t.return}}function EE(e){for(;re!==null;){var t=re;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{dg(4,t)}catch(l){jt(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){jt(t,i,l)}}var o=t.return;try{H1(t)}catch(l){jt(t,o,l)}break;case 5:var s=t.return;try{H1(t)}catch(l){jt(t,s,l)}}}catch(l){jt(t,t.return,l)}if(t===e){re=null;break}var a=t.sibling;if(a!==null){a.return=t.return,re=a;break}re=t.return}}var VF=Math.ceil,Qp=$o.ReactCurrentDispatcher,sS=$o.ReactCurrentOwner,Qr=$o.ReactCurrentBatchConfig,ze=0,pn=null,Zt=null,En=0,wr=0,fl=Ds(0),sn=0,vd=null,va=0,fg=0,aS=0,jc=null,sr=null,lS=0,Xl=1/0,eo=null,Yp=!1,G1=null,fs=null,mh=!1,ns=null,Xp=0,Fc=0,Q1=null,Yh=-1,Xh=0;function tr(){return ze&6?Wt():Yh!==-1?Yh:Yh=Wt()}function hs(e){return e.mode&1?ze&2&&En!==0?En&-En:CF.transition!==null?(Xh===0&&(Xh=lA()),Xh):(e=et,e!==0||(e=window.event,e=e===void 0?16:mA(e.type)),e):1}function hi(e,t,n,r){if(50<Fc)throw Fc=0,Q1=null,Error(U(185));of(e,n,r),(!(ze&2)||e!==pn)&&(e===pn&&(!(ze&2)&&(fg|=n),sn===4&&Go(e,En)),pr(e,r),n===1&&ze===0&&!(t.mode&1)&&(Xl=Wt()+500,lg&&Ms()))}function pr(e,t){var n=e.callbackNode;C3(e,t);var r=Np(e,e===pn?En:0);if(r===0)n!==null&&NC(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&NC(n),t===1)e.tag===0?_F(kE.bind(null,e)):NA(kE.bind(null,e)),bF(function(){!(ze&6)&&Ms()}),n=null;else{switch(uA(r)){case 1:n=Nw;break;case 4:n=sA;break;case 16:n=Op;break;case 536870912:n=aA;break;default:n=Op}n=OR(n,kR.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function kR(e,t){if(Yh=-1,Xh=0,ze&6)throw Error(U(327));var n=e.callbackNode;if(Tl()&&e.callbackNode!==n)return null;var r=Np(e,e===pn?En:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Jp(e,r);else{t=r;var i=ze;ze|=2;var o=PR();(pn!==e||En!==t)&&(eo=null,Xl=Wt()+500,aa(e,t));do try{WF();break}catch(a){TR(e,a)}while(1);Kw(),Qp.current=o,ze=i,Zt!==null?t=0:(pn=null,En=0,t=sn)}if(t!==0){if(t===2&&(i=x1(e),i!==0&&(r=i,t=Y1(e,i))),t===1)throw n=vd,aa(e,0),Go(e,r),pr(e,Wt()),n;if(t===6)Go(e,r);else{if(i=e.current.alternate,!(r&30)&&!BF(i)&&(t=Jp(e,r),t===2&&(o=x1(e),o!==0&&(r=o,t=Y1(e,o))),t===1))throw n=vd,aa(e,0),Go(e,r),pr(e,Wt()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(U(345));case 2:Ws(e,sr,eo);break;case 3:if(Go(e,r),(r&130023424)===r&&(t=lS+500-Wt(),10<t)){if(Np(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){tr(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=A1(Ws.bind(null,e,sr,eo),t);break}Ws(e,sr,eo);break;case 4:if(Go(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-fi(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=Wt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*VF(r/1960))-r,10<r){e.timeoutHandle=A1(Ws.bind(null,e,sr,eo),r);break}Ws(e,sr,eo);break;case 5:Ws(e,sr,eo);break;default:throw Error(U(329))}}}return pr(e,Wt()),e.callbackNode===n?kR.bind(null,e):null}function Y1(e,t){var n=jc;return e.current.memoizedState.isDehydrated&&(aa(e,t).flags|=256),e=Jp(e,t),e!==2&&(t=sr,sr=n,t!==null&&X1(t)),e}function X1(e){sr===null?sr=e:sr.push.apply(sr,e)}function BF(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!pi(o(),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 Go(e,t){for(t&=~aS,t&=~fg,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-fi(t),r=1<<n;e[n]=-1,t&=~r}}function kE(e){if(ze&6)throw Error(U(327));Tl();var t=Np(e,0);if(!(t&1))return pr(e,Wt()),null;var n=Jp(e,t);if(e.tag!==0&&n===2){var r=x1(e);r!==0&&(t=r,n=Y1(e,r))}if(n===1)throw n=vd,aa(e,0),Go(e,t),pr(e,Wt()),n;if(n===6)throw Error(U(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ws(e,sr,eo),pr(e,Wt()),null}function uS(e,t){var n=ze;ze|=1;try{return e(t)}finally{ze=n,ze===0&&(Xl=Wt()+500,lg&&Ms())}}function ba(e){ns!==null&&ns.tag===0&&!(ze&6)&&Tl();var t=ze;ze|=1;var n=Qr.transition,r=et;try{if(Qr.transition=null,et=1,e)return e()}finally{et=r,Qr.transition=n,ze=t,!(ze&6)&&Ms()}}function cS(){wr=fl.current,mt(fl)}function aa(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,vF(n)),Zt!==null)for(n=Zt.return;n!==null;){var r=n;switch(Ww(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Fp();break;case 3:Ql(),mt(fr),mt(Bn),Zw();break;case 5:Jw(r);break;case 4:Ql();break;case 13:mt(It);break;case 19:mt(It);break;case 10:Gw(r.type._context);break;case 22:case 23:cS()}n=n.return}if(pn=e,Zt=e=ps(e.current,null),En=wr=t,sn=0,vd=null,aS=fg=va=0,sr=jc=null,Zs!==null){for(t=0;t<Zs.length;t++)if(n=Zs[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}Zs=null}return e}function TR(e,t){do{var n=Zt;try{if(Kw(),Kh.current=Gp,Kp){for(var r=Rt.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Kp=!1}if(ya=0,hn=tn=Rt=null,Mc=!1,md=0,sS.current=null,n===null||n.return===null){sn=1,vd=t,Zt=null;break}e:{var o=e,s=n.return,a=n,l=t;if(t=En,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=hE(s);if(h!==null){h.flags&=-257,pE(h,s,a,o,t),h.mode&1&&fE(o,u,t),t=h,l=u;var p=t.updateQueue;if(p===null){var y=new Set;y.add(l),t.updateQueue=y}else p.add(l);break e}else{if(!(t&1)){fE(o,u,t),dS();break e}l=Error(U(426))}}else if(_t&&a.mode&1){var S=hE(s);if(S!==null){!(S.flags&65536)&&(S.flags|=256),pE(S,s,a,o,t),Hw(Yl(l,a));break e}}o=l=Yl(l,a),sn!==4&&(sn=2),jc===null?jc=[o]:jc.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=cR(o,l,t);oE(o,v);break e;case 1:a=l;var m=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof m.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(fs===null||!fs.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var C=dR(o,a,t);oE(o,C);break e}}o=o.return}while(o!==null)}AR(n)}catch(k){t=k,Zt===n&&n!==null&&(Zt=n=n.return);continue}break}while(1)}function PR(){var e=Qp.current;return Qp.current=Gp,e===null?Gp:e}function dS(){(sn===0||sn===3||sn===2)&&(sn=4),pn===null||!(va&268435455)&&!(fg&268435455)||Go(pn,En)}function Jp(e,t){var n=ze;ze|=2;var r=PR();(pn!==e||En!==t)&&(eo=null,aa(e,t));do try{UF();break}catch(i){TR(e,i)}while(1);if(Kw(),ze=n,Qp.current=r,Zt!==null)throw Error(U(261));return pn=null,En=0,sn}function UF(){for(;Zt!==null;)IR(Zt)}function WF(){for(;Zt!==null&&!m3();)IR(Zt)}function IR(e){var t=$R(e.alternate,e,wr);e.memoizedProps=e.pendingProps,t===null?AR(e):Zt=t,sS.current=null}function AR(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=LF(n,t),n!==null){n.flags&=32767,Zt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{sn=6,Zt=null;return}}else if(n=MF(n,t,wr),n!==null){Zt=n;return}if(t=t.sibling,t!==null){Zt=t;return}Zt=t=e}while(t!==null);sn===0&&(sn=5)}function Ws(e,t,n){var r=et,i=Qr.transition;try{Qr.transition=null,et=1,HF(e,t,n,r)}finally{Qr.transition=i,et=r}return null}function HF(e,t,n,r){do Tl();while(ns!==null);if(ze&6)throw Error(U(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(U(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(E3(e,o),e===pn&&(Zt=pn=null,En=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||mh||(mh=!0,OR(Op,function(){return Tl(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=Qr.transition,Qr.transition=null;var s=et;et=1;var a=ze;ze|=4,sS.current=null,FF(e,n),CR(n,e),dF(P1),Dp=!!T1,P1=T1=null,e.current=n,zF(n),g3(),ze=a,et=s,Qr.transition=o}else e.current=n;if(mh&&(mh=!1,ns=e,Xp=i),o=e.pendingLanes,o===0&&(fs=null),b3(n.stateNode),pr(e,Wt()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Yp)throw Yp=!1,e=G1,G1=null,e;return Xp&1&&e.tag!==0&&Tl(),o=e.pendingLanes,o&1?e===Q1?Fc++:(Fc=0,Q1=e):Fc=0,Ms(),null}function Tl(){if(ns!==null){var e=uA(Xp),t=Qr.transition,n=et;try{if(Qr.transition=null,et=16>e?16:e,ns===null)var r=!1;else{if(e=ns,ns=null,Xp=0,ze&6)throw Error(U(331));var i=ze;for(ze|=4,re=e.current;re!==null;){var o=re,s=o.child;if(re.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(re=u;re!==null;){var c=re;switch(c.tag){case 0:case 11:case 15:Lc(8,c,o)}var d=c.child;if(d!==null)d.return=c,re=d;else for(;re!==null;){c=re;var f=c.sibling,h=c.return;if(SR(c),c===u){re=null;break}if(f!==null){f.return=h,re=f;break}re=h}}}var p=o.alternate;if(p!==null){var y=p.child;if(y!==null){p.child=null;do{var S=y.sibling;y.sibling=null,y=S}while(y!==null)}}re=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,re=s;else e:for(;re!==null;){if(o=re,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Lc(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,re=v;break e}re=o.return}}var m=e.current;for(re=m;re!==null;){s=re;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,re=b;else e:for(s=m;re!==null;){if(a=re,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:dg(9,a)}}catch(k){jt(a,a.return,k)}if(a===s){re=null;break e}var C=a.sibling;if(C!==null){C.return=a.return,re=C;break e}re=a.return}}if(ze=i,Ms(),Di&&typeof Di.onPostCommitFiberRoot=="function")try{Di.onPostCommitFiberRoot(rg,e)}catch{}r=!0}return r}finally{et=n,Qr.transition=t}}return!1}function TE(e,t,n){t=Yl(n,t),t=cR(e,t,1),e=ds(e,t,1),t=tr(),e!==null&&(of(e,1,t),pr(e,t))}function jt(e,t,n){if(e.tag===3)TE(e,e,n);else for(;t!==null;){if(t.tag===3){TE(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(fs===null||!fs.has(r))){e=Yl(n,e),e=dR(t,e,1),t=ds(t,e,1),e=tr(),t!==null&&(of(t,1,e),pr(t,e));break}}t=t.return}}function qF(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=tr(),e.pingedLanes|=e.suspendedLanes&n,pn===e&&(En&n)===n&&(sn===4||sn===3&&(En&130023424)===En&&500>Wt()-lS?aa(e,0):aS|=n),pr(e,t)}function RR(e,t){t===0&&(e.mode&1?(t=oh,oh<<=1,!(oh&130023424)&&(oh=4194304)):t=1);var n=tr();e=wo(e,t),e!==null&&(of(e,t,n),pr(e,n))}function KF(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),RR(e,n)}function GF(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(U(314))}r!==null&&r.delete(t),RR(e,n)}var $R;$R=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||fr.current)cr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return cr=!1,DF(e,t,n);cr=!!(e.flags&131072)}else cr=!1,_t&&t.flags&1048576&&DA(t,Bp,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Qh(e,t),e=t.pendingProps;var i=ql(t,Bn.current);kl(t,n),i=tS(null,t,r,e,i,n);var o=nS();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,hr(r)?(o=!0,zp(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Yw(t),i.updater=ug,t.stateNode=i,i._reactInternals=t,L1(t,r,e,n),t=z1(null,t,r,!0,o,n)):(t.tag=0,_t&&o&&Uw(t),Xn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Qh(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=YF(r),e=oi(r,e),i){case 0:t=F1(null,t,r,e,n);break e;case 1:t=yE(null,t,r,e,n);break e;case 11:t=mE(null,t,r,e,n);break e;case 14:t=gE(null,t,r,oi(r.type,e),n);break e}throw Error(U(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:oi(r,i),F1(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:oi(r,i),yE(e,t,r,i,n);case 3:e:{if(mR(t),e===null)throw Error(U(387));r=t.pendingProps,o=t.memoizedState,i=o.element,FA(e,t),Hp(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Yl(Error(U(423)),t),t=vE(e,t,r,n,i);break e}else if(r!==i){i=Yl(Error(U(424)),t),t=vE(e,t,r,n,i);break e}else for(xr=cs(t.stateNode.containerInfo.firstChild),_r=t,_t=!0,ai=null,n=UA(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Kl(),r===i){t=So(e,t,n);break e}Xn(e,t,r,n)}t=t.child}return t;case 5:return WA(t),e===null&&N1(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,I1(r,i)?s=null:o!==null&&I1(r,o)&&(t.flags|=32),pR(e,t),Xn(e,t,s,n),t.child;case 6:return e===null&&N1(t),null;case 13:return gR(e,t,n);case 4:return Xw(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Gl(t,null,r,n):Xn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:oi(r,i),mE(e,t,r,i,n);case 7:return Xn(e,t,t.pendingProps,n),t.child;case 8:return Xn(e,t,t.pendingProps.children,n),t.child;case 12:return Xn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,ut(Up,r._currentValue),r._currentValue=s,o!==null)if(pi(o.value,s)){if(o.children===i.children&&!fr.current){t=So(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=fo(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),D1(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(U(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),D1(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Xn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,kl(t,n),i=Zr(i),r=r(i),t.flags|=1,Xn(e,t,r,n),t.child;case 14:return r=t.type,i=oi(r,t.pendingProps),i=oi(r.type,i),gE(e,t,r,i,n);case 15:return fR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:oi(r,i),Qh(e,t),t.tag=1,hr(r)?(e=!0,zp(t)):e=!1,kl(t,n),VA(t,r,i),L1(t,r,i,n),z1(null,t,r,!0,e,n);case 19:return yR(e,t,n);case 22:return hR(e,t,n)}throw Error(U(156,t.tag))};function OR(e,t){return oA(e,t)}function QF(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qr(e,t,n,r){return new QF(e,t,n,r)}function fS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function YF(e){if(typeof e=="function")return fS(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Rw)return 11;if(e===$w)return 14}return 2}function ps(e,t){var n=e.alternate;return n===null?(n=qr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Jh(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")fS(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case nl:return la(n.children,i,o,t);case Aw:s=8,i|=8;break;case a1:return e=qr(12,n,t,i|2),e.elementType=a1,e.lanes=o,e;case l1:return e=qr(13,n,t,i),e.elementType=l1,e.lanes=o,e;case u1:return e=qr(19,n,t,i),e.elementType=u1,e.lanes=o,e;case BI:return hg(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case zI:s=10;break e;case VI:s=9;break e;case Rw:s=11;break e;case $w:s=14;break e;case Wo:s=16,r=null;break e}throw Error(U(130,e==null?e:typeof e,""))}return t=qr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function la(e,t,n,r){return e=qr(7,e,r,t),e.lanes=n,e}function hg(e,t,n,r){return e=qr(22,e,r,t),e.elementType=BI,e.lanes=n,e.stateNode={isHidden:!1},e}function $0(e,t,n){return e=qr(6,e,null,t),e.lanes=n,e}function O0(e,t,n){return t=qr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function XF(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=h0(0),this.expirationTimes=h0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=h0(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function hS(e,t,n,r,i,o,s,a,l){return e=new XF(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=qr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Yw(o),e}function JF(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:tl,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function NR(e){if(!e)return Es;e=e._reactInternals;e:{if(Ia(e)!==e||e.tag!==1)throw Error(U(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(hr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(U(171))}if(e.tag===1){var n=e.type;if(hr(n))return OA(e,n,t)}return t}function DR(e,t,n,r,i,o,s,a,l){return e=hS(n,r,!0,e,i,o,s,a,l),e.context=NR(null),n=e.current,r=tr(),i=hs(n),o=fo(r,i),o.callback=t??null,ds(n,o,i),e.current.lanes=i,of(e,i,r),pr(e,r),e}function pg(e,t,n,r){var i=t.current,o=tr(),s=hs(i);return n=NR(n),t.context===null?t.context=n:t.pendingContext=n,t=fo(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ds(i,t,s),e!==null&&(hi(e,i,s,o),qh(e,i,s)),s}function Zp(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function PE(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function pS(e,t){PE(e,t),(e=e.alternate)&&PE(e,t)}function ZF(){return null}var MR=typeof reportError=="function"?reportError:function(e){console.error(e)};function mS(e){this._internalRoot=e}mg.prototype.render=mS.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));pg(e,t,null,null)};mg.prototype.unmount=mS.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ba(function(){pg(null,e,null,null)}),t[bo]=null}};function mg(e){this._internalRoot=e}mg.prototype.unstable_scheduleHydration=function(e){if(e){var t=fA();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ko.length&&t!==0&&t<Ko[n].priority;n++);Ko.splice(n,0,e),n===0&&pA(e)}};function gS(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function gg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function IE(){}function ez(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=Zp(s);o.call(u)}}var s=DR(t,r,e,0,null,!1,!1,"",IE);return e._reactRootContainer=s,e[bo]=s.current,cd(e.nodeType===8?e.parentNode:e),ba(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=Zp(l);a.call(u)}}var l=hS(e,0,!1,null,null,!1,!1,"",IE);return e._reactRootContainer=l,e[bo]=l.current,cd(e.nodeType===8?e.parentNode:e),ba(function(){pg(t,l,n,r)}),l}function yg(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var a=i;i=function(){var l=Zp(s);a.call(l)}}pg(t,s,e,i)}else s=ez(n,t,e,i,r);return Zp(s)}cA=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dc(t.pendingLanes);n!==0&&(Dw(t,n|1),pr(t,Wt()),!(ze&6)&&(Xl=Wt()+500,Ms()))}break;case 13:ba(function(){var r=wo(e,1);if(r!==null){var i=tr();hi(r,e,1,i)}}),pS(e,1)}};Mw=function(e){if(e.tag===13){var t=wo(e,134217728);if(t!==null){var n=tr();hi(t,e,134217728,n)}pS(e,134217728)}};dA=function(e){if(e.tag===13){var t=hs(e),n=wo(e,t);if(n!==null){var r=tr();hi(n,e,t,r)}pS(e,t)}};fA=function(){return et};hA=function(e,t){var n=et;try{return et=e,t()}finally{et=n}};b1=function(e,t,n){switch(t){case"input":if(f1(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ag(r);if(!i)throw Error(U(90));WI(r),f1(r,i)}}}break;case"textarea":qI(e,n);break;case"select":t=n.value,t!=null&&xl(e,!!n.multiple,t,!1)}};ZI=uS;eA=ba;var tz={usingClientEntryPoint:!1,Events:[af,sl,ag,XI,JI,uS]},Yu={findFiberByHostInstance:Js,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},nz={bundleType:Yu.bundleType,version:Yu.version,rendererPackageName:Yu.rendererPackageName,rendererConfig:Yu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:$o.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=rA(e),e===null?null:e.stateNode},findFiberByHostInstance:Yu.findFiberByHostInstance||ZF,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var gh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gh.isDisabled&&gh.supportsFiber)try{rg=gh.inject(nz),Di=gh}catch{}}Ar.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tz;Ar.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!gS(t))throw Error(U(200));return JF(e,t,null,n)};Ar.createRoot=function(e,t){if(!gS(e))throw Error(U(299));var n=!1,r="",i=MR;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=hS(e,1,!1,null,null,n,!1,r,i),e[bo]=t.current,cd(e.nodeType===8?e.parentNode:e),new mS(t)};Ar.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=rA(t),e=e===null?null:e.stateNode,e};Ar.flushSync=function(e){return ba(e)};Ar.hydrate=function(e,t,n){if(!gg(t))throw Error(U(200));return yg(null,e,t,!0,n)};Ar.hydrateRoot=function(e,t,n){if(!gS(e))throw Error(U(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=MR;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=DR(t,null,e,1,n??null,i,!1,o,s),e[bo]=t.current,cd(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new mg(t)};Ar.render=function(e,t,n){if(!gg(t))throw Error(U(200));return yg(null,e,t,!1,n)};Ar.unmountComponentAtNode=function(e){if(!gg(e))throw Error(U(40));return e._reactRootContainer?(ba(function(){yg(null,null,e,!1,function(){e._reactRootContainer=null,e[bo]=null})}),!0):!1};Ar.unstable_batchedUpdates=uS;Ar.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!gg(n))throw Error(U(200));if(e==null||e._reactInternals===void 0)throw Error(U(38));return yg(e,t,n,!1,r)};Ar.version="18.2.0-next-9e3b772b8-20220608";function LR(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(LR)}catch(e){console.error(e)}}LR(),DI.exports=Ar;var uf=DI.exports,AE=uf;o1.createRoot=AE.createRoot,o1.hydrateRoot=AE.hydrateRoot;const rz="modulepreload",iz=function(e){return"/"+e},RE={},jR=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=iz(o),o in RE)return;RE[o]=!0;const s=o.endsWith(".css"),a=s?'[rel="stylesheet"]':"";if(!!r)for(let c=i.length-1;c>=0;c--){const d=i[c];if(d.href===o&&(!s||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${a}`))return;const u=document.createElement("link");if(u.rel=s?"stylesheet":rz,s||(u.as="script",u.crossOrigin=""),u.href=o,document.head.appendChild(u),s)return new Promise((c,d)=>{u.addEventListener("load",c),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t())};/**
 * @remix-run/router v1.6.2
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function bd(){return bd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bd.apply(this,arguments)}var rs;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(rs||(rs={}));const $E="popstate";function oz(e){e===void 0&&(e={});function t(r,i){let{pathname:o,search:s,hash:a}=r.location;return J1("",{pathname:o,search:s,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:em(i)}return az(t,n,null,e)}function qt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function yS(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function sz(){return Math.random().toString(36).substr(2,8)}function OE(e,t){return{usr:e.state,key:e.key,idx:t}}function J1(e,t,n,r){return n===void 0&&(n=null),bd({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?_u(t):t,{state:n,key:t&&t.key||r||sz()})}function em(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function _u(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function az(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=rs.Pop,l=null,u=c();u==null&&(u=0,s.replaceState(bd({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){a=rs.Pop;let S=c(),v=S==null?null:S-u;u=S,l&&l({action:a,location:y.location,delta:v})}function f(S,v){a=rs.Push;let m=J1(y.location,S,v);n&&n(m,S),u=c()+1;let b=OE(m,u),C=y.createHref(m);try{s.pushState(b,"",C)}catch{i.location.assign(C)}o&&l&&l({action:a,location:y.location,delta:1})}function h(S,v){a=rs.Replace;let m=J1(y.location,S,v);n&&n(m,S),u=c();let b=OE(m,u),C=y.createHref(m);s.replaceState(b,"",C),o&&l&&l({action:a,location:y.location,delta:0})}function p(S){let v=i.location.origin!=="null"?i.location.origin:i.location.href,m=typeof S=="string"?S:em(S);return qt(v,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,v)}let y={get action(){return a},get location(){return e(i,s)},listen(S){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener($E,d),l=S,()=>{i.removeEventListener($E,d),l=null}},createHref(S){return t(i,S)},createURL:p,encodeLocation(S){let v=p(S);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:f,replace:h,go(S){return s.go(S)}};return y}var NE;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(NE||(NE={}));function lz(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?_u(t):t,i=vS(r.pathname||"/",n);if(i==null)return null;let o=FR(e);uz(o);let s=null;for(let a=0;s==null&&a<o.length;++a)s=vz(o[a],Sz(i));return s}function FR(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(o,s,a)=>{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(qt(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=ms([r,l.relativePath]),c=n.concat(l);o.children&&o.children.length>0&&(qt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),FR(o.children,t,c,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:gz(u,o.index),routesMeta:c})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of zR(o.path))i(o,s,l)}),t}function zR(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=zR(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function uz(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:yz(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const cz=/^:\w+$/,dz=3,fz=2,hz=1,pz=10,mz=-2,DE=e=>e==="*";function gz(e,t){let n=e.split("/"),r=n.length;return n.some(DE)&&(r+=mz),t&&(r+=fz),n.filter(i=>!DE(i)).reduce((i,o)=>i+(cz.test(o)?dz:o===""?hz:pz),r)}function yz(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function vz(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let s=0;s<n.length;++s){let a=n[s],l=s===n.length-1,u=i==="/"?t:t.slice(i.length)||"/",c=bz({path:a.relativePath,caseSensitive:a.caseSensitive,end:l},u);if(!c)return null;Object.assign(r,c.params);let d=a.route;o.push({params:r,pathname:ms([i,c.pathname]),pathnameBase:Ez(ms([i,c.pathnameBase])),route:d}),c.pathnameBase!=="/"&&(i=ms([i,c.pathnameBase]))}return o}function bz(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=wz(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((u,c,d)=>{if(c==="*"){let f=a[d]||"";s=o.slice(0,o.length-f.length).replace(/(.)\/+$/,"$1")}return u[c]=xz(a[d]||"",c),u},{}),pathname:o,pathnameBase:s,pattern:e}}function wz(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),yS(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,(s,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Sz(e){try{return decodeURI(e)}catch(t){return yS(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function xz(e,t){try{return decodeURIComponent(e)}catch(n){return yS(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function vS(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function _z(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?_u(e):e;return{pathname:n?n.startsWith("/")?n:Cz(n,t):t,search:kz(r),hash:Tz(i)}}function Cz(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function N0(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 bS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function wS(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=_u(e):(i=bd({},e),qt(!i.pathname||!i.pathname.includes("?"),N0("?","pathname","search",i)),qt(!i.pathname||!i.pathname.includes("#"),N0("#","pathname","hash",i)),qt(!i.search||!i.search.includes("#"),N0("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(r||s==null)a=n;else{let d=t.length-1;if(s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=_z(i,a),u=s&&s!=="/"&&s.endsWith("/"),c=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const ms=e=>e.join("/").replace(/\/\/+/g,"/"),Ez=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),kz=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Tz=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Pz(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const VR=["post","put","patch","delete"];new Set(VR);const Iz=["get",...VR];new Set(Iz);/**
 * React Router v6.11.2
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function tm(){return tm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tm.apply(this,arguments)}const SS=w.createContext(null),Az=w.createContext(null),Cu=w.createContext(null),vg=w.createContext(null),Gi=w.createContext({outlet:null,matches:[],isDataRoute:!1}),BR=w.createContext(null);function Rz(e,t){let{relative:n}=t===void 0?{}:t;Eu()||qt(!1);let{basename:r,navigator:i}=w.useContext(Cu),{hash:o,pathname:s,search:a}=WR(e,{relative:n}),l=s;return r!=="/"&&(l=s==="/"?r:ms([r,s])),i.createHref({pathname:l,search:a,hash:o})}function Eu(){return w.useContext(vg)!=null}function ku(){return Eu()||qt(!1),w.useContext(vg).location}function UR(e){w.useContext(Cu).static||w.useLayoutEffect(e)}function Tu(){let{isDataRoute:e}=w.useContext(Gi);return e?qz():$z()}function $z(){Eu()||qt(!1);let e=w.useContext(SS),{basename:t,navigator:n}=w.useContext(Cu),{matches:r}=w.useContext(Gi),{pathname:i}=ku(),o=JSON.stringify(bS(r).map(l=>l.pathnameBase)),s=w.useRef(!1);return UR(()=>{s.current=!0}),w.useCallback(function(l,u){if(u===void 0&&(u={}),!s.current)return;if(typeof l=="number"){n.go(l);return}let c=wS(l,JSON.parse(o),i,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:ms([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,o,i,e])}const Oz=w.createContext(null);function Nz(e){let t=w.useContext(Gi).outlet;return t&&w.createElement(Oz.Provider,{value:e},t)}function xS(){let{matches:e}=w.useContext(Gi),t=e[e.length-1];return t?t.params:{}}function WR(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=w.useContext(Gi),{pathname:i}=ku(),o=JSON.stringify(bS(r).map(s=>s.pathnameBase));return w.useMemo(()=>wS(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function Dz(e,t){return Mz(e,t)}function Mz(e,t,n){Eu()||qt(!1);let{navigator:r}=w.useContext(Cu),{matches:i}=w.useContext(Gi),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let a=o?o.pathnameBase:"/";o&&o.route;let l=ku(),u;if(t){var c;let y=typeof t=="string"?_u(t):t;a==="/"||(c=y.pathname)!=null&&c.startsWith(a)||qt(!1),u=y}else u=l;let d=u.pathname||"/",f=a==="/"?d:d.slice(a.length)||"/",h=lz(e,{pathname:f}),p=Vz(h&&h.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:ms([a,r.encodeLocation?r.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?a:ms([a,r.encodeLocation?r.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n);return t&&p?w.createElement(vg.Provider,{value:{location:tm({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:rs.Pop}},p):p}function Lz(){let e=Hz(),t=Pz(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),n?w.createElement("pre",{style:i},n):null,o)}const jz=w.createElement(Lz,null);class Fz extends w.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?w.createElement(Gi.Provider,{value:this.props.routeContext},w.createElement(BR.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function zz(e){let{routeContext:t,match:n,children:r}=e,i=w.useContext(SS);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),w.createElement(Gi.Provider,{value:t},r)}function Vz(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let o=e,s=(r=n)==null?void 0:r.errors;if(s!=null){let a=o.findIndex(l=>l.route.id&&(s==null?void 0:s[l.route.id]));a>=0||qt(!1),o=o.slice(0,Math.min(o.length,a+1))}return o.reduceRight((a,l,u)=>{let c=l.route.id?s==null?void 0:s[l.route.id]:null,d=null;n&&(d=l.route.errorElement||jz);let f=t.concat(o.slice(0,u+1)),h=()=>{let p;return c?p=d:l.route.Component?p=w.createElement(l.route.Component,null):l.route.element?p=l.route.element:p=a,w.createElement(zz,{match:l,routeContext:{outlet:a,matches:f,isDataRoute:n!=null},children:p})};return n&&(l.route.ErrorBoundary||l.route.errorElement||u===0)?w.createElement(Fz,{location:n.location,revalidation:n.revalidation,component:d,error:c,children:h(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):h()},null)}var Z1;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(Z1||(Z1={}));var wd;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(wd||(wd={}));function Bz(e){let t=w.useContext(SS);return t||qt(!1),t}function Uz(e){let t=w.useContext(Az);return t||qt(!1),t}function Wz(e){let t=w.useContext(Gi);return t||qt(!1),t}function HR(e){let t=Wz(),n=t.matches[t.matches.length-1];return n.route.id||qt(!1),n.route.id}function Hz(){var e;let t=w.useContext(BR),n=Uz(wd.UseRouteError),r=HR(wd.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function qz(){let{router:e}=Bz(Z1.UseNavigateStable),t=HR(wd.UseNavigateStable),n=w.useRef(!1);return UR(()=>{n.current=!0}),w.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,tm({fromRouteId:t},o)))},[e,t])}function Kz(e){let{to:t,replace:n,state:r,relative:i}=e;Eu()||qt(!1);let{matches:o}=w.useContext(Gi),{pathname:s}=ku(),a=Tu(),l=wS(t,bS(o).map(c=>c.pathnameBase),s,i==="path"),u=JSON.stringify(l);return w.useEffect(()=>a(JSON.parse(u),{replace:n,state:r,relative:i}),[a,u,i,n,r]),null}function qR(e){return Nz(e.context)}function br(e){qt(!1)}function Gz(e){let{basename:t="/",children:n=null,location:r,navigationType:i=rs.Pop,navigator:o,static:s=!1}=e;Eu()&&qt(!1);let a=t.replace(/^\/*/,"/"),l=w.useMemo(()=>({basename:a,navigator:o,static:s}),[a,o,s]);typeof r=="string"&&(r=_u(r));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:h="default"}=r,p=w.useMemo(()=>{let y=vS(u,a);return y==null?null:{location:{pathname:y,search:c,hash:d,state:f,key:h},navigationType:i}},[a,u,c,d,f,h,i]);return p==null?null:w.createElement(Cu.Provider,{value:l},w.createElement(vg.Provider,{children:n,value:p}))}function Qz(e){let{children:t,location:n}=e;return Dz(eb(t),n)}var ME;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(ME||(ME={}));new Promise(()=>{});function eb(e,t){t===void 0&&(t=[]);let n=[];return w.Children.forEach(e,(r,i)=>{if(!w.isValidElement(r))return;let o=[...t,i];if(r.type===w.Fragment){n.push.apply(n,eb(r.props.children,o));return}r.type!==br&&qt(!1),!r.props.index||!r.props.children||qt(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=eb(r.props.children,o)),n.push(s)}),n}/**
 * React Router DOM v6.11.2
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function tb(){return tb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tb.apply(this,arguments)}function Yz(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Xz(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Jz(e,t){return e.button===0&&(!t||t==="_self")&&!Xz(e)}const Zz=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function e6(e){let{basename:t,children:n,window:r}=e,i=w.useRef();i.current==null&&(i.current=oz({window:r,v5Compat:!0}));let o=i.current,[s,a]=w.useState({action:o.action,location:o.location});return w.useLayoutEffect(()=>o.listen(a),[o]),w.createElement(Gz,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o})}const t6=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",n6=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ft=w.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:u,preventScrollReset:c}=t,d=Yz(t,Zz),{basename:f}=w.useContext(Cu),h,p=!1;if(typeof u=="string"&&n6.test(u)&&(h=u,t6))try{let m=new URL(window.location.href),b=u.startsWith("//")?new URL(m.protocol+u):new URL(u),C=vS(b.pathname,f);b.origin===m.origin&&C!=null?u=C+b.search+b.hash:p=!0}catch{}let y=Rz(u,{relative:i}),S=r6(u,{replace:s,state:a,target:l,preventScrollReset:c,relative:i});function v(m){r&&r(m),m.defaultPrevented||S(m)}return w.createElement("a",tb({},d,{href:h||y,onClick:p||o?r:v,ref:n,target:l}))});var LE;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(LE||(LE={}));var jE;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(jE||(jE={}));function r6(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s}=t===void 0?{}:t,a=Tu(),l=ku(),u=WR(e,{relative:s});return w.useCallback(c=>{if(Jz(c,n)){c.preventDefault();let d=r!==void 0?r:em(l)===em(u);a(e,{replace:d,state:i,preventScrollReset:o,relative:s})}},[l,a,u,r,i,n,e,o,s])}function i6(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function o6(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var s6=function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(o6(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=i6(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Rn="-ms-",nm="-moz-",He="-webkit-",KR="comm",_S="rule",CS="decl",a6="@import",GR="@keyframes",l6="@layer",u6=Math.abs,bg=String.fromCharCode,c6=Object.assign;function d6(e,t){return xn(e,0)^45?(((t<<2^xn(e,0))<<2^xn(e,1))<<2^xn(e,2))<<2^xn(e,3):0}function QR(e){return e.trim()}function f6(e,t){return(e=t.exec(e))?e[0]:e}function qe(e,t,n){return e.replace(t,n)}function nb(e,t){return e.indexOf(t)}function xn(e,t){return e.charCodeAt(t)|0}function Sd(e,t,n){return e.slice(t,n)}function Ci(e){return e.length}function ES(e){return e.length}function yh(e,t){return t.push(e),e}function h6(e,t){return e.map(t).join("")}var wg=1,Jl=1,YR=0,mr=0,Jt=0,Pu="";function Sg(e,t,n,r,i,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:wg,column:Jl,length:s,return:""}}function Xu(e,t){return c6(Sg("",null,null,"",null,null,0),e,{length:-e.length},t)}function p6(){return Jt}function m6(){return Jt=mr>0?xn(Pu,--mr):0,Jl--,Jt===10&&(Jl=1,wg--),Jt}function Cr(){return Jt=mr<YR?xn(Pu,mr++):0,Jl++,Jt===10&&(Jl=1,wg++),Jt}function Li(){return xn(Pu,mr)}function Zh(){return mr}function cf(e,t){return Sd(Pu,e,t)}function xd(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function XR(e){return wg=Jl=1,YR=Ci(Pu=e),mr=0,[]}function JR(e){return Pu="",e}function ep(e){return QR(cf(mr-1,rb(e===91?e+2:e===40?e+1:e)))}function g6(e){for(;(Jt=Li())&&Jt<33;)Cr();return xd(e)>2||xd(Jt)>3?"":" "}function y6(e,t){for(;--t&&Cr()&&!(Jt<48||Jt>102||Jt>57&&Jt<65||Jt>70&&Jt<97););return cf(e,Zh()+(t<6&&Li()==32&&Cr()==32))}function rb(e){for(;Cr();)switch(Jt){case e:return mr;case 34:case 39:e!==34&&e!==39&&rb(Jt);break;case 40:e===41&&rb(e);break;case 92:Cr();break}return mr}function v6(e,t){for(;Cr()&&e+Jt!==47+10;)if(e+Jt===42+42&&Li()===47)break;return"/*"+cf(t,mr-1)+"*"+bg(e===47?e:Cr())}function b6(e){for(;!xd(Li());)Cr();return cf(e,mr)}function w6(e){return JR(tp("",null,null,null,[""],e=XR(e),0,[0],e))}function tp(e,t,n,r,i,o,s,a,l){for(var u=0,c=0,d=s,f=0,h=0,p=0,y=1,S=1,v=1,m=0,b="",C=i,k=o,x=r,E=b;S;)switch(p=m,m=Cr()){case 40:if(p!=108&&xn(E,d-1)==58){nb(E+=qe(ep(m),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:E+=ep(m);break;case 9:case 10:case 13:case 32:E+=g6(p);break;case 92:E+=y6(Zh()-1,7);continue;case 47:switch(Li()){case 42:case 47:yh(S6(v6(Cr(),Zh()),t,n),l);break;default:E+="/"}break;case 123*y:a[u++]=Ci(E)*v;case 125*y:case 59:case 0:switch(m){case 0:case 125:S=0;case 59+c:v==-1&&(E=qe(E,/\f/g,"")),h>0&&Ci(E)-d&&yh(h>32?zE(E+";",r,n,d-1):zE(qe(E," ","")+";",r,n,d-2),l);break;case 59:E+=";";default:if(yh(x=FE(E,t,n,u,c,i,a,b,C=[],k=[],d),o),m===123)if(c===0)tp(E,t,x,x,C,o,d,a,k);else switch(f===99&&xn(E,3)===110?100:f){case 100:case 108:case 109:case 115:tp(e,x,x,r&&yh(FE(e,x,x,0,0,i,a,b,i,C=[],d),k),i,k,d,a,r?C:k);break;default:tp(E,x,x,x,[""],k,0,a,k)}}u=c=h=0,y=v=1,b=E="",d=s;break;case 58:d=1+Ci(E),h=p;default:if(y<1){if(m==123)--y;else if(m==125&&y++==0&&m6()==125)continue}switch(E+=bg(m),m*y){case 38:v=c>0?1:(E+="\f",-1);break;case 44:a[u++]=(Ci(E)-1)*v,v=1;break;case 64:Li()===45&&(E+=ep(Cr())),f=Li(),c=d=Ci(b=E+=b6(Zh())),m++;break;case 45:p===45&&Ci(E)==2&&(y=0)}}return o}function FE(e,t,n,r,i,o,s,a,l,u,c){for(var d=i-1,f=i===0?o:[""],h=ES(f),p=0,y=0,S=0;p<r;++p)for(var v=0,m=Sd(e,d+1,d=u6(y=s[p])),b=e;v<h;++v)(b=QR(y>0?f[v]+" "+m:qe(m,/&\f/g,f[v])))&&(l[S++]=b);return Sg(e,t,n,i===0?_S:a,l,u,c)}function S6(e,t,n){return Sg(e,t,n,KR,bg(p6()),Sd(e,2,-2),0)}function zE(e,t,n,r){return Sg(e,t,n,CS,Sd(e,0,r),Sd(e,r+1,-1),r)}function Pl(e,t){for(var n="",r=ES(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function x6(e,t,n,r){switch(e.type){case l6:if(e.children.length)break;case a6:case CS:return e.return=e.return||e.value;case KR:return"";case GR:return e.return=e.value+"{"+Pl(e.children,r)+"}";case _S:e.value=e.props.join(",")}return Ci(n=Pl(e.children,r))?e.return=e.value+"{"+n+"}":""}function _6(e){var t=ES(e);return function(n,r,i,o){for(var s="",a=0;a<t;a++)s+=e[a](n,r,i,o)||"";return s}}function C6(e){return function(t){t.root||(t=t.return)&&e(t)}}var VE=function(t){var n=new WeakMap;return function(r){if(n.has(r))return n.get(r);var i=t(r);return n.set(r,i),i}};function ZR(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var E6=function(t,n,r){for(var i=0,o=0;i=o,o=Li(),i===38&&o===12&&(n[r]=1),!xd(o);)Cr();return cf(t,mr)},k6=function(t,n){var r=-1,i=44;do switch(xd(i)){case 0:i===38&&Li()===12&&(n[r]=1),t[r]+=E6(mr-1,n,r);break;case 2:t[r]+=ep(i);break;case 4:if(i===44){t[++r]=Li()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=bg(i)}while(i=Cr());return t},T6=function(t,n){return JR(k6(XR(t),n))},BE=new WeakMap,P6=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!BE.get(r))&&!i){BE.set(t,!0);for(var o=[],s=T6(n,o),a=r.props,l=0,u=0;l<s.length;l++)for(var c=0;c<a.length;c++,u++)t.props[u]=o[l]?s[l].replace(/&\f/g,a[c]):a[c]+" "+s[l]}}},I6=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function e$(e,t){switch(d6(e,t)){case 5103:return He+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return He+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return He+e+nm+e+Rn+e+e;case 6828:case 4268:return He+e+Rn+e+e;case 6165:return He+e+Rn+"flex-"+e+e;case 5187:return He+e+qe(e,/(\w+).+(:[^]+)/,He+"box-$1$2"+Rn+"flex-$1$2")+e;case 5443:return He+e+Rn+"flex-item-"+qe(e,/flex-|-self/,"")+e;case 4675:return He+e+Rn+"flex-line-pack"+qe(e,/align-content|flex-|-self/,"")+e;case 5548:return He+e+Rn+qe(e,"shrink","negative")+e;case 5292:return He+e+Rn+qe(e,"basis","preferred-size")+e;case 6060:return He+"box-"+qe(e,"-grow","")+He+e+Rn+qe(e,"grow","positive")+e;case 4554:return He+qe(e,/([^-])(transform)/g,"$1"+He+"$2")+e;case 6187:return qe(qe(qe(e,/(zoom-|grab)/,He+"$1"),/(image-set)/,He+"$1"),e,"")+e;case 5495:case 3959:return qe(e,/(image-set\([^]*)/,He+"$1$`$1");case 4968:return qe(qe(e,/(.+:)(flex-)?(.*)/,He+"box-pack:$3"+Rn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+He+e+e;case 4095:case 3583:case 4068:case 2532:return qe(e,/(.+)-inline(.+)/,He+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ci(e)-1-t>6)switch(xn(e,t+1)){case 109:if(xn(e,t+4)!==45)break;case 102:return qe(e,/(.+:)(.+)-([^]+)/,"$1"+He+"$2-$3$1"+nm+(xn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~nb(e,"stretch")?e$(qe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(xn(e,t+1)!==115)break;case 6444:switch(xn(e,Ci(e)-3-(~nb(e,"!important")&&10))){case 107:return qe(e,":",":"+He)+e;case 101:return qe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+He+(xn(e,14)===45?"inline-":"")+"box$3$1"+He+"$2$3$1"+Rn+"$2box$3")+e}break;case 5936:switch(xn(e,t+11)){case 114:return He+e+Rn+qe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return He+e+Rn+qe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return He+e+Rn+qe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return He+e+Rn+e+e}return e}var A6=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case CS:t.return=e$(t.value,t.length);break;case GR:return Pl([Xu(t,{value:qe(t.value,"@","@"+He)})],i);case _S:if(t.length)return h6(t.props,function(o){switch(f6(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Pl([Xu(t,{props:[qe(o,/:(read-\w+)/,":"+nm+"$1")]})],i);case"::placeholder":return Pl([Xu(t,{props:[qe(o,/:(plac\w+)/,":"+He+"input-$1")]}),Xu(t,{props:[qe(o,/:(plac\w+)/,":"+nm+"$1")]}),Xu(t,{props:[qe(o,/:(plac\w+)/,Rn+"input-$1")]})],i)}return""})}},R6=[A6],$6=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(y){var S=y.getAttribute("data-emotion");S.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var i=t.stylisPlugins||R6,o={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var S=y.getAttribute("data-emotion").split(" "),v=1;v<S.length;v++)o[S[v]]=!0;a.push(y)});var l,u=[P6,I6];{var c,d=[x6,C6(function(y){c.insert(y)})],f=_6(u.concat(i,d)),h=function(S){return Pl(w6(S),f)};l=function(S,v,m,b){c=m,h(S?S+"{"+v.styles+"}":v.styles),b&&(p.inserted[v.name]=!0)}}var p={key:n,sheet:new s6({key:n,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return p.sheet.hydrate(a),p};function je(){return je=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},je.apply(this,arguments)}var t$={exports:{}},nt={};/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var gn=typeof Symbol=="function"&&Symbol.for,kS=gn?Symbol.for("react.element"):60103,TS=gn?Symbol.for("react.portal"):60106,xg=gn?Symbol.for("react.fragment"):60107,_g=gn?Symbol.for("react.strict_mode"):60108,Cg=gn?Symbol.for("react.profiler"):60114,Eg=gn?Symbol.for("react.provider"):60109,kg=gn?Symbol.for("react.context"):60110,PS=gn?Symbol.for("react.async_mode"):60111,Tg=gn?Symbol.for("react.concurrent_mode"):60111,Pg=gn?Symbol.for("react.forward_ref"):60112,Ig=gn?Symbol.for("react.suspense"):60113,O6=gn?Symbol.for("react.suspense_list"):60120,Ag=gn?Symbol.for("react.memo"):60115,Rg=gn?Symbol.for("react.lazy"):60116,N6=gn?Symbol.for("react.block"):60121,D6=gn?Symbol.for("react.fundamental"):60117,M6=gn?Symbol.for("react.responder"):60118,L6=gn?Symbol.for("react.scope"):60119;function $r(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case kS:switch(e=e.type,e){case PS:case Tg:case xg:case Cg:case _g:case Ig:return e;default:switch(e=e&&e.$$typeof,e){case kg:case Pg:case Rg:case Ag:case Eg:return e;default:return t}}case TS:return t}}}function n$(e){return $r(e)===Tg}nt.AsyncMode=PS;nt.ConcurrentMode=Tg;nt.ContextConsumer=kg;nt.ContextProvider=Eg;nt.Element=kS;nt.ForwardRef=Pg;nt.Fragment=xg;nt.Lazy=Rg;nt.Memo=Ag;nt.Portal=TS;nt.Profiler=Cg;nt.StrictMode=_g;nt.Suspense=Ig;nt.isAsyncMode=function(e){return n$(e)||$r(e)===PS};nt.isConcurrentMode=n$;nt.isContextConsumer=function(e){return $r(e)===kg};nt.isContextProvider=function(e){return $r(e)===Eg};nt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===kS};nt.isForwardRef=function(e){return $r(e)===Pg};nt.isFragment=function(e){return $r(e)===xg};nt.isLazy=function(e){return $r(e)===Rg};nt.isMemo=function(e){return $r(e)===Ag};nt.isPortal=function(e){return $r(e)===TS};nt.isProfiler=function(e){return $r(e)===Cg};nt.isStrictMode=function(e){return $r(e)===_g};nt.isSuspense=function(e){return $r(e)===Ig};nt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===xg||e===Tg||e===Cg||e===_g||e===Ig||e===O6||typeof e=="object"&&e!==null&&(e.$$typeof===Rg||e.$$typeof===Ag||e.$$typeof===Eg||e.$$typeof===kg||e.$$typeof===Pg||e.$$typeof===D6||e.$$typeof===M6||e.$$typeof===L6||e.$$typeof===N6)};nt.typeOf=$r;t$.exports=nt;var j6=t$.exports,IS=j6,F6={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},z6={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},V6={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},r$={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},AS={};AS[IS.ForwardRef]=V6;AS[IS.Memo]=r$;function UE(e){return IS.isMemo(e)?r$:AS[e.$$typeof]||F6}var B6=Object.defineProperty,U6=Object.getOwnPropertyNames,WE=Object.getOwnPropertySymbols,W6=Object.getOwnPropertyDescriptor,H6=Object.getPrototypeOf,HE=Object.prototype;function i$(e,t,n){if(typeof t!="string"){if(HE){var r=H6(t);r&&r!==HE&&i$(e,r,n)}var i=U6(t);WE&&(i=i.concat(WE(t)));for(var o=UE(e),s=UE(t),a=0;a<i.length;++a){var l=i[a];if(!z6[l]&&!(n&&n[l])&&!(s&&s[l])&&!(o&&o[l])){var u=W6(t,l);try{B6(e,l,u)}catch{}}}}return e}var q6=i$;const Zhe=tg(q6);var K6=!0;function G6(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var o$=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||K6===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},s$=function(t,n,r){o$(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function Q6(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Y6={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},X6=/[A-Z]|^ms/g,J6=/_EMO_([^_]+?)_([^]*?)_EMO_/g,a$=function(t){return t.charCodeAt(1)===45},qE=function(t){return t!=null&&typeof t!="boolean"},D0=ZR(function(e){return a$(e)?e:e.replace(X6,"-$&").toLowerCase()}),KE=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(J6,function(r,i,o){return Ei={name:i,styles:o,next:Ei},i})}return Y6[t]!==1&&!a$(t)&&typeof n=="number"&&n!==0?n+"px":n};function _d(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Ei={name:n.name,styles:n.styles,next:Ei},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Ei={name:r.name,styles:r.styles,next:Ei},r=r.next;var i=n.styles+";";return i}return Z6(e,t,n)}case"function":{if(e!==void 0){var o=Ei,s=n(e);return Ei=o,_d(e,t,s)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function Z6(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=_d(e,t,n[i])+";";else for(var o in n){var s=n[o];if(typeof s!="object")t!=null&&t[s]!==void 0?r+=o+"{"+t[s]+"}":qE(s)&&(r+=D0(o)+":"+KE(o,s)+";");else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var a=0;a<s.length;a++)qE(s[a])&&(r+=D0(o)+":"+KE(o,s[a])+";");else{var l=_d(e,t,s);switch(o){case"animation":case"animationName":{r+=D0(o)+":"+l+";";break}default:r+=o+"{"+l+"}"}}}return r}var GE=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Ei,RS=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,o="";Ei=void 0;var s=t[0];s==null||s.raw===void 0?(i=!1,o+=_d(r,n,s)):o+=s[0];for(var a=1;a<t.length;a++)o+=_d(r,n,t[a]),i&&(o+=s[a]);GE.lastIndex=0;for(var l="",u;(u=GE.exec(o))!==null;)l+="-"+u[1];var c=Q6(o)+l;return{name:c,styles:o,next:Ei}},e9=function(t){return t()},l$=i1["useInsertionEffect"]?i1["useInsertionEffect"]:!1,t9=l$||e9,QE=l$||w.useLayoutEffect,u$=w.createContext(typeof HTMLElement<"u"?$6({key:"css"}):null);u$.Provider;var c$=function(t){return w.forwardRef(function(n,r){var i=w.useContext(u$);return t(n,i,r)})},Zl=w.createContext({}),n9=function(t,n){if(typeof n=="function"){var r=n(t);return r}return je({},t,n)},r9=VE(function(e){return VE(function(t){return n9(e,t)})}),i9=function(t){var n=w.useContext(Zl);return t.theme!==n&&(n=r9(n)(t.theme)),w.createElement(Zl.Provider,{value:n},t.children)},$g=c$(function(e,t){var n=e.styles,r=RS([n],void 0,w.useContext(Zl)),i=w.useRef();return QE(function(){var o=t.key+"-global",s=new t.sheet.constructor({key:o,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,l=document.querySelector('style[data-emotion="'+o+" "+r.name+'"]');return t.sheet.tags.length&&(s.before=t.sheet.tags[0]),l!==null&&(a=!0,l.setAttribute("data-emotion",o),s.hydrate([l])),i.current=[s,a],function(){s.flush()}},[t]),QE(function(){var o=i.current,s=o[0],a=o[1];if(a){o[1]=!1;return}if(r.next!==void 0&&s$(t,r.next,!0),s.tags.length){var l=s.tags[s.tags.length-1].nextElementSibling;s.before=l,s.flush()}t.insert("",r,s,!1)},[t,r.name]),null});function o9(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return RS(t)}var s9=function(){var t=o9.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},d$=String.raw,f$=d$`
  :root,
  :host {
    --chakra-vh: 100vh;
  }

  @supports (height: -webkit-fill-available) {
    :root,
    :host {
      --chakra-vh: -webkit-fill-available;
    }
  }

  @supports (height: -moz-fill-available) {
    :root,
    :host {
      --chakra-vh: -moz-fill-available;
    }
  }

  @supports (height: 100dvh) {
    :root,
    :host {
      --chakra-vh: 100dvh;
    }
  }
`,a9=()=>g.jsx($g,{styles:f$}),l9=({scope:e=""})=>g.jsx($g,{styles:d$`
      html {
        line-height: 1.5;
        -webkit-text-size-adjust: 100%;
        font-family: system-ui, sans-serif;
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
        -moz-osx-font-smoothing: grayscale;
        touch-action: manipulation;
      }

      body {
        position: relative;
        min-height: 100%;
        margin: 0;
        font-feature-settings: "kern";
      }

      ${e} :where(*, *::before, *::after) {
        border-width: 0;
        border-style: solid;
        box-sizing: border-box;
        word-wrap: break-word;
      }

      main {
        display: block;
      }

      ${e} hr {
        border-top-width: 1px;
        box-sizing: content-box;
        height: 0;
        overflow: visible;
      }

      ${e} :where(pre, code, kbd,samp) {
        font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        font-size: 1em;
      }

      ${e} a {
        background-color: transparent;
        color: inherit;
        text-decoration: inherit;
      }

      ${e} abbr[title] {
        border-bottom: none;
        text-decoration: underline;
        -webkit-text-decoration: underline dotted;
        text-decoration: underline dotted;
      }

      ${e} :where(b, strong) {
        font-weight: bold;
      }

      ${e} small {
        font-size: 80%;
      }

      ${e} :where(sub,sup) {
        font-size: 75%;
        line-height: 0;
        position: relative;
        vertical-align: baseline;
      }

      ${e} sub {
        bottom: -0.25em;
      }

      ${e} sup {
        top: -0.5em;
      }

      ${e} img {
        border-style: none;
      }

      ${e} :where(button, input, optgroup, select, textarea) {
        font-family: inherit;
        font-size: 100%;
        line-height: 1.15;
        margin: 0;
      }

      ${e} :where(button, input) {
        overflow: visible;
      }

      ${e} :where(button, select) {
        text-transform: none;
      }

      ${e} :where(
          button::-moz-focus-inner,
          [type="button"]::-moz-focus-inner,
          [type="reset"]::-moz-focus-inner,
          [type="submit"]::-moz-focus-inner
        ) {
        border-style: none;
        padding: 0;
      }

      ${e} fieldset {
        padding: 0.35em 0.75em 0.625em;
      }

      ${e} legend {
        box-sizing: border-box;
        color: inherit;
        display: table;
        max-width: 100%;
        padding: 0;
        white-space: normal;
      }

      ${e} progress {
        vertical-align: baseline;
      }

      ${e} textarea {
        overflow: auto;
      }

      ${e} :where([type="checkbox"], [type="radio"]) {
        box-sizing: border-box;
        padding: 0;
      }

      ${e} input[type="number"]::-webkit-inner-spin-button,
      ${e} input[type="number"]::-webkit-outer-spin-button {
        -webkit-appearance: none !important;
      }

      ${e} input[type="number"] {
        -moz-appearance: textfield;
      }

      ${e} input[type="search"] {
        -webkit-appearance: textfield;
        outline-offset: -2px;
      }

      ${e} input[type="search"]::-webkit-search-decoration {
        -webkit-appearance: none !important;
      }

      ${e} ::-webkit-file-upload-button {
        -webkit-appearance: button;
        font: inherit;
      }

      ${e} details {
        display: block;
      }

      ${e} summary {
        display: list-item;
      }

      template {
        display: none;
      }

      [hidden] {
        display: none !important;
      }

      ${e} :where(
          blockquote,
          dl,
          dd,
          h1,
          h2,
          h3,
          h4,
          h5,
          h6,
          hr,
          figure,
          p,
          pre
        ) {
        margin: 0;
      }

      ${e} button {
        background: transparent;
        padding: 0;
      }

      ${e} fieldset {
        margin: 0;
        padding: 0;
      }

      ${e} :where(ol, ul) {
        margin: 0;
        padding: 0;
      }

      ${e} textarea {
        resize: vertical;
      }

      ${e} :where(button, [role="button"]) {
        cursor: pointer;
      }

      ${e} button::-moz-focus-inner {
        border: 0 !important;
      }

      ${e} table {
        border-collapse: collapse;
      }

      ${e} :where(h1, h2, h3, h4, h5, h6) {
        font-size: inherit;
        font-weight: inherit;
      }

      ${e} :where(button, input, optgroup, select, textarea) {
        padding: 0;
        line-height: inherit;
        color: inherit;
      }

      ${e} :where(img, svg, video, canvas, audio, iframe, embed, object) {
        display: block;
      }

      ${e} :where(img, video) {
        max-width: 100%;
        height: auto;
      }

      [data-js-focus-visible]
        :focus:not([data-focus-visible-added]):not(
          [data-focus-visible-disabled]
        ) {
        outline: none;
        box-shadow: none;
      }

      ${e} select::-ms-expand {
        display: none;
      }

      ${f$}
    `});function u9(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Or(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o,defaultValue:s}=e,a=w.createContext(s);a.displayName=t;function l(){var u;const c=w.useContext(a);if(!c&&n){const d=new Error(o??u9(r,i));throw d.name="ContextError",(u=Error.captureStackTrace)==null||u.call(Error,d,l),d}return c}return[a.Provider,l,a]}var[c9,d9]=Or({strict:!1,name:"PortalManagerContext"});function h$(e){const{children:t,zIndex:n}=e;return g.jsx(c9,{value:{zIndex:n},children:t})}h$.displayName="PortalManager";var eu=globalThis!=null&&globalThis.document?w.useLayoutEffect:w.useEffect,[p$,f9]=Or({strict:!1,name:"PortalContext"}),$S="chakra-portal",h9=".chakra-portal",p9=e=>g.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),m9=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=w.useState(null),o=w.useRef(null),[,s]=w.useState({});w.useEffect(()=>s({}),[]);const a=f9(),l=d9();eu(()=>{if(!r)return;const c=r.ownerDocument,d=t?a??c.body:c.body;if(!d)return;o.current=c.createElement("div"),o.current.className=$S,d.appendChild(o.current),s({});const f=o.current;return()=>{d.contains(f)&&d.removeChild(f)}},[r]);const u=l!=null&&l.zIndex?g.jsx(p9,{zIndex:l==null?void 0:l.zIndex,children:n}):n;return o.current?uf.createPortal(g.jsx(p$,{value:o.current,children:u}),o.current):g.jsx("span",{ref:c=>{c&&i(c)}})},g9=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),s=w.useMemo(()=>{const l=i==null?void 0:i.ownerDocument.createElement("div");return l&&(l.className=$S),l},[i]),[,a]=w.useState({});return eu(()=>a({}),[]),eu(()=>{if(!(!s||!o))return o.appendChild(s),()=>{o.removeChild(s)}},[s,o]),o&&s?uf.createPortal(g.jsx(p$,{value:r?s:null,children:t}),s):null};function Og(e){const t={appendToParentPortal:!0,...e},{containerRef:n,...r}=t;return n?g.jsx(g9,{containerRef:n,...r}):g.jsx(m9,{...r})}Og.className=$S;Og.selector=h9;Og.displayName="Portal";function y9(){const e=w.useContext(Zl);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}var OS=w.createContext({});OS.displayName="ColorModeContext";function NS(){const e=w.useContext(OS);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var vh={light:"chakra-ui-light",dark:"chakra-ui-dark"};function v9(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i==null||i()},setClassName(r){document.body.classList.add(r?vh.dark:vh.light),document.body.classList.remove(r?vh.light:vh.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){var i;return((i=n.query().matches)!=null?i:r==="dark")?"dark":"light"},addListener(r){const i=n.query(),o=s=>{r(s.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var b9="chakra-ui-color-mode";function w9(e){return{ssr:!1,type:"localStorage",get(t){if(!(globalThis!=null&&globalThis.document))return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var S9=w9(b9),YE=()=>{};function XE(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function m$(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:s=S9}=e,a=i==="dark"?"dark":"light",[l,u]=w.useState(()=>XE(s,a)),[c,d]=w.useState(()=>XE(s)),{getSystemTheme:f,setClassName:h,setDataset:p,addListener:y}=w.useMemo(()=>v9({preventTransition:o}),[o]),S=i==="system"&&!l?c:l,v=w.useCallback(C=>{const k=C==="system"?f():C;u(k),h(k==="dark"),p(k),s.set(k)},[s,f,h,p]);eu(()=>{i==="system"&&d(f())},[]),w.useEffect(()=>{const C=s.get();if(C){v(C);return}if(i==="system"){v("system");return}v(a)},[s,a,i,v]);const m=w.useCallback(()=>{v(S==="dark"?"light":"dark")},[S,v]);w.useEffect(()=>{if(r)return y(v)},[r,y,v]);const b=w.useMemo(()=>({colorMode:t??S,toggleColorMode:t?YE:m,setColorMode:t?YE:v,forced:t!==void 0}),[S,m,v,t]);return g.jsx(OS.Provider,{value:b,children:n})}m$.displayName="ColorModeProvider";function g$(){const e=NS(),t=y9();return{...e,theme:t}}var Tt=(...e)=>e.filter(Boolean).join(" ");function x9(){return!1}function Yr(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}var _9=e=>{const{condition:t,message:n}=e;t&&x9()&&console.warn(n)};function Ai(e,...t){return C9(e)?e(...t):e}var C9=e=>typeof e=="function",is=e=>e?"":void 0,M0=e=>e?!0:void 0;function tu(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function epe(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}var rm={exports:{}};rm.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,s=9007199254740991,a="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",p="[object GeneratorFunction]",y="[object Map]",S="[object Number]",v="[object Null]",m="[object Object]",b="[object Proxy]",C="[object RegExp]",k="[object Set]",x="[object String]",E="[object Undefined]",R="[object WeakMap]",M="[object ArrayBuffer]",L="[object DataView]",ne="[object Float32Array]",Y="[object Float64Array]",Z="[object Int8Array]",ie="[object Int16Array]",he="[object Int32Array]",Ce="[object Uint8Array]",G="[object Uint8ClampedArray]",V="[object Uint16Array]",ee="[object Uint32Array]",se=/[\\^$.*+?()[\]{}|]/g,ue=/^\[object .+?Constructor\]$/,ke=/^(?:0|[1-9]\d*)$/,Se={};Se[ne]=Se[Y]=Se[Z]=Se[ie]=Se[he]=Se[Ce]=Se[G]=Se[V]=Se[ee]=!0,Se[a]=Se[l]=Se[M]=Se[c]=Se[L]=Se[d]=Se[f]=Se[h]=Se[y]=Se[S]=Se[m]=Se[C]=Se[k]=Se[x]=Se[R]=!1;var Te=typeof Zf=="object"&&Zf&&Zf.Object===Object&&Zf,yt=typeof self=="object"&&self&&self.Object===Object&&self,$e=Te||yt||Function("return this")(),Bt=t&&!t.nodeType&&t,Kn=Bt&&!0&&e&&!e.nodeType&&e,Gn=Kn&&Kn.exports===Bt,Xe=Gn&&Te.process,lt=function(){try{var _=Kn&&Kn.require&&Kn.require("util").types;return _||Xe&&Xe.binding&&Xe.binding("util")}catch{}}(),Qn=lt&&lt.isTypedArray;function Do(_,P,$){switch($.length){case 0:return _.call(P);case 1:return _.call(P,$[0]);case 2:return _.call(P,$[0],$[1]);case 3:return _.call(P,$[0],$[1],$[2])}return _.apply(P,$)}function ja(_,P){for(var $=-1,te=Array(_);++$<_;)te[$]=P($);return te}function Fa(_){return function(P){return _(P)}}function T(_,P){return _==null?void 0:_[P]}function O(_,P){return function($){return _(P($))}}var j=Array.prototype,oe=Function.prototype,X=Object.prototype,q=$e["__core-js_shared__"],ae=oe.toString,Ne=X.hasOwnProperty,st=function(){var _=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||"");return _?"Symbol(src)_1."+_:""}(),ni=X.toString,zs=ae.call(Object),Yi=RegExp("^"+ae.call(Ne).replace(se,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vi=Gn?$e.Buffer:void 0,F=$e.Symbol,A=$e.Uint8Array,K=vi?vi.allocUnsafe:void 0,W=O(Object.getPrototypeOf,Object),Ut=Object.create,Mr=X.propertyIsEnumerable,rt=j.splice,N=F?F.toStringTag:void 0,z=function(){try{var _=e0(Object,"defineProperty");return _({},"",{}),_}catch{}}(),le=vi?vi.isBuffer:void 0,ce=Math.max,Pe=Date.now,Ue=e0($e,"Map"),Je=e0(Object,"create"),dt=function(){function _(){}return function(P){if(!Vs(P))return{};if(Ut)return Ut(P);_.prototype=P;var $=new _;return _.prototype=void 0,$}}();function Le(_){var P=-1,$=_==null?0:_.length;for(this.clear();++P<$;){var te=_[P];this.set(te[0],te[1])}}function en(){this.__data__=Je?Je(null):{},this.size=0}function Nt(_){var P=this.has(_)&&delete this.__data__[_];return this.size-=P?1:0,P}function dn(_){var P=this.__data__;if(Je){var $=P[_];return $===r?void 0:$}return Ne.call(P,_)?P[_]:void 0}function Mo(_){var P=this.__data__;return Je?P[_]!==void 0:Ne.call(P,_)}function Xi(_,P){var $=this.__data__;return this.size+=this.has(_)?0:1,$[_]=Je&&P===void 0?r:P,this}Le.prototype.clear=en,Le.prototype.delete=Nt,Le.prototype.get=dn,Le.prototype.has=Mo,Le.prototype.set=Xi;function or(_){var P=-1,$=_==null?0:_.length;for(this.clear();++P<$;){var te=_[P];this.set(te[0],te[1])}}function Kf(){this.__data__=[],this.size=0}function Gf(_){var P=this.__data__,$=Qf(P,_);if($<0)return!1;var te=P.length-1;return $==te?P.pop():rt.call(P,$,1),--this.size,!0}function F4(_){var P=this.__data__,$=Qf(P,_);return $<0?void 0:P[$][1]}function z4(_){return Qf(this.__data__,_)>-1}function V4(_,P){var $=this.__data__,te=Qf($,_);return te<0?(++this.size,$.push([_,P])):$[te][1]=P,this}or.prototype.clear=Kf,or.prototype.delete=Gf,or.prototype.get=F4,or.prototype.has=z4,or.prototype.set=V4;function za(_){var P=-1,$=_==null?0:_.length;for(this.clear();++P<$;){var te=_[P];this.set(te[0],te[1])}}function B4(){this.size=0,this.__data__={hash:new Le,map:new(Ue||or),string:new Le}}function U4(_){var P=Xf(this,_).delete(_);return this.size-=P?1:0,P}function W4(_){return Xf(this,_).get(_)}function H4(_){return Xf(this,_).has(_)}function q4(_,P){var $=Xf(this,_),te=$.size;return $.set(_,P),this.size+=$.size==te?0:1,this}za.prototype.clear=B4,za.prototype.delete=U4,za.prototype.get=W4,za.prototype.has=H4,za.prototype.set=q4;function Va(_){var P=this.__data__=new or(_);this.size=P.size}function K4(){this.__data__=new or,this.size=0}function G4(_){var P=this.__data__,$=P.delete(_);return this.size=P.size,$}function Q4(_){return this.__data__.get(_)}function Y4(_){return this.__data__.has(_)}function X4(_,P){var $=this.__data__;if($ instanceof or){var te=$.__data__;if(!Ue||te.length<n-1)return te.push([_,P]),this.size=++$.size,this;$=this.__data__=new za(te)}return $.set(_,P),this.size=$.size,this}Va.prototype.clear=K4,Va.prototype.delete=G4,Va.prototype.get=Q4,Va.prototype.has=Y4,Va.prototype.set=X4;function J4(_,P){var $=r0(_),te=!$&&n0(_),De=!$&&!te&&gC(_),at=!$&&!te&&!De&&vC(_),vt=$||te||De||at,Oe=vt?ja(_.length,String):[],bt=Oe.length;for(var Lr in _)(P||Ne.call(_,Lr))&&!(vt&&(Lr=="length"||De&&(Lr=="offset"||Lr=="parent")||at&&(Lr=="buffer"||Lr=="byteLength"||Lr=="byteOffset")||pC(Lr,bt)))&&Oe.push(Lr);return Oe}function Jy(_,P,$){($!==void 0&&!Jf(_[P],$)||$===void 0&&!(P in _))&&Zy(_,P,$)}function Z4(_,P,$){var te=_[P];(!(Ne.call(_,P)&&Jf(te,$))||$===void 0&&!(P in _))&&Zy(_,P,$)}function Qf(_,P){for(var $=_.length;$--;)if(Jf(_[$][0],P))return $;return-1}function Zy(_,P,$){P=="__proto__"&&z?z(_,P,{configurable:!0,enumerable:!0,value:$,writable:!0}):_[P]=$}var ej=hj();function Yf(_){return _==null?_===void 0?E:v:N&&N in Object(_)?pj(_):wj(_)}function fC(_){return Vu(_)&&Yf(_)==a}function tj(_){if(!Vs(_)||vj(_))return!1;var P=o0(_)?Yi:ue;return P.test(Cj(_))}function nj(_){return Vu(_)&&yC(_.length)&&!!Se[Yf(_)]}function rj(_){if(!Vs(_))return bj(_);var P=mC(_),$=[];for(var te in _)te=="constructor"&&(P||!Ne.call(_,te))||$.push(te);return $}function hC(_,P,$,te,De){_!==P&&ej(P,function(at,vt){if(De||(De=new Va),Vs(at))ij(_,P,vt,$,hC,te,De);else{var Oe=te?te(t0(_,vt),at,vt+"",_,P,De):void 0;Oe===void 0&&(Oe=at),Jy(_,vt,Oe)}},bC)}function ij(_,P,$,te,De,at,vt){var Oe=t0(_,$),bt=t0(P,$),Lr=vt.get(bt);if(Lr){Jy(_,$,Lr);return}var vr=at?at(Oe,bt,$+"",_,P,vt):void 0,Bu=vr===void 0;if(Bu){var s0=r0(bt),a0=!s0&&gC(bt),SC=!s0&&!a0&&vC(bt);vr=bt,s0||a0||SC?r0(Oe)?vr=Oe:Ej(Oe)?vr=cj(Oe):a0?(Bu=!1,vr=aj(bt,!0)):SC?(Bu=!1,vr=uj(bt,!0)):vr=[]:kj(bt)||n0(bt)?(vr=Oe,n0(Oe)?vr=Tj(Oe):(!Vs(Oe)||o0(Oe))&&(vr=mj(bt))):Bu=!1}Bu&&(vt.set(bt,vr),De(vr,bt,te,at,vt),vt.delete(bt)),Jy(_,$,vr)}function oj(_,P){return xj(Sj(_,P,wC),_+"")}var sj=z?function(_,P){return z(_,"toString",{configurable:!0,enumerable:!1,value:Ij(P),writable:!0})}:wC;function aj(_,P){if(P)return _.slice();var $=_.length,te=K?K($):new _.constructor($);return _.copy(te),te}function lj(_){var P=new _.constructor(_.byteLength);return new A(P).set(new A(_)),P}function uj(_,P){var $=P?lj(_.buffer):_.buffer;return new _.constructor($,_.byteOffset,_.length)}function cj(_,P){var $=-1,te=_.length;for(P||(P=Array(te));++$<te;)P[$]=_[$];return P}function dj(_,P,$,te){var De=!$;$||($={});for(var at=-1,vt=P.length;++at<vt;){var Oe=P[at],bt=te?te($[Oe],_[Oe],Oe,$,_):void 0;bt===void 0&&(bt=_[Oe]),De?Zy($,Oe,bt):Z4($,Oe,bt)}return $}function fj(_){return oj(function(P,$){var te=-1,De=$.length,at=De>1?$[De-1]:void 0,vt=De>2?$[2]:void 0;for(at=_.length>3&&typeof at=="function"?(De--,at):void 0,vt&&gj($[0],$[1],vt)&&(at=De<3?void 0:at,De=1),P=Object(P);++te<De;){var Oe=$[te];Oe&&_(P,Oe,te,at)}return P})}function hj(_){return function(P,$,te){for(var De=-1,at=Object(P),vt=te(P),Oe=vt.length;Oe--;){var bt=vt[_?Oe:++De];if($(at[bt],bt,at)===!1)break}return P}}function Xf(_,P){var $=_.__data__;return yj(P)?$[typeof P=="string"?"string":"hash"]:$.map}function e0(_,P){var $=T(_,P);return tj($)?$:void 0}function pj(_){var P=Ne.call(_,N),$=_[N];try{_[N]=void 0;var te=!0}catch{}var De=ni.call(_);return te&&(P?_[N]=$:delete _[N]),De}function mj(_){return typeof _.constructor=="function"&&!mC(_)?dt(W(_)):{}}function pC(_,P){var $=typeof _;return P=P??s,!!P&&($=="number"||$!="symbol"&&ke.test(_))&&_>-1&&_%1==0&&_<P}function gj(_,P,$){if(!Vs($))return!1;var te=typeof P;return(te=="number"?i0($)&&pC(P,$.length):te=="string"&&P in $)?Jf($[P],_):!1}function yj(_){var P=typeof _;return P=="string"||P=="number"||P=="symbol"||P=="boolean"?_!=="__proto__":_===null}function vj(_){return!!st&&st in _}function mC(_){var P=_&&_.constructor,$=typeof P=="function"&&P.prototype||X;return _===$}function bj(_){var P=[];if(_!=null)for(var $ in Object(_))P.push($);return P}function wj(_){return ni.call(_)}function Sj(_,P,$){return P=ce(P===void 0?_.length-1:P,0),function(){for(var te=arguments,De=-1,at=ce(te.length-P,0),vt=Array(at);++De<at;)vt[De]=te[P+De];De=-1;for(var Oe=Array(P+1);++De<P;)Oe[De]=te[De];return Oe[P]=$(vt),Do(_,this,Oe)}}function t0(_,P){if(!(P==="constructor"&&typeof _[P]=="function")&&P!="__proto__")return _[P]}var xj=_j(sj);function _j(_){var P=0,$=0;return function(){var te=Pe(),De=o-(te-$);if($=te,De>0){if(++P>=i)return arguments[0]}else P=0;return _.apply(void 0,arguments)}}function Cj(_){if(_!=null){try{return ae.call(_)}catch{}try{return _+""}catch{}}return""}function Jf(_,P){return _===P||_!==_&&P!==P}var n0=fC(function(){return arguments}())?fC:function(_){return Vu(_)&&Ne.call(_,"callee")&&!Mr.call(_,"callee")},r0=Array.isArray;function i0(_){return _!=null&&yC(_.length)&&!o0(_)}function Ej(_){return Vu(_)&&i0(_)}var gC=le||Aj;function o0(_){if(!Vs(_))return!1;var P=Yf(_);return P==h||P==p||P==u||P==b}function yC(_){return typeof _=="number"&&_>-1&&_%1==0&&_<=s}function Vs(_){var P=typeof _;return _!=null&&(P=="object"||P=="function")}function Vu(_){return _!=null&&typeof _=="object"}function kj(_){if(!Vu(_)||Yf(_)!=m)return!1;var P=W(_);if(P===null)return!0;var $=Ne.call(P,"constructor")&&P.constructor;return typeof $=="function"&&$ instanceof $&&ae.call($)==zs}var vC=Qn?Fa(Qn):nj;function Tj(_){return dj(_,bC(_))}function bC(_){return i0(_)?J4(_,!0):rj(_)}var Pj=fj(function(_,P,$,te){hC(_,P,$,te)});function Ij(_){return function(){return _}}function wC(_){return _}function Aj(){return!1}e.exports=Pj})(rm,rm.exports);var E9=rm.exports;const Kr=tg(E9);var k9=e=>/!(important)?$/.test(e),JE=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,T9=(e,t)=>n=>{const r=String(t),i=k9(r),o=JE(r),s=e?`${e}.${o}`:o;let a=Yr(n.__cssMap)&&s in n.__cssMap?n.__cssMap[s].varRef:t;return a=JE(a),i?`${a} !important`:a};function DS(e){const{scale:t,transform:n,compose:r}=e;return(o,s)=>{var a;const l=T9(t,o)(s);let u=(a=n==null?void 0:n(l,s))!=null?a:l;return r&&(u=r(u,s)),u}}var bh=(...e)=>t=>e.reduce((n,r)=>r(n),t);function jr(e,t){return n=>{const r={property:n,scale:e};return r.transform=DS({scale:e,transform:t}),r}}var P9=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function I9(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:P9(t),transform:n?DS({scale:n,compose:r}):r}}var y$=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function A9(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...y$].join(" ")}function R9(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...y$].join(" ")}var $9={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},O9={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function N9(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var D9={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},ib={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},M9=new Set(Object.values(ib)),ob=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),L9=e=>e.trim();function j9(e,t){if(e==null||ob.has(e))return e;if(!(sb(e)||ob.has(e)))return`url('${e}')`;const i=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),o=i==null?void 0:i[1],s=i==null?void 0:i[2];if(!o||!s)return e;const a=o.includes("-gradient")?o:`${o}-gradient`,[l,...u]=s.split(",").map(L9).filter(Boolean);if((u==null?void 0:u.length)===0)return e;const c=l in ib?ib[l]:l;u.unshift(c);const d=u.map(f=>{if(M9.has(f))return f;const h=f.indexOf(" "),[p,y]=h!==-1?[f.substr(0,h),f.substr(h+1)]:[f],S=sb(y)?y:y&&y.split(" "),v=`colors.${p}`,m=v in t.__cssMap?t.__cssMap[v].varRef:p;return S?[m,...Array.isArray(S)?S:[S]].join(" "):m});return`${a}(${d.join(", ")})`}var sb=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),F9=(e,t)=>j9(e,t??{});function z9(e){return/^var\(--.+\)$/.test(e)}var V9=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},wi=e=>t=>`${e}(${t})`,Ve={filter(e){return e!=="auto"?e:$9},backdropFilter(e){return e!=="auto"?e:O9},ring(e){return N9(Ve.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?A9():e==="auto-gpu"?R9():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=V9(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(z9(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:F9,blur:wi("blur"),opacity:wi("opacity"),brightness:wi("brightness"),contrast:wi("contrast"),dropShadow:wi("drop-shadow"),grayscale:wi("grayscale"),hueRotate:wi("hue-rotate"),invert:wi("invert"),saturate:wi("saturate"),sepia:wi("sepia"),bgImage(e){return e==null||sb(e)||ob.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var t;const{space:n,divide:r}=(t=D9[e])!=null?t:{},i={flexDirection:e};return n&&(i[n]=1),r&&(i[r]=1),i}},I={borderWidths:jr("borderWidths"),borderStyles:jr("borderStyles"),colors:jr("colors"),borders:jr("borders"),gradients:jr("gradients",Ve.gradient),radii:jr("radii",Ve.px),space:jr("space",bh(Ve.vh,Ve.px)),spaceT:jr("space",bh(Ve.vh,Ve.px)),degreeT(e){return{property:e,transform:Ve.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:DS({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:jr("sizes",bh(Ve.vh,Ve.px)),sizesT:jr("sizes",bh(Ve.vh,Ve.fraction)),shadows:jr("shadows"),logical:I9,blur:jr("blur",Ve.blur)},np={background:I.colors("background"),backgroundColor:I.colors("backgroundColor"),backgroundImage:I.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:Ve.bgClip},bgSize:I.prop("backgroundSize"),bgPosition:I.prop("backgroundPosition"),bg:I.colors("background"),bgColor:I.colors("backgroundColor"),bgPos:I.prop("backgroundPosition"),bgRepeat:I.prop("backgroundRepeat"),bgAttachment:I.prop("backgroundAttachment"),bgGradient:I.gradients("backgroundImage"),bgClip:{transform:Ve.bgClip}};Object.assign(np,{bgImage:np.backgroundImage,bgImg:np.backgroundImage});var We={border:I.borders("border"),borderWidth:I.borderWidths("borderWidth"),borderStyle:I.borderStyles("borderStyle"),borderColor:I.colors("borderColor"),borderRadius:I.radii("borderRadius"),borderTop:I.borders("borderTop"),borderBlockStart:I.borders("borderBlockStart"),borderTopLeftRadius:I.radii("borderTopLeftRadius"),borderStartStartRadius:I.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:I.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:I.radii("borderTopRightRadius"),borderStartEndRadius:I.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:I.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:I.borders("borderRight"),borderInlineEnd:I.borders("borderInlineEnd"),borderBottom:I.borders("borderBottom"),borderBlockEnd:I.borders("borderBlockEnd"),borderBottomLeftRadius:I.radii("borderBottomLeftRadius"),borderBottomRightRadius:I.radii("borderBottomRightRadius"),borderLeft:I.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:I.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:I.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:I.borders(["borderLeft","borderRight"]),borderInline:I.borders("borderInline"),borderY:I.borders(["borderTop","borderBottom"]),borderBlock:I.borders("borderBlock"),borderTopWidth:I.borderWidths("borderTopWidth"),borderBlockStartWidth:I.borderWidths("borderBlockStartWidth"),borderTopColor:I.colors("borderTopColor"),borderBlockStartColor:I.colors("borderBlockStartColor"),borderTopStyle:I.borderStyles("borderTopStyle"),borderBlockStartStyle:I.borderStyles("borderBlockStartStyle"),borderBottomWidth:I.borderWidths("borderBottomWidth"),borderBlockEndWidth:I.borderWidths("borderBlockEndWidth"),borderBottomColor:I.colors("borderBottomColor"),borderBlockEndColor:I.colors("borderBlockEndColor"),borderBottomStyle:I.borderStyles("borderBottomStyle"),borderBlockEndStyle:I.borderStyles("borderBlockEndStyle"),borderLeftWidth:I.borderWidths("borderLeftWidth"),borderInlineStartWidth:I.borderWidths("borderInlineStartWidth"),borderLeftColor:I.colors("borderLeftColor"),borderInlineStartColor:I.colors("borderInlineStartColor"),borderLeftStyle:I.borderStyles("borderLeftStyle"),borderInlineStartStyle:I.borderStyles("borderInlineStartStyle"),borderRightWidth:I.borderWidths("borderRightWidth"),borderInlineEndWidth:I.borderWidths("borderInlineEndWidth"),borderRightColor:I.colors("borderRightColor"),borderInlineEndColor:I.colors("borderInlineEndColor"),borderRightStyle:I.borderStyles("borderRightStyle"),borderInlineEndStyle:I.borderStyles("borderInlineEndStyle"),borderTopRadius:I.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:I.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:I.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:I.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(We,{rounded:We.borderRadius,roundedTop:We.borderTopRadius,roundedTopLeft:We.borderTopLeftRadius,roundedTopRight:We.borderTopRightRadius,roundedTopStart:We.borderStartStartRadius,roundedTopEnd:We.borderStartEndRadius,roundedBottom:We.borderBottomRadius,roundedBottomLeft:We.borderBottomLeftRadius,roundedBottomRight:We.borderBottomRightRadius,roundedBottomStart:We.borderEndStartRadius,roundedBottomEnd:We.borderEndEndRadius,roundedLeft:We.borderLeftRadius,roundedRight:We.borderRightRadius,roundedStart:We.borderInlineStartRadius,roundedEnd:We.borderInlineEndRadius,borderStart:We.borderInlineStart,borderEnd:We.borderInlineEnd,borderTopStartRadius:We.borderStartStartRadius,borderTopEndRadius:We.borderStartEndRadius,borderBottomStartRadius:We.borderEndStartRadius,borderBottomEndRadius:We.borderEndEndRadius,borderStartRadius:We.borderInlineStartRadius,borderEndRadius:We.borderInlineEndRadius,borderStartWidth:We.borderInlineStartWidth,borderEndWidth:We.borderInlineEndWidth,borderStartColor:We.borderInlineStartColor,borderEndColor:We.borderInlineEndColor,borderStartStyle:We.borderInlineStartStyle,borderEndStyle:We.borderInlineEndStyle});var B9={color:I.colors("color"),textColor:I.colors("color"),fill:I.colors("fill"),stroke:I.colors("stroke")},ab={boxShadow:I.shadows("boxShadow"),mixBlendMode:!0,blendMode:I.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:I.prop("backgroundBlendMode"),opacity:!0};Object.assign(ab,{shadow:ab.boxShadow});var U9={filter:{transform:Ve.filter},blur:I.blur("--chakra-blur"),brightness:I.propT("--chakra-brightness",Ve.brightness),contrast:I.propT("--chakra-contrast",Ve.contrast),hueRotate:I.degreeT("--chakra-hue-rotate"),invert:I.propT("--chakra-invert",Ve.invert),saturate:I.propT("--chakra-saturate",Ve.saturate),dropShadow:I.propT("--chakra-drop-shadow",Ve.dropShadow),backdropFilter:{transform:Ve.backdropFilter},backdropBlur:I.blur("--chakra-backdrop-blur"),backdropBrightness:I.propT("--chakra-backdrop-brightness",Ve.brightness),backdropContrast:I.propT("--chakra-backdrop-contrast",Ve.contrast),backdropHueRotate:I.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:I.propT("--chakra-backdrop-invert",Ve.invert),backdropSaturate:I.propT("--chakra-backdrop-saturate",Ve.saturate)},im={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:Ve.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:I.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:I.space("gap"),rowGap:I.space("rowGap"),columnGap:I.space("columnGap")};Object.assign(im,{flexDir:im.flexDirection});var v$={gridGap:I.space("gridGap"),gridColumnGap:I.space("gridColumnGap"),gridRowGap:I.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},W9={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:Ve.outline},outlineOffset:!0,outlineColor:I.colors("outlineColor")},zr={width:I.sizesT("width"),inlineSize:I.sizesT("inlineSize"),height:I.sizes("height"),blockSize:I.sizes("blockSize"),boxSize:I.sizes(["width","height"]),minWidth:I.sizes("minWidth"),minInlineSize:I.sizes("minInlineSize"),minHeight:I.sizes("minHeight"),minBlockSize:I.sizes("minBlockSize"),maxWidth:I.sizes("maxWidth"),maxInlineSize:I.sizes("maxInlineSize"),maxHeight:I.sizes("maxHeight"),maxBlockSize:I.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;return{[`@media screen and (min-width: ${(i=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r.minW)!=null?i:e})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;return{[`@media screen and (max-width: ${(i=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r._minW)!=null?i:e})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:I.propT("float",Ve.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(zr,{w:zr.width,h:zr.height,minW:zr.minWidth,maxW:zr.maxWidth,minH:zr.minHeight,maxH:zr.maxHeight,overscroll:zr.overscrollBehavior,overscrollX:zr.overscrollBehaviorX,overscrollY:zr.overscrollBehaviorY});var H9={listStyleType:!0,listStylePosition:!0,listStylePos:I.prop("listStylePosition"),listStyleImage:!0,listStyleImg:I.prop("listStyleImage")};function q9(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return e===void 0?n:e}var K9=e=>{const t=new WeakMap;return(r,i,o,s)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const a=t.get(r);if(a.has(i))return a.get(i);const l=e(r,i,o,s);return a.set(i,l),l}},G9=K9(q9),Q9={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Y9={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},L0=(e,t,n)=>{const r={},i=G9(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},X9={srOnly:{transform(e){return e===!0?Q9:e==="focusable"?Y9:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>L0(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>L0(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>L0(t,e,n)}},zc={position:!0,pos:I.prop("position"),zIndex:I.prop("zIndex","zIndices"),inset:I.spaceT("inset"),insetX:I.spaceT(["left","right"]),insetInline:I.spaceT("insetInline"),insetY:I.spaceT(["top","bottom"]),insetBlock:I.spaceT("insetBlock"),top:I.spaceT("top"),insetBlockStart:I.spaceT("insetBlockStart"),bottom:I.spaceT("bottom"),insetBlockEnd:I.spaceT("insetBlockEnd"),left:I.spaceT("left"),insetInlineStart:I.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:I.spaceT("right"),insetInlineEnd:I.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(zc,{insetStart:zc.insetInlineStart,insetEnd:zc.insetInlineEnd});var J9={ring:{transform:Ve.ring},ringColor:I.colors("--chakra-ring-color"),ringOffset:I.prop("--chakra-ring-offset-width"),ringOffsetColor:I.colors("--chakra-ring-offset-color"),ringInset:I.prop("--chakra-ring-inset")},ht={margin:I.spaceT("margin"),marginTop:I.spaceT("marginTop"),marginBlockStart:I.spaceT("marginBlockStart"),marginRight:I.spaceT("marginRight"),marginInlineEnd:I.spaceT("marginInlineEnd"),marginBottom:I.spaceT("marginBottom"),marginBlockEnd:I.spaceT("marginBlockEnd"),marginLeft:I.spaceT("marginLeft"),marginInlineStart:I.spaceT("marginInlineStart"),marginX:I.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:I.spaceT("marginInline"),marginY:I.spaceT(["marginTop","marginBottom"]),marginBlock:I.spaceT("marginBlock"),padding:I.space("padding"),paddingTop:I.space("paddingTop"),paddingBlockStart:I.space("paddingBlockStart"),paddingRight:I.space("paddingRight"),paddingBottom:I.space("paddingBottom"),paddingBlockEnd:I.space("paddingBlockEnd"),paddingLeft:I.space("paddingLeft"),paddingInlineStart:I.space("paddingInlineStart"),paddingInlineEnd:I.space("paddingInlineEnd"),paddingX:I.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:I.space("paddingInline"),paddingY:I.space(["paddingTop","paddingBottom"]),paddingBlock:I.space("paddingBlock")};Object.assign(ht,{m:ht.margin,mt:ht.marginTop,mr:ht.marginRight,me:ht.marginInlineEnd,marginEnd:ht.marginInlineEnd,mb:ht.marginBottom,ml:ht.marginLeft,ms:ht.marginInlineStart,marginStart:ht.marginInlineStart,mx:ht.marginX,my:ht.marginY,p:ht.padding,pt:ht.paddingTop,py:ht.paddingY,px:ht.paddingX,pb:ht.paddingBottom,pl:ht.paddingLeft,ps:ht.paddingInlineStart,paddingStart:ht.paddingInlineStart,pr:ht.paddingRight,pe:ht.paddingInlineEnd,paddingEnd:ht.paddingInlineEnd});var Z9={textDecorationColor:I.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:I.shadows("textShadow")},eV={clipPath:!0,transform:I.propT("transform",Ve.transform),transformOrigin:!0,translateX:I.spaceT("--chakra-translate-x"),translateY:I.spaceT("--chakra-translate-y"),skewX:I.degreeT("--chakra-skew-x"),skewY:I.degreeT("--chakra-skew-y"),scaleX:I.prop("--chakra-scale-x"),scaleY:I.prop("--chakra-scale-y"),scale:I.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:I.degreeT("--chakra-rotate")},tV={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:I.prop("transitionDuration","transition.duration"),transitionProperty:I.prop("transitionProperty","transition.property"),transitionTimingFunction:I.prop("transitionTimingFunction","transition.easing")},nV={fontFamily:I.prop("fontFamily","fonts"),fontSize:I.prop("fontSize","fontSizes",Ve.px),fontWeight:I.prop("fontWeight","fontWeights"),lineHeight:I.prop("lineHeight","lineHeights"),letterSpacing:I.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(e===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},rV={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:I.spaceT("scrollMargin"),scrollMarginTop:I.spaceT("scrollMarginTop"),scrollMarginBottom:I.spaceT("scrollMarginBottom"),scrollMarginLeft:I.spaceT("scrollMarginLeft"),scrollMarginRight:I.spaceT("scrollMarginRight"),scrollMarginX:I.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:I.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:I.spaceT("scrollPadding"),scrollPaddingTop:I.spaceT("scrollPaddingTop"),scrollPaddingBottom:I.spaceT("scrollPaddingBottom"),scrollPaddingLeft:I.spaceT("scrollPaddingLeft"),scrollPaddingRight:I.spaceT("scrollPaddingRight"),scrollPaddingX:I.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:I.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function b$(e){return Yr(e)&&e.reference?e.reference:String(e)}var Ng=(e,...t)=>t.map(b$).join(` ${e} `).replace(/calc/g,""),ZE=(...e)=>`calc(${Ng("+",...e)})`,ek=(...e)=>`calc(${Ng("-",...e)})`,lb=(...e)=>`calc(${Ng("*",...e)})`,tk=(...e)=>`calc(${Ng("/",...e)})`,nk=e=>{const t=b$(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:lb(t,-1)},Ys=Object.assign(e=>({add:(...t)=>Ys(ZE(e,...t)),subtract:(...t)=>Ys(ek(e,...t)),multiply:(...t)=>Ys(lb(e,...t)),divide:(...t)=>Ys(tk(e,...t)),negate:()=>Ys(nk(e)),toString:()=>e.toString()}),{add:ZE,subtract:ek,multiply:lb,divide:tk,negate:nk});function iV(e,t="-"){return e.replace(/\s+/g,t)}function oV(e){const t=iV(e.toString());return aV(sV(t))}function sV(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function aV(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function lV(e,t=""){return[t,e].filter(Boolean).join("-")}function uV(e,t){return`var(${e}${t?`, ${t}`:""})`}function cV(e,t=""){return oV(`--${lV(e,t)}`)}function ve(e,t,n){const r=cV(e,n);return{variable:r,reference:uV(r,t)}}function dV(e,t){const n={};for(const r of t){if(Array.isArray(r)){const[i,o]=r;n[i]=ve(`${e}-${i}`,o);continue}n[r]=ve(`${e}-${r}`)}return n}function fV(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function hV(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function ub(e){if(e==null)return e;const{unitless:t}=hV(e);return t||typeof e=="number"?`${e}px`:e}var w$=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,MS=e=>Object.fromEntries(Object.entries(e).sort(w$));function rk(e){const t=MS(e);return Object.assign(Object.values(t),t)}function pV(e){const t=Object.keys(MS(e));return new Set(t)}function ik(e){var t;if(!e)return e;e=(t=ub(e))!=null?t:e;const n=-.02;return typeof e=="number"?`${e+n}`:e.replace(/(\d+\.?\d*)/u,r=>`${parseFloat(r)+n}`)}function hc(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${ub(e)})`),t&&n.push("and",`(max-width: ${ub(t)})`),n.join(" ")}function mV(e){var t;if(!e)return null;e.base=(t=e.base)!=null?t:"0px";const n=rk(e),r=Object.entries(e).sort(w$).map(([s,a],l,u)=>{var c;let[,d]=(c=u[l+1])!=null?c:[];return d=parseFloat(d)>0?ik(d):void 0,{_minW:ik(a),breakpoint:s,minW:a,maxW:d,maxWQuery:hc(null,d),minWQuery:hc(a),minMaxQuery:hc(a,d)}}),i=pV(e),o=Array.from(i.values());return{keys:i,normalized:n,isResponsive(s){const a=Object.keys(s);return a.length>0&&a.every(l=>i.has(l))},asObject:MS(e),asArray:rk(e),details:r,get(s){return r.find(a=>a.breakpoint===s)},media:[null,...n.map(s=>hc(s)).slice(1)],toArrayValue(s){if(!Yr(s))throw new Error("toArrayValue: value must be an object");const a=o.map(l=>{var u;return(u=s[l])!=null?u:null});for(;fV(a)===null;)a.pop();return a},toObjectValue(s){if(!Array.isArray(s))throw new Error("toObjectValue: value must be an array");return s.reduce((a,l,u)=>{const c=o[u];return c!=null&&l!=null&&(a[c]=l),a},{})}}}var vn={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},jo=e=>S$(t=>e(t,"&"),"[role=group]","[data-group]",".group"),Ji=e=>S$(t=>e(t,"~ &"),"[data-peer]",".peer"),S$=(e,...t)=>t.map(e).join(", "),Dg={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_firstLetter:"&::first-letter",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:jo(vn.hover),_peerHover:Ji(vn.hover),_groupFocus:jo(vn.focus),_peerFocus:Ji(vn.focus),_groupFocusVisible:jo(vn.focusVisible),_peerFocusVisible:Ji(vn.focusVisible),_groupActive:jo(vn.active),_peerActive:Ji(vn.active),_groupDisabled:jo(vn.disabled),_peerDisabled:Ji(vn.disabled),_groupInvalid:jo(vn.invalid),_peerInvalid:Ji(vn.invalid),_groupChecked:jo(vn.checked),_peerChecked:Ji(vn.checked),_groupFocusWithin:jo(vn.focusWithin),_peerFocusWithin:Ji(vn.focusWithin),_peerPlaceholderShown:Ji(vn.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},x$=Object.keys(Dg);function ok(e,t){return ve(String(e).replace(/\./g,"-"),void 0,t)}function gV(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:s,value:a}=o,{variable:l,reference:u}=ok(i,t==null?void 0:t.cssVarPrefix);if(!s){if(i.startsWith("space")){const f=i.split("."),[h,...p]=f,y=`${h}.-${p.join(".")}`,S=Ys.negate(a),v=Ys.negate(u);r[y]={value:S,var:l,varRef:v}}n[l]=a,r[i]={value:a,var:l,varRef:u};continue}const c=f=>{const p=[String(i).split(".")[0],f].join(".");if(!e[p])return f;const{reference:S}=ok(p,t==null?void 0:t.cssVarPrefix);return S},d=Yr(a)?a:{default:a};n=Kr(n,Object.entries(d).reduce((f,[h,p])=>{var y,S;if(!p)return f;const v=c(`${p}`);if(h==="default")return f[l]=v,f;const m=(S=(y=Dg)==null?void 0:y[h])!=null?S:h;return f[m]={[l]:v},f},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function yV(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function vV(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function bV(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}function sk(e,t,n={}){const{stop:r,getKey:i}=n;function o(s,a=[]){var l;if(bV(s)||Array.isArray(s)){const u={};for(const[c,d]of Object.entries(s)){const f=(l=i==null?void 0:i(c))!=null?l:c,h=[...a,f];if(r!=null&&r(s,h))return t(s,a);u[f]=o(d,h)}return u}return t(s,a)}return o(e)}var wV=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function SV(e){return vV(e,wV)}function xV(e){return e.semanticTokens}function _V(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}var CV=e=>x$.includes(e)||e==="default";function EV({tokens:e,semanticTokens:t}){const n={};return sk(e,(r,i)=>{r!=null&&(n[i.join(".")]={isSemantic:!1,value:r})}),sk(t,(r,i)=>{r!=null&&(n[i.join(".")]={isSemantic:!0,value:r})},{stop:r=>Object.keys(r).every(CV)}),n}function kV(e){var t;const n=_V(e),r=SV(n),i=xV(n),o=EV({tokens:r,semanticTokens:i}),s=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:a,cssVars:l}=gV(o,{cssVarPrefix:s});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:a,__breakpoints:mV(n.breakpoints)}),n}var LS=Kr({},np,We,B9,im,zr,U9,J9,W9,v$,X9,zc,ab,ht,rV,nV,Z9,eV,H9,tV);Object.assign({},ht,zr,im,v$,zc);var TV=[...Object.keys(LS),...x$],PV={...LS,...Dg},IV=e=>e in PV,AV=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const s in e){let a=Ai(e[s],t);if(a==null)continue;if(a=Yr(a)&&n(a)?r(a):a,!Array.isArray(a)){o[s]=a;continue}const l=a.slice(0,i.length).length;for(let u=0;u<l;u+=1){const c=i==null?void 0:i[u];if(!c){o[s]=a[u];continue}o[c]=o[c]||{},a[u]!=null&&(o[c][s]=a[u])}}return o};function RV(e){const t=[];let n="",r=!1;for(let i=0;i<e.length;i++){const o=e[i];o==="("?(r=!0,n+=o):o===")"?(r=!1,n+=o):o===","&&!r?(t.push(n),n=""):n+=o}return n=n.trim(),n&&t.push(n),t}function $V(e){return/^var\(--.+\)$/.test(e)}var OV=(e,t)=>e.startsWith("--")&&typeof t=="string"&&!$V(t),NV=(e,t)=>{var n,r;if(t==null)return t;const i=l=>{var u,c;return(c=(u=e.__cssMap)==null?void 0:u[l])==null?void 0:c.varRef},o=l=>{var u;return(u=i(l))!=null?u:l},[s,a]=RV(t);return t=(r=(n=i(s))!=null?n:o(a))!=null?r:o(t),t};function DV(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,s=!1)=>{var a,l,u;const c=Ai(o,r),d=AV(c)(r);let f={};for(let h in d){const p=d[h];let y=Ai(p,r);h in n&&(h=n[h]),OV(h,y)&&(y=NV(r,y));let S=t[h];if(S===!0&&(S={property:h}),Yr(y)){f[h]=(a=f[h])!=null?a:{},f[h]=Kr({},f[h],i(y,!0));continue}let v=(u=(l=S==null?void 0:S.transform)==null?void 0:l.call(S,y,r,c))!=null?u:y;v=S!=null&&S.processResult?i(v,!0):v;const m=Ai(S==null?void 0:S.property,r);if(!s&&(S!=null&&S.static)){const b=Ai(S.static,r);f=Kr({},f,b)}if(m&&Array.isArray(m)){for(const b of m)f[b]=v;continue}if(m){m==="&"&&Yr(v)?f=Kr({},f,v):f[m]=v;continue}if(Yr(v)){f=Kr({},f,v);continue}f[h]=v}return f};return i}var _$=e=>t=>DV({theme:t,pseudos:Dg,configs:LS})(e);function ct(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function MV(e,t){if(Array.isArray(e))return e;if(Yr(e))return t(e);if(e!=null)return[e]}function LV(e,t){for(let n=t+1;n<e.length;n++)if(e[n]!=null)return n;return-1}function jV(e){const t=e.__breakpoints;return function(r,i,o,s){var a,l;if(!t)return;const u={},c=MV(o,t.toArrayValue);if(!c)return u;const d=c.length,f=d===1,h=!!r.parts;for(let p=0;p<d;p++){const y=t.details[p],S=t.details[LV(c,p)],v=hc(y.minW,S==null?void 0:S._minW),m=Ai((a=r[i])==null?void 0:a[c[p]],s);if(m){if(h){(l=r.parts)==null||l.forEach(b=>{Kr(u,{[b]:f?m[b]:{[v]:m[b]}})});continue}if(!h){f?Kr(u,m):u[v]=m;continue}u[v]=m}}return u}}function FV(e){return t=>{var n;const{variant:r,size:i,theme:o}=t,s=jV(o);return Kr({},Ai((n=e.baseStyle)!=null?n:{},t),s(e,"sizes",i,t),s(e,"variants",r,t))}}function yi(e){return yV(e,["styleConfig","size","variant","colorScheme"])}var zV=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];function VV(e){return Yr(e)?zV.every(t=>Object.prototype.hasOwnProperty.call(e,t)):!1}var BV={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},UV={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},WV={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},HV={property:BV,easing:UV,duration:WV},qV=HV,KV={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},GV=KV,QV={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},YV=QV,XV={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},JV=XV,ZV={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},eB=ZV,tB={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},nB=tB,rB={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},iB=rB,oB={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},sB=oB,aB={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},C$=aB,E$={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},lB={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},uB={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},cB={...E$,...lB,container:uB},k$=cB,dB={breakpoints:JV,zIndices:GV,radii:nB,blur:sB,colors:eB,...C$,sizes:k$,shadows:iB,space:E$,borders:YV,transition:qV},{defineMultiStyleConfig:fB,definePartsStyle:pc}=ct(["stepper","step","title","description","indicator","separator","icon","number"]),no=ve("stepper-indicator-size"),hl=ve("stepper-icon-size"),pl=ve("stepper-title-font-size"),mc=ve("stepper-description-font-size"),Ju=ve("stepper-accent-color"),hB=pc(({colorScheme:e})=>({stepper:{display:"flex",justifyContent:"space-between",gap:"4","&[data-orientation=vertical]":{flexDirection:"column",alignItems:"flex-start"},"&[data-orientation=horizontal]":{flexDirection:"row",alignItems:"center"},[Ju.variable]:`colors.${e}.500`,_dark:{[Ju.variable]:`colors.${e}.200`}},title:{fontSize:pl.reference,fontWeight:"medium"},description:{fontSize:mc.reference,color:"chakra-subtle-text"},number:{fontSize:pl.reference},step:{flexShrink:0,position:"relative",display:"flex",gap:"2","&[data-orientation=horizontal]":{alignItems:"center"},flex:"1","&:last-of-type:not([data-stretch])":{flex:"initial"}},icon:{flexShrink:0,width:hl.reference,height:hl.reference},indicator:{flexShrink:0,borderRadius:"full",width:no.reference,height:no.reference,display:"flex",justifyContent:"center",alignItems:"center","&[data-status=active]":{borderWidth:"2px",borderColor:Ju.reference},"&[data-status=complete]":{bg:Ju.reference,color:"chakra-inverse-text"},"&[data-status=incomplete]":{borderWidth:"2px"}},separator:{bg:"chakra-border-color",flex:"1","&[data-status=complete]":{bg:Ju.reference},"&[data-orientation=horizontal]":{width:"100%",height:"2px",marginStart:"2"},"&[data-orientation=vertical]":{width:"2px",position:"absolute",height:"100%",maxHeight:`calc(100% - ${no.reference} - 8px)`,top:`calc(${no.reference} + 4px)`,insetStart:`calc(${no.reference} / 2 - 1px)`}}})),pB=fB({baseStyle:hB,sizes:{xs:pc({stepper:{[no.variable]:"sizes.4",[hl.variable]:"sizes.3",[pl.variable]:"fontSizes.xs",[mc.variable]:"fontSizes.xs"}}),sm:pc({stepper:{[no.variable]:"sizes.6",[hl.variable]:"sizes.4",[pl.variable]:"fontSizes.sm",[mc.variable]:"fontSizes.xs"}}),md:pc({stepper:{[no.variable]:"sizes.8",[hl.variable]:"sizes.5",[pl.variable]:"fontSizes.md",[mc.variable]:"fontSizes.sm"}}),lg:pc({stepper:{[no.variable]:"sizes.10",[hl.variable]:"sizes.6",[pl.variable]:"fontSizes.lg",[mc.variable]:"fontSizes.md"}})},defaultProps:{size:"md",colorScheme:"blue"}});function Qe(e,t={}){let n=!1;function r(){if(!n){n=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function i(...c){r();for(const d of c)t[d]=l(d);return Qe(e,t)}function o(...c){for(const d of c)d in t||(t[d]=l(d));return Qe(e,t)}function s(){return Object.fromEntries(Object.entries(t).map(([d,f])=>[d,f.selector]))}function a(){return Object.fromEntries(Object.entries(t).map(([d,f])=>[d,f.className]))}function l(c){const h=`chakra-${(["container","root"].includes(c??"")?[e]:[e,c]).filter(Boolean).join("__")}`;return{className:h,selector:`.${h}`,toString:()=>c}}return{parts:i,toPart:l,extend:o,selectors:s,classnames:a,get keys(){return Object.keys(t)},__type:{}}}var mB=Qe("accordion").parts("root","container","button","panel").extend("icon"),gB=Qe("alert").parts("title","description","container").extend("icon","spinner"),yB=Qe("avatar").parts("label","badge","container").extend("excessLabel","group"),vB=Qe("breadcrumb").parts("link","item","container").extend("separator");Qe("button").parts();var bB=Qe("checkbox").parts("control","icon","container").extend("label");Qe("progress").parts("track","filledTrack").extend("label");var wB=Qe("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),SB=Qe("editable").parts("preview","input","textarea"),xB=Qe("form").parts("container","requiredIndicator","helperText"),_B=Qe("formError").parts("text","icon"),CB=Qe("input").parts("addon","field","element"),EB=Qe("list").parts("container","item","icon"),kB=Qe("menu").parts("button","list","item").extend("groupTitle","command","divider"),TB=Qe("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),PB=Qe("numberinput").parts("root","field","stepperGroup","stepper");Qe("pininput").parts("field");var IB=Qe("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),AB=Qe("progress").parts("label","filledTrack","track"),RB=Qe("radio").parts("container","control","label"),$B=Qe("select").parts("field","icon"),OB=Qe("slider").parts("container","track","thumb","filledTrack","mark"),NB=Qe("stat").parts("container","label","helpText","number","icon"),DB=Qe("switch").parts("container","track","thumb"),MB=Qe("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),LB=Qe("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),jB=Qe("tag").parts("container","label","closeButton"),FB=Qe("card").parts("container","header","body","footer");function ta(e,t,n){return Math.min(Math.max(e,n),t)}class zB extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var gc=zB;function jS(e){if(typeof e!="string")throw new gc(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=e.trim();t=GB.test(e)?UB(e):e;const n=WB.exec(t);if(n){const s=Array.from(n).slice(1);return[...s.slice(0,3).map(a=>parseInt(Cd(a,2),16)),parseInt(Cd(s[3]||"f",2),16)/255]}const r=HB.exec(t);if(r){const s=Array.from(r).slice(1);return[...s.slice(0,3).map(a=>parseInt(a,16)),parseInt(s[3]||"ff",16)/255]}const i=qB.exec(t);if(i){const s=Array.from(i).slice(1);return[...s.slice(0,3).map(a=>parseInt(a,10)),parseFloat(s[3]||"1")]}const o=KB.exec(t);if(o){const[s,a,l,u]=Array.from(o).slice(1).map(parseFloat);if(ta(0,100,a)!==a)throw new gc(e);if(ta(0,100,l)!==l)throw new gc(e);return[...QB(s,a,l),Number.isNaN(u)?1:u]}throw new gc(e)}function VB(e){let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return(t>>>0)%2341}const ak=e=>parseInt(e.replace(/_/g,""),36),BB="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{const n=ak(t.substring(0,3)),r=ak(t.substring(3)).toString(16);let i="";for(let o=0;o<6-r.length;o++)i+="0";return e[n]=`${i}${r}`,e},{});function UB(e){const t=e.toLowerCase().trim(),n=BB[VB(t)];if(!n)throw new gc(e);return`#${n}`}const Cd=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),WB=new RegExp(`^#${Cd("([a-f0-9])",3)}([a-f0-9])?$`,"i"),HB=new RegExp(`^#${Cd("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),qB=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Cd(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),KB=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,GB=/^[a-z]+$/i,lk=e=>Math.round(e*255),QB=(e,t,n)=>{let r=n/100;if(t===0)return[r,r,r].map(lk);const i=(e%360+360)%360/60,o=(1-Math.abs(2*r-1))*(t/100),s=o*(1-Math.abs(i%2-1));let a=0,l=0,u=0;i>=0&&i<1?(a=o,l=s):i>=1&&i<2?(a=s,l=o):i>=2&&i<3?(l=o,u=s):i>=3&&i<4?(l=s,u=o):i>=4&&i<5?(a=s,u=o):i>=5&&i<6&&(a=o,u=s);const c=r-o/2,d=a+c,f=l+c,h=u+c;return[d,f,h].map(lk)};function YB(e,t,n,r){return`rgba(${ta(0,255,e).toFixed()}, ${ta(0,255,t).toFixed()}, ${ta(0,255,n).toFixed()}, ${parseFloat(ta(0,1,r).toFixed(3))})`}function XB(e,t){const[n,r,i,o]=jS(e);return YB(n,r,i,o-t)}function JB(e){const[t,n,r,i]=jS(e);let o=s=>{const a=ta(0,255,s).toString(16);return a.length===1?`0${a}`:a};return`#${o(t)}${o(n)}${o(r)}${i<1?o(Math.round(i*255)):""}`}function ZB(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}var e8=e=>Object.keys(e).length===0,Zn=(e,t,n)=>{const r=ZB(e,`colors.${t}`,t);try{return JB(r),r}catch{return n??"#000000"}},t8=e=>{const[t,n,r]=jS(e);return(t*299+n*587+r*114)/1e3},n8=e=>t=>{const n=Zn(t,e);return t8(n)<128?"dark":"light"},r8=e=>t=>n8(e)(t)==="dark",nu=(e,t)=>n=>{const r=Zn(n,e);return XB(r,1-t)};function uk(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient(
    45deg,
    ${t} 25%,
    transparent 25%,
    transparent 50%,
    ${t} 50%,
    ${t} 75%,
    transparent 75%,
    transparent
  )`,backgroundSize:`${e} ${e}`}}var i8=()=>`#${Math.floor(Math.random()*16777215).toString(16).padEnd(6,"0")}`;function o8(e){const t=i8();return!e||e8(e)?t:e.string&&e.colors?a8(e.string,e.colors):e.string&&!e.colors?s8(e.string):e.colors&&!e.string?l8(e.colors):t}function s8(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r<e.length;r+=1)t=e.charCodeAt(r)+((t<<5)-t),t=t&t;let n="#";for(let r=0;r<3;r+=1){const i=t>>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function a8(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;r<e.length;r+=1)n=e.charCodeAt(r)+((n<<5)-n),n=n&n;return n=(n%t.length+t.length)%t.length,t[n]}function l8(e){return e[Math.floor(Math.random()*e.length)]}function ge(e,t){return n=>n.colorMode==="dark"?t:e}function FS(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function T$(e){return Yr(e)&&e.reference?e.reference:String(e)}var Mg=(e,...t)=>t.map(T$).join(` ${e} `).replace(/calc/g,""),ck=(...e)=>`calc(${Mg("+",...e)})`,dk=(...e)=>`calc(${Mg("-",...e)})`,cb=(...e)=>`calc(${Mg("*",...e)})`,fk=(...e)=>`calc(${Mg("/",...e)})`,hk=e=>{const t=T$(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:cb(t,-1)},ro=Object.assign(e=>({add:(...t)=>ro(ck(e,...t)),subtract:(...t)=>ro(dk(e,...t)),multiply:(...t)=>ro(cb(e,...t)),divide:(...t)=>ro(fk(e,...t)),negate:()=>ro(hk(e)),toString:()=>e.toString()}),{add:ck,subtract:dk,multiply:cb,divide:fk,negate:hk});function u8(e){return!Number.isInteger(parseFloat(e.toString()))}function c8(e,t="-"){return e.replace(/\s+/g,t)}function P$(e){const t=c8(e.toString());return t.includes("\\.")?e:u8(e)?t.replace(".","\\."):e}function d8(e,t=""){return[t,P$(e)].filter(Boolean).join("-")}function f8(e,t){return`var(${P$(e)}${t?`, ${t}`:""})`}function h8(e,t=""){return`--${d8(e,t)}`}function cn(e,t){const n=h8(e,t==null?void 0:t.prefix);return{variable:n,reference:f8(n,p8(t==null?void 0:t.fallback))}}function p8(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{defineMultiStyleConfig:m8,definePartsStyle:rp}=ct(DB.keys),Vc=cn("switch-track-width"),ua=cn("switch-track-height"),j0=cn("switch-track-diff"),g8=ro.subtract(Vc,ua),db=cn("switch-thumb-x"),Zu=cn("switch-bg"),y8=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Vc.reference],height:[ua.reference],transitionProperty:"common",transitionDuration:"fast",[Zu.variable]:"colors.gray.300",_dark:{[Zu.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Zu.variable]:`colors.${t}.500`,_dark:{[Zu.variable]:`colors.${t}.200`}},bg:Zu.reference}},v8={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[ua.reference],height:[ua.reference],_checked:{transform:`translateX(${db.reference})`}},b8=rp(e=>({container:{[j0.variable]:g8,[db.variable]:j0.reference,_rtl:{[db.variable]:ro(j0).negate().toString()}},track:y8(e),thumb:v8})),w8={sm:rp({container:{[Vc.variable]:"1.375rem",[ua.variable]:"sizes.3"}}),md:rp({container:{[Vc.variable]:"1.875rem",[ua.variable]:"sizes.4"}}),lg:rp({container:{[Vc.variable]:"2.875rem",[ua.variable]:"sizes.6"}})},S8=m8({baseStyle:b8,sizes:w8,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:x8,definePartsStyle:Il}=ct(MB.keys),_8=Il({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),om={"&[data-is-numeric=true]":{textAlign:"end"}},C8=Il(e=>{const{colorScheme:t}=e;return{th:{color:ge("gray.600","gray.400")(e),borderBottom:"1px",borderColor:ge(`${t}.100`,`${t}.700`)(e),...om},td:{borderBottom:"1px",borderColor:ge(`${t}.100`,`${t}.700`)(e),...om},caption:{color:ge("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),E8=Il(e=>{const{colorScheme:t}=e;return{th:{color:ge("gray.600","gray.400")(e),borderBottom:"1px",borderColor:ge(`${t}.100`,`${t}.700`)(e),...om},td:{borderBottom:"1px",borderColor:ge(`${t}.100`,`${t}.700`)(e),...om},caption:{color:ge("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:ge(`${t}.100`,`${t}.700`)(e)},td:{background:ge(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),k8={simple:C8,striped:E8,unstyled:{}},T8={sm:Il({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:Il({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:Il({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},P8=x8({baseStyle:_8,variants:k8,sizes:T8,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),lr=ve("tabs-color"),li=ve("tabs-bg"),wh=ve("tabs-border-color"),{defineMultiStyleConfig:I8,definePartsStyle:ji}=ct(LB.keys),A8=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},R8=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},$8=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},O8={p:4},N8=ji(e=>({root:A8(e),tab:R8(e),tablist:$8(e),tabpanel:O8})),D8={sm:ji({tab:{py:1,px:4,fontSize:"sm"}}),md:ji({tab:{fontSize:"md",py:2,px:4}}),lg:ji({tab:{fontSize:"lg",py:3,px:4}})},M8=ji(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=r?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[lr.variable]:`colors.${t}.600`,_dark:{[lr.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[li.variable]:"colors.gray.200",_dark:{[li.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:lr.reference,bg:li.reference}}}),L8=ji(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[wh.variable]:"transparent",_selected:{[lr.variable]:`colors.${t}.600`,[wh.variable]:"colors.white",_dark:{[lr.variable]:`colors.${t}.300`,[wh.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:wh.reference},color:lr.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),j8=ji(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[li.variable]:"colors.gray.50",_dark:{[li.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[li.variable]:"colors.white",[lr.variable]:`colors.${t}.600`,_dark:{[li.variable]:"colors.gray.800",[lr.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:lr.reference,bg:li.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),F8=ji(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Zn(n,`${t}.700`),bg:Zn(n,`${t}.100`)}}}}),z8=ji(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[lr.variable]:"colors.gray.600",_dark:{[lr.variable]:"inherit"},_selected:{[lr.variable]:"colors.white",[li.variable]:`colors.${t}.600`,_dark:{[lr.variable]:"colors.gray.800",[li.variable]:`colors.${t}.300`}},color:lr.reference,bg:li.reference}}}),V8=ji({}),B8={line:M8,enclosed:L8,"enclosed-colored":j8,"soft-rounded":F8,"solid-rounded":z8,unstyled:V8},U8=I8({baseStyle:N8,sizes:D8,variants:B8,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),Ht=dV("badge",["bg","color","shadow"]),W8={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold",bg:Ht.bg.reference,color:Ht.color.reference,boxShadow:Ht.shadow.reference},H8=e=>{const{colorScheme:t,theme:n}=e,r=nu(`${t}.500`,.6)(n);return{[Ht.bg.variable]:`colors.${t}.500`,[Ht.color.variable]:"colors.white",_dark:{[Ht.bg.variable]:r,[Ht.color.variable]:"colors.whiteAlpha.800"}}},q8=e=>{const{colorScheme:t,theme:n}=e,r=nu(`${t}.200`,.16)(n);return{[Ht.bg.variable]:`colors.${t}.100`,[Ht.color.variable]:`colors.${t}.800`,_dark:{[Ht.bg.variable]:r,[Ht.color.variable]:`colors.${t}.200`}}},K8=e=>{const{colorScheme:t,theme:n}=e,r=nu(`${t}.200`,.8)(n);return{[Ht.color.variable]:`colors.${t}.500`,_dark:{[Ht.color.variable]:r},[Ht.shadow.variable]:`inset 0 0 0px 1px ${Ht.color.reference}`}},G8={solid:H8,subtle:q8,outline:K8},Bc={baseStyle:W8,variants:G8,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:Q8,definePartsStyle:ca}=ct(jB.keys),pk=ve("tag-bg"),mk=ve("tag-color"),F0=ve("tag-shadow"),ip=ve("tag-min-height"),op=ve("tag-min-width"),sp=ve("tag-font-size"),ap=ve("tag-padding-inline"),Y8={fontWeight:"medium",lineHeight:1.2,outline:0,[mk.variable]:Ht.color.reference,[pk.variable]:Ht.bg.reference,[F0.variable]:Ht.shadow.reference,color:mk.reference,bg:pk.reference,boxShadow:F0.reference,borderRadius:"md",minH:ip.reference,minW:op.reference,fontSize:sp.reference,px:ap.reference,_focusVisible:{[F0.variable]:"shadows.outline"}},X8={lineHeight:1.2,overflow:"visible"},J8={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},Z8=ca({container:Y8,label:X8,closeButton:J8}),eU={sm:ca({container:{[ip.variable]:"sizes.5",[op.variable]:"sizes.5",[sp.variable]:"fontSizes.xs",[ap.variable]:"space.2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:ca({container:{[ip.variable]:"sizes.6",[op.variable]:"sizes.6",[sp.variable]:"fontSizes.sm",[ap.variable]:"space.2"}}),lg:ca({container:{[ip.variable]:"sizes.8",[op.variable]:"sizes.8",[sp.variable]:"fontSizes.md",[ap.variable]:"space.3"}})},tU={subtle:ca(e=>{var t;return{container:(t=Bc.variants)==null?void 0:t.subtle(e)}}),solid:ca(e=>{var t;return{container:(t=Bc.variants)==null?void 0:t.solid(e)}}),outline:ca(e=>{var t;return{container:(t=Bc.variants)==null?void 0:t.outline(e)}})},nU=Q8({variants:tU,baseStyle:Z8,sizes:eU,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),{definePartsStyle:so,defineMultiStyleConfig:rU}=ct(CB.keys),iU=so({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),Fo={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},oU={lg:so({field:Fo.lg,addon:Fo.lg}),md:so({field:Fo.md,addon:Fo.md}),sm:so({field:Fo.sm,addon:Fo.sm}),xs:so({field:Fo.xs,addon:Fo.xs})};function zS(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||ge("blue.500","blue.300")(e),errorBorderColor:n||ge("red.500","red.300")(e)}}var sU=so(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=zS(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:ge("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Zn(t,r),boxShadow:`0 0 0 1px ${Zn(t,r)}`},_focusVisible:{zIndex:1,borderColor:Zn(t,n),boxShadow:`0 0 0 1px ${Zn(t,n)}`}},addon:{border:"1px solid",borderColor:ge("inherit","whiteAlpha.50")(e),bg:ge("gray.100","whiteAlpha.300")(e)}}}),aU=so(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=zS(e);return{field:{border:"2px solid",borderColor:"transparent",bg:ge("gray.100","whiteAlpha.50")(e),_hover:{bg:ge("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Zn(t,r)},_focusVisible:{bg:"transparent",borderColor:Zn(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:ge("gray.100","whiteAlpha.50")(e)}}}),lU=so(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=zS(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Zn(t,r),boxShadow:`0px 1px 0px 0px ${Zn(t,r)}`},_focusVisible:{borderColor:Zn(t,n),boxShadow:`0px 1px 0px 0px ${Zn(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),uU=so({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),cU={outline:sU,filled:aU,flushed:lU,unstyled:uU},Ge=rU({baseStyle:iU,sizes:oU,variants:cU,defaultProps:{size:"md",variant:"outline"}}),gk,dU={...(gk=Ge.baseStyle)==null?void 0:gk.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},yk,vk,fU={outline:e=>{var t,n;return(n=(t=Ge.variants)==null?void 0:t.outline(e).field)!=null?n:{}},flushed:e=>{var t,n;return(n=(t=Ge.variants)==null?void 0:t.flushed(e).field)!=null?n:{}},filled:e=>{var t,n;return(n=(t=Ge.variants)==null?void 0:t.filled(e).field)!=null?n:{}},unstyled:(vk=(yk=Ge.variants)==null?void 0:yk.unstyled.field)!=null?vk:{}},bk,wk,Sk,xk,_k,Ck,Ek,kk,hU={xs:(wk=(bk=Ge.sizes)==null?void 0:bk.xs.field)!=null?wk:{},sm:(xk=(Sk=Ge.sizes)==null?void 0:Sk.sm.field)!=null?xk:{},md:(Ck=(_k=Ge.sizes)==null?void 0:_k.md.field)!=null?Ck:{},lg:(kk=(Ek=Ge.sizes)==null?void 0:Ek.lg.field)!=null?kk:{}},pU={baseStyle:dU,sizes:hU,variants:fU,defaultProps:{size:"md",variant:"outline"}},Sh=cn("tooltip-bg"),z0=cn("tooltip-fg"),mU=cn("popper-arrow-bg"),gU={bg:Sh.reference,color:z0.reference,[Sh.variable]:"colors.gray.700",[z0.variable]:"colors.whiteAlpha.900",_dark:{[Sh.variable]:"colors.gray.300",[z0.variable]:"colors.gray.900"},[mU.variable]:Sh.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},yU={baseStyle:gU},{defineMultiStyleConfig:vU,definePartsStyle:yc}=ct(AB.keys),bU=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=ge(uk(),uk("1rem","rgba(0,0,0,0.1)"))(e),s=ge(`${t}.500`,`${t}.200`)(e),a=`linear-gradient(
    to right,
    transparent 0%,
    ${Zn(n,s)} 50%,
    transparent 100%
  )`;return{...!r&&i&&o,...r?{bgImage:a}:{bgColor:s}}},wU={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},SU=e=>({bg:ge("gray.100","whiteAlpha.300")(e)}),xU=e=>({transitionProperty:"common",transitionDuration:"slow",...bU(e)}),_U=yc(e=>({label:wU,filledTrack:xU(e),track:SU(e)})),CU={xs:yc({track:{h:"1"}}),sm:yc({track:{h:"2"}}),md:yc({track:{h:"3"}}),lg:yc({track:{h:"4"}})},EU=vU({sizes:CU,baseStyle:_U,defaultProps:{size:"md",colorScheme:"blue"}}),kU=e=>typeof e=="function";function nr(e,...t){return kU(e)?e(...t):e}var{definePartsStyle:lp,defineMultiStyleConfig:TU}=ct(bB.keys),Uc=ve("checkbox-size"),PU=e=>{const{colorScheme:t}=e;return{w:Uc.reference,h:Uc.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:ge(`${t}.500`,`${t}.200`)(e),borderColor:ge(`${t}.500`,`${t}.200`)(e),color:ge("white","gray.900")(e),_hover:{bg:ge(`${t}.600`,`${t}.300`)(e),borderColor:ge(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:ge("gray.200","transparent")(e),bg:ge("gray.200","whiteAlpha.300")(e),color:ge("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:ge(`${t}.500`,`${t}.200`)(e),borderColor:ge(`${t}.500`,`${t}.200`)(e),color:ge("white","gray.900")(e)},_disabled:{bg:ge("gray.100","whiteAlpha.100")(e),borderColor:ge("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:ge("red.500","red.300")(e)}}},IU={_disabled:{cursor:"not-allowed"}},AU={userSelect:"none",_disabled:{opacity:.4}},RU={transitionProperty:"transform",transitionDuration:"normal"},$U=lp(e=>({icon:RU,container:IU,control:nr(PU,e),label:AU})),OU={sm:lp({control:{[Uc.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:lp({control:{[Uc.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:lp({control:{[Uc.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},sm=TU({baseStyle:$U,sizes:OU,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:NU,definePartsStyle:up}=ct(RB.keys),DU=e=>{var t;const n=(t=nr(sm.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n==null?void 0:n._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},MU=up(e=>{var t,n,r,i;return{label:(n=(t=sm).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=sm).baseStyle)==null?void 0:i.call(r,e).container,control:DU(e)}}),LU={md:up({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:up({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:up({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},jU=NU({baseStyle:MU,sizes:LU,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:FU,definePartsStyle:zU}=ct($B.keys),xh=ve("select-bg"),Tk,VU={...(Tk=Ge.baseStyle)==null?void 0:Tk.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:xh.reference,[xh.variable]:"colors.white",_dark:{[xh.variable]:"colors.gray.700"},"> option, > optgroup":{bg:xh.reference}},BU={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},UU=zU({field:VU,icon:BU}),_h={paddingInlineEnd:"8"},Pk,Ik,Ak,Rk,$k,Ok,Nk,Dk,WU={lg:{...(Pk=Ge.sizes)==null?void 0:Pk.lg,field:{...(Ik=Ge.sizes)==null?void 0:Ik.lg.field,..._h}},md:{...(Ak=Ge.sizes)==null?void 0:Ak.md,field:{...(Rk=Ge.sizes)==null?void 0:Rk.md.field,..._h}},sm:{...($k=Ge.sizes)==null?void 0:$k.sm,field:{...(Ok=Ge.sizes)==null?void 0:Ok.sm.field,..._h}},xs:{...(Nk=Ge.sizes)==null?void 0:Nk.xs,field:{...(Dk=Ge.sizes)==null?void 0:Dk.xs.field,..._h},icon:{insetEnd:"1"}}},HU=FU({baseStyle:UU,sizes:WU,variants:Ge.variants,defaultProps:Ge.defaultProps}),V0=ve("skeleton-start-color"),B0=ve("skeleton-end-color"),qU={[V0.variable]:"colors.gray.100",[B0.variable]:"colors.gray.400",_dark:{[V0.variable]:"colors.gray.800",[B0.variable]:"colors.gray.600"},background:V0.reference,borderColor:B0.reference,opacity:.7,borderRadius:"sm"},KU={baseStyle:qU},U0=ve("skip-link-bg"),GU={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[U0.variable]:"colors.white",_dark:{[U0.variable]:"colors.gray.700"},bg:U0.reference}},QU={baseStyle:GU},{defineMultiStyleConfig:YU,definePartsStyle:Lg}=ct(OB.keys),Ed=ve("slider-thumb-size"),kd=ve("slider-track-size"),Qo=ve("slider-bg"),XU=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...FS({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},JU=e=>({...FS({orientation:e.orientation,horizontal:{h:kd.reference},vertical:{w:kd.reference}}),overflow:"hidden",borderRadius:"sm",[Qo.variable]:"colors.gray.200",_dark:{[Qo.variable]:"colors.whiteAlpha.200"},_disabled:{[Qo.variable]:"colors.gray.300",_dark:{[Qo.variable]:"colors.whiteAlpha.300"}},bg:Qo.reference}),ZU=e=>{const{orientation:t}=e;return{...FS({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:Ed.reference,h:Ed.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},e7=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Qo.variable]:`colors.${t}.500`,_dark:{[Qo.variable]:`colors.${t}.200`},bg:Qo.reference}},t7=Lg(e=>({container:XU(e),track:JU(e),thumb:ZU(e),filledTrack:e7(e)})),n7=Lg({container:{[Ed.variable]:"sizes.4",[kd.variable]:"sizes.1"}}),r7=Lg({container:{[Ed.variable]:"sizes.3.5",[kd.variable]:"sizes.1"}}),i7=Lg({container:{[Ed.variable]:"sizes.2.5",[kd.variable]:"sizes.0.5"}}),o7={lg:n7,md:r7,sm:i7},s7=YU({baseStyle:t7,sizes:o7,defaultProps:{size:"md",colorScheme:"blue"}}),Xs=cn("spinner-size"),a7={width:[Xs.reference],height:[Xs.reference]},l7={xs:{[Xs.variable]:"sizes.3"},sm:{[Xs.variable]:"sizes.4"},md:{[Xs.variable]:"sizes.6"},lg:{[Xs.variable]:"sizes.8"},xl:{[Xs.variable]:"sizes.12"}},u7={baseStyle:a7,sizes:l7,defaultProps:{size:"md"}},{defineMultiStyleConfig:c7,definePartsStyle:I$}=ct(NB.keys),d7={fontWeight:"medium"},f7={opacity:.8,marginBottom:"2"},h7={verticalAlign:"baseline",fontWeight:"semibold"},p7={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},m7=I$({container:{},label:d7,helpText:f7,number:h7,icon:p7}),g7={md:I$({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},y7=c7({baseStyle:m7,sizes:g7,defaultProps:{size:"md"}}),W0=ve("kbd-bg"),v7={[W0.variable]:"colors.gray.100",_dark:{[W0.variable]:"colors.whiteAlpha.100"},bg:W0.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},b7={baseStyle:v7},w7={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},S7={baseStyle:w7},{defineMultiStyleConfig:x7,definePartsStyle:_7}=ct(EB.keys),C7={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},E7=_7({icon:C7}),k7=x7({baseStyle:E7}),{defineMultiStyleConfig:T7,definePartsStyle:P7}=ct(kB.keys),_i=ve("menu-bg"),H0=ve("menu-shadow"),I7={[_i.variable]:"#fff",[H0.variable]:"shadows.sm",_dark:{[_i.variable]:"colors.gray.700",[H0.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:_i.reference,boxShadow:H0.reference},A7={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[_i.variable]:"colors.gray.100",_dark:{[_i.variable]:"colors.whiteAlpha.100"}},_active:{[_i.variable]:"colors.gray.200",_dark:{[_i.variable]:"colors.whiteAlpha.200"}},_expanded:{[_i.variable]:"colors.gray.100",_dark:{[_i.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:_i.reference},R7={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},$7={opacity:.6},O7={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},N7={transitionProperty:"common",transitionDuration:"normal"},D7=P7({button:N7,list:I7,item:A7,groupTitle:R7,command:$7,divider:O7}),M7=T7({baseStyle:D7}),{defineMultiStyleConfig:L7,definePartsStyle:fb}=ct(TB.keys),q0=ve("modal-bg"),K0=ve("modal-shadow"),j7={bg:"blackAlpha.600",zIndex:"modal"},F7=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto",overscrollBehaviorY:"none"}},z7=e=>{const{isCentered:t,scrollBehavior:n}=e;return{borderRadius:"md",color:"inherit",my:t?"auto":"16",mx:t?"auto":void 0,zIndex:"modal",maxH:n==="inside"?"calc(100% - 7.5rem)":void 0,[q0.variable]:"colors.white",[K0.variable]:"shadows.lg",_dark:{[q0.variable]:"colors.gray.700",[K0.variable]:"shadows.dark-lg"},bg:q0.reference,boxShadow:K0.reference}},V7={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},B7={position:"absolute",top:"2",insetEnd:"3"},U7=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},W7={px:"6",py:"4"},H7=fb(e=>({overlay:j7,dialogContainer:nr(F7,e),dialog:nr(z7,e),header:V7,closeButton:B7,body:nr(U7,e),footer:W7}));function ii(e){return fb(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var q7={xs:ii("xs"),sm:ii("sm"),md:ii("md"),lg:ii("lg"),xl:ii("xl"),"2xl":ii("2xl"),"3xl":ii("3xl"),"4xl":ii("4xl"),"5xl":ii("5xl"),"6xl":ii("6xl"),full:ii("full")},K7=L7({baseStyle:H7,sizes:q7,defaultProps:{size:"md"}}),{defineMultiStyleConfig:G7,definePartsStyle:A$}=ct(PB.keys),VS=cn("number-input-stepper-width"),R$=cn("number-input-input-padding"),Q7=ro(VS).add("0.5rem").toString(),G0=cn("number-input-bg"),Q0=cn("number-input-color"),Y0=cn("number-input-border-color"),Y7={[VS.variable]:"sizes.6",[R$.variable]:Q7},X7=e=>{var t,n;return(n=(t=nr(Ge.baseStyle,e))==null?void 0:t.field)!=null?n:{}},J7={width:VS.reference},Z7={borderStart:"1px solid",borderStartColor:Y0.reference,color:Q0.reference,bg:G0.reference,[Q0.variable]:"colors.chakra-body-text",[Y0.variable]:"colors.chakra-border-color",_dark:{[Q0.variable]:"colors.whiteAlpha.800",[Y0.variable]:"colors.whiteAlpha.300"},_active:{[G0.variable]:"colors.gray.200",_dark:{[G0.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},eW=A$(e=>{var t;return{root:Y7,field:(t=nr(X7,e))!=null?t:{},stepperGroup:J7,stepper:Z7}});function Ch(e){var t,n,r;const i=(t=Ge.sizes)==null?void 0:t[e],o={lg:"md",md:"md",sm:"sm",xs:"sm"},s=(r=(n=i.field)==null?void 0:n.fontSize)!=null?r:"md",a=C$.fontSizes[s];return A$({field:{...i.field,paddingInlineEnd:R$.reference,verticalAlign:"top"},stepper:{fontSize:ro(a).multiply(.75).toString(),_first:{borderTopEndRadius:o[e]},_last:{borderBottomEndRadius:o[e],mt:"-1px",borderTopWidth:1}}})}var tW={xs:Ch("xs"),sm:Ch("sm"),md:Ch("md"),lg:Ch("lg")},nW=G7({baseStyle:eW,sizes:tW,variants:Ge.variants,defaultProps:Ge.defaultProps}),Mk,rW={...(Mk=Ge.baseStyle)==null?void 0:Mk.field,textAlign:"center"},iW={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},Lk,jk,oW={outline:e=>{var t,n,r;return(r=(n=nr((t=Ge.variants)==null?void 0:t.outline,e))==null?void 0:n.field)!=null?r:{}},flushed:e=>{var t,n,r;return(r=(n=nr((t=Ge.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)!=null?r:{}},filled:e=>{var t,n,r;return(r=(n=nr((t=Ge.variants)==null?void 0:t.filled,e))==null?void 0:n.field)!=null?r:{}},unstyled:(jk=(Lk=Ge.variants)==null?void 0:Lk.unstyled.field)!=null?jk:{}},sW={baseStyle:rW,sizes:iW,variants:oW,defaultProps:Ge.defaultProps},{defineMultiStyleConfig:aW,definePartsStyle:lW}=ct(IB.keys),Eh=cn("popper-bg"),uW=cn("popper-arrow-bg"),Fk=cn("popper-arrow-shadow-color"),cW={zIndex:10},dW={[Eh.variable]:"colors.white",bg:Eh.reference,[uW.variable]:Eh.reference,[Fk.variable]:"colors.gray.200",_dark:{[Eh.variable]:"colors.gray.700",[Fk.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},fW={px:3,py:2,borderBottomWidth:"1px"},hW={px:3,py:2},pW={px:3,py:2,borderTopWidth:"1px"},mW={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},gW=lW({popper:cW,content:dW,header:fW,body:hW,footer:pW,closeButton:mW}),yW=aW({baseStyle:gW}),{definePartsStyle:hb,defineMultiStyleConfig:vW}=ct(wB.keys),X0=ve("drawer-bg"),J0=ve("drawer-box-shadow");function Ua(e){return hb(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var bW={bg:"blackAlpha.600",zIndex:"overlay"},wW={display:"flex",zIndex:"modal",justifyContent:"center"},SW=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[X0.variable]:"colors.white",[J0.variable]:"shadows.lg",_dark:{[X0.variable]:"colors.gray.700",[J0.variable]:"shadows.dark-lg"},bg:X0.reference,boxShadow:J0.reference}},xW={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},_W={position:"absolute",top:"2",insetEnd:"3"},CW={px:"6",py:"2",flex:"1",overflow:"auto"},EW={px:"6",py:"4"},kW=hb(e=>({overlay:bW,dialogContainer:wW,dialog:nr(SW,e),header:xW,closeButton:_W,body:CW,footer:EW})),TW={xs:Ua("xs"),sm:Ua("md"),md:Ua("lg"),lg:Ua("2xl"),xl:Ua("4xl"),full:Ua("full")},PW=vW({baseStyle:kW,sizes:TW,defaultProps:{size:"xs"}}),{definePartsStyle:IW,defineMultiStyleConfig:AW}=ct(SB.keys),RW={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},$W={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},OW={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},NW=IW({preview:RW,input:$W,textarea:OW}),DW=AW({baseStyle:NW}),{definePartsStyle:MW,defineMultiStyleConfig:LW}=ct(xB.keys),Al=ve("form-control-color"),jW={marginStart:"1",[Al.variable]:"colors.red.500",_dark:{[Al.variable]:"colors.red.300"},color:Al.reference},FW={mt:"2",[Al.variable]:"colors.gray.600",_dark:{[Al.variable]:"colors.whiteAlpha.600"},color:Al.reference,lineHeight:"normal",fontSize:"sm"},zW=MW({container:{width:"100%",position:"relative"},requiredIndicator:jW,helperText:FW}),VW=LW({baseStyle:zW}),{definePartsStyle:BW,defineMultiStyleConfig:UW}=ct(_B.keys),Rl=ve("form-error-color"),WW={[Rl.variable]:"colors.red.500",_dark:{[Rl.variable]:"colors.red.300"},color:Rl.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},HW={marginEnd:"0.5em",[Rl.variable]:"colors.red.500",_dark:{[Rl.variable]:"colors.red.300"},color:Rl.reference},qW=BW({text:WW,icon:HW}),KW=UW({baseStyle:qW}),GW={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},QW={baseStyle:GW},YW={fontFamily:"heading",fontWeight:"bold"},XW={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},JW={baseStyle:YW,sizes:XW,defaultProps:{size:"xl"}},{defineMultiStyleConfig:ZW,definePartsStyle:eH}=ct(vB.keys),Z0=ve("breadcrumb-link-decor"),tH={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:Z0.reference,[Z0.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[Z0.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}},nH=eH({link:tH}),rH=ZW({baseStyle:nH}),iH={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},$$=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:ge("inherit","whiteAlpha.900")(e),_hover:{bg:ge("gray.100","whiteAlpha.200")(e)},_active:{bg:ge("gray.200","whiteAlpha.300")(e)}};const r=nu(`${t}.200`,.12)(n),i=nu(`${t}.200`,.24)(n);return{color:ge(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:ge(`${t}.50`,r)(e)},_active:{bg:ge(`${t}.100`,i)(e)}}},oH=e=>{const{colorScheme:t}=e,n=ge("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"},...nr($$,e)}},sH={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},aH=e=>{var t;const{colorScheme:n}=e;if(n==="gray"){const l=ge("gray.100","whiteAlpha.200")(e);return{bg:l,_hover:{bg:ge("gray.200","whiteAlpha.300")(e),_disabled:{bg:l}},_active:{bg:ge("gray.300","whiteAlpha.400")(e)}}}const{bg:r=`${n}.500`,color:i="white",hoverBg:o=`${n}.600`,activeBg:s=`${n}.700`}=(t=sH[n])!=null?t:{},a=ge(r,`${n}.200`)(e);return{bg:a,color:ge(i,"gray.800")(e),_hover:{bg:ge(o,`${n}.300`)(e),_disabled:{bg:a}},_active:{bg:ge(s,`${n}.400`)(e)}}},lH=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:ge(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:ge(`${t}.700`,`${t}.500`)(e)}}},uH={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},cH={ghost:$$,outline:oH,solid:aH,link:lH,unstyled:uH},dH={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},fH={baseStyle:iH,variants:cH,sizes:dH,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:da,defineMultiStyleConfig:hH}=ct(FB.keys),am=ve("card-bg"),ho=ve("card-padding"),O$=ve("card-shadow"),cp=ve("card-radius"),N$=ve("card-border-width","0"),D$=ve("card-border-color"),pH=da({container:{[am.variable]:"colors.chakra-body-bg",backgroundColor:am.reference,boxShadow:O$.reference,borderRadius:cp.reference,color:"chakra-body-text",borderWidth:N$.reference,borderColor:D$.reference},body:{padding:ho.reference,flex:"1 1 0%"},header:{padding:ho.reference},footer:{padding:ho.reference}}),mH={sm:da({container:{[cp.variable]:"radii.base",[ho.variable]:"space.3"}}),md:da({container:{[cp.variable]:"radii.md",[ho.variable]:"space.5"}}),lg:da({container:{[cp.variable]:"radii.xl",[ho.variable]:"space.7"}})},gH={elevated:da({container:{[O$.variable]:"shadows.base",_dark:{[am.variable]:"colors.gray.700"}}}),outline:da({container:{[N$.variable]:"1px",[D$.variable]:"colors.chakra-border-color"}}),filled:da({container:{[am.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[ho.variable]:0},header:{[ho.variable]:0},footer:{[ho.variable]:0}}},yH=hH({baseStyle:pH,variants:gH,sizes:mH,defaultProps:{variant:"elevated",size:"md"}}),Wc=cn("close-button-size"),ec=cn("close-button-bg"),vH={w:[Wc.reference],h:[Wc.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[ec.variable]:"colors.blackAlpha.100",_dark:{[ec.variable]:"colors.whiteAlpha.100"}},_active:{[ec.variable]:"colors.blackAlpha.200",_dark:{[ec.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:ec.reference},bH={lg:{[Wc.variable]:"sizes.10",fontSize:"md"},md:{[Wc.variable]:"sizes.8",fontSize:"xs"},sm:{[Wc.variable]:"sizes.6",fontSize:"2xs"}},wH={baseStyle:vH,sizes:bH,defaultProps:{size:"md"}},{variants:SH,defaultProps:xH}=Bc,_H={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:Ht.bg.reference,color:Ht.color.reference,boxShadow:Ht.shadow.reference},CH={baseStyle:_H,variants:SH,defaultProps:xH},EH={w:"100%",mx:"auto",maxW:"prose",px:"4"},kH={baseStyle:EH},TH={opacity:.6,borderColor:"inherit"},PH={borderStyle:"solid"},IH={borderStyle:"dashed"},AH={solid:PH,dashed:IH},RH={baseStyle:TH,variants:AH,defaultProps:{variant:"solid"}},{definePartsStyle:$H,defineMultiStyleConfig:OH}=ct(mB.keys),NH={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},DH={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},MH={pt:"2",px:"4",pb:"5"},LH={fontSize:"1.25em"},jH=$H({container:NH,button:DH,panel:MH,icon:LH}),FH=OH({baseStyle:jH}),{definePartsStyle:df,defineMultiStyleConfig:zH}=ct(gB.keys),Er=ve("alert-fg"),xo=ve("alert-bg"),VH=df({container:{bg:xo.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:Er.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:Er.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function BS(e){const{theme:t,colorScheme:n}=e,r=nu(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var BH=df(e=>{const{colorScheme:t}=e,n=BS(e);return{container:{[Er.variable]:`colors.${t}.500`,[xo.variable]:n.light,_dark:{[Er.variable]:`colors.${t}.200`,[xo.variable]:n.dark}}}}),UH=df(e=>{const{colorScheme:t}=e,n=BS(e);return{container:{[Er.variable]:`colors.${t}.500`,[xo.variable]:n.light,_dark:{[Er.variable]:`colors.${t}.200`,[xo.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:Er.reference}}}),WH=df(e=>{const{colorScheme:t}=e,n=BS(e);return{container:{[Er.variable]:`colors.${t}.500`,[xo.variable]:n.light,_dark:{[Er.variable]:`colors.${t}.200`,[xo.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:Er.reference}}}),HH=df(e=>{const{colorScheme:t}=e;return{container:{[Er.variable]:"colors.white",[xo.variable]:`colors.${t}.500`,_dark:{[Er.variable]:"colors.gray.900",[xo.variable]:`colors.${t}.200`},color:Er.reference}}}),qH={subtle:BH,"left-accent":UH,"top-accent":WH,solid:HH},KH=zH({baseStyle:VH,variants:qH,defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle:M$,defineMultiStyleConfig:GH}=ct(yB.keys),$l=ve("avatar-border-color"),ev=ve("avatar-bg"),QH={borderRadius:"full",border:"0.2em solid",[$l.variable]:"white",_dark:{[$l.variable]:"colors.gray.800"},borderColor:$l.reference},YH={[ev.variable]:"colors.gray.200",_dark:{[ev.variable]:"colors.whiteAlpha.400"},bgColor:ev.reference},zk=ve("avatar-background"),XH=e=>{const{name:t,theme:n}=e,r=t?o8({string:t}):"colors.gray.400",i=r8(r)(n);let o="white";return i||(o="gray.800"),{bg:zk.reference,"&:not([data-loaded])":{[zk.variable]:r},color:o,[$l.variable]:"colors.white",_dark:{[$l.variable]:"colors.gray.800"},borderColor:$l.reference,verticalAlign:"top"}},JH=M$(e=>({badge:nr(QH,e),excessLabel:nr(YH,e),container:nr(XH,e)}));function zo(e){const t=e!=="100%"?k$[e]:void 0;return M$({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var ZH={"2xs":zo(4),xs:zo(6),sm:zo(8),md:zo(12),lg:zo(16),xl:zo(24),"2xl":zo(32),full:zo("100%")},eq=GH({baseStyle:JH,sizes:ZH,defaultProps:{size:"md"}}),tq={Accordion:FH,Alert:KH,Avatar:eq,Badge:Bc,Breadcrumb:rH,Button:fH,Checkbox:sm,CloseButton:wH,Code:CH,Container:kH,Divider:RH,Drawer:PW,Editable:DW,Form:VW,FormError:KW,FormLabel:QW,Heading:JW,Input:Ge,Kbd:b7,Link:S7,List:k7,Menu:M7,Modal:K7,NumberInput:nW,PinInput:sW,Popover:yW,Progress:EU,Radio:jU,Select:HU,Skeleton:KU,SkipLink:QU,Slider:s7,Spinner:u7,Stat:y7,Switch:S8,Table:P8,Tabs:U8,Tag:nU,Textarea:pU,Tooltip:yU,Card:yH,Stepper:pB},nq={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-inverse-text":{_light:"white",_dark:"gray.800"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-subtle-text":{_light:"gray.600",_dark:"gray.400"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},rq={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color"}}},iq="ltr",oq={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},L$={semanticTokens:nq,direction:iq,...dB,components:tq,styles:rq,config:oq};function vc(e){return typeof e=="function"}function sq(...e){return t=>e.reduce((n,r)=>r(n),t)}var aq=e=>function(...n){let r=[...n],i=n[n.length-1];return VV(i)&&r.length>1?r=r.slice(0,r.length-1):i=e,sq(...r.map(o=>s=>vc(o)?o(s):uq(s,o)))(i)},lq=aq(L$);function uq(...e){return Kr({},...e,j$)}function j$(e,t,n,r){if((vc(e)||vc(t))&&Object.prototype.hasOwnProperty.call(r,n))return(...i)=>{const o=vc(e)?e(...i):e,s=vc(t)?t(...i):t;return Kr({},o,s,j$)}}function cq(e,t){const n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function dq(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return e===void 0?n:e}var fq=e=>{const t=new WeakMap;return(r,i,o,s)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const a=t.get(r);if(a.has(i))return a.get(i);const l=e(r,i,o,s);return a.set(i,l),l}},F$=fq(dq);function z$(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var V$=e=>z$(e,t=>t!=null);function hq(e){return typeof e=="function"}function B$(e,...t){return hq(e)?e(...t):e}var pq=typeof Element<"u",mq=typeof Map=="function",gq=typeof Set=="function",yq=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function dp(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!dp(e[r],t[r]))return!1;return!0}var o;if(mq&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!dp(r.value[1],t.get(r.value[0])))return!1;return!0}if(gq&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(yq&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(pq&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!dp(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var vq=function(t,n){try{return dp(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const bq=tg(vq);function U$(e,t={}){var n;const{styleConfig:r,...i}=t,{theme:o,colorMode:s}=g$(),a=e?F$(o,`components.${e}`):void 0,l=r||a,u=Kr({theme:o,colorMode:s},(n=l==null?void 0:l.defaultProps)!=null?n:{},V$(cq(i,["children"]))),c=w.useRef({});if(l){const f=FV(l)(u);bq(c.current,f)||(c.current=f)}return c.current}function Aa(e,t={}){return U$(e,t)}function ff(e,t={}){return U$(e,t)}var wq=new Set([...TV,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Sq=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function xq(e){return Sq.has(e)||!wq.has(e)}function _q(e,...t){if(e==null)throw new TypeError("Cannot convert undefined or null to object");const n={...e};for(const r of t)if(r!=null)for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&(i in n&&delete n[i],n[i]=r[i]);return n}function Cq(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var Eq=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,kq=ZR(function(e){return Eq.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Tq=kq,Pq=function(t){return t!=="theme"},Vk=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Tq:Pq},Bk=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(s){return t.__emotion_forwardProp(s)&&o(s)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},Iq=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return o$(n,r,i),t9(function(){return s$(n,r,i)}),null},Aq=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,s;n!==void 0&&(o=n.label,s=n.target);var a=Bk(t,n,r),l=a||Vk(i),u=!l("as");return function(){var c=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&d.push("label:"+o+";"),c[0]==null||c[0].raw===void 0)d.push.apply(d,c);else{d.push(c[0][0]);for(var f=c.length,h=1;h<f;h++)d.push(c[h],c[0][h])}var p=c$(function(y,S,v){var m=u&&y.as||i,b="",C=[],k=y;if(y.theme==null){k={};for(var x in y)k[x]=y[x];k.theme=w.useContext(Zl)}typeof y.className=="string"?b=G6(S.registered,C,y.className):y.className!=null&&(b=y.className+" ");var E=RS(d.concat(C),S.registered,k);b+=S.key+"-"+E.name,s!==void 0&&(b+=" "+s);var R=u&&a===void 0?Vk(m):l,M={};for(var L in y)u&&L==="as"||R(L)&&(M[L]=y[L]);return M.className=b,M.ref=v,w.createElement(w.Fragment,null,w.createElement(Iq,{cache:S,serialized:E,isStringTag:typeof m=="string"}),w.createElement(m,M))});return p.displayName=o!==void 0?o:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",p.defaultProps=t.defaultProps,p.__emotion_real=p,p.__emotion_base=i,p.__emotion_styles=d,p.__emotion_forwardProp=a,Object.defineProperty(p,"toString",{value:function(){return"."+s}}),p.withComponent=function(y,S){return e(y,je({},n,S,{shouldForwardProp:Bk(p,S,!0)})).apply(void 0,d)},p}},Rq=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Td=Aq.bind();Rq.forEach(function(e){Td[e]=Td(e)});var Uk,$q=(Uk=Td.default)!=null?Uk:Td,Oq=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...s}=t,a=z$(s,(d,f)=>IV(f)),l=B$(e,t),u=_q({},i,l,V$(a),o),c=_$(u)(t.theme);return r?[c,r]:c};function tv(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=xq);const i=Oq({baseStyle:n}),o=$q(e,r)(i);return ur.forwardRef(function(l,u){const{colorMode:c,forced:d}=NS();return ur.createElement(o,{ref:u,"data-theme":d?c:void 0,...l})})}function Nq(){const e=new Map;return new Proxy(tv,{apply(t,n,r){return tv(...r)},get(t,n){return e.has(n)||e.set(n,tv(n)),e.get(n)}})}var Ae=Nq();function it(e){return w.forwardRef(e)}function Dq(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=w.createContext(void 0);i.displayName=r;function o(){var s;const a=w.useContext(i);if(!a&&t){const l=new Error(n);throw l.name="ContextError",(s=Error.captureStackTrace)==null||s.call(Error,l,o),l}return a}return[i.Provider,o,i]}function Mq(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=w.useMemo(()=>kV(n),[n]);return g.jsxs(i9,{theme:i,children:[g.jsx(Lq,{root:t}),r]})}function Lq({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return g.jsx($g,{styles:n=>({[t]:n.__cssVars})})}Dq({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "});function jq(){const{colorMode:e}=NS();return g.jsx($g,{styles:t=>{const n=F$(t,"styles.global"),r=B$(n,{theme:t,colorMode:e});return r?_$(r)(t):void 0}})}var W$=w.createContext({getDocument(){return document},getWindow(){return window}});W$.displayName="EnvironmentContext";function H$(e){const{children:t,environment:n,disabled:r}=e,i=w.useRef(null),o=w.useMemo(()=>n||{getDocument:()=>{var a,l;return(l=(a=i.current)==null?void 0:a.ownerDocument)!=null?l:document},getWindow:()=>{var a,l;return(l=(a=i.current)==null?void 0:a.ownerDocument.defaultView)!=null?l:window}},[n]),s=!r||!n;return g.jsxs(W$.Provider,{value:o,children:[t,s&&g.jsx("span",{id:"__chakra_env",hidden:!0,ref:i})]})}H$.displayName="EnvironmentProvider";var Fq=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetScope:i,resetCSS:o=!0,theme:s={},environment:a,cssVarsRoot:l,disableEnvironment:u}=e,c=g.jsx(H$,{environment:a,disabled:u,children:t});return g.jsx(Mq,{theme:s,cssVarsRoot:l,children:g.jsxs(m$,{colorModeManager:n,options:s.config,children:[o?g.jsx(l9,{scope:i}):g.jsx(a9,{}),g.jsx(jq,{}),r?g.jsx(h$,{zIndex:r,children:c}):c]})})},zq=(e,t)=>e.find(n=>n.id===t);function Wk(e,t){const n=q$(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function q$(e,t){for(const[n,r]of Object.entries(e))if(zq(r,t))return n}function Vq(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function Bq(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",s=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:s}}function fp(e,t=[]){const n=w.useRef(e);return w.useEffect(()=>{n.current=e}),w.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Uq(e,t){const n=fp(e);w.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function Hk(e,t){const n=w.useRef(!1),r=w.useRef(!1);w.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),w.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}const K$=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),jg=w.createContext({}),hf=w.createContext(null),Fg=typeof document<"u",lm=Fg?w.useLayoutEffect:w.useEffect,G$=w.createContext({strict:!1});function Wq(e,t,n,r){const{visualElement:i}=w.useContext(jg),o=w.useContext(G$),s=w.useContext(hf),a=w.useContext(K$).reducedMotion,l=w.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const u=l.current;return w.useInsertionEffect(()=>{u&&u.update(n,s)}),lm(()=>{u&&u.render()}),w.useEffect(()=>{u&&u.updateFeatures()}),(window.HandoffAppearAnimations?lm:w.useEffect)(()=>{u&&u.animationState&&u.animationState.animateChanges()}),u}function ml(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Hq(e,t,n){return w.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ml(n)&&(n.current=r))},[t])}function Pd(e){return typeof e=="string"||Array.isArray(e)}function zg(e){return typeof e=="object"&&typeof e.start=="function"}const US=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],WS=["initial",...US];function Vg(e){return zg(e.animate)||WS.some(t=>Pd(e[t]))}function Q$(e){return!!(Vg(e)||e.variants)}function qq(e,t){if(Vg(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Pd(n)?n:void 0,animate:Pd(r)?r:void 0}}return e.inherit!==!1?t:{}}function Kq(e){const{initial:t,animate:n}=qq(e,w.useContext(jg));return w.useMemo(()=>({initial:t,animate:n}),[qk(t),qk(n)])}function qk(e){return Array.isArray(e)?e.join(" "):e}const Kk={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Id={};for(const e in Kk)Id[e]={isEnabled:t=>Kk[e].some(n=>!!t[n])};function Gq(e){for(const t in e)Id[t]={...Id[t],...e[t]}}const HS=w.createContext({}),Y$=w.createContext({}),Qq=Symbol.for("motionComponentSymbol");function Yq({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&Gq(e);function o(a,l){let u;const c={...w.useContext(K$),...a,layoutId:Xq(a)},{isStatic:d}=c,f=Kq(a),h=r(a,d);if(!d&&Fg){f.visualElement=Wq(i,h,c,t);const p=w.useContext(Y$),y=w.useContext(G$).strict;f.visualElement&&(u=f.visualElement.loadFeatures(c,y,e,p))}return w.createElement(jg.Provider,{value:f},u&&f.visualElement?w.createElement(u,{visualElement:f.visualElement,...c}):null,n(i,a,Hq(h,f.visualElement,l),h,d,f.visualElement))}const s=w.forwardRef(o);return s[Qq]=i,s}function Xq({layoutId:e}){const t=w.useContext(HS).id;return t&&e!==void 0?t+"-"+e:e}function Jq(e){function t(r,i={}){return Yq(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const Zq=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function qS(e){return typeof e!="string"||e.includes("-")?!1:!!(Zq.indexOf(e)>-1||/[A-Z]/.test(e))}const um={};function eK(e){Object.assign(um,e)}const pf=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ra=new Set(pf);function X$(e,{layout:t,layoutId:n}){return Ra.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!um[e]||e==="opacity")}const gr=e=>!!(e&&e.getVelocity),tK={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nK=pf.length;function rK(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;s<nK;s++){const a=pf[s];if(e[a]!==void 0){const l=tK[a]||a;o+=`${l}(${e[a]}) `}}return t&&!e.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(e,r?"":o):n&&r&&(o="none"),o}const J$=e=>t=>typeof t=="string"&&t.startsWith(e),Z$=J$("--"),pb=J$("var(--"),iK=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,oK=(e,t)=>t&&typeof e=="number"?t.transform(e):e,ks=(e,t,n)=>Math.min(Math.max(n,e),t),$a={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Hc={...$a,transform:e=>ks(0,1,e)},kh={...$a,default:1},qc=e=>Math.round(e*1e5)/1e5,Bg=/(-)?([\d]*\.?[\d])+/g,eO=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,sK=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function mf(e){return typeof e=="string"}const gf=e=>({test:t=>mf(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Uo=gf("deg"),Fi=gf("%"),ye=gf("px"),aK=gf("vh"),lK=gf("vw"),Gk={...Fi,parse:e=>Fi.parse(e)/100,transform:e=>Fi.transform(e*100)},Qk={...$a,transform:Math.round},tO={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,size:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,rotate:Uo,rotateX:Uo,rotateY:Uo,rotateZ:Uo,scale:kh,scaleX:kh,scaleY:kh,scaleZ:kh,skew:Uo,skewX:Uo,skewY:Uo,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:Hc,originX:Gk,originY:Gk,originZ:ye,zIndex:Qk,fillOpacity:Hc,strokeOpacity:Hc,numOctaves:Qk};function KS(e,t,n,r){const{style:i,vars:o,transform:s,transformOrigin:a}=e;let l=!1,u=!1,c=!0;for(const d in t){const f=t[d];if(Z$(d)){o[d]=f;continue}const h=tO[d],p=oK(f,h);if(Ra.has(d)){if(l=!0,s[d]=p,!c)continue;f!==(h.default||0)&&(c=!1)}else d.startsWith("origin")?(u=!0,a[d]=p):i[d]=p}if(t.transform||(l||r?i.transform=rK(e.transform,n,c,r):i.transform&&(i.transform="none")),u){const{originX:d="50%",originY:f="50%",originZ:h=0}=a;i.transformOrigin=`${d} ${f} ${h}`}}const GS=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function nO(e,t,n){for(const r in t)!gr(t[r])&&!X$(r,n)&&(e[r]=t[r])}function uK({transformTemplate:e},t,n){return w.useMemo(()=>{const r=GS();return KS(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function cK(e,t,n){const r=e.style||{},i={};return nO(i,r,e),Object.assign(i,uK(e,t,n)),e.transformValues?e.transformValues(i):i}function dK(e,t,n){const r={},i=cK(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const fK=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function cm(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||fK.has(e)}let rO=e=>!cm(e);function hK(e){e&&(rO=t=>t.startsWith("on")?!cm(t):e(t))}try{hK(require("@emotion/is-prop-valid").default)}catch{}function pK(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(rO(i)||n===!0&&cm(i)||!t&&!cm(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function Yk(e,t,n){return typeof e=="string"?e:ye.transform(t+n*e)}function mK(e,t,n){const r=Yk(t,e.x,e.width),i=Yk(n,e.y,e.height);return`${r} ${i}`}const gK={offset:"stroke-dashoffset",array:"stroke-dasharray"},yK={offset:"strokeDashoffset",array:"strokeDasharray"};function vK(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?gK:yK;e[o.offset]=ye.transform(-r);const s=ye.transform(t),a=ye.transform(n);e[o.array]=`${s} ${a}`}function QS(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},c,d,f){if(KS(e,u,c,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:y}=e;h.transform&&(y&&(p.transform=h.transform),delete h.transform),y&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=mK(y,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&vK(h,s,a,l,!1)}const iO=()=>({...GS(),attrs:{}}),YS=e=>typeof e=="string"&&e.toLowerCase()==="svg";function bK(e,t,n,r){const i=w.useMemo(()=>{const o=iO();return QS(o,t,{enableHardwareAcceleration:!1},YS(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};nO(o,e.style,e),i.style={...o,...i.style}}return i}function wK(e=!1){return(n,r,i,{latestValues:o},s)=>{const l=(qS(n)?bK:dK)(r,o,s,n),c={...pK(r,typeof n=="string",e),...l,ref:i},{children:d}=r,f=w.useMemo(()=>gr(d)?d.get():d,[d]);return w.createElement(n,{...c,children:f})}}const XS=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function oO(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const sO=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function aO(e,t,n,r){oO(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(sO.has(i)?i:XS(i),t.attrs[i])}function JS(e,t){const{style:n}=e,r={};for(const i in n)(gr(n[i])||t.style&&gr(t.style[i])||X$(i,e))&&(r[i]=n[i]);return r}function lO(e,t){const n=JS(e,t);for(const r in e)if(gr(e[r])||gr(t[r])){const i=pf.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function ZS(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function uO(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const dm=e=>Array.isArray(e),SK=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),xK=e=>dm(e)?e[e.length-1]||0:e;function hp(e){const t=gr(e)?e.get():e;return SK(t)?t.toValue():t}function _K({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const s={latestValues:CK(r,i,o,e),renderState:t()};return n&&(s.mount=a=>n(r,a,s)),s}const cO=e=>(t,n)=>{const r=w.useContext(jg),i=w.useContext(hf),o=()=>_K(e,t,r,i);return n?o():uO(o)};function CK(e,t,n,r){const i={},o=r(e,{});for(const f in o)i[f]=hp(o[f]);let{initial:s,animate:a}=e;const l=Vg(e),u=Q$(e);t&&u&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||s===!1;const d=c?a:s;return d&&typeof d!="boolean"&&!zg(d)&&(Array.isArray(d)?d:[d]).forEach(h=>{const p=ZS(e,h);if(!p)return;const{transitionEnd:y,transition:S,...v}=p;for(const m in v){let b=v[m];if(Array.isArray(b)){const C=c?b.length-1:0;b=b[C]}b!==null&&(i[m]=b)}for(const m in y)i[m]=y[m]}),i}const EK={useVisualState:cO({scrapeMotionValuesFromProps:lO,createRenderState:iO,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}QS(n,r,{enableHardwareAcceleration:!1},YS(t.tagName),e.transformTemplate),aO(t,n)}})},kK={useVisualState:cO({scrapeMotionValuesFromProps:JS,createRenderState:GS})};function TK(e,{forwardMotionProps:t=!1},n,r){return{...qS(e)?EK:kK,preloadedFeatures:n,useRender:wK(t),createVisualElement:r,Component:e}}function ao(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const dO=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Ug(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const PK=e=>t=>dO(t)&&e(t,Ug(t));function po(e,t,n,r){return ao(e,t,PK(n),r)}const IK=(e,t)=>n=>t(e(n)),gs=(...e)=>e.reduce(IK);function fO(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Xk=fO("dragHorizontal"),Jk=fO("dragVertical");function hO(e){let t=!1;if(e==="y")t=Jk();else if(e==="x")t=Xk();else{const n=Xk(),r=Jk();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function pO(){const e=hO(!0);return e?(e(),!1):!0}class Ls{constructor(t){this.isMounted=!1,this.node=t}update(){}}function AK(e){let t=[],n=[],r=0,i=!1,o=!1;const s=new WeakSet,a={schedule:(l,u=!1,c=!1)=>{const d=c&&i,f=d?t:n;return u&&s.add(l),f.indexOf(l)===-1&&(f.push(l),d&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),s.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u<r;u++){const c=t[u];c(l),s.has(c)&&(a.schedule(c),e())}i=!1,o&&(o=!1,a.process(l))}};return a}const Pt={delta:0,timestamp:0,isProcessing:!1},RK=40;let mb=!0,Ad=!1;const Wg=["read","update","preRender","render","postRender"],Ol=Wg.reduce((e,t)=>(e[t]=AK(()=>Ad=!0),e),{}),$K=e=>Ol[e].process(Pt),mO=e=>{Ad=!1,Pt.delta=mb?1e3/60:Math.max(Math.min(e-Pt.timestamp,RK),1),Pt.timestamp=e,Pt.isProcessing=!0,Wg.forEach($K),Pt.isProcessing=!1,Ad&&(mb=!1,requestAnimationFrame(mO))},OK=()=>{Ad=!0,mb=!0,Pt.isProcessing||requestAnimationFrame(mO)},Et=Wg.reduce((e,t)=>{const n=Ol[t];return e[t]=(r,i=!1,o=!1)=>(Ad||OK(),n.schedule(r,i,o)),e},{});function _o(e){Wg.forEach(t=>Ol[t].cancel(e))}function Zk(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(o,s)=>{if(o.type==="touch"||pO())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&Et.update(()=>a[r](o,s))};return po(e.current,n,i,{passive:!e.getProps()[r]})}class NK extends Ls{mount(){this.unmount=gs(Zk(this.node,!0),Zk(this.node,!1))}unmount(){}}class DK extends Ls{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=gs(ao(this.node.current,"focus",()=>this.onFocus()),ao(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const gO=(e,t)=>t?e===t?!0:gO(e,t.parentElement):!1,nn=e=>e;function nv(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Ug(n))}class MK extends Ls{constructor(){super(...arguments),this.removeStartListeners=nn,this.removeEndListeners=nn,this.removeAccessibleListeners=nn,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),o=po(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c}=this.node.getProps();Et.update(()=>{gO(this.node.current,a.target)?u&&u(a,l):c&&c(a,l)})},{passive:!(r.onTap||r.onPointerUp)}),s=po(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=gs(o,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||nv("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&Et.update(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=ao(this.node.current,"keyup",s),nv("down",(a,l)=>{this.startPress(a,l)})},n=ao(this.node.current,"keydown",t),r=()=>{this.isPressing&&nv("cancel",(o,s)=>this.cancelPress(o,s))},i=ao(this.node.current,"blur",r);this.removeAccessibleListeners=gs(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Et.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!pO()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Et.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=po(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=ao(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=gs(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const gb=new WeakMap,rv=new WeakMap,LK=e=>{const t=gb.get(e.target);t&&t(e)},jK=e=>{e.forEach(LK)};function FK({root:e,...t}){const n=e||document;rv.has(n)||rv.set(n,{});const r=rv.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(jK,{root:e,...t})),r[i]}function zK(e,t,n){const r=FK(t);return gb.set(e,n),r.observe(e),()=>{gb.delete(e),r.unobserve(e)}}const VK={some:0,all:1};class BK extends Ls{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:VK[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return zK(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(UK(t,n))&&this.startObserver()}unmount(){}}function UK({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const WK={inView:{Feature:BK},tap:{Feature:MK},focus:{Feature:DK},hover:{Feature:NK}};function yO(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function HK(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function qK(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Hg(e,t,n){const r=e.getProps();return ZS(r,t,n!==void 0?n:r.custom,HK(e),qK(e))}const KK="framerAppearId",GK="data-"+XS(KK);let QK=nn,ex=nn;const ys=e=>e*1e3,mo=e=>e/1e3,YK={current:!1},vO=e=>Array.isArray(e)&&typeof e[0]=="number";function bO(e){return!!(!e||typeof e=="string"&&wO[e]||vO(e)||Array.isArray(e)&&e.every(bO))}const bc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,wO={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:bc([0,.65,.55,1]),circOut:bc([.55,0,1,.45]),backIn:bc([.31,.01,.66,-.59]),backOut:bc([.33,1.53,.69,.99])};function SO(e){if(e)return vO(e)?bc(e):Array.isArray(e)?e.map(SO):wO[e]}function XK(e,t,n,{delay:r=0,duration:i,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=SO(a);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}const eT={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},iv={},xO={};for(const e in eT)xO[e]=()=>(iv[e]===void 0&&(iv[e]=eT[e]()),iv[e]);function JK(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const _O=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,ZK=1e-7,eG=12;function tG(e,t,n,r,i){let o,s,a=0;do s=t+(n-t)/2,o=_O(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>ZK&&++a<eG);return s}function yf(e,t,n,r){if(e===t&&n===r)return nn;const i=o=>tG(o,0,1,e,n);return o=>o===0||o===1?o:_O(i(o),t,r)}const nG=yf(.42,0,1,1),rG=yf(0,0,.58,1),CO=yf(.42,0,.58,1),iG=e=>Array.isArray(e)&&typeof e[0]!="number",EO=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,kO=e=>t=>1-e(1-t),TO=e=>1-Math.sin(Math.acos(e)),tx=kO(TO),oG=EO(tx),PO=yf(.33,1.53,.69,.99),nx=kO(PO),sG=EO(nx),aG=e=>(e*=2)<1?.5*nx(e):.5*(2-Math.pow(2,-10*(e-1))),lG={linear:nn,easeIn:nG,easeInOut:CO,easeOut:rG,circIn:TO,circInOut:oG,circOut:tx,backIn:nx,backInOut:sG,backOut:PO,anticipate:aG},tT=e=>{if(Array.isArray(e)){ex(e.length===4);const[t,n,r,i]=e;return yf(t,n,r,i)}else if(typeof e=="string")return lG[e];return e},rx=(e,t)=>n=>!!(mf(n)&&sK.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),IO=(e,t,n)=>r=>{if(!mf(r))return r;const[i,o,s,a]=r.match(Bg);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},uG=e=>ks(0,255,e),ov={...$a,transform:e=>Math.round(uG(e))},na={test:rx("rgb","red"),parse:IO("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ov.transform(e)+", "+ov.transform(t)+", "+ov.transform(n)+", "+qc(Hc.transform(r))+")"};function cG(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const yb={test:rx("#"),parse:cG,transform:na.transform},gl={test:rx("hsl","hue"),parse:IO("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Fi.transform(qc(t))+", "+Fi.transform(qc(n))+", "+qc(Hc.transform(r))+")"},Yn={test:e=>na.test(e)||yb.test(e)||gl.test(e),parse:e=>na.test(e)?na.parse(e):gl.test(e)?gl.parse(e):yb.parse(e),transform:e=>mf(e)?e:e.hasOwnProperty("red")?na.transform(e):gl.transform(e)},At=(e,t,n)=>-n*e+n*t+e;function sv(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function dG({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=sv(l,a,e+1/3),o=sv(l,a,e),s=sv(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const av=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},fG=[yb,na,gl],hG=e=>fG.find(t=>t.test(e));function nT(e){const t=hG(e);let n=t.parse(e);return t===gl&&(n=dG(n)),n}const AO=(e,t)=>{const n=nT(e),r=nT(t),i={...n};return o=>(i.red=av(n.red,r.red,o),i.green=av(n.green,r.green,o),i.blue=av(n.blue,r.blue,o),i.alpha=At(n.alpha,r.alpha,o),na.transform(i))};function pG(e){var t,n;return isNaN(e)&&mf(e)&&(((t=e.match(Bg))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(eO))===null||n===void 0?void 0:n.length)||0)>0}const RO={regex:iK,countKey:"Vars",token:"${v}",parse:nn},$O={regex:eO,countKey:"Colors",token:"${c}",parse:Yn.parse},OO={regex:Bg,countKey:"Numbers",token:"${n}",parse:$a.parse};function lv(e,{regex:t,countKey:n,token:r,parse:i}){const o=e.tokenised.match(t);o&&(e["num"+n]=o.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...o.map(i)))}function fm(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&lv(n,RO),lv(n,$O),lv(n,OO),n}function NO(e){return fm(e).values}function DO(e){const{values:t,numColors:n,numVars:r,tokenised:i}=fm(e),o=t.length;return s=>{let a=i;for(let l=0;l<o;l++)l<r?a=a.replace(RO.token,s[l]):l<r+n?a=a.replace($O.token,Yn.transform(s[l])):a=a.replace(OO.token,qc(s[l]));return a}}const mG=e=>typeof e=="number"?0:e;function gG(e){const t=NO(e);return DO(e)(t.map(mG))}const Ts={test:pG,parse:NO,createTransformer:DO,getAnimatableNone:gG},MO=(e,t)=>n=>`${n>0?t:e}`;function LO(e,t){return typeof e=="number"?n=>At(e,t,n):Yn.test(e)?AO(e,t):e.startsWith("var(")?MO(e,t):FO(e,t)}const jO=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,s)=>LO(o,t[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}},yG=(e,t)=>{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=LO(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},FO=(e,t)=>{const n=Ts.createTransformer(t),r=fm(e),i=fm(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?gs(jO(r.values,i.values),n):MO(e,t)},Rd=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},rT=(e,t)=>n=>At(e,t,n);function vG(e){return typeof e=="number"?rT:typeof e=="string"?Yn.test(e)?AO:FO:Array.isArray(e)?jO:typeof e=="object"?yG:rT}function bG(e,t,n){const r=[],i=n||vG(e[0]),o=e.length-1;for(let s=0;s<o;s++){let a=i(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||nn:t;a=gs(l,a)}r.push(a)}return r}function zO(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(ex(o===t.length),o===1)return()=>t[0];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=bG(t,r,i),a=s.length,l=u=>{let c=0;if(a>1)for(;c<e.length-2&&!(u<e[c+1]);c++);const d=Rd(e[c],e[c+1],u);return s[c](d)};return n?u=>l(ks(e[0],e[o-1],u)):l}function wG(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Rd(0,t,r);e.push(At(n,1,i))}}function SG(e){const t=[0];return wG(t,e.length-1),t}function xG(e,t){return e.map(n=>n*t)}function _G(e,t){return e.map(()=>t||CO).splice(0,e.length-1)}function hm({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=iG(r)?r.map(tT):tT(r),o={done:!1,value:t[0]},s=xG(n&&n.length===t.length?n:SG(t),e),a=zO(s,t,{ease:Array.isArray(i)?i:_G(t,i)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}function VO(e,t){return t?e*(1e3/t):0}const CG=5;function BO(e,t,n){const r=Math.max(t-CG,0);return VO(n-e(r),t-r)}const uv=.001,EG=.01,iT=10,kG=.05,TG=1;function PG({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;QK(e<=ys(iT));let s=1-t;s=ks(kG,TG,s),e=ks(EG,iT,mo(e)),s<1?(i=u=>{const c=u*s,d=c*e,f=c-n,h=vb(u,s),p=Math.exp(-d);return uv-f/h*p},o=u=>{const d=u*s*e,f=d*n+n,h=Math.pow(s,2)*Math.pow(u,2)*e,p=Math.exp(-d),y=vb(Math.pow(u,2),s);return(-i(u)+uv>0?-1:1)*((f-h)*p)/y}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-uv+c*d},o=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=AG(i,o,a);if(e=ys(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const IG=12;function AG(e,t,n){let r=n;for(let i=1;i<IG;i++)r=r-e(r)/t(r);return r}function vb(e,t){return e*Math.sqrt(1-t*t)}const RG=["duration","bounce"],$G=["stiffness","damping","mass"];function oT(e,t){return t.some(n=>e[n]!==void 0)}function OG(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!oT(e,$G)&&oT(e,RG)){const n=PG(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function UO({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:a,damping:l,mass:u,velocity:c,duration:d,isResolvedFromDuration:f}=OG(r),h=c?-mo(c):0,p=l/(2*Math.sqrt(a*u)),y=o-i,S=mo(Math.sqrt(a/u)),v=Math.abs(y)<5;n||(n=v?.01:2),t||(t=v?.005:.5);let m;if(p<1){const b=vb(S,p);m=C=>{const k=Math.exp(-p*S*C);return o-k*((h+p*S*y)/b*Math.sin(b*C)+y*Math.cos(b*C))}}else if(p===1)m=b=>o-Math.exp(-S*b)*(y+(h+S*y)*b);else{const b=S*Math.sqrt(p*p-1);m=C=>{const k=Math.exp(-p*S*C),x=Math.min(b*C,300);return o-k*((h+p*S*y)*Math.sinh(x)+b*y*Math.cosh(x))/b}}return{calculatedDuration:f&&d||null,next:b=>{const C=m(b);if(f)s.done=b>=d;else{let k=h;b!==0&&(p<1?k=BO(m,b,C):k=0);const x=Math.abs(k)<=n,E=Math.abs(o-C)<=t;s.done=x&&E}return s.value=s.done?o:C,s}}}function sT({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},h=R=>a!==void 0&&R<a||l!==void 0&&R>l,p=R=>a===void 0?l:l===void 0||Math.abs(a-R)<Math.abs(l-R)?a:l;let y=n*t;const S=d+y,v=s===void 0?S:s(S);v!==S&&(y=v-d);const m=R=>-y*Math.exp(-R/r),b=R=>v+m(R),C=R=>{const M=m(R),L=b(R);f.done=Math.abs(M)<=u,f.value=f.done?v:L};let k,x;const E=R=>{h(f.value)&&(k=R,x=UO({keyframes:[f.value,p(f.value)],velocity:BO(b,R,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:R=>{let M=!1;return!x&&k===void 0&&(M=!0,C(R),E(R)),k!==void 0&&R>k?x.next(R-k):(!M&&C(R),f)}}}const NG=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Et.update(t,!0),stop:()=>_o(t),now:()=>Pt.isProcessing?Pt.timestamp:performance.now()}},aT=2e4;function lT(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<aT;)t+=n,r=e.next(t);return t>=aT?1/0:t}const DG={decay:sT,inertia:sT,tween:hm,keyframes:hm,spring:UO};function pm({autoplay:e=!0,delay:t=0,driver:n=NG,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:d,...f}){let h=1,p=!1,y,S;const v=()=>{y&&y(),S=new Promise(ue=>{y=ue})};v();let m;const b=DG[i]||hm;let C;b!==hm&&typeof r[0]!="number"&&(C=zO([0,100],r,{clamp:!1}),r=[0,100]);const k=b({...f,keyframes:r});let x;a==="mirror"&&(x=b({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let E="idle",R=null,M=null,L=null;k.calculatedDuration===null&&o&&(k.calculatedDuration=lT(k));const{calculatedDuration:ne}=k;let Y=1/0,Z=1/0;ne!==null&&(Y=ne+s,Z=Y*(o+1)-s);let ie=0;const he=ue=>{if(M===null)return;h>0&&(M=Math.min(M,ue)),R!==null?ie=R:ie=(ue-M)*h;const ke=ie-t,Se=ke<0;ie=Math.max(ke,0),E==="finished"&&R===null&&(ie=Z);let Te=ie,yt=k;if(o){const Gn=ie/Y;let Xe=Math.floor(Gn),lt=Gn%1;!lt&&Gn>=1&&(lt=1),lt===1&&Xe--,Xe=Math.min(Xe,o+1);const Qn=!!(Xe%2);Qn&&(a==="reverse"?(lt=1-lt,s&&(lt-=s/Y)):a==="mirror"&&(yt=x));let Do=ks(0,1,lt);ie>Z&&(Do=a==="reverse"&&Qn?1:0),Te=Do*Y}const $e=Se?{done:!1,value:r[0]}:yt.next(Te);C&&($e.value=C($e.value));let{done:Bt}=$e;!Se&&ne!==null&&(Bt=ie>=Z);const Kn=R===null&&(E==="finished"||E==="running"&&Bt||h<0&&ie<=0);return d&&d($e.value),Kn&&V(),$e},Ce=()=>{m&&m.stop(),m=void 0},G=()=>{E="idle",Ce(),v(),M=L=null},V=()=>{E="finished",c&&c(),Ce(),v()},ee=()=>{if(p)return;m||(m=n(he));const ue=m.now();l&&l(),R!==null?M=ue-R:(!M||E==="finished")&&(M=ue),L=M,R=null,E="running",m.start()};e&&ee();const se={then(ue,ke){return S.then(ue,ke)},get time(){return mo(ie)},set time(ue){ue=ys(ue),ie=ue,R!==null||!m||h===0?R=ue:M=m.now()-ue/h},get duration(){const ue=k.calculatedDuration===null?lT(k):k.calculatedDuration;return mo(ue)},get speed(){return h},set speed(ue){ue===h||!m||(h=ue,se.time=mo(ie))},get state(){return E},play:ee,pause:()=>{E="paused",R=ie},stop:()=>{p=!0,E!=="idle"&&(E="idle",u&&u(),G())},cancel:()=>{L!==null&&he(L),G()},complete:()=>{E="finished"},sample:ue=>(M=0,he(ue))};return se}const MG=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Th=10,LG=2e4,jG=(e,t)=>t.type==="spring"||e==="backgroundColor"||!bO(t.ease);function FG(e,t,{onUpdate:n,onComplete:r,...i}){if(!(xO.waapi()&&MG.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,a,l;const u=()=>{l=new Promise(v=>{a=v})};u();let{keyframes:c,duration:d=300,ease:f,times:h}=i;if(jG(t,i)){const v=pm({...i,repeat:0,delay:0});let m={done:!1,value:c[0]};const b=[];let C=0;for(;!m.done&&C<LG;)m=v.sample(C),b.push(m.value),C+=Th;h=void 0,c=b,d=C-Th,f="linear"}const p=XK(e.owner.current,t,c,{...i,duration:d,ease:f,times:h}),y=()=>p.cancel(),S=()=>{Et.update(y),a(),u()};return p.onfinish=()=>{e.set(JK(c,i)),r&&r(),S()},{then(v,m){return l.then(v,m)},get time(){return mo(p.currentTime||0)},set time(v){p.currentTime=ys(v)},get speed(){return p.playbackRate},set speed(v){p.playbackRate=v},get duration(){return mo(d)},play:()=>{s||(p.play(),_o(y))},pause:()=>p.pause(),stop:()=>{if(s=!0,p.playState==="idle")return;const{currentTime:v}=p;if(v){const m=pm({...i,autoplay:!1});e.setWithVelocity(m.sample(v-Th).value,m.sample(v).value,Th)}S()},complete:()=>p.finish(),cancel:S}}function zG({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:nn,pause:nn,stop:nn,then:o=>(o(),Promise.resolve()),cancel:nn,complete:nn});return t?pm({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const VG={type:"spring",stiffness:500,damping:25,restSpeed:10},BG=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),UG={type:"keyframes",duration:.8},WG={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},HG=(e,{keyframes:t})=>t.length>2?UG:Ra.has(e)?e.startsWith("scale")?BG(t[1]):VG:WG,bb=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Ts.test(t)||t==="0")&&!t.startsWith("url(")),qG=new Set(["brightness","contrast","saturate","opacity"]);function KG(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Bg)||[];if(!r)return e;const i=n.replace(r,"");let o=qG.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const GG=/([a-z-]*)\(.*?\)/g,wb={...Ts,getAnimatableNone:e=>{const t=e.match(GG);return t?t.map(KG).join(" "):e}},QG={...tO,color:Yn,backgroundColor:Yn,outlineColor:Yn,fill:Yn,stroke:Yn,borderColor:Yn,borderTopColor:Yn,borderRightColor:Yn,borderBottomColor:Yn,borderLeftColor:Yn,filter:wb,WebkitFilter:wb},ix=e=>QG[e];function WO(e,t){let n=ix(e);return n!==wb&&(n=Ts),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const HO=e=>/^0[^.\s]+$/.test(e);function YG(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||HO(e)}function XG(e,t,n,r){const i=bb(t,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const s=r.from!==void 0?r.from:e.get();let a;const l=[];for(let u=0;u<o.length;u++)o[u]===null&&(o[u]=u===0?s:o[u-1]),YG(o[u])&&l.push(u),typeof o[u]=="string"&&o[u]!=="none"&&o[u]!=="0"&&(a=o[u]);if(i&&l.length&&a)for(let u=0;u<l.length;u++){const c=l[u];o[c]=WO(t,a)}return o}function JG({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}function qO(e,t){return e[t]||e.default||e}const ox=(e,t,n,r={})=>i=>{const o=qO(r,e)||{},s=o.delay||r.delay||0;let{elapsed:a=0}=r;a=a-ys(s);const l=XG(t,e,n,o),u=l[0],c=l[l.length-1],d=bb(e,u),f=bb(e,c);let h={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:p=>{t.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(JG(o)||(h={...h,...HG(e,h)}),h.duration&&(h.duration=ys(h.duration)),h.repeatDelay&&(h.repeatDelay=ys(h.repeatDelay)),!d||!f||YK.current||o.type===!1)return zG(h);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=FG(t,e,h);if(p)return p}return pm(h)};function mm(e){return!!(gr(e)&&e.add)}const ZG=e=>/^\-?\d*\.?\d+$/.test(e);function sx(e,t){e.indexOf(t)===-1&&e.push(t)}function ax(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class lx{constructor(){this.subscriptions=[]}add(t){return sx(this.subscriptions,t),()=>ax(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const eQ=e=>!isNaN(parseFloat(e));class tQ{constructor(t,n={}){this.version="10.12.16",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:o,timestamp:s}=Pt;this.lastUpdated!==s&&(this.timeDelta=o,this.lastUpdated=s,Et.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Et.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=eQ(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new lx);const r=this.events[t].add(n);return t==="change"?()=>{r(),Et.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?VO(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ru(e,t){return new tQ(e,t)}const KO=e=>t=>t.test(e),nQ={test:e=>e==="auto",parse:e=>e},GO=[$a,ye,Fi,Uo,lK,aK,nQ],tc=e=>GO.find(KO(e)),rQ=[...GO,Yn,Ts],iQ=e=>rQ.find(KO(e));function oQ(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ru(n))}function sQ(e,t){const n=Hg(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const s in o){const a=xK(o[s]);oQ(e,s,a)}}function aQ(e,t,n){var r,i;const o=Object.keys(t).filter(a=>!e.hasValue(a)),s=o.length;if(s)for(let a=0;a<s;a++){const l=o[a],u=t[l];let c=null;Array.isArray(u)&&(c=u[0]),c===null&&(c=(i=(r=n[l])!==null&&r!==void 0?r:e.readValue(l))!==null&&i!==void 0?i:t[l]),c!=null&&(typeof c=="string"&&(ZG(c)||HO(c))?c=parseFloat(c):!iQ(c)&&Ts.test(u)&&(c=WO(l,u)),e.addValue(l,ru(c,{owner:e})),n[l]===void 0&&(n[l]=c),c!==null&&e.setBaseTarget(l,c))}}function lQ(e,t){return t?(t[e]||t.default||t).from:void 0}function uQ(e,t,n){const r={};for(const i in e){const o=lQ(i,t);if(o!==void 0)r[i]=o;else{const s=n.getValue(i);s&&(r[i]=s.get())}}return r}function cQ({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function QO(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:s,...a}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");r&&(o=r);const u=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in a){const f=e.getValue(d),h=a[d];if(!f||h===void 0||c&&cQ(c,d))continue;const p={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!f.hasAnimated){const S=e.getProps()[GK];S&&(p.elapsed=window.HandoffAppearAnimations(S,d,f,Et))}f.start(ox(d,f,h,e.shouldReduceMotion&&Ra.has(d)?{type:!1}:p));const y=f.animation;mm(l)&&(l.add(d),y.then(()=>l.remove(d))),u.push(y)}return s&&Promise.all(u).then(()=>{s&&sQ(e,s)}),u}function Sb(e,t,n={}){const r=Hg(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(QO(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=i;return dQ(e,t,u+l,c,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,s]:[s,o];return l().then(()=>u())}else return Promise.all([o(),s(n.delay)])}function dQ(e,t,n=0,r=0,i=1,o){const s=[],a=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(fQ).forEach((u,c)=>{u.notify("AnimationStart",t),s.push(Sb(u,t,{...o,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function fQ(e,t){return e.sortNodePosition(t)}function hQ(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Sb(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Sb(e,t,n);else{const i=typeof t=="function"?Hg(e,t,n.custom):t;r=Promise.all(QO(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const pQ=[...US].reverse(),mQ=US.length;function gQ(e){return t=>Promise.all(t.map(({animation:n,options:r})=>hQ(e,n,r)))}function yQ(e){let t=gQ(e);const n=bQ();let r=!0;const i=(l,u)=>{const c=Hg(e,u);if(c){const{transition:d,transitionEnd:f,...h}=c;l={...l,...h,...f}}return l};function o(l){t=l(e)}function s(l,u){const c=e.getProps(),d=e.getVariantContext(!0)||{},f=[],h=new Set;let p={},y=1/0;for(let v=0;v<mQ;v++){const m=pQ[v],b=n[m],C=c[m]!==void 0?c[m]:d[m],k=Pd(C),x=m===u?b.isActive:null;x===!1&&(y=v);let E=C===d[m]&&C!==c[m]&&k;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),b.protectedKeys={...p},!b.isActive&&x===null||!C&&!b.prevProp||zg(C)||typeof C=="boolean")continue;const R=vQ(b.prevProp,C);let M=R||m===u&&b.isActive&&!E&&k||v>y&&k;const L=Array.isArray(C)?C:[C];let ne=L.reduce(i,{});x===!1&&(ne={});const{prevResolvedValues:Y={}}=b,Z={...Y,...ne},ie=he=>{M=!0,h.delete(he),b.needsAnimating[he]=!0};for(const he in Z){const Ce=ne[he],G=Y[he];p.hasOwnProperty(he)||(Ce!==G?dm(Ce)&&dm(G)?!yO(Ce,G)||R?ie(he):b.protectedKeys[he]=!0:Ce!==void 0?ie(he):h.add(he):Ce!==void 0&&h.has(he)?ie(he):b.protectedKeys[he]=!0)}b.prevProp=C,b.prevResolvedValues=ne,b.isActive&&(p={...p,...ne}),r&&e.blockInitialAnimation&&(M=!1),M&&!E&&f.push(...L.map(he=>({animation:he,options:{type:m,...l}})))}if(h.size){const v={};h.forEach(m=>{const b=e.getBaseTarget(m);b!==void 0&&(v[m]=b)}),f.push({animation:v})}let S=!!f.length;return r&&c.initial===!1&&!e.manuallyAnimateOnMount&&(S=!1),r=!1,S?t(f):Promise.resolve()}function a(l,u,c){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(l,u)}),n[l].isActive=u;const f=s(c,l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n}}function vQ(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!yO(t,e):!1}function Bs(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function bQ(){return{animate:Bs(!0),whileInView:Bs(),whileHover:Bs(),whileTap:Bs(),whileDrag:Bs(),whileFocus:Bs(),exit:Bs()}}class wQ extends Ls{constructor(t){super(t),t.animationState||(t.animationState=yQ(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),zg(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let SQ=0;class xQ extends Ls{constructor(){super(...arguments),this.id=SQ++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const _Q={animation:{Feature:wQ},exit:{Feature:xQ}},uT=(e,t)=>Math.abs(e-t);function CQ(e,t){const n=uT(e.x,t.x),r=uT(e.y,t.y);return Math.sqrt(n**2+r**2)}class YO{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=dv(this.lastMoveEventInfo,this.history),c=this.startEvent!==null,d=CQ(u.offset,{x:0,y:0})>=3;if(!c&&!d)return;const{point:f}=u,{timestamp:h}=Pt;this.history.push({...f,timestamp:h});const{onStart:p,onMove:y}=this.handlers;c||(p&&p(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,u)},this.handlePointerMove=(u,c)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=cv(c,this.transformPagePoint),Et.update(this.updatePoint,!0)},this.handlePointerUp=(u,c)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:d,onSessionEnd:f}=this.handlers,h=dv(u.type==="pointercancel"?this.lastMoveEventInfo:cv(c,this.transformPagePoint),this.history);this.startEvent&&d&&d(u,h),f&&f(u,h)},!dO(t))return;this.handlers=n,this.transformPagePoint=r;const i=Ug(t),o=cv(i,this.transformPagePoint),{point:s}=o,{timestamp:a}=Pt;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=n;l&&l(t,dv(o,this.history)),this.removeListeners=gs(po(window,"pointermove",this.handlePointerMove),po(window,"pointerup",this.handlePointerUp),po(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),_o(this.updatePoint)}}function cv(e,t){return t?{point:t(e.point)}:e}function cT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function dv({point:e},t){return{point:e,delta:cT(e,XO(t)),offset:cT(e,EQ(t)),velocity:kQ(t,.1)}}function EQ(e){return e[0]}function XO(e){return e[e.length-1]}function kQ(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=XO(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ys(t)));)n--;if(!r)return{x:0,y:0};const o=mo(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Tr(e){return e.max-e.min}function xb(e,t=0,n=.01){return Math.abs(e-t)<=n}function dT(e,t,n,r=.5){e.origin=r,e.originPoint=At(t.min,t.max,e.origin),e.scale=Tr(n)/Tr(t),(xb(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=At(n.min,n.max,e.origin)-e.originPoint,(xb(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Kc(e,t,n,r){dT(e.x,t.x,n.x,r?r.originX:void 0),dT(e.y,t.y,n.y,r?r.originY:void 0)}function fT(e,t,n){e.min=n.min+t.min,e.max=e.min+Tr(t)}function TQ(e,t,n){fT(e.x,t.x,n.x),fT(e.y,t.y,n.y)}function hT(e,t,n){e.min=t.min-n.min,e.max=e.min+Tr(t)}function Gc(e,t,n){hT(e.x,t.x,n.x),hT(e.y,t.y,n.y)}function PQ(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?At(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?At(n,e,r.max):Math.min(e,n)),e}function pT(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function IQ(e,{top:t,left:n,bottom:r,right:i}){return{x:pT(e.x,n,i),y:pT(e.y,t,r)}}function mT(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function AQ(e,t){return{x:mT(e.x,t.x),y:mT(e.y,t.y)}}function RQ(e,t){let n=.5;const r=Tr(e),i=Tr(t);return i>r?n=Rd(t.min,t.max-r,e.min):r>i&&(n=Rd(e.min,e.max-i,t.min)),ks(0,1,n)}function $Q(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const _b=.35;function OQ(e=_b){return e===!1?e=0:e===!0&&(e=_b),{x:gT(e,"left","right"),y:gT(e,"top","bottom")}}function gT(e,t,n){return{min:yT(e,t),max:yT(e,n)}}function yT(e,t){return typeof e=="number"?e:e[t]||0}const vT=()=>({translate:0,scale:1,origin:0,originPoint:0}),yl=()=>({x:vT(),y:vT()}),bT=()=>({min:0,max:0}),Gt=()=>({x:bT(),y:bT()});function xi(e){return[e("x"),e("y")]}function JO({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function NQ({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function DQ(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function fv(e){return e===void 0||e===1}function Cb({scale:e,scaleX:t,scaleY:n}){return!fv(e)||!fv(t)||!fv(n)}function Hs(e){return Cb(e)||ZO(e)||e.z||e.rotate||e.rotateX||e.rotateY}function ZO(e){return wT(e.x)||wT(e.y)}function wT(e){return e&&e!=="0%"}function gm(e,t,n){const r=e-n,i=t*r;return n+i}function ST(e,t,n,r,i){return i!==void 0&&(e=gm(e,i,r)),gm(e,n,r)+t}function Eb(e,t=0,n=1,r,i){e.min=ST(e.min,t,n,r,i),e.max=ST(e.max,t,n,r,i)}function e5(e,{x:t,y:n}){Eb(e.x,t.translate,t.scale,t.originPoint),Eb(e.y,n.translate,n.scale,n.originPoint)}function MQ(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,s;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const l=o.instance;l&&l.style&&l.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&vl(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,e5(e,s)),r&&Hs(o.latestValues)&&vl(e,o.latestValues))}t.x=xT(t.x),t.y=xT(t.y)}function xT(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function qo(e,t){e.min=e.min+t,e.max=e.max+t}function _T(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,s=At(e.min,e.max,o);Eb(e,t[n],t[r],s,t.scale)}const LQ=["x","scaleX","originX"],jQ=["y","scaleY","originY"];function vl(e,t){_T(e.x,t,LQ),_T(e.y,t,jQ)}function t5(e,t){return JO(DQ(e.getBoundingClientRect(),t))}function FQ(e,t,n){const r=t5(e,n),{scroll:i}=t;return i&&(qo(r.x,i.offset.x),qo(r.y,i.offset.y)),r}const zQ=new WeakMap;class VQ{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Gt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=l=>{this.stopAnimation(),n&&this.snapToCursor(Ug(l,"page").point)},o=(l,u)=>{const{drag:c,dragPropagation:d,onDragStart:f}=this.getProps();if(c&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=hO(c),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),xi(p=>{let y=this.getAxisMotionValue(p).get()||0;if(Fi.test(y)){const{projection:S}=this.visualElement;if(S&&S.layout){const v=S.layout.layoutBox[p];v&&(y=Tr(v)*(parseFloat(y)/100))}}this.originPoint[p]=y}),f&&Et.update(()=>f(l,u),!1,!0);const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},s=(l,u)=>{const{dragPropagation:c,dragDirectionLock:d,onDirectionLock:f,onDrag:h}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:p}=u;if(d&&this.currentDirection===null){this.currentDirection=BQ(p),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",u.point,p),this.updateAxis("y",u.point,p),this.visualElement.render(),h&&h(l,u)},a=(l,u)=>this.stop(l,u);this.panSession=new YO(t,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&Et.update(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Ph(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=PQ(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&ml(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=IQ(r.layoutBox,t):this.constraints=!1,this.elastic=OQ(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&xi(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=$Q(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ml(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=FQ(r,i.root,this.visualElement.getTransformPagePoint());let s=AQ(i.layout.layoutBox,o);if(n){const a=n(NQ(s));this.hasMutatedConstraints=!!a,a&&(s=JO(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=xi(c=>{if(!Ph(c,n,this.currentDirection))return;let d=l&&l[c]||{};s&&(d={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(ox(t,r,0,n))}stopAnimation(){xi(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){xi(n=>{const{drag:r}=this.getProps();if(!Ph(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(t[n]-At(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ml(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};xi(s=>{const a=this.getAxisMotionValue(s);if(a){const l=a.get();i[s]=RQ({min:l,max:l},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),xi(s=>{if(!Ph(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];a.set(At(l,u,i[s]))})}addListeners(){if(!this.visualElement.current)return;zQ.set(this.visualElement,this);const t=this.visualElement.current,n=po(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ml(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const s=ao(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(xi(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=_b,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function Ph(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function BQ(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class UQ extends Ls{constructor(t){super(t),this.removeGroupControls=nn,this.removeListeners=nn,this.controls=new VQ(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||nn}unmount(){this.removeGroupControls(),this.removeListeners()}}const CT=e=>(t,n)=>{e&&Et.update(()=>e(t,n))};class WQ extends Ls{constructor(){super(...arguments),this.removePointerDownListener=nn}onPointerDown(t){this.session=new YO(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:CT(t),onStart:CT(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&Et.update(()=>i(o,s))}}}mount(){this.removePointerDownListener=po(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function HQ(){const e=w.useContext(hf);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=w.useId();return w.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function qQ(){return KQ(w.useContext(hf))}function KQ(e){return e===null?!0:e.isPresent}const pp={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ET(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const nc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ye.test(e))e=parseFloat(e);else return e;const n=ET(e,t.target.x),r=ET(e,t.target.y);return`${n}% ${r}%`}},GQ={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ts.parse(e);if(i.length>5)return r;const o=Ts.createTransformer(e),s=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+s]/=a,i[1+s]/=l;const u=At(a,l,.5);return typeof i[2+s]=="number"&&(i[2+s]/=u),typeof i[3+s]=="number"&&(i[3+s]/=u),o(i)}};class QQ extends ur.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;eK(YQ),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),pp.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,s=r.projection;return s&&(s.isPresent=o,i||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||Et.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function n5(e){const[t,n]=HQ(),r=w.useContext(HS);return ur.createElement(QQ,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(Y$),isPresent:t,safeToRemove:n})}const YQ={borderRadius:{...nc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:nc,borderTopRightRadius:nc,borderBottomLeftRadius:nc,borderBottomRightRadius:nc,boxShadow:GQ},r5=["TopLeft","TopRight","BottomLeft","BottomRight"],XQ=r5.length,kT=e=>typeof e=="string"?parseFloat(e):e,TT=e=>typeof e=="number"||ye.test(e);function JQ(e,t,n,r,i,o){i?(e.opacity=At(0,n.opacity!==void 0?n.opacity:1,ZQ(r)),e.opacityExit=At(t.opacity!==void 0?t.opacity:1,0,eY(r))):o&&(e.opacity=At(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<XQ;s++){const a=`border${r5[s]}Radius`;let l=PT(t,a),u=PT(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||TT(l)===TT(u)?(e[a]=Math.max(At(kT(l),kT(u),r),0),(Fi.test(u)||Fi.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=At(t.rotate||0,n.rotate||0,r))}function PT(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const ZQ=i5(0,.5,tx),eY=i5(.5,.95,nn);function i5(e,t,n){return r=>r<e?0:r>t?1:n(Rd(e,t,r))}function IT(e,t){e.min=t.min,e.max=t.max}function Fr(e,t){IT(e.x,t.x),IT(e.y,t.y)}function AT(e,t,n,r,i){return e-=t,e=gm(e,1/n,r),i!==void 0&&(e=gm(e,1/i,r)),e}function tY(e,t=0,n=1,r=.5,i,o=e,s=e){if(Fi.test(t)&&(t=parseFloat(t),t=At(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=At(o.min,o.max,r);e===o&&(a-=t),e.min=AT(e.min,t,n,a,i),e.max=AT(e.max,t,n,a,i)}function RT(e,t,[n,r,i],o,s){tY(e,t[n],t[r],t[i],t.scale,o,s)}const nY=["x","scaleX","originX"],rY=["y","scaleY","originY"];function $T(e,t,n,r){RT(e.x,t,nY,n?n.x:void 0,r?r.x:void 0),RT(e.y,t,rY,n?n.y:void 0,r?r.y:void 0)}function OT(e){return e.translate===0&&e.scale===1}function o5(e){return OT(e.x)&&OT(e.y)}function kb(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function NT(e){return Tr(e.x)/Tr(e.y)}class iY{constructor(){this.members=[]}add(t){sx(this.members,t),t.scheduleRender()}remove(t){if(ax(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function DT(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:c}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),c&&(r+=`rotateY(${c}deg) `)}const s=e.x.scale*t.x,a=e.y.scale*t.y;return(s!==1||a!==1)&&(r+=`scale(${s}, ${a})`),r||"none"}const oY=(e,t)=>e.depth-t.depth;class sY{constructor(){this.children=[],this.isDirty=!1}add(t){sx(this.children,t),this.isDirty=!0}remove(t){ax(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(oY),this.isDirty=!1,this.children.forEach(t)}}function aY(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(_o(r),e(o-t))};return Et.read(r,!0),()=>_o(r)}function lY(e){window.MotionDebug&&window.MotionDebug.record(e)}function uY(e){return e instanceof SVGElement&&e.tagName!=="svg"}function cY(e,t,n){const r=gr(e)?e:ru(e);return r.start(ox("",r,t,n)),r.animation}const MT=["","X","Y","Z"],LT=1e3;let dY=0;const qs={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function s5({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=t==null?void 0:t()){this.id=dY++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{qs.totalNodes=qs.resolvedTargetDeltas=qs.recalculatedProjection=0,this.nodes.forEach(pY),this.nodes.forEach(bY),this.nodes.forEach(wY),this.nodes.forEach(mY),lY(qs)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new sY)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new lx),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=uY(s),this.instance=s;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=aY(f,250),pp.hasAnimatedSinceResize&&(pp.hasAnimatedSinceResize=!1,this.nodes.forEach(FT))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||c.getDefaultTransition()||EY,{onLayoutAnimationStart:S,onLayoutAnimationComplete:v}=c.getProps(),m=!this.targetLayout||!kb(this.targetLayout,p)||h,b=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||b||f&&(m||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,b);const C={...qO(y,"layout"),onPlay:S,onComplete:v};(c.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C)}else f||FT(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,_o(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(SY),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(jT);return}this.isUpdating||this.nodes.forEach(yY),this.isUpdating=!1,this.nodes.forEach(vY),this.nodes.forEach(fY),this.nodes.forEach(hY),this.clearAllSnapshots();const a=performance.now();Pt.delta=ks(0,1e3/60,a-Pt.timestamp),Pt.timestamp=a,Pt.isProcessing=!0,Ol.update.process(Pt),Ol.preRender.process(Pt),Ol.render.process(Pt),Pt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(gY),this.sharedNodes.forEach(xY)}scheduleUpdateProjection(){Et.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Et.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Gt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!o5(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;s&&(a||Hs(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),kY(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return Gt();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(qo(a.x,l.offset.x),qo(a.y,l.offset.y)),a}removeElementScroll(s){const a=Gt();Fr(a,s);for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:d}=u;if(u!==this.root&&c&&d.layoutScroll){if(c.isRoot){Fr(a,s);const{scroll:f}=this.root;f&&(qo(a.x,-f.offset.x),qo(a.y,-f.offset.y))}qo(a.x,c.offset.x),qo(a.y,c.offset.y)}}return a}applyTransform(s,a=!1){const l=Gt();Fr(l,s);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&vl(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Hs(c.latestValues)&&vl(l,c.latestValues)}return Hs(this.latestValues)&&vl(l,this.latestValues),l}removeTransform(s){const a=Gt();Fr(a,s);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Hs(u.latestValues))continue;Cb(u.latestValues)&&u.updateSnapshot();const c=Gt(),d=u.measurePageBox();Fr(c,d),$T(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Hs(this.latestValues)&&$T(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Pt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(s||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Pt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Gt(),this.relativeTargetOrigin=Gt(),Gc(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Fr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Gt(),this.targetWithTransforms=Gt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),TQ(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Fr(this.target,this.layout.layoutBox),e5(this.target,this.targetDelta)):Fr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Gt(),this.relativeTargetOrigin=Gt(),Gc(this.relativeTargetOrigin,this.target,h.target),Fr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}qs.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Cb(this.parent.latestValues)||ZO(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Pt.timestamp&&(u=!1),u)return;const{layout:c,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||d))return;Fr(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;MQ(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox);const{target:p}=a;if(!p){this.projectionTransform&&(this.projectionDelta=yl(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=yl(),this.projectionDeltaWithTransform=yl());const y=this.projectionTransform;Kc(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=DT(this.projectionDelta,this.treeScale),(this.projectionTransform!==y||this.treeScale.x!==f||this.treeScale.y!==h)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),qs.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=yl();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Gt(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,y=h!==p,S=this.getStack(),v=!S||S.members.length<=1,m=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(CY));this.animationProgress=0;let b;this.mixTargetDelta=C=>{const k=C/1e3;zT(d.x,s.x,k),zT(d.y,s.y,k),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Gc(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),_Y(this.relativeTarget,this.relativeTargetOrigin,f,k),b&&kb(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Gt()),Fr(b,this.relativeTarget)),y&&(this.animationValues=c,JQ(c,u,this.latestValues,k,m,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(_o(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Et.update(()=>{pp.hasAnimatedSinceResize=!0,this.currentAnimation=cY(0,LT,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(LT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=s;if(!(!a||!l||!u)){if(this!==s&&this.layout&&u&&a5(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Gt();const d=Tr(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=Tr(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}Fr(a,l),vl(a,c),Kc(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new iY),this.sharedNodes.get(s).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const u={};for(let c=0;c<MT.length;c++){const d="rotate"+MT[c];l[d]&&(u[d]=l[d],s.setStaticValue(d,0))}s.render();for(const c in u)s.setStaticValue(c,u[c]);s.scheduleRender()}getProjectionStyles(s={}){var a,l;const u={};if(!this.instance||this.isSVG)return u;if(this.isVisible)u.visibility="";else return{visibility:"hidden"};const c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=hp(s.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=hp(s.pointerEvents)||""),this.hasProjected&&!Hs(this.latestValues)&&(y.transform=c?c({},""):"none",this.hasProjected=!1),y}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),u.transform=DT(this.projectionDeltaWithTransform,this.treeScale,f),c&&(u.transform=c(f,u.transform));const{x:h,y:p}=this.projectionDelta;u.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,d.animationValues?u.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const y in um){if(f[y]===void 0)continue;const{correct:S,applyTo:v}=um[y],m=u.transform==="none"?f[y]:S(f[y],d);if(v){const b=v.length;for(let C=0;C<b;C++)u[v[C]]=m}else u[y]=m}return this.options.layoutId&&(u.pointerEvents=d===this?hp(s.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(jT),this.root.sharedNodes.clear()}}}function fY(e){e.updateLayout()}function hY(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,s=n.source!==e.layout.source;o==="size"?xi(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],h=Tr(f);f.min=r[d].min,f.max=f.min+h}):a5(o,n.layoutBox,r)&&xi(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],h=Tr(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=yl();Kc(a,r,n.layoutBox);const l=yl();s?Kc(l,e.applyTransform(i,!0),n.measuredBox):Kc(l,r,n.layoutBox);const u=!o5(a);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=Gt();Gc(p,n.layoutBox,f.layoutBox);const y=Gt();Gc(y,r,h.layoutBox),kb(p,y)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function pY(e){qs.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function mY(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function gY(e){e.clearSnapshot()}function jT(e){e.clearMeasurements()}function yY(e){e.isLayoutDirty=!1}function vY(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function FT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function bY(e){e.resolveTargetDelta()}function wY(e){e.calcProjection()}function SY(e){e.resetRotation()}function xY(e){e.removeLeadSnapshot()}function zT(e,t,n){e.translate=At(t.translate,0,n),e.scale=At(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function VT(e,t,n,r){e.min=At(t.min,n.min,r),e.max=At(t.max,n.max,r)}function _Y(e,t,n,r){VT(e.x,t.x,n.x,r),VT(e.y,t.y,n.y,r)}function CY(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const EY={duration:.45,ease:[.4,0,.1,1]};function BT(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function kY(e){BT(e.x),BT(e.y)}function a5(e,t,n){return e==="position"||e==="preserve-aspect"&&!xb(NT(t),NT(n),.2)}const TY=s5({attachResizeListener:(e,t)=>ao(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),hv={current:void 0},l5=s5({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!hv.current){const e=new TY({});e.mount(window),e.setOptions({layoutScroll:!0}),hv.current=e}return hv.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),PY={pan:{Feature:WQ},drag:{Feature:UQ,ProjectionNode:l5,MeasureLayout:n5}},IY=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function AY(e){const t=IY.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function Tb(e,t,n=1){const[r,i]=AY(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():pb(i)?Tb(i,t,n+1):i}function RY(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!pb(o))return;const s=Tb(o,r);s&&i.set(s)});for(const i in t){const o=t[i];if(!pb(o))continue;const s=Tb(o,r);s&&(t[i]=s,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const $Y=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),u5=e=>$Y.has(e),OY=e=>Object.keys(e).some(u5),UT=e=>e===$a||e===ye,WT=(e,t)=>parseFloat(e.split(", ")[t]),HT=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return WT(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?WT(o[1],e):0}},NY=new Set(["x","y","z"]),DY=pf.filter(e=>!NY.has(e));function MY(e){const t=[];return DY.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const qT={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:HT(4,13),y:HT(5,14)},LY=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:s}=o,a={};s==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{a[u]=qT[u](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const c=t.getValue(u);c&&c.jump(a[u]),e[u]=qT[u](l,o)}),e},jY=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(u5);let o=[],s=!1;const a=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let c=n[l],d=tc(c);const f=t[l];let h;if(dm(f)){const p=f.length,y=f[0]===null?1:0;c=f[y],d=tc(c);for(let S=y;S<p&&f[S]!==null;S++)h?ex(tc(f[S])===h):h=tc(f[S])}else h=tc(f);if(d!==h)if(UT(d)&&UT(h)){const p=u.get();typeof p=="string"&&u.set(parseFloat(p)),typeof f=="string"?t[l]=parseFloat(f):Array.isArray(f)&&h===ye&&(t[l]=f.map(parseFloat))}else d!=null&&d.transform&&(h!=null&&h.transform)&&(c===0||f===0)?c===0?u.set(h.transform(c)):t[l]=d.transform(f):(s||(o=MY(e),s=!0),a.push(l),r[l]=r[l]!==void 0?r[l]:t[l],u.jump(f))}),a.length){const l=a.indexOf("height")>=0?window.pageYOffset:null,u=LY(t,e,a);return o.length&&o.forEach(([c,d])=>{e.getValue(c).set(d)}),e.render(),Fg&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function FY(e,t,n,r){return OY(t)?jY(e,t,n,r):{target:t,transitionEnd:r}}const zY=(e,t,n,r)=>{const i=RY(e,t,r);return t=i.target,r=i.transitionEnd,FY(e,t,n,r)},Pb={current:null},c5={current:!1};function VY(){if(c5.current=!0,!!Fg)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Pb.current=e.matches;e.addListener(t),t()}else Pb.current=!1}function BY(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],s=n[i];if(gr(o))e.addValue(i,o),mm(r)&&r.add(i);else if(gr(s))e.addValue(i,ru(o,{owner:e})),mm(r)&&r.remove(i);else if(s!==o)if(e.hasValue(i)){const a=e.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=e.getStaticValue(i);e.addValue(i,ru(a!==void 0?a:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const KT=new WeakMap,d5=Object.keys(Id),UY=d5.length,GT=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],WY=WS.length;class HY{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Et.render(this.render,!1,!0);const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=Vg(n),this.isVariantNode=Q$(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(n,{});for(const d in c){const f=c[d];a[d]!==void 0&&gr(f)&&(f.set(a[d],!1),mm(u)&&u.add(d))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,KT.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),c5.current||VY(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Pb.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){KT.delete(this.current),this.projection&&this.projection.unmount(),_o(this.notifyUpdate),_o(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=Ra.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Et.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,o){let s,a;for(let l=0;l<UY;l++){const u=d5[l],{isEnabled:c,Feature:d,ProjectionNode:f,MeasureLayout:h}=Id[u];f&&(s=f),c(n)&&(!this.features[u]&&d&&(this.features[u]=new d(this)),h&&(a=h))}if(!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:c,dragConstraints:d,layoutScroll:f,layoutRoot:h}=n;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:!!c||d&&ml(d),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:f,layoutRoot:h})}return a}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Gt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<GT.length;r++){const i=GT[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=t["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=BY(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<WY;r++){const i=WS[r],o=this.props[i];(Pd(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ru(n,{owner:this}),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=ZS(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!gr(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new lx),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class f5 extends HY{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let s=uQ(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),s&&(s=i(s))),o){aQ(this,r,s);const a=zY(this,r,s,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function qY(e){return window.getComputedStyle(e)}class KY extends f5{readValueFromInstance(t,n){if(Ra.has(n)){const r=ix(n);return r&&r.default||0}else{const r=qY(t),i=(Z$(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return t5(t,n)}build(t,n,r,i){KS(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return JS(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;gr(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){oO(t,n,r,i)}}class GY extends f5{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ra.has(n)){const r=ix(n);return r&&r.default||0}return n=sO.has(n)?n:XS(n),t.getAttribute(n)}measureInstanceViewportBox(){return Gt()}scrapeMotionValuesFromProps(t,n){return lO(t,n)}build(t,n,r,i){QS(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){aO(t,n,r,i)}mount(t){this.isSVGTag=YS(t.tagName),super.mount(t)}}const QY=(e,t)=>qS(e)?new GY(t,{enableHardwareAcceleration:!1}):new KY(t,{enableHardwareAcceleration:!0}),YY={layout:{ProjectionNode:l5,MeasureLayout:n5}},XY={..._Q,...WK,...PY,...YY},h5=Jq((e,t)=>TK(e,t,XY,QY));function p5(){const e=w.useRef(!1);return lm(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function JY(){const e=p5(),[t,n]=w.useState(0),r=w.useCallback(()=>{e.current&&n(t+1)},[t]);return[w.useCallback(()=>Et.postRender(r),[r]),t]}class ZY extends w.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function eX({children:e,isPresent:t}){const n=w.useId(),r=w.useRef(null),i=w.useRef({width:0,height:0,top:0,left:0});return w.useInsertionEffect(()=>{const{width:o,height:s,top:a,left:l}=i.current;if(t||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
          [data-motion-pop-id="${n}"] {
            position: absolute !important;
            width: ${o}px !important;
            height: ${s}px !important;
            top: ${a}px !important;
            left: ${l}px !important;
          }
        `),()=>{document.head.removeChild(u)}},[t]),w.createElement(ZY,{isPresent:t,childRef:r,sizeRef:i},w.cloneElement(e,{ref:r}))}const pv=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=uO(tX),l=w.useId(),u=w.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:c=>{a.set(c,!0);for(const d of a.values())if(!d)return;r&&r()},register:c=>(a.set(c,!1),()=>a.delete(c))}),o?void 0:[n]);return w.useMemo(()=>{a.forEach((c,d)=>a.set(d,!1))},[n]),w.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=w.createElement(eX,{isPresent:n},e)),w.createElement(hf.Provider,{value:u},e)};function tX(){return new Map}function nX(e){return w.useEffect(()=>()=>e(),[])}const Xa=e=>e.key||"";function rX(e,t){e.forEach(n=>{const r=Xa(n);t.set(r,n)})}function iX(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const m5=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{const a=w.useContext(HS).forceRender||JY()[0],l=p5(),u=iX(e);let c=u;const d=w.useRef(new Map).current,f=w.useRef(c),h=w.useRef(new Map).current,p=w.useRef(!0);if(lm(()=>{p.current=!1,rX(u,h),f.current=c}),nX(()=>{p.current=!0,h.clear(),d.clear()}),p.current)return w.createElement(w.Fragment,null,c.map(m=>w.createElement(pv,{key:Xa(m),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:s},m)));c=[...c];const y=f.current.map(Xa),S=u.map(Xa),v=y.length;for(let m=0;m<v;m++){const b=y[m];S.indexOf(b)===-1&&!d.has(b)&&d.set(b,void 0)}return s==="wait"&&d.size&&(c=[]),d.forEach((m,b)=>{if(S.indexOf(b)!==-1)return;const C=h.get(b);if(!C)return;const k=y.indexOf(b);let x=m;if(!x){const E=()=>{h.delete(b),d.delete(b);const R=f.current.findIndex(M=>M.key===b);if(f.current.splice(R,1),!d.size){if(f.current=u,l.current===!1)return;a(),r&&r()}};x=w.createElement(pv,{key:Xa(C),isPresent:!1,onExitComplete:E,custom:t,presenceAffectsLayout:o,mode:s},C),d.set(b,x)}c.splice(k,0,x)}),c=c.map(m=>{const b=m.key;return d.has(b)?m:w.createElement(pv,{key:Xa(m),isPresent:!0,presenceAffectsLayout:o,mode:s},m)}),w.createElement(w.Fragment,null,d.size?c:c.map(m=>w.cloneElement(m)))};var oX={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},g5=w.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:s="bottom",duration:a=5e3,containerStyle:l,motionVariants:u=oX,toastSpacing:c="0.5rem"}=e,[d,f]=w.useState(a),h=qQ();Hk(()=>{h||r==null||r()},[h]),Hk(()=>{f(a)},[a]);const p=()=>f(null),y=()=>f(a),S=()=>{h&&i()};w.useEffect(()=>{h&&o&&i()},[h,o,i]),Uq(S,d);const v=w.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:c,...l}),[l,c]),m=w.useMemo(()=>Vq(s),[s]);return g.jsx(h5.div,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:p,onHoverEnd:y,custom:{position:s},style:m,children:g.jsx(Ae.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:v,children:Ai(n,{id:t,onClose:S})})})});g5.displayName="ToastComponent";function sX(e,t){var n;const r=e??"bottom",o={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[r];return(n=o==null?void 0:o[t])!=null?n:r}var QT={path:g.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[g.jsx("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),g.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),g.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},zt=it((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:s,className:a,__css:l,...u}=e,c=Tt("chakra-icon",a),d=Aa("Icon",e),f={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l,...d},h={ref:t,focusable:o,className:c,__css:f},p=r??QT.viewBox;if(n&&typeof n!="string")return g.jsx(Ae.svg,{as:n,...h,...u});const y=s??QT.path;return g.jsx(Ae.svg,{verticalAlign:"middle",viewBox:p,...h,...u,children:y})});zt.displayName="Icon";function y5(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=w.Children.toArray(e.path),s=it((a,l)=>g.jsx(zt,{ref:l,viewBox:t,...i,...a,children:o.length?o:g.jsx("path",{fill:"currentColor",d:n})}));return s.displayName=r,s}function aX(e){return g.jsx(zt,{viewBox:"0 0 24 24",...e,children:g.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function lX(e){return g.jsx(zt,{viewBox:"0 0 24 24",...e,children:g.jsx("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function YT(e){return g.jsx(zt,{viewBox:"0 0 24 24",...e,children:g.jsx("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var uX=s9({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),ux=it((e,t)=>{const n=Aa("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:s="transparent",className:a,...l}=yi(e),u=Tt("chakra-spinner",a),c={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:s,borderLeftColor:s,animation:`${uX} ${o} linear infinite`,...n};return g.jsx(Ae.div,{ref:t,__css:c,className:u,...l,children:r&&g.jsx(Ae.span,{srOnly:!0,children:r})})});ux.displayName="Spinner";var[cX,cx]=Or({name:"AlertContext",hookName:"useAlertContext",providerName:"<Alert />"}),[dX,dx]=Or({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:"<Alert />"}),v5={info:{icon:lX,colorScheme:"blue"},warning:{icon:YT,colorScheme:"orange"},success:{icon:aX,colorScheme:"green"},error:{icon:YT,colorScheme:"red"},loading:{icon:ux,colorScheme:"blue"}};function fX(e){return v5[e].colorScheme}function hX(e){return v5[e].icon}var b5=it(function(t,n){const r=dx(),{status:i}=cx(),o={display:"inline",...r.description};return g.jsx(Ae.div,{ref:n,"data-status":i,...t,className:Tt("chakra-alert__desc",t.className),__css:o})});b5.displayName="AlertDescription";function w5(e){const{status:t}=cx(),n=hX(t),r=dx(),i=t==="loading"?r.spinner:r.icon;return g.jsx(Ae.span,{display:"inherit","data-status":t,...e,className:Tt("chakra-alert__icon",e.className),__css:i,children:e.children||g.jsx(n,{h:"100%",w:"100%"})})}w5.displayName="AlertIcon";var S5=it(function(t,n){const r=dx(),{status:i}=cx();return g.jsx(Ae.div,{ref:n,"data-status":i,...t,className:Tt("chakra-alert__title",t.className),__css:r.title})});S5.displayName="AlertTitle";var x5=it(function(t,n){var r;const{status:i="info",addRole:o=!0,...s}=yi(t),a=(r=t.colorScheme)!=null?r:fX(i),l=ff("Alert",{...t,colorScheme:a}),u={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...l.container};return g.jsx(cX,{value:{status:i},children:g.jsx(dX,{value:l,children:g.jsx(Ae.div,{"data-status":i,role:o?"alert":void 0,ref:n,...s,className:Tt("chakra-alert",t.className),__css:u})})})});x5.displayName="Alert";function pX(e){return g.jsx(zt,{focusable:"false","aria-hidden":!0,...e,children:g.jsx("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var _5=it(function(t,n){const r=Aa("CloseButton",t),{children:i,isDisabled:o,__css:s,...a}=yi(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return g.jsx(Ae.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...s},...a,children:i||g.jsx(pX,{width:"1em",height:"1em"})})});_5.displayName="CloseButton";var mX={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},Ti=gX(mX);function gX(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(s=>({...s,[o]:s[o].filter(a=>a.id!=i)}))},notify:(i,o)=>{const s=yX(i,o),{position:a,id:l}=s;return r(u=>{var c,d;const h=a.includes("top")?[s,...(c=u[a])!=null?c:[]]:[...(d=u[a])!=null?d:[],s];return{...u,[a]:h}}),l},update:(i,o)=>{i&&r(s=>{const a={...s},{position:l,index:u}=Wk(a,i);return l&&u!==-1&&(a[l][u]={...a[l][u],...o,message:C5(o)}),a})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(c=>({...c,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const s=q$(o,i);return s?{...o,[s]:o[s].map(a=>a.id==i?{...a,requestClose:!0}:a)}:o})},isActive:i=>!!Wk(Ti.getState(),i).position}}var XT=0;function yX(e,t={}){var n,r;XT+=1;const i=(n=t.id)!=null?n:XT,o=(r=t.position)!=null?r:"bottom";return{id:i,message:e,position:o,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>Ti.removeToast(String(i),o),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var vX=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:s,description:a,colorScheme:l,icon:u}=e,c=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return g.jsxs(x5,{addRole:!1,status:t,variant:n,id:c==null?void 0:c.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:l,children:[g.jsx(w5,{children:u}),g.jsxs(Ae.div,{flex:"1",maxWidth:"100%",children:[i&&g.jsx(S5,{id:c==null?void 0:c.title,children:i}),a&&g.jsx(b5,{id:c==null?void 0:c.description,display:"block",children:a})]}),o&&g.jsx(_5,{size:"sm",onClick:s,position:"absolute",insetEnd:1,top:1})]})};function C5(e={}){const{render:t,toastComponent:n=vX}=e;return i=>typeof t=="function"?t({...i,...e}):g.jsx(n,{...i,...e})}function bX(e,t){const n=i=>{var o;return{...t,...i,position:sX((o=i==null?void 0:i.position)!=null?o:t==null?void 0:t.position,e)}},r=i=>{const o=n(i),s=C5(o);return Ti.notify(s,o)};return r.update=(i,o)=>{Ti.update(i,n(o))},r.promise=(i,o)=>{const s=r({...o.loading,status:"loading",duration:null});i.then(a=>r.update(s,{status:"success",duration:5e3,...Ai(o.success,a)})).catch(a=>r.update(s,{status:"error",duration:5e3,...Ai(o.error,a)}))},r.closeAll=Ti.closeAll,r.close=Ti.close,r.isActive=Ti.isActive,r}var[wX,SX]=Or({name:"ToastOptionsContext",strict:!1}),xX=e=>{const t=w.useSyncExternalStore(Ti.subscribe,Ti.getState,Ti.getState),{motionVariants:n,component:r=g5,portalProps:i}=e,s=Object.keys(t).map(a=>{const l=t[a];return g.jsx("div",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${a}`,style:Bq(a),children:g.jsx(m5,{initial:!1,children:l.map(u=>g.jsx(r,{motionVariants:n,...u},u.id))})},a)});return g.jsx(Og,{...i,children:s})};function qg(e){const{theme:t}=g$(),n=SX();return w.useMemo(()=>bX(t.direction,{...n,...e}),[e,t.direction,n])}var _X=e=>function({children:n,theme:r=e,toastOptions:i,...o}){return g.jsxs(Fq,{theme:r,...o,children:[g.jsx(wX,{value:i==null?void 0:i.defaultOptions,children:n}),g.jsx(xX,{...i})]})},CX=_X(L$),EX=Object.defineProperty,kX=(e,t,n)=>t in e?EX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Dt=(e,t,n)=>(kX(e,typeof t!="symbol"?t+"":t,n),n);function JT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var TX=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function ZT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function e2(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var Ib=typeof window<"u"?w.useLayoutEffect:w.useEffect,ym=e=>e,PX=class{constructor(){Dt(this,"descendants",new Map),Dt(this,"register",e=>{if(e!=null)return TX(e)?this.registerNode(e):t=>{this.registerNode(t,e)}}),Dt(this,"unregister",e=>{this.descendants.delete(e);const t=JT(Array.from(this.descendants.keys()));this.assignIndex(t)}),Dt(this,"destroy",()=>{this.descendants.clear()}),Dt(this,"assignIndex",e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})}),Dt(this,"count",()=>this.descendants.size),Dt(this,"enabledCount",()=>this.enabledValues().length),Dt(this,"values",()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index)),Dt(this,"enabledValues",()=>this.values().filter(e=>!e.disabled)),Dt(this,"item",e=>{if(this.count()!==0)return this.values()[e]}),Dt(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]}),Dt(this,"first",()=>this.item(0)),Dt(this,"firstEnabled",()=>this.enabledItem(0)),Dt(this,"last",()=>this.item(this.descendants.size-1)),Dt(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)}),Dt(this,"indexOf",e=>{var t,n;return e&&(n=(t=this.descendants.get(e))==null?void 0:t.index)!=null?n:-1}),Dt(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e))),Dt(this,"next",(e,t=!0)=>{const n=ZT(e,this.count(),t);return this.item(n)}),Dt(this,"nextEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=ZT(r,this.enabledCount(),t);return this.enabledItem(i)}),Dt(this,"prev",(e,t=!0)=>{const n=e2(e,this.count()-1,t);return this.item(n)}),Dt(this,"prevEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=e2(r,this.enabledCount()-1,t);return this.enabledItem(i)}),Dt(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=JT(n);t!=null&&t.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)})}};function IX(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function iu(...e){return t=>{e.forEach(n=>{IX(n,t)})}}function AX(...e){return w.useMemo(()=>iu(...e),e)}function RX(){const e=w.useRef(new PX);return Ib(()=>()=>e.current.destroy()),e.current}var[$X,E5]=Or({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function OX(e){const t=E5(),[n,r]=w.useState(-1),i=w.useRef(null);Ib(()=>()=>{i.current&&t.unregister(i.current)},[]),Ib(()=>{if(!i.current)return;const s=Number(i.current.dataset.index);n!=s&&!Number.isNaN(s)&&r(s)});const o=ym(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:iu(o,i)}}function NX(){return[ym($X),()=>ym(E5()),()=>RX(),i=>OX(i)]}function DX(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(f,h)=>f!==h}=e,o=fp(r),s=fp(i),[a,l]=w.useState(n),u=t!==void 0,c=u?t:a,d=fp(f=>{const p=typeof f=="function"?f(c):f;s(c,p)&&(u||l(p),o(p))},[u,o,c,s]);return[c,d]}var Ih={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},t2={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.exit})},MX=e=>e!=null&&parseInt(e.toString(),10)>0,n2={exit:{height:{duration:.2,ease:Ih.ease},opacity:{duration:.3,ease:Ih.ease}},enter:{height:{duration:.3,ease:Ih.ease},opacity:{duration:.4,ease:Ih.ease}}},LX={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{...e&&{opacity:MX(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(o=n==null?void 0:n.exit)!=null?o:t2.exit(n2.exit,i)}},enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{...e&&{opacity:1},height:t,transitionEnd:r==null?void 0:r.enter,transition:(o=n==null?void 0:n.enter)!=null?o:t2.enter(n2.enter,i)}}},k5=w.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:s="auto",style:a,className:l,transition:u,transitionEnd:c,...d}=e,[f,h]=w.useState(!1);w.useEffect(()=>{const m=setTimeout(()=>{h(!0)});return()=>clearTimeout(m)},[]),_9({condition:Number(o)>0&&!!r,message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const p=parseFloat(o.toString())>0,y={startingHeight:o,endingHeight:s,animateOpacity:i,transition:f?u:{enter:{duration:0}},transitionEnd:{enter:c==null?void 0:c.enter,exit:r?c==null?void 0:c.exit:{...c==null?void 0:c.exit,display:p?"block":"none"}}},S=r?n:!0,v=n||r?"enter":"exit";return g.jsx(m5,{initial:!1,custom:y,children:S&&g.jsx(h5.div,{ref:t,...d,className:Tt("chakra-collapse",l),style:{overflow:"hidden",display:"block",...a},custom:y,variants:LX,initial:r?"exit":!1,animate:v,exit:"exit"})})});k5.displayName="Collapse";var[jX,FX]=Or({name:"AvatarStylesContext",hookName:"useAvatarStyles",providerName:"<Avatar/>"});function zX(e){var t;const n=e.split(" "),r=(t=n.at(0))!=null?t:"",i=n.length>1?n.at(-1):"";return r&&i?`${r.charAt(0)}${i.charAt(0)}`:r.charAt(0)}function T5(e){const{name:t,getInitials:n,...r}=e,i=FX();return g.jsx(Ae.div,{role:"img","aria-label":t,...r,__css:i.label,children:t?n==null?void 0:n(t):null})}T5.displayName="AvatarName";var P5=e=>g.jsxs(Ae.svg,{viewBox:"0 0 128 128",color:"#fff",width:"100%",height:"100%",className:"chakra-avatar__svg",...e,children:[g.jsx("path",{fill:"currentColor",d:"M103,102.1388 C93.094,111.92 79.3504,118 64.1638,118 C48.8056,118 34.9294,111.768 25,101.7892 L25,95.2 C25,86.8096 31.981,80 40.6,80 L87.4,80 C96.019,80 103,86.8096 103,95.2 L103,102.1388 Z"}),g.jsx("path",{fill:"currentColor",d:"M63.9961647,24 C51.2938136,24 41,34.2938136 41,46.9961647 C41,59.7061864 51.2938136,70 63.9961647,70 C76.6985159,70 87,59.7061864 87,46.9961647 C87,34.2938136 76.6985159,24 63.9961647,24"})]}),Ab=it(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...s}=t;return g.jsx("img",{width:r,height:i,ref:n,alt:o,...s})});Ab.displayName="NativeImage";function I5(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:s,sizes:a,ignoreFallback:l}=e,[u,c]=w.useState("pending");w.useEffect(()=>{c(n?"loading":"pending")},[n]);const d=w.useRef(),f=w.useCallback(()=>{if(!n)return;h();const p=new Image;p.src=n,s&&(p.crossOrigin=s),r&&(p.srcset=r),a&&(p.sizes=a),t&&(p.loading=t),p.onload=y=>{h(),c("loaded"),i==null||i(y)},p.onerror=y=>{h(),c("failed"),o==null||o(y)},d.current=p},[n,s,r,a,i,o,t]),h=()=>{d.current&&(d.current.onload=null,d.current.onerror=null,d.current=null)};return eu(()=>{if(!l)return u==="loading"&&f(),()=>{h()}},[u,f,l]),l?"loaded":u}var VX=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError";function BX(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var Oa=it(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:s,align:a,fit:l,loading:u,ignoreFallback:c,crossOrigin:d,fallbackStrategy:f="beforeLoadOrError",referrerPolicy:h,...p}=t,y=r!==void 0||i!==void 0,S=u!=null||c||!y,v=I5({...t,crossOrigin:d,ignoreFallback:S}),m=VX(v,f),b={ref:n,objectFit:l,objectPosition:a,...S?p:BX(p,["onError","onLoad"])};return m?i||g.jsx(Ae.img,{as:Ab,className:"chakra-image__placeholder",src:r,...b}):g.jsx(Ae.img,{as:Ab,src:o,srcSet:s,crossOrigin:d,loading:u,referrerPolicy:h,className:"chakra-image",...b})});Oa.displayName="Image";function A5(e){const{src:t,srcSet:n,onError:r,onLoad:i,getInitials:o,name:s,borderRadius:a,loading:l,iconLabel:u,icon:c=g.jsx(P5,{}),ignoreFallback:d,referrerPolicy:f,crossOrigin:h}=e,y=I5({src:t,onError:r,crossOrigin:h,ignoreFallback:d})==="loaded";return!t||!y?s?g.jsx(T5,{className:"chakra-avatar__initials",getInitials:o,name:s}):w.cloneElement(c,{role:"img","aria-label":u}):g.jsx(Ae.img,{src:t,srcSet:n,alt:s,onLoad:i,referrerPolicy:f,crossOrigin:h??void 0,className:"chakra-avatar__img",loading:l,__css:{width:"100%",height:"100%",objectFit:"cover",borderRadius:a}})}A5.displayName="AvatarImage";var UX={display:"inline-flex",alignItems:"center",justifyContent:"center",textAlign:"center",textTransform:"uppercase",fontWeight:"medium",position:"relative",flexShrink:0},fx=it((e,t)=>{const n=ff("Avatar",e),[r,i]=w.useState(!1),{src:o,srcSet:s,name:a,showBorder:l,borderRadius:u="full",onError:c,onLoad:d,getInitials:f=zX,icon:h=g.jsx(P5,{}),iconLabel:p=" avatar",loading:y,children:S,borderColor:v,ignoreFallback:m,crossOrigin:b,...C}=yi(e),k={borderRadius:u,borderWidth:l?"2px":void 0,...UX,...n.container};return v&&(k.borderColor=v),g.jsx(Ae.span,{ref:t,...C,className:Tt("chakra-avatar",e.className),"data-loaded":is(r),__css:k,children:g.jsxs(jX,{value:n,children:[g.jsx(A5,{src:o,srcSet:s,loading:y,onLoad:tu(d,()=>{i(!0)}),onError:c,getInitials:f,name:a,borderRadius:u,icon:h,iconLabel:p,ignoreFallback:m,crossOrigin:b}),S]})})});fx.displayName="Avatar";function R5(e){return w.Children.toArray(e).filter(t=>w.isValidElement(t))}var[npe,WX]=Or({strict:!1,name:"ButtonGroupContext"});function HX(e){const[t,n]=w.useState(!e);return{ref:w.useCallback(o=>{o&&n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}function Rb(e){const{children:t,className:n,...r}=e,i=w.isValidElement(t)?w.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=Tt("chakra-button__icon",n);return g.jsx(Ae.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o,children:i})}Rb.displayName="ButtonIcon";function $b(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=g.jsx(ux,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:s,...a}=e,l=Tt("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",c=w.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...s}),[s,t,u,r]);return g.jsx(Ae.div,{className:l,...a,__css:c,children:i})}$b.displayName="ButtonSpinner";var Cn=it((e,t)=>{const n=WX(),r=Aa("Button",{...n,...e}),{isDisabled:i=n==null?void 0:n.isDisabled,isLoading:o,isActive:s,children:a,leftIcon:l,rightIcon:u,loadingText:c,iconSpacing:d="0.5rem",type:f,spinner:h,spinnerPlacement:p="start",className:y,as:S,...v}=yi(e),m=w.useMemo(()=>{const x={...r==null?void 0:r._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:x}}},[r,n]),{ref:b,type:C}=HX(S),k={rightIcon:u,leftIcon:l,iconSpacing:d,children:a};return g.jsxs(Ae.button,{ref:AX(t,b),as:S,type:f??C,"data-active":is(s),"data-loading":is(o),__css:m,className:Tt("chakra-button",y),...v,disabled:i||o,children:[o&&p==="start"&&g.jsx($b,{className:"chakra-button__spinner--start",label:c,placement:"start",spacing:d,children:h}),o?c||g.jsx(Ae.span,{opacity:0,children:g.jsx(r2,{...k})}):g.jsx(r2,{...k}),o&&p==="end"&&g.jsx($b,{className:"chakra-button__spinner--end",label:c,placement:"end",spacing:d,children:h})]})});Cn.displayName="Button";function r2(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return g.jsxs(g.Fragment,{children:[t&&g.jsx(Rb,{marginEnd:i,children:t}),r,n&&g.jsx(Rb,{marginStart:i,children:n})]})}var[qX,KX]=Or({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormControl />" `}),[GX,$5]=Or({strict:!1,name:"FormControlContext"});function QX(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...s}=e,a=w.useId(),l=t||`field-${a}`,u=`${l}-label`,c=`${l}-feedback`,d=`${l}-helptext`,[f,h]=w.useState(!1),[p,y]=w.useState(!1),[S,v]=w.useState(!1),m=w.useCallback((E={},R=null)=>({id:d,...E,ref:iu(R,M=>{M&&y(!0)})}),[d]),b=w.useCallback((E={},R=null)=>({...E,ref:R,"data-focus":is(S),"data-disabled":is(i),"data-invalid":is(r),"data-readonly":is(o),id:E.id!==void 0?E.id:u,htmlFor:E.htmlFor!==void 0?E.htmlFor:l}),[l,i,S,r,o,u]),C=w.useCallback((E={},R=null)=>({id:c,...E,ref:iu(R,M=>{M&&h(!0)}),"aria-live":"polite"}),[c]),k=w.useCallback((E={},R=null)=>({...E,...s,ref:R,role:"group"}),[s]),x=w.useCallback((E={},R=null)=>({...E,ref:R,role:"presentation","aria-hidden":!0,children:E.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!S,onFocus:()=>v(!0),onBlur:()=>v(!1),hasFeedbackText:f,setHasFeedbackText:h,hasHelpText:p,setHasHelpText:y,id:l,labelId:u,feedbackId:c,helpTextId:d,htmlProps:s,getHelpTextProps:m,getErrorMessageProps:C,getRootProps:k,getLabelProps:b,getRequiredIndicatorProps:x}}var YX=it(function(t,n){const r=ff("Form",t),i=yi(t),{getRootProps:o,htmlProps:s,...a}=QX(i),l=Tt("chakra-form-control",t.className);return g.jsx(GX,{value:a,children:g.jsx(qX,{value:r,children:g.jsx(Ae.div,{...o({},n),className:l,__css:r.container})})})});YX.displayName="FormControl";var XX=it(function(t,n){const r=$5(),i=KX(),o=Tt("chakra-form__helper-text",t.className);return g.jsx(Ae.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:i.helperText,className:o})});XX.displayName="FormHelperText";function O5(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=JX(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":M0(n),"aria-required":M0(i),"aria-readonly":M0(r)}}function JX(e){var t,n,r;const i=$5(),{id:o,disabled:s,readOnly:a,required:l,isRequired:u,isInvalid:c,isReadOnly:d,isDisabled:f,onFocus:h,onBlur:p,...y}=e,S=e["aria-describedby"]?[e["aria-describedby"]]:[];return i!=null&&i.hasFeedbackText&&(i!=null&&i.isInvalid)&&S.push(i.feedbackId),i!=null&&i.hasHelpText&&S.push(i.helpTextId),{...y,"aria-describedby":S.join(" ")||void 0,id:o??(i==null?void 0:i.id),isDisabled:(t=s??f)!=null?t:i==null?void 0:i.isDisabled,isReadOnly:(n=a??d)!=null?n:i==null?void 0:i.isReadOnly,isRequired:(r=l??u)!=null?r:i==null?void 0:i.isRequired,isInvalid:c??(i==null?void 0:i.isInvalid),onFocus:tu(i==null?void 0:i.onFocus,h),onBlur:tu(i==null?void 0:i.onBlur,p)}}function Oo(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function $d(e){"@babel/helpers - typeof";return $d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$d(e)}function ZX(e,t){if($d(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if($d(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eJ(e){var t=ZX(e,"string");return $d(t)==="symbol"?t:String(t)}function tJ(e,t,n){return t=eJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Kg=it(function(t,n){const{htmlSize:r,...i}=t,o=ff("Input",i),s=yi(i),a=O5(s),l=Tt("chakra-input",t.className);return g.jsx(Ae.input,{size:r,...a,__css:o.field,ref:n,className:l})});Kg.displayName="Input";Kg.id="Input";function N5(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Yr(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var Q=it(function(t,n){const r=Aa("Text",t),{className:i,align:o,decoration:s,casing:a,...l}=yi(t),u=Cq({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return g.jsx(Ae.p,{ref:n,className:Tt("chakra-text",t.className),...u,...l,__css:r})});Q.displayName="Text";var D5=e=>g.jsx(Ae.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});D5.displayName="StackItem";var Ob="& > *:not(style) ~ *:not(style)";function nJ(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[Ob]:N5(n,i=>r[i])}}function rJ(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":N5(n,i=>r[i])}}var hx=it((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:s="0.5rem",wrap:a,children:l,divider:u,className:c,shouldWrapChildren:d,...f}=e,h=n?"row":r??"column",p=w.useMemo(()=>nJ({direction:h,spacing:s}),[h,s]),y=w.useMemo(()=>rJ({spacing:s,direction:h}),[s,h]),S=!!u,v=!d&&!S,m=w.useMemo(()=>{const C=R5(l);return v?C:C.map((k,x)=>{const E=typeof k.key<"u"?k.key:x,R=x+1===C.length,L=d?g.jsx(D5,{children:k},E):k;if(!S)return L;const ne=w.cloneElement(u,{__css:y}),Y=R?null:ne;return g.jsxs(w.Fragment,{children:[L,Y]},E)})},[u,y,S,v,d,l]),b=Tt("chakra-stack",c);return g.jsx(Ae.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:p.flexDirection,flexWrap:a,className:b,__css:S?{}:{[Ob]:p[Ob]},...f,children:m})});hx.displayName="Stack";var rn=it((e,t)=>g.jsx(hx,{align:"center",...e,direction:"column",ref:t}));rn.displayName="VStack";var Ze=it((e,t)=>g.jsx(hx,{align:"center",...e,direction:"row",ref:t}));Ze.displayName="HStack";var dr=it(function(t,n){const r=Aa("Heading",t),{className:i,...o}=yi(t);return g.jsx(Ae.h2,{ref:n,className:Tt("chakra-heading",t.className),...o,__css:r})});dr.displayName="Heading";var yr=Ae("div");yr.displayName="Box";var M5=it(function(t,n){const{size:r,centerContent:i=!0,...o}=t,s=i?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return g.jsx(yr,{ref:n,boxSize:r,__css:{...s,flexShrink:0,flexGrow:0},...o})});M5.displayName="Square";var iJ=it(function(t,n){const{size:r,...i}=t;return g.jsx(M5,{size:r,ref:n,borderRadius:"9999px",...i})});iJ.displayName="Circle";function oJ(){const e=w.useRef(new Map),t=e.current,n=w.useCallback((i,o,s,a)=>{e.current.set(s,{type:o,el:i,options:a}),i.addEventListener(o,s,a)},[]),r=w.useCallback((i,o,s,a)=>{i.removeEventListener(o,s,a),e.current.delete(s)},[]);return w.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function mv(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function sJ(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:s,onMouseUp:a,onClick:l,onKeyDown:u,onKeyUp:c,tabIndex:d,onMouseOver:f,onMouseLeave:h,...p}=e,[y,S]=w.useState(!0),[v,m]=w.useState(!1),b=oJ(),C=G=>{G&&G.tagName!=="BUTTON"&&S(!1)},k=y?d:d||0,x=n&&!r,E=w.useCallback(G=>{if(n){G.stopPropagation(),G.preventDefault();return}G.currentTarget.focus(),l==null||l(G)},[n,l]),R=w.useCallback(G=>{v&&mv(G)&&(G.preventDefault(),G.stopPropagation(),m(!1),b.remove(document,"keyup",R,!1))},[v,b]),M=w.useCallback(G=>{if(u==null||u(G),n||G.defaultPrevented||G.metaKey||!mv(G.nativeEvent)||y)return;const V=i&&G.key==="Enter";o&&G.key===" "&&(G.preventDefault(),m(!0)),V&&(G.preventDefault(),G.currentTarget.click()),b.add(document,"keyup",R,!1)},[n,y,u,i,o,b,R]),L=w.useCallback(G=>{if(c==null||c(G),n||G.defaultPrevented||G.metaKey||!mv(G.nativeEvent)||y)return;o&&G.key===" "&&(G.preventDefault(),m(!1),G.currentTarget.click())},[o,y,n,c]),ne=w.useCallback(G=>{G.button===0&&(m(!1),b.remove(document,"mouseup",ne,!1))},[b]),Y=w.useCallback(G=>{if(G.button!==0)return;if(n){G.stopPropagation(),G.preventDefault();return}y||m(!0),G.currentTarget.focus({preventScroll:!0}),b.add(document,"mouseup",ne,!1),s==null||s(G)},[n,y,s,b,ne]),Z=w.useCallback(G=>{G.button===0&&(y||m(!1),a==null||a(G))},[a,y]),ie=w.useCallback(G=>{if(n){G.preventDefault();return}f==null||f(G)},[n,f]),he=w.useCallback(G=>{v&&(G.preventDefault(),m(!1)),h==null||h(G)},[v,h]),Ce=iu(t,C);return y?{...p,ref:Ce,type:"button","aria-disabled":x?void 0:n,disabled:x,onClick:E,onMouseDown:s,onMouseUp:a,onKeyUp:c,onKeyDown:u,onMouseOver:f,onMouseLeave:h}:{...p,ref:Ce,role:"button","data-active":is(v),"aria-disabled":n?"true":void 0,tabIndex:x?void 0:k,onClick:E,onMouseDown:Y,onMouseUp:Z,onKeyUp:L,onKeyDown:M,onMouseOver:ie,onMouseLeave:he}}function aJ(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[lJ,L5,uJ,cJ]=NX();function dJ(e){var t;const{defaultIndex:n,onChange:r,index:i,isManual:o,isLazy:s,lazyBehavior:a="unmount",orientation:l="horizontal",direction:u="ltr",...c}=e,[d,f]=w.useState(n??0),[h,p]=DX({defaultValue:n??0,value:i,onChange:r});w.useEffect(()=>{i!=null&&f(i)},[i]);const y=uJ(),S=w.useId();return{id:`tabs-${(t=e.id)!=null?t:S}`,selectedIndex:h,focusedIndex:d,setSelectedIndex:p,setFocusedIndex:f,isManual:o,isLazy:s,lazyBehavior:a,orientation:l,descendants:y,direction:u,htmlProps:c}}var[fJ,vf]=Or({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within <Tabs />"});function hJ(e){const{focusedIndex:t,orientation:n,direction:r}=vf(),i=L5(),o=w.useCallback(s=>{const a=()=>{var m;const b=i.nextEnabled(t);b&&((m=b.node)==null||m.focus())},l=()=>{var m;const b=i.prevEnabled(t);b&&((m=b.node)==null||m.focus())},u=()=>{var m;const b=i.firstEnabled();b&&((m=b.node)==null||m.focus())},c=()=>{var m;const b=i.lastEnabled();b&&((m=b.node)==null||m.focus())},d=n==="horizontal",f=n==="vertical",h=s.key,p=r==="ltr"?"ArrowLeft":"ArrowRight",y=r==="ltr"?"ArrowRight":"ArrowLeft",v={[p]:()=>d&&l(),[y]:()=>d&&a(),ArrowDown:()=>f&&a(),ArrowUp:()=>f&&l(),Home:u,End:c}[h];v&&(s.preventDefault(),v(s))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:tu(e.onKeyDown,o)}}function pJ(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:s,setFocusedIndex:a,selectedIndex:l}=vf(),{index:u,register:c}=cJ({disabled:t&&!n}),d=u===l,f=()=>{i(u)},h=()=>{a(u),!o&&!(t&&n)&&i(u)},p=sJ({...r,ref:iu(c,e.ref),isDisabled:t,isFocusable:n,onClick:tu(e.onClick,f)}),y="button";return{...p,id:j5(s,u),role:"tab",tabIndex:d?0:-1,type:y,"aria-selected":d,"aria-controls":F5(s,u),onFocus:t?void 0:tu(e.onFocus,h)}}var[mJ,gJ]=Or({});function yJ(e){const t=vf(),{id:n,selectedIndex:r}=t,o=R5(e.children).map((s,a)=>w.createElement(mJ,{key:a,value:{isSelected:a===r,id:F5(n,a),tabId:j5(n,a),selectedIndex:r}},s));return{...e,children:o}}function vJ(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=vf(),{isSelected:o,id:s,tabId:a}=gJ(),l=w.useRef(!1);o&&(l.current=!0);const u=aJ({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":a,hidden:!o,id:s}}function bJ(){const e=vf(),t=L5(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[s,a]=w.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=w.useState(!1);return eu(()=>{if(n==null)return;const c=t.item(n);if(c==null)return;i&&a({left:c.node.offsetLeft,width:c.node.offsetWidth}),o&&a({top:c.node.offsetTop,height:c.node.offsetHeight});const d=requestAnimationFrame(()=>{u(!0)});return()=>{d&&cancelAnimationFrame(d)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...s}}function j5(e,t){return`${e}--tab-${t}`}function F5(e,t){return`${e}--tabpanel-${t}`}var[wJ,bf]=Or({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Tabs />" `}),z5=it(function(t,n){const r=ff("Tabs",t),{children:i,className:o,...s}=yi(t),{htmlProps:a,descendants:l,...u}=dJ(s),c=w.useMemo(()=>u,[u]),{isFitted:d,...f}=a;return g.jsx(lJ,{value:l,children:g.jsx(fJ,{value:c,children:g.jsx(wJ,{value:r,children:g.jsx(Ae.div,{className:Tt("chakra-tabs",o),ref:n,...f,__css:r.root,children:i})})})})});z5.displayName="Tabs";var V5=it(function(t,n){const r=bJ(),i={...t.style,...r},o=bf();return g.jsx(Ae.div,{ref:n,...t,className:Tt("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});V5.displayName="TabIndicator";var B5=it(function(t,n){const r=hJ({...t,ref:n}),o={display:"flex",...bf().tablist};return g.jsx(Ae.div,{...r,className:Tt("chakra-tabs__tablist",t.className),__css:o})});B5.displayName="TabList";var wc=it(function(t,n){const r=vJ({...t,ref:n}),i=bf();return g.jsx(Ae.div,{outline:"0",...r,className:Tt("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});wc.displayName="TabPanel";var U5=it(function(t,n){const r=yJ(t),i=bf();return g.jsx(Ae.div,{...r,width:"100%",ref:n,className:Tt("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});U5.displayName="TabPanels";var Sc=it(function(t,n){const r=bf(),i=pJ({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return g.jsx(Ae.button,{...i,className:Tt("chakra-tabs__tab",t.className),__css:o})});Sc.displayName="Tab";function SJ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var xJ=["h","minH","height","minHeight"],W5=it((e,t)=>{const n=Aa("Textarea",e),{className:r,rows:i,...o}=yi(e),s=O5(o),a=i?SJ(n,xJ):n;return g.jsx(Ae.textarea,{ref:t,rows:i,...s,className:Tt("chakra-textarea",r),__css:a})});W5.displayName="Textarea";var _J=y5({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"}),CJ=y5({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}),wf=e=>e.type==="checkbox",bl=e=>e instanceof Date,Jn=e=>e==null;const H5=e=>typeof e=="object";var ln=e=>!Jn(e)&&!Array.isArray(e)&&H5(e)&&!bl(e),EJ=e=>ln(e)&&e.target?wf(e.target)?e.target.checked:e.target.value:e,kJ=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,TJ=(e,t)=>e.has(kJ(t)),PJ=e=>{const t=e.constructor&&e.constructor.prototype;return ln(t)&&t.hasOwnProperty("isPrototypeOf")},px=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ks(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(px&&(e instanceof Blob||e instanceof FileList))&&(n||ln(e)))if(t=n?[]:{},!Array.isArray(e)&&!PJ(e))t=e;else for(const r in e)t[r]=Ks(e[r]);else return e;return t}var Sf=e=>Array.isArray(e)?e.filter(Boolean):[],Qt=e=>e===void 0,de=(e,t,n)=>{if(!t||!ln(e))return n;const r=Sf(t.split(/[,[\].]+?/)).reduce((i,o)=>Jn(i)?i:i[o],e);return Qt(r)||r===e?Qt(e[t])?n:e[t]:r};const i2={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ui={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Zi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};ur.createContext(null);var IJ=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const s=o;return t._proxyFormState[s]!==ui.all&&(t._proxyFormState[s]=!r||ui.all),n&&(n[s]=!0),e[s]}});return i},Vr=e=>ln(e)&&!Object.keys(e).length,AJ=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return Vr(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(s=>t[s]===(!r||ui.all))},gv=e=>Array.isArray(e)?e:[e];function RJ(e){const t=ur.useRef(e);t.current=e,ur.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var Ri=e=>typeof e=="string",$J=(e,t,n,r,i)=>Ri(e)?(r&&t.watch.add(e),de(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),de(n,o))):(r&&(t.watchAll=!0),n),mx=e=>/^\w*$/.test(e),q5=e=>Sf(e.replace(/["|']|\]/g,"").split(/\.|\[/));function St(e,t,n){let r=-1;const i=mx(t)?[t]:q5(t),o=i.length,s=o-1;for(;++r<o;){const a=i[r];let l=n;if(r!==s){const u=e[a];l=ln(u)||Array.isArray(u)?u:isNaN(+i[r+1])?{}:[]}e[a]=l,e=e[a]}return e}var OJ=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{};const Nb=(e,t,n)=>{for(const r of n||Object.keys(e)){const i=de(e,r);if(i){const{_f:o,...s}=i;if(o&&t(o.name)){if(o.ref.focus){o.ref.focus();break}else if(o.refs&&o.refs[0].focus){o.refs[0].focus();break}}else ln(s)&&Nb(s,t)}}};var o2=e=>({isOnSubmit:!e||e===ui.onSubmit,isOnBlur:e===ui.onBlur,isOnChange:e===ui.onChange,isOnAll:e===ui.all,isOnTouch:e===ui.onTouched}),s2=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length)))),NJ=(e,t,n)=>{const r=Sf(de(e,n));return St(r,"root",t[n]),St(e,n,r),e},Nl=e=>typeof e=="boolean",gx=e=>e.type==="file",os=e=>typeof e=="function",vm=e=>{if(!px)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},mp=e=>Ri(e),yx=e=>e.type==="radio",bm=e=>e instanceof RegExp;const a2={value:!1,isValid:!1},l2={value:!0,isValid:!0};var K5=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Qt(e[0].attributes.value)?Qt(e[0].value)||e[0].value===""?l2:{value:e[0].value,isValid:!0}:l2:a2}return a2};const u2={isValid:!1,value:null};var G5=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,u2):u2;function c2(e,t,n="validate"){if(mp(e)||Array.isArray(e)&&e.every(mp)||Nl(e)&&!e)return{type:n,message:mp(e)?e:"",ref:t}}var Wa=e=>ln(e)&&!bm(e)?e:{value:e,message:""},d2=async(e,t,n,r,i)=>{const{ref:o,refs:s,required:a,maxLength:l,minLength:u,min:c,max:d,pattern:f,validate:h,name:p,valueAsNumber:y,mount:S,disabled:v}=e._f,m=de(t,p);if(!S||v)return{};const b=s?s[0]:o,C=Y=>{r&&b.reportValidity&&(b.setCustomValidity(Nl(Y)?"":Y||""),b.reportValidity())},k={},x=yx(o),E=wf(o),R=x||E,M=(y||gx(o))&&Qt(o.value)&&Qt(m)||vm(o)&&o.value===""||m===""||Array.isArray(m)&&!m.length,L=OJ.bind(null,p,n,k),ne=(Y,Z,ie,he=Zi.maxLength,Ce=Zi.minLength)=>{const G=Y?Z:ie;k[p]={type:Y?he:Ce,message:G,ref:o,...L(Y?he:Ce,G)}};if(i?!Array.isArray(m)||!m.length:a&&(!R&&(M||Jn(m))||Nl(m)&&!m||E&&!K5(s).isValid||x&&!G5(s).isValid)){const{value:Y,message:Z}=mp(a)?{value:!!a,message:a}:Wa(a);if(Y&&(k[p]={type:Zi.required,message:Z,ref:b,...L(Zi.required,Z)},!n))return C(Z),k}if(!M&&(!Jn(c)||!Jn(d))){let Y,Z;const ie=Wa(d),he=Wa(c);if(!Jn(m)&&!isNaN(m)){const Ce=o.valueAsNumber||m&&+m;Jn(ie.value)||(Y=Ce>ie.value),Jn(he.value)||(Z=Ce<he.value)}else{const Ce=o.valueAsDate||new Date(m),G=se=>new Date(new Date().toDateString()+" "+se),V=o.type=="time",ee=o.type=="week";Ri(ie.value)&&m&&(Y=V?G(m)>G(ie.value):ee?m>ie.value:Ce>new Date(ie.value)),Ri(he.value)&&m&&(Z=V?G(m)<G(he.value):ee?m<he.value:Ce<new Date(he.value))}if((Y||Z)&&(ne(!!Y,ie.message,he.message,Zi.max,Zi.min),!n))return C(k[p].message),k}if((l||u)&&!M&&(Ri(m)||i&&Array.isArray(m))){const Y=Wa(l),Z=Wa(u),ie=!Jn(Y.value)&&m.length>+Y.value,he=!Jn(Z.value)&&m.length<+Z.value;if((ie||he)&&(ne(ie,Y.message,Z.message),!n))return C(k[p].message),k}if(f&&!M&&Ri(m)){const{value:Y,message:Z}=Wa(f);if(bm(Y)&&!m.match(Y)&&(k[p]={type:Zi.pattern,message:Z,ref:o,...L(Zi.pattern,Z)},!n))return C(Z),k}if(h){if(os(h)){const Y=await h(m,t),Z=c2(Y,b);if(Z&&(k[p]={...Z,...L(Zi.validate,Z.message)},!n))return C(Z.message),k}else if(ln(h)){let Y={};for(const Z in h){if(!Vr(Y)&&!n)break;const ie=c2(await h[Z](m,t),b,Z);ie&&(Y={...ie,...L(Z,ie.message)},C(ie.message),n&&(k[p]=Y))}if(!Vr(Y)&&(k[p]={ref:b,...Y},!n))return k}}return C(!0),k};function DJ(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Qt(e)?r++:e[t[r++]];return e}function MJ(e){for(const t in e)if(!Qt(e[t]))return!1;return!0}function bn(e,t){const n=Array.isArray(t)?t:mx(t)?[t]:q5(t),r=n.length===1?e:DJ(e,n),i=n.length-1,o=n[i];return r&&delete r[o],i!==0&&(ln(r)&&Vr(r)||Array.isArray(r)&&MJ(r))&&bn(e,n.slice(0,-1)),e}function yv(){let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}}var wm=e=>Jn(e)||!H5(e);function ra(e,t){if(wm(e)||wm(t))return e===t;if(bl(e)&&bl(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const o=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const s=t[i];if(bl(o)&&bl(s)||ln(o)&&ln(s)||Array.isArray(o)&&Array.isArray(s)?!ra(o,s):o!==s)return!1}}return!0}var Q5=e=>e.type==="select-multiple",LJ=e=>yx(e)||wf(e),vv=e=>vm(e)&&e.isConnected,Y5=e=>{for(const t in e)if(os(e[t]))return!0;return!1};function Sm(e,t={}){const n=Array.isArray(e);if(ln(e)||n)for(const r in e)Array.isArray(e[r])||ln(e[r])&&!Y5(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Sm(e[r],t[r])):Jn(e[r])||(t[r]=!0);return t}function X5(e,t,n){const r=Array.isArray(e);if(ln(e)||r)for(const i in e)Array.isArray(e[i])||ln(e[i])&&!Y5(e[i])?Qt(t)||wm(n[i])?n[i]=Array.isArray(e[i])?Sm(e[i],[]):{...Sm(e[i])}:X5(e[i],Jn(t)?{}:t[i],n[i]):n[i]=!ra(e[i],t[i]);return n}var bv=(e,t)=>X5(e,t,Sm(t)),J5=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Qt(e)?e:t?e===""?NaN:e&&+e:n&&Ri(e)?new Date(e):r?r(e):e;function wv(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return gx(t)?t.files:yx(t)?G5(e.refs).value:Q5(t)?[...t.selectedOptions].map(({value:n})=>n):wf(t)?K5(e.refs).value:J5(Qt(t.value)?e.ref.value:t.value,e)}var jJ=(e,t,n,r)=>{const i={};for(const o of e){const s=de(t,o);s&&St(i,o,s._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},rc=e=>Qt(e)?e:bm(e)?e.source:ln(e)?bm(e.value)?e.value.source:e.value:e,FJ=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function f2(e,t,n){const r=de(e,n);if(r||mx(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),s=de(t,o),a=de(e,o);if(s&&!Array.isArray(s)&&n!==o)return{name:n};if(a&&a.type)return{name:o,error:a};i.pop()}return{name:n}}var zJ=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,VJ=(e,t)=>!Sf(de(e,t)).length&&bn(e,t);const BJ={mode:ui.onSubmit,reValidateMode:ui.onChange,shouldFocusError:!0};function UJ(e={},t){let n={...BJ,...e},r={submitCount:0,isDirty:!1,isLoading:os(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},i={},o=ln(n.defaultValues)||ln(n.values)?Ks(n.defaultValues||n.values)||{}:{},s=n.shouldUnregister?{}:Ks(o),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,c=0;const d={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:yv(),array:yv(),state:yv()},h=e.resetOptions&&e.resetOptions.keepDirtyValues,p=o2(n.mode),y=o2(n.reValidateMode),S=n.criteriaMode===ui.all,v=T=>O=>{clearTimeout(c),c=setTimeout(T,O)},m=async T=>{if(d.isValid||T){const O=n.resolver?Vr((await M()).errors):await ne(i,!0);O!==r.isValid&&f.state.next({isValid:O})}},b=T=>d.isValidating&&f.state.next({isValidating:T}),C=(T,O=[],j,oe,X=!0,q=!0)=>{if(oe&&j){if(a.action=!0,q&&Array.isArray(de(i,T))){const ae=j(de(i,T),oe.argA,oe.argB);X&&St(i,T,ae)}if(q&&Array.isArray(de(r.errors,T))){const ae=j(de(r.errors,T),oe.argA,oe.argB);X&&St(r.errors,T,ae),VJ(r.errors,T)}if(d.touchedFields&&q&&Array.isArray(de(r.touchedFields,T))){const ae=j(de(r.touchedFields,T),oe.argA,oe.argB);X&&St(r.touchedFields,T,ae)}d.dirtyFields&&(r.dirtyFields=bv(o,s)),f.state.next({name:T,isDirty:Z(T,O),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else St(s,T,O)},k=(T,O)=>{St(r.errors,T,O),f.state.next({errors:r.errors})},x=(T,O,j,oe)=>{const X=de(i,T);if(X){const q=de(s,T,Qt(j)?de(o,T):j);Qt(q)||oe&&oe.defaultChecked||O?St(s,T,O?q:wv(X._f)):Ce(T,q),a.mount&&m()}},E=(T,O,j,oe,X)=>{let q=!1,ae=!1;const Ne={name:T};if(!j||oe){d.isDirty&&(ae=r.isDirty,r.isDirty=Ne.isDirty=Z(),q=ae!==Ne.isDirty);const st=ra(de(o,T),O);ae=de(r.dirtyFields,T),st?bn(r.dirtyFields,T):St(r.dirtyFields,T,!0),Ne.dirtyFields=r.dirtyFields,q=q||d.dirtyFields&&ae!==!st}if(j){const st=de(r.touchedFields,T);st||(St(r.touchedFields,T,j),Ne.touchedFields=r.touchedFields,q=q||d.touchedFields&&st!==j)}return q&&X&&f.state.next(Ne),q?Ne:{}},R=(T,O,j,oe)=>{const X=de(r.errors,T),q=d.isValid&&Nl(O)&&r.isValid!==O;if(e.delayError&&j?(u=v(()=>k(T,j)),u(e.delayError)):(clearTimeout(c),u=null,j?St(r.errors,T,j):bn(r.errors,T)),(j?!ra(X,j):X)||!Vr(oe)||q){const ae={...oe,...q&&Nl(O)?{isValid:O}:{},errors:r.errors,name:T};r={...r,...ae},f.state.next(ae)}b(!1)},M=async T=>n.resolver(s,n.context,jJ(T||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation)),L=async T=>{const{errors:O}=await M();if(T)for(const j of T){const oe=de(O,j);oe?St(r.errors,j,oe):bn(r.errors,j)}else r.errors=O;return O},ne=async(T,O,j={valid:!0})=>{for(const oe in T){const X=T[oe];if(X){const{_f:q,...ae}=X;if(q){const Ne=l.array.has(q.name),st=await d2(X,s,S,n.shouldUseNativeValidation&&!O,Ne);if(st[q.name]&&(j.valid=!1,O))break;!O&&(de(st,q.name)?Ne?NJ(r.errors,st,q.name):St(r.errors,q.name,st[q.name]):bn(r.errors,q.name))}ae&&await ne(ae,O,j)}}return j.valid},Y=()=>{for(const T of l.unMount){const O=de(i,T);O&&(O._f.refs?O._f.refs.every(j=>!vv(j)):!vv(O._f.ref))&&$e(T)}l.unMount=new Set},Z=(T,O)=>(T&&O&&St(s,T,O),!ra(ue(),o)),ie=(T,O,j)=>$J(T,l,{...a.mount?s:Qt(O)?o:Ri(T)?{[T]:O}:O},j,O),he=T=>Sf(de(a.mount?s:o,T,e.shouldUnregister?de(o,T,[]):[])),Ce=(T,O,j={})=>{const oe=de(i,T);let X=O;if(oe){const q=oe._f;q&&(!q.disabled&&St(s,T,J5(O,q)),X=vm(q.ref)&&Jn(O)?"":O,Q5(q.ref)?[...q.ref.options].forEach(ae=>ae.selected=X.includes(ae.value)):q.refs?wf(q.ref)?q.refs.length>1?q.refs.forEach(ae=>(!ae.defaultChecked||!ae.disabled)&&(ae.checked=Array.isArray(X)?!!X.find(Ne=>Ne===ae.value):X===ae.value)):q.refs[0]&&(q.refs[0].checked=!!X):q.refs.forEach(ae=>ae.checked=ae.value===X):gx(q.ref)?q.ref.value="":(q.ref.value=X,q.ref.type||f.values.next({name:T,values:{...s}})))}(j.shouldDirty||j.shouldTouch)&&E(T,X,j.shouldTouch,j.shouldDirty,!0),j.shouldValidate&&se(T)},G=(T,O,j)=>{for(const oe in O){const X=O[oe],q=`${T}.${oe}`,ae=de(i,q);(l.array.has(T)||!wm(X)||ae&&!ae._f)&&!bl(X)?G(q,X,j):Ce(q,X,j)}},V=(T,O,j={})=>{const oe=de(i,T),X=l.array.has(T),q=Ks(O);St(s,T,q),X?(f.array.next({name:T,values:{...s}}),(d.isDirty||d.dirtyFields)&&j.shouldDirty&&f.state.next({name:T,dirtyFields:bv(o,s),isDirty:Z(T,q)})):oe&&!oe._f&&!Jn(q)?G(T,q,j):Ce(T,q,j),s2(T,l)&&f.state.next({...r}),f.values.next({name:T,values:{...s}}),!a.mount&&t()},ee=async T=>{const O=T.target;let j=O.name,oe=!0;const X=de(i,j),q=()=>O.type?wv(X._f):EJ(T);if(X){let ae,Ne;const st=q(),ni=T.type===i2.BLUR||T.type===i2.FOCUS_OUT,zs=!FJ(X._f)&&!n.resolver&&!de(r.errors,j)&&!X._f.deps||zJ(ni,de(r.touchedFields,j),r.isSubmitted,y,p),Yi=s2(j,l,ni);St(s,j,st),ni?(X._f.onBlur&&X._f.onBlur(T),u&&u(0)):X._f.onChange&&X._f.onChange(T);const vi=E(j,st,ni,!1),F=!Vr(vi)||Yi;if(!ni&&f.values.next({name:j,type:T.type,values:{...s}}),zs)return d.isValid&&m(),F&&f.state.next({name:j,...Yi?{}:vi});if(!ni&&Yi&&f.state.next({...r}),b(!0),n.resolver){const{errors:A}=await M([j]),K=f2(r.errors,i,j),W=f2(A,i,K.name||j);ae=W.error,j=W.name,Ne=Vr(A)}else ae=(await d2(X,s,S,n.shouldUseNativeValidation))[j],oe=isNaN(st)||st===de(s,j,st),oe&&(ae?Ne=!1:d.isValid&&(Ne=await ne(i,!0)));oe&&(X._f.deps&&se(X._f.deps),R(j,Ne,ae,vi))}},se=async(T,O={})=>{let j,oe;const X=gv(T);if(b(!0),n.resolver){const q=await L(Qt(T)?T:X);j=Vr(q),oe=T?!X.some(ae=>de(q,ae)):j}else T?(oe=(await Promise.all(X.map(async q=>{const ae=de(i,q);return await ne(ae&&ae._f?{[q]:ae}:ae)}))).every(Boolean),!(!oe&&!r.isValid)&&m()):oe=j=await ne(i);return f.state.next({...!Ri(T)||d.isValid&&j!==r.isValid?{}:{name:T},...n.resolver||!T?{isValid:j}:{},errors:r.errors,isValidating:!1}),O.shouldFocus&&!oe&&Nb(i,q=>q&&de(r.errors,q),T?X:l.mount),oe},ue=T=>{const O={...o,...a.mount?s:{}};return Qt(T)?O:Ri(T)?de(O,T):T.map(j=>de(O,j))},ke=(T,O)=>({invalid:!!de((O||r).errors,T),isDirty:!!de((O||r).dirtyFields,T),isTouched:!!de((O||r).touchedFields,T),error:de((O||r).errors,T)}),Se=T=>{T&&gv(T).forEach(O=>bn(r.errors,O)),f.state.next({errors:T?r.errors:{}})},Te=(T,O,j)=>{const oe=(de(i,T,{_f:{}})._f||{}).ref;St(r.errors,T,{...O,ref:oe}),f.state.next({name:T,errors:r.errors,isValid:!1}),j&&j.shouldFocus&&oe&&oe.focus&&oe.focus()},yt=(T,O)=>os(T)?f.values.subscribe({next:j=>T(ie(void 0,O),j)}):ie(T,O,!0),$e=(T,O={})=>{for(const j of T?gv(T):l.mount)l.mount.delete(j),l.array.delete(j),O.keepValue||(bn(i,j),bn(s,j)),!O.keepError&&bn(r.errors,j),!O.keepDirty&&bn(r.dirtyFields,j),!O.keepTouched&&bn(r.touchedFields,j),!n.shouldUnregister&&!O.keepDefaultValue&&bn(o,j);f.values.next({values:{...s}}),f.state.next({...r,...O.keepDirty?{isDirty:Z()}:{}}),!O.keepIsValid&&m()},Bt=(T,O={})=>{let j=de(i,T);const oe=Nl(O.disabled);return St(i,T,{...j||{},_f:{...j&&j._f?j._f:{ref:{name:T}},name:T,mount:!0,...O}}),l.mount.add(T),j?oe&&St(s,T,O.disabled?void 0:de(s,T,wv(j._f))):x(T,!0,O.value),{...oe?{disabled:O.disabled}:{},...n.shouldUseNativeValidation?{required:!!O.required,min:rc(O.min),max:rc(O.max),minLength:rc(O.minLength),maxLength:rc(O.maxLength),pattern:rc(O.pattern)}:{},name:T,onChange:ee,onBlur:ee,ref:X=>{if(X){Bt(T,O),j=de(i,T);const q=Qt(X.value)&&X.querySelectorAll&&X.querySelectorAll("input,select,textarea")[0]||X,ae=LJ(q),Ne=j._f.refs||[];if(ae?Ne.find(st=>st===q):q===j._f.ref)return;St(i,T,{_f:{...j._f,...ae?{refs:[...Ne.filter(vv),q,...Array.isArray(de(o,T))?[{}]:[]],ref:{type:q.type,name:T}}:{ref:q}}}),x(T,!1,void 0,q)}else j=de(i,T,{}),j._f&&(j._f.mount=!1),(n.shouldUnregister||O.shouldUnregister)&&!(TJ(l.array,T)&&a.action)&&l.unMount.add(T)}}},Kn=()=>n.shouldFocusError&&Nb(i,T=>T&&de(r.errors,T),l.mount),Gn=(T,O)=>async j=>{j&&(j.preventDefault&&j.preventDefault(),j.persist&&j.persist());let oe=Ks(s);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:X,values:q}=await M();r.errors=X,oe=q}else await ne(i);bn(r.errors,"root"),Vr(r.errors)?(f.state.next({errors:{}}),await T(oe,j)):(O&&await O({...r.errors},j),Kn(),setTimeout(Kn)),f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Vr(r.errors),submitCount:r.submitCount+1,errors:r.errors})},Xe=(T,O={})=>{de(i,T)&&(Qt(O.defaultValue)?V(T,de(o,T)):(V(T,O.defaultValue),St(o,T,O.defaultValue)),O.keepTouched||bn(r.touchedFields,T),O.keepDirty||(bn(r.dirtyFields,T),r.isDirty=O.defaultValue?Z(T,de(o,T)):Z()),O.keepError||(bn(r.errors,T),d.isValid&&m()),f.state.next({...r}))},lt=(T,O={})=>{const j=T||o,oe=Ks(j),X=T&&!Vr(T)?oe:o;if(O.keepDefaultValues||(o=j),!O.keepValues){if(O.keepDirtyValues||h)for(const q of l.mount)de(r.dirtyFields,q)?St(X,q,de(s,q)):V(q,de(X,q));else{if(px&&Qt(T))for(const q of l.mount){const ae=de(i,q);if(ae&&ae._f){const Ne=Array.isArray(ae._f.refs)?ae._f.refs[0]:ae._f.ref;if(vm(Ne)){const st=Ne.closest("form");if(st){st.reset();break}}}}i={}}s=e.shouldUnregister?O.keepDefaultValues?Ks(o):{}:oe,f.array.next({values:{...X}}),f.values.next({values:{...X}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!a.mount&&t(),a.mount=!d.isValid||!!O.keepIsValid,a.watch=!!e.shouldUnregister,f.state.next({submitCount:O.keepSubmitCount?r.submitCount:0,isDirty:O.keepDirty?r.isDirty:!!(O.keepDefaultValues&&!ra(T,o)),isSubmitted:O.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:O.keepDirtyValues?r.dirtyFields:O.keepDefaultValues&&T?bv(o,T):{},touchedFields:O.keepTouched?r.touchedFields:{},errors:O.keepErrors?r.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},Qn=(T,O)=>lt(os(T)?T(s):T,O);return{control:{register:Bt,unregister:$e,getFieldState:ke,_executeSchema:M,_getWatch:ie,_getDirty:Z,_updateValid:m,_removeUnmounted:Y,_updateFieldArray:C,_getFieldArray:he,_reset:lt,_resetDefaultValues:()=>os(n.defaultValues)&&n.defaultValues().then(T=>{Qn(T,n.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:T=>{r={...r,...T}},_subjects:f,_proxyFormState:d,get _fields(){return i},get _formValues(){return s},get _state(){return a},set _state(T){a=T},get _defaultValues(){return o},get _names(){return l},set _names(T){l=T},get _formState(){return r},set _formState(T){r=T},get _options(){return n},set _options(T){n={...n,...T}}},trigger:se,register:Bt,handleSubmit:Gn,watch:yt,setValue:V,getValues:ue,reset:Qn,resetField:Xe,clearErrors:Se,unregister:$e,setError:Te,setFocus:(T,O={})=>{const j=de(i,T),oe=j&&j._f;if(oe){const X=oe.refs?oe.refs[0]:oe.ref;X.focus&&(X.focus(),O.shouldSelect&&X.select())}},getFieldState:ke}}function Z5(e={}){const t=ur.useRef(),[n,r]=ur.useState({isDirty:!1,isValidating:!1,isLoading:os(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:os(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...UJ(e,()=>r(o=>({...o}))),formState:n});const i=t.current.control;return i._options=e,RJ({subject:i._subjects.state,next:o=>{AJ(o,i._proxyFormState,i._updateFormState,!0)&&r({...i._formState})}}),ur.useEffect(()=>{e.values&&!ra(e.values,i._defaultValues)?i._reset(e.values,i._options.resetOptions):i._resetDefaultValues()},[e.values,i]),ur.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=IJ(n,i),t.current}let WJ=({})=>{const{register:e,handleSubmit:t}=Z5(),n=t(r=>{console.log({...r})});return g.jsxs(rn,{w:"100%",h:"90vh",justify:"center",children:[g.jsxs(Ze,{w:"50%",as:"form",gap:"0px",bgColor:"text.200",borderRadius:"5px",onSubmit:n,children:[g.jsx(Kg,{...e("search"),placeholder:"Search Movie/TV Series",fontFamily:"Nunito",fontWeight:"semibold",type:"text",_placeholder:{color:"dark.800"},borderRadius:"5px",bgColor:"transparent",border:"none",outline:"none",_focusVisible:{outlineColor:"none",outlineWidth:"0px"},fontSize:"xxs",color:"dark.500"}),g.jsx(Cn,{type:"submit",bg:"transparent",_hover:{bg:"tranparent"},borderRadius:"0px",borderRightRadius:"5px",children:g.jsx(_J,{color:"dark.900",fontSize:"sm"})})]}),g.jsx(Q,{fontFamily:"Nunito",color:"brand.400",fontSize:"xs",children:"Watch Movies/TV Servies online in HD for free"}),g.jsx(Cn,{fontFamily:"Nunito",fontWeight:"bold",fontSize:"sm",p:"5px 30px",height:"35px",color:"dark.700",bgColor:"brand.400",_hover:{bgColor:"brand.500"},children:"Watch Now"})]})};const HJ="/assets/BackgroundImage-966ad5d5.png";var vx={},eN={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(eN);var Nr=eN.exports,Sv={};function Ja(e){return e!==null&&typeof e=="object"&&e.constructor===Object}function tN(e){if(!Ja(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=tN(e[n])}),t}function go(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return Ja(e)&&Ja(t)&&Object.keys(t).forEach(i=>{i!=="__proto__"&&(Ja(t[i])&&i in e&&Ja(e[i])?r[i]=go(e[i],t[i],n):n.clone?r[i]=Ja(t[i])?tN(t[i]):t[i]:r[i]=t[i])}),r}function ou(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}function zi(e){if(typeof e!="string")throw new Error(ou(7));return e.charAt(0).toUpperCase()+e.slice(1)}function qJ(...e){return e.reduce((t,n)=>n==null?t:function(...i){t.apply(this,i),n.apply(this,i)},()=>{})}function KJ(e,t=166){let n;function r(...i){const o=()=>{e.apply(this,i)};clearTimeout(n),n=setTimeout(o,t)}return r.clear=()=>{clearTimeout(n)},r}function GJ(e,t){return()=>null}function QJ(e,t){return w.isValidElement(e)&&t.indexOf(e.type.muiName)!==-1}function nN(e){return e&&e.ownerDocument||document}function YJ(e){return nN(e).defaultView||window}function XJ(e,t){return()=>null}function rN(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const JJ=typeof window<"u"?w.useLayoutEffect:w.useEffect,iN=JJ;let h2=0;function ZJ(e){const[t,n]=w.useState(e),r=e||t;return w.useEffect(()=>{t==null&&(h2+=1,n(`mui-${h2}`))},[t]),r}const p2=i1["useId".toString()];function eZ(e){if(p2!==void 0){const t=p2();return e??t}return ZJ(e)}function tZ(e,t,n,r,i){return null}function nZ({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=w.useRef(e!==void 0),[o,s]=w.useState(t),a=i?e:o,l=w.useCallback(u=>{i||s(u)},[]);return[a,l]}function rZ(e){const t=w.useRef(e);return iN(()=>{t.current=e}),w.useCallback((...n)=>(0,t.current)(...n),[])}function iZ(...e){return w.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{rN(n,t)})},e)}let Gg=!0,Db=!1,m2;const oZ={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function sZ(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&oZ[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function aZ(e){e.metaKey||e.altKey||e.ctrlKey||(Gg=!0)}function xv(){Gg=!1}function lZ(){this.visibilityState==="hidden"&&Db&&(Gg=!0)}function uZ(e){e.addEventListener("keydown",aZ,!0),e.addEventListener("mousedown",xv,!0),e.addEventListener("pointerdown",xv,!0),e.addEventListener("touchstart",xv,!0),e.addEventListener("visibilitychange",lZ,!0)}function cZ(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Gg||sZ(t)}function dZ(){const e=w.useCallback(i=>{i!=null&&uZ(i.ownerDocument)},[]),t=w.useRef(!1);function n(){return t.current?(Db=!0,window.clearTimeout(m2),m2=window.setTimeout(()=>{Db=!1},100),t.current=!1,!0):!1}function r(i){return cZ(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function oN(e,t){const n={...t};return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]={...e[r],...n[r]};else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]={...o},Object.keys(i).forEach(s=>{n[r][s]=oN(i[s],o[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function fZ(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,s)=>{if(s){const a=t(s);a!==""&&o.push(a),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}const g2=e=>e,hZ=()=>{let e=g2;return{configure(t){e=t},generate(t){return e(t)},reset(){e=g2}}},pZ=hZ(),sN=pZ,mZ={active:"active",checked:"checked",completed:"completed",disabled:"disabled",readOnly:"readOnly",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function aN(e,t,n="Mui"){const r=mZ[t];return r?`${n}-${r}`:`${sN.generate(e)}-${t}`}function gZ(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=aN(e,i,n)}),r}function lN(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=lN(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function yZ(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=lN(e))&&(r&&(r+=" "),r+=t);return r}/**
 * @mui/styled-engine v5.13.2
 *
 * @license MIT
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */function vZ(e,t){return Td(e,t)}const bZ=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},wZ=["values","unit","step"],SZ=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>je({},n,{[r.key]:r.val}),{})};function xZ(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Oo(e,wZ),o=SZ(t),s=Object.keys(o);function a(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function l(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function u(f,h){const p=s.indexOf(h);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(p!==-1&&typeof t[s[p]]=="number"?t[s[p]]:h)-r/100}${n})`}function c(f){return s.indexOf(f)+1<s.length?u(f,s[s.indexOf(f)+1]):a(f)}function d(f){const h=s.indexOf(f);return h===0?a(s[1]):h===s.length-1?l(s[h]):u(f,s[s.indexOf(f)+1]).replace("@media","@media not all and")}return je({keys:s,values:o,up:a,down:l,between:u,only:c,not:d,unit:n},i)}const _Z={borderRadius:4},CZ=_Z;function Qc(e,t){return t?go(e,t,{clone:!1}):e}const bx={xs:0,sm:600,md:900,lg:1200,xl:1536},y2={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${bx[e]}px)`};function Co(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||y2;return t.reduce((s,a,l)=>(s[o.up(o.keys[l])]=n(t[l]),s),{})}if(typeof t=="object"){const o=r.breakpoints||y2;return Object.keys(t).reduce((s,a)=>{if(Object.keys(o.values||bx).indexOf(a)!==-1){const l=o.up(a);s[l]=n(t[a],a)}else{const l=a;s[l]=t[l]}return s},{})}return n(t)}function EZ(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function kZ(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Qg(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function xm(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Qg(e,n)||r,t&&(i=t(i,r,e)),i}function Ye(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=s=>{if(s[t]==null)return null;const a=s[t],l=s.theme,u=Qg(l,r)||{};return Co(s,a,d=>{let f=xm(u,i,d);return d===f&&typeof d=="string"&&(f=xm(u,i,`${t}${d==="default"?"":zi(d)}`,d)),n===!1?f:{[n]:f}})};return o.propTypes={},o.filterProps=[t],o}function TZ(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const PZ={m:"margin",p:"padding"},IZ={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},v2={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},AZ=TZ(e=>{if(e.length>2)if(v2[e])e=v2[e];else return[e];const[t,n]=e.split(""),r=PZ[t],i=IZ[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),wx=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Sx=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...wx,...Sx];function xf(e,t,n,r){var i;const o=(i=Qg(e,t,!1))!=null?i:n;return typeof o=="number"?s=>typeof s=="string"?s:o*s:Array.isArray(o)?s=>typeof s=="string"?s:o[s]:typeof o=="function"?o:()=>{}}function uN(e){return xf(e,"spacing",8)}function _f(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function RZ(e,t){return n=>e.reduce((r,i)=>(r[i]=_f(t,n),r),{})}function $Z(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=AZ(n),o=RZ(i,r),s=e[n];return Co(e,s,o)}function cN(e,t){const n=uN(e.theme);return Object.keys(e).map(r=>$Z(e,t,r,n)).reduce(Qc,{})}function Mt(e){return cN(e,wx)}Mt.propTypes={};Mt.filterProps=wx;function Lt(e){return cN(e,Sx)}Lt.propTypes={};Lt.filterProps=Sx;function OZ(e=8){if(e.mui)return e;const t=uN({spacing:e}),n=(...r)=>(r.length===0?[1]:r).map(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function Yg(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?Qc(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Pi(e){return typeof e!="number"?e:`${e}px solid`}const NZ=Ye({prop:"border",themeKey:"borders",transform:Pi}),DZ=Ye({prop:"borderTop",themeKey:"borders",transform:Pi}),MZ=Ye({prop:"borderRight",themeKey:"borders",transform:Pi}),LZ=Ye({prop:"borderBottom",themeKey:"borders",transform:Pi}),jZ=Ye({prop:"borderLeft",themeKey:"borders",transform:Pi}),FZ=Ye({prop:"borderColor",themeKey:"palette"}),zZ=Ye({prop:"borderTopColor",themeKey:"palette"}),VZ=Ye({prop:"borderRightColor",themeKey:"palette"}),BZ=Ye({prop:"borderBottomColor",themeKey:"palette"}),UZ=Ye({prop:"borderLeftColor",themeKey:"palette"}),Xg=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=xf(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:_f(t,r)});return Co(e,e.borderRadius,n)}return null};Xg.propTypes={};Xg.filterProps=["borderRadius"];Yg(NZ,DZ,MZ,LZ,jZ,FZ,zZ,VZ,BZ,UZ,Xg);const Jg=e=>{if(e.gap!==void 0&&e.gap!==null){const t=xf(e.theme,"spacing",8),n=r=>({gap:_f(t,r)});return Co(e,e.gap,n)}return null};Jg.propTypes={};Jg.filterProps=["gap"];const Zg=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=xf(e.theme,"spacing",8),n=r=>({columnGap:_f(t,r)});return Co(e,e.columnGap,n)}return null};Zg.propTypes={};Zg.filterProps=["columnGap"];const ey=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=xf(e.theme,"spacing",8),n=r=>({rowGap:_f(t,r)});return Co(e,e.rowGap,n)}return null};ey.propTypes={};ey.filterProps=["rowGap"];const WZ=Ye({prop:"gridColumn"}),HZ=Ye({prop:"gridRow"}),qZ=Ye({prop:"gridAutoFlow"}),KZ=Ye({prop:"gridAutoColumns"}),GZ=Ye({prop:"gridAutoRows"}),QZ=Ye({prop:"gridTemplateColumns"}),YZ=Ye({prop:"gridTemplateRows"}),XZ=Ye({prop:"gridTemplateAreas"}),JZ=Ye({prop:"gridArea"});Yg(Jg,Zg,ey,WZ,HZ,qZ,KZ,GZ,QZ,YZ,XZ,JZ);function Dl(e,t){return t==="grey"?t:e}const ZZ=Ye({prop:"color",themeKey:"palette",transform:Dl}),eee=Ye({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Dl}),tee=Ye({prop:"backgroundColor",themeKey:"palette",transform:Dl});Yg(ZZ,eee,tee);function Sr(e){return e<=1&&e!==0?`${e*100}%`:e}const nee=Ye({prop:"width",transform:Sr}),xx=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,i,o;return{maxWidth:((r=e.theme)==null||(i=r.breakpoints)==null||(o=i.values)==null?void 0:o[n])||bx[n]||Sr(n)}};return Co(e,e.maxWidth,t)}return null};xx.filterProps=["maxWidth"];const ree=Ye({prop:"minWidth",transform:Sr}),iee=Ye({prop:"height",transform:Sr}),oee=Ye({prop:"maxHeight",transform:Sr}),see=Ye({prop:"minHeight",transform:Sr});Ye({prop:"size",cssProperty:"width",transform:Sr});Ye({prop:"size",cssProperty:"height",transform:Sr});const aee=Ye({prop:"boxSizing"});Yg(nee,xx,ree,iee,oee,see,aee);const lee={border:{themeKey:"borders",transform:Pi},borderTop:{themeKey:"borders",transform:Pi},borderRight:{themeKey:"borders",transform:Pi},borderBottom:{themeKey:"borders",transform:Pi},borderLeft:{themeKey:"borders",transform:Pi},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Xg},color:{themeKey:"palette",transform:Dl},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Dl},backgroundColor:{themeKey:"palette",transform:Dl},p:{style:Lt},pt:{style:Lt},pr:{style:Lt},pb:{style:Lt},pl:{style:Lt},px:{style:Lt},py:{style:Lt},padding:{style:Lt},paddingTop:{style:Lt},paddingRight:{style:Lt},paddingBottom:{style:Lt},paddingLeft:{style:Lt},paddingX:{style:Lt},paddingY:{style:Lt},paddingInline:{style:Lt},paddingInlineStart:{style:Lt},paddingInlineEnd:{style:Lt},paddingBlock:{style:Lt},paddingBlockStart:{style:Lt},paddingBlockEnd:{style:Lt},m:{style:Mt},mt:{style:Mt},mr:{style:Mt},mb:{style:Mt},ml:{style:Mt},mx:{style:Mt},my:{style:Mt},margin:{style:Mt},marginTop:{style:Mt},marginRight:{style:Mt},marginBottom:{style:Mt},marginLeft:{style:Mt},marginX:{style:Mt},marginY:{style:Mt},marginInline:{style:Mt},marginInlineStart:{style:Mt},marginInlineEnd:{style:Mt},marginBlock:{style:Mt},marginBlockStart:{style:Mt},marginBlockEnd:{style:Mt},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Jg},rowGap:{style:ey},columnGap:{style:Zg},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Sr},maxWidth:{style:xx},minWidth:{transform:Sr},height:{transform:Sr},maxHeight:{transform:Sr},minHeight:{transform:Sr},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},_x=lee;function uee(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function cee(e,t){return typeof e=="function"?e(t):e}function dee(){function e(n,r,i,o){const s={[n]:r,theme:i},a=o[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:u,transform:c,style:d}=a;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const f=Qg(i,u)||{};return d?d(s):Co(s,r,p=>{let y=xm(f,c,p);return p===y&&typeof p=="string"&&(y=xm(f,c,`${n}${p==="default"?"":zi(p)}`,p)),l===!1?y:{[l]:y}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const s=(r=o.unstable_sxConfig)!=null?r:_x;function a(l){let u=l;if(typeof l=="function")u=l(o);else if(typeof l!="object")return l;if(!u)return null;const c=EZ(o.breakpoints),d=Object.keys(c);let f=c;return Object.keys(u).forEach(h=>{const p=cee(u[h],o);if(p!=null)if(typeof p=="object")if(s[h])f=Qc(f,e(h,p,o,s));else{const y=Co({theme:o},p,S=>({[h]:S}));uee(y,p)?f[h]=t({sx:p,theme:o}):f=Qc(f,y)}else f=Qc(f,e(h,p,o,s))}),kZ(d,f)}return Array.isArray(i)?i.map(a):a(i)}return t}const dN=dee();dN.filterProps=["sx"];const Cx=dN,fee=["breakpoints","palette","spacing","shape"];function Ex(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,s=Oo(e,fee),a=xZ(n),l=OZ(i);let u=go({breakpoints:a,direction:"ltr",components:{},palette:je({mode:"light"},r),spacing:l,shape:je({},CZ,o)},s);return u=t.reduce((c,d)=>go(c,d),u),u.unstable_sxConfig=je({},_x,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(d){return Cx({sx:d,theme:this})},u}function hee(e){return Object.keys(e).length===0}function pee(e=null){const t=w.useContext(Zl);return!t||hee(t)?e:t}const mee=Ex();function gee(e=mee){return pee(e)}const yee=["variant"];function b2(e){return e.length===0}function fN(e){const{variant:t}=e,n=Oo(e,yee);let r=t||"";return Object.keys(n).sort().forEach(i=>{i==="color"?r+=b2(r)?e[i]:zi(e[i]):r+=`${b2(r)?i:zi(i)}${zi(e[i].toString())}`}),r}const vee=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function bee(e){return Object.keys(e).length===0}function wee(e){return typeof e=="string"&&e.charCodeAt(0)>96}const See=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,xee=(e,t)=>{let n=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(n=t.components[e].variants);const r={};return n.forEach(i=>{const o=fN(i.props);r[o]=i.style}),r},_ee=(e,t,n,r)=>{var i,o;const{ownerState:s={}}=e,a=[],l=n==null||(i=n.components)==null||(o=i[r])==null?void 0:o.variants;return l&&l.forEach(u=>{let c=!0;Object.keys(u.props).forEach(d=>{s[d]!==u.props[d]&&e[d]!==u.props[d]&&(c=!1)}),c&&a.push(t[fN(u.props)])}),a};function gp(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Cee=Ex();function ic({defaultTheme:e,theme:t,themeId:n}){return bee(t)?e:t[n]||t}function Eee(e={}){const{themeId:t,defaultTheme:n=Cee,rootShouldForwardProp:r=gp,slotShouldForwardProp:i=gp}=e,o=s=>Cx(je({},s,{theme:ic(je({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,a={})=>{bZ(s,C=>C.filter(k=>!(k!=null&&k.__mui_systemSx)));const{name:l,slot:u,skipVariantsResolver:c,skipSx:d,overridesResolver:f}=a,h=Oo(a,vee),p=c!==void 0?c:u&&u!=="Root"||!1,y=d||!1;let S,v=gp;u==="Root"?v=r:u?v=i:wee(s)&&(v=void 0);const m=vZ(s,je({shouldForwardProp:v,label:S},h)),b=(C,...k)=>{const x=k?k.map(L=>typeof L=="function"&&L.__emotion_real!==L?ne=>L(je({},ne,{theme:ic(je({},ne,{defaultTheme:n,themeId:t}))})):L):[];let E=C;l&&f&&x.push(L=>{const ne=ic(je({},L,{defaultTheme:n,themeId:t})),Y=See(l,ne);if(Y){const Z={};return Object.entries(Y).forEach(([ie,he])=>{Z[ie]=typeof he=="function"?he(je({},L,{theme:ne})):he}),f(L,Z)}return null}),l&&!p&&x.push(L=>{const ne=ic(je({},L,{defaultTheme:n,themeId:t}));return _ee(L,xee(l,ne),ne,l)}),y||x.push(o);const R=x.length-k.length;if(Array.isArray(C)&&R>0){const L=new Array(R).fill("");E=[...C,...L],E.raw=[...C.raw,...L]}else typeof C=="function"&&C.__emotion_real!==C&&(E=L=>C(je({},L,{theme:ic(je({},L,{defaultTheme:n,themeId:t}))})));const M=m(E,...x);return s.muiName&&(M.muiName=s.muiName),M};return m.withConfig&&(b.withConfig=m.withConfig),b}}function kee(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:oN(t.components[n].defaultProps,r)}function Tee({props:e,name:t,defaultTheme:n,themeId:r}){let i=gee(n);return r&&(i=i[r]||i),kee({theme:i,name:t,props:e})}function hN(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function Pee(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function su(e){if(e.type)return e;if(e.charAt(0)==="#")return su(Pee(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(ou(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error(ou(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}function kx(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((i,o)=>o<3?parseInt(i,10):i):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function Iee(e){e=su(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),s=(u,c=(u+n/30)%12)=>i-o*Math.max(Math.min(c-3,9-c,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(a+="a",l.push(t[3])),kx({type:a,values:l})}function w2(e){e=su(e);let t=e.type==="hsl"||e.type==="hsla"?su(Iee(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Aee(e,t){const n=w2(e),r=w2(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Ree(e,t){if(e=su(e),t=hN(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return kx(e)}function $ee(e,t){if(e=su(e),t=hN(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return kx(e)}function Oee(e,t){return je({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const Nee={black:"#000",white:"#fff"},Od=Nee,Dee={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Mee=Dee,Lee={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Ha=Lee,jee={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},qa=jee,Fee={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},oc=Fee,zee={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Ka=zee,Vee={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Ga=Vee,Bee={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Qa=Bee,Uee=["mode","contrastThreshold","tonalOffset"],S2={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Od.white,default:Od.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},_v={text:{primary:Od.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Od.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function x2(e,t,n,r){const i=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=$ee(e.main,i):t==="dark"&&(e.dark=Ree(e.main,o)))}function Wee(e="light"){return e==="dark"?{main:Ka[200],light:Ka[50],dark:Ka[400]}:{main:Ka[700],light:Ka[400],dark:Ka[800]}}function Hee(e="light"){return e==="dark"?{main:Ha[200],light:Ha[50],dark:Ha[400]}:{main:Ha[500],light:Ha[300],dark:Ha[700]}}function qee(e="light"){return e==="dark"?{main:qa[500],light:qa[300],dark:qa[700]}:{main:qa[700],light:qa[400],dark:qa[800]}}function Kee(e="light"){return e==="dark"?{main:Ga[400],light:Ga[300],dark:Ga[700]}:{main:Ga[700],light:Ga[500],dark:Ga[900]}}function Gee(e="light"){return e==="dark"?{main:Qa[400],light:Qa[300],dark:Qa[700]}:{main:Qa[800],light:Qa[500],dark:Qa[900]}}function Qee(e="light"){return e==="dark"?{main:oc[400],light:oc[300],dark:oc[700]}:{main:"#ed6c02",light:oc[500],dark:oc[900]}}function Yee(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=Oo(e,Uee),o=e.primary||Wee(t),s=e.secondary||Hee(t),a=e.error||qee(t),l=e.info||Kee(t),u=e.success||Gee(t),c=e.warning||Qee(t);function d(y){return Aee(y,_v.text.primary)>=n?_v.text.primary:S2.text.primary}const f=({color:y,name:S,mainShade:v=500,lightShade:m=300,darkShade:b=700})=>{if(y=je({},y),!y.main&&y[v]&&(y.main=y[v]),!y.hasOwnProperty("main"))throw new Error(ou(11,S?` (${S})`:"",v));if(typeof y.main!="string")throw new Error(ou(12,S?` (${S})`:"",JSON.stringify(y.main)));return x2(y,"light",m,r),x2(y,"dark",b,r),y.contrastText||(y.contrastText=d(y.main)),y},h={dark:_v,light:S2};return go(je({common:je({},Od),mode:t,primary:f({color:o,name:"primary"}),secondary:f({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:a,name:"error"}),warning:f({color:c,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:u,name:"success"}),grey:Mee,contrastThreshold:n,getContrastText:d,augmentColor:f,tonalOffset:r},h[t]),i)}const Xee=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Jee(e){return Math.round(e*1e5)/1e5}const _2={textTransform:"uppercase"},C2='"Roboto", "Helvetica", "Arial", sans-serif';function Zee(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=C2,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:u=16,allVariants:c,pxToRem:d}=n,f=Oo(n,Xee),h=i/14,p=d||(v=>`${v/u*h}rem`),y=(v,m,b,C,k)=>je({fontFamily:r,fontWeight:v,fontSize:p(m),lineHeight:b},r===C2?{letterSpacing:`${Jee(C/m)}em`}:{},k,c),S={h1:y(o,96,1.167,-1.5),h2:y(o,60,1.2,-.5),h3:y(s,48,1.167,0),h4:y(s,34,1.235,.25),h5:y(s,24,1.334,0),h6:y(a,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(a,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(a,14,1.75,.4,_2),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,_2),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return go(je({htmlFontSize:u,pxToRem:p,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},S),f,{clone:!1})}const ete=.2,tte=.14,nte=.12;function wt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${ete})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${tte})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${nte})`].join(",")}const rte=["none",wt(0,2,1,-1,0,1,1,0,0,1,3,0),wt(0,3,1,-2,0,2,2,0,0,1,5,0),wt(0,3,3,-2,0,3,4,0,0,1,8,0),wt(0,2,4,-1,0,4,5,0,0,1,10,0),wt(0,3,5,-1,0,5,8,0,0,1,14,0),wt(0,3,5,-1,0,6,10,0,0,1,18,0),wt(0,4,5,-2,0,7,10,1,0,2,16,1),wt(0,5,5,-3,0,8,10,1,0,3,14,2),wt(0,5,6,-3,0,9,12,1,0,3,16,2),wt(0,6,6,-3,0,10,14,1,0,4,18,3),wt(0,6,7,-4,0,11,15,1,0,4,20,3),wt(0,7,8,-4,0,12,17,2,0,5,22,4),wt(0,7,8,-4,0,13,19,2,0,5,24,4),wt(0,7,9,-4,0,14,21,2,0,5,26,4),wt(0,8,9,-5,0,15,22,2,0,6,28,5),wt(0,8,10,-5,0,16,24,2,0,6,30,5),wt(0,8,11,-5,0,17,26,2,0,6,32,5),wt(0,9,11,-5,0,18,28,2,0,7,34,6),wt(0,9,12,-6,0,19,29,2,0,7,36,6),wt(0,10,13,-6,0,20,31,3,0,8,38,7),wt(0,10,13,-6,0,21,33,3,0,8,40,7),wt(0,10,14,-6,0,22,35,3,0,8,42,7),wt(0,11,14,-7,0,23,36,3,0,9,44,8),wt(0,11,15,-7,0,24,38,3,0,9,46,8)],ite=rte,ote=["duration","easing","delay"],ste={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},ate={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function E2(e){return`${Math.round(e)}ms`}function lte(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function ute(e){const t=je({},ste,e.easing),n=je({},ate,e.duration);return je({getAutoHeightDuration:lte,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:a=t.easeInOut,delay:l=0}=o;return Oo(o,ote),(Array.isArray(i)?i:[i]).map(u=>`${u} ${typeof s=="string"?s:E2(s)} ${a} ${typeof l=="string"?l:E2(l)}`).join(",")}},e,{easing:t,duration:n})}const cte={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},dte=cte,fte=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function hte(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,s=Oo(e,fte);if(e.vars)throw new Error(ou(18));const a=Yee(r),l=Ex(e);let u=go(l,{mixins:Oee(l.breakpoints,n),palette:a,shadows:ite.slice(),typography:Zee(a,o),transitions:ute(i),zIndex:je({},dte)});return u=go(u,s),u=t.reduce((c,d)=>go(c,d),u),u.unstable_sxConfig=je({},_x,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(d){return Cx({sx:d,theme:this})},u}const pte=hte(),pN=pte,mN="$$material";function mte({props:e,name:t}){return Tee({props:e,name:t,defaultTheme:pN,themeId:mN})}const gte=e=>gp(e)&&e!=="classes",yte=Eee({themeId:mN,defaultTheme:pN,rootShouldForwardProp:gte}),vte=yte;function bte(e){return aN("MuiSvgIcon",e)}gZ("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const wte=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Ste=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${zi(t)}`,`fontSize${zi(n)}`]};return fZ(i,bte,r)},xte=vte("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${zi(n.color)}`],t[`fontSize${zi(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,i,o,s,a,l,u,c,d,f,h,p,y,S,v,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=e.transitions)==null||(o=i.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((s=e.typography)==null||(a=s.pxToRem)==null?void 0:a.call(s,20))||"1.25rem",medium:((l=e.typography)==null||(u=l.pxToRem)==null?void 0:u.call(l,24))||"1.5rem",large:((c=e.typography)==null||(d=c.pxToRem)==null?void 0:d.call(c,35))||"2.1875rem"}[t.fontSize],color:(f=(h=(e.vars||e).palette)==null||(p=h[t.color])==null?void 0:p.main)!=null?f:{action:(y=(e.vars||e).palette)==null||(S=y.action)==null?void 0:S.active,disabled:(v=(e.vars||e).palette)==null||(m=v.action)==null?void 0:m.disabled,inherit:void 0}[t.color]}}),gN=w.forwardRef(function(t,n){const r=mte({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:u,inheritViewBox:c=!1,titleAccess:d,viewBox:f="0 0 24 24"}=r,h=Oo(r,wte),p=je({},r,{color:s,component:a,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:c,viewBox:f}),y={};c||(y.viewBox=f);const S=Ste(p);return g.jsxs(xte,je({as:a,className:yZ(S.root,o),focusable:"false",color:u,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n},y,h,{ownerState:p,children:[i,d?g.jsx("title",{children:d}):null]}))});gN.muiName="SvgIcon";const k2=gN;function _te(e,t){function n(r,i){return g.jsx(k2,je({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=k2.muiName,w.memo(w.forwardRef(n))}const Cte={configure:e=>{sN.configure(e)}},Ete=Object.freeze(Object.defineProperty({__proto__:null,capitalize:zi,createChainedFunction:qJ,createSvgIcon:_te,debounce:KJ,deprecatedPropType:GJ,isMuiElement:QJ,ownerDocument:nN,ownerWindow:YJ,requirePropFactory:XJ,setRef:rN,unstable_ClassNameGenerator:Cte,unstable_useEnhancedEffect:iN,unstable_useId:eZ,unsupportedProp:tZ,useControlled:nZ,useEventCallback:rZ,useForkRef:iZ,useIsFocusVisible:dZ},Symbol.toStringTag,{value:"Module"})),kte=$j(Ete);var T2;function Dr(){return T2||(T2=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=kte}(Sv)),Sv}var Tte=Nr;Object.defineProperty(vx,"__esModule",{value:!0});var yN=vx.default=void 0,Pte=Tte(Dr()),Ite=g,Ate=(0,Pte.default)((0,Ite.jsx)("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82z"}),"PlayArrowRounded");yN=vx.default=Ate;var vN={exports:{}};(()=>{var e={296:(i,o,s)=>{var a=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt,f=typeof s.g=="object"&&s.g&&s.g.Object===Object&&s.g,h=typeof self=="object"&&self&&self.Object===Object&&self,p=f||h||Function("return this")(),y=Object.prototype.toString,S=Math.max,v=Math.min,m=function(){return p.Date.now()};function b(k){var x=typeof k;return!!k&&(x=="object"||x=="function")}function C(k){if(typeof k=="number")return k;if(function(R){return typeof R=="symbol"||function(M){return!!M&&typeof M=="object"}(R)&&y.call(R)=="[object Symbol]"}(k))return NaN;if(b(k)){var x=typeof k.valueOf=="function"?k.valueOf():k;k=b(x)?x+"":x}if(typeof k!="string")return k===0?k:+k;k=k.replace(a,"");var E=u.test(k);return E||c.test(k)?d(k.slice(2),E?2:8):l.test(k)?NaN:+k}i.exports=function(k,x,E){var R,M,L,ne,Y,Z,ie=0,he=!1,Ce=!1,G=!0;if(typeof k!="function")throw new TypeError("Expected a function");function V(Te){var yt=R,$e=M;return R=M=void 0,ie=Te,ne=k.apply($e,yt)}function ee(Te){return ie=Te,Y=setTimeout(ue,x),he?V(Te):ne}function se(Te){var yt=Te-Z;return Z===void 0||yt>=x||yt<0||Ce&&Te-ie>=L}function ue(){var Te=m();if(se(Te))return ke(Te);Y=setTimeout(ue,function(yt){var $e=x-(yt-Z);return Ce?v($e,L-(yt-ie)):$e}(Te))}function ke(Te){return Y=void 0,G&&R?V(Te):(R=M=void 0,ne)}function Se(){var Te=m(),yt=se(Te);if(R=arguments,M=this,Z=Te,yt){if(Y===void 0)return ee(Z);if(Ce)return Y=setTimeout(ue,x),V(Z)}return Y===void 0&&(Y=setTimeout(ue,x)),ne}return x=C(x)||0,b(E)&&(he=!!E.leading,L=(Ce="maxWait"in E)?S(C(E.maxWait)||0,x):L,G="trailing"in E?!!E.trailing:G),Se.cancel=function(){Y!==void 0&&clearTimeout(Y),ie=0,R=Z=M=Y=void 0},Se.flush=function(){return Y===void 0?ne:ke(m())},Se}},96:(i,o,s)=>{var a="Expected a function",l=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,d=/^0o[0-7]+$/i,f=parseInt,h=typeof s.g=="object"&&s.g&&s.g.Object===Object&&s.g,p=typeof self=="object"&&self&&self.Object===Object&&self,y=h||p||Function("return this")(),S=Object.prototype.toString,v=Math.max,m=Math.min,b=function(){return y.Date.now()};function C(x){var E=typeof x;return!!x&&(E=="object"||E=="function")}function k(x){if(typeof x=="number")return x;if(function(M){return typeof M=="symbol"||function(L){return!!L&&typeof L=="object"}(M)&&S.call(M)=="[object Symbol]"}(x))return NaN;if(C(x)){var E=typeof x.valueOf=="function"?x.valueOf():x;x=C(E)?E+"":E}if(typeof x!="string")return x===0?x:+x;x=x.replace(l,"");var R=c.test(x);return R||d.test(x)?f(x.slice(2),R?2:8):u.test(x)?NaN:+x}i.exports=function(x,E,R){var M=!0,L=!0;if(typeof x!="function")throw new TypeError(a);return C(R)&&(M="leading"in R?!!R.leading:M,L="trailing"in R?!!R.trailing:L),function(ne,Y,Z){var ie,he,Ce,G,V,ee,se=0,ue=!1,ke=!1,Se=!0;if(typeof ne!="function")throw new TypeError(a);function Te(Xe){var lt=ie,Qn=he;return ie=he=void 0,se=Xe,G=ne.apply(Qn,lt)}function yt(Xe){return se=Xe,V=setTimeout(Bt,Y),ue?Te(Xe):G}function $e(Xe){var lt=Xe-ee;return ee===void 0||lt>=Y||lt<0||ke&&Xe-se>=Ce}function Bt(){var Xe=b();if($e(Xe))return Kn(Xe);V=setTimeout(Bt,function(lt){var Qn=Y-(lt-ee);return ke?m(Qn,Ce-(lt-se)):Qn}(Xe))}function Kn(Xe){return V=void 0,Se&&ie?Te(Xe):(ie=he=void 0,G)}function Gn(){var Xe=b(),lt=$e(Xe);if(ie=arguments,he=this,ee=Xe,lt){if(V===void 0)return yt(ee);if(ke)return V=setTimeout(Bt,Y),Te(ee)}return V===void 0&&(V=setTimeout(Bt,Y)),G}return Y=k(Y)||0,C(Z)&&(ue=!!Z.leading,Ce=(ke="maxWait"in Z)?v(k(Z.maxWait)||0,Y):Ce,Se="trailing"in Z?!!Z.trailing:Se),Gn.cancel=function(){V!==void 0&&clearTimeout(V),se=0,ie=ee=he=V=void 0},Gn.flush=function(){return V===void 0?G:Kn(b())},Gn}(x,E,{leading:M,maxWait:E,trailing:L})}},703:(i,o,s)=>{var a=s(414);function l(){}function u(){}u.resetWarningCache=l,i.exports=function(){function c(h,p,y,S,v,m){if(m!==a){var b=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw b.name="Invariant Violation",b}}function d(){return c}c.isRequired=c;var f={array:c,bool:c,func:c,number:c,object:c,string:c,symbol:c,any:c,arrayOf:d,element:c,elementType:c,instanceOf:d,node:c,objectOf:d,oneOf:d,oneOfType:d,shape:d,exact:d,checkPropTypes:u,resetWarningCache:l};return f.PropTypes=f,f}},697:(i,o,s)=>{i.exports=s(703)()},414:i=>{i.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},t={};function n(i){var o=t[i];if(o!==void 0)return o.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,n),s.exports}n.n=i=>{var o=i&&i.__esModule?()=>i.default:()=>i;return n.d(o,{a:o}),o},n.d=(i,o)=>{for(var s in o)n.o(o,s)&&!n.o(i,s)&&Object.defineProperty(i,s,{enumerable:!0,get:o[s]})},n.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),n.o=(i,o)=>Object.prototype.hasOwnProperty.call(i,o),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{n.r(r),n.d(r,{LazyLoadComponent:()=>T,LazyLoadImage:()=>vi,trackWindowScroll:()=>ue});const i=w;var o=n.n(i),s=n(697);const a=uf;var l=n.n(a);function u(){return typeof window<"u"&&"IntersectionObserver"in window&&"isIntersecting"in window.IntersectionObserverEntry.prototype}function c(F){return(c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A})(F)}function d(F,A){var K=Object.keys(F);if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(F);A&&(W=W.filter(function(Ut){return Object.getOwnPropertyDescriptor(F,Ut).enumerable})),K.push.apply(K,W)}return K}function f(F,A,K){return A in F?Object.defineProperty(F,A,{value:K,enumerable:!0,configurable:!0,writable:!0}):F[A]=K,F}function h(F,A){for(var K=0;K<A.length;K++){var W=A[K];W.enumerable=W.enumerable||!1,W.configurable=!0,"value"in W&&(W.writable=!0),Object.defineProperty(F,W.key,W)}}function p(F,A){return(p=Object.setPrototypeOf||function(K,W){return K.__proto__=W,K})(F,A)}function y(F,A){if(A&&(c(A)==="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(K){if(K===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return K}(F)}function S(F){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(A){return A.__proto__||Object.getPrototypeOf(A)})(F)}var v=function(F){F.forEach(function(A){A.isIntersecting&&A.target.onVisible()})},m={},b=function(F){(function(N,z){if(typeof z!="function"&&z!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(z&&z.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),z&&p(N,z)})(rt,F);var A,K,W,Ut,Mr=(W=rt,Ut=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var N,z=S(W);if(Ut){var le=S(this).constructor;N=Reflect.construct(z,arguments,le)}else N=z.apply(this,arguments);return y(this,N)});function rt(N){var z;if(function(ce,Pe){if(!(ce instanceof Pe))throw new TypeError("Cannot call a class as a function")}(this,rt),(z=Mr.call(this,N)).supportsObserver=!N.scrollPosition&&N.useIntersectionObserver&&u(),z.supportsObserver){var le=N.threshold;z.observer=function(ce){return m[ce]=m[ce]||new IntersectionObserver(v,{rootMargin:ce+"px"}),m[ce]}(le)}return z}return A=rt,(K=[{key:"componentDidMount",value:function(){this.placeholder&&this.observer&&(this.placeholder.onVisible=this.props.onVisible,this.observer.observe(this.placeholder)),this.supportsObserver||this.updateVisibility()}},{key:"componentWillUnmount",value:function(){this.observer&&this.placeholder&&this.observer.unobserve(this.placeholder)}},{key:"componentDidUpdate",value:function(){this.supportsObserver||this.updateVisibility()}},{key:"getPlaceholderBoundingBox",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.scrollPosition,z=this.placeholder.getBoundingClientRect(),le=l().findDOMNode(this.placeholder).style,ce={left:parseInt(le.getPropertyValue("margin-left"),10)||0,top:parseInt(le.getPropertyValue("margin-top"),10)||0};return{bottom:N.y+z.bottom+ce.top,left:N.x+z.left+ce.left,right:N.x+z.right+ce.left,top:N.y+z.top+ce.top}}},{key:"isPlaceholderInViewport",value:function(){if(typeof window>"u"||!this.placeholder)return!1;var N=this.props,z=N.scrollPosition,le=N.threshold,ce=this.getPlaceholderBoundingBox(z),Pe=z.y+window.innerHeight,Ue=z.x,Je=z.x+window.innerWidth,dt=z.y;return dt-le<=ce.bottom&&Pe+le>=ce.top&&Ue-le<=ce.right&&Je+le>=ce.left}},{key:"updateVisibility",value:function(){this.isPlaceholderInViewport()&&this.props.onVisible()}},{key:"render",value:function(){var N=this,z=this.props,le=z.className,ce=z.height,Pe=z.placeholder,Ue=z.style,Je=z.width;if(Pe&&typeof Pe.type!="function")return o().cloneElement(Pe,{ref:function(Le){return N.placeholder=Le}});var dt=function(Le){for(var en=1;en<arguments.length;en++){var Nt=arguments[en]!=null?arguments[en]:{};en%2?d(Object(Nt),!0).forEach(function(dn){f(Le,dn,Nt[dn])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Le,Object.getOwnPropertyDescriptors(Nt)):d(Object(Nt)).forEach(function(dn){Object.defineProperty(Le,dn,Object.getOwnPropertyDescriptor(Nt,dn))})}return Le}({display:"inline-block"},Ue);return Je!==void 0&&(dt.width=Je),ce!==void 0&&(dt.height=ce),o().createElement("span",{className:le,ref:function(Le){return N.placeholder=Le},style:dt},Pe)}}])&&h(A.prototype,K),rt}(o().Component);b.propTypes={onVisible:s.PropTypes.func.isRequired,className:s.PropTypes.string,height:s.PropTypes.oneOfType([s.PropTypes.number,s.PropTypes.string]),placeholder:s.PropTypes.element,threshold:s.PropTypes.number,useIntersectionObserver:s.PropTypes.bool,scrollPosition:s.PropTypes.shape({x:s.PropTypes.number.isRequired,y:s.PropTypes.number.isRequired}),width:s.PropTypes.oneOfType([s.PropTypes.number,s.PropTypes.string])},b.defaultProps={className:"",placeholder:null,threshold:100,useIntersectionObserver:!0};const C=b;var k=n(296),x=n.n(k),E=n(96),R=n.n(E),M=function(F){var A=getComputedStyle(F,null);return A.getPropertyValue("overflow")+A.getPropertyValue("overflow-y")+A.getPropertyValue("overflow-x")};const L=function(F){if(!(F instanceof HTMLElement))return window;for(var A=F;A&&A instanceof HTMLElement;){if(/(scroll|auto)/.test(M(A)))return A;A=A.parentNode}return window};function ne(F){return(ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A})(F)}var Y=["delayMethod","delayTime"];function Z(){return(Z=Object.assign||function(F){for(var A=1;A<arguments.length;A++){var K=arguments[A];for(var W in K)Object.prototype.hasOwnProperty.call(K,W)&&(F[W]=K[W])}return F}).apply(this,arguments)}function ie(F,A){for(var K=0;K<A.length;K++){var W=A[K];W.enumerable=W.enumerable||!1,W.configurable=!0,"value"in W&&(W.writable=!0),Object.defineProperty(F,W.key,W)}}function he(F,A){return(he=Object.setPrototypeOf||function(K,W){return K.__proto__=W,K})(F,A)}function Ce(F,A){if(A&&(ne(A)==="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return G(F)}function G(F){if(F===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F}function V(F){return(V=Object.setPrototypeOf?Object.getPrototypeOf:function(A){return A.__proto__||Object.getPrototypeOf(A)})(F)}var ee=function(){return typeof window>"u"?0:window.scrollX||window.pageXOffset},se=function(){return typeof window>"u"?0:window.scrollY||window.pageYOffset};const ue=function(F){var A=function(K){(function(le,ce){if(typeof ce!="function"&&ce!==null)throw new TypeError("Super expression must either be null or a function");le.prototype=Object.create(ce&&ce.prototype,{constructor:{value:le,writable:!0,configurable:!0}}),ce&&he(le,ce)})(z,K);var W,Ut,Mr,rt,N=(Mr=z,rt=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var le,ce=V(Mr);if(rt){var Pe=V(this).constructor;le=Reflect.construct(ce,arguments,Pe)}else le=ce.apply(this,arguments);return Ce(this,le)});function z(le){var ce;if(function(Ue,Je){if(!(Ue instanceof Je))throw new TypeError("Cannot call a class as a function")}(this,z),(ce=N.call(this,le)).useIntersectionObserver=le.useIntersectionObserver&&u(),ce.useIntersectionObserver)return Ce(ce);var Pe=ce.onChangeScroll.bind(G(ce));return le.delayMethod==="debounce"?ce.delayedScroll=x()(Pe,le.delayTime):le.delayMethod==="throttle"&&(ce.delayedScroll=R()(Pe,le.delayTime)),ce.state={scrollPosition:{x:ee(),y:se()}},ce.baseComponentRef=o().createRef(),ce}return W=z,(Ut=[{key:"componentDidMount",value:function(){this.addListeners()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"componentDidUpdate",value:function(){typeof window>"u"||this.useIntersectionObserver||L(l().findDOMNode(this.baseComponentRef.current))!==this.scrollElement&&(this.removeListeners(),this.addListeners())}},{key:"addListeners",value:function(){typeof window>"u"||this.useIntersectionObserver||(this.scrollElement=L(l().findDOMNode(this.baseComponentRef.current)),this.scrollElement.addEventListener("scroll",this.delayedScroll,{passive:!0}),window.addEventListener("resize",this.delayedScroll,{passive:!0}),this.scrollElement!==window&&window.addEventListener("scroll",this.delayedScroll,{passive:!0}))}},{key:"removeListeners",value:function(){typeof window>"u"||this.useIntersectionObserver||(this.scrollElement.removeEventListener("scroll",this.delayedScroll),window.removeEventListener("resize",this.delayedScroll),this.scrollElement!==window&&window.removeEventListener("scroll",this.delayedScroll))}},{key:"onChangeScroll",value:function(){this.useIntersectionObserver||this.setState({scrollPosition:{x:ee(),y:se()}})}},{key:"render",value:function(){var le=this.props,ce=(le.delayMethod,le.delayTime,function(Ue,Je){if(Ue==null)return{};var dt,Le,en=function(dn,Mo){if(dn==null)return{};var Xi,or,Kf={},Gf=Object.keys(dn);for(or=0;or<Gf.length;or++)Xi=Gf[or],Mo.indexOf(Xi)>=0||(Kf[Xi]=dn[Xi]);return Kf}(Ue,Je);if(Object.getOwnPropertySymbols){var Nt=Object.getOwnPropertySymbols(Ue);for(Le=0;Le<Nt.length;Le++)dt=Nt[Le],Je.indexOf(dt)>=0||Object.prototype.propertyIsEnumerable.call(Ue,dt)&&(en[dt]=Ue[dt])}return en}(le,Y)),Pe=this.useIntersectionObserver?null:this.state.scrollPosition;return o().createElement(F,Z({forwardRef:this.baseComponentRef,scrollPosition:Pe},ce))}}])&&ie(W.prototype,Ut),z}(o().Component);return A.propTypes={delayMethod:s.PropTypes.oneOf(["debounce","throttle"]),delayTime:s.PropTypes.number,useIntersectionObserver:s.PropTypes.bool},A.defaultProps={delayMethod:"throttle",delayTime:300,useIntersectionObserver:!0},A};function ke(F){return(ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A})(F)}function Se(F,A){for(var K=0;K<A.length;K++){var W=A[K];W.enumerable=W.enumerable||!1,W.configurable=!0,"value"in W&&(W.writable=!0),Object.defineProperty(F,W.key,W)}}function Te(F,A){return(Te=Object.setPrototypeOf||function(K,W){return K.__proto__=W,K})(F,A)}function yt(F,A){if(A&&(ke(A)==="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(K){if(K===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return K}(F)}function $e(F){return($e=Object.setPrototypeOf?Object.getPrototypeOf:function(A){return A.__proto__||Object.getPrototypeOf(A)})(F)}var Bt=function(F){(function(N,z){if(typeof z!="function"&&z!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(z&&z.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),z&&Te(N,z)})(rt,F);var A,K,W,Ut,Mr=(W=rt,Ut=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var N,z=$e(W);if(Ut){var le=$e(this).constructor;N=Reflect.construct(z,arguments,le)}else N=z.apply(this,arguments);return yt(this,N)});function rt(N){return function(z,le){if(!(z instanceof le))throw new TypeError("Cannot call a class as a function")}(this,rt),Mr.call(this,N)}return A=rt,(K=[{key:"render",value:function(){return o().createElement(C,this.props)}}])&&Se(A.prototype,K),rt}(o().Component);const Kn=ue(Bt);function Gn(F){return(Gn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A})(F)}function Xe(F,A){for(var K=0;K<A.length;K++){var W=A[K];W.enumerable=W.enumerable||!1,W.configurable=!0,"value"in W&&(W.writable=!0),Object.defineProperty(F,W.key,W)}}function lt(F,A){return(lt=Object.setPrototypeOf||function(K,W){return K.__proto__=W,K})(F,A)}function Qn(F,A){if(A&&(Gn(A)==="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Do(F)}function Do(F){if(F===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F}function ja(F){return(ja=Object.setPrototypeOf?Object.getPrototypeOf:function(A){return A.__proto__||Object.getPrototypeOf(A)})(F)}var Fa=function(F){(function(N,z){if(typeof z!="function"&&z!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(z&&z.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),z&&lt(N,z)})(rt,F);var A,K,W,Ut,Mr=(W=rt,Ut=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var N,z=ja(W);if(Ut){var le=ja(this).constructor;N=Reflect.construct(z,arguments,le)}else N=z.apply(this,arguments);return Qn(this,N)});function rt(N){var z;(function(Je,dt){if(!(Je instanceof dt))throw new TypeError("Cannot call a class as a function")})(this,rt),z=Mr.call(this,N);var le=N.afterLoad,ce=N.beforeLoad,Pe=N.scrollPosition,Ue=N.visibleByDefault;return z.state={visible:Ue},Ue&&(ce(),le()),z.onVisible=z.onVisible.bind(Do(z)),z.isScrollTracked=!!(Pe&&Number.isFinite(Pe.x)&&Pe.x>=0&&Number.isFinite(Pe.y)&&Pe.y>=0),z}return A=rt,(K=[{key:"componentDidUpdate",value:function(N,z){z.visible!==this.state.visible&&this.props.afterLoad()}},{key:"onVisible",value:function(){this.props.beforeLoad(),this.setState({visible:!0})}},{key:"render",value:function(){if(this.state.visible)return this.props.children;var N=this.props,z=N.className,le=N.delayMethod,ce=N.delayTime,Pe=N.height,Ue=N.placeholder,Je=N.scrollPosition,dt=N.style,Le=N.threshold,en=N.useIntersectionObserver,Nt=N.width;return this.isScrollTracked||en&&u()?o().createElement(C,{className:z,height:Pe,onVisible:this.onVisible,placeholder:Ue,scrollPosition:Je,style:dt,threshold:Le,useIntersectionObserver:en,width:Nt}):o().createElement(Kn,{className:z,delayMethod:le,delayTime:ce,height:Pe,onVisible:this.onVisible,placeholder:Ue,style:dt,threshold:Le,width:Nt})}}])&&Xe(A.prototype,K),rt}(o().Component);Fa.propTypes={afterLoad:s.PropTypes.func,beforeLoad:s.PropTypes.func,useIntersectionObserver:s.PropTypes.bool,visibleByDefault:s.PropTypes.bool},Fa.defaultProps={afterLoad:function(){return{}},beforeLoad:function(){return{}},useIntersectionObserver:!0,visibleByDefault:!1};const T=Fa;function O(F){return(O=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A})(F)}var j=["afterLoad","beforeLoad","delayMethod","delayTime","effect","placeholder","placeholderSrc","scrollPosition","threshold","useIntersectionObserver","visibleByDefault","wrapperClassName","wrapperProps"];function oe(F,A){var K=Object.keys(F);if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(F);A&&(W=W.filter(function(Ut){return Object.getOwnPropertyDescriptor(F,Ut).enumerable})),K.push.apply(K,W)}return K}function X(F){for(var A=1;A<arguments.length;A++){var K=arguments[A]!=null?arguments[A]:{};A%2?oe(Object(K),!0).forEach(function(W){q(F,W,K[W])}):Object.getOwnPropertyDescriptors?Object.defineProperties(F,Object.getOwnPropertyDescriptors(K)):oe(Object(K)).forEach(function(W){Object.defineProperty(F,W,Object.getOwnPropertyDescriptor(K,W))})}return F}function q(F,A,K){return A in F?Object.defineProperty(F,A,{value:K,enumerable:!0,configurable:!0,writable:!0}):F[A]=K,F}function ae(){return(ae=Object.assign||function(F){for(var A=1;A<arguments.length;A++){var K=arguments[A];for(var W in K)Object.prototype.hasOwnProperty.call(K,W)&&(F[W]=K[W])}return F}).apply(this,arguments)}function Ne(F,A){for(var K=0;K<A.length;K++){var W=A[K];W.enumerable=W.enumerable||!1,W.configurable=!0,"value"in W&&(W.writable=!0),Object.defineProperty(F,W.key,W)}}function st(F,A){return(st=Object.setPrototypeOf||function(K,W){return K.__proto__=W,K})(F,A)}function ni(F,A){if(A&&(O(A)==="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(K){if(K===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return K}(F)}function zs(F){return(zs=Object.setPrototypeOf?Object.getPrototypeOf:function(A){return A.__proto__||Object.getPrototypeOf(A)})(F)}var Yi=function(F){(function(N,z){if(typeof z!="function"&&z!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(z&&z.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),z&&st(N,z)})(rt,F);var A,K,W,Ut,Mr=(W=rt,Ut=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var N,z=zs(W);if(Ut){var le=zs(this).constructor;N=Reflect.construct(z,arguments,le)}else N=z.apply(this,arguments);return ni(this,N)});function rt(N){var z;return function(le,ce){if(!(le instanceof ce))throw new TypeError("Cannot call a class as a function")}(this,rt),(z=Mr.call(this,N)).state={loaded:!1},z}return A=rt,(K=[{key:"onImageLoad",value:function(){var N=this;return this.state.loaded?null:function(){N.props.afterLoad(),N.setState({loaded:!0})}}},{key:"getImg",value:function(){var N=this.props,z=(N.afterLoad,N.beforeLoad,N.delayMethod,N.delayTime,N.effect,N.placeholder,N.placeholderSrc,N.scrollPosition,N.threshold,N.useIntersectionObserver,N.visibleByDefault,N.wrapperClassName,N.wrapperProps,function(le,ce){if(le==null)return{};var Pe,Ue,Je=function(Le,en){if(Le==null)return{};var Nt,dn,Mo={},Xi=Object.keys(Le);for(dn=0;dn<Xi.length;dn++)Nt=Xi[dn],en.indexOf(Nt)>=0||(Mo[Nt]=Le[Nt]);return Mo}(le,ce);if(Object.getOwnPropertySymbols){var dt=Object.getOwnPropertySymbols(le);for(Ue=0;Ue<dt.length;Ue++)Pe=dt[Ue],ce.indexOf(Pe)>=0||Object.prototype.propertyIsEnumerable.call(le,Pe)&&(Je[Pe]=le[Pe])}return Je}(N,j));return o().createElement("img",ae({onLoad:this.onImageLoad()},z))}},{key:"getLazyLoadImage",value:function(){var N=this.props,z=N.beforeLoad,le=N.className,ce=N.delayMethod,Pe=N.delayTime,Ue=N.height,Je=N.placeholder,dt=N.scrollPosition,Le=N.style,en=N.threshold,Nt=N.useIntersectionObserver,dn=N.visibleByDefault,Mo=N.width;return o().createElement(T,{beforeLoad:z,className:le,delayMethod:ce,delayTime:Pe,height:Ue,placeholder:Je,scrollPosition:dt,style:Le,threshold:en,useIntersectionObserver:Nt,visibleByDefault:dn,width:Mo},this.getImg())}},{key:"getWrappedLazyLoadImage",value:function(N){var z=this.props,le=z.effect,ce=z.height,Pe=z.placeholderSrc,Ue=z.width,Je=z.wrapperClassName,dt=z.wrapperProps,Le=this.state.loaded,en=Le?" lazy-load-image-loaded":"",Nt=Le||!Pe?{}:{backgroundImage:"url(".concat(Pe,")"),backgroundSize:"100% 100%"};return o().createElement("span",ae({className:Je+" lazy-load-image-background "+le+en,style:X(X({},Nt),{},{color:"transparent",display:"inline-block",height:ce,width:Ue})},dt),N)}},{key:"render",value:function(){var N=this.props,z=N.effect,le=N.placeholderSrc,ce=N.visibleByDefault,Pe=N.wrapperClassName,Ue=N.wrapperProps,Je=this.getLazyLoadImage();return(z||le)&&!ce||Pe||Ue?this.getWrappedLazyLoadImage(Je):Je}}])&&Ne(A.prototype,K),rt}(o().Component);Yi.propTypes={afterLoad:s.PropTypes.func,beforeLoad:s.PropTypes.func,delayMethod:s.PropTypes.string,delayTime:s.PropTypes.number,effect:s.PropTypes.string,placeholderSrc:s.PropTypes.string,threshold:s.PropTypes.number,useIntersectionObserver:s.PropTypes.bool,visibleByDefault:s.PropTypes.bool,wrapperClassName:s.PropTypes.string,wrapperProps:s.PropTypes.object},Yi.defaultProps={afterLoad:function(){return{}},beforeLoad:function(){return{}},delayMethod:"throttle",delayTime:300,effect:"",placeholderSrc:null,threshold:100,useIntersectionObserver:!0,visibleByDefault:!1,wrapperClassName:""};const vi=Yi})(),vN.exports=r})();var Rte=vN.exports;const rpe={codes:[{code:"auth/wrong-password",message:"Wrong Password"},{code:"auth/email-already-exists",message:"User already exists"},{code:"auth/internal-error",message:"Internal Server Error"},{code:"auth/user-not-found",message:"Wrong Password or Email"},{code:"auth/email-already-in-use",message:"User already exists"}]},bN={genres:[{id:28,name:"Action"},{id:12,name:"Adventure"},{id:16,name:"Animation"},{id:35,name:"Comedy"},{id:80,name:"Crime"},{id:99,name:"Documentary"},{id:18,name:"Drama"},{id:10751,name:"Family"},{id:14,name:"Fantasy"},{id:36,name:"History"},{id:27,name:"Horror"},{id:10402,name:"Music"},{id:9648,name:"Mystery"},{id:10749,name:"Romance"},{id:878,name:"Science Fiction"},{id:10770,name:"TV Movie"},{id:53,name:"Thriller"},{id:10752,name:"War"},{id:37,name:"Western"}]},yp=e=>bN.genres.filter(n=>e.includes(n.id)),_m=(e,t)=>{var n=!1;return e.filter(r=>{(r==null?void 0:r.id)===(t==null?void 0:t.id)&&(n=!0)}),n},ty=(e,t)=>{var n=null;return e.filter((r,i)=>{(r==null?void 0:r.id)===(t==null?void 0:t.id)&&(n=i)}),n},ar=(e,t,n)=>{e({title:t,description:n,duration:5e3,isClosable:!0,status:"error",position:"bottom-right"})},au=(e,t,n)=>{e({title:t,description:n,duration:3e3,isClosable:!1,status:"success",position:"bottom-right"})},P2=({type:e,name:t,label:n,placeholder:r,register:i})=>g.jsxs(g.Fragment,{children:[g.jsx(Q,{fontFamily:"Nunito",fontSize:"xxs",color:"text.500",children:n}),g.jsx(Kg,{...i(t,{required:!0}),fontFamily:"Nunito",fontWeight:"regular",type:e,_placeholder:{color:"text.500"},placeholder:r,bgColor:"dark.700",border:"none",outline:"none",_focusVisible:{outlineColor:"white",outlineWidth:"1px"},fontSize:"xs",color:"text.500"})]}),I2=({title:e,key:t,image:n,date:r,genre:i,id:o,isMovie:s})=>{var a;return g.jsxs(rn,{to:s?`/movie/${o}`:`/series/${o}`,as:Ft,width:"150px",alignItems:"flex-start",bgColor:"dark.900",borderRadius:"5px",overflow:"hidden",_hover:{".gradient-box":{opacity:1}},children:[g.jsx(rn,{className:"gradient-box",opacity:0,transitionDuration:"300ms",w:"150px",marginTop:"8px",position:"absolute",height:"200px",borderTopRadius:"5px",bgColor:"rgb(31, 29, 31,0.6)",alignItems:"center",justifyContent:"center",children:g.jsx(zt,{as:yN,fontSize:"xxxl",color:"brand.400"})}),g.jsx(xc,{src:`https://image.tmdb.org/t/p/original${n}`,alt:"Loading",w:"150px",height:"200px",borderTopRadius:"5px"}),g.jsx(dr,{lineHeight:"90%",fontFamily:"Nunito",fontWeight:"semibold",color:"text.200",fontSize:"xxs",children:e}),g.jsx(Q,{lineHeight:"90%",fontSize:"xxxs",fontFamily:"Nunito",fontWeight:"regular",color:"text.300",children:r}),g.jsx(Ze,{flexWrap:"wrap",alignItems:"start",gap:"0px",justifyContent:"start",children:(a=yp(i))==null?void 0:a.map((l,u)=>g.jsx(Q,{lineHeight:"90%",fontSize:"xxxs",fontFamily:"Nunito",fontWeight:"regular",color:"brand.400",children:l.name},u))})]},t)},xc=({alt:e,src:t,width:n,height:r})=>g.jsx(Oa,{as:Rte.LazyLoadImage,alt:e,src:t,loading:"lazy",height:r,width:n,wrapperProps:{style:{objectFit:"cover",borderTopLeftRadius:"5px",borderTopRightRadius:"5px"}},effect:"opacity"});function ci(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(i){return"'"+i+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ps(e){return!!e&&!!e[xt]}function Eo(e){var t;return!!e&&(function(n){if(!n||typeof n!="object")return!1;var r=Object.getPrototypeOf(n);if(r===null)return!0;var i=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===zte}(e)||Array.isArray(e)||!!e[M2]||!!(!((t=e.constructor)===null||t===void 0)&&t[M2])||Tx(e)||Px(e))}function wa(e,t,n){n===void 0&&(n=!1),Iu(e)===0?(n?Object.keys:Ll)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,i){return t(i,r,e)})}function Iu(e){var t=e[xt];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Tx(e)?2:Px(e)?3:0}function Ml(e,t){return Iu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function $te(e,t){return Iu(e)===2?e.get(t):e[t]}function wN(e,t,n){var r=Iu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function SN(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Tx(e){return jte&&e instanceof Map}function Px(e){return Fte&&e instanceof Set}function Gs(e){return e.o||e.t}function Ix(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=_N(e);delete t[xt];for(var n=Ll(t),r=0;r<n.length;r++){var i=n[r],o=t[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function Ax(e,t){return t===void 0&&(t=!1),Rx(e)||Ps(e)||!Eo(e)||(Iu(e)>1&&(e.set=e.add=e.clear=e.delete=Ote),Object.freeze(e),t&&wa(e,function(n,r){return Ax(r,!0)},!0)),e}function Ote(){ci(2)}function Rx(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Vi(e){var t=Fb[e];return t||ci(18,e),t}function Nte(e,t){Fb[e]||(Fb[e]=t)}function Mb(){return Nd}function Cv(e,t){t&&(Vi("Patches"),e.u=[],e.s=[],e.v=t)}function Cm(e){Lb(e),e.p.forEach(Dte),e.p=null}function Lb(e){e===Nd&&(Nd=e.l)}function A2(e){return Nd={p:[],l:Nd,h:e,m:!0,_:0}}function Dte(e){var t=e[xt];t.i===0||t.i===1?t.j():t.g=!0}function Ev(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||Vi("ES5").S(t,e,r),r?(n[xt].P&&(Cm(t),ci(4)),Eo(e)&&(e=Em(t,e),t.l||km(t,e)),t.u&&Vi("Patches").M(n[xt].t,e,t.u,t.s)):e=Em(t,n,[]),Cm(t),t.u&&t.v(t.u,t.s),e!==xN?e:void 0}function Em(e,t,n){if(Rx(t))return t;var r=t[xt];if(!r)return wa(t,function(a,l){return R2(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return km(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=Ix(r.k):r.o,o=i,s=!1;r.i===3&&(o=new Set(i),i.clear(),s=!0),wa(o,function(a,l){return R2(e,r,i,a,l,n,s)}),km(e,i,!1),n&&e.u&&Vi("Patches").N(r,n,e.u,e.s)}return r.o}function R2(e,t,n,r,i,o,s){if(Ps(i)){var a=Em(e,i,o&&t&&t.i!==3&&!Ml(t.R,r)?o.concat(r):void 0);if(wN(n,r,a),!Ps(a))return;e.m=!1}else s&&n.add(i);if(Eo(i)&&!Rx(i)){if(!e.h.D&&e._<1)return;Em(e,i),t&&t.A.l||km(e,i)}}function km(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&Ax(t,n)}function kv(e,t){var n=e[xt];return(n?Gs(n):e)[t]}function $2(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Yo(e){e.P||(e.P=!0,e.l&&Yo(e.l))}function Tv(e){e.o||(e.o=Ix(e.t))}function jb(e,t,n){var r=Tx(t)?Vi("MapSet").F(t,n):Px(t)?Vi("MapSet").T(t,n):e.O?function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:Mb(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=a,u=Dd;s&&(l=[a],u=_c);var c=Proxy.revocable(l,u),d=c.revoke,f=c.proxy;return a.k=f,a.j=d,f}(t,n):Vi("ES5").J(t,n);return(n?n.A:Mb()).p.push(r),r}function Mte(e){return Ps(e)||ci(22,e),function t(n){if(!Eo(n))return n;var r,i=n[xt],o=Iu(n);if(i){if(!i.P&&(i.i<4||!Vi("ES5").K(i)))return i.t;i.I=!0,r=O2(n,o),i.I=!1}else r=O2(n,o);return wa(r,function(s,a){i&&$te(i.t,s)===a||wN(r,s,t(a))}),o===3?new Set(r):r}(e)}function O2(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Ix(e)}function Lte(){function e(o,s){var a=i[o];return a?a.enumerable=s:i[o]=a={configurable:!0,enumerable:s,get:function(){var l=this[xt];return Dd.get(l,o)},set:function(l){var u=this[xt];Dd.set(u,o,l)}},a}function t(o){for(var s=o.length-1;s>=0;s--){var a=o[s][xt];if(!a.P)switch(a.i){case 5:r(a)&&Yo(a);break;case 4:n(a)&&Yo(a)}}}function n(o){for(var s=o.t,a=o.k,l=Ll(a),u=l.length-1;u>=0;u--){var c=l[u];if(c!==xt){var d=s[c];if(d===void 0&&!Ml(s,c))return!0;var f=a[c],h=f&&f[xt];if(h?h.t!==d:!SN(f,d))return!0}}var p=!!s[xt];return l.length!==Ll(s).length+(p?0:1)}function r(o){var s=o.k;if(s.length!==o.t.length)return!0;var a=Object.getOwnPropertyDescriptor(s,s.length-1);if(a&&!a.get)return!0;for(var l=0;l<s.length;l++)if(!s.hasOwnProperty(l))return!0;return!1}var i={};Nte("ES5",{J:function(o,s){var a=Array.isArray(o),l=function(c,d){if(c){for(var f=Array(d.length),h=0;h<d.length;h++)Object.defineProperty(f,""+h,e(h,!0));return f}var p=_N(d);delete p[xt];for(var y=Ll(p),S=0;S<y.length;S++){var v=y[S];p[v]=e(v,c||!!p[v].enumerable)}return Object.create(Object.getPrototypeOf(d),p)}(a,o),u={i:a?5:4,A:s?s.A:Mb(),P:!1,I:!1,R:{},l:s,t:o,k:l,o:null,g:!1,C:!1};return Object.defineProperty(l,xt,{value:u,writable:!0}),l},S:function(o,s,a){a?Ps(s)&&s[xt].A===o&&t(o.p):(o.u&&function l(u){if(u&&typeof u=="object"){var c=u[xt];if(c){var d=c.t,f=c.k,h=c.R,p=c.i;if(p===4)wa(f,function(b){b!==xt&&(d[b]!==void 0||Ml(d,b)?h[b]||l(f[b]):(h[b]=!0,Yo(c)))}),wa(d,function(b){f[b]!==void 0||Ml(f,b)||(h[b]=!1,Yo(c))});else if(p===5){if(r(c)&&(Yo(c),h.length=!0),f.length<d.length)for(var y=f.length;y<d.length;y++)h[y]=!1;else for(var S=d.length;S<f.length;S++)h[S]=!0;for(var v=Math.min(f.length,d.length),m=0;m<v;m++)f.hasOwnProperty(m)||(h[m]=!0),h[m]===void 0&&l(f[m])}}}}(o.p[0]),t(o.p))},K:function(o){return o.i===4?n(o):r(o)}})}var N2,Nd,$x=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",jte=typeof Map<"u",Fte=typeof Set<"u",D2=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",xN=$x?Symbol.for("immer-nothing"):((N2={})["immer-nothing"]=!0,N2),M2=$x?Symbol.for("immer-draftable"):"__$immer_draftable",xt=$x?Symbol.for("immer-state"):"__$immer_state",zte=""+Object.prototype.constructor,Ll=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,_N=Object.getOwnPropertyDescriptors||function(e){var t={};return Ll(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},Fb={},Dd={get:function(e,t){if(t===xt)return e;var n=Gs(e);if(!Ml(n,t))return function(i,o,s){var a,l=$2(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(i.k):void 0}(e,n,t);var r=n[t];return e.I||!Eo(r)?r:r===kv(e.t,t)?(Tv(e),e.o[t]=jb(e.A.h,r,e)):r},has:function(e,t){return t in Gs(e)},ownKeys:function(e){return Reflect.ownKeys(Gs(e))},set:function(e,t,n){var r=$2(Gs(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=kv(Gs(e),t),o=i==null?void 0:i[xt];if(o&&o.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(SN(n,i)&&(n!==void 0||Ml(e.t,t)))return!0;Tv(e),Yo(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return kv(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Tv(e),Yo(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Gs(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){ci(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){ci(12)}},_c={};wa(Dd,function(e,t){_c[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),_c.deleteProperty=function(e,t){return _c.set.call(this,e,t,void 0)},_c.set=function(e,t,n){return Dd.set.call(this,e[0],t,n,e[0])};var Vte=function(){function e(n){var r=this;this.O=D2,this.D=!0,this.produce=function(i,o,s){if(typeof i=="function"&&typeof o!="function"){var a=o;o=i;var l=r;return function(y){var S=this;y===void 0&&(y=a);for(var v=arguments.length,m=Array(v>1?v-1:0),b=1;b<v;b++)m[b-1]=arguments[b];return l.produce(y,function(C){var k;return(k=o).call.apply(k,[S,C].concat(m))})}}var u;if(typeof o!="function"&&ci(6),s!==void 0&&typeof s!="function"&&ci(7),Eo(i)){var c=A2(r),d=jb(r,i,void 0),f=!0;try{u=o(d),f=!1}finally{f?Cm(c):Lb(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(y){return Cv(c,s),Ev(y,c)},function(y){throw Cm(c),y}):(Cv(c,s),Ev(u,c))}if(!i||typeof i!="object"){if((u=o(i))===void 0&&(u=i),u===xN&&(u=void 0),r.D&&Ax(u,!0),s){var h=[],p=[];Vi("Patches").M(i,u,h,p),s(h,p)}return u}ci(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(u){for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;f<c;f++)d[f-1]=arguments[f];return r.produceWithPatches(u,function(h){return i.apply(void 0,[h].concat(d))})};var s,a,l=r.produce(i,o,function(u,c){s=u,a=c});return typeof Promise<"u"&&l instanceof Promise?l.then(function(u){return[u,s,a]}):[l,s,a]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Eo(n)||ci(8),Ps(n)&&(n=Mte(n));var r=A2(this),i=jb(this,n,void 0);return i[xt].C=!0,Lb(r),i},t.finishDraft=function(n,r){var i=n&&n[xt],o=i.A;return Cv(o,r),Ev(void 0,o)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!D2&&ci(20),this.O=n},t.applyPatches=function(n,r){var i;for(i=r.length-1;i>=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var s=Vi("Patches").$;return Ps(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),Pr=new Vte,CN=Pr.produce;Pr.produceWithPatches.bind(Pr);Pr.setAutoFreeze.bind(Pr);Pr.setUseProxies.bind(Pr);Pr.applyPatches.bind(Pr);Pr.createDraft.bind(Pr);Pr.finishDraft.bind(Pr);function L2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function j2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?L2(Object(n),!0).forEach(function(r){tJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $n(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var F2=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Pv=function(){return Math.random().toString(36).substring(7).split("").join(".")},Tm={INIT:"@@redux/INIT"+Pv(),REPLACE:"@@redux/REPLACE"+Pv(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Pv()}};function Bte(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function EN(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error($n(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($n(1));return n(EN)(e,t)}if(typeof e!="function")throw new Error($n(2));var i=e,o=t,s=[],a=s,l=!1;function u(){a===s&&(a=s.slice())}function c(){if(l)throw new Error($n(3));return o}function d(y){if(typeof y!="function")throw new Error($n(4));if(l)throw new Error($n(5));var S=!0;return u(),a.push(y),function(){if(S){if(l)throw new Error($n(6));S=!1,u();var m=a.indexOf(y);a.splice(m,1),s=null}}}function f(y){if(!Bte(y))throw new Error($n(7));if(typeof y.type>"u")throw new Error($n(8));if(l)throw new Error($n(9));try{l=!0,o=i(o,y)}finally{l=!1}for(var S=s=a,v=0;v<S.length;v++){var m=S[v];m()}return y}function h(y){if(typeof y!="function")throw new Error($n(10));i=y,f({type:Tm.REPLACE})}function p(){var y,S=d;return y={subscribe:function(m){if(typeof m!="object"||m===null)throw new Error($n(11));function b(){m.next&&m.next(c())}b();var C=S(b);return{unsubscribe:C}}},y[F2]=function(){return this},y}return f({type:Tm.INIT}),r={dispatch:f,subscribe:d,getState:c,replaceReducer:h},r[F2]=p,r}function Ute(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:Tm.INIT});if(typeof r>"u")throw new Error($n(12));if(typeof n(void 0,{type:Tm.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($n(13))})}function Wte(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];typeof e[i]=="function"&&(n[i]=e[i])}var o=Object.keys(n),s;try{Ute(n)}catch(a){s=a}return function(l,u){if(l===void 0&&(l={}),s)throw s;for(var c=!1,d={},f=0;f<o.length;f++){var h=o[f],p=n[h],y=l[h],S=p(y,u);if(typeof S>"u")throw u&&u.type,new Error($n(14));d[h]=S,c=c||S!==y}return c=c||o.length!==Object.keys(l).length,c?d:l}}function Pm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,i){return function(){return r(i.apply(void 0,arguments))}})}function Hte(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var i=r.apply(void 0,arguments),o=function(){throw new Error($n(15))},s={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return o=Pm.apply(void 0,a)(i.dispatch),j2(j2({},i),{},{dispatch:o})}}}function kN(e){var t=function(r){var i=r.dispatch,o=r.getState;return function(s){return function(a){return typeof a=="function"?a(i,o,e):s(a)}}};return t}var TN=kN();TN.withExtraArgument=kN;const z2=TN;var qte=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kte=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(c){u=[6,c],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Im=globalThis&&globalThis.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},Gte=Object.defineProperty,Qte=Object.defineProperties,Yte=Object.getOwnPropertyDescriptors,V2=Object.getOwnPropertySymbols,Xte=Object.prototype.hasOwnProperty,Jte=Object.prototype.propertyIsEnumerable,B2=function(e,t,n){return t in e?Gte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},vs=function(e,t){for(var n in t||(t={}))Xte.call(t,n)&&B2(e,n,t[n]);if(V2)for(var r=0,i=V2(t);r<i.length;r++){var n=i[r];Jte.call(t,n)&&B2(e,n,t[n])}return e},Iv=function(e,t){return Qte(e,Yte(t))},Zte=function(e,t,n){return new Promise(function(r,i){var o=function(l){try{a(n.next(l))}catch(u){i(u)}},s=function(l){try{a(n.throw(l))}catch(u){i(u)}},a=function(l){return l.done?r(l.value):Promise.resolve(l.value).then(o,s)};a((n=n.apply(e,t)).next())})},ene=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Pm:Pm.apply(null,arguments)};function tne(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}var nne=function(e){qte(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e.apply(this,n)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,Im([void 0],n[0].concat(this)))):new(t.bind.apply(t,Im([void 0],n.concat(this))))},t}(Array);function zb(e){return Eo(e)?CN(e,function(){}):e}function rne(e){return typeof e=="boolean"}function ine(){return function(t){return one(t)}}function one(e){e===void 0&&(e={});var t=e.thunk,n=t===void 0?!0:t;e.immutableCheck,e.serializableCheck;var r=new nne;return n&&(rne(n)?r.push(z2):r.push(z2.withExtraArgument(n.extraArgument))),r}var sne=!0;function ane(e){var t=ine(),n=e||{},r=n.reducer,i=r===void 0?void 0:r,o=n.middleware,s=o===void 0?t():o,a=n.devTools,l=a===void 0?!0:a,u=n.preloadedState,c=u===void 0?void 0:u,d=n.enhancers,f=d===void 0?void 0:d,h;if(typeof i=="function")h=i;else if(tne(i))h=Wte(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var p=s;typeof p=="function"&&(p=p(t));var y=Hte.apply(void 0,p),S=Pm;l&&(S=ene(vs({trace:!sne},typeof l=="object"&&l)));var v=[y];Array.isArray(f)?v=Im([y],f):typeof f=="function"&&(v=f(v));var m=S.apply(void 0,v);return EN(h,c,m)}function bs(e,t){function n(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(t){var o=t.apply(void 0,r);if(!o)throw new Error("prepareAction did not return an object");return vs(vs({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:r[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(r){return r.type===e},n}function PN(e){var t={},n=[],r,i={addCase:function(o,s){var a=typeof o=="string"?o:o.type;if(a in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[a]=s,i},addMatcher:function(o,s){return n.push({matcher:o,reducer:s}),i},addDefaultCase:function(o){return r=o,i}};return e(i),[t,n,r]}function lne(e){return typeof e=="function"}function une(e,t,n,r){n===void 0&&(n=[]);var i=typeof t=="function"?PN(t):[t,n,r],o=i[0],s=i[1],a=i[2],l;if(lne(e))l=function(){return zb(e())};else{var u=zb(e);l=function(){return u}}function c(d,f){d===void 0&&(d=l());var h=Im([o[f.type]],s.filter(function(p){var y=p.matcher;return y(f)}).map(function(p){var y=p.reducer;return y}));return h.filter(function(p){return!!p}).length===0&&(h=[a]),h.reduce(function(p,y){if(y)if(Ps(p)){var S=p,v=y(S,f);return v===void 0?p:v}else{if(Eo(p))return CN(p,function(m){return y(m,f)});var v=y(p,f);if(v===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}return p},d)}return c.getInitialState=l,c}function cne(e,t){return e+"/"+t}function ny(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var n=typeof e.initialState=="function"?e.initialState:zb(e.initialState),r=e.reducers||{},i=Object.keys(r),o={},s={},a={};i.forEach(function(c){var d=r[c],f=cne(t,c),h,p;"reducer"in d?(h=d.reducer,p=d.prepare):h=d,o[c]=h,s[f]=h,a[c]=p?bs(f,p):bs(f)});function l(){var c=typeof e.extraReducers=="function"?PN(e.extraReducers):[e.extraReducers],d=c[0],f=d===void 0?{}:d,h=c[1],p=h===void 0?[]:h,y=c[2],S=y===void 0?void 0:y,v=vs(vs({},f),s);return une(n,function(m){for(var b in v)m.addCase(b,v[b]);for(var C=0,k=p;C<k.length;C++){var x=k[C];m.addMatcher(x.matcher,x.reducer)}S&&m.addDefaultCase(S)})}var u;return{name:t,reducer:function(c,d){return u||(u=l()),u(c,d)},actions:a,caseReducers:o,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var dne="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",fne=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=dne[Math.random()*64|0];return t},hne=["name","message","stack","code"],Av=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),U2=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),pne=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=hne;n<r.length;n++){var i=r[n];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}},qn=function(){function e(t,n,r){var i=bs(t+"/fulfilled",function(u,c,d,f){return{payload:u,meta:Iv(vs({},f||{}),{arg:d,requestId:c,requestStatus:"fulfilled"})}}),o=bs(t+"/pending",function(u,c,d){return{payload:void 0,meta:Iv(vs({},d||{}),{arg:c,requestId:u,requestStatus:"pending"})}}),s=bs(t+"/rejected",function(u,c,d,f,h){return{payload:f,error:(r&&r.serializeError||pne)(u||"Rejected"),meta:Iv(vs({},h||{}),{arg:d,requestId:c,rejectedWithValue:!!f,requestStatus:"rejected",aborted:(u==null?void 0:u.name)==="AbortError",condition:(u==null?void 0:u.name)==="ConditionError"})}}),a=typeof AbortController<"u"?AbortController:function(){function u(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return u.prototype.abort=function(){},u}();function l(u){return function(c,d,f){var h=r!=null&&r.idGenerator?r.idGenerator(u):fne(),p=new a,y;function S(m){y=m,p.abort()}var v=function(){return Zte(this,null,function(){var m,b,C,k,x,E,R;return Kte(this,function(M){switch(M.label){case 0:return M.trys.push([0,4,,5]),k=(m=r==null?void 0:r.condition)==null?void 0:m.call(r,u,{getState:d,extra:f}),gne(k)?[4,k]:[3,2];case 1:k=M.sent(),M.label=2;case 2:if(k===!1||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return x=new Promise(function(L,ne){return p.signal.addEventListener("abort",function(){return ne({name:"AbortError",message:y||"Aborted"})})}),c(o(h,u,(b=r==null?void 0:r.getPendingMeta)==null?void 0:b.call(r,{requestId:h,arg:u},{getState:d,extra:f}))),[4,Promise.race([x,Promise.resolve(n(u,{dispatch:c,getState:d,extra:f,requestId:h,signal:p.signal,abort:S,rejectWithValue:function(L,ne){return new Av(L,ne)},fulfillWithValue:function(L,ne){return new U2(L,ne)}})).then(function(L){if(L instanceof Av)throw L;return L instanceof U2?i(L.payload,h,u,L.meta):i(L,h,u)})])];case 3:return C=M.sent(),[3,5];case 4:return E=M.sent(),C=E instanceof Av?s(null,h,u,E.payload,E.meta):s(E,h,u),[3,5];case 5:return R=r&&!r.dispatchConditionRejection&&s.match(C)&&C.meta.condition,R||c(C),[2,C]}})})}();return Object.assign(v,{abort:S,requestId:h,arg:u,unwrap:function(){return v.then(mne)}})}}return Object.assign(l,{pending:o,rejected:s,fulfilled:i,typePrefix:t})}return e.withTypes=function(){return e},e}();function mne(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function gne(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ox="listenerMiddleware";bs(Ox+"/add");bs(Ox+"/removeAll");bs(Ox+"/remove");var W2;typeof queueMicrotask=="function"&&queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis);Lte();const yne={auth:null},IN=ny({name:"Auth",initialState:yne,reducers:{setAuth:(e,t)=>{e.auth=t.payload}}}),vne=IN.reducer,{setAuth:Rv}=IN.actions;function AN(e,t){return function(){return e.apply(t,arguments)}}const{toString:bne}=Object.prototype,{getPrototypeOf:Nx}=Object,ry=(e=>t=>{const n=bne.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Qi=e=>(e=e.toLowerCase(),t=>ry(t)===e),iy=e=>t=>typeof t===e,{isArray:Au}=Array,Md=iy("undefined");function wne(e){return e!==null&&!Md(e)&&e.constructor!==null&&!Md(e.constructor)&&Xr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const RN=Qi("ArrayBuffer");function Sne(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&RN(e.buffer),t}const xne=iy("string"),Xr=iy("function"),$N=iy("number"),oy=e=>e!==null&&typeof e=="object",_ne=e=>e===!0||e===!1,vp=e=>{if(ry(e)!=="object")return!1;const t=Nx(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Cne=Qi("Date"),Ene=Qi("File"),kne=Qi("Blob"),Tne=Qi("FileList"),Pne=e=>oy(e)&&Xr(e.pipe),Ine=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Xr(e.append)&&((t=ry(e))==="formdata"||t==="object"&&Xr(e.toString)&&e.toString()==="[object FormData]"))},Ane=Qi("URLSearchParams"),Rne=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Cf(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Au(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let a;for(r=0;r<s;r++)a=o[r],t.call(null,e[a],a,e)}}function ON(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const NN=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),DN=e=>!Md(e)&&e!==NN;function Vb(){const{caseless:e}=DN(this)&&this||{},t={},n=(r,i)=>{const o=e&&ON(t,i)||i;vp(t[o])&&vp(r)?t[o]=Vb(t[o],r):vp(r)?t[o]=Vb({},r):Au(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Cf(arguments[r],n);return t}const $ne=(e,t,n,{allOwnKeys:r}={})=>(Cf(t,(i,o)=>{n&&Xr(i)?e[o]=AN(i,n):e[o]=i},{allOwnKeys:r}),e),One=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Nne=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Dne=(e,t,n,r)=>{let i,o,s;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&Nx(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Mne=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Lne=e=>{if(!e)return null;if(Au(e))return e;let t=e.length;if(!$N(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},jne=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Nx(Uint8Array)),Fne=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},zne=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Vne=Qi("HTMLFormElement"),Bne=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),H2=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Une=Qi("RegExp"),MN=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Cf(n,(i,o)=>{t(i,o,e)!==!1&&(r[o]=i)}),Object.defineProperties(e,r)},Wne=e=>{MN(e,(t,n)=>{if(Xr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Xr(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Hne=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Au(e)?r(e):r(String(e).split(t)),n},qne=()=>{},Kne=(e,t)=>(e=+e,Number.isFinite(e)?e:t),$v="abcdefghijklmnopqrstuvwxyz",q2="0123456789",LN={DIGIT:q2,ALPHA:$v,ALPHA_DIGIT:$v+$v.toUpperCase()+q2},Gne=(e=16,t=LN.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Qne(e){return!!(e&&Xr(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Yne=e=>{const t=new Array(10),n=(r,i)=>{if(oy(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Au(r)?[]:{};return Cf(r,(s,a)=>{const l=n(s,i+1);!Md(l)&&(o[a]=l)}),t[i]=void 0,o}}return r};return n(e,0)},Xne=Qi("AsyncFunction"),Jne=e=>e&&(oy(e)||Xr(e))&&Xr(e.then)&&Xr(e.catch),D={isArray:Au,isArrayBuffer:RN,isBuffer:wne,isFormData:Ine,isArrayBufferView:Sne,isString:xne,isNumber:$N,isBoolean:_ne,isObject:oy,isPlainObject:vp,isUndefined:Md,isDate:Cne,isFile:Ene,isBlob:kne,isRegExp:Une,isFunction:Xr,isStream:Pne,isURLSearchParams:Ane,isTypedArray:jne,isFileList:Tne,forEach:Cf,merge:Vb,extend:$ne,trim:Rne,stripBOM:One,inherits:Nne,toFlatObject:Dne,kindOf:ry,kindOfTest:Qi,endsWith:Mne,toArray:Lne,forEachEntry:Fne,matchAll:zne,isHTMLForm:Vne,hasOwnProperty:H2,hasOwnProp:H2,reduceDescriptors:MN,freezeMethods:Wne,toObjectSet:Hne,toCamelCase:Bne,noop:qne,toFiniteNumber:Kne,findKey:ON,global:NN,isContextDefined:DN,ALPHABET:LN,generateString:Gne,isSpecCompliantForm:Qne,toJSONObject:Yne,isAsyncFn:Xne,isThenable:Jne};function Fe(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}D.inherits(Fe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:D.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const jN=Fe.prototype,FN={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{FN[e]={value:e}});Object.defineProperties(Fe,FN);Object.defineProperty(jN,"isAxiosError",{value:!0});Fe.from=(e,t,n,r,i,o)=>{const s=Object.create(jN);return D.toFlatObject(e,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Fe.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const Zne=null;function Bb(e){return D.isPlainObject(e)||D.isArray(e)}function zN(e){return D.endsWith(e,"[]")?e.slice(0,-2):e}function K2(e,t,n){return e?e.concat(t).map(function(i,o){return i=zN(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function ere(e){return D.isArray(e)&&!e.some(Bb)}const tre=D.toFlatObject(D,{},null,function(t){return/^is[A-Z]/.test(t)});function sy(e,t,n){if(!D.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=D.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,S){return!D.isUndefined(S[y])});const r=n.metaTokens,i=n.visitor||c,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&D.isSpecCompliantForm(t);if(!D.isFunction(i))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(D.isDate(p))return p.toISOString();if(!l&&D.isBlob(p))throw new Fe("Blob is not supported. Use a Buffer instead.");return D.isArrayBuffer(p)||D.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,y,S){let v=p;if(p&&!S&&typeof p=="object"){if(D.endsWith(y,"{}"))y=r?y:y.slice(0,-2),p=JSON.stringify(p);else if(D.isArray(p)&&ere(p)||(D.isFileList(p)||D.endsWith(y,"[]"))&&(v=D.toArray(p)))return y=zN(y),v.forEach(function(b,C){!(D.isUndefined(b)||b===null)&&t.append(s===!0?K2([y],C,o):s===null?y:y+"[]",u(b))}),!1}return Bb(p)?!0:(t.append(K2(S,y,o),u(p)),!1)}const d=[],f=Object.assign(tre,{defaultVisitor:c,convertValue:u,isVisitable:Bb});function h(p,y){if(!D.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(p),D.forEach(p,function(v,m){(!(D.isUndefined(v)||v===null)&&i.call(t,v,D.isString(m)?m.trim():m,y,f))===!0&&h(v,y?y.concat(m):[m])}),d.pop()}}if(!D.isObject(e))throw new TypeError("data must be an object");return h(e),t}function G2(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Dx(e,t){this._pairs=[],e&&sy(e,this,t)}const VN=Dx.prototype;VN.append=function(t,n){this._pairs.push([t,n])};VN.toString=function(t){const n=t?function(r){return t.call(this,r,G2)}:G2;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function nre(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function BN(e,t,n){if(!t)return e;const r=n&&n.encode||nre,i=n&&n.serialize;let o;if(i?o=i(t,n):o=D.isURLSearchParams(t)?t.toString():new Dx(t,n).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class rre{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){D.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Q2=rre,UN={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ire=typeof URLSearchParams<"u"?URLSearchParams:Dx,ore=typeof FormData<"u"?FormData:null,sre=typeof Blob<"u"?Blob:null,are=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),lre=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),$i={isBrowser:!0,classes:{URLSearchParams:ire,FormData:ore,Blob:sre},isStandardBrowserEnv:are,isStandardBrowserWebWorkerEnv:lre,protocols:["http","https","file","blob","url","data"]};function ure(e,t){return sy(e,new $i.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return $i.isNode&&D.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function cre(e){return D.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function dre(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function WN(e){function t(n,r,i,o){let s=n[o++];const a=Number.isFinite(+s),l=o>=n.length;return s=!s&&D.isArray(i)?i.length:s,l?(D.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!D.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&D.isArray(i[s])&&(i[s]=dre(i[s])),!a)}if(D.isFormData(e)&&D.isFunction(e.entries)){const n={};return D.forEachEntry(e,(r,i)=>{t(cre(r),i,n,0)}),n}return null}const fre={"Content-Type":void 0};function hre(e,t,n){if(D.isString(e))try{return(t||JSON.parse)(e),D.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ay={transitional:UN,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=D.isObject(t);if(o&&D.isHTMLForm(t)&&(t=new FormData(t)),D.isFormData(t))return i&&i?JSON.stringify(WN(t)):t;if(D.isArrayBuffer(t)||D.isBuffer(t)||D.isStream(t)||D.isFile(t)||D.isBlob(t))return t;if(D.isArrayBufferView(t))return t.buffer;if(D.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return ure(t,this.formSerializer).toString();if((a=D.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return sy(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),hre(t)):t}],transformResponse:[function(t){const n=this.transitional||ay.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&D.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?Fe.from(a,Fe.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$i.classes.FormData,Blob:$i.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};D.forEach(["delete","get","head"],function(t){ay.headers[t]={}});D.forEach(["post","put","patch"],function(t){ay.headers[t]=D.merge(fre)});const Mx=ay,pre=D.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),mre=e=>{const t={};let n,r,i;return e&&e.split(`
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&pre[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Y2=Symbol("internals");function sc(e){return e&&String(e).trim().toLowerCase()}function bp(e){return e===!1||e==null?e:D.isArray(e)?e.map(bp):String(e)}function gre(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const yre=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ov(e,t,n,r,i){if(D.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!D.isString(t)){if(D.isString(r))return t.indexOf(r)!==-1;if(D.isRegExp(r))return r.test(t)}}function vre(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function bre(e,t){const n=D.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}class ly{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(a,l,u){const c=sc(l);if(!c)throw new Error("header name must be a non-empty string");const d=D.findKey(i,c);(!d||i[d]===void 0||u===!0||u===void 0&&i[d]!==!1)&&(i[d||l]=bp(a))}const s=(a,l)=>D.forEach(a,(u,c)=>o(u,c,l));return D.isPlainObject(t)||t instanceof this.constructor?s(t,n):D.isString(t)&&(t=t.trim())&&!yre(t)?s(mre(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=sc(t),t){const r=D.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return gre(i);if(D.isFunction(n))return n.call(this,i,r);if(D.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=sc(t),t){const r=D.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ov(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=sc(s),s){const a=D.findKey(r,s);a&&(!n||Ov(r,r[a],a,n))&&(delete r[a],i=!0)}}return D.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||Ov(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return D.forEach(this,(i,o)=>{const s=D.findKey(r,o);if(s){n[s]=bp(i),delete n[o];return}const a=t?vre(o):String(o).trim();a!==o&&delete n[o],n[a]=bp(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return D.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&D.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Y2]=this[Y2]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=sc(s);r[a]||(bre(i,s),r[a]=!0)}return D.isArray(t)?t.forEach(o):o(t),this}}ly.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);D.freezeMethods(ly.prototype);D.freezeMethods(ly);const yo=ly;function Nv(e,t){const n=this||Mx,r=t||n,i=yo.from(r.headers);let o=r.data;return D.forEach(e,function(a){o=a.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function HN(e){return!!(e&&e.__CANCEL__)}function Ef(e,t,n){Fe.call(this,e??"canceled",Fe.ERR_CANCELED,t,n),this.name="CanceledError"}D.inherits(Ef,Fe,{__CANCEL__:!0});function wre(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Fe("Request failed with status code "+n.status,[Fe.ERR_BAD_REQUEST,Fe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Sre=$i.isStandardBrowserEnv?function(){return{write:function(n,r,i,o,s,a){const l=[];l.push(n+"="+encodeURIComponent(r)),D.isNumber(i)&&l.push("expires="+new Date(i).toGMTString()),D.isString(o)&&l.push("path="+o),D.isString(s)&&l.push("domain="+s),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function xre(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function _re(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function qN(e,t){return e&&!xre(t)?_re(e,t):t}const Cre=$i.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let s=o;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(s){const a=D.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function Ere(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function kre(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[o];s||(s=u),n[i]=l,r[i]=u;let d=o,f=0;for(;d!==i;)f+=n[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-s<t)return;const h=c&&u-c;return h?Math.round(f*1e3/h):void 0}}function X2(e,t){let n=0;const r=kre(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-n,l=r(a),u=o<=s;n=o;const c={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&u?(s-o)/l:void 0,event:i};c[t?"download":"upload"]=!0,e(c)}}const Tre=typeof XMLHttpRequest<"u",Pre=Tre&&function(e){return new Promise(function(n,r){let i=e.data;const o=yo.from(e.headers).normalize(),s=e.responseType;let a;function l(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}D.isFormData(i)&&($i.isStandardBrowserEnv||$i.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let u=new XMLHttpRequest;if(e.auth){const h=e.auth.username||"",p=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(h+":"+p))}const c=qN(e.baseURL,e.url);u.open(e.method.toUpperCase(),BN(c,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function d(){if(!u)return;const h=yo.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),y={data:!s||s==="text"||s==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:h,config:e,request:u};wre(function(v){n(v),l()},function(v){r(v),l()},y),u=null}if("onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(d)},u.onabort=function(){u&&(r(new Fe("Request aborted",Fe.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new Fe("Network Error",Fe.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let p=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const y=e.transitional||UN;e.timeoutErrorMessage&&(p=e.timeoutErrorMessage),r(new Fe(p,y.clarifyTimeoutError?Fe.ETIMEDOUT:Fe.ECONNABORTED,e,u)),u=null},$i.isStandardBrowserEnv){const h=(e.withCredentials||Cre(c))&&e.xsrfCookieName&&Sre.read(e.xsrfCookieName);h&&o.set(e.xsrfHeaderName,h)}i===void 0&&o.setContentType(null),"setRequestHeader"in u&&D.forEach(o.toJSON(),function(p,y){u.setRequestHeader(y,p)}),D.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),s&&s!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",X2(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",X2(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=h=>{u&&(r(!h||h.type?new Ef(null,e,u):h),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const f=Ere(c);if(f&&$i.protocols.indexOf(f)===-1){r(new Fe("Unsupported protocol "+f+":",Fe.ERR_BAD_REQUEST,e));return}u.send(i||null)})},wp={http:Zne,xhr:Pre};D.forEach(wp,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ire={getAdapter:e=>{e=D.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;i<t&&(n=e[i],!(r=D.isString(n)?wp[n.toLowerCase()]:n));i++);if(!r)throw r===!1?new Fe(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(D.hasOwnProp(wp,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!D.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:wp};function Dv(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ef(null,e)}function J2(e){return Dv(e),e.headers=yo.from(e.headers),e.data=Nv.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ire.getAdapter(e.adapter||Mx.adapter)(e).then(function(r){return Dv(e),r.data=Nv.call(e,e.transformResponse,r),r.headers=yo.from(r.headers),r},function(r){return HN(r)||(Dv(e),r&&r.response&&(r.response.data=Nv.call(e,e.transformResponse,r.response),r.response.headers=yo.from(r.response.headers))),Promise.reject(r)})}const Z2=e=>e instanceof yo?e.toJSON():e;function lu(e,t){t=t||{};const n={};function r(u,c,d){return D.isPlainObject(u)&&D.isPlainObject(c)?D.merge.call({caseless:d},u,c):D.isPlainObject(c)?D.merge({},c):D.isArray(c)?c.slice():c}function i(u,c,d){if(D.isUndefined(c)){if(!D.isUndefined(u))return r(void 0,u,d)}else return r(u,c,d)}function o(u,c){if(!D.isUndefined(c))return r(void 0,c)}function s(u,c){if(D.isUndefined(c)){if(!D.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,d){if(d in t)return r(u,c);if(d in e)return r(void 0,u)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,c)=>i(Z2(u),Z2(c),!0)};return D.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=l[c]||i,f=d(e[c],t[c],c);D.isUndefined(f)&&d!==a||(n[c]=f)}),n}const KN="1.4.0",Lx={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Lx[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const eP={};Lx.transitional=function(t,n,r){function i(o,s){return"[Axios v"+KN+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(t===!1)throw new Fe(i(s," has been removed"+(n?" in "+n:"")),Fe.ERR_DEPRECATED);return n&&!eP[s]&&(eP[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,a):!0}};function Are(e,t,n){if(typeof e!="object")throw new Fe("options must be an object",Fe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const a=e[o],l=a===void 0||s(a,o,e);if(l!==!0)throw new Fe("option "+o+" must be "+l,Fe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Fe("Unknown option "+o,Fe.ERR_BAD_OPTION)}}const Ub={assertOptions:Are,validators:Lx},Vo=Ub.validators;class Am{constructor(t){this.defaults=t,this.interceptors={request:new Q2,response:new Q2}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=lu(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Ub.assertOptions(r,{silentJSONParsing:Vo.transitional(Vo.boolean),forcedJSONParsing:Vo.transitional(Vo.boolean),clarifyTimeoutError:Vo.transitional(Vo.boolean)},!1),i!=null&&(D.isFunction(i)?n.paramsSerializer={serialize:i}:Ub.assertOptions(i,{encode:Vo.function,serialize:Vo.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s;s=o&&D.merge(o.common,o[n.method]),s&&D.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=yo.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(l=l&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let c,d=0,f;if(!l){const p=[J2.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,u),f=p.length,c=Promise.resolve(n);d<f;)c=c.then(p[d++],p[d++]);return c}f=a.length;let h=n;for(d=0;d<f;){const p=a[d++],y=a[d++];try{h=p(h)}catch(S){y.call(this,S);break}}try{c=J2.call(this,h)}catch(p){return Promise.reject(p)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=lu(this.defaults,t);const n=qN(t.baseURL,t.url);return BN(n,t.params,t.paramsSerializer)}}D.forEach(["delete","get","head","options"],function(t){Am.prototype[t]=function(n,r){return this.request(lu(r||{},{method:t,url:n,data:(r||{}).data}))}});D.forEach(["post","put","patch"],function(t){function n(r){return function(o,s,a){return this.request(lu(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}Am.prototype[t]=n(),Am.prototype[t+"Form"]=n(!0)});const Sp=Am;class jx{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,a){r.reason||(r.reason=new Ef(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new jx(function(i){t=i}),cancel:t}}}const Rre=jx;function $re(e){return function(n){return e.apply(null,n)}}function Ore(e){return D.isObject(e)&&e.isAxiosError===!0}const Wb={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Wb).forEach(([e,t])=>{Wb[t]=e});const Nre=Wb;function GN(e){const t=new Sp(e),n=AN(Sp.prototype.request,t);return D.extend(n,Sp.prototype,t,{allOwnKeys:!0}),D.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return GN(lu(e,i))},n}const un=GN(Mx);un.Axios=Sp;un.CanceledError=Ef;un.CancelToken=Rre;un.isCancel=HN;un.VERSION=KN;un.toFormData=sy;un.AxiosError=Fe;un.Cancel=un.CanceledError;un.all=function(t){return Promise.all(t)};un.spread=$re;un.isAxiosError=Ore;un.mergeConfig=lu;un.AxiosHeaders=yo;un.formToJSON=e=>WN(D.isHTMLForm(e)?new FormData(e):e);un.HttpStatusCode=Nre;un.default=un;const kt=un,QN=qn("PopularMovieList/getPopularMovieList",async()=>{try{return(await kt("https://api.themoviedb.org/3/movie/popular?language=en-US&page=1&api_key=c62d03cc5058838982afddb016d84f54")).data.results}catch(e){console.log(e)}}),YN=qn("PopularMovieList/appendPopularMovieList",async e=>{try{return(await kt(`https://api.themoviedb.org/3/movie/popular?language=en-US&page=${e}&api_key=c62d03cc5058838982afddb016d84f54`)).data.results}catch(t){console.log(t)}}),XN=qn("TopRatedMovieList/getTopRatedMovieList",async()=>{try{return(await kt("https://api.themoviedb.org/3/movie/top_rated?language=en-US&page=1&api_key=c62d03cc5058838982afddb016d84f54")).data.results}catch(e){console.log(e)}}),Hb=qn("TopRatedMovieList/appendTopRatedMovieList",async e=>{try{return(await kt(`https://api.themoviedb.org/3/movie/top_rated?language=en-US&page=${e}&api_key=c62d03cc5058838982afddb016d84f54`)).data.results}catch(t){console.log(t)}}),JN=qn("UpComingMovieList/getUpComingMovieList",async()=>{try{return(await kt("https://api.themoviedb.org/3/movie/upcoming?language=en-US&page=1&api_key=c62d03cc5058838982afddb016d84f54")).data.results}catch(e){console.log(e)}}),ZN=qn("UpComingMovieList/appendUpComingMovieList",async e=>{try{return(await kt(`https://api.themoviedb.org/3/movie/upcoming?language=en-US&page=${e}&api_key=c62d03cc5058838982afddb016d84f54`)).data.results}catch(t){console.log(t)}}),eD=qn("TrendingMovieList/getTrendingMovieList",async()=>{try{return(await kt("https://api.themoviedb.org/3/trending/movie/day?language=en-US&page=1&api_key=c62d03cc5058838982afddb016d84f54")).data.results}catch(e){console.log(e)}}),tD=qn("TrendingMovieList/appendTrendingMovieList",async e=>{try{return(await kt(`https://api.themoviedb.org/3/trending/movie/day?language=en-US&page=${e}&api_key=c62d03cc5058838982afddb016d84f54`)).data.results}catch(t){console.log(t)}}),Dre={popularMovie:{popularMoiveList:[],page:1},upComingMovie:{upComingMovieList:[],page:1},trendingMovie:{trendingMovieList:[],page:1},topRatedMovie:{topRatedMovieList:[],page:1}},nD=ny({name:"MovieList",initialState:Dre,reducers:{setPopularPage:(e,t)=>{e.popularMovie.page=t.payload},setUpComingPage:(e,t)=>{e.upComingMovie.page=t.payload},setTrendingPage:(e,t)=>{e.trendingMovie.page=t.payload},setTopRatedPage:(e,t)=>{e.topRatedMovie.page=t.payload}},extraReducers:e=>{e.addCase(QN.fulfilled,(t,n)=>{t.popularMovie.popularMoiveList=n.payload}),e.addCase(YN.fulfilled,(t,n)=>{t.popularMovie.page!=1&&(t.popularMovie.popularMoiveList=t.popularMovie.popularMoiveList.concat(n.payload))}),e.addCase(JN.fulfilled,(t,n)=>{t.upComingMovie.upComingMovieList=n.payload}),e.addCase(ZN.fulfilled,(t,n)=>{t.upComingMovie.page!=1&&(t.upComingMovie.upComingMovieList=t.upComingMovie.upComingMovieList.concat(n.payload))}),e.addCase(eD.fulfilled,(t,n)=>{t.trendingMovie.trendingMovieList=n.payload}),e.addCase(tD.fulfilled,(t,n)=>{t.trendingMovie.page!=1&&(t.trendingMovie.trendingMovieList=t.trendingMovie.trendingMovieList.concat(n.payload))}),e.addCase(XN.fulfilled,(t,n)=>{t.topRatedMovie.topRatedMovieList=n.payload}),e.addCase(Hb.fulfilled,(t,n)=>{t.topRatedMovie.page!=1&&(t.topRatedMovie.topRatedMovieList=t.topRatedMovie.topRatedMovieList.concat(n.payload))})}}),Mre=nD.reducer,{setPopularPage:Lre,setUpComingPage:jre,setTrendingPage:Fre,setTopRatedPage:zre}=nD.actions;var rD={exports:{}},iD={};/**
 * @license React
 * use-sync-external-store-shim.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var uu=w;function Vre(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bre=typeof Object.is=="function"?Object.is:Vre,Ure=uu.useState,Wre=uu.useEffect,Hre=uu.useLayoutEffect,qre=uu.useDebugValue;function Kre(e,t){var n=t(),r=Ure({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return Hre(function(){i.value=n,i.getSnapshot=t,Mv(i)&&o({inst:i})},[e,n,t]),Wre(function(){return Mv(i)&&o({inst:i}),e(function(){Mv(i)&&o({inst:i})})},[e]),qre(n),n}function Mv(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Bre(e,n)}catch{return!0}}function Gre(e,t){return t()}var Qre=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Gre:Kre;iD.useSyncExternalStore=uu.useSyncExternalStore!==void 0?uu.useSyncExternalStore:Qre;rD.exports=iD;var Yre=rD.exports,oD={exports:{}},sD={};/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var uy=w,Xre=Yre;function Jre(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zre=typeof Object.is=="function"?Object.is:Jre,eie=Xre.useSyncExternalStore,tie=uy.useRef,nie=uy.useEffect,rie=uy.useMemo,iie=uy.useDebugValue;sD.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=tie(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=rie(function(){function l(h){if(!u){if(u=!0,c=h,h=r(h),i!==void 0&&s.hasValue){var p=s.value;if(i(p,h))return d=p}return d=h}if(p=d,Zre(c,h))return p;var y=r(h);return i!==void 0&&i(p,y)?p:(c=h,d=y)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,i]);var a=eie(e,o[0],o[1]);return nie(function(){s.hasValue=!0,s.value=a},[a]),iie(a),a};oD.exports=sD;var oie=oD.exports;function sie(e){e()}let aD=sie;const aie=e=>aD=e,lie=()=>aD,Is=w.createContext(null);function lD(){return w.useContext(Is)}const uie=()=>{throw new Error("uSES not initialized!")};let uD=uie;const cie=e=>{uD=e},die=(e,t)=>e===t;function fie(e=Is){const t=e===Is?lD:()=>w.useContext(e);return function(r,i=die){const{store:o,subscription:s,getServerState:a}=t(),l=uD(s.addNestedSub,o.getState,a||o.getState,r,i);return w.useDebugValue(l),l}}const hie=fie();var ot={};/**
 * @license React
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Fx=Symbol.for("react.element"),zx=Symbol.for("react.portal"),cy=Symbol.for("react.fragment"),dy=Symbol.for("react.strict_mode"),fy=Symbol.for("react.profiler"),hy=Symbol.for("react.provider"),py=Symbol.for("react.context"),pie=Symbol.for("react.server_context"),my=Symbol.for("react.forward_ref"),gy=Symbol.for("react.suspense"),yy=Symbol.for("react.suspense_list"),vy=Symbol.for("react.memo"),by=Symbol.for("react.lazy"),mie=Symbol.for("react.offscreen"),cD;cD=Symbol.for("react.module.reference");function ti(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Fx:switch(e=e.type,e){case cy:case fy:case dy:case gy:case yy:return e;default:switch(e=e&&e.$$typeof,e){case pie:case py:case my:case by:case vy:case hy:return e;default:return t}}case zx:return t}}}ot.ContextConsumer=py;ot.ContextProvider=hy;ot.Element=Fx;ot.ForwardRef=my;ot.Fragment=cy;ot.Lazy=by;ot.Memo=vy;ot.Portal=zx;ot.Profiler=fy;ot.StrictMode=dy;ot.Suspense=gy;ot.SuspenseList=yy;ot.isAsyncMode=function(){return!1};ot.isConcurrentMode=function(){return!1};ot.isContextConsumer=function(e){return ti(e)===py};ot.isContextProvider=function(e){return ti(e)===hy};ot.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fx};ot.isForwardRef=function(e){return ti(e)===my};ot.isFragment=function(e){return ti(e)===cy};ot.isLazy=function(e){return ti(e)===by};ot.isMemo=function(e){return ti(e)===vy};ot.isPortal=function(e){return ti(e)===zx};ot.isProfiler=function(e){return ti(e)===fy};ot.isStrictMode=function(e){return ti(e)===dy};ot.isSuspense=function(e){return ti(e)===gy};ot.isSuspenseList=function(e){return ti(e)===yy};ot.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===cy||e===fy||e===dy||e===gy||e===yy||e===mie||typeof e=="object"&&e!==null&&(e.$$typeof===by||e.$$typeof===vy||e.$$typeof===hy||e.$$typeof===py||e.$$typeof===my||e.$$typeof===cD||e.getModuleId!==void 0)};ot.typeOf=ti;function gie(){const e=lie();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const tP={notify(){},get:()=>[]};function yie(e,t){let n,r=tP;function i(d){return l(),r.subscribe(d)}function o(){r.notify()}function s(){c.onStateChange&&c.onStateChange()}function a(){return!!n}function l(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=gie())}function u(){n&&(n(),n=void 0,r.clear(),r=tP)}const c={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}const vie=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bie=vie?w.useLayoutEffect:w.useEffect;function wie({store:e,context:t,children:n,serverState:r}){const i=w.useMemo(()=>{const a=yie(e);return{store:e,subscription:a,getServerState:r?()=>r:void 0}},[e,r]),o=w.useMemo(()=>e.getState(),[e]);bie(()=>{const{subscription:a}=i;return a.onStateChange=a.notifyNestedSubs,a.trySubscribe(),o!==e.getState()&&a.notifyNestedSubs(),()=>{a.tryUnsubscribe(),a.onStateChange=void 0}},[i,o]);const s=t||Is;return ur.createElement(s.Provider,{value:i},n)}function dD(e=Is){const t=e===Is?lD:()=>w.useContext(e);return function(){const{store:r}=t();return r}}const Sie=dD();function xie(e=Is){const t=e===Is?Sie:dD(e);return function(){return t().dispatch}}const _ie=xie();cie(oie.useSyncExternalStoreWithSelector);aie(uf.unstable_batchedUpdates);const fD=qn("PopularSeriesList/getPopularSeriesList",async()=>{try{return(await kt("https://api.themoviedb.org/3/tv/popular?language=en-US&page=1&api_key=c62d03cc5058838982afddb016d84f54")).data.results}catch(e){console.log(e)}}),hD=qn("PopularSeriesList/appendPopularSeriesList",async e=>{try{return(await kt(`https://api.themoviedb.org/3/tv/popular?language=en-US&page=${e}&api_key=c62d03cc5058838982afddb016d84f54`)).data.results}catch(t){console.log(t)}}),pD=qn("TopRatedSeriesList/getTopRatedSeriesList",async()=>{try{return(await kt("https://api.themoviedb.org/3/tv/top_rated?language=en-US&page=1&api_key=c62d03cc5058838982afddb016d84f54")).data.results}catch(e){console.log(e)}}),Cie=qn("TopRatedSeriesList/appendTopRatedSeriesList",async e=>{try{return(await kt(`https://api.themoviedb.org/3/tv/top_rated?language=en-US&page=${e}&api_key=c62d03cc5058838982afddb016d84f54`)).data.results}catch(t){console.log(t)}}),mD=qn("UpComingSeriesList/getUpComingSeriesList",async()=>{try{return(await kt("https://api.themoviedb.org/3/tv/on_the_air?language=en-US&page=1&api_key=c62d03cc5058838982afddb016d84f54")).data.results}catch(e){console.log(e)}}),gD=qn("UpComingSeriesList/appendUpComingSeriesList",async e=>{try{return(await kt(`https://api.themoviedb.org/3/tv/on_the_air?language=en-US&page=${e}&api_key=c62d03cc5058838982afddb016d84f54`)).data.results}catch(t){console.log(t)}}),yD=qn("TrendingSeriesList/getTrendingSeriesList",async()=>{try{return(await kt("https://api.themoviedb.org/3/trending/tv/day?language=en-US&page=1&api_key=c62d03cc5058838982afddb016d84f54")).data.results}catch(e){console.log(e)}}),vD=qn("TrendingSeriesList/appendTrendingSeriesList",async e=>{try{return(await kt(`https://api.themoviedb.org/3/trending/tv/day?language=en-US&page=${e}&api_key=c62d03cc5058838982afddb016d84f54`)).data.results}catch(t){console.log(t)}}),Eie={popularSeries:{popularSeriesList:[],page:1},upComingSeries:{upComingSeriesList:[],page:1},trendingSeries:{trendingSeriesList:[],page:1},topRatedSeries:{topRatedSeriesList:[],page:1}},bD=ny({name:"SeriesList",initialState:Eie,reducers:{setPopularPage:(e,t)=>{e.popularSeries.page=t.payload},setUpComingPage:(e,t)=>{e.upComingSeries.page=t.payload},setTrendingPage:(e,t)=>{e.trendingSeries.page=t.payload},setTopRatedPage:(e,t)=>{e.topRatedSeries.page=t.payload}},extraReducers:e=>{e.addCase(fD.fulfilled,(t,n)=>{t.popularSeries.popularSeriesList=n.payload}),e.addCase(hD.fulfilled,(t,n)=>{t.popularSeries.page!=1&&(t.popularSeries.popularSeriesList=t.popularSeries.popularSeriesList.concat(n.payload))}),e.addCase(mD.fulfilled,(t,n)=>{t.upComingSeries.upComingSeriesList=n.payload}),e.addCase(gD.fulfilled,(t,n)=>{t.upComingSeries.page!=1&&(t.upComingSeries.upComingSeriesList=t.upComingSeries.upComingSeriesList.concat(n.payload))}),e.addCase(yD.fulfilled,(t,n)=>{t.trendingSeries.trendingSeriesList=n.payload}),e.addCase(vD.fulfilled,(t,n)=>{t.trendingSeries.page!=1&&(t.trendingSeries.trendingSeriesList=t.trendingSeries.trendingSeriesList.concat(n.payload))}),e.addCase(pD.fulfilled,(t,n)=>{t.topRatedSeries.topRatedSeriesList=n.payload}),e.addCase(Cie.fulfilled,(t,n)=>{t.topRatedSeries.page!=1&&(t.topRatedSeries.topRatedSeriesList=t.topRatedSeries.topRatedSeriesList.concat(n.payload))})}}),kie=bD.reducer,{setPopularPage:Tie,setUpComingPage:Pie,setTopRatedPage:Iie,setTrendingPage:Aie}=bD.actions,Rie={likeMovie:[],watchLaterMovie:[],likeSeries:[],watchLaterSeries:[]},wD=ny({name:"FireStoreMovie",initialState:Rie,reducers:{setLikeMovie:(e,t)=>{e.likeMovie=t.payload},setWatchLaterMovie:(e,t)=>{e.watchLaterMovie=t.payload},setLikeSeries:(e,t)=>{e.likeSeries=t.payload},setWatchLaterSeries:(e,t)=>{e.watchLaterSeries=t.payload}}}),$ie=wD.reducer,{setLikeMovie:Oie,setWatchLaterMovie:Nie,setLikeSeries:Die,setWatchLaterSeries:Mie}=wD.actions,Lie=ane({reducer:{auth:vne,movieList:Mre,seriesList:kie,firestoreMovie:$ie}}),wy=_ie,Yt=hie;/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *//**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const SD=function(e){const t=[];let 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},jie=function(e){const t=[];let n=0,r=0;for(;n<e.length;){const i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){const o=e[n++];t[r++]=String.fromCharCode((i&31)<<6|o&63)}else if(i>239&&i<365){const o=e[n++],s=e[n++],a=e[n++],l=((i&7)<<18|(o&63)<<12|(s&63)<<6|a&63)-65536;t[r++]=String.fromCharCode(55296+(l>>10)),t[r++]=String.fromCharCode(56320+(l&1023))}else{const o=e[n++],s=e[n++];t[r++]=String.fromCharCode((i&15)<<12|(o&63)<<6|s&63)}}return t.join("")},xD={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_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<e.length;i+=3){const o=e[i],s=i+1<e.length,a=s?e[i+1]:0,l=i+2<e.length,u=l?e[i+2]:0,c=o>>2,d=(o&3)<<4|a>>4;let f=(a&15)<<2|u>>6,h=u&63;l||(h=64,s||(f=64)),r.push(n[c],n[d],n[f],n[h])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(SD(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):jie(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<e.length;){const o=n[e.charAt(i++)],a=i<e.length?n[e.charAt(i)]:0;++i;const u=i<e.length?n[e.charAt(i)]:64;++i;const d=i<e.length?n[e.charAt(i)]:64;if(++i,o==null||a==null||u==null||d==null)throw new Fie;const f=o<<2|a>>4;if(r.push(f),u!==64){const h=a<<4&240|u>>2;if(r.push(h),d!==64){const p=u<<6&192|d;r.push(p)}}}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)}}};class Fie extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const zie=function(e){const t=SD(e);return xD.encodeByteArray(t,!0)},Rm=function(e){return zie(e).replace(/\./g,"")},_D=function(e){try{return xD.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Vie(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const Bie=()=>Vie().__FIREBASE_DEFAULTS__,Uie=()=>{if(typeof process>"u"||typeof process.env>"u")return;const e={}.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},Wie=()=>{if(typeof document>"u")return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const t=e&&_D(e[1]);return t&&JSON.parse(t)},Vx=()=>{try{return Bie()||Uie()||Wie()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},CD=e=>{var t,n;return(n=(t=Vx())===null||t===void 0?void 0:t.emulatorHosts)===null||n===void 0?void 0:n[e]},Hie=e=>{const t=CD(e);if(!t)return;const n=t.lastIndexOf(":");if(n<=0||n+1===t.length)throw new Error(`Invalid host ${t} with no separate hostname and port!`);const r=parseInt(t.substring(n+1),10);return t[0]==="["?[t.substring(1,n-1),r]:[t.substring(0,n),r]},ED=()=>{var e;return(e=Vx())===null||e===void 0?void 0:e.config},kD=e=>{var t;return(t=Vx())===null||t===void 0?void 0:t[`_${e}`]};/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class qie{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n})}wrapCallback(t){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof t=="function"&&(this.promise.catch(()=>{}),t.length===1?t(n):t(n,r))}}}/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Kie(e,t){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n={alg:"none",type:"JWT"},r=t||"demo-project",i=e.iat||0,o=e.sub||e.user_id;if(!o)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const s=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:o,user_id:o,firebase:{sign_in_provider:"custom",identities:{}}},e),a="";return[Rm(JSON.stringify(n)),Rm(JSON.stringify(s)),a].join(".")}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Un(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function Gie(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Un())}function Qie(){const e=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof e=="object"&&e.id!==void 0}function Yie(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function Xie(){const e=Un();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function Jie(){try{return typeof indexedDB=="object"}catch{return!1}}function Zie(){return new Promise((e,t)=>{try{let n=!0;const 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=()=>{var o;t(((o=i.error)===null||o===void 0?void 0:o.message)||"")}}catch(n){t(n)}})}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const eoe="FirebaseError";class No extends Error{constructor(t,n,r){super(n),this.code=t,this.customData=r,this.name=eoe,Object.setPrototypeOf(this,No.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,kf.prototype.create)}}class kf{constructor(t,n,r){this.service=t,this.serviceName=n,this.errors=r}create(t,...n){const r=n[0]||{},i=`${this.service}/${t}`,o=this.errors[t],s=o?toe(o,r):"Error",a=`${this.serviceName}: ${s} (${i}).`;return new No(i,a,r)}}function toe(e,t){return e.replace(noe,(n,r)=>{const i=t[r];return i!=null?String(i):`<${r}?>`})}const noe=/\{\$([^}]+)}/g;function roe(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function $m(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const i of n){if(!r.includes(i))return!1;const o=e[i],s=t[i];if(nP(o)&&nP(s)){if(!$m(o,s))return!1}else if(o!==s)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function nP(e){return e!==null&&typeof e=="object"}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Tf(e){const t=[];for(const[n,r]of Object.entries(e))Array.isArray(r)?r.forEach(i=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(i))}):t.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""}function Cc(e){const t={};return e.replace(/^\?/,"").split("&").forEach(r=>{if(r){const[i,o]=r.split("=");t[decodeURIComponent(i)]=decodeURIComponent(o)}}),t}function Ec(e){const t=e.indexOf("?");if(!t)return"";const n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}function ioe(e,t){const n=new ooe(e,t);return n.subscribe.bind(n)}class ooe{constructor(t,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{t(this)}).catch(r=>{this.error(r)})}next(t){this.forEachObserver(n=>{n.next(t)})}error(t){this.forEachObserver(n=>{n.error(t)}),this.close(t)}complete(){this.forEachObserver(t=>{t.complete()}),this.close()}subscribe(t,n,r){let i;if(t===void 0&&n===void 0&&r===void 0)throw new Error("Missing Observer.");soe(t,["next","error","complete"])?i=t:i={next:t,error:n,complete:r},i.next===void 0&&(i.next=Lv),i.error===void 0&&(i.error=Lv),i.complete===void 0&&(i.complete=Lv);const o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch{}}),this.observers.push(i),o}unsubscribeOne(t){this.observers===void 0||this.observers[t]===void 0||(delete this.observers[t],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(t){if(!this.finalized)for(let n=0;n<this.observers.length;n++)this.sendOne(n,t)}sendOne(t,n){this.task.then(()=>{if(this.observers!==void 0&&this.observers[t]!==void 0)try{n(this.observers[t])}catch(r){typeof console<"u"&&console.error&&console.error(r)}})}close(t){this.finalized||(this.finalized=!0,t!==void 0&&(this.finalError=t),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function soe(e,t){if(typeof e!="object"||e===null)return!1;for(const n of t)if(n in e&&typeof e[n]=="function")return!0;return!1}function Lv(){}/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Wn(e){return e&&e._delegate?e._delegate:e}class Sa{constructor(t,n,r){this.name=t,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const Qs="[DEFAULT]";/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class aoe{constructor(t,n){this.name=t,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){const n=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(n)){const r=new qie;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(t){var n;const r=this.normalizeInstanceIdentifier(t==null?void 0:t.identifier),i=(n=t==null?void 0:t.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(o){if(i)return null;throw o}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if(uoe(t))try{this.getOrInitializeService({instanceIdentifier:Qs})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const o=this.getOrInitializeService({instanceIdentifier:i});r.resolve(o)}catch{}}}}clearInstance(t=Qs){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}async delete(){const t=Array.from(this.instances.values());await Promise.all([...t.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...t.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(t=Qs){return this.instances.has(t)}getOptions(t=Qs){return this.instancesOptions.get(t)||{}}initialize(t={}){const{options:n={}}=t,r=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[o,s]of this.instancesDeferred.entries()){const a=this.normalizeInstanceIdentifier(o);r===a&&s.resolve(i)}return i}onInit(t,n){var r;const i=this.normalizeInstanceIdentifier(n),o=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;o.add(t),this.onInitCallbacks.set(i,o);const s=this.instances.get(i);return s&&t(s,i),()=>{o.delete(t)}}invokeOnInitCallbacks(t,n){const r=this.onInitCallbacks.get(n);if(r)for(const i of r)try{i(t,n)}catch{}}getOrInitializeService({instanceIdentifier:t,options:n={}}){let r=this.instances.get(t);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:loe(t),options:n}),this.instances.set(t,r),this.instancesOptions.set(t,n),this.invokeOnInitCallbacks(r,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,r)}catch{}return r||null}normalizeInstanceIdentifier(t=Qs){return this.component?this.component.multipleInstances?t:Qs:t}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function loe(e){return e===Qs?void 0:e}function uoe(e){return e.instantiationMode==="EAGER"}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class coe{constructor(t){this.name=t,this.providers=new Map}addComponent(t){const n=this.getProvider(t.name);if(n.isComponentSet())throw new Error(`Component ${t.name} has already been registered with ${this.name}`);n.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);const n=new aoe(t,this);return this.providers.set(t,n),n}getProviders(){return Array.from(this.providers.values())}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var Be;(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"})(Be||(Be={}));const doe={debug:Be.DEBUG,verbose:Be.VERBOSE,info:Be.INFO,warn:Be.WARN,error:Be.ERROR,silent:Be.SILENT},foe=Be.INFO,hoe={[Be.DEBUG]:"log",[Be.VERBOSE]:"log",[Be.INFO]:"info",[Be.WARN]:"warn",[Be.ERROR]:"error"},poe=(e,t,...n)=>{if(t<e.logLevel)return;const r=new Date().toISOString(),i=hoe[t];if(i)console[i](`[${r}]  ${e.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class Bx{constructor(t){this.name=t,this._logLevel=foe,this._logHandler=poe,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in Be))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?doe[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if(typeof t!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,Be.DEBUG,...t),this._logHandler(this,Be.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,Be.VERBOSE,...t),this._logHandler(this,Be.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,Be.INFO,...t),this._logHandler(this,Be.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,Be.WARN,...t),this._logHandler(this,Be.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,Be.ERROR,...t),this._logHandler(this,Be.ERROR,...t)}}const moe=(e,t)=>t.some(n=>e instanceof n);let rP,iP;function goe(){return rP||(rP=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function yoe(){return iP||(iP=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const TD=new WeakMap,qb=new WeakMap,PD=new WeakMap,jv=new WeakMap,Ux=new WeakMap;function voe(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",o),e.removeEventListener("error",s)},o=()=>{n(ws(e.result)),i()},s=()=>{r(e.error),i()};e.addEventListener("success",o),e.addEventListener("error",s)});return t.then(n=>{n instanceof IDBCursor&&TD.set(n,e)}).catch(()=>{}),Ux.set(t,e),t}function boe(e){if(qb.has(e))return;const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",s),e.removeEventListener("abort",s)},o=()=>{n(),i()},s=()=>{r(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",o),e.addEventListener("error",s),e.addEventListener("abort",s)});qb.set(e,t)}let Kb={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return qb.get(e);if(t==="objectStoreNames")return e.objectStoreNames||PD.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return ws(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 woe(e){Kb=e(Kb)}function Soe(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const r=e.call(Fv(this),t,...n);return PD.set(r,t.sort?t.sort():[t]),ws(r)}:yoe().includes(e)?function(...t){return e.apply(Fv(this),t),ws(TD.get(this))}:function(...t){return ws(e.apply(Fv(this),t))}}function xoe(e){return typeof e=="function"?Soe(e):(e instanceof IDBTransaction&&boe(e),moe(e,goe())?new Proxy(e,Kb):e)}function ws(e){if(e instanceof IDBRequest)return voe(e);if(jv.has(e))return jv.get(e);const t=xoe(e);return t!==e&&(jv.set(e,t),Ux.set(t,e)),t}const Fv=e=>Ux.get(e);function _oe(e,t,{blocked:n,upgrade:r,blocking:i,terminated:o}={}){const s=indexedDB.open(e,t),a=ws(s);return r&&s.addEventListener("upgradeneeded",l=>{r(ws(s.result),l.oldVersion,l.newVersion,ws(s.transaction),l)}),n&&s.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),a.then(l=>{o&&l.addEventListener("close",()=>o()),i&&l.addEventListener("versionchange",u=>i(u.oldVersion,u.newVersion,u))}).catch(()=>{}),a}const Coe=["get","getKey","getAll","getAllKeys","count"],Eoe=["put","add","delete","clear"],zv=new Map;function oP(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(zv.get(t))return zv.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=Eoe.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||Coe.includes(n)))return;const o=async function(s,...a){const l=this.transaction(s,i?"readwrite":"readonly");let u=l.store;return r&&(u=u.index(a.shift())),(await Promise.all([u[n](...a),i&&l.done]))[0]};return zv.set(t,o),o}woe(e=>({...e,get:(t,n,r)=>oP(t,n)||e.get(t,n,r),has:(t,n)=>!!oP(t,n)||e.has(t,n)}));/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class koe{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(Toe(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function Toe(e){const t=e.getComponent();return(t==null?void 0:t.type)==="VERSION"}const Gb="@firebase/app",sP="0.9.11";/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const xa=new Bx("@firebase/app"),Poe="@firebase/app-compat",Ioe="@firebase/analytics-compat",Aoe="@firebase/analytics",Roe="@firebase/app-check-compat",$oe="@firebase/app-check",Ooe="@firebase/auth",Noe="@firebase/auth-compat",Doe="@firebase/database",Moe="@firebase/database-compat",Loe="@firebase/functions",joe="@firebase/functions-compat",Foe="@firebase/installations",zoe="@firebase/installations-compat",Voe="@firebase/messaging",Boe="@firebase/messaging-compat",Uoe="@firebase/performance",Woe="@firebase/performance-compat",Hoe="@firebase/remote-config",qoe="@firebase/remote-config-compat",Koe="@firebase/storage",Goe="@firebase/storage-compat",Qoe="@firebase/firestore",Yoe="@firebase/firestore-compat",Xoe="firebase",Joe="9.22.1";/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const Qb="[DEFAULT]",Zoe={[Gb]:"fire-core",[Poe]:"fire-core-compat",[Aoe]:"fire-analytics",[Ioe]:"fire-analytics-compat",[$oe]:"fire-app-check",[Roe]:"fire-app-check-compat",[Ooe]:"fire-auth",[Noe]:"fire-auth-compat",[Doe]:"fire-rtdb",[Moe]:"fire-rtdb-compat",[Loe]:"fire-fn",[joe]:"fire-fn-compat",[Foe]:"fire-iid",[zoe]:"fire-iid-compat",[Voe]:"fire-fcm",[Boe]:"fire-fcm-compat",[Uoe]:"fire-perf",[Woe]:"fire-perf-compat",[Hoe]:"fire-rc",[qoe]:"fire-rc-compat",[Koe]:"fire-gcs",[Goe]:"fire-gcs-compat",[Qoe]:"fire-fst",[Yoe]:"fire-fst-compat","fire-js":"fire-js",[Xoe]:"fire-js-all"};/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const Om=new Map,Yb=new Map;function ese(e,t){try{e.container.addComponent(t)}catch(n){xa.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function cu(e){const t=e.name;if(Yb.has(t))return xa.debug(`There were multiple attempts to register component ${t}.`),!1;Yb.set(t,e);for(const n of Om.values())ese(n,e);return!0}function Wx(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const tse={["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",["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}."},Ss=new kf("app","Firebase",tse);/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class nse{constructor(t,n,r){this._isDeleted=!1,this._options=Object.assign({},t),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new Sa("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}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(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw Ss.create("app-deleted",{appName:this._name})}}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const Ru=Joe;function ID(e,t={}){let n=e;typeof t!="object"&&(t={name:t});const r=Object.assign({name:Qb,automaticDataCollectionEnabled:!1},t),i=r.name;if(typeof i!="string"||!i)throw Ss.create("bad-app-name",{appName:String(i)});if(n||(n=ED()),!n)throw Ss.create("no-options");const o=Om.get(i);if(o){if($m(n,o.options)&&$m(r,o.config))return o;throw Ss.create("duplicate-app",{appName:i})}const s=new coe(i);for(const l of Yb.values())s.addComponent(l);const a=new nse(n,r,s);return Om.set(i,a),a}function AD(e=Qb){const t=Om.get(e);if(!t&&e===Qb&&ED())return ID();if(!t)throw Ss.create("no-app",{appName:e});return t}function xs(e,t,n){var r;let i=(r=Zoe[e])!==null&&r!==void 0?r:e;n&&(i+=`-${n}`);const o=i.match(/\s|\//),s=t.match(/\s|\//);if(o||s){const a=[`Unable to register library "${i}" with version "${t}":`];o&&a.push(`library name "${i}" contains illegal characters (whitespace or "/")`),o&&s&&a.push("and"),s&&a.push(`version name "${t}" contains illegal characters (whitespace or "/")`),xa.warn(a.join(" "));return}cu(new Sa(`${i}-version`,()=>({library:i,version:t}),"VERSION"))}/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const rse="firebase-heartbeat-database",ise=1,Ld="firebase-heartbeat-store";let Vv=null;function RD(){return Vv||(Vv=_oe(rse,ise,{upgrade:(e,t)=>{switch(t){case 0:e.createObjectStore(Ld)}}}).catch(e=>{throw Ss.create("idb-open",{originalErrorMessage:e.message})})),Vv}async function ose(e){try{return await(await RD()).transaction(Ld).objectStore(Ld).get($D(e))}catch(t){if(t instanceof No)xa.warn(t.message);else{const n=Ss.create("idb-get",{originalErrorMessage:t==null?void 0:t.message});xa.warn(n.message)}}}async function aP(e,t){try{const r=(await RD()).transaction(Ld,"readwrite");await r.objectStore(Ld).put(t,$D(e)),await r.done}catch(n){if(n instanceof No)xa.warn(n.message);else{const r=Ss.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});xa.warn(r.message)}}}function $D(e){return`${e.name}!${e.options.appId}`}/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const sse=1024,ase=30*24*60*60*1e3;class lse{constructor(t){this.container=t,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new cse(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){const n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=lP();if(this._heartbeatsCache===null&&(this._heartbeatsCache=await this._heartbeatsCachePromise),!(this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some(i=>i.date===r)))return this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(i=>{const o=new Date(i.date).valueOf();return Date.now()-o<=ase}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache===null||this._heartbeatsCache.heartbeats.length===0)return"";const t=lP(),{heartbeatsToSend:n,unsentEntries:r}=use(this._heartbeatsCache.heartbeats),i=Rm(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=t,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}}function lP(){return new Date().toISOString().substring(0,10)}function use(e,t=sse){const n=[];let r=e.slice();for(const i of e){const o=n.find(s=>s.agent===i.agent);if(o){if(o.dates.push(i.date),uP(n)>t){o.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),uP(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class cse{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return Jie()?Zie().then(()=>!0).catch(()=>!1):!1}async read(){return await this._canUseIndexedDBPromise?await ose(this.app)||{heartbeats:[]}:{heartbeats:[]}}async overwrite(t){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return aP(this.app,{lastSentHeartbeatDate:(n=t.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:t.heartbeats})}else return}async add(t){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return aP(this.app,{lastSentHeartbeatDate:(n=t.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...t.heartbeats]})}else return}}function uP(e){return Rm(JSON.stringify({version:2,heartbeats:e})).length}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function dse(e){cu(new Sa("platform-logger",t=>new koe(t),"PRIVATE")),cu(new Sa("heartbeat",t=>new lse(t),"PRIVATE")),xs(Gb,sP,e),xs(Gb,sP,"esm2017"),xs("fire-js","")}dse("");function Hx(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function OD(){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."}}const fse=OD,ND=new kf("auth","Firebase",OD());/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const Nm=new Bx("@firebase/auth");function hse(e,...t){Nm.logLevel<=Be.WARN&&Nm.warn(`Auth (${Ru}): ${e}`,...t)}function xp(e,...t){Nm.logLevel<=Be.ERROR&&Nm.error(`Auth (${Ru}): ${e}`,...t)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function mi(e,...t){throw qx(e,...t)}function Bi(e,...t){return qx(e,...t)}function pse(e,t,n){const r=Object.assign(Object.assign({},fse()),{[t]:n});return new kf("auth","Firebase",r).create(t,{appName:e.name})}function qx(e,...t){if(typeof e!="string"){const n=t[0],r=[...t.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(n,...r)}return ND.create(e,...t)}function be(e,t,...n){if(!e)throw qx(t,...n)}function lo(e){const t="INTERNAL ASSERTION FAILED: "+e;throw xp(t),new Error(t)}function ko(e,t){e||lo(t)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Xb(){var e;return typeof self<"u"&&((e=self.location)===null||e===void 0?void 0:e.href)||""}function mse(){return cP()==="http:"||cP()==="https:"}function cP(){var e;return typeof self<"u"&&((e=self.location)===null||e===void 0?void 0:e.protocol)||null}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function gse(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(mse()||Qie()||"connection"in navigator)?navigator.onLine:!0}function yse(){if(typeof navigator>"u")return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Pf{constructor(t,n){this.shortDelay=t,this.longDelay=n,ko(n>t,"Short delay should be less than long delay!"),this.isMobile=Gie()||Yie()}get(){return gse()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Kx(e,t){ko(e.emulator,"Emulator should always be set here");const{url:n}=e.emulator;return t?`${n}${t.startsWith("/")?t.slice(1):t}`:n}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class DD{static initialize(t,n,r){this.fetchImpl=t,n&&(this.headersImpl=n),r&&(this.responseImpl=r)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;lo("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;lo("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;lo("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const vse={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",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",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:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const bse=new Pf(3e4,6e4);function $u(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function Na(e,t,n,r,i={}){return MD(e,i,async()=>{let o={},s={};r&&(t==="GET"?s=r:o={body:JSON.stringify(r)});const a=Tf(Object.assign({key:e.config.apiKey},s)).slice(1),l=await e._getAdditionalHeaders();return l["Content-Type"]="application/json",e.languageCode&&(l["X-Firebase-Locale"]=e.languageCode),DD.fetch()(LD(e,e.config.apiHost,n,a),Object.assign({method:t,headers:l,referrerPolicy:"no-referrer"},o))})}async function MD(e,t,n){e._canInitEmulator=!1;const r=Object.assign(Object.assign({},vse),t);try{const i=new wse(e),o=await Promise.race([n(),i.promise]);i.clearNetworkTimeout();const s=await o.json();if("needConfirmation"in s)throw Ah(e,"account-exists-with-different-credential",s);if(o.ok&&!("errorMessage"in s))return s;{const a=o.ok?s.errorMessage:s.error.message,[l,u]=a.split(" : ");if(l==="FEDERATED_USER_ID_ALREADY_LINKED")throw Ah(e,"credential-already-in-use",s);if(l==="EMAIL_EXISTS")throw Ah(e,"email-already-in-use",s);if(l==="USER_DISABLED")throw Ah(e,"user-disabled",s);const c=r[l]||l.toLowerCase().replace(/[_\s]+/g,"-");if(u)throw pse(e,c,u);mi(e,c)}}catch(i){if(i instanceof No)throw i;mi(e,"network-request-failed",{message:String(i)})}}async function If(e,t,n,r,i={}){const o=await Na(e,t,n,r,i);return"mfaPendingCredential"in o&&mi(e,"multi-factor-auth-required",{_serverResponse:o}),o}function LD(e,t,n,r){const i=`${t}${n}?${r}`;return e.config.emulator?Kx(e.config,i):`${e.config.apiScheme}://${i}`}class wse{constructor(t){this.auth=t,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(Bi(this.auth,"network-request-failed")),bse.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function Ah(e,t,n){const r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=Bi(e,t,r);return i.customData._tokenResponse=n,i}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function Sse(e,t){return Na(e,"POST","/v1/accounts:delete",t)}async function xse(e,t){return Na(e,"POST","/v1/accounts:lookup",t)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Yc(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch{}}async function _se(e,t=!1){const n=Wn(e),r=await n.getIdToken(t),i=Gx(r);be(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");const o=typeof i.firebase=="object"?i.firebase:void 0,s=o==null?void 0:o.sign_in_provider;return{claims:i,token:r,authTime:Yc(Bv(i.auth_time)),issuedAtTime:Yc(Bv(i.iat)),expirationTime:Yc(Bv(i.exp)),signInProvider:s||null,signInSecondFactor:(o==null?void 0:o.sign_in_second_factor)||null}}function Bv(e){return Number(e)*1e3}function Gx(e){const[t,n,r]=e.split(".");if(t===void 0||n===void 0||r===void 0)return xp("JWT malformed, contained fewer than 3 sections"),null;try{const i=_D(n);return i?JSON.parse(i):(xp("Failed to decode base64 JWT payload"),null)}catch(i){return xp("Caught error parsing JWT payload as JSON",i==null?void 0:i.toString()),null}}function Cse(e){const t=Gx(e);return be(t,"internal-error"),be(typeof t.exp<"u","internal-error"),be(typeof t.iat<"u","internal-error"),Number(t.exp)-Number(t.iat)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function du(e,t,n=!1){if(n)return t;try{return await t}catch(r){throw r instanceof No&&Ese(r)&&e.auth.currentUser===e&&await e.auth.signOut(),r}}function Ese({code:e}){return e==="auth/user-disabled"||e==="auth/user-token-expired"}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class kse{constructor(t){this.user=t,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(t){var n;if(t){const r=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),r}else{this.errorBackoff=3e4;const i=((n=this.user.stsTokenManager.expirationTime)!==null&&n!==void 0?n:0)-Date.now()-3e5;return Math.max(0,i)}}schedule(t=!1){if(!this.isRunning)return;const n=this.getInterval(t);this.timerId=setTimeout(async()=>{await this.iteration()},n)}async iteration(){try{await this.user.getIdToken(!0)}catch(t){(t==null?void 0:t.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class jD{constructor(t,n){this.createdAt=t,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=Yc(this.lastLoginAt),this.creationTime=Yc(this.createdAt)}_copy(t){this.createdAt=t.createdAt,this.lastLoginAt=t.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function Dm(e){var t;const n=e.auth,r=await e.getIdToken(),i=await du(e,xse(n,{idToken:r}));be(i==null?void 0:i.users.length,n,"internal-error");const o=i.users[0];e._notifyReloadListener(o);const s=!((t=o.providerUserInfo)===null||t===void 0)&&t.length?Ise(o.providerUserInfo):[],a=Pse(e.providerData,s),l=e.isAnonymous,u=!(e.email&&o.passwordHash)&&!(a!=null&&a.length),c=l?u:!1,d={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:a,metadata:new jD(o.createdAt,o.lastLoginAt),isAnonymous:c};Object.assign(e,d)}async function Tse(e){const t=Wn(e);await Dm(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}function Pse(e,t){return[...e.filter(r=>!t.some(i=>i.providerId===r.providerId)),...t]}function Ise(e){return e.map(t=>{var{providerId:n}=t,r=Hx(t,["providerId"]);return{providerId:n,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function Ase(e,t){const n=await MD(e,{},async()=>{const r=Tf({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:i,apiKey:o}=e.config,s=LD(e,i,"/v1/token",`key=${o}`),a=await e._getAdditionalHeaders();return a["Content-Type"]="application/x-www-form-urlencoded",DD.fetch()(s,{method:"POST",headers:a,body:r})});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class jd{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){be(t.idToken,"internal-error"),be(typeof t.idToken<"u","internal-error"),be(typeof t.refreshToken<"u","internal-error");const n="expiresIn"in t&&typeof t.expiresIn<"u"?Number(t.expiresIn):Cse(t.idToken);this.updateTokensAndExpiration(t.idToken,t.refreshToken,n)}async getToken(t,n=!1){return be(!this.accessToken||this.refreshToken,t,"user-token-expired"),!n&&this.accessToken&&!this.isExpired?this.accessToken:this.refreshToken?(await this.refresh(t,this.refreshToken),this.accessToken):null}clearRefreshToken(){this.refreshToken=null}async refresh(t,n){const{accessToken:r,refreshToken:i,expiresIn:o}=await Ase(t,n);this.updateTokensAndExpiration(r,i,Number(o))}updateTokensAndExpiration(t,n,r){this.refreshToken=n||null,this.accessToken=t||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(t,n){const{refreshToken:r,accessToken:i,expirationTime:o}=n,s=new jd;return r&&(be(typeof r=="string","internal-error",{appName:t}),s.refreshToken=r),i&&(be(typeof i=="string","internal-error",{appName:t}),s.accessToken=i),o&&(be(typeof o=="number","internal-error",{appName:t}),s.expirationTime=o),s}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(t){this.accessToken=t.accessToken,this.refreshToken=t.refreshToken,this.expirationTime=t.expirationTime}_clone(){return Object.assign(new jd,this.toJSON())}_performRefresh(){return lo("not implemented")}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Bo(e,t){be(typeof e=="string"||typeof e>"u","internal-error",{appName:t})}class fa{constructor(t){var{uid:n,auth:r,stsTokenManager:i}=t,o=Hx(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new kse(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=o.displayName||null,this.email=o.email||null,this.emailVerified=o.emailVerified||!1,this.phoneNumber=o.phoneNumber||null,this.photoURL=o.photoURL||null,this.isAnonymous=o.isAnonymous||!1,this.tenantId=o.tenantId||null,this.providerData=o.providerData?[...o.providerData]:[],this.metadata=new jD(o.createdAt||void 0,o.lastLoginAt||void 0)}async getIdToken(t){const n=await du(this,this.stsTokenManager.getToken(this.auth,t));return be(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(t){return _se(this,t)}reload(){return Tse(this)}_assign(t){this!==t&&(be(this.uid===t.uid,this.auth,"internal-error"),this.displayName=t.displayName,this.photoURL=t.photoURL,this.email=t.email,this.emailVerified=t.emailVerified,this.phoneNumber=t.phoneNumber,this.isAnonymous=t.isAnonymous,this.tenantId=t.tenantId,this.providerData=t.providerData.map(n=>Object.assign({},n)),this.metadata._copy(t.metadata),this.stsTokenManager._assign(t.stsTokenManager))}_clone(t){const n=new fa(Object.assign(Object.assign({},this),{auth:t,stsTokenManager:this.stsTokenManager._clone()}));return n.metadata._copy(this.metadata),n}_onReload(t){be(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=t,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(t){this.reloadListener?this.reloadListener(t):this.reloadUserInfo=t}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(t,n=!1){let r=!1;t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),r=!0),n&&await Dm(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){const t=await this.getIdToken();return await du(this,Sse(this.auth,{idToken:t})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({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(t=>Object.assign({},t)),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){var r,i,o,s,a,l,u,c;const d=(r=n.displayName)!==null&&r!==void 0?r:void 0,f=(i=n.email)!==null&&i!==void 0?i:void 0,h=(o=n.phoneNumber)!==null&&o!==void 0?o:void 0,p=(s=n.photoURL)!==null&&s!==void 0?s:void 0,y=(a=n.tenantId)!==null&&a!==void 0?a:void 0,S=(l=n._redirectEventId)!==null&&l!==void 0?l:void 0,v=(u=n.createdAt)!==null&&u!==void 0?u:void 0,m=(c=n.lastLoginAt)!==null&&c!==void 0?c:void 0,{uid:b,emailVerified:C,isAnonymous:k,providerData:x,stsTokenManager:E}=n;be(b&&E,t,"internal-error");const R=jd.fromJSON(this.name,E);be(typeof b=="string",t,"internal-error"),Bo(d,t.name),Bo(f,t.name),be(typeof C=="boolean",t,"internal-error"),be(typeof k=="boolean",t,"internal-error"),Bo(h,t.name),Bo(p,t.name),Bo(y,t.name),Bo(S,t.name),Bo(v,t.name),Bo(m,t.name);const M=new fa({uid:b,auth:t,email:f,emailVerified:C,displayName:d,isAnonymous:k,photoURL:p,phoneNumber:h,tenantId:y,stsTokenManager:R,createdAt:v,lastLoginAt:m});return x&&Array.isArray(x)&&(M.providerData=x.map(L=>Object.assign({},L))),S&&(M._redirectEventId=S),M}static async _fromIdTokenResponse(t,n,r=!1){const i=new jd;i.updateFromServerResponse(n);const o=new fa({uid:n.localId,auth:t,stsTokenManager:i,isAnonymous:r});return await Dm(o),o}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const dP=new Map;function uo(e){ko(e instanceof Function,"Expected a class definition");let t=dP.get(e);return t?(ko(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,dP.set(e,t),t)}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class FD{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(t,n){this.storage[t]=n}async _get(t){const n=this.storage[t];return n===void 0?null:n}async _remove(t){delete this.storage[t]}_addListener(t,n){}_removeListener(t,n){}}FD.type="NONE";const fP=FD;/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function _p(e,t,n){return`firebase:${e}:${t}:${n}`}class jl{constructor(t,n,r){this.persistence=t,this.auth=n,this.userKey=r;const{config:i,name:o}=this.auth;this.fullUserKey=_p(this.userKey,i.apiKey,o),this.fullPersistenceKey=_p("persistence",i.apiKey,o),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(t){return this.persistence._set(this.fullUserKey,t.toJSON())}async getCurrentUser(){const t=await this.persistence._get(this.fullUserKey);return t?fa._fromJSON(this.auth,t):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(t){if(this.persistence===t)return;const n=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=t,n)return this.setCurrentUser(n)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(t,n,r="authUser"){if(!n.length)return new jl(uo(fP),t,r);const i=(await Promise.all(n.map(async u=>{if(await u._isAvailable())return u}))).filter(u=>u);let o=i[0]||uo(fP);const s=_p(r,t.config.apiKey,t.name);let a=null;for(const u of n)try{const c=await u._get(s);if(c){const d=fa._fromJSON(t,c);u!==o&&(a=d),o=u;break}}catch{}const l=i.filter(u=>u._shouldAllowMigration);return!o._shouldAllowMigration||!l.length?new jl(o,t,r):(o=l[0],a&&await o._set(s,a.toJSON()),await Promise.all(n.map(async u=>{if(u!==o)try{await u._remove(s)}catch{}})),new jl(o,t,r))}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function hP(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(BD(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(zD(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(WD(t))return"Blackberry";if(HD(t))return"Webos";if(Qx(t))return"Safari";if((t.includes("chrome/")||VD(t))&&!t.includes("edge/"))return"Chrome";if(UD(t))return"Android";{const n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=e.match(n);if((r==null?void 0:r.length)===2)return r[1]}return"Other"}function zD(e=Un()){return/firefox\//i.test(e)}function Qx(e=Un()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function VD(e=Un()){return/crios\//i.test(e)}function BD(e=Un()){return/iemobile/i.test(e)}function UD(e=Un()){return/android/i.test(e)}function WD(e=Un()){return/blackberry/i.test(e)}function HD(e=Un()){return/webos/i.test(e)}function Sy(e=Un()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function Rse(e=Un()){var t;return Sy(e)&&!!(!((t=window.navigator)===null||t===void 0)&&t.standalone)}function $se(){return Xie()&&document.documentMode===10}function qD(e=Un()){return Sy(e)||UD(e)||HD(e)||WD(e)||/windows phone/i.test(e)||BD(e)}function Ose(){try{return!!(window&&window!==window.top)}catch{return!1}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function KD(e,t=[]){let n;switch(e){case"Browser":n=hP(Un());break;case"Worker":n=`${hP(Un())}-${e}`;break;default:n=e}const r=t.length?t.join(","):"FirebaseCore-web";return`${n}/JsCore/${Ru}/${r}`}async function GD(e,t){return Na(e,"GET","/v2/recaptchaConfig",$u(e,t))}function pP(e){return e!==void 0&&e.enterprise!==void 0}class QD{constructor(t){if(this.siteKey="",this.emailPasswordEnabled=!1,t.recaptchaKey===void 0)throw new Error("recaptchaKey undefined");this.siteKey=t.recaptchaKey.split("/")[3],this.emailPasswordEnabled=t.recaptchaEnforcementState.some(n=>n.provider==="EMAIL_PASSWORD_PROVIDER"&&n.enforcementState!=="OFF")}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Nse(){var e,t;return(t=(e=document.getElementsByTagName("head"))===null||e===void 0?void 0:e[0])!==null&&t!==void 0?t:document}function YD(e){return new Promise((t,n)=>{const r=document.createElement("script");r.setAttribute("src",e),r.onload=t,r.onerror=i=>{const o=Bi("internal-error");o.customData=i,n(o)},r.type="text/javascript",r.charset="UTF-8",Nse().appendChild(r)})}function Dse(e){return`__${e}${Math.floor(Math.random()*1e6)}`}const Mse="https://www.google.com/recaptcha/enterprise.js?render=",Lse="recaptcha-enterprise",jse="NO_RECAPTCHA";class XD{constructor(t){this.type=Lse,this.auth=Ou(t)}async verify(t="verify",n=!1){async function r(o){if(!n){if(o.tenantId==null&&o._agentRecaptchaConfig!=null)return o._agentRecaptchaConfig.siteKey;if(o.tenantId!=null&&o._tenantRecaptchaConfigs[o.tenantId]!==void 0)return o._tenantRecaptchaConfigs[o.tenantId].siteKey}return new Promise(async(s,a)=>{GD(o,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(l=>{if(l.recaptchaKey===void 0)a(new Error("recaptcha Enterprise site key undefined"));else{const u=new QD(l);return o.tenantId==null?o._agentRecaptchaConfig=u:o._tenantRecaptchaConfigs[o.tenantId]=u,s(u.siteKey)}}).catch(l=>{a(l)})})}function i(o,s,a){const l=window.grecaptcha;pP(l)?l.enterprise.ready(()=>{l.enterprise.execute(o,{action:t}).then(u=>{s(u)}).catch(()=>{s(jse)})}):a(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((o,s)=>{r(this.auth).then(a=>{if(!n&&pP(window.grecaptcha))i(a,o,s);else{if(typeof window>"u"){s(new Error("RecaptchaVerifier is only supported in browser"));return}YD(Mse+a).then(()=>{i(a,o,s)}).catch(l=>{s(l)})}}).catch(a=>{s(a)})})}}async function Mm(e,t,n,r=!1){const i=new XD(e);let o;try{o=await i.verify(n)}catch{o=await i.verify(n,!0)}const s=Object.assign({},t);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}/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Fse{constructor(t){this.auth=t,this.queue=[]}pushCallback(t,n){const r=o=>new Promise((s,a)=>{try{const l=t(o);s(l)}catch(l){a(l)}});r.onAbort=n,this.queue.push(r);const i=this.queue.length-1;return()=>{this.queue[i]=()=>Promise.resolve()}}async runMiddleware(t){if(this.auth.currentUser===t)return;const n=[];try{for(const r of this.queue)await r(t),r.onAbort&&n.push(r.onAbort)}catch(r){n.reverse();for(const i of n)try{i()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:r==null?void 0:r.message})}}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class zse{constructor(t,n,r,i){this.app=t,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new mP(this),this.idTokenSubscription=new mP(this),this.beforeStateQueue=new Fse(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=ND,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=i.sdkClientVersion}_initializeWithPersistence(t,n){return n&&(this._popupRedirectResolver=uo(n)),this._initializationPromise=this.queue(async()=>{var r,i;if(!this._deleted&&(this.persistenceManager=await jl.create(this,t),!this._deleted)){if(!((r=this._popupRedirectResolver)===null||r===void 0)&&r._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(n),this.lastNotifiedUid=((i=this.currentUser)===null||i===void 0?void 0:i.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const t=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),await this.currentUser.getIdToken();return}await this._updateCurrentUser(t,!0)}}async initializeCurrentUser(t){var n;const r=await this.assertedPersistence.getCurrentUser();let i=r,o=!1;if(t&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const s=(n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId,a=i==null?void 0:i._redirectEventId,l=await this.tryRedirectSignIn(t);(!s||s===a)&&(l!=null&&l.user)&&(i=l.user,o=!0)}if(!i)return this.directlySetCurrentUser(null);if(!i._redirectEventId){if(o)try{await this.beforeStateQueue.runMiddleware(i)}catch(s){i=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(s))}return i?this.reloadAndSetCurrentUserOrClear(i):this.directlySetCurrentUser(null)}return be(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===i._redirectEventId?this.directlySetCurrentUser(i):this.reloadAndSetCurrentUserOrClear(i)}async tryRedirectSignIn(t){let n=null;try{n=await this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch{await this._setRedirectUser(null)}return n}async reloadAndSetCurrentUserOrClear(t){try{await Dm(t)}catch(n){if((n==null?void 0:n.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(t)}useDeviceLanguage(){this.languageCode=yse()}async _delete(){this._deleted=!0}async updateCurrentUser(t){const n=t?Wn(t):null;return n&&be(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))}async _updateCurrentUser(t,n=!1){if(!this._deleted)return t&&be(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),n||await this.beforeStateQueue.runMiddleware(t),this.queue(async()=>{await this.directlySetCurrentUser(t),this.notifyAuthListeners()})}async signOut(){return await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0)}setPersistence(t){return this.queue(async()=>{await this.assertedPersistence.setPersistence(uo(t))})}async initializeRecaptchaConfig(){const t=await GD(this,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}),n=new QD(t);this.tenantId==null?this._agentRecaptchaConfig=n:this._tenantRecaptchaConfigs[this.tenantId]=n,n.emailPasswordEnabled&&new XD(this).verify()}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(t){this._errorFactory=new kf("auth","Firebase",t())}onAuthStateChanged(t,n,r){return this.registerStateListener(this.authStateSubscription,t,n,r)}beforeAuthStateChanged(t,n){return this.beforeStateQueue.pushCallback(t,n)}onIdTokenChanged(t,n,r){return this.registerStateListener(this.idTokenSubscription,t,n,r)}toJSON(){var t;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(t=this._currentUser)===null||t===void 0?void 0:t.toJSON()}}async _setRedirectUser(t,n){const r=await this.getOrInitRedirectPersistenceManager(n);return t===null?r.removeCurrentUser():r.setCurrentUser(t)}async getOrInitRedirectPersistenceManager(t){if(!this.redirectPersistenceManager){const n=t&&uo(t)||this._popupRedirectResolver;be(n,this,"argument-error"),this.redirectPersistenceManager=await jl.create(this,[uo(n._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(t){var n,r;return this._isInitialized&&await this.queue(async()=>{}),((n=this._currentUser)===null||n===void 0?void 0:n._redirectEventId)===t?this._currentUser:((r=this.redirectUser)===null||r===void 0?void 0:r._redirectEventId)===t?this.redirectUser:null}async _persistUserIfCurrent(t){if(t===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(t))}_notifyListenersIfCurrent(t){t===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(){var t,n;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const r=(n=(t=this.currentUser)===null||t===void 0?void 0:t.uid)!==null&&n!==void 0?n:null;this.lastNotifiedUid!==r&&(this.lastNotifiedUid=r,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,n,r,i){if(this._deleted)return()=>{};const o=typeof n=="function"?n:n.next.bind(n),s=this._isInitialized?Promise.resolve():this._initializationPromise;return be(s,this,"internal-error"),s.then(()=>o(this.currentUser)),typeof n=="function"?t.addObserver(n,r,i):t.addObserver(n)}async directlySetCurrentUser(t){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?await this.assertedPersistence.setCurrentUser(t):await this.assertedPersistence.removeCurrentUser()}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return be(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=KD(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var t;const n={["X-Client-Version"]:this.clientVersion};this.app.options.appId&&(n["X-Firebase-gmpid"]=this.app.options.appId);const r=await((t=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getHeartbeatsHeader());r&&(n["X-Firebase-Client"]=r);const i=await this._getAppCheckToken();return i&&(n["X-Firebase-AppCheck"]=i),n}async _getAppCheckToken(){var t;const n=await((t=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||t===void 0?void 0:t.getToken());return n!=null&&n.error&&hse(`Error while retrieving App Check token: ${n.error}`),n==null?void 0:n.token}}function Ou(e){return Wn(e)}class mP{constructor(t){this.auth=t,this.observer=null,this.addObserver=ioe(n=>this.observer=n)}get next(){return be(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Vse(e,t){const n=Wx(e,"auth");if(n.isInitialized()){const i=n.getImmediate(),o=n.getOptions();if($m(o,t??{}))return i;mi(i,"already-initialized")}return n.initialize({options:t})}function Bse(e,t){const n=(t==null?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(uo);t!=null&&t.errorMap&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,t==null?void 0:t.popupRedirectResolver)}function Use(e,t,n){const r=Ou(e);be(r._canInitEmulator,r,"emulator-config-failed"),be(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");const i=!!(n!=null&&n.disableWarnings),o=JD(t),{host:s,port:a}=Wse(t),l=a===null?"":`:${a}`;r.config.emulator={url:`${o}//${s}${l}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:s,port:a,protocol:o.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||Hse()}function JD(e){const t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function Wse(e){const t=JD(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){const o=i[1];return{host:o,port:gP(r.substr(o.length+1))}}else{const[o,s]=r.split(":");return{host:o,port:gP(s)}}}function gP(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}function Hse(){function e(){const t=document.createElement("p"),n=t.style;t.innerText="Running in emulator mode. Do not use with production credentials.",n.position="fixed",n.width="100%",n.backgroundColor="#ffffff",n.border=".1em solid #000000",n.color="#b50000",n.bottom="0px",n.left="0px",n.margin="0px",n.zIndex="10000",n.textAlign="center",t.classList.add("firebase-emulator-warning"),document.body.appendChild(t)}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())}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Yx{constructor(t,n){this.providerId=t,this.signInMethod=n}toJSON(){return lo("not implemented")}_getIdTokenResponse(t){return lo("not implemented")}_linkToIdToken(t,n){return lo("not implemented")}_getReauthenticationResolver(t){return lo("not implemented")}}async function qse(e,t){return Na(e,"POST","/v1/accounts:update",t)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function Uv(e,t){return If(e,"POST","/v1/accounts:signInWithPassword",$u(e,t))}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function Kse(e,t){return If(e,"POST","/v1/accounts:signInWithEmailLink",$u(e,t))}async function Gse(e,t){return If(e,"POST","/v1/accounts:signInWithEmailLink",$u(e,t))}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Fd extends Yx{constructor(t,n,r,i=null){super("password",r),this._email=t,this._password=n,this._tenantId=i}static _fromEmailAndPassword(t,n){return new Fd(t,n,"password")}static _fromEmailAndCode(t,n,r=null){return new Fd(t,n,"emailLink",r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(t){const n=typeof t=="string"?JSON.parse(t):t;if(n!=null&&n.email&&(n!=null&&n.password)){if(n.signInMethod==="password")return this._fromEmailAndPassword(n.email,n.password);if(n.signInMethod==="emailLink")return this._fromEmailAndCode(n.email,n.password,n.tenantId)}return null}async _getIdTokenResponse(t){var n;switch(this.signInMethod){case"password":const r={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};if(!((n=t._getRecaptchaConfig())===null||n===void 0)&&n.emailPasswordEnabled){const i=await Mm(t,r,"signInWithPassword");return Uv(t,i)}else return Uv(t,r).catch(async i=>{if(i.code==="auth/missing-recaptcha-token"){console.log("Sign-in with email address and password is protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the sign-in flow.");const o=await Mm(t,r,"signInWithPassword");return Uv(t,o)}else return Promise.reject(i)});case"emailLink":return Kse(t,{email:this._email,oobCode:this._password});default:mi(t,"internal-error")}}async _linkToIdToken(t,n){switch(this.signInMethod){case"password":return qse(t,{idToken:n,returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return Gse(t,{idToken:n,email:this._email,oobCode:this._password});default:mi(t,"internal-error")}}_getReauthenticationResolver(t){return this._getIdTokenResponse(t)}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function Fl(e,t){return If(e,"POST","/v1/accounts:signInWithIdp",$u(e,t))}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const Qse="http://localhost";class _a extends Yx{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(t){const n=new _a(t.providerId,t.signInMethod);return t.idToken||t.accessToken?(t.idToken&&(n.idToken=t.idToken),t.accessToken&&(n.accessToken=t.accessToken),t.nonce&&!t.pendingToken&&(n.nonce=t.nonce),t.pendingToken&&(n.pendingToken=t.pendingToken)):t.oauthToken&&t.oauthTokenSecret?(n.accessToken=t.oauthToken,n.secret=t.oauthTokenSecret):mi("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){const n=typeof t=="string"?JSON.parse(t):t,{providerId:r,signInMethod:i}=n,o=Hx(n,["providerId","signInMethod"]);if(!r||!i)return null;const s=new _a(r,i);return s.idToken=o.idToken||void 0,s.accessToken=o.accessToken||void 0,s.secret=o.secret,s.nonce=o.nonce,s.pendingToken=o.pendingToken||null,s}_getIdTokenResponse(t){const n=this.buildRequest();return Fl(t,n)}_linkToIdToken(t,n){const r=this.buildRequest();return r.idToken=n,Fl(t,r)}_getReauthenticationResolver(t){const n=this.buildRequest();return n.autoCreate=!1,Fl(t,n)}buildRequest(){const t={requestUri:Qse,returnSecureToken:!0};if(this.pendingToken)t.pendingToken=this.pendingToken;else{const n={};this.idToken&&(n.id_token=this.idToken),this.accessToken&&(n.access_token=this.accessToken),this.secret&&(n.oauth_token_secret=this.secret),n.providerId=this.providerId,this.nonce&&!this.pendingToken&&(n.nonce=this.nonce),t.postBody=Tf(n)}return t}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Yse(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 Xse(e){const t=Cc(Ec(e)).link,n=t?Cc(Ec(t)).deep_link_id:null,r=Cc(Ec(e)).deep_link_id;return(r?Cc(Ec(r)).link:null)||r||n||t||e}class Xx{constructor(t){var n,r,i,o,s,a;const l=Cc(Ec(t)),u=(n=l.apiKey)!==null&&n!==void 0?n:null,c=(r=l.oobCode)!==null&&r!==void 0?r:null,d=Yse((i=l.mode)!==null&&i!==void 0?i:null);be(u&&c&&d,"argument-error"),this.apiKey=u,this.operation=d,this.code=c,this.continueUrl=(o=l.continueUrl)!==null&&o!==void 0?o:null,this.languageCode=(s=l.languageCode)!==null&&s!==void 0?s:null,this.tenantId=(a=l.tenantId)!==null&&a!==void 0?a:null}static parseLink(t){const n=Xse(t);try{return new Xx(n)}catch{return null}}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Nu{constructor(){this.providerId=Nu.PROVIDER_ID}static credential(t,n){return Fd._fromEmailAndPassword(t,n)}static credentialWithLink(t,n){const r=Xx.parseLink(n);return be(r,"argument-error"),Fd._fromEmailAndCode(t,r.code,r.tenantId)}}Nu.PROVIDER_ID="password";Nu.EMAIL_PASSWORD_SIGN_IN_METHOD="password";Nu.EMAIL_LINK_SIGN_IN_METHOD="emailLink";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class ZD{constructor(t){this.providerId=t,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(t){this.defaultLanguageCode=t}setCustomParameters(t){return this.customParameters=t,this}getCustomParameters(){return this.customParameters}}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Af extends ZD{constructor(){super(...arguments),this.scopes=[]}addScope(t){return this.scopes.includes(t)||this.scopes.push(t),this}getScopes(){return[...this.scopes]}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Xo extends Af{constructor(){super("facebook.com")}static credential(t){return _a._fromParams({providerId:Xo.PROVIDER_ID,signInMethod:Xo.FACEBOOK_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return Xo.credentialFromTaggedObject(t)}static credentialFromError(t){return Xo.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!("oauthAccessToken"in t)||!t.oauthAccessToken)return null;try{return Xo.credential(t.oauthAccessToken)}catch{return null}}}Xo.FACEBOOK_SIGN_IN_METHOD="facebook.com";Xo.PROVIDER_ID="facebook.com";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Jo extends Af{constructor(){super("google.com"),this.addScope("profile")}static credential(t,n){return _a._fromParams({providerId:Jo.PROVIDER_ID,signInMethod:Jo.GOOGLE_SIGN_IN_METHOD,idToken:t,accessToken:n})}static credentialFromResult(t){return Jo.credentialFromTaggedObject(t)}static credentialFromError(t){return Jo.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthIdToken:n,oauthAccessToken:r}=t;if(!n&&!r)return null;try{return Jo.credential(n,r)}catch{return null}}}Jo.GOOGLE_SIGN_IN_METHOD="google.com";Jo.PROVIDER_ID="google.com";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Zo extends Af{constructor(){super("github.com")}static credential(t){return _a._fromParams({providerId:Zo.PROVIDER_ID,signInMethod:Zo.GITHUB_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return Zo.credentialFromTaggedObject(t)}static credentialFromError(t){return Zo.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!("oauthAccessToken"in t)||!t.oauthAccessToken)return null;try{return Zo.credential(t.oauthAccessToken)}catch{return null}}}Zo.GITHUB_SIGN_IN_METHOD="github.com";Zo.PROVIDER_ID="github.com";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class es extends Af{constructor(){super("twitter.com")}static credential(t,n){return _a._fromParams({providerId:es.PROVIDER_ID,signInMethod:es.TWITTER_SIGN_IN_METHOD,oauthToken:t,oauthTokenSecret:n})}static credentialFromResult(t){return es.credentialFromTaggedObject(t)}static credentialFromError(t){return es.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthAccessToken:n,oauthTokenSecret:r}=t;if(!n||!r)return null;try{return es.credential(n,r)}catch{return null}}}es.TWITTER_SIGN_IN_METHOD="twitter.com";es.PROVIDER_ID="twitter.com";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function Wv(e,t){return If(e,"POST","/v1/accounts:signUp",$u(e,t))}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Ca{constructor(t){this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}static async _fromIdTokenResponse(t,n,r,i=!1){const o=await fa._fromIdTokenResponse(t,r,i),s=yP(r);return new Ca({user:o,providerId:s,_tokenResponse:r,operationType:n})}static async _forOperation(t,n,r){await t._updateTokensIfNecessary(r,!0);const i=yP(r);return new Ca({user:t,providerId:i,_tokenResponse:r,operationType:n})}}function yP(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Lm extends No{constructor(t,n,r,i){var o;super(n.code,n.message),this.operationType=r,this.user=i,Object.setPrototypeOf(this,Lm.prototype),this.customData={appName:t.name,tenantId:(o=t.tenantId)!==null&&o!==void 0?o:void 0,_serverResponse:n.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(t,n,r,i){return new Lm(t,n,r,i)}}function eM(e,t,n,r){return(t==="reauthenticate"?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch(o=>{throw o.code==="auth/multi-factor-auth-required"?Lm._fromErrorAndOperation(e,o,t,r):o})}async function Jse(e,t,n=!1){const r=await du(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return Ca._forOperation(e,"link",r)}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function Zse(e,t,n=!1){const{auth:r}=e,i="reauthenticate";try{const o=await du(e,eM(r,i,t,e),n);be(o.idToken,r,"internal-error");const s=Gx(o.idToken);be(s,r,"internal-error");const{sub:a}=s;return be(e.uid===a,r,"user-mismatch"),Ca._forOperation(e,i,o)}catch(o){throw(o==null?void 0:o.code)==="auth/user-not-found"&&mi(r,"user-mismatch"),o}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function tM(e,t,n=!1){const r="signIn",i=await eM(e,r,t),o=await Ca._fromIdTokenResponse(e,r,i);return n||await e._updateCurrentUser(o.user),o}async function eae(e,t){return tM(Ou(e),t)}async function ipe(e,t,n){var r;const i=Ou(e),o={returnSecureToken:!0,email:t,password:n,clientType:"CLIENT_TYPE_WEB"};let s;if(!((r=i._getRecaptchaConfig())===null||r===void 0)&&r.emailPasswordEnabled){const u=await Mm(i,o,"signUpPassword");s=Wv(i,u)}else s=Wv(i,o).catch(async u=>{if(u.code==="auth/missing-recaptcha-token"){console.log("Sign-up is protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the sign-up flow.");const c=await Mm(i,o,"signUpPassword");return Wv(i,c)}else return Promise.reject(u)});const a=await s.catch(u=>Promise.reject(u)),l=await Ca._fromIdTokenResponse(i,"signIn",a);return await i._updateCurrentUser(l.user),l}function ope(e,t,n){return eae(Wn(e),Nu.credential(t,n))}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function tae(e,t){return Na(e,"POST","/v1/accounts:update",t)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function spe(e,{displayName:t,photoURL:n}){if(t===void 0&&n===void 0)return;const r=Wn(e),o={idToken:await r.getIdToken(),displayName:t,photoUrl:n,returnSecureToken:!0},s=await du(r,tae(r.auth,o));r.displayName=s.displayName||null,r.photoURL=s.photoUrl||null;const a=r.providerData.find(({providerId:l})=>l==="password");a&&(a.displayName=r.displayName,a.photoURL=r.photoURL),await r._updateTokensIfNecessary(s)}function nae(e,t,n,r){return Wn(e).onIdTokenChanged(t,n,r)}function rae(e,t,n){return Wn(e).beforeAuthStateChanged(t,n)}function iae(e,t,n,r){return Wn(e).onAuthStateChanged(t,n,r)}function oae(e){return Wn(e).signOut()}const jm="__sak";/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class nM{constructor(t,n){this.storageRetriever=t,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(jm,"1"),this.storage.removeItem(jm),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(t,n){return this.storage.setItem(t,JSON.stringify(n)),Promise.resolve()}_get(t){const n=this.storage.getItem(t);return Promise.resolve(n?JSON.parse(n):null)}_remove(t){return this.storage.removeItem(t),Promise.resolve()}get storage(){return this.storageRetriever()}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function sae(){const e=Un();return Qx(e)||Sy(e)}const aae=1e3,lae=10;class rM extends nM{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(t,n)=>this.onStorageEvent(t,n),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=sae()&&Ose(),this.fallbackToPolling=qD(),this._shouldAllowMigration=!0}forAllChangedKeys(t){for(const n of Object.keys(this.listeners)){const r=this.storage.getItem(n),i=this.localCache[n];r!==i&&t(n,i,r)}}onStorageEvent(t,n=!1){if(!t.key){this.forAllChangedKeys((s,a,l)=>{this.notifyListeners(s,l)});return}const r=t.key;if(n?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const s=this.storage.getItem(r);if(t.newValue!==s)t.newValue!==null?this.storage.setItem(r,t.newValue):this.storage.removeItem(r);else if(this.localCache[r]===t.newValue&&!n)return}const i=()=>{const s=this.storage.getItem(r);!n&&this.localCache[r]===s||this.notifyListeners(r,s)},o=this.storage.getItem(r);$se()&&o!==t.newValue&&t.newValue!==t.oldValue?setTimeout(i,lae):i()}notifyListeners(t,n){this.localCache[t]=n;const r=this.listeners[t];if(r)for(const i of Array.from(r))i(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((t,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:t,oldValue:n,newValue:r}),!0)})},aae)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(t,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[t]||(this.listeners[t]=new Set,this.localCache[t]=this.storage.getItem(t)),this.listeners[t].add(n)}_removeListener(t,n){this.listeners[t]&&(this.listeners[t].delete(n),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(t,n){await super._set(t,n),this.localCache[t]=JSON.stringify(n)}async _get(t){const n=await super._get(t);return this.localCache[t]=JSON.stringify(n),n}async _remove(t){await super._remove(t),delete this.localCache[t]}}rM.type="LOCAL";const uae=rM;/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class iM extends nM{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(t,n){}_removeListener(t,n){}}iM.type="SESSION";const oM=iM;/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function cae(e){return Promise.all(e.map(async t=>{try{return{fulfilled:!0,value:await t}}catch(n){return{fulfilled:!1,reason:n}}}))}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class xy{constructor(t){this.eventTarget=t,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(t){const n=this.receivers.find(i=>i.isListeningto(t));if(n)return n;const r=new xy(t);return this.receivers.push(r),r}isListeningto(t){return this.eventTarget===t}async handleEvent(t){const n=t,{eventId:r,eventType:i,data:o}=n.data,s=this.handlersMap[i];if(!(s!=null&&s.size))return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:i});const a=Array.from(s).map(async u=>u(n.origin,o)),l=await cae(a);n.ports[0].postMessage({status:"done",eventId:r,eventType:i,response:l})}_subscribe(t,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[t]||(this.handlersMap[t]=new Set),this.handlersMap[t].add(n)}_unsubscribe(t,n){this.handlersMap[t]&&n&&this.handlersMap[t].delete(n),(!n||this.handlersMap[t].size===0)&&delete this.handlersMap[t],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}xy.receivers=[];/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Jx(e="",t=10){let n="";for(let r=0;r<t;r++)n+=Math.floor(Math.random()*10);return e+n}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class dae{constructor(t){this.target=t,this.handlers=new Set}removeMessageHandler(t){t.messageChannel&&(t.messageChannel.port1.removeEventListener("message",t.onMessage),t.messageChannel.port1.close()),this.handlers.delete(t)}async _send(t,n,r=50){const i=typeof MessageChannel<"u"?new MessageChannel:null;if(!i)throw new Error("connection_unavailable");let o,s;return new Promise((a,l)=>{const u=Jx("",20);i.port1.start();const c=setTimeout(()=>{l(new Error("unsupported_event"))},r);s={messageChannel:i,onMessage(d){const f=d;if(f.data.eventId===u)switch(f.data.status){case"ack":clearTimeout(c),o=setTimeout(()=>{l(new Error("timeout"))},3e3);break;case"done":clearTimeout(o),a(f.data.response);break;default:clearTimeout(c),clearTimeout(o),l(new Error("invalid_response"));break}}},this.handlers.add(s),i.port1.addEventListener("message",s.onMessage),this.target.postMessage({eventType:t,eventId:u,data:n},[i.port2])}).finally(()=>{s&&this.removeMessageHandler(s)})}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Ui(){return window}function fae(e){Ui().location.href=e}/**
 * @license
 * Copyright 2020 Google LLC.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function sM(){return typeof Ui().WorkerGlobalScope<"u"&&typeof Ui().importScripts=="function"}async function hae(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function pae(){var e;return((e=navigator==null?void 0:navigator.serviceWorker)===null||e===void 0?void 0:e.controller)||null}function mae(){return sM()?self:null}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const aM="firebaseLocalStorageDb",gae=1,Fm="firebaseLocalStorage",lM="fbase_key";class Rf{constructor(t){this.request=t}toPromise(){return new Promise((t,n)=>{this.request.addEventListener("success",()=>{t(this.request.result)}),this.request.addEventListener("error",()=>{n(this.request.error)})})}}function _y(e,t){return e.transaction([Fm],t?"readwrite":"readonly").objectStore(Fm)}function yae(){const e=indexedDB.deleteDatabase(aM);return new Rf(e).toPromise()}function Jb(){const e=indexedDB.open(aM,gae);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{const r=e.result;try{r.createObjectStore(Fm,{keyPath:lM})}catch(i){n(i)}}),e.addEventListener("success",async()=>{const r=e.result;r.objectStoreNames.contains(Fm)?t(r):(r.close(),await yae(),t(await Jb()))})})}async function vP(e,t,n){const r=_y(e,!0).put({[lM]:t,value:n});return new Rf(r).toPromise()}async function vae(e,t){const n=_y(e,!1).get(t),r=await new Rf(n).toPromise();return r===void 0?null:r.value}function bP(e,t){const n=_y(e,!0).delete(t);return new Rf(n).toPromise()}const bae=800,wae=3;class uM{constructor(){this.type="LOCAL",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.db?this.db:(this.db=await Jb(),this.db)}async _withRetries(t){let n=0;for(;;)try{const r=await this._openDb();return await t(r)}catch(r){if(n++>wae)throw r;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return sM()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=xy._getInstance(mae()),this.receiver._subscribe("keyChanged",async(t,n)=>({keyProcessed:(await this._poll()).includes(n.key)})),this.receiver._subscribe("ping",async(t,n)=>["keyChanged"])}async initializeSender(){var t,n;if(this.activeServiceWorker=await hae(),!this.activeServiceWorker)return;this.sender=new dae(this.activeServiceWorker);const r=await this.sender._send("ping",{},800);r&&!((t=r[0])===null||t===void 0)&&t.fulfilled&&!((n=r[0])===null||n===void 0)&&n.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(t){if(!(!this.sender||!this.activeServiceWorker||pae()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:t},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const t=await Jb();return await vP(t,jm,"1"),await bP(t,jm),!0}catch{}return!1}async _withPendingWrite(t){this.pendingWrites++;try{await t()}finally{this.pendingWrites--}}async _set(t,n){return this._withPendingWrite(async()=>(await this._withRetries(r=>vP(r,t,n)),this.localCache[t]=n,this.notifyServiceWorker(t)))}async _get(t){const n=await this._withRetries(r=>vae(r,t));return this.localCache[t]=n,n}async _remove(t){return this._withPendingWrite(async()=>(await this._withRetries(n=>bP(n,t)),delete this.localCache[t],this.notifyServiceWorker(t)))}async _poll(){const t=await this._withRetries(i=>{const o=_y(i,!1).getAll();return new Rf(o).toPromise()});if(!t)return[];if(this.pendingWrites!==0)return[];const n=[],r=new Set;for(const{fbase_key:i,value:o}of t)r.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(o)&&(this.notifyListeners(i,o),n.push(i));for(const i of Object.keys(this.localCache))this.localCache[i]&&!r.has(i)&&(this.notifyListeners(i,null),n.push(i));return n}notifyListeners(t,n){this.localCache[t]=n;const r=this.listeners[t];if(r)for(const i of Array.from(r))i(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),bae)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(t,n){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[t]||(this.listeners[t]=new Set,this._get(t)),this.listeners[t].add(n)}_removeListener(t,n){this.listeners[t]&&(this.listeners[t].delete(n),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&this.stopPolling()}}uM.type="LOCAL";const Sae=uM;new Pf(3e4,6e4);/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function xae(e,t){return t?uo(t):(be(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Zx extends Yx{constructor(t){super("custom","custom"),this.params=t}_getIdTokenResponse(t){return Fl(t,this._buildIdpRequest())}_linkToIdToken(t,n){return Fl(t,this._buildIdpRequest(n))}_getReauthenticationResolver(t){return Fl(t,this._buildIdpRequest())}_buildIdpRequest(t){const n={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 t&&(n.idToken=t),n}}function _ae(e){return tM(e.auth,new Zx(e),e.bypassAuthState)}function Cae(e){const{auth:t,user:n}=e;return be(n,t,"internal-error"),Zse(n,new Zx(e),e.bypassAuthState)}async function Eae(e){const{auth:t,user:n}=e;return be(n,t,"internal-error"),Jse(n,new Zx(e),e.bypassAuthState)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class cM{constructor(t,n,r,i,o=!1){this.auth=t,this.resolver=r,this.user=i,this.bypassAuthState=o,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise(async(t,n)=>{this.pendingPromise={resolve:t,reject:n};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}})}async onAuthEvent(t){const{urlResponse:n,sessionId:r,postBody:i,tenantId:o,error:s,type:a}=t;if(s){this.reject(s);return}const l={auth:this.auth,requestUri:n,sessionId:r,tenantId:o||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(a)(l))}catch(u){this.reject(u)}}onError(t){this.reject(t)}getIdpTask(t){switch(t){case"signInViaPopup":case"signInViaRedirect":return _ae;case"linkViaPopup":case"linkViaRedirect":return Eae;case"reauthViaPopup":case"reauthViaRedirect":return Cae;default:mi(this.auth,"internal-error")}}resolve(t){ko(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(t),this.unregisterAndCleanUp()}reject(t){ko(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(t),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const kae=new Pf(2e3,1e4);class wl extends cM{constructor(t,n,r,i,o){super(t,n,i,o),this.provider=r,this.authWindow=null,this.pollId=null,wl.currentPopupAction&&wl.currentPopupAction.cancel(),wl.currentPopupAction=this}async executeNotNull(){const t=await this.execute();return be(t,this.auth,"internal-error"),t}async onExecution(){ko(this.filter.length===1,"Popup operations only handle one event");const t=Jx();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],t),this.authWindow.associatedEvent=t,this.resolver._originValidation(this.auth).catch(n=>{this.reject(n)}),this.resolver._isIframeWebStorageSupported(this.auth,n=>{n||this.reject(Bi(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var t;return((t=this.authWindow)===null||t===void 0?void 0:t.associatedEvent)||null}cancel(){this.reject(Bi(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,wl.currentPopupAction=null}pollUserCancellation(){const t=()=>{var n,r;if(!((r=(n=this.authWindow)===null||n===void 0?void 0:n.window)===null||r===void 0)&&r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(Bi(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(t,kae.get())};t()}}wl.currentPopupAction=null;/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const Tae="pendingRedirect",Cp=new Map;class Pae extends cM{constructor(t,n,r=!1){super(t,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}async execute(){let t=Cp.get(this.auth._key());if(!t){try{const r=await Iae(this.resolver,this.auth)?await super.execute():null;t=()=>Promise.resolve(r)}catch(n){t=()=>Promise.reject(n)}Cp.set(this.auth._key(),t)}return this.bypassAuthState||Cp.set(this.auth._key(),()=>Promise.resolve(null)),t()}async onAuthEvent(t){if(t.type==="signInViaRedirect")return super.onAuthEvent(t);if(t.type==="unknown"){this.resolve(null);return}if(t.eventId){const n=await this.auth._redirectUserForId(t.eventId);if(n)return this.user=n,super.onAuthEvent(t);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function Iae(e,t){const n=$ae(t),r=Rae(e);if(!await r._isAvailable())return!1;const i=await r._get(n)==="true";return await r._remove(n),i}function Aae(e,t){Cp.set(e._key(),t)}function Rae(e){return uo(e._redirectPersistence)}function $ae(e){return _p(Tae,e.config.apiKey,e.name)}async function Oae(e,t,n=!1){const r=Ou(e),i=xae(r,t),s=await new Pae(r,i,n).execute();return s&&!n&&(delete s.user._redirectEventId,await r._persistUserIfCurrent(s.user),await r._setRedirectUser(null,t)),s}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const Nae=10*60*1e3;class Dae{constructor(t){this.auth=t,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(t){this.consumers.add(t),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,t)&&(this.sendToConsumer(this.queuedRedirectEvent,t),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(t){this.consumers.delete(t)}onEvent(t){if(this.hasEventBeenHandled(t))return!1;let n=!1;return this.consumers.forEach(r=>{this.isEventForConsumer(t,r)&&(n=!0,this.sendToConsumer(t,r),this.saveEventToCache(t))}),this.hasHandledPotentialRedirect||!Mae(t)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=t,n=!0)),n}sendToConsumer(t,n){var r;if(t.error&&!dM(t)){const i=((r=t.error.code)===null||r===void 0?void 0:r.split("auth/")[1])||"internal-error";n.onError(Bi(this.auth,i))}else n.onAuthEvent(t)}isEventForConsumer(t,n){const r=n.eventId===null||!!t.eventId&&t.eventId===n.eventId;return n.filter.includes(t.type)&&r}hasEventBeenHandled(t){return Date.now()-this.lastProcessedEventTime>=Nae&&this.cachedEventUids.clear(),this.cachedEventUids.has(wP(t))}saveEventToCache(t){this.cachedEventUids.add(wP(t)),this.lastProcessedEventTime=Date.now()}}function wP(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(t=>t).join("-")}function dM({type:e,error:t}){return e==="unknown"&&(t==null?void 0:t.code)==="auth/no-auth-event"}function Mae(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return dM(e);default:return!1}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function Lae(e,t={}){return Na(e,"GET","/v1/projects",t)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const jae=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,Fae=/^https?/;async function zae(e){if(e.config.emulator)return;const{authorizedDomains:t}=await Lae(e);for(const n of t)try{if(Vae(n))return}catch{}mi(e,"unauthorized-domain")}function Vae(e){const t=Xb(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){const s=new URL(e);return s.hostname===""&&r===""?n==="chrome-extension:"&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):n==="chrome-extension:"&&s.hostname===r}if(!Fae.test(n))return!1;if(jae.test(e))return r===e;const i=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}/**
 * @license
 * Copyright 2020 Google LLC.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const Bae=new Pf(3e4,6e4);function SP(){const e=Ui().___jsl;if(e!=null&&e.H){for(const 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 n=0;n<e.CP.length;n++)e.CP[n]=null}}function Uae(e){return new Promise((t,n)=>{var r,i,o;function s(){SP(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{SP(),n(Bi(e,"network-request-failed"))},timeout:Bae.get()})}if(!((i=(r=Ui().gapi)===null||r===void 0?void 0:r.iframes)===null||i===void 0)&&i.Iframe)t(gapi.iframes.getContext());else if(!((o=Ui().gapi)===null||o===void 0)&&o.load)s();else{const a=Dse("iframefcb");return Ui()[a]=()=>{gapi.load?s():n(Bi(e,"network-request-failed"))},YD(`https://apis.google.com/js/api.js?onload=${a}`).catch(l=>n(l))}}).catch(t=>{throw Ep=null,t})}let Ep=null;function Wae(e){return Ep=Ep||Uae(e),Ep}/**
 * @license
 * Copyright 2020 Google LLC.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const Hae=new Pf(5e3,15e3),qae="__/auth/iframe",Kae="emulator/auth/iframe",Gae={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},Qae=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function Yae(e){const t=e.config;be(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?Kx(t,Kae):`https://${e.config.authDomain}/${qae}`,r={apiKey:t.apiKey,appName:e.name,v:Ru},i=Qae.get(e.config.apiHost);i&&(r.eid=i);const o=e._getFrameworks();return o.length&&(r.fw=o.join(",")),`${n}?${Tf(r).slice(1)}`}async function Xae(e){const t=await Wae(e),n=Ui().gapi;return be(n,e,"internal-error"),t.open({where:document.body,url:Yae(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:Gae,dontclear:!0},r=>new Promise(async(i,o)=>{await r.restyle({setHideOnLeave:!1});const s=Bi(e,"network-request-failed"),a=Ui().setTimeout(()=>{o(s)},Hae.get());function l(){Ui().clearTimeout(a),i(r)}r.ping(l).then(l,()=>{o(s)})}))}/**
 * @license
 * Copyright 2020 Google LLC.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const Jae={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},Zae=500,ele=600,tle="_blank",nle="http://localhost";class xP{constructor(t){this.window=t,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function rle(e,t,n,r=Zae,i=ele){const o=Math.max((window.screen.availHeight-i)/2,0).toString(),s=Math.max((window.screen.availWidth-r)/2,0).toString();let a="";const l=Object.assign(Object.assign({},Jae),{width:r.toString(),height:i.toString(),top:o,left:s}),u=Un().toLowerCase();n&&(a=VD(u)?tle:n),zD(u)&&(t=t||nle,l.scrollbars="yes");const c=Object.entries(l).reduce((f,[h,p])=>`${f}${h}=${p},`,"");if(Rse(u)&&a!=="_self")return ile(t||"",a),new xP(null);const d=window.open(t||"",a,c);be(d,e,"popup-blocked");try{d.focus()}catch{}return new xP(d)}function ile(e,t){const n=document.createElement("a");n.href=e,n.target=t;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const ole="__/auth/handler",sle="emulator/auth/handler",ale=encodeURIComponent("fac");async function _P(e,t,n,r,i,o){be(e.config.authDomain,e,"auth-domain-config-required"),be(e.config.apiKey,e,"invalid-api-key");const s={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:Ru,eventId:i};if(t instanceof ZD){t.setDefaultLanguage(e.languageCode),s.providerId=t.providerId||"",roe(t.getCustomParameters())||(s.customParameters=JSON.stringify(t.getCustomParameters()));for(const[c,d]of Object.entries(o||{}))s[c]=d}if(t instanceof Af){const c=t.getScopes().filter(d=>d!=="");c.length>0&&(s.scopes=c.join(","))}e.tenantId&&(s.tid=e.tenantId);const a=s;for(const c of Object.keys(a))a[c]===void 0&&delete a[c];const l=await e._getAppCheckToken(),u=l?`#${ale}=${encodeURIComponent(l)}`:"";return`${lle(e)}?${Tf(a).slice(1)}${u}`}function lle({config:e}){return e.emulator?Kx(e,sle):`https://${e.authDomain}/${ole}`}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const Hv="webStorageSupport";class ule{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=oM,this._completeRedirectFn=Oae,this._overrideRedirectResult=Aae}async _openPopup(t,n,r,i){var o;ko((o=this.eventManagers[t._key()])===null||o===void 0?void 0:o.manager,"_initialize() not called before _openPopup()");const s=await _P(t,n,r,Xb(),i);return rle(t,s,Jx())}async _openRedirect(t,n,r,i){await this._originValidation(t);const o=await _P(t,n,r,Xb(),i);return fae(o),new Promise(()=>{})}_initialize(t){const n=t._key();if(this.eventManagers[n]){const{manager:i,promise:o}=this.eventManagers[n];return i?Promise.resolve(i):(ko(o,"If manager is not set, promise should be"),o)}const r=this.initAndGetManager(t);return this.eventManagers[n]={promise:r},r.catch(()=>{delete this.eventManagers[n]}),r}async initAndGetManager(t){const n=await Xae(t),r=new Dae(t);return n.register("authEvent",i=>(be(i==null?void 0:i.authEvent,t,"invalid-auth-event"),{status:r.onEvent(i.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[t._key()]={manager:r},this.iframes[t._key()]=n,r}_isIframeWebStorageSupported(t,n){this.iframes[t._key()].send(Hv,{type:Hv},i=>{var o;const s=(o=i==null?void 0:i[0])===null||o===void 0?void 0:o[Hv];s!==void 0&&n(!!s),mi(t,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(t){const n=t._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=zae(t)),this.originValidationPromises[n]}get _shouldInitProactively(){return qD()||Qx()||Sy()}}const cle=ule;var CP="@firebase/auth",EP="0.23.2";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class dle{constructor(t){this.auth=t,this.internalListeners=new Map}getUid(){var t;return this.assertAuthConfigured(),((t=this.auth.currentUser)===null||t===void 0?void 0:t.uid)||null}async getToken(t){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(t)}:null}addAuthTokenListener(t){if(this.assertAuthConfigured(),this.internalListeners.has(t))return;const n=this.auth.onIdTokenChanged(r=>{t((r==null?void 0:r.stsTokenManager.accessToken)||null)});this.internalListeners.set(t,n),this.updateProactiveRefresh()}removeAuthTokenListener(t){this.assertAuthConfigured();const n=this.internalListeners.get(t);n&&(this.internalListeners.delete(t),n(),this.updateProactiveRefresh())}assertAuthConfigured(){be(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function fle(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}function hle(e){cu(new Sa("auth",(t,{options:n})=>{const r=t.getProvider("app").getImmediate(),i=t.getProvider("heartbeat"),o=t.getProvider("app-check-internal"),{apiKey:s,authDomain:a}=r.options;be(s&&!s.includes(":"),"invalid-api-key",{appName:r.name});const l={apiKey:s,authDomain:a,clientPlatform:e,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:KD(e)},u=new zse(r,i,o,l);return Bse(u,n),u},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,n,r)=>{t.getProvider("auth-internal").initialize()})),cu(new Sa("auth-internal",t=>{const n=Ou(t.getProvider("auth").getImmediate());return(r=>new dle(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),xs(CP,EP,fle(e)),xs(CP,EP,"esm2017")}/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const ple=5*60,mle=kD("authIdTokenMaxAge")||ple;let kP=null;const gle=e=>async t=>{const n=t&&await t.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>mle)return;const i=n==null?void 0:n.token;kP!==i&&(kP=i,await fetch(e,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function yle(e=AD()){const t=Wx(e,"auth");if(t.isInitialized())return t.getImmediate();const n=Vse(e,{popupRedirectResolver:cle,persistence:[Sae,uae,oM]}),r=kD("authTokenSyncURL");if(r){const o=gle(r);rae(n,o,()=>o(n.currentUser)),nae(n,s=>o(s))}const i=CD("auth");return i&&Use(n,`http://${i}`),n}hle("Browser");var vle="firebase",ble="9.22.1";/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */xs(vle,ble,"app");var wle=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},J,e_=e_||{},xe=wle||self;function Cy(e){var t=typeof e;return t=t!="object"?t:e?Array.isArray(e)?"array":t:"null",t=="array"||t=="object"&&typeof e.length=="number"}function $f(e){var t=typeof e;return t=="object"&&e!=null||t=="function"}function Sle(e){return Object.prototype.hasOwnProperty.call(e,qv)&&e[qv]||(e[qv]=++xle)}var qv="closure_uid_"+(1e9*Math.random()>>>0),xle=0;function _le(e,t,n){return e.call.apply(e.bind,arguments)}function Cle(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var i=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(i,r),e.apply(t,i)}}return function(){return e.apply(t,arguments)}}function Fn(e,t,n){return Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?Fn=_le:Fn=Cle,Fn.apply(null,arguments)}function Rh(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var r=n.slice();return r.push.apply(r,arguments),e.apply(this,r)}}function yn(e,t){function n(){}n.prototype=t.prototype,e.$=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.ac=function(r,i,o){for(var s=Array(arguments.length-2),a=2;a<arguments.length;a++)s[a-2]=arguments[a];return t.prototype[i].apply(r,s)}}function js(){this.s=this.s,this.o=this.o}var Ele=0;js.prototype.s=!1;js.prototype.sa=function(){!this.s&&(this.s=!0,this.N(),Ele!=0)&&Sle(this)};js.prototype.N=function(){if(this.o)for(;this.o.length;)this.o.shift()()};const fM=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if(typeof e=="string")return typeof t!="string"||t.length!=1?-1:e.indexOf(t,0);for(let n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1};function t_(e){const t=e.length;if(0<t){const n=Array(t);for(let r=0;r<t;r++)n[r]=e[r];return n}return[]}function TP(e,t){for(let n=1;n<arguments.length;n++){const r=arguments[n];if(Cy(r)){const i=e.length||0,o=r.length||0;e.length=i+o;for(let s=0;s<o;s++)e[i+s]=r[s]}else e.push(r)}}function zn(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}zn.prototype.h=function(){this.defaultPrevented=!0};var kle=function(){if(!xe.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{xe.addEventListener("test",()=>{},t),xe.removeEventListener("test",()=>{},t)}catch{}return e}();function zd(e){return/^[\s\xa0]*$/.test(e)}function Ey(){var e=xe.navigator;return e&&(e=e.userAgent)?e:""}function Ii(e){return Ey().indexOf(e)!=-1}function n_(e){return n_[" "](e),e}n_[" "]=function(){};function Tle(e,t){var n=bue;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:n[e]=t(e)}var Ple=Ii("Opera"),fu=Ii("Trident")||Ii("MSIE"),hM=Ii("Edge"),Zb=hM||fu,pM=Ii("Gecko")&&!(Ey().toLowerCase().indexOf("webkit")!=-1&&!Ii("Edge"))&&!(Ii("Trident")||Ii("MSIE"))&&!Ii("Edge"),Ile=Ey().toLowerCase().indexOf("webkit")!=-1&&!Ii("Edge");function mM(){var e=xe.document;return e?e.documentMode:void 0}var ew;e:{var Kv="",Gv=function(){var e=Ey();if(pM)return/rv:([^\);]+)(\)|;)/.exec(e);if(hM)return/Edge\/([\d\.]+)/.exec(e);if(fu)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e);if(Ile)return/WebKit\/(\S+)/.exec(e);if(Ple)return/(?:Version)[ \/]?(\S+)/.exec(e)}();if(Gv&&(Kv=Gv?Gv[1]:""),fu){var Qv=mM();if(Qv!=null&&Qv>parseFloat(Kv)){ew=String(Qv);break e}}ew=Kv}var tw;if(xe.document&&fu){var PP=mM();tw=PP||parseInt(ew,10)||void 0}else tw=void 0;var Ale=tw;function Vd(e,t){if(zn.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){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.g=t,t=e.relatedTarget){if(pM){e:{try{n_(t.nodeName);var i=!0;break e}catch{}i=!1}i||(t=null)}}else n=="mouseover"?t=e.fromElement:n=="mouseout"&&(t=e.toElement);this.relatedTarget=t,r?(this.clientX=r.clientX!==void 0?r.clientX:r.pageX,this.clientY=r.clientY!==void 0?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=e.clientX!==void 0?e.clientX:e.pageX,this.clientY=e.clientY!==void 0?e.clientY:e.pageY,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=typeof e.pointerType=="string"?e.pointerType:Rle[e.pointerType]||"",this.state=e.state,this.i=e,e.defaultPrevented&&Vd.$.h.call(this)}}yn(Vd,zn);var Rle={2:"touch",3:"pen",4:"mouse"};Vd.prototype.h=function(){Vd.$.h.call(this);var e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var Of="closure_listenable_"+(1e6*Math.random()|0),$le=0;function Ole(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.la=i,this.key=++$le,this.fa=this.ia=!1}function ky(e){e.fa=!0,e.listener=null,e.proxy=null,e.src=null,e.la=null}function r_(e,t,n){for(const r in e)t.call(n,e[r],r,e)}function Nle(e,t){for(const n in e)t.call(void 0,e[n],n,e)}function gM(e){const t={};for(const n in e)t[n]=e[n];return t}const IP="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function yM(e,t){let n,r;for(let i=1;i<arguments.length;i++){r=arguments[i];for(n in r)e[n]=r[n];for(let o=0;o<IP.length;o++)n=IP[o],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function Ty(e){this.src=e,this.g={},this.h=0}Ty.prototype.add=function(e,t,n,r,i){var o=e.toString();e=this.g[o],e||(e=this.g[o]=[],this.h++);var s=rw(e,t,r,i);return-1<s?(t=e[s],n||(t.ia=!1)):(t=new Ole(t,this.src,o,!!r,i),t.ia=n,e.push(t)),t};function nw(e,t){var n=t.type;if(n in e.g){var r=e.g[n],i=fM(r,t),o;(o=0<=i)&&Array.prototype.splice.call(r,i,1),o&&(ky(t),e.g[n].length==0&&(delete e.g[n],e.h--))}}function rw(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i];if(!o.fa&&o.listener==t&&o.capture==!!n&&o.la==r)return i}return-1}var i_="closure_lm_"+(1e6*Math.random()|0),Yv={};function vM(e,t,n,r,i){if(r&&r.once)return wM(e,t,n,r,i);if(Array.isArray(t)){for(var o=0;o<t.length;o++)vM(e,t[o],n,r,i);return null}return n=a_(n),e&&e[Of]?e.O(t,n,$f(r)?!!r.capture:!!r,i):bM(e,t,n,!1,r,i)}function bM(e,t,n,r,i,o){if(!t)throw Error("Invalid event type");var s=$f(i)?!!i.capture:!!i,a=s_(e);if(a||(e[i_]=a=new Ty(e)),n=a.add(t,n,r,s,o),n.proxy)return n;if(r=Dle(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)kle||(i=s),i===void 0&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(xM(t.toString()),r);else if(e.addListener&&e.removeListener)e.addListener(r);else throw Error("addEventListener and attachEvent are unavailable.");return n}function Dle(){function e(n){return t.call(e.src,e.listener,n)}const t=Mle;return e}function wM(e,t,n,r,i){if(Array.isArray(t)){for(var o=0;o<t.length;o++)wM(e,t[o],n,r,i);return null}return n=a_(n),e&&e[Of]?e.P(t,n,$f(r)?!!r.capture:!!r,i):bM(e,t,n,!0,r,i)}function SM(e,t,n,r,i){if(Array.isArray(t))for(var o=0;o<t.length;o++)SM(e,t[o],n,r,i);else r=$f(r)?!!r.capture:!!r,n=a_(n),e&&e[Of]?(e=e.i,t=String(t).toString(),t in e.g&&(o=e.g[t],n=rw(o,n,r,i),-1<n&&(ky(o[n]),Array.prototype.splice.call(o,n,1),o.length==0&&(delete e.g[t],e.h--)))):e&&(e=s_(e))&&(t=e.g[t.toString()],e=-1,t&&(e=rw(t,n,r,i)),(n=-1<e?t[e]:null)&&o_(n))}function o_(e){if(typeof e!="number"&&e&&!e.fa){var t=e.src;if(t&&t[Of])nw(t.i,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(xM(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=s_(t))?(nw(n,e),n.h==0&&(n.src=null,t[i_]=null)):ky(e)}}}function xM(e){return e in Yv?Yv[e]:Yv[e]="on"+e}function Mle(e,t){if(e.fa)e=!0;else{t=new Vd(t,this);var n=e.listener,r=e.la||e.src;e.ia&&o_(e),e=n.call(r,t)}return e}function s_(e){return e=e[i_],e instanceof Ty?e:null}var Xv="__closure_events_fn_"+(1e9*Math.random()>>>0);function a_(e){return typeof e=="function"?e:(e[Xv]||(e[Xv]=function(t){return e.handleEvent(t)}),e[Xv])}function mn(){js.call(this),this.i=new Ty(this),this.S=this,this.J=null}yn(mn,js);mn.prototype[Of]=!0;mn.prototype.removeEventListener=function(e,t,n,r){SM(this,e,t,n,r)};function kn(e,t){var n,r=e.J;if(r)for(n=[];r;r=r.J)n.push(r);if(e=e.S,r=t.type||t,typeof t=="string")t=new zn(t,e);else if(t instanceof zn)t.target=t.target||e;else{var i=t;t=new zn(r,e),yM(t,i)}if(i=!0,n)for(var o=n.length-1;0<=o;o--){var s=t.g=n[o];i=$h(s,r,!0,t)&&i}if(s=t.g=e,i=$h(s,r,!0,t)&&i,i=$h(s,r,!1,t)&&i,n)for(o=0;o<n.length;o++)s=t.g=n[o],i=$h(s,r,!1,t)&&i}mn.prototype.N=function(){if(mn.$.N.call(this),this.i){var e=this.i,t;for(t in e.g){for(var n=e.g[t],r=0;r<n.length;r++)ky(n[r]);delete e.g[t],e.h--}}this.J=null};mn.prototype.O=function(e,t,n,r){return this.i.add(String(e),t,!1,n,r)};mn.prototype.P=function(e,t,n,r){return this.i.add(String(e),t,!0,n,r)};function $h(e,t,n,r){if(t=e.i.g[String(t)],!t)return!0;t=t.concat();for(var i=!0,o=0;o<t.length;++o){var s=t[o];if(s&&!s.fa&&s.capture==n){var a=s.listener,l=s.la||s.src;s.ia&&nw(e.i,s),i=a.call(l,r)!==!1&&i}}return i&&!r.defaultPrevented}var l_=xe.JSON.stringify;class Lle{constructor(t,n){this.i=t,this.j=n,this.h=0,this.g=null}get(){let t;return 0<this.h?(this.h--,t=this.g,this.g=t.next,t.next=null):t=this.i(),t}}function jle(){var e=u_;let t=null;return e.g&&(t=e.g,e.g=e.g.next,e.g||(e.h=null),t.next=null),t}class Fle{constructor(){this.h=this.g=null}add(t,n){const r=_M.get();r.set(t,n),this.h?this.h.next=r:this.g=r,this.h=r}}var _M=new Lle(()=>new zle,e=>e.reset());class zle{constructor(){this.next=this.g=this.h=null}set(t,n){this.h=t,this.g=n,this.next=null}reset(){this.next=this.g=this.h=null}}function Vle(e){var t=1;e=e.split(":");const n=[];for(;0<t&&e.length;)n.push(e.shift()),t--;return e.length&&n.push(e.join(":")),n}function Ble(e){xe.setTimeout(()=>{throw e},0)}let Bd,Ud=!1,u_=new Fle,CM=()=>{const e=xe.Promise.resolve(void 0);Bd=()=>{e.then(Ule)}};var Ule=()=>{for(var e;e=jle();){try{e.h.call(e.g)}catch(n){Ble(n)}var t=_M;t.j(e),100>t.h&&(t.h++,e.next=t.g,t.g=e)}Ud=!1};function Py(e,t){mn.call(this),this.h=e||1,this.g=t||xe,this.j=Fn(this.qb,this),this.l=Date.now()}yn(Py,mn);J=Py.prototype;J.ga=!1;J.T=null;J.qb=function(){if(this.ga){var e=Date.now()-this.l;0<e&&e<.8*this.h?this.T=this.g.setTimeout(this.j,this.h-e):(this.T&&(this.g.clearTimeout(this.T),this.T=null),kn(this,"tick"),this.ga&&(c_(this),this.start()))}};J.start=function(){this.ga=!0,this.T||(this.T=this.g.setTimeout(this.j,this.h),this.l=Date.now())};function c_(e){e.ga=!1,e.T&&(e.g.clearTimeout(e.T),e.T=null)}J.N=function(){Py.$.N.call(this),c_(this),delete this.g};function d_(e,t,n){if(typeof e=="function")n&&(e=Fn(e,n));else if(e&&typeof e.handleEvent=="function")e=Fn(e.handleEvent,e);else throw Error("Invalid listener argument");return 2147483647<Number(t)?-1:xe.setTimeout(e,t||0)}function EM(e){e.g=d_(()=>{e.g=null,e.i&&(e.i=!1,EM(e))},e.j);const t=e.h;e.h=null,e.m.apply(null,t)}class Wle extends js{constructor(t,n){super(),this.m=t,this.j=n,this.h=null,this.i=!1,this.g=null}l(t){this.h=arguments,this.g?this.i=!0:EM(this)}N(){super.N(),this.g&&(xe.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Wd(e){js.call(this),this.h=e,this.g={}}yn(Wd,js);var AP=[];function kM(e,t,n,r){Array.isArray(n)||(n&&(AP[0]=n.toString()),n=AP);for(var i=0;i<n.length;i++){var o=vM(t,n[i],r||e.handleEvent,!1,e.h||e);if(!o)break;e.g[o.key]=o}}function TM(e){r_(e.g,function(t,n){this.g.hasOwnProperty(n)&&o_(t)},e),e.g={}}Wd.prototype.N=function(){Wd.$.N.call(this),TM(this)};Wd.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};function Iy(){this.g=!0}Iy.prototype.Ea=function(){this.g=!1};function Hle(e,t,n,r,i,o){e.info(function(){if(e.g)if(o)for(var s="",a=o.split("&"),l=0;l<a.length;l++){var u=a[l].split("=");if(1<u.length){var c=u[0];u=u[1];var d=c.split("_");s=2<=d.length&&d[1]=="type"?s+(c+"="+u+"&"):s+(c+"=redacted&")}}else s=null;else s=o;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+t+`
`+n+`
`+s})}function qle(e,t,n,r,i,o,s){e.info(function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+t+`
`+n+`
`+o+" "+s})}function Sl(e,t,n,r){e.info(function(){return"XMLHTTP TEXT ("+t+"): "+Gle(e,n)+(r?" "+r:"")})}function Kle(e,t){e.info(function(){return"TIMEOUT: "+t})}Iy.prototype.info=function(){};function Gle(e,t){if(!e.g)return t;if(!t)return null;try{var n=JSON.parse(t);if(n){for(e=0;e<n.length;e++)if(Array.isArray(n[e])){var r=n[e];if(!(2>r.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var o=i[0];if(o!="noop"&&o!="stop"&&o!="close")for(var s=1;s<i.length;s++)i[s]=""}}}}return l_(n)}catch{return t}}var Da={},RP=null;function Ay(){return RP=RP||new mn}Da.Ta="serverreachability";function PM(e){zn.call(this,Da.Ta,e)}yn(PM,zn);function Hd(e){const t=Ay();kn(t,new PM(t))}Da.STAT_EVENT="statevent";function IM(e,t){zn.call(this,Da.STAT_EVENT,e),this.stat=t}yn(IM,zn);function er(e){const t=Ay();kn(t,new IM(t,e))}Da.Ua="timingevent";function AM(e,t){zn.call(this,Da.Ua,e),this.size=t}yn(AM,zn);function Nf(e,t){if(typeof e!="function")throw Error("Fn must not be null and must be a function");return xe.setTimeout(function(){e()},t)}var Ry={NO_ERROR:0,rb:1,Eb:2,Db:3,yb:4,Cb:5,Fb:6,Qa:7,TIMEOUT:8,Ib:9},RM={wb:"complete",Sb:"success",Ra:"error",Qa:"abort",Kb:"ready",Lb:"readystatechange",TIMEOUT:"timeout",Gb:"incrementaldata",Jb:"progress",zb:"downloadprogress",$b:"uploadprogress"};function f_(){}f_.prototype.h=null;function $P(e){return e.h||(e.h=e.i())}function $M(){}var Df={OPEN:"a",vb:"b",Ra:"c",Hb:"d"};function h_(){zn.call(this,"d")}yn(h_,zn);function p_(){zn.call(this,"c")}yn(p_,zn);var iw;function $y(){}yn($y,f_);$y.prototype.g=function(){return new XMLHttpRequest};$y.prototype.i=function(){return{}};iw=new $y;function Mf(e,t,n,r){this.l=e,this.j=t,this.m=n,this.W=r||1,this.U=new Wd(this),this.P=Qle,e=Zb?125:void 0,this.V=new Py(e),this.I=null,this.i=!1,this.s=this.A=this.v=this.L=this.G=this.Y=this.B=null,this.F=[],this.g=null,this.C=0,this.o=this.u=null,this.ca=-1,this.J=!1,this.O=0,this.M=null,this.ba=this.K=this.aa=this.S=!1,this.h=new OM}function OM(){this.i=null,this.g="",this.h=!1}var Qle=45e3,ow={},zm={};J=Mf.prototype;J.setTimeout=function(e){this.P=e};function sw(e,t,n){e.L=1,e.v=Ny(To(t)),e.s=n,e.S=!0,NM(e,null)}function NM(e,t){e.G=Date.now(),Lf(e),e.A=To(e.v);var n=e.A,r=e.W;Array.isArray(r)||(r=[String(r)]),BM(n.i,"t",r),e.C=0,n=e.l.J,e.h=new OM,e.g=uL(e.l,n?t:null,!e.s),0<e.O&&(e.M=new Wle(Fn(e.Pa,e,e.g),e.O)),kM(e.U,e.g,"readystatechange",e.nb),t=e.I?gM(e.I):{},e.s?(e.u||(e.u="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.g.ha(e.A,e.u,e.s,t)):(e.u="GET",e.g.ha(e.A,e.u,null,t)),Hd(),Hle(e.j,e.u,e.A,e.m,e.W,e.s)}J.nb=function(e){e=e.target;const t=this.M;t&&Oi(e)==3?t.l():this.Pa(e)};J.Pa=function(e){try{if(e==this.g)e:{const c=Oi(this.g);var t=this.g.Ia();const d=this.g.da();if(!(3>c)&&(c!=3||Zb||this.g&&(this.h.h||this.g.ja()||MP(this.g)))){this.J||c!=4||t==7||(t==8||0>=d?Hd(3):Hd(2)),Oy(this);var n=this.g.da();this.ca=n;t:if(DM(this)){var r=MP(this.g);e="";var i=r.length,o=Oi(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){ia(this),Xc(this);var s="";break t}this.h.i=new xe.TextDecoder}for(t=0;t<i;t++)this.h.h=!0,e+=this.h.i.decode(r[t],{stream:o&&t==i-1});r.splice(0,i),this.h.g+=e,this.C=0,s=this.h.g}else s=this.g.ja();if(this.i=n==200,qle(this.j,this.u,this.A,this.m,this.W,c,n),this.i){if(this.aa&&!this.K){t:{if(this.g){var a,l=this.g;if((a=l.g?l.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!zd(a)){var u=a;break t}}u=null}if(n=u)Sl(this.j,this.m,n,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,aw(this,n);else{this.i=!1,this.o=3,er(12),ia(this),Xc(this);break e}}this.S?(MM(this,c,s),Zb&&this.i&&c==3&&(kM(this.U,this.V,"tick",this.mb),this.V.start())):(Sl(this.j,this.m,s,null),aw(this,s)),c==4&&ia(this),this.i&&!this.J&&(c==4?oL(this.l,this):(this.i=!1,Lf(this)))}else gue(this.g),n==400&&0<s.indexOf("Unknown SID")?(this.o=3,er(12)):(this.o=0,er(13)),ia(this),Xc(this)}}}catch{}finally{}};function DM(e){return e.g?e.u=="GET"&&e.L!=2&&e.l.Ha:!1}function MM(e,t,n){let r=!0,i;for(;!e.J&&e.C<n.length;)if(i=Yle(e,n),i==zm){t==4&&(e.o=4,er(14),r=!1),Sl(e.j,e.m,null,"[Incomplete Response]");break}else if(i==ow){e.o=4,er(15),Sl(e.j,e.m,n,"[Invalid Chunk]"),r=!1;break}else Sl(e.j,e.m,i,null),aw(e,i);DM(e)&&i!=zm&&i!=ow&&(e.h.g="",e.C=0),t!=4||n.length!=0||e.h.h||(e.o=1,er(16),r=!1),e.i=e.i&&r,r?0<n.length&&!e.ba&&(e.ba=!0,t=e.l,t.g==e&&t.ca&&!t.M&&(t.l.info("Great, no buffering proxy detected. Bytes received: "+n.length),w_(t),t.M=!0,er(11))):(Sl(e.j,e.m,n,"[Invalid Chunked Response]"),ia(e),Xc(e))}J.mb=function(){if(this.g){var e=Oi(this.g),t=this.g.ja();this.C<t.length&&(Oy(this),MM(this,e,t),this.i&&e!=4&&Lf(this))}};function Yle(e,t){var n=e.C,r=t.indexOf(`
`,n);return r==-1?zm:(n=Number(t.substring(n,r)),isNaN(n)?ow:(r+=1,r+n>t.length?zm:(t=t.slice(r,r+n),e.C=r+n,t)))}J.cancel=function(){this.J=!0,ia(this)};function Lf(e){e.Y=Date.now()+e.P,LM(e,e.P)}function LM(e,t){if(e.B!=null)throw Error("WatchDog timer not null");e.B=Nf(Fn(e.lb,e),t)}function Oy(e){e.B&&(xe.clearTimeout(e.B),e.B=null)}J.lb=function(){this.B=null;const e=Date.now();0<=e-this.Y?(Kle(this.j,this.A),this.L!=2&&(Hd(),er(17)),ia(this),this.o=2,Xc(this)):LM(this,this.Y-e)};function Xc(e){e.l.H==0||e.J||oL(e.l,e)}function ia(e){Oy(e);var t=e.M;t&&typeof t.sa=="function"&&t.sa(),e.M=null,c_(e.V),TM(e.U),e.g&&(t=e.g,e.g=null,t.abort(),t.sa())}function aw(e,t){try{var n=e.l;if(n.H!=0&&(n.g==e||lw(n.i,e))){if(!e.K&&lw(n.i,e)&&n.H==3){try{var r=n.Ja.g.parse(t)}catch{r=null}if(Array.isArray(r)&&r.length==3){var i=r;if(i[0]==0){e:if(!n.u){if(n.g)if(n.g.G+3e3<e.G)Um(n),Ly(n);else break e;b_(n),er(18)}}else n.Fa=i[1],0<n.Fa-n.V&&37500>i[2]&&n.G&&n.A==0&&!n.v&&(n.v=Nf(Fn(n.ib,n),6e3));if(1>=HM(n.i)&&n.oa){try{n.oa()}catch{}n.oa=void 0}}else oa(n,11)}else if((e.K||n.g==e)&&Um(n),!zd(t))for(i=n.Ja.g.parse(t),t=0;t<i.length;t++){let u=i[t];if(n.V=u[0],u=u[1],n.H==2)if(u[0]=="c"){n.K=u[1],n.pa=u[2];const c=u[3];c!=null&&(n.ra=c,n.l.info("VER="+n.ra));const d=u[4];d!=null&&(n.Ga=d,n.l.info("SVER="+n.Ga));const f=u[5];f!=null&&typeof f=="number"&&0<f&&(r=1.5*f,n.L=r,n.l.info("backChannelRequestTimeoutMs_="+r)),r=n;const h=e.g;if(h){const p=h.g?h.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(p){var o=r.i;o.g||p.indexOf("spdy")==-1&&p.indexOf("quic")==-1&&p.indexOf("h2")==-1||(o.j=o.l,o.g=new Set,o.h&&(m_(o,o.h),o.h=null))}if(r.F){const y=h.g?h.g.getResponseHeader("X-HTTP-Session-Id"):null;y&&(r.Da=y,pt(r.I,r.F,y))}}n.H=3,n.h&&n.h.Ba(),n.ca&&(n.S=Date.now()-e.G,n.l.info("Handshake RTT: "+n.S+"ms")),r=n;var s=e;if(r.wa=lL(r,r.J?r.pa:null,r.Y),s.K){qM(r.i,s);var a=s,l=r.L;l&&a.setTimeout(l),a.B&&(Oy(a),Lf(a)),r.g=s}else rL(r);0<n.j.length&&jy(n)}else u[0]!="stop"&&u[0]!="close"||oa(n,7);else n.H==3&&(u[0]=="stop"||u[0]=="close"?u[0]=="stop"?oa(n,7):v_(n):u[0]!="noop"&&n.h&&n.h.Aa(u),n.A=0)}}Hd(4)}catch{}}function Xle(e){if(e.Z&&typeof e.Z=="function")return e.Z();if(typeof Map<"u"&&e instanceof Map||typeof Set<"u"&&e instanceof Set)return Array.from(e.values());if(typeof e=="string")return e.split("");if(Cy(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}t=[],n=0;for(r in e)t[n++]=e[r];return t}function Jle(e){if(e.ta&&typeof e.ta=="function")return e.ta();if(!e.Z||typeof e.Z!="function"){if(typeof Map<"u"&&e instanceof Map)return Array.from(e.keys());if(!(typeof Set<"u"&&e instanceof Set)){if(Cy(e)||typeof e=="string"){var t=[];e=e.length;for(var n=0;n<e;n++)t.push(n);return t}t=[],n=0;for(const r in e)t[n++]=r;return t}}}function jM(e,t){if(e.forEach&&typeof e.forEach=="function")e.forEach(t,void 0);else if(Cy(e)||typeof e=="string")Array.prototype.forEach.call(e,t,void 0);else for(var n=Jle(e),r=Xle(e),i=r.length,o=0;o<i;o++)t.call(void 0,r[o],n&&n[o],e)}var FM=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function Zle(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),i=null;if(0<=r){var o=e[n].substring(0,r);i=e[n].substring(r+1)}else o=e[n];t(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}function ha(e){if(this.g=this.s=this.j="",this.m=null,this.o=this.l="",this.h=!1,e instanceof ha){this.h=e.h,Vm(this,e.j),this.s=e.s,this.g=e.g,Bm(this,e.m),this.l=e.l;var t=e.i,n=new qd;n.i=t.i,t.g&&(n.g=new Map(t.g),n.h=t.h),OP(this,n),this.o=e.o}else e&&(t=String(e).match(FM))?(this.h=!1,Vm(this,t[1]||"",!0),this.s=kc(t[2]||""),this.g=kc(t[3]||"",!0),Bm(this,t[4]),this.l=kc(t[5]||"",!0),OP(this,t[6]||"",!0),this.o=kc(t[7]||"")):(this.h=!1,this.i=new qd(null,this.h))}ha.prototype.toString=function(){var e=[],t=this.j;t&&e.push(Tc(t,NP,!0),":");var n=this.g;return(n||t=="file")&&(e.push("//"),(t=this.s)&&e.push(Tc(t,NP,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),n=this.m,n!=null&&e.push(":",String(n))),(n=this.l)&&(this.g&&n.charAt(0)!="/"&&e.push("/"),e.push(Tc(n,n.charAt(0)=="/"?nue:tue,!0))),(n=this.i.toString())&&e.push("?",n),(n=this.o)&&e.push("#",Tc(n,iue)),e.join("")};function To(e){return new ha(e)}function Vm(e,t,n){e.j=n?kc(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function Bm(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.m=t}else e.m=null}function OP(e,t,n){t instanceof qd?(e.i=t,oue(e.i,e.h)):(n||(t=Tc(t,rue)),e.i=new qd(t,e.h))}function pt(e,t,n){e.i.set(t,n)}function Ny(e){return pt(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function kc(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function Tc(e,t,n){return typeof e=="string"?(e=encodeURI(e).replace(t,eue),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function eue(e){return e=e.charCodeAt(0),"%"+(e>>4&15).toString(16)+(e&15).toString(16)}var NP=/[#\/\?@]/g,tue=/[#\?:]/g,nue=/[#\?]/g,rue=/[#\?@]/g,iue=/#/g;function qd(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function Fs(e){e.g||(e.g=new Map,e.h=0,e.i&&Zle(e.i,function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)}))}J=qd.prototype;J.add=function(e,t){Fs(this),this.i=null,e=Du(this,e);var n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this};function zM(e,t){Fs(e),t=Du(e,t),e.g.has(t)&&(e.i=null,e.h-=e.g.get(t).length,e.g.delete(t))}function VM(e,t){return Fs(e),t=Du(e,t),e.g.has(t)}J.forEach=function(e,t){Fs(this),this.g.forEach(function(n,r){n.forEach(function(i){e.call(t,i,r,this)},this)},this)};J.ta=function(){Fs(this);const e=Array.from(this.g.values()),t=Array.from(this.g.keys()),n=[];for(let r=0;r<t.length;r++){const i=e[r];for(let o=0;o<i.length;o++)n.push(t[r])}return n};J.Z=function(e){Fs(this);let t=[];if(typeof e=="string")VM(this,e)&&(t=t.concat(this.g.get(Du(this,e))));else{e=Array.from(this.g.values());for(let n=0;n<e.length;n++)t=t.concat(e[n])}return t};J.set=function(e,t){return Fs(this),this.i=null,e=Du(this,e),VM(this,e)&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this};J.get=function(e,t){return e?(e=this.Z(e),0<e.length?String(e[0]):t):t};function BM(e,t,n){zM(e,t),0<n.length&&(e.i=null,e.g.set(Du(e,t),t_(n)),e.h+=n.length)}J.toString=function(){if(this.i)return this.i;if(!this.g)return"";const e=[],t=Array.from(this.g.keys());for(var n=0;n<t.length;n++){var r=t[n];const o=encodeURIComponent(String(r)),s=this.Z(r);for(r=0;r<s.length;r++){var i=o;s[r]!==""&&(i+="="+encodeURIComponent(String(s[r]))),e.push(i)}}return this.i=e.join("&")};function Du(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}function oue(e,t){t&&!e.j&&(Fs(e),e.i=null,e.g.forEach(function(n,r){var i=r.toLowerCase();r!=i&&(zM(this,r),BM(this,i,n))},e)),e.j=t}var sue=class{constructor(e,t){this.g=e,this.map=t}};function UM(e){this.l=e||aue,xe.PerformanceNavigationTiming?(e=xe.performance.getEntriesByType("navigation"),e=0<e.length&&(e[0].nextHopProtocol=="hq"||e[0].nextHopProtocol=="h2")):e=!!(xe.g&&xe.g.Ka&&xe.g.Ka()&&xe.g.Ka().ec),this.j=e?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}var aue=10;function WM(e){return e.h?!0:e.g?e.g.size>=e.j:!1}function HM(e){return e.h?1:e.g?e.g.size:0}function lw(e,t){return e.h?e.h==t:e.g?e.g.has(t):!1}function m_(e,t){e.g?e.g.add(t):e.h=t}function qM(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}UM.prototype.cancel=function(){if(this.i=KM(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const e of this.g.values())e.cancel();this.g.clear()}};function KM(e){if(e.h!=null)return e.i.concat(e.h.F);if(e.g!=null&&e.g.size!==0){let t=e.i;for(const n of e.g.values())t=t.concat(n.F);return t}return t_(e.i)}var lue=class{stringify(e){return xe.JSON.stringify(e,void 0)}parse(e){return xe.JSON.parse(e,void 0)}};function uue(){this.g=new lue}function cue(e,t,n){const r=n||"";try{jM(e,function(i,o){let s=i;$f(i)&&(s=l_(i)),t.push(r+o+"="+encodeURIComponent(s))})}catch(i){throw t.push(r+"type="+encodeURIComponent("_badmap")),i}}function due(e,t){const n=new Iy;if(xe.Image){const r=new Image;r.onload=Rh(Oh,n,r,"TestLoadImage: loaded",!0,t),r.onerror=Rh(Oh,n,r,"TestLoadImage: error",!1,t),r.onabort=Rh(Oh,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=Rh(Oh,n,r,"TestLoadImage: timeout",!1,t),xe.setTimeout(function(){r.ontimeout&&r.ontimeout()},1e4),r.src=e}else t(!1)}function Oh(e,t,n,r,i){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,i(r)}catch{}}function jf(e){this.l=e.fc||null,this.j=e.ob||!1}yn(jf,f_);jf.prototype.g=function(){return new Dy(this.l,this.j)};jf.prototype.i=function(e){return function(){return e}}({});function Dy(e,t){mn.call(this),this.F=e,this.u=t,this.m=void 0,this.readyState=g_,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}yn(Dy,mn);var g_=0;J=Dy.prototype;J.open=function(e,t){if(this.readyState!=g_)throw this.abort(),Error("Error reopening a connection");this.C=e,this.B=t,this.readyState=1,Kd(this)};J.send=function(e){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;const t={headers:this.v,method:this.C,credentials:this.m,cache:void 0};e&&(t.body=e),(this.F||xe).fetch(new Request(this.B,t)).then(this.$a.bind(this),this.ka.bind(this))};J.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&this.readyState!=4&&(this.g=!1,Ff(this)),this.readyState=g_};J.$a=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,Kd(this)),this.g&&(this.readyState=3,Kd(this),this.g)))if(this.responseType==="arraybuffer")e.arrayBuffer().then(this.Ya.bind(this),this.ka.bind(this));else if(typeof xe.ReadableStream<"u"&&"body"in e){if(this.j=e.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;GM(this)}else e.text().then(this.Za.bind(this),this.ka.bind(this))};function GM(e){e.j.read().then(e.Xa.bind(e)).catch(e.ka.bind(e))}J.Xa=function(e){if(this.g){if(this.u&&e.value)this.response.push(e.value);else if(!this.u){var t=e.value?e.value:new Uint8Array(0);(t=this.A.decode(t,{stream:!e.done}))&&(this.response=this.responseText+=t)}e.done?Ff(this):Kd(this),this.readyState==3&&GM(this)}};J.Za=function(e){this.g&&(this.response=this.responseText=e,Ff(this))};J.Ya=function(e){this.g&&(this.response=e,Ff(this))};J.ka=function(){this.g&&Ff(this)};function Ff(e){e.readyState=4,e.l=null,e.j=null,e.A=null,Kd(e)}J.setRequestHeader=function(e,t){this.v.append(e,t)};J.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""};J.getAllResponseHeaders=function(){if(!this.h)return"";const 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
`)};function Kd(e){e.onreadystatechange&&e.onreadystatechange.call(e)}Object.defineProperty(Dy.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(e){this.m=e?"include":"same-origin"}});var fue=xe.JSON.parse;function Vt(e){mn.call(this),this.headers=new Map,this.u=e||null,this.h=!1,this.C=this.g=null,this.I="",this.m=0,this.j="",this.l=this.G=this.v=this.F=!1,this.B=0,this.A=null,this.K=QM,this.L=this.M=!1}yn(Vt,mn);var QM="",hue=/^https?$/i,pue=["POST","PUT"];J=Vt.prototype;J.Oa=function(e){this.M=e};J.ha=function(e,t,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.I+"; newUri="+e);t=t?t.toUpperCase():"GET",this.I=e,this.j="",this.m=0,this.F=!1,this.h=!0,this.g=this.u?this.u.g():iw.g(),this.C=this.u?$P(this.u):$P(iw),this.g.onreadystatechange=Fn(this.La,this);try{this.G=!0,this.g.open(t,String(e),!0),this.G=!1}catch(o){DP(this,o);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(const o of r.keys())n.set(o,r.get(o));else throw Error("Unknown input type for opt_headers: "+String(r));r=Array.from(n.keys()).find(o=>o.toLowerCase()=="content-type"),i=xe.FormData&&e instanceof xe.FormData,!(0<=fM(pue,t))||r||i||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[o,s]of n)this.g.setRequestHeader(o,s);this.K&&(this.g.responseType=this.K),"withCredentials"in this.g&&this.g.withCredentials!==this.M&&(this.g.withCredentials=this.M);try{JM(this),0<this.B&&((this.L=mue(this.g))?(this.g.timeout=this.B,this.g.ontimeout=Fn(this.ua,this)):this.A=d_(this.ua,this.B,this)),this.v=!0,this.g.send(e),this.v=!1}catch(o){DP(this,o)}};function mue(e){return fu&&typeof e.timeout=="number"&&e.ontimeout!==void 0}J.ua=function(){typeof e_<"u"&&this.g&&(this.j="Timed out after "+this.B+"ms, aborting",this.m=8,kn(this,"timeout"),this.abort(8))};function DP(e,t){e.h=!1,e.g&&(e.l=!0,e.g.abort(),e.l=!1),e.j=t,e.m=5,YM(e),My(e)}function YM(e){e.F||(e.F=!0,kn(e,"complete"),kn(e,"error"))}J.abort=function(e){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=e||7,kn(this,"complete"),kn(this,"abort"),My(this))};J.N=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),My(this,!0)),Vt.$.N.call(this)};J.La=function(){this.s||(this.G||this.v||this.l?XM(this):this.kb())};J.kb=function(){XM(this)};function XM(e){if(e.h&&typeof e_<"u"&&(!e.C[1]||Oi(e)!=4||e.da()!=2)){if(e.v&&Oi(e)==4)d_(e.La,0,e);else if(kn(e,"readystatechange"),Oi(e)==4){e.h=!1;try{const s=e.da();e:switch(s){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var t=!0;break e;default:t=!1}var n;if(!(n=t)){var r;if(r=s===0){var i=String(e.I).match(FM)[1]||null;!i&&xe.self&&xe.self.location&&(i=xe.self.location.protocol.slice(0,-1)),r=!hue.test(i?i.toLowerCase():"")}n=r}if(n)kn(e,"complete"),kn(e,"success");else{e.m=6;try{var o=2<Oi(e)?e.g.statusText:""}catch{o=""}e.j=o+" ["+e.da()+"]",YM(e)}}finally{My(e)}}}}function My(e,t){if(e.g){JM(e);const n=e.g,r=e.C[0]?()=>{}:null;e.g=null,e.C=null,t||kn(e,"ready");try{n.onreadystatechange=r}catch{}}}function JM(e){e.g&&e.L&&(e.g.ontimeout=null),e.A&&(xe.clearTimeout(e.A),e.A=null)}J.isActive=function(){return!!this.g};function Oi(e){return e.g?e.g.readyState:0}J.da=function(){try{return 2<Oi(this)?this.g.status:-1}catch{return-1}};J.ja=function(){try{return this.g?this.g.responseText:""}catch{return""}};J.Wa=function(e){if(this.g){var t=this.g.responseText;return e&&t.indexOf(e)==0&&(t=t.substring(e.length)),fue(t)}};function MP(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.K){case QM:case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch{return null}}function gue(e){const t={};e=(e.g&&2<=Oi(e)&&e.g.getAllResponseHeaders()||"").split(`\r
`);for(let r=0;r<e.length;r++){if(zd(e[r]))continue;var n=Vle(e[r]);const i=n[0];if(n=n[1],typeof n!="string")continue;n=n.trim();const o=t[i]||[];t[i]=o,o.push(n)}Nle(t,function(r){return r.join(", ")})}J.Ia=function(){return this.m};J.Sa=function(){return typeof this.j=="string"?this.j:String(this.j)};function ZM(e){let t="";return r_(e,function(n,r){t+=r,t+=":",t+=n,t+=`\r
`}),t}function y_(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=ZM(n),typeof e=="string"?n!=null&&encodeURIComponent(String(n)):pt(e,t,n))}function ac(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function eL(e){this.Ga=0,this.j=[],this.l=new Iy,this.pa=this.wa=this.I=this.Y=this.g=this.Da=this.F=this.na=this.o=this.U=this.s=null,this.fb=this.W=0,this.cb=ac("failFast",!1,e),this.G=this.v=this.u=this.m=this.h=null,this.aa=!0,this.Fa=this.V=-1,this.ba=this.A=this.C=0,this.ab=ac("baseRetryDelayMs",5e3,e),this.hb=ac("retryDelaySeedMs",1e4,e),this.eb=ac("forwardChannelMaxRetries",2,e),this.xa=ac("forwardChannelRequestTimeoutMs",2e4,e),this.va=e&&e.xmlHttpFactory||void 0,this.Ha=e&&e.dc||!1,this.L=void 0,this.J=e&&e.supportsCrossDomainXhr||!1,this.K="",this.i=new UM(e&&e.concurrentRequestLimit),this.Ja=new uue,this.P=e&&e.fastHandshake||!1,this.O=e&&e.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.bb=e&&e.bc||!1,e&&e.Ea&&this.l.Ea(),e&&e.forceLongPolling&&(this.aa=!1),this.ca=!this.P&&this.aa&&e&&e.detectBufferingProxy||!1,this.qa=void 0,e&&e.longPollingTimeout&&0<e.longPollingTimeout&&(this.qa=e.longPollingTimeout),this.oa=void 0,this.S=0,this.M=!1,this.ma=this.B=null}J=eL.prototype;J.ra=8;J.H=1;function v_(e){if(tL(e),e.H==3){var t=e.W++,n=To(e.I);if(pt(n,"SID",e.K),pt(n,"RID",t),pt(n,"TYPE","terminate"),zf(e,n),t=new Mf(e,e.l,t),t.L=2,t.v=Ny(To(n)),n=!1,xe.navigator&&xe.navigator.sendBeacon)try{n=xe.navigator.sendBeacon(t.v.toString(),"")}catch{}!n&&xe.Image&&(new Image().src=t.v,n=!0),n||(t.g=uL(t.l,null),t.g.ha(t.v)),t.G=Date.now(),Lf(t)}aL(e)}function Ly(e){e.g&&(w_(e),e.g.cancel(),e.g=null)}function tL(e){Ly(e),e.u&&(xe.clearTimeout(e.u),e.u=null),Um(e),e.i.cancel(),e.m&&(typeof e.m=="number"&&xe.clearTimeout(e.m),e.m=null)}function jy(e){if(!WM(e.i)&&!e.m){e.m=!0;var t=e.Na;Bd||CM(),Ud||(Bd(),Ud=!0),u_.add(t,e),e.C=0}}function yue(e,t){return HM(e.i)>=e.i.j-(e.m?1:0)?!1:e.m?(e.j=t.F.concat(e.j),!0):e.H==1||e.H==2||e.C>=(e.cb?0:e.eb)?!1:(e.m=Nf(Fn(e.Na,e,t),sL(e,e.C)),e.C++,!0)}J.Na=function(e){if(this.m)if(this.m=null,this.H==1){if(!e){this.W=Math.floor(1e5*Math.random()),e=this.W++;const i=new Mf(this,this.l,e);let o=this.s;if(this.U&&(o?(o=gM(o),yM(o,this.U)):o=this.U),this.o!==null||this.O||(i.I=o,o=null),this.P)e:{for(var t=0,n=0;n<this.j.length;n++){t:{var r=this.j[n];if("__data__"in r.map&&(r=r.map.__data__,typeof r=="string")){r=r.length;break t}r=void 0}if(r===void 0)break;if(t+=r,4096<t){t=n;break e}if(t===4096||n===this.j.length-1){t=n+1;break e}}t=1e3}else t=1e3;t=nL(this,i,t),n=To(this.I),pt(n,"RID",e),pt(n,"CVER",22),this.F&&pt(n,"X-HTTP-Session-Id",this.F),zf(this,n),o&&(this.O?t="headers="+encodeURIComponent(String(ZM(o)))+"&"+t:this.o&&y_(n,this.o,o)),m_(this.i,i),this.bb&&pt(n,"TYPE","init"),this.P?(pt(n,"$req",t),pt(n,"SID","null"),i.aa=!0,sw(i,n,null)):sw(i,n,t),this.H=2}}else this.H==3&&(e?LP(this,e):this.j.length==0||WM(this.i)||LP(this))};function LP(e,t){var n;t?n=t.m:n=e.W++;const r=To(e.I);pt(r,"SID",e.K),pt(r,"RID",n),pt(r,"AID",e.V),zf(e,r),e.o&&e.s&&y_(r,e.o,e.s),n=new Mf(e,e.l,n,e.C+1),e.o===null&&(n.I=e.s),t&&(e.j=t.F.concat(e.j)),t=nL(e,n,1e3),n.setTimeout(Math.round(.5*e.xa)+Math.round(.5*e.xa*Math.random())),m_(e.i,n),sw(n,r,t)}function zf(e,t){e.na&&r_(e.na,function(n,r){pt(t,r,n)}),e.h&&jM({},function(n,r){pt(t,r,n)})}function nL(e,t,n){n=Math.min(e.j.length,n);var r=e.h?Fn(e.h.Va,e.h,e):null;e:{var i=e.j;let o=-1;for(;;){const s=["count="+n];o==-1?0<n?(o=i[0].g,s.push("ofs="+o)):o=0:s.push("ofs="+o);let a=!0;for(let l=0;l<n;l++){let u=i[l].g;const c=i[l].map;if(u-=o,0>u)o=Math.max(0,i[l].g-100),a=!1;else try{cue(c,s,"req"+u+"_")}catch{r&&r(c)}}if(a){r=s.join("&");break e}}}return e=e.j.splice(0,n),t.F=e,r}function rL(e){if(!e.g&&!e.u){e.ba=1;var t=e.Ma;Bd||CM(),Ud||(Bd(),Ud=!0),u_.add(t,e),e.A=0}}function b_(e){return e.g||e.u||3<=e.A?!1:(e.ba++,e.u=Nf(Fn(e.Ma,e),sL(e,e.A)),e.A++,!0)}J.Ma=function(){if(this.u=null,iL(this),this.ca&&!(this.M||this.g==null||0>=this.S)){var e=2*this.S;this.l.info("BP detection timer enabled: "+e),this.B=Nf(Fn(this.jb,this),e)}};J.jb=function(){this.B&&(this.B=null,this.l.info("BP detection timeout reached."),this.l.info("Buffering proxy detected and switch to long-polling!"),this.G=!1,this.M=!0,er(10),Ly(this),iL(this))};function w_(e){e.B!=null&&(xe.clearTimeout(e.B),e.B=null)}function iL(e){e.g=new Mf(e,e.l,"rpc",e.ba),e.o===null&&(e.g.I=e.s),e.g.O=0;var t=To(e.wa);pt(t,"RID","rpc"),pt(t,"SID",e.K),pt(t,"AID",e.V),pt(t,"CI",e.G?"0":"1"),!e.G&&e.qa&&pt(t,"TO",e.qa),pt(t,"TYPE","xmlhttp"),zf(e,t),e.o&&e.s&&y_(t,e.o,e.s),e.L&&e.g.setTimeout(e.L);var n=e.g;e=e.pa,n.L=1,n.v=Ny(To(t)),n.s=null,n.S=!0,NM(n,e)}J.ib=function(){this.v!=null&&(this.v=null,Ly(this),b_(this),er(19))};function Um(e){e.v!=null&&(xe.clearTimeout(e.v),e.v=null)}function oL(e,t){var n=null;if(e.g==t){Um(e),w_(e),e.g=null;var r=2}else if(lw(e.i,t))n=t.F,qM(e.i,t),r=1;else return;if(e.H!=0){if(t.i)if(r==1){n=t.s?t.s.length:0,t=Date.now()-t.G;var i=e.C;r=Ay(),kn(r,new AM(r,n)),jy(e)}else rL(e);else if(i=t.o,i==3||i==0&&0<t.ca||!(r==1&&yue(e,t)||r==2&&b_(e)))switch(n&&0<n.length&&(t=e.i,t.i=t.i.concat(n)),i){case 1:oa(e,5);break;case 4:oa(e,10);break;case 3:oa(e,6);break;default:oa(e,2)}}}function sL(e,t){let n=e.ab+Math.floor(Math.random()*e.hb);return e.isActive()||(n*=2),n*t}function oa(e,t){if(e.l.info("Error code "+t),t==2){var n=null;e.h&&(n=null);var r=Fn(e.pb,e);n||(n=new ha("//www.google.com/images/cleardot.gif"),xe.location&&xe.location.protocol=="http"||Vm(n,"https"),Ny(n)),due(n.toString(),r)}else er(2);e.H=0,e.h&&e.h.za(t),aL(e),tL(e)}J.pb=function(e){e?(this.l.info("Successfully pinged google.com"),er(2)):(this.l.info("Failed to ping google.com"),er(1))};function aL(e){if(e.H=0,e.ma=[],e.h){const t=KM(e.i);(t.length!=0||e.j.length!=0)&&(TP(e.ma,t),TP(e.ma,e.j),e.i.i.length=0,t_(e.j),e.j.length=0),e.h.ya()}}function lL(e,t,n){var r=n instanceof ha?To(n):new ha(n);if(r.g!="")t&&(r.g=t+"."+r.g),Bm(r,r.m);else{var i=xe.location;r=i.protocol,t=t?t+"."+i.hostname:i.hostname,i=+i.port;var o=new ha(null);r&&Vm(o,r),t&&(o.g=t),i&&Bm(o,i),n&&(o.l=n),r=o}return n=e.F,t=e.Da,n&&t&&pt(r,n,t),pt(r,"VER",e.ra),zf(e,r),r}function uL(e,t,n){if(t&&!e.J)throw Error("Can't create secondary domain capable XhrIo object.");return t=n&&e.Ha&&!e.va?new Vt(new jf({ob:!0})):new Vt(e.va),t.Oa(e.J),t}J.isActive=function(){return!!this.h&&this.h.isActive(this)};function cL(){}J=cL.prototype;J.Ba=function(){};J.Aa=function(){};J.za=function(){};J.ya=function(){};J.isActive=function(){return!0};J.Va=function(){};function Wm(){if(fu&&!(10<=Number(Ale)))throw Error("Environmental error: no available transport.")}Wm.prototype.g=function(e,t){return new Ir(e,t)};function Ir(e,t){mn.call(this),this.g=new eL(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.s=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.Ca&&(e?e["X-WebChannel-Client-Profile"]=t.Ca:e={"X-WebChannel-Client-Profile":t.Ca}),this.g.U=e,(e=t&&t.cc)&&!zd(e)&&(this.g.o=e),this.A=t&&t.supportsCrossDomainXhr||!1,this.v=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!zd(t)&&(this.g.F=t,e=this.h,e!==null&&t in e&&(e=this.h,t in e&&delete e[t])),this.j=new Mu(this)}yn(Ir,mn);Ir.prototype.m=function(){this.g.h=this.j,this.A&&(this.g.J=!0);var e=this.g,t=this.l,n=this.h||void 0;er(0),e.Y=t,e.na=n||{},e.G=e.aa,e.I=lL(e,null,e.Y),jy(e)};Ir.prototype.close=function(){v_(this.g)};Ir.prototype.u=function(e){var t=this.g;if(typeof e=="string"){var n={};n.__data__=e,e=n}else this.v&&(n={},n.__data__=l_(e),e=n);t.j.push(new sue(t.fb++,e)),t.H==3&&jy(t)};Ir.prototype.N=function(){this.g.h=null,delete this.j,v_(this.g),delete this.g,Ir.$.N.call(this)};function dL(e){h_.call(this),e.__headers__&&(this.headers=e.__headers__,this.statusCode=e.__status__,delete e.__headers__,delete e.__status__);var t=e.__sm__;if(t){e:{for(const n in t){e=n;break e}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}yn(dL,h_);function fL(){p_.call(this),this.status=1}yn(fL,p_);function Mu(e){this.g=e}yn(Mu,cL);Mu.prototype.Ba=function(){kn(this.g,"a")};Mu.prototype.Aa=function(e){kn(this.g,new dL(e))};Mu.prototype.za=function(e){kn(this.g,new fL)};Mu.prototype.ya=function(){kn(this.g,"b")};function vue(){this.blockSize=-1}function gi(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.m=Array(this.blockSize),this.i=this.h=0,this.reset()}yn(gi,vue);gi.prototype.reset=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.i=this.h=0};function Jv(e,t,n){n||(n=0);var r=Array(16);if(typeof t=="string")for(var i=0;16>i;++i)r[i]=t.charCodeAt(n++)|t.charCodeAt(n++)<<8|t.charCodeAt(n++)<<16|t.charCodeAt(n++)<<24;else for(i=0;16>i;++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];var o=e.g[3],s=t+(o^n&(i^o))+r[0]+3614090360&4294967295;t=n+(s<<7&4294967295|s>>>25),s=o+(i^t&(n^i))+r[1]+3905402710&4294967295,o=t+(s<<12&4294967295|s>>>20),s=i+(n^o&(t^n))+r[2]+606105819&4294967295,i=o+(s<<17&4294967295|s>>>15),s=n+(t^i&(o^t))+r[3]+3250441966&4294967295,n=i+(s<<22&4294967295|s>>>10),s=t+(o^n&(i^o))+r[4]+4118548399&4294967295,t=n+(s<<7&4294967295|s>>>25),s=o+(i^t&(n^i))+r[5]+1200080426&4294967295,o=t+(s<<12&4294967295|s>>>20),s=i+(n^o&(t^n))+r[6]+2821735955&4294967295,i=o+(s<<17&4294967295|s>>>15),s=n+(t^i&(o^t))+r[7]+4249261313&4294967295,n=i+(s<<22&4294967295|s>>>10),s=t+(o^n&(i^o))+r[8]+1770035416&4294967295,t=n+(s<<7&4294967295|s>>>25),s=o+(i^t&(n^i))+r[9]+2336552879&4294967295,o=t+(s<<12&4294967295|s>>>20),s=i+(n^o&(t^n))+r[10]+4294925233&4294967295,i=o+(s<<17&4294967295|s>>>15),s=n+(t^i&(o^t))+r[11]+2304563134&4294967295,n=i+(s<<22&4294967295|s>>>10),s=t+(o^n&(i^o))+r[12]+1804603682&4294967295,t=n+(s<<7&4294967295|s>>>25),s=o+(i^t&(n^i))+r[13]+4254626195&4294967295,o=t+(s<<12&4294967295|s>>>20),s=i+(n^o&(t^n))+r[14]+2792965006&4294967295,i=o+(s<<17&4294967295|s>>>15),s=n+(t^i&(o^t))+r[15]+1236535329&4294967295,n=i+(s<<22&4294967295|s>>>10),s=t+(i^o&(n^i))+r[1]+4129170786&4294967295,t=n+(s<<5&4294967295|s>>>27),s=o+(n^i&(t^n))+r[6]+3225465664&4294967295,o=t+(s<<9&4294967295|s>>>23),s=i+(t^n&(o^t))+r[11]+643717713&4294967295,i=o+(s<<14&4294967295|s>>>18),s=n+(o^t&(i^o))+r[0]+3921069994&4294967295,n=i+(s<<20&4294967295|s>>>12),s=t+(i^o&(n^i))+r[5]+3593408605&4294967295,t=n+(s<<5&4294967295|s>>>27),s=o+(n^i&(t^n))+r[10]+38016083&4294967295,o=t+(s<<9&4294967295|s>>>23),s=i+(t^n&(o^t))+r[15]+3634488961&4294967295,i=o+(s<<14&4294967295|s>>>18),s=n+(o^t&(i^o))+r[4]+3889429448&4294967295,n=i+(s<<20&4294967295|s>>>12),s=t+(i^o&(n^i))+r[9]+568446438&4294967295,t=n+(s<<5&4294967295|s>>>27),s=o+(n^i&(t^n))+r[14]+3275163606&4294967295,o=t+(s<<9&4294967295|s>>>23),s=i+(t^n&(o^t))+r[3]+4107603335&4294967295,i=o+(s<<14&4294967295|s>>>18),s=n+(o^t&(i^o))+r[8]+1163531501&4294967295,n=i+(s<<20&4294967295|s>>>12),s=t+(i^o&(n^i))+r[13]+2850285829&4294967295,t=n+(s<<5&4294967295|s>>>27),s=o+(n^i&(t^n))+r[2]+4243563512&4294967295,o=t+(s<<9&4294967295|s>>>23),s=i+(t^n&(o^t))+r[7]+1735328473&4294967295,i=o+(s<<14&4294967295|s>>>18),s=n+(o^t&(i^o))+r[12]+2368359562&4294967295,n=i+(s<<20&4294967295|s>>>12),s=t+(n^i^o)+r[5]+4294588738&4294967295,t=n+(s<<4&4294967295|s>>>28),s=o+(t^n^i)+r[8]+2272392833&4294967295,o=t+(s<<11&4294967295|s>>>21),s=i+(o^t^n)+r[11]+1839030562&4294967295,i=o+(s<<16&4294967295|s>>>16),s=n+(i^o^t)+r[14]+4259657740&4294967295,n=i+(s<<23&4294967295|s>>>9),s=t+(n^i^o)+r[1]+2763975236&4294967295,t=n+(s<<4&4294967295|s>>>28),s=o+(t^n^i)+r[4]+1272893353&4294967295,o=t+(s<<11&4294967295|s>>>21),s=i+(o^t^n)+r[7]+4139469664&4294967295,i=o+(s<<16&4294967295|s>>>16),s=n+(i^o^t)+r[10]+3200236656&4294967295,n=i+(s<<23&4294967295|s>>>9),s=t+(n^i^o)+r[13]+681279174&4294967295,t=n+(s<<4&4294967295|s>>>28),s=o+(t^n^i)+r[0]+3936430074&4294967295,o=t+(s<<11&4294967295|s>>>21),s=i+(o^t^n)+r[3]+3572445317&4294967295,i=o+(s<<16&4294967295|s>>>16),s=n+(i^o^t)+r[6]+76029189&4294967295,n=i+(s<<23&4294967295|s>>>9),s=t+(n^i^o)+r[9]+3654602809&4294967295,t=n+(s<<4&4294967295|s>>>28),s=o+(t^n^i)+r[12]+3873151461&4294967295,o=t+(s<<11&4294967295|s>>>21),s=i+(o^t^n)+r[15]+530742520&4294967295,i=o+(s<<16&4294967295|s>>>16),s=n+(i^o^t)+r[2]+3299628645&4294967295,n=i+(s<<23&4294967295|s>>>9),s=t+(i^(n|~o))+r[0]+4096336452&4294967295,t=n+(s<<6&4294967295|s>>>26),s=o+(n^(t|~i))+r[7]+1126891415&4294967295,o=t+(s<<10&4294967295|s>>>22),s=i+(t^(o|~n))+r[14]+2878612391&4294967295,i=o+(s<<15&4294967295|s>>>17),s=n+(o^(i|~t))+r[5]+4237533241&4294967295,n=i+(s<<21&4294967295|s>>>11),s=t+(i^(n|~o))+r[12]+1700485571&4294967295,t=n+(s<<6&4294967295|s>>>26),s=o+(n^(t|~i))+r[3]+2399980690&4294967295,o=t+(s<<10&4294967295|s>>>22),s=i+(t^(o|~n))+r[10]+4293915773&4294967295,i=o+(s<<15&4294967295|s>>>17),s=n+(o^(i|~t))+r[1]+2240044497&4294967295,n=i+(s<<21&4294967295|s>>>11),s=t+(i^(n|~o))+r[8]+1873313359&4294967295,t=n+(s<<6&4294967295|s>>>26),s=o+(n^(t|~i))+r[15]+4264355552&4294967295,o=t+(s<<10&4294967295|s>>>22),s=i+(t^(o|~n))+r[6]+2734768916&4294967295,i=o+(s<<15&4294967295|s>>>17),s=n+(o^(i|~t))+r[13]+1309151649&4294967295,n=i+(s<<21&4294967295|s>>>11),s=t+(i^(n|~o))+r[4]+4149444226&4294967295,t=n+(s<<6&4294967295|s>>>26),s=o+(n^(t|~i))+r[11]+3174756917&4294967295,o=t+(s<<10&4294967295|s>>>22),s=i+(t^(o|~n))+r[2]+718787259&4294967295,i=o+(s<<15&4294967295|s>>>17),s=n+(o^(i|~t))+r[9]+3951481745&4294967295,e.g[0]=e.g[0]+t&4294967295,e.g[1]=e.g[1]+(i+(s<<21&4294967295|s>>>11))&4294967295,e.g[2]=e.g[2]+i&4294967295,e.g[3]=e.g[3]+o&4294967295}gi.prototype.j=function(e,t){t===void 0&&(t=e.length);for(var n=t-this.blockSize,r=this.m,i=this.h,o=0;o<t;){if(i==0)for(;o<=n;)Jv(this,e,o),o+=this.blockSize;if(typeof e=="string"){for(;o<t;)if(r[i++]=e.charCodeAt(o++),i==this.blockSize){Jv(this,r),i=0;break}}else for(;o<t;)if(r[i++]=e[o++],i==this.blockSize){Jv(this,r),i=0;break}}this.h=i,this.i+=t};gi.prototype.l=function(){var e=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);e[0]=128;for(var t=1;t<e.length-8;++t)e[t]=0;var n=8*this.i;for(t=e.length-8;t<e.length;++t)e[t]=n&255,n/=256;for(this.j(e),e=Array(16),t=n=0;4>t;++t)for(var r=0;32>r;r+=8)e[n++]=this.g[t]>>>r&255;return e};function tt(e,t){this.h=t;for(var n=[],r=!0,i=e.length-1;0<=i;i--){var o=e[i]|0;r&&o==t||(n[i]=o,r=!1)}this.g=n}var bue={};function S_(e){return-128<=e&&128>e?Tle(e,function(t){return new tt([t|0],0>t?-1:0)}):new tt([e|0],0>e?-1:0)}function Ni(e){if(isNaN(e)||!isFinite(e))return zl;if(0>e)return _n(Ni(-e));for(var t=[],n=1,r=0;e>=n;r++)t[r]=e/n|0,n*=uw;return new tt(t,0)}function hL(e,t){if(e.length==0)throw Error("number format error: empty string");if(t=t||10,2>t||36<t)throw Error("radix out of range: "+t);if(e.charAt(0)=="-")return _n(hL(e.substring(1),t));if(0<=e.indexOf("-"))throw Error('number format error: interior "-" character');for(var n=Ni(Math.pow(t,8)),r=zl,i=0;i<e.length;i+=8){var o=Math.min(8,e.length-i),s=parseInt(e.substring(i,i+o),t);8>o?(o=Ni(Math.pow(t,o)),r=r.R(o).add(Ni(s))):(r=r.R(n),r=r.add(Ni(s)))}return r}var uw=4294967296,zl=S_(0),cw=S_(1),jP=S_(16777216);J=tt.prototype;J.ea=function(){if(Wr(this))return-_n(this).ea();for(var e=0,t=1,n=0;n<this.g.length;n++){var r=this.D(n);e+=(0<=r?r:uw+r)*t,t*=uw}return e};J.toString=function(e){if(e=e||10,2>e||36<e)throw Error("radix out of range: "+e);if(co(this))return"0";if(Wr(this))return"-"+_n(this).toString(e);for(var t=Ni(Math.pow(e,6)),n=this,r="";;){var i=qm(n,t).g;n=Hm(n,i.R(t));var o=((0<n.g.length?n.g[0]:n.h)>>>0).toString(e);if(n=i,co(n))return o+r;for(;6>o.length;)o="0"+o;r=o+r}};J.D=function(e){return 0>e?0:e<this.g.length?this.g[e]:this.h};function co(e){if(e.h!=0)return!1;for(var t=0;t<e.g.length;t++)if(e.g[t]!=0)return!1;return!0}function Wr(e){return e.h==-1}J.X=function(e){return e=Hm(this,e),Wr(e)?-1:co(e)?0:1};function _n(e){for(var t=e.g.length,n=[],r=0;r<t;r++)n[r]=~e.g[r];return new tt(n,~e.h).add(cw)}J.abs=function(){return Wr(this)?_n(this):this};J.add=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0,i=0;i<=t;i++){var o=r+(this.D(i)&65535)+(e.D(i)&65535),s=(o>>>16)+(this.D(i)>>>16)+(e.D(i)>>>16);r=s>>>16,o&=65535,s&=65535,n[i]=s<<16|o}return new tt(n,n[n.length-1]&-2147483648?-1:0)};function Hm(e,t){return e.add(_n(t))}J.R=function(e){if(co(this)||co(e))return zl;if(Wr(this))return Wr(e)?_n(this).R(_n(e)):_n(_n(this).R(e));if(Wr(e))return _n(this.R(_n(e)));if(0>this.X(jP)&&0>e.X(jP))return Ni(this.ea()*e.ea());for(var t=this.g.length+e.g.length,n=[],r=0;r<2*t;r++)n[r]=0;for(r=0;r<this.g.length;r++)for(var i=0;i<e.g.length;i++){var o=this.D(r)>>>16,s=this.D(r)&65535,a=e.D(i)>>>16,l=e.D(i)&65535;n[2*r+2*i]+=s*l,Nh(n,2*r+2*i),n[2*r+2*i+1]+=o*l,Nh(n,2*r+2*i+1),n[2*r+2*i+1]+=s*a,Nh(n,2*r+2*i+1),n[2*r+2*i+2]+=o*a,Nh(n,2*r+2*i+2)}for(r=0;r<t;r++)n[r]=n[2*r+1]<<16|n[2*r];for(r=t;r<2*t;r++)n[r]=0;return new tt(n,0)};function Nh(e,t){for(;(e[t]&65535)!=e[t];)e[t+1]+=e[t]>>>16,e[t]&=65535,t++}function lc(e,t){this.g=e,this.h=t}function qm(e,t){if(co(t))throw Error("division by zero");if(co(e))return new lc(zl,zl);if(Wr(e))return t=qm(_n(e),t),new lc(_n(t.g),_n(t.h));if(Wr(t))return t=qm(e,_n(t)),new lc(_n(t.g),t.h);if(30<e.g.length){if(Wr(e)||Wr(t))throw Error("slowDivide_ only works with positive integers.");for(var n=cw,r=t;0>=r.X(e);)n=FP(n),r=FP(r);var i=Ya(n,1),o=Ya(r,1);for(r=Ya(r,2),n=Ya(n,2);!co(r);){var s=o.add(r);0>=s.X(e)&&(i=i.add(n),o=s),r=Ya(r,1),n=Ya(n,1)}return t=Hm(e,i.R(t)),new lc(i,t)}for(i=zl;0<=e.X(t);){for(n=Math.max(1,Math.floor(e.ea()/t.ea())),r=Math.ceil(Math.log(n)/Math.LN2),r=48>=r?1:Math.pow(2,r-48),o=Ni(n),s=o.R(t);Wr(s)||0<s.X(e);)n-=r,o=Ni(n),s=o.R(t);co(o)&&(o=cw),i=i.add(o),e=Hm(e,s)}return new lc(i,e)}J.gb=function(e){return qm(this,e).h};J.and=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0;r<t;r++)n[r]=this.D(r)&e.D(r);return new tt(n,this.h&e.h)};J.or=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0;r<t;r++)n[r]=this.D(r)|e.D(r);return new tt(n,this.h|e.h)};J.xor=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0;r<t;r++)n[r]=this.D(r)^e.D(r);return new tt(n,this.h^e.h)};function FP(e){for(var t=e.g.length+1,n=[],r=0;r<t;r++)n[r]=e.D(r)<<1|e.D(r-1)>>>31;return new tt(n,e.h)}function Ya(e,t){var n=t>>5;t%=32;for(var r=e.g.length-n,i=[],o=0;o<r;o++)i[o]=0<t?e.D(o+n)>>>t|e.D(o+n+1)<<32-t:e.D(o+n);return new tt(i,e.h)}Wm.prototype.createWebChannel=Wm.prototype.g;Ir.prototype.send=Ir.prototype.u;Ir.prototype.open=Ir.prototype.m;Ir.prototype.close=Ir.prototype.close;Ry.NO_ERROR=0;Ry.TIMEOUT=8;Ry.HTTP_ERROR=6;RM.COMPLETE="complete";$M.EventType=Df;Df.OPEN="a";Df.CLOSE="b";Df.ERROR="c";Df.MESSAGE="d";mn.prototype.listen=mn.prototype.O;Vt.prototype.listenOnce=Vt.prototype.P;Vt.prototype.getLastError=Vt.prototype.Sa;Vt.prototype.getLastErrorCode=Vt.prototype.Ia;Vt.prototype.getStatus=Vt.prototype.da;Vt.prototype.getResponseJson=Vt.prototype.Wa;Vt.prototype.getResponseText=Vt.prototype.ja;Vt.prototype.send=Vt.prototype.ha;Vt.prototype.setWithCredentials=Vt.prototype.Oa;gi.prototype.digest=gi.prototype.l;gi.prototype.reset=gi.prototype.reset;gi.prototype.update=gi.prototype.j;tt.prototype.add=tt.prototype.add;tt.prototype.multiply=tt.prototype.R;tt.prototype.modulo=tt.prototype.gb;tt.prototype.compare=tt.prototype.X;tt.prototype.toNumber=tt.prototype.ea;tt.prototype.toString=tt.prototype.toString;tt.prototype.getBits=tt.prototype.D;tt.fromNumber=Ni;tt.fromString=hL;var wue=function(){return new Wm},Sue=function(){return Ay()},Zv=Ry,xue=RM,_ue=Da,zP={xb:0,Ab:1,Bb:2,Ub:3,Zb:4,Wb:5,Xb:6,Vb:7,Tb:8,Yb:9,PROXY:10,NOPROXY:11,Rb:12,Nb:13,Ob:14,Mb:15,Pb:16,Qb:17,tb:18,sb:19,ub:20},Cue=jf,Dh=$M,Eue=Vt,kue=gi,Vl=tt;const VP="@firebase/firestore";/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class On{constructor(t){this.uid=t}isAuthenticated(){return this.uid!=null}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(t){return t.uid===this.uid}}On.UNAUTHENTICATED=new On(null),On.GOOGLE_CREDENTIALS=new On("google-credentials-uid"),On.FIRST_PARTY=new On("first-party-uid"),On.MOCK_USER=new On("mock-user");/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let Lu="9.22.1";/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const Ea=new Bx("@firebase/firestore");function BP(){return Ea.logLevel}function fe(e,...t){if(Ea.logLevel<=Be.DEBUG){const n=t.map(x_);Ea.debug(`Firestore (${Lu}): ${e}`,...n)}}function Po(e,...t){if(Ea.logLevel<=Be.ERROR){const n=t.map(x_);Ea.error(`Firestore (${Lu}): ${e}`,...n)}}function hu(e,...t){if(Ea.logLevel<=Be.WARN){const n=t.map(x_);Ea.warn(`Firestore (${Lu}): ${e}`,...n)}}function x_(e){if(typeof e=="string")return e;try{return t=e,JSON.stringify(t)}catch{return e}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*   http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var t}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function we(e="Unexpected state"){const t=`FIRESTORE (${Lu}) INTERNAL ASSERTION FAILED: `+e;throw Po(t),new Error(t)}function gt(e,t){e||we()}function Ee(e,t){return e}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const B={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"};class pe extends No{constructor(t,n){super(t,n),this.code=t,this.message=n,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class pa{constructor(){this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n})}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class pL{constructor(t,n){this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${t}`)}}class Tue{getToken(){return Promise.resolve(null)}invalidateToken(){}start(t,n){t.enqueueRetryable(()=>n(On.UNAUTHENTICATED))}shutdown(){}}class Pue{constructor(t){this.token=t,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(t,n){this.changeListener=n,t.enqueueRetryable(()=>n(this.token.user))}shutdown(){this.changeListener=null}}class Iue{constructor(t){this.t=t,this.currentUser=On.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(t,n){let r=this.i;const i=l=>this.i!==r?(r=this.i,n(l)):Promise.resolve();let o=new pa;this.o=()=>{this.i++,this.currentUser=this.u(),o.resolve(),o=new pa,t.enqueueRetryable(()=>i(this.currentUser))};const s=()=>{const l=o;t.enqueueRetryable(async()=>{await l.promise,await i(this.currentUser)})},a=l=>{fe("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=l,this.auth.addAuthTokenListener(this.o),s()};this.t.onInit(l=>a(l)),setTimeout(()=>{if(!this.auth){const l=this.t.getImmediate({optional:!0});l?a(l):(fe("FirebaseAuthCredentialsProvider","Auth not yet detected"),o.resolve(),o=new pa)}},0),s()}getToken(){const t=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then(r=>this.i!==t?(fe("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):r?(gt(typeof r.accessToken=="string"),new pL(r.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){const t=this.auth&&this.auth.getUid();return gt(t===null||typeof t=="string"),new On(t)}}class Aue{constructor(t,n,r){this.h=t,this.l=n,this.m=r,this.type="FirstParty",this.user=On.FIRST_PARTY,this.g=new Map}p(){return this.m?this.m():null}get headers(){this.g.set("X-Goog-AuthUser",this.h);const t=this.p();return t&&this.g.set("Authorization",t),this.l&&this.g.set("X-Goog-Iam-Authorization-Token",this.l),this.g}}class Rue{constructor(t,n,r){this.h=t,this.l=n,this.m=r}getToken(){return Promise.resolve(new Aue(this.h,this.l,this.m))}start(t,n){t.enqueueRetryable(()=>n(On.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class $ue{constructor(t){this.value=t,this.type="AppCheck",this.headers=new Map,t&&t.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class Oue{constructor(t){this.I=t,this.forceRefresh=!1,this.appCheck=null,this.T=null}start(t,n){const r=o=>{o.error!=null&&fe("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${o.error.message}`);const s=o.token!==this.T;return this.T=o.token,fe("FirebaseAppCheckTokenProvider",`Received ${s?"new":"existing"} token.`),s?n(o.token):Promise.resolve()};this.o=o=>{t.enqueueRetryable(()=>r(o))};const i=o=>{fe("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=o,this.appCheck.addTokenListener(this.o)};this.I.onInit(o=>i(o)),setTimeout(()=>{if(!this.appCheck){const o=this.I.getImmediate({optional:!0});o?i(o):fe("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){const t=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(t).then(n=>n?(gt(typeof n.token=="string"),this.T=n.token,new $ue(n.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Nue(e){const t=typeof self<"u"&&(self.crypto||self.msCrypto),n=new Uint8Array(e);if(t&&typeof t.getRandomValues=="function")t.getRandomValues(n);else for(let r=0;r<e;r++)n[r]=Math.floor(256*Math.random());return n}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class mL{static A(){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=Math.floor(256/t.length)*t.length;let r="";for(;r.length<20;){const i=Nue(40);for(let o=0;o<i.length;++o)r.length<20&&i[o]<n&&(r+=t.charAt(i[o]%t.length))}return r}}function Ke(e,t){return e<t?-1:e>t?1:0}function pu(e,t,n){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class an{constructor(t,n){if(this.seconds=t,this.nanoseconds=n,n<0)throw new pe(B.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new pe(B.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(t<-62135596800)throw new pe(B.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new pe(B.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}static now(){return an.fromMillis(Date.now())}static fromDate(t){return an.fromMillis(t.getTime())}static fromMillis(t){const n=Math.floor(t/1e3),r=Math.floor(1e6*(t-1e3*n));return new an(n,r)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(t){return this.seconds===t.seconds?Ke(this.nanoseconds,t.nanoseconds):Ke(this.seconds,t.seconds)}isEqual(t){return t.seconds===this.seconds&&t.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){const t=this.seconds- -62135596800;return String(t).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class _e{constructor(t){this.timestamp=t}static fromTimestamp(t){return new _e(t)}static min(){return new _e(new an(0,0))}static max(){return new _e(new an(253402300799,999999999))}compareTo(t){return this.timestamp._compareTo(t.timestamp)}isEqual(t){return this.timestamp.isEqual(t.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Gd{constructor(t,n,r){n===void 0?n=0:n>t.length&&we(),r===void 0?r=t.length-n:r>t.length-n&&we(),this.segments=t,this.offset=n,this.len=r}get length(){return this.len}isEqual(t){return Gd.comparator(this,t)===0}child(t){const n=this.segments.slice(this.offset,this.limit());return t instanceof Gd?t.forEach(r=>{n.push(r)}):n.push(t),this.construct(n)}limit(){return this.offset+this.length}popFirst(t){return t=t===void 0?1:t,this.construct(this.segments,this.offset+t,this.length-t)}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(t){return this.segments[this.offset+t]}isEmpty(){return this.length===0}isPrefixOf(t){if(t.length<this.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==t.get(n))return!1;return!0}isImmediateParentOf(t){if(this.length+1!==t.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==t.get(n))return!1;return!0}forEach(t){for(let n=this.offset,r=this.limit();n<r;n++)t(this.segments[n])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(t,n){const r=Math.min(t.length,n.length);for(let i=0;i<r;i++){const o=t.get(i),s=n.get(i);if(o<s)return-1;if(o>s)return 1}return t.length<n.length?-1:t.length>n.length?1:0}}class Ct extends Gd{construct(t,n,r){return new Ct(t,n,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}static fromString(...t){const n=[];for(const r of t){if(r.indexOf("//")>=0)throw new pe(B.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);n.push(...r.split("/").filter(i=>i.length>0))}return new Ct(n)}static emptyPath(){return new Ct([])}}const Due=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class Mn extends Gd{construct(t,n,r){return new Mn(t,n,r)}static isValidIdentifier(t){return Due.test(t)}canonicalString(){return this.toArray().map(t=>(t=t.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),Mn.isValidIdentifier(t)||(t="`"+t+"`"),t)).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)==="__name__"}static keyField(){return new Mn(["__name__"])}static fromServerFormat(t){const n=[];let r="",i=0;const o=()=>{if(r.length===0)throw new pe(B.INVALID_ARGUMENT,`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);n.push(r),r=""};let s=!1;for(;i<t.length;){const a=t[i];if(a==="\\"){if(i+1===t.length)throw new pe(B.INVALID_ARGUMENT,"Path has trailing escape character: "+t);const l=t[i+1];if(l!=="\\"&&l!=="."&&l!=="`")throw new pe(B.INVALID_ARGUMENT,"Path has invalid escape sequence: "+t);r+=l,i+=2}else a==="`"?(s=!s,i++):a!=="."||s?(r+=a,i++):(o(),i++)}if(o(),s)throw new pe(B.INVALID_ARGUMENT,"Unterminated ` in path: "+t);return new Mn(n)}static emptyPath(){return new Mn([])}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class me{constructor(t){this.path=t}static fromPath(t){return new me(Ct.fromString(t))}static fromName(t){return new me(Ct.fromString(t).popFirst(5))}static empty(){return new me(Ct.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(t){return this.path.length>=2&&this.path.get(this.path.length-2)===t}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(t){return t!==null&&Ct.comparator(this.path,t.path)===0}toString(){return this.path.toString()}static comparator(t,n){return Ct.comparator(t.path,n.path)}static isDocumentKey(t){return t.length%2==0}static fromSegments(t){return new me(new Ct(t.slice()))}}function Mue(e,t){const n=e.toTimestamp().seconds,r=e.toTimestamp().nanoseconds+1,i=_e.fromTimestamp(r===1e9?new an(n+1,0):new an(n,r));return new As(i,me.empty(),t)}function Lue(e){return new As(e.readTime,e.key,-1)}class As{constructor(t,n,r){this.readTime=t,this.documentKey=n,this.largestBatchId=r}static min(){return new As(_e.min(),me.empty(),-1)}static max(){return new As(_e.max(),me.empty(),-1)}}function jue(e,t){let n=e.readTime.compareTo(t.readTime);return n!==0?n:(n=me.comparator(e.documentKey,t.documentKey),n!==0?n:Ke(e.largestBatchId,t.largestBatchId))}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const Fue="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class zue{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(t){this.onCommittedListeners.push(t)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(t=>t())}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */async function Vf(e){if(e.code!==B.FAILED_PRECONDITION||e.message!==Fue)throw e;fe("LocalStore","Unexpectedly lost primary lease")}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class H{constructor(t){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,t(n=>{this.isDone=!0,this.result=n,this.nextCallback&&this.nextCallback(n)},n=>{this.isDone=!0,this.error=n,this.catchCallback&&this.catchCallback(n)})}catch(t){return this.next(void 0,t)}next(t,n){return this.callbackAttached&&we(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(t,this.result):new H((r,i)=>{this.nextCallback=o=>{this.wrapSuccess(t,o).next(r,i)},this.catchCallback=o=>{this.wrapFailure(n,o).next(r,i)}})}toPromise(){return new Promise((t,n)=>{this.next(t,n)})}wrapUserFunction(t){try{const n=t();return n instanceof H?n:H.resolve(n)}catch(n){return H.reject(n)}}wrapSuccess(t,n){return t?this.wrapUserFunction(()=>t(n)):H.resolve(n)}wrapFailure(t,n){return t?this.wrapUserFunction(()=>t(n)):H.reject(n)}static resolve(t){return new H((n,r)=>{n(t)})}static reject(t){return new H((n,r)=>{r(t)})}static waitFor(t){return new H((n,r)=>{let i=0,o=0,s=!1;t.forEach(a=>{++i,a.next(()=>{++o,s&&o===i&&n()},l=>r(l))}),s=!0,o===i&&n()})}static or(t){let n=H.resolve(!1);for(const r of t)n=n.next(i=>i?H.resolve(i):r());return n}static forEach(t,n){const r=[];return t.forEach((i,o)=>{r.push(n.call(this,i,o))}),this.waitFor(r)}static mapArray(t,n){return new H((r,i)=>{const o=t.length,s=new Array(o);let a=0;for(let l=0;l<o;l++){const u=l;n(t[u]).next(c=>{s[u]=c,++a,a===o&&r(s)},c=>i(c))}})}static doWhile(t,n){return new H((r,i)=>{const o=()=>{t()===!0?n().next(()=>{o()},i):r()};o()})}}function Bf(e){return e.name==="IndexedDbTransactionError"}/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class __{constructor(t,n){this.previousValue=t,n&&(n.sequenceNumberHandler=r=>this.ot(r),this.ut=r=>n.writeSequenceNumber(r))}ot(t){return this.previousValue=Math.max(t,this.previousValue),this.previousValue}next(){const t=++this.previousValue;return this.ut&&this.ut(t),t}}__.ct=-1;function Fy(e){return e==null}function Km(e){return e===0&&1/e==-1/0}function Vue(e){return typeof e=="number"&&Number.isInteger(e)&&!Km(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function UP(e){let t=0;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function ju(e,t){for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function gL(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Ot{constructor(t,n){this.comparator=t,this.root=n||Sn.EMPTY}insert(t,n){return new Ot(this.comparator,this.root.insert(t,n,this.comparator).copy(null,null,Sn.BLACK,null,null))}remove(t){return new Ot(this.comparator,this.root.remove(t,this.comparator).copy(null,null,Sn.BLACK,null,null))}get(t){let n=this.root;for(;!n.isEmpty();){const r=this.comparator(t,n.key);if(r===0)return n.value;r<0?n=n.left:r>0&&(n=n.right)}return null}indexOf(t){let n=0,r=this.root;for(;!r.isEmpty();){const i=this.comparator(t,r.key);if(i===0)return n+r.left.size;i<0?r=r.left:(n+=r.left.size+1,r=r.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(t){return this.root.inorderTraversal(t)}forEach(t){this.inorderTraversal((n,r)=>(t(n,r),!1))}toString(){const t=[];return this.inorderTraversal((n,r)=>(t.push(`${n}:${r}`),!1)),`{${t.join(", ")}}`}reverseTraversal(t){return this.root.reverseTraversal(t)}getIterator(){return new Mh(this.root,null,this.comparator,!1)}getIteratorFrom(t){return new Mh(this.root,t,this.comparator,!1)}getReverseIterator(){return new Mh(this.root,null,this.comparator,!0)}getReverseIteratorFrom(t){return new Mh(this.root,t,this.comparator,!0)}}class Mh{constructor(t,n,r,i){this.isReverse=i,this.nodeStack=[];let o=1;for(;!t.isEmpty();)if(o=n?r(t.key,n):1,n&&i&&(o*=-1),o<0)t=this.isReverse?t.left:t.right;else{if(o===0){this.nodeStack.push(t);break}this.nodeStack.push(t),t=this.isReverse?t.right:t.left}}getNext(){let t=this.nodeStack.pop();const n={key:t.key,value:t.value};if(this.isReverse)for(t=t.left;!t.isEmpty();)this.nodeStack.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack.push(t),t=t.left;return n}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;const t=this.nodeStack[this.nodeStack.length-1];return{key:t.key,value:t.value}}}class Sn{constructor(t,n,r,i,o){this.key=t,this.value=n,this.color=r??Sn.RED,this.left=i??Sn.EMPTY,this.right=o??Sn.EMPTY,this.size=this.left.size+1+this.right.size}copy(t,n,r,i,o){return new Sn(t??this.key,n??this.value,r??this.color,i??this.left,o??this.right)}isEmpty(){return!1}inorderTraversal(t){return this.left.inorderTraversal(t)||t(this.key,this.value)||this.right.inorderTraversal(t)}reverseTraversal(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)}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(t,n,r){let i=this;const o=r(t,i.key);return i=o<0?i.copy(null,null,null,i.left.insert(t,n,r),null):o===0?i.copy(null,n,null,null,null):i.copy(null,null,null,null,i.right.insert(t,n,r)),i.fixUp()}removeMin(){if(this.left.isEmpty())return Sn.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 Sn.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 t=this;return t.right.isRed()&&!t.left.isRed()&&(t=t.rotateLeft()),t.left.isRed()&&t.left.left.isRed()&&(t=t.rotateRight()),t.left.isRed()&&t.right.isRed()&&(t=t.colorFlip()),t}moveRedLeft(){let t=this.colorFlip();return t.right.left.isRed()&&(t=t.copy(null,null,null,null,t.right.rotateRight()),t=t.rotateLeft(),t=t.colorFlip()),t}moveRedRight(){let t=this.colorFlip();return t.left.left.isRed()&&(t=t.rotateRight(),t=t.colorFlip()),t}rotateLeft(){const t=this.copy(null,null,Sn.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)}rotateRight(){const t=this.copy(null,null,Sn.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)}colorFlip(){const t=this.left.copy(null,null,!this.left.color,null,null),n=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,n)}checkMaxDepth(){const t=this.check();return Math.pow(2,t)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw we();const t=this.left.check();if(t!==this.right.check())throw we();return t+(this.isRed()?0:1)}}Sn.EMPTY=null,Sn.RED=!0,Sn.BLACK=!1;Sn.EMPTY=new class{constructor(){this.size=0}get key(){throw we()}get value(){throw we()}get color(){throw we()}get left(){throw we()}get right(){throw we()}copy(e,t,n,r,i){return this}insert(e,t,n){return new Sn(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}};/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Vn{constructor(t){this.comparator=t,this.data=new Ot(this.comparator)}has(t){return this.data.get(t)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(t){return this.data.indexOf(t)}forEach(t){this.data.inorderTraversal((n,r)=>(t(n),!1))}forEachInRange(t,n){const r=this.data.getIteratorFrom(t[0]);for(;r.hasNext();){const i=r.getNext();if(this.comparator(i.key,t[1])>=0)return;n(i.key)}}forEachWhile(t,n){let r;for(r=n!==void 0?this.data.getIteratorFrom(n):this.data.getIterator();r.hasNext();)if(!t(r.getNext().key))return}firstAfterOrEqual(t){const n=this.data.getIteratorFrom(t);return n.hasNext()?n.getNext().key:null}getIterator(){return new WP(this.data.getIterator())}getIteratorFrom(t){return new WP(this.data.getIteratorFrom(t))}add(t){return this.copy(this.data.remove(t).insert(t,!0))}delete(t){return this.has(t)?this.copy(this.data.remove(t)):this}isEmpty(){return this.data.isEmpty()}unionWith(t){let n=this;return n.size<t.size&&(n=t,t=this),t.forEach(r=>{n=n.add(r)}),n}isEqual(t){if(!(t instanceof Vn)||this.size!==t.size)return!1;const n=this.data.getIterator(),r=t.data.getIterator();for(;n.hasNext();){const i=n.getNext().key,o=r.getNext().key;if(this.comparator(i,o)!==0)return!1}return!0}toArray(){const t=[];return this.forEach(n=>{t.push(n)}),t}toString(){const t=[];return this.forEach(n=>t.push(n)),"SortedSet("+t.toString()+")"}copy(t){const n=new Vn(this.comparator);return n.data=t,n}}class WP{constructor(t){this.iter=t}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class di{constructor(t){this.fields=t,t.sort(Mn.comparator)}static empty(){return new di([])}unionWith(t){let n=new Vn(Mn.comparator);for(const r of this.fields)n=n.add(r);for(const r of t)n=n.add(r);return new di(n.toArray())}covers(t){for(const n of this.fields)if(n.isPrefixOf(t))return!0;return!1}isEqual(t){return pu(this.fields,t.fields,(n,r)=>n.isEqual(r))}}/**
 * @license
 * Copyright 2023 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class yL extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Hn{constructor(t){this.binaryString=t}static fromBase64String(t){const n=function(r){try{return atob(r)}catch(i){throw typeof DOMException<"u"&&i instanceof DOMException?new yL("Invalid base64 string: "+i):i}}(t);return new Hn(n)}static fromUint8Array(t){const n=function(r){let i="";for(let o=0;o<r.length;++o)i+=String.fromCharCode(r[o]);return i}(t);return new Hn(n)}[Symbol.iterator](){let t=0;return{next:()=>t<this.binaryString.length?{value:this.binaryString.charCodeAt(t++),done:!1}:{value:void 0,done:!0}}}toBase64(){return t=this.binaryString,btoa(t);var t}toUint8Array(){return function(t){const n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(t){return Ke(this.binaryString,t.binaryString)}isEqual(t){return this.binaryString===t.binaryString}}Hn.EMPTY_BYTE_STRING=new Hn("");const Bue=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Rs(e){if(gt(!!e),typeof e=="string"){let t=0;const n=Bue.exec(e);if(gt(!!n),n[1]){let i=n[1];i=(i+"000000000").substr(0,9),t=Number(i)}const r=new Date(e);return{seconds:Math.floor(r.getTime()/1e3),nanos:t}}return{seconds:Xt(e.seconds),nanos:Xt(e.nanos)}}function Xt(e){return typeof e=="number"?e:typeof e=="string"?Number(e):0}function ka(e){return typeof e=="string"?Hn.fromBase64String(e):Hn.fromUint8Array(e)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function C_(e){var t,n;return((n=(((t=e==null?void 0:e.mapValue)===null||t===void 0?void 0:t.fields)||{}).__type__)===null||n===void 0?void 0:n.stringValue)==="server_timestamp"}function E_(e){const t=e.mapValue.fields.__previous_value__;return C_(t)?E_(t):t}function Qd(e){const t=Rs(e.mapValue.fields.__local_write_time__.timestampValue);return new an(t.seconds,t.nanos)}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Uue{constructor(t,n,r,i,o,s,a,l,u){this.databaseId=t,this.appId=n,this.persistenceKey=r,this.host=i,this.ssl=o,this.forceLongPolling=s,this.autoDetectLongPolling=a,this.longPollingOptions=l,this.useFetchStreams=u}}class Yd{constructor(t,n){this.projectId=t,this.database=n||"(default)"}static empty(){return new Yd("","")}get isDefaultDatabase(){return this.database==="(default)"}isEqual(t){return t instanceof Yd&&t.projectId===this.projectId&&t.database===this.database}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const Lh={mapValue:{fields:{__type__:{stringValue:"__max__"}}}};function Ta(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?C_(e)?4:Wue(e)?9007199254740991:10:we()}function qi(e,t){if(e===t)return!0;const n=Ta(e);if(n!==Ta(t))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return Qd(e).isEqual(Qd(t));case 3:return function(r,i){if(typeof r.timestampValue=="string"&&typeof i.timestampValue=="string"&&r.timestampValue.length===i.timestampValue.length)return r.timestampValue===i.timestampValue;const o=Rs(r.timestampValue),s=Rs(i.timestampValue);return o.seconds===s.seconds&&o.nanos===s.nanos}(e,t);case 5:return e.stringValue===t.stringValue;case 6:return function(r,i){return ka(r.bytesValue).isEqual(ka(i.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(r,i){return Xt(r.geoPointValue.latitude)===Xt(i.geoPointValue.latitude)&&Xt(r.geoPointValue.longitude)===Xt(i.geoPointValue.longitude)}(e,t);case 2:return function(r,i){if("integerValue"in r&&"integerValue"in i)return Xt(r.integerValue)===Xt(i.integerValue);if("doubleValue"in r&&"doubleValue"in i){const o=Xt(r.doubleValue),s=Xt(i.doubleValue);return o===s?Km(o)===Km(s):isNaN(o)&&isNaN(s)}return!1}(e,t);case 9:return pu(e.arrayValue.values||[],t.arrayValue.values||[],qi);case 10:return function(r,i){const o=r.mapValue.fields||{},s=i.mapValue.fields||{};if(UP(o)!==UP(s))return!1;for(const a in o)if(o.hasOwnProperty(a)&&(s[a]===void 0||!qi(o[a],s[a])))return!1;return!0}(e,t);default:return we()}}function Xd(e,t){return(e.values||[]).find(n=>qi(n,t))!==void 0}function mu(e,t){if(e===t)return 0;const n=Ta(e),r=Ta(t);if(n!==r)return Ke(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return Ke(e.booleanValue,t.booleanValue);case 2:return function(i,o){const s=Xt(i.integerValue||i.doubleValue),a=Xt(o.integerValue||o.doubleValue);return s<a?-1:s>a?1:s===a?0:isNaN(s)?isNaN(a)?0:-1:1}(e,t);case 3:return HP(e.timestampValue,t.timestampValue);case 4:return HP(Qd(e),Qd(t));case 5:return Ke(e.stringValue,t.stringValue);case 6:return function(i,o){const s=ka(i),a=ka(o);return s.compareTo(a)}(e.bytesValue,t.bytesValue);case 7:return function(i,o){const s=i.split("/"),a=o.split("/");for(let l=0;l<s.length&&l<a.length;l++){const u=Ke(s[l],a[l]);if(u!==0)return u}return Ke(s.length,a.length)}(e.referenceValue,t.referenceValue);case 8:return function(i,o){const s=Ke(Xt(i.latitude),Xt(o.latitude));return s!==0?s:Ke(Xt(i.longitude),Xt(o.longitude))}(e.geoPointValue,t.geoPointValue);case 9:return function(i,o){const s=i.values||[],a=o.values||[];for(let l=0;l<s.length&&l<a.length;++l){const u=mu(s[l],a[l]);if(u)return u}return Ke(s.length,a.length)}(e.arrayValue,t.arrayValue);case 10:return function(i,o){if(i===Lh.mapValue&&o===Lh.mapValue)return 0;if(i===Lh.mapValue)return 1;if(o===Lh.mapValue)return-1;const s=i.fields||{},a=Object.keys(s),l=o.fields||{},u=Object.keys(l);a.sort(),u.sort();for(let c=0;c<a.length&&c<u.length;++c){const d=Ke(a[c],u[c]);if(d!==0)return d;const f=mu(s[a[c]],l[u[c]]);if(f!==0)return f}return Ke(a.length,u.length)}(e.mapValue,t.mapValue);default:throw we()}}function HP(e,t){if(typeof e=="string"&&typeof t=="string"&&e.length===t.length)return Ke(e,t);const n=Rs(e),r=Rs(t),i=Ke(n.seconds,r.seconds);return i!==0?i:Ke(n.nanos,r.nanos)}function gu(e){return dw(e)}function dw(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(r){const i=Rs(r);return`time(${i.seconds},${i.nanos})`}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?ka(e.bytesValue).toBase64():"referenceValue"in e?(n=e.referenceValue,me.fromName(n).toString()):"geoPointValue"in e?`geo(${(t=e.geoPointValue).latitude},${t.longitude})`:"arrayValue"in e?function(r){let i="[",o=!0;for(const s of r.values||[])o?o=!1:i+=",",i+=dw(s);return i+"]"}(e.arrayValue):"mapValue"in e?function(r){const i=Object.keys(r.fields||{}).sort();let o="{",s=!0;for(const a of i)s?s=!1:o+=",",o+=`${a}:${dw(r.fields[a])}`;return o+"}"}(e.mapValue):we();var t,n}function fw(e){return!!e&&"integerValue"in e}function k_(e){return!!e&&"arrayValue"in e}function qP(e){return!!e&&"nullValue"in e}function KP(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function kp(e){return!!e&&"mapValue"in e}function Jc(e){if(e.geoPointValue)return{geoPointValue:Object.assign({},e.geoPointValue)};if(e.timestampValue&&typeof e.timestampValue=="object")return{timestampValue:Object.assign({},e.timestampValue)};if(e.mapValue){const t={mapValue:{fields:{}}};return ju(e.mapValue.fields,(n,r)=>t.mapValue.fields[n]=Jc(r)),t}if(e.arrayValue){const t={arrayValue:{values:[]}};for(let n=0;n<(e.arrayValue.values||[]).length;++n)t.arrayValue.values[n]=Jc(e.arrayValue.values[n]);return t}return Object.assign({},e)}function Wue(e){return(((e.mapValue||{}).fields||{}).__type__||{}).stringValue==="__max__"}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Hr{constructor(t){this.value=t}static empty(){return new Hr({mapValue:{}})}field(t){if(t.isEmpty())return this.value;{let n=this.value;for(let r=0;r<t.length-1;++r)if(n=(n.mapValue.fields||{})[t.get(r)],!kp(n))return null;return n=(n.mapValue.fields||{})[t.lastSegment()],n||null}}set(t,n){this.getFieldsMap(t.popLast())[t.lastSegment()]=Jc(n)}setAll(t){let n=Mn.emptyPath(),r={},i=[];t.forEach((s,a)=>{if(!n.isImmediateParentOf(a)){const l=this.getFieldsMap(n);this.applyChanges(l,r,i),r={},i=[],n=a.popLast()}s?r[a.lastSegment()]=Jc(s):i.push(a.lastSegment())});const o=this.getFieldsMap(n);this.applyChanges(o,r,i)}delete(t){const n=this.field(t.popLast());kp(n)&&n.mapValue.fields&&delete n.mapValue.fields[t.lastSegment()]}isEqual(t){return qi(this.value,t.value)}getFieldsMap(t){let n=this.value;n.mapValue.fields||(n.mapValue={fields:{}});for(let r=0;r<t.length;++r){let i=n.mapValue.fields[t.get(r)];kp(i)&&i.mapValue.fields||(i={mapValue:{fields:{}}},n.mapValue.fields[t.get(r)]=i),n=i}return n.mapValue.fields}applyChanges(t,n,r){ju(n,(i,o)=>t[i]=o);for(const i of r)delete t[i]}clone(){return new Hr(Jc(this.value))}}function vL(e){const t=[];return ju(e.fields,(n,r)=>{const i=new Mn([n]);if(kp(r)){const o=vL(r.mapValue).fields;if(o.length===0)t.push(i);else for(const s of o)t.push(i.child(s))}else t.push(i)}),new di(t)}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Dn{constructor(t,n,r,i,o,s,a){this.key=t,this.documentType=n,this.version=r,this.readTime=i,this.createTime=o,this.data=s,this.documentState=a}static newInvalidDocument(t){return new Dn(t,0,_e.min(),_e.min(),_e.min(),Hr.empty(),0)}static newFoundDocument(t,n,r,i){return new Dn(t,1,n,_e.min(),r,i,0)}static newNoDocument(t,n){return new Dn(t,2,n,_e.min(),_e.min(),Hr.empty(),0)}static newUnknownDocument(t,n){return new Dn(t,3,n,_e.min(),_e.min(),Hr.empty(),2)}convertToFoundDocument(t,n){return!this.createTime.isEqual(_e.min())||this.documentType!==2&&this.documentType!==0||(this.createTime=t),this.version=t,this.documentType=1,this.data=n,this.documentState=0,this}convertToNoDocument(t){return this.version=t,this.documentType=2,this.data=Hr.empty(),this.documentState=0,this}convertToUnknownDocument(t){return this.version=t,this.documentType=3,this.data=Hr.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=_e.min(),this}setReadTime(t){return this.readTime=t,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 Dn&&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 Dn(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}})`}}/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Gm{constructor(t,n){this.position=t,this.inclusive=n}}function GP(e,t,n){let r=0;for(let i=0;i<e.position.length;i++){const o=t[i],s=e.position[i];if(o.field.isKeyField()?r=me.comparator(me.fromName(s.referenceValue),n.key):r=mu(s,n.data.field(o.field)),o.dir==="desc"&&(r*=-1),r!==0)break}return r}function QP(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(!qi(e.position[n],t.position[n]))return!1;return!0}/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Zc{constructor(t,n="asc"){this.field=t,this.dir=n}}function Hue(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class bL{}class on extends bL{constructor(t,n,r){super(),this.field=t,this.op=n,this.value=r}static create(t,n,r){return t.isKeyField()?n==="in"||n==="not-in"?this.createKeyFieldInFilter(t,n,r):new Kue(t,n,r):n==="array-contains"?new Yue(t,r):n==="in"?new Xue(t,r):n==="not-in"?new Jue(t,r):n==="array-contains-any"?new Zue(t,r):new on(t,n,r)}static createKeyFieldInFilter(t,n,r){return n==="in"?new Gue(t,r):new Que(t,r)}matches(t){const n=t.data.field(this.field);return this.op==="!="?n!==null&&this.matchesComparison(mu(n,this.value)):n!==null&&Ta(this.value)===Ta(n)&&this.matchesComparison(mu(n,this.value))}matchesComparison(t){switch(this.op){case"<":return t<0;case"<=":return t<=0;case"==":return t===0;case"!=":return t!==0;case">":return t>0;case">=":return t>=0;default:return we()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}getFirstInequalityField(){return this.isInequality()?this.field:null}}class Ki extends bL{constructor(t,n){super(),this.filters=t,this.op=n,this.lt=null}static create(t,n){return new Ki(t,n)}matches(t){return wL(this)?this.filters.find(n=>!n.matches(t))===void 0:this.filters.find(n=>n.matches(t))!==void 0}getFlattenedFilters(){return this.lt!==null||(this.lt=this.filters.reduce((t,n)=>t.concat(n.getFlattenedFilters()),[])),this.lt}getFilters(){return Object.assign([],this.filters)}getFirstInequalityField(){const t=this.ft(n=>n.isInequality());return t!==null?t.field:null}ft(t){for(const n of this.getFlattenedFilters())if(t(n))return n;return null}}function wL(e){return e.op==="and"}function SL(e){return que(e)&&wL(e)}function que(e){for(const t of e.filters)if(t instanceof Ki)return!1;return!0}function hw(e){if(e instanceof on)return e.field.canonicalString()+e.op.toString()+gu(e.value);if(SL(e))return e.filters.map(t=>hw(t)).join(",");{const t=e.filters.map(n=>hw(n)).join(",");return`${e.op}(${t})`}}function xL(e,t){return e instanceof on?function(n,r){return r instanceof on&&n.op===r.op&&n.field.isEqual(r.field)&&qi(n.value,r.value)}(e,t):e instanceof Ki?function(n,r){return r instanceof Ki&&n.op===r.op&&n.filters.length===r.filters.length?n.filters.reduce((i,o,s)=>i&&xL(o,r.filters[s]),!0):!1}(e,t):void we()}function _L(e){return e instanceof on?function(t){return`${t.field.canonicalString()} ${t.op} ${gu(t.value)}`}(e):e instanceof Ki?function(t){return t.op.toString()+" {"+t.getFilters().map(_L).join(" ,")+"}"}(e):"Filter"}class Kue extends on{constructor(t,n,r){super(t,n,r),this.key=me.fromName(r.referenceValue)}matches(t){const n=me.comparator(t.key,this.key);return this.matchesComparison(n)}}class Gue extends on{constructor(t,n){super(t,"in",n),this.keys=CL("in",n)}matches(t){return this.keys.some(n=>n.isEqual(t.key))}}class Que extends on{constructor(t,n){super(t,"not-in",n),this.keys=CL("not-in",n)}matches(t){return!this.keys.some(n=>n.isEqual(t.key))}}function CL(e,t){var n;return(((n=t.arrayValue)===null||n===void 0?void 0:n.values)||[]).map(r=>me.fromName(r.referenceValue))}class Yue extends on{constructor(t,n){super(t,"array-contains",n)}matches(t){const n=t.data.field(this.field);return k_(n)&&Xd(n.arrayValue,this.value)}}class Xue extends on{constructor(t,n){super(t,"in",n)}matches(t){const n=t.data.field(this.field);return n!==null&&Xd(this.value.arrayValue,n)}}class Jue extends on{constructor(t,n){super(t,"not-in",n)}matches(t){if(Xd(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const n=t.data.field(this.field);return n!==null&&!Xd(this.value.arrayValue,n)}}class Zue extends on{constructor(t,n){super(t,"array-contains-any",n)}matches(t){const n=t.data.field(this.field);return!(!k_(n)||!n.arrayValue.values)&&n.arrayValue.values.some(r=>Xd(this.value.arrayValue,r))}}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class ece{constructor(t,n=null,r=[],i=[],o=null,s=null,a=null){this.path=t,this.collectionGroup=n,this.orderBy=r,this.filters=i,this.limit=o,this.startAt=s,this.endAt=a,this.dt=null}}function YP(e,t=null,n=[],r=[],i=null,o=null,s=null){return new ece(e,t,n,r,i,o,s)}function T_(e){const t=Ee(e);if(t.dt===null){let n=t.path.canonicalString();t.collectionGroup!==null&&(n+="|cg:"+t.collectionGroup),n+="|f:",n+=t.filters.map(r=>hw(r)).join(","),n+="|ob:",n+=t.orderBy.map(r=>function(i){return i.field.canonicalString()+i.dir}(r)).join(","),Fy(t.limit)||(n+="|l:",n+=t.limit),t.startAt&&(n+="|lb:",n+=t.startAt.inclusive?"b:":"a:",n+=t.startAt.position.map(r=>gu(r)).join(",")),t.endAt&&(n+="|ub:",n+=t.endAt.inclusive?"a:":"b:",n+=t.endAt.position.map(r=>gu(r)).join(",")),t.dt=n}return t.dt}function P_(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(!Hue(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(!xL(e.filters[n],t.filters[n]))return!1;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!QP(e.startAt,t.startAt)&&QP(e.endAt,t.endAt)}function pw(e){return me.isDocumentKey(e.path)&&e.collectionGroup===null&&e.filters.length===0}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class zy{constructor(t,n=null,r=[],i=[],o=null,s="F",a=null,l=null){this.path=t,this.collectionGroup=n,this.explicitOrderBy=r,this.filters=i,this.limit=o,this.limitType=s,this.startAt=a,this.endAt=l,this.wt=null,this._t=null,this.startAt,this.endAt}}function tce(e,t,n,r,i,o,s,a){return new zy(e,t,n,r,i,o,s,a)}function I_(e){return new zy(e)}function XP(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 nce(e){return e.explicitOrderBy.length>0?e.explicitOrderBy[0].field:null}function rce(e){for(const t of e.filters){const n=t.getFirstInequalityField();if(n!==null)return n}return null}function ice(e){return e.collectionGroup!==null}function Bl(e){const t=Ee(e);if(t.wt===null){t.wt=[];const n=rce(t),r=nce(t);if(n!==null&&r===null)n.isKeyField()||t.wt.push(new Zc(n)),t.wt.push(new Zc(Mn.keyField(),"asc"));else{let i=!1;for(const o of t.explicitOrderBy)t.wt.push(o),o.field.isKeyField()&&(i=!0);if(!i){const o=t.explicitOrderBy.length>0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";t.wt.push(new Zc(Mn.keyField(),o))}}}return t.wt}function Io(e){const t=Ee(e);if(!t._t)if(t.limitType==="F")t._t=YP(t.path,t.collectionGroup,Bl(t),t.filters,t.limit,t.startAt,t.endAt);else{const n=[];for(const o of Bl(t)){const s=o.dir==="desc"?"asc":"desc";n.push(new Zc(o.field,s))}const r=t.endAt?new Gm(t.endAt.position,t.endAt.inclusive):null,i=t.startAt?new Gm(t.startAt.position,t.startAt.inclusive):null;t._t=YP(t.path,t.collectionGroup,n,t.filters,t.limit,r,i)}return t._t}function mw(e,t,n){return new zy(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function Vy(e,t){return P_(Io(e),Io(t))&&e.limitType===t.limitType}function EL(e){return`${T_(Io(e))}|lt:${e.limitType}`}function gw(e){return`Query(target=${function(t){let n=t.path.canonicalString();return t.collectionGroup!==null&&(n+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(n+=`, filters: [${t.filters.map(r=>_L(r)).join(", ")}]`),Fy(t.limit)||(n+=", limit: "+t.limit),t.orderBy.length>0&&(n+=`, orderBy: [${t.orderBy.map(r=>function(i){return`${i.field.canonicalString()} (${i.dir})`}(r)).join(", ")}]`),t.startAt&&(n+=", startAt: ",n+=t.startAt.inclusive?"b:":"a:",n+=t.startAt.position.map(r=>gu(r)).join(",")),t.endAt&&(n+=", endAt: ",n+=t.endAt.inclusive?"a:":"b:",n+=t.endAt.position.map(r=>gu(r)).join(",")),`Target(${n})`}(Io(e))}; limitType=${e.limitType})`}function By(e,t){return t.isFoundDocument()&&function(n,r){const i=r.key.path;return n.collectionGroup!==null?r.key.hasCollectionId(n.collectionGroup)&&n.path.isPrefixOf(i):me.isDocumentKey(n.path)?n.path.isEqual(i):n.path.isImmediateParentOf(i)}(e,t)&&function(n,r){for(const i of Bl(n))if(!i.field.isKeyField()&&r.data.field(i.field)===null)return!1;return!0}(e,t)&&function(n,r){for(const i of n.filters)if(!i.matches(r))return!1;return!0}(e,t)&&function(n,r){return!(n.startAt&&!function(i,o,s){const a=GP(i,o,s);return i.inclusive?a<=0:a<0}(n.startAt,Bl(n),r)||n.endAt&&!function(i,o,s){const a=GP(i,o,s);return i.inclusive?a>=0:a>0}(n.endAt,Bl(n),r))}(e,t)}function oce(e){return e.collectionGroup||(e.path.length%2==1?e.path.lastSegment():e.path.get(e.path.length-2))}function kL(e){return(t,n)=>{let r=!1;for(const i of Bl(e)){const o=sce(i,t,n);if(o!==0)return o;r=r||i.field.isKeyField()}return 0}}function sce(e,t,n){const r=e.field.isKeyField()?me.comparator(t.key,n.key):function(i,o,s){const a=o.data.field(i),l=s.data.field(i);return a!==null&&l!==null?mu(a,l):we()}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return-1*r;default:return we()}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Fu{constructor(t,n){this.mapKeyFn=t,this.equalsFn=n,this.inner={},this.innerSize=0}get(t){const n=this.mapKeyFn(t),r=this.inner[n];if(r!==void 0){for(const[i,o]of r)if(this.equalsFn(i,t))return o}}has(t){return this.get(t)!==void 0}set(t,n){const r=this.mapKeyFn(t),i=this.inner[r];if(i===void 0)return this.inner[r]=[[t,n]],void this.innerSize++;for(let o=0;o<i.length;o++)if(this.equalsFn(i[o][0],t))return void(i[o]=[t,n]);i.push([t,n]),this.innerSize++}delete(t){const n=this.mapKeyFn(t),r=this.inner[n];if(r===void 0)return!1;for(let i=0;i<r.length;i++)if(this.equalsFn(r[i][0],t))return r.length===1?delete this.inner[n]:r.splice(i,1),this.innerSize--,!0;return!1}forEach(t){ju(this.inner,(n,r)=>{for(const[i,o]of r)t(i,o)})}isEmpty(){return gL(this.inner)}size(){return this.innerSize}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const ace=new Ot(me.comparator);function Ao(){return ace}const TL=new Ot(me.comparator);function Pc(...e){let t=TL;for(const n of e)t=t.insert(n.key,n);return t}function PL(e){let t=TL;return e.forEach((n,r)=>t=t.insert(n,r.overlayedDocument)),t}function sa(){return ed()}function IL(){return ed()}function ed(){return new Fu(e=>e.toString(),(e,t)=>e.isEqual(t))}const lce=new Ot(me.comparator),uce=new Vn(me.comparator);function Ie(...e){let t=uce;for(const n of e)t=t.add(n);return t}const cce=new Vn(Ke);function dce(){return cce}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function AL(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:Km(t)?"-0":t}}function RL(e){return{integerValue:""+e}}function fce(e,t){return Vue(t)?RL(t):AL(e,t)}/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Uy{constructor(){this._=void 0}}function hce(e,t,n){return e instanceof Qm?function(r,i){const o={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:r.seconds,nanos:r.nanoseconds}}}};return i&&C_(i)&&(i=E_(i)),i&&(o.fields.__previous_value__=i),{mapValue:o}}(n,t):e instanceof Jd?OL(e,t):e instanceof Zd?NL(e,t):function(r,i){const o=$L(r,i),s=JP(o)+JP(r.gt);return fw(o)&&fw(r.gt)?RL(s):AL(r.serializer,s)}(e,t)}function pce(e,t,n){return e instanceof Jd?OL(e,t):e instanceof Zd?NL(e,t):n}function $L(e,t){return e instanceof Ym?fw(n=t)||function(r){return!!r&&"doubleValue"in r}(n)?t:{integerValue:0}:null;var n}class Qm extends Uy{}class Jd extends Uy{constructor(t){super(),this.elements=t}}function OL(e,t){const n=DL(t);for(const r of e.elements)n.some(i=>qi(i,r))||n.push(r);return{arrayValue:{values:n}}}class Zd extends Uy{constructor(t){super(),this.elements=t}}function NL(e,t){let n=DL(t);for(const r of e.elements)n=n.filter(i=>!qi(i,r));return{arrayValue:{values:n}}}class Ym extends Uy{constructor(t,n){super(),this.serializer=t,this.gt=n}}function JP(e){return Xt(e.integerValue||e.doubleValue)}function DL(e){return k_(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}function mce(e,t){return e.field.isEqual(t.field)&&function(n,r){return n instanceof Jd&&r instanceof Jd||n instanceof Zd&&r instanceof Zd?pu(n.elements,r.elements,qi):n instanceof Ym&&r instanceof Ym?qi(n.gt,r.gt):n instanceof Qm&&r instanceof Qm}(e.transform,t.transform)}class gce{constructor(t,n){this.version=t,this.transformResults=n}}class Wi{constructor(t,n){this.updateTime=t,this.exists=n}static none(){return new Wi}static exists(t){return new Wi(void 0,t)}static updateTime(t){return new Wi(t)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(t){return this.exists===t.exists&&(this.updateTime?!!t.updateTime&&this.updateTime.isEqual(t.updateTime):!t.updateTime)}}function Tp(e,t){return e.updateTime!==void 0?t.isFoundDocument()&&t.version.isEqual(e.updateTime):e.exists===void 0||e.exists===t.isFoundDocument()}class Wy{}function ML(e,t){if(!e.hasLocalMutations||t&&t.fields.length===0)return null;if(t===null)return e.isNoDocument()?new A_(e.key,Wi.none()):new Uf(e.key,e.data,Wi.none());{const n=e.data,r=Hr.empty();let i=new Vn(Mn.comparator);for(let o of t.fields)if(!i.has(o)){let s=n.field(o);s===null&&o.length>1&&(o=o.popLast(),s=n.field(o)),s===null?r.delete(o):r.set(o,s),i=i.add(o)}return new Ma(e.key,r,new di(i.toArray()),Wi.none())}}function yce(e,t,n){e instanceof Uf?function(r,i,o){const s=r.value.clone(),a=eI(r.fieldTransforms,i,o.transformResults);s.setAll(a),i.convertToFoundDocument(o.version,s).setHasCommittedMutations()}(e,t,n):e instanceof Ma?function(r,i,o){if(!Tp(r.precondition,i))return void i.convertToUnknownDocument(o.version);const s=eI(r.fieldTransforms,i,o.transformResults),a=i.data;a.setAll(LL(r)),a.setAll(s),i.convertToFoundDocument(o.version,a).setHasCommittedMutations()}(e,t,n):function(r,i,o){i.convertToNoDocument(o.version).setHasCommittedMutations()}(0,t,n)}function td(e,t,n,r){return e instanceof Uf?function(i,o,s,a){if(!Tp(i.precondition,o))return s;const l=i.value.clone(),u=tI(i.fieldTransforms,a,o);return l.setAll(u),o.convertToFoundDocument(o.version,l).setHasLocalMutations(),null}(e,t,n,r):e instanceof Ma?function(i,o,s,a){if(!Tp(i.precondition,o))return s;const l=tI(i.fieldTransforms,a,o),u=o.data;return u.setAll(LL(i)),u.setAll(l),o.convertToFoundDocument(o.version,u).setHasLocalMutations(),s===null?null:s.unionWith(i.fieldMask.fields).unionWith(i.fieldTransforms.map(c=>c.field))}(e,t,n,r):function(i,o,s){return Tp(i.precondition,o)?(o.convertToNoDocument(o.version).setHasLocalMutations(),null):s}(e,t,n)}function vce(e,t){let n=null;for(const r of e.fieldTransforms){const i=t.data.field(r.field),o=$L(r.transform,i||null);o!=null&&(n===null&&(n=Hr.empty()),n.set(r.field,o))}return n||null}function ZP(e,t){return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&!!function(n,r){return n===void 0&&r===void 0||!(!n||!r)&&pu(n,r,(i,o)=>mce(i,o))}(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))}class Uf extends Wy{constructor(t,n,r,i=[]){super(),this.key=t,this.value=n,this.precondition=r,this.fieldTransforms=i,this.type=0}getFieldMask(){return null}}class Ma extends Wy{constructor(t,n,r,i,o=[]){super(),this.key=t,this.data=n,this.fieldMask=r,this.precondition=i,this.fieldTransforms=o,this.type=1}getFieldMask(){return this.fieldMask}}function LL(e){const t=new Map;return e.fieldMask.fields.forEach(n=>{if(!n.isEmpty()){const r=e.data.field(n);t.set(n,r)}}),t}function eI(e,t,n){const r=new Map;gt(e.length===n.length);for(let i=0;i<n.length;i++){const o=e[i],s=o.transform,a=t.data.field(o.field);r.set(o.field,pce(s,a,n[i]))}return r}function tI(e,t,n){const r=new Map;for(const i of e){const o=i.transform,s=n.data.field(i.field);r.set(i.field,hce(o,s,t))}return r}class A_ extends Wy{constructor(t,n){super(),this.key=t,this.precondition=n,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class bce extends Wy{constructor(t,n){super(),this.key=t,this.precondition=n,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class wce{constructor(t,n,r,i){this.batchId=t,this.localWriteTime=n,this.baseMutations=r,this.mutations=i}applyToRemoteDocument(t,n){const r=n.mutationResults;for(let i=0;i<this.mutations.length;i++){const o=this.mutations[i];o.key.isEqual(t.key)&&yce(o,t,r[i])}}applyToLocalView(t,n){for(const r of this.baseMutations)r.key.isEqual(t.key)&&(n=td(r,t,n,this.localWriteTime));for(const r of this.mutations)r.key.isEqual(t.key)&&(n=td(r,t,n,this.localWriteTime));return n}applyToLocalDocumentSet(t,n){const r=IL();return this.mutations.forEach(i=>{const o=t.get(i.key),s=o.overlayedDocument;let a=this.applyToLocalView(s,o.mutatedFields);a=n.has(i.key)?null:a;const l=ML(s,a);l!==null&&r.set(i.key,l),s.isValidDocument()||s.convertToNoDocument(_e.min())}),r}keys(){return this.mutations.reduce((t,n)=>t.add(n.key),Ie())}isEqual(t){return this.batchId===t.batchId&&pu(this.mutations,t.mutations,(n,r)=>ZP(n,r))&&pu(this.baseMutations,t.baseMutations,(n,r)=>ZP(n,r))}}class R_{constructor(t,n,r,i){this.batch=t,this.commitVersion=n,this.mutationResults=r,this.docVersions=i}static from(t,n,r){gt(t.mutations.length===r.length);let i=lce;const o=t.mutations;for(let s=0;s<o.length;s++)i=i.insert(o[s].key,r[s].version);return new R_(t,n,r,i)}}/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Sce{constructor(t,n){this.largestBatchId=t,this.mutation=n}getKey(){return this.mutation.key}isEqual(t){return t!==null&&this.mutation===t.mutation}toString(){return`Overlay{
      largestBatchId: ${this.largestBatchId},
      mutation: ${this.mutation.toString()}
    }`}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class xce{constructor(t,n){this.count=t,this.unchangedNames=n}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */var Kt,Me;function _ce(e){switch(e){default:return we();case B.CANCELLED:case B.UNKNOWN:case B.DEADLINE_EXCEEDED:case B.RESOURCE_EXHAUSTED:case B.INTERNAL:case B.UNAVAILABLE:case B.UNAUTHENTICATED:return!1;case B.INVALID_ARGUMENT:case B.NOT_FOUND:case B.ALREADY_EXISTS:case B.PERMISSION_DENIED:case B.FAILED_PRECONDITION:case B.ABORTED:case B.OUT_OF_RANGE:case B.UNIMPLEMENTED:case B.DATA_LOSS:return!0}}function jL(e){if(e===void 0)return Po("GRPC error has no .code"),B.UNKNOWN;switch(e){case Kt.OK:return B.OK;case Kt.CANCELLED:return B.CANCELLED;case Kt.UNKNOWN:return B.UNKNOWN;case Kt.DEADLINE_EXCEEDED:return B.DEADLINE_EXCEEDED;case Kt.RESOURCE_EXHAUSTED:return B.RESOURCE_EXHAUSTED;case Kt.INTERNAL:return B.INTERNAL;case Kt.UNAVAILABLE:return B.UNAVAILABLE;case Kt.UNAUTHENTICATED:return B.UNAUTHENTICATED;case Kt.INVALID_ARGUMENT:return B.INVALID_ARGUMENT;case Kt.NOT_FOUND:return B.NOT_FOUND;case Kt.ALREADY_EXISTS:return B.ALREADY_EXISTS;case Kt.PERMISSION_DENIED:return B.PERMISSION_DENIED;case Kt.FAILED_PRECONDITION:return B.FAILED_PRECONDITION;case Kt.ABORTED:return B.ABORTED;case Kt.OUT_OF_RANGE:return B.OUT_OF_RANGE;case Kt.UNIMPLEMENTED:return B.UNIMPLEMENTED;case Kt.DATA_LOSS:return B.DATA_LOSS;default:return we()}}(Me=Kt||(Kt={}))[Me.OK=0]="OK",Me[Me.CANCELLED=1]="CANCELLED",Me[Me.UNKNOWN=2]="UNKNOWN",Me[Me.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",Me[Me.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",Me[Me.NOT_FOUND=5]="NOT_FOUND",Me[Me.ALREADY_EXISTS=6]="ALREADY_EXISTS",Me[Me.PERMISSION_DENIED=7]="PERMISSION_DENIED",Me[Me.UNAUTHENTICATED=16]="UNAUTHENTICATED",Me[Me.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",Me[Me.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",Me[Me.ABORTED=10]="ABORTED",Me[Me.OUT_OF_RANGE=11]="OUT_OF_RANGE",Me[Me.UNIMPLEMENTED=12]="UNIMPLEMENTED",Me[Me.INTERNAL=13]="INTERNAL",Me[Me.UNAVAILABLE=14]="UNAVAILABLE",Me[Me.DATA_LOSS=15]="DATA_LOSS";/**
 * @license
 * Copyright 2023 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class $_{constructor(){this.onExistenceFilterMismatchCallbacks=new Map}static get instance(){return jh}static getOrCreateInstance(){return jh===null&&(jh=new $_),jh}onExistenceFilterMismatch(t){const n=Symbol();return this.onExistenceFilterMismatchCallbacks.set(n,t),()=>this.onExistenceFilterMismatchCallbacks.delete(n)}notifyOnExistenceFilterMismatch(t){this.onExistenceFilterMismatchCallbacks.forEach(n=>n(t))}}let jh=null;/**
 * @license
 * Copyright 2023 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Cce(){return new TextEncoder}/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const Ece=new Vl([4294967295,4294967295],0);function nI(e){const t=Cce().encode(e),n=new kue;return n.update(t),new Uint8Array(n.digest())}function rI(e){const t=new DataView(e.buffer),n=t.getUint32(0,!0),r=t.getUint32(4,!0),i=t.getUint32(8,!0),o=t.getUint32(12,!0);return[new Vl([n,r],0),new Vl([i,o],0)]}class O_{constructor(t,n,r){if(this.bitmap=t,this.padding=n,this.hashCount=r,n<0||n>=8)throw new Ic(`Invalid padding: ${n}`);if(r<0)throw new Ic(`Invalid hash count: ${r}`);if(t.length>0&&this.hashCount===0)throw new Ic(`Invalid hash count: ${r}`);if(t.length===0&&n!==0)throw new Ic(`Invalid padding when bitmap length is 0: ${n}`);this.It=8*t.length-n,this.Tt=Vl.fromNumber(this.It)}Et(t,n,r){let i=t.add(n.multiply(Vl.fromNumber(r)));return i.compare(Ece)===1&&(i=new Vl([i.getBits(0),i.getBits(1)],0)),i.modulo(this.Tt).toNumber()}At(t){return(this.bitmap[Math.floor(t/8)]&1<<t%8)!=0}vt(t){if(this.It===0)return!1;const n=nI(t),[r,i]=rI(n);for(let o=0;o<this.hashCount;o++){const s=this.Et(r,i,o);if(!this.At(s))return!1}return!0}static create(t,n,r){const i=t%8==0?0:8-t%8,o=new Uint8Array(Math.ceil(t/8)),s=new O_(o,i,n);return r.forEach(a=>s.insert(a)),s}insert(t){if(this.It===0)return;const n=nI(t),[r,i]=rI(n);for(let o=0;o<this.hashCount;o++){const s=this.Et(r,i,o);this.Rt(s)}}Rt(t){const n=Math.floor(t/8),r=t%8;this.bitmap[n]|=1<<r}}class Ic extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Hy{constructor(t,n,r,i,o){this.snapshotVersion=t,this.targetChanges=n,this.targetMismatches=r,this.documentUpdates=i,this.resolvedLimboDocuments=o}static createSynthesizedRemoteEventForCurrentChange(t,n,r){const i=new Map;return i.set(t,Wf.createSynthesizedTargetChangeForCurrentChange(t,n,r)),new Hy(_e.min(),i,new Ot(Ke),Ao(),Ie())}}class Wf{constructor(t,n,r,i,o){this.resumeToken=t,this.current=n,this.addedDocuments=r,this.modifiedDocuments=i,this.removedDocuments=o}static createSynthesizedTargetChangeForCurrentChange(t,n,r){return new Wf(r,n,Ie(),Ie(),Ie())}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Pp{constructor(t,n,r,i){this.Pt=t,this.removedTargetIds=n,this.key=r,this.bt=i}}class FL{constructor(t,n){this.targetId=t,this.Vt=n}}class zL{constructor(t,n,r=Hn.EMPTY_BYTE_STRING,i=null){this.state=t,this.targetIds=n,this.resumeToken=r,this.cause=i}}class iI{constructor(){this.St=0,this.Dt=sI(),this.Ct=Hn.EMPTY_BYTE_STRING,this.xt=!1,this.Nt=!0}get current(){return this.xt}get resumeToken(){return this.Ct}get kt(){return this.St!==0}get Mt(){return this.Nt}$t(t){t.approximateByteSize()>0&&(this.Nt=!0,this.Ct=t)}Ot(){let t=Ie(),n=Ie(),r=Ie();return this.Dt.forEach((i,o)=>{switch(o){case 0:t=t.add(i);break;case 2:n=n.add(i);break;case 1:r=r.add(i);break;default:we()}}),new Wf(this.Ct,this.xt,t,n,r)}Ft(){this.Nt=!1,this.Dt=sI()}Bt(t,n){this.Nt=!0,this.Dt=this.Dt.insert(t,n)}Lt(t){this.Nt=!0,this.Dt=this.Dt.remove(t)}qt(){this.St+=1}Ut(){this.St-=1}Kt(){this.Nt=!0,this.xt=!0}}class kce{constructor(t){this.Gt=t,this.Qt=new Map,this.jt=Ao(),this.zt=oI(),this.Wt=new Ot(Ke)}Ht(t){for(const n of t.Pt)t.bt&&t.bt.isFoundDocument()?this.Jt(n,t.bt):this.Yt(n,t.key,t.bt);for(const n of t.removedTargetIds)this.Yt(n,t.key,t.bt)}Xt(t){this.forEachTarget(t,n=>{const r=this.Zt(n);switch(t.state){case 0:this.te(n)&&r.$t(t.resumeToken);break;case 1:r.Ut(),r.kt||r.Ft(),r.$t(t.resumeToken);break;case 2:r.Ut(),r.kt||this.removeTarget(n);break;case 3:this.te(n)&&(r.Kt(),r.$t(t.resumeToken));break;case 4:this.te(n)&&(this.ee(n),r.$t(t.resumeToken));break;default:we()}})}forEachTarget(t,n){t.targetIds.length>0?t.targetIds.forEach(n):this.Qt.forEach((r,i)=>{this.te(i)&&n(i)})}ne(t){var n;const r=t.targetId,i=t.Vt.count,o=this.se(r);if(o){const s=o.target;if(pw(s))if(i===0){const a=new me(s.path);this.Yt(r,a,Dn.newNoDocument(a,_e.min()))}else gt(i===1);else{const a=this.ie(r);if(a!==i){const l=this.re(t,a);if(l!==0){this.ee(r);const u=l===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Wt=this.Wt.insert(r,u)}(n=$_.instance)===null||n===void 0||n.notifyOnExistenceFilterMismatch(function(u,c,d){var f,h,p,y,S,v;const m={localCacheCount:c,existenceFilterCount:d.count},b=d.unchangedNames;return b&&(m.bloomFilter={applied:u===0,hashCount:(f=b==null?void 0:b.hashCount)!==null&&f!==void 0?f:0,bitmapLength:(y=(p=(h=b==null?void 0:b.bits)===null||h===void 0?void 0:h.bitmap)===null||p===void 0?void 0:p.length)!==null&&y!==void 0?y:0,padding:(v=(S=b==null?void 0:b.bits)===null||S===void 0?void 0:S.padding)!==null&&v!==void 0?v:0}),m}(l,a,t.Vt))}}}}re(t,n){const{unchangedNames:r,count:i}=t.Vt;if(!r||!r.bits)return 1;const{bits:{bitmap:o="",padding:s=0},hashCount:a=0}=r;let l,u;try{l=ka(o).toUint8Array()}catch(c){if(c instanceof yL)return hu("Decoding the base64 bloom filter in existence filter failed ("+c.message+"); ignoring the bloom filter and falling back to full re-query."),1;throw c}try{u=new O_(l,s,a)}catch(c){return hu(c instanceof Ic?"BloomFilter error: ":"Applying bloom filter failed: ",c),1}return u.It===0?1:i!==n-this.oe(t.targetId,u)?2:0}oe(t,n){const r=this.Gt.getRemoteKeysForTarget(t);let i=0;return r.forEach(o=>{const s=this.Gt.ue(),a=`projects/${s.projectId}/databases/${s.database}/documents/${o.path.canonicalString()}`;n.vt(a)||(this.Yt(t,o,null),i++)}),i}ce(t){const n=new Map;this.Qt.forEach((o,s)=>{const a=this.se(s);if(a){if(o.current&&pw(a.target)){const l=new me(a.target.path);this.jt.get(l)!==null||this.ae(s,l)||this.Yt(s,l,Dn.newNoDocument(l,t))}o.Mt&&(n.set(s,o.Ot()),o.Ft())}});let r=Ie();this.zt.forEach((o,s)=>{let a=!0;s.forEachWhile(l=>{const u=this.se(l);return!u||u.purpose==="TargetPurposeLimboResolution"||(a=!1,!1)}),a&&(r=r.add(o))}),this.jt.forEach((o,s)=>s.setReadTime(t));const i=new Hy(t,n,this.Wt,this.jt,r);return this.jt=Ao(),this.zt=oI(),this.Wt=new Ot(Ke),i}Jt(t,n){if(!this.te(t))return;const r=this.ae(t,n.key)?2:0;this.Zt(t).Bt(n.key,r),this.jt=this.jt.insert(n.key,n),this.zt=this.zt.insert(n.key,this.he(n.key).add(t))}Yt(t,n,r){if(!this.te(t))return;const i=this.Zt(t);this.ae(t,n)?i.Bt(n,1):i.Lt(n),this.zt=this.zt.insert(n,this.he(n).delete(t)),r&&(this.jt=this.jt.insert(n,r))}removeTarget(t){this.Qt.delete(t)}ie(t){const n=this.Zt(t).Ot();return this.Gt.getRemoteKeysForTarget(t).size+n.addedDocuments.size-n.removedDocuments.size}qt(t){this.Zt(t).qt()}Zt(t){let n=this.Qt.get(t);return n||(n=new iI,this.Qt.set(t,n)),n}he(t){let n=this.zt.get(t);return n||(n=new Vn(Ke),this.zt=this.zt.insert(t,n)),n}te(t){const n=this.se(t)!==null;return n||fe("WatchChangeAggregator","Detected inactive target",t),n}se(t){const n=this.Qt.get(t);return n&&n.kt?null:this.Gt.le(t)}ee(t){this.Qt.set(t,new iI),this.Gt.getRemoteKeysForTarget(t).forEach(n=>{this.Yt(t,n,null)})}ae(t,n){return this.Gt.getRemoteKeysForTarget(t).has(n)}}function oI(){return new Ot(me.comparator)}function sI(){return new Ot(me.comparator)}const Tce=(()=>({asc:"ASCENDING",desc:"DESCENDING"}))(),Pce=(()=>({"<":"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"}))(),Ice=(()=>({and:"AND",or:"OR"}))();class Ace{constructor(t,n){this.databaseId=t,this.useProto3Json=n}}function yw(e,t){return e.useProto3Json||Fy(t)?t:{value:t}}function Xm(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 VL(e,t){return e.useProto3Json?t.toBase64():t.toUint8Array()}function Rce(e,t){return Xm(e,t.toTimestamp())}function Hi(e){return gt(!!e),_e.fromTimestamp(function(t){const n=Rs(t);return new an(n.seconds,n.nanos)}(e))}function N_(e,t){return function(n){return new Ct(["projects",n.projectId,"databases",n.database])}(e).child("documents").child(t).canonicalString()}function BL(e){const t=Ct.fromString(e);return gt(qL(t)),t}function vw(e,t){return N_(e.databaseId,t.path)}function e1(e,t){const n=BL(t);if(n.get(1)!==e.databaseId.projectId)throw new pe(B.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 pe(B.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new me(UL(n))}function bw(e,t){return N_(e.databaseId,t)}function $ce(e){const t=BL(e);return t.length===4?Ct.emptyPath():UL(t)}function ww(e){return new Ct(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function UL(e){return gt(e.length>4&&e.get(4)==="documents"),e.popFirst(5)}function aI(e,t,n){return{name:vw(e,t),fields:n.value.mapValue.fields}}function Oce(e,t){let n;if("targetChange"in t){t.targetChange;const r=function(l){return l==="NO_CHANGE"?0:l==="ADD"?1:l==="REMOVE"?2:l==="CURRENT"?3:l==="RESET"?4:we()}(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],o=function(l,u){return l.useProto3Json?(gt(u===void 0||typeof u=="string"),Hn.fromBase64String(u||"")):(gt(u===void 0||u instanceof Uint8Array),Hn.fromUint8Array(u||new Uint8Array))}(e,t.targetChange.resumeToken),s=t.targetChange.cause,a=s&&function(l){const u=l.code===void 0?B.UNKNOWN:jL(l.code);return new pe(u,l.message||"")}(s);n=new zL(r,i,o,a||null)}else if("documentChange"in t){t.documentChange;const r=t.documentChange;r.document,r.document.name,r.document.updateTime;const i=e1(e,r.document.name),o=Hi(r.document.updateTime),s=r.document.createTime?Hi(r.document.createTime):_e.min(),a=new Hr({mapValue:{fields:r.document.fields}}),l=Dn.newFoundDocument(i,o,s,a),u=r.targetIds||[],c=r.removedTargetIds||[];n=new Pp(u,c,l.key,l)}else if("documentDelete"in t){t.documentDelete;const r=t.documentDelete;r.document;const i=e1(e,r.document),o=r.readTime?Hi(r.readTime):_e.min(),s=Dn.newNoDocument(i,o),a=r.removedTargetIds||[];n=new Pp([],a,s.key,s)}else if("documentRemove"in t){t.documentRemove;const r=t.documentRemove;r.document;const i=e1(e,r.document),o=r.removedTargetIds||[];n=new Pp([],o,i,null)}else{if(!("filter"in t))return we();{t.filter;const r=t.filter;r.targetId;const{count:i=0,unchangedNames:o}=r,s=new xce(i,o),a=r.targetId;n=new FL(a,s)}}return n}function Nce(e,t){let n;if(t instanceof Uf)n={update:aI(e,t.key,t.value)};else if(t instanceof A_)n={delete:vw(e,t.key)};else if(t instanceof Ma)n={update:aI(e,t.key,t.data),updateMask:Uce(t.fieldMask)};else{if(!(t instanceof bce))return we();n={verify:vw(e,t.key)}}return t.fieldTransforms.length>0&&(n.updateTransforms=t.fieldTransforms.map(r=>function(i,o){const s=o.transform;if(s instanceof Qm)return{fieldPath:o.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(s instanceof Jd)return{fieldPath:o.field.canonicalString(),appendMissingElements:{values:s.elements}};if(s instanceof Zd)return{fieldPath:o.field.canonicalString(),removeAllFromArray:{values:s.elements}};if(s instanceof Ym)return{fieldPath:o.field.canonicalString(),increment:s.gt};throw we()}(0,r))),t.precondition.isNone||(n.currentDocument=function(r,i){return i.updateTime!==void 0?{updateTime:Rce(r,i.updateTime)}:i.exists!==void 0?{exists:i.exists}:we()}(e,t.precondition)),n}function Dce(e,t){return e&&e.length>0?(gt(t!==void 0),e.map(n=>function(r,i){let o=r.updateTime?Hi(r.updateTime):Hi(i);return o.isEqual(_e.min())&&(o=Hi(i)),new gce(o,r.transformResults||[])}(n,t))):[]}function Mce(e,t){return{documents:[bw(e,t.path)]}}function Lce(e,t){const n={structuredQuery:{}},r=t.path;t.collectionGroup!==null?(n.parent=bw(e,r),n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(n.parent=bw(e,r.popLast()),n.structuredQuery.from=[{collectionId:r.lastSegment()}]);const i=function(l){if(l.length!==0)return HL(Ki.create(l,"and"))}(t.filters);i&&(n.structuredQuery.where=i);const o=function(l){if(l.length!==0)return l.map(u=>function(c){return{field:Za(c.field),direction:zce(c.dir)}}(u))}(t.orderBy);o&&(n.structuredQuery.orderBy=o);const s=yw(e,t.limit);var a;return s!==null&&(n.structuredQuery.limit=s),t.startAt&&(n.structuredQuery.startAt={before:(a=t.startAt).inclusive,values:a.position}),t.endAt&&(n.structuredQuery.endAt=function(l){return{before:!l.inclusive,values:l.position}}(t.endAt)),n}function jce(e){let t=$ce(e.parent);const n=e.structuredQuery,r=n.from?n.from.length:0;let i=null;if(r>0){gt(r===1);const c=n.from[0];c.allDescendants?i=c.collectionId:t=t.child(c.collectionId)}let o=[];n.where&&(o=function(c){const d=WL(c);return d instanceof Ki&&SL(d)?d.getFilters():[d]}(n.where));let s=[];n.orderBy&&(s=n.orderBy.map(c=>function(d){return new Zc(el(d.field),function(f){switch(f){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(d.direction))}(c)));let a=null;n.limit&&(a=function(c){let d;return d=typeof c=="object"?c.value:c,Fy(d)?null:d}(n.limit));let l=null;n.startAt&&(l=function(c){const d=!!c.before,f=c.values||[];return new Gm(f,d)}(n.startAt));let u=null;return n.endAt&&(u=function(c){const d=!c.before,f=c.values||[];return new Gm(f,d)}(n.endAt)),tce(t,i,s,o,a,"F",l,u)}function Fce(e,t){const n=function(r){switch(r){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return we()}}(t.purpose);return n==null?null:{"goog-listen-tags":n}}function WL(e){return e.unaryFilter!==void 0?function(t){switch(t.unaryFilter.op){case"IS_NAN":const n=el(t.unaryFilter.field);return on.create(n,"==",{doubleValue:NaN});case"IS_NULL":const r=el(t.unaryFilter.field);return on.create(r,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const i=el(t.unaryFilter.field);return on.create(i,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const o=el(t.unaryFilter.field);return on.create(o,"!=",{nullValue:"NULL_VALUE"});default:return we()}}(e):e.fieldFilter!==void 0?function(t){return on.create(el(t.fieldFilter.field),function(n){switch(n){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";default:return we()}}(t.fieldFilter.op),t.fieldFilter.value)}(e):e.compositeFilter!==void 0?function(t){return Ki.create(t.compositeFilter.filters.map(n=>WL(n)),function(n){switch(n){case"AND":return"and";case"OR":return"or";default:return we()}}(t.compositeFilter.op))}(e):we()}function zce(e){return Tce[e]}function Vce(e){return Pce[e]}function Bce(e){return Ice[e]}function Za(e){return{fieldPath:e.canonicalString()}}function el(e){return Mn.fromServerFormat(e.fieldPath)}function HL(e){return e instanceof on?function(t){if(t.op==="=="){if(KP(t.value))return{unaryFilter:{field:Za(t.field),op:"IS_NAN"}};if(qP(t.value))return{unaryFilter:{field:Za(t.field),op:"IS_NULL"}}}else if(t.op==="!="){if(KP(t.value))return{unaryFilter:{field:Za(t.field),op:"IS_NOT_NAN"}};if(qP(t.value))return{unaryFilter:{field:Za(t.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Za(t.field),op:Vce(t.op),value:t.value}}}(e):e instanceof Ki?function(t){const n=t.getFilters().map(r=>HL(r));return n.length===1?n[0]:{compositeFilter:{op:Bce(t.op),filters:n}}}(e):we()}function Uce(e){const t=[];return e.fields.forEach(n=>t.push(n.canonicalString())),{fieldPaths:t}}function qL(e){return e.length>=4&&e.get(0)==="projects"&&e.get(2)==="databases"}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class ss{constructor(t,n,r,i,o=_e.min(),s=_e.min(),a=Hn.EMPTY_BYTE_STRING,l=null){this.target=t,this.targetId=n,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=o,this.lastLimboFreeSnapshotVersion=s,this.resumeToken=a,this.expectedCount=l}withSequenceNumber(t){return new ss(this.target,this.targetId,this.purpose,t,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(t,n){return new ss(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,t,null)}withExpectedCount(t){return new ss(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,t)}withLastLimboFreeSnapshotVersion(t){return new ss(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,t,this.resumeToken,this.expectedCount)}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Wce{constructor(t){this.fe=t}}function Hce(e){const t=jce({parent:e.parent,structuredQuery:e.structuredQuery});return e.limitType==="LAST"?mw(t,t.limit,"L"):t}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class qce{constructor(){this.rn=new Kce}addToCollectionParentIndex(t,n){return this.rn.add(n),H.resolve()}getCollectionParents(t,n){return H.resolve(this.rn.getEntries(n))}addFieldIndex(t,n){return H.resolve()}deleteFieldIndex(t,n){return H.resolve()}getDocumentsMatchingTarget(t,n){return H.resolve(null)}getIndexType(t,n){return H.resolve(0)}getFieldIndexes(t,n){return H.resolve([])}getNextCollectionGroupToUpdate(t){return H.resolve(null)}getMinOffset(t,n){return H.resolve(As.min())}getMinOffsetFromCollectionGroup(t,n){return H.resolve(As.min())}updateCollectionGroup(t,n,r){return H.resolve()}updateIndexEntries(t,n){return H.resolve()}}class Kce{constructor(){this.index={}}add(t){const n=t.lastSegment(),r=t.popLast(),i=this.index[n]||new Vn(Ct.comparator),o=!i.has(r);return this.index[n]=i.add(r),o}has(t){const n=t.lastSegment(),r=t.popLast(),i=this.index[n];return i&&i.has(r)}getEntries(t){return(this.index[t]||new Vn(Ct.comparator)).toArray()}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class yu{constructor(t){this.Nn=t}next(){return this.Nn+=2,this.Nn}static kn(){return new yu(0)}static Mn(){return new yu(-1)}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Gce{constructor(){this.changes=new Fu(t=>t.toString(),(t,n)=>t.isEqual(n)),this.changesApplied=!1}addEntry(t){this.assertNotApplied(),this.changes.set(t.key,t)}removeEntry(t,n){this.assertNotApplied(),this.changes.set(t,Dn.newInvalidDocument(t).setReadTime(n))}getEntry(t,n){this.assertNotApplied();const r=this.changes.get(n);return r!==void 0?H.resolve(r):this.getFromCache(t,n)}getEntries(t,n){return this.getAllFromCache(t,n)}apply(t){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(t)}assertNotApplied(){}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *//**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Qce{constructor(t,n){this.overlayedDocument=t,this.mutatedFields=n}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Yce{constructor(t,n,r,i){this.remoteDocumentCache=t,this.mutationQueue=n,this.documentOverlayCache=r,this.indexManager=i}getDocument(t,n){let r=null;return this.documentOverlayCache.getOverlay(t,n).next(i=>(r=i,this.remoteDocumentCache.getEntry(t,n))).next(i=>(r!==null&&td(r.mutation,i,di.empty(),an.now()),i))}getDocuments(t,n){return this.remoteDocumentCache.getEntries(t,n).next(r=>this.getLocalViewOfDocuments(t,r,Ie()).next(()=>r))}getLocalViewOfDocuments(t,n,r=Ie()){const i=sa();return this.populateOverlays(t,i,n).next(()=>this.computeViews(t,n,i,r).next(o=>{let s=Pc();return o.forEach((a,l)=>{s=s.insert(a,l.overlayedDocument)}),s}))}getOverlayedDocuments(t,n){const r=sa();return this.populateOverlays(t,r,n).next(()=>this.computeViews(t,n,r,Ie()))}populateOverlays(t,n,r){const i=[];return r.forEach(o=>{n.has(o)||i.push(o)}),this.documentOverlayCache.getOverlays(t,i).next(o=>{o.forEach((s,a)=>{n.set(s,a)})})}computeViews(t,n,r,i){let o=Ao();const s=ed(),a=ed();return n.forEach((l,u)=>{const c=r.get(u.key);i.has(u.key)&&(c===void 0||c.mutation instanceof Ma)?o=o.insert(u.key,u):c!==void 0?(s.set(u.key,c.mutation.getFieldMask()),td(c.mutation,u,c.mutation.getFieldMask(),an.now())):s.set(u.key,di.empty())}),this.recalculateAndSaveOverlays(t,o).next(l=>(l.forEach((u,c)=>s.set(u,c)),n.forEach((u,c)=>{var d;return a.set(u,new Qce(c,(d=s.get(u))!==null&&d!==void 0?d:null))}),a))}recalculateAndSaveOverlays(t,n){const r=ed();let i=new Ot((s,a)=>s-a),o=Ie();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(t,n).next(s=>{for(const a of s)a.keys().forEach(l=>{const u=n.get(l);if(u===null)return;let c=r.get(l)||di.empty();c=a.applyToLocalView(u,c),r.set(l,c);const d=(i.get(a.batchId)||Ie()).add(l);i=i.insert(a.batchId,d)})}).next(()=>{const s=[],a=i.getReverseIterator();for(;a.hasNext();){const l=a.getNext(),u=l.key,c=l.value,d=IL();c.forEach(f=>{if(!o.has(f)){const h=ML(n.get(f),r.get(f));h!==null&&d.set(f,h),o=o.add(f)}}),s.push(this.documentOverlayCache.saveOverlays(t,u,d))}return H.waitFor(s)}).next(()=>r)}recalculateAndSaveOverlaysForDocumentKeys(t,n){return this.remoteDocumentCache.getEntries(t,n).next(r=>this.recalculateAndSaveOverlays(t,r))}getDocumentsMatchingQuery(t,n,r){return function(i){return me.isDocumentKey(i.path)&&i.collectionGroup===null&&i.filters.length===0}(n)?this.getDocumentsMatchingDocumentQuery(t,n.path):ice(n)?this.getDocumentsMatchingCollectionGroupQuery(t,n,r):this.getDocumentsMatchingCollectionQuery(t,n,r)}getNextDocuments(t,n,r,i){return this.remoteDocumentCache.getAllFromCollectionGroup(t,n,r,i).next(o=>{const s=i-o.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(t,n,r.largestBatchId,i-o.size):H.resolve(sa());let a=-1,l=o;return s.next(u=>H.forEach(u,(c,d)=>(a<d.largestBatchId&&(a=d.largestBatchId),o.get(c)?H.resolve():this.remoteDocumentCache.getEntry(t,c).next(f=>{l=l.insert(c,f)}))).next(()=>this.populateOverlays(t,u,o)).next(()=>this.computeViews(t,l,u,Ie())).next(c=>({batchId:a,changes:PL(c)})))})}getDocumentsMatchingDocumentQuery(t,n){return this.getDocument(t,new me(n)).next(r=>{let i=Pc();return r.isFoundDocument()&&(i=i.insert(r.key,r)),i})}getDocumentsMatchingCollectionGroupQuery(t,n,r){const i=n.collectionGroup;let o=Pc();return this.indexManager.getCollectionParents(t,i).next(s=>H.forEach(s,a=>{const l=function(u,c){return new zy(c,null,u.explicitOrderBy.slice(),u.filters.slice(),u.limit,u.limitType,u.startAt,u.endAt)}(n,a.child(i));return this.getDocumentsMatchingCollectionQuery(t,l,r).next(u=>{u.forEach((c,d)=>{o=o.insert(c,d)})})}).next(()=>o))}getDocumentsMatchingCollectionQuery(t,n,r){let i;return this.documentOverlayCache.getOverlaysForCollection(t,n.path,r.largestBatchId).next(o=>(i=o,this.remoteDocumentCache.getDocumentsMatchingQuery(t,n,r,i))).next(o=>{i.forEach((a,l)=>{const u=l.getKey();o.get(u)===null&&(o=o.insert(u,Dn.newInvalidDocument(u)))});let s=Pc();return o.forEach((a,l)=>{const u=i.get(a);u!==void 0&&td(u.mutation,l,di.empty(),an.now()),By(n,l)&&(s=s.insert(a,l))}),s})}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Xce{constructor(t){this.serializer=t,this.cs=new Map,this.hs=new Map}getBundleMetadata(t,n){return H.resolve(this.cs.get(n))}saveBundleMetadata(t,n){var r;return this.cs.set(n.id,{id:(r=n).id,version:r.version,createTime:Hi(r.createTime)}),H.resolve()}getNamedQuery(t,n){return H.resolve(this.hs.get(n))}saveNamedQuery(t,n){return this.hs.set(n.name,function(r){return{name:r.name,query:Hce(r.bundledQuery),readTime:Hi(r.readTime)}}(n)),H.resolve()}}/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Jce{constructor(){this.overlays=new Ot(me.comparator),this.ls=new Map}getOverlay(t,n){return H.resolve(this.overlays.get(n))}getOverlays(t,n){const r=sa();return H.forEach(n,i=>this.getOverlay(t,i).next(o=>{o!==null&&r.set(i,o)})).next(()=>r)}saveOverlays(t,n,r){return r.forEach((i,o)=>{this.we(t,n,o)}),H.resolve()}removeOverlaysForBatchId(t,n,r){const i=this.ls.get(r);return i!==void 0&&(i.forEach(o=>this.overlays=this.overlays.remove(o)),this.ls.delete(r)),H.resolve()}getOverlaysForCollection(t,n,r){const i=sa(),o=n.length+1,s=new me(n.child("")),a=this.overlays.getIteratorFrom(s);for(;a.hasNext();){const l=a.getNext().value,u=l.getKey();if(!n.isPrefixOf(u.path))break;u.path.length===o&&l.largestBatchId>r&&i.set(l.getKey(),l)}return H.resolve(i)}getOverlaysForCollectionGroup(t,n,r,i){let o=new Ot((u,c)=>u-c);const s=this.overlays.getIterator();for(;s.hasNext();){const u=s.getNext().value;if(u.getKey().getCollectionGroup()===n&&u.largestBatchId>r){let c=o.get(u.largestBatchId);c===null&&(c=sa(),o=o.insert(u.largestBatchId,c)),c.set(u.getKey(),u)}}const a=sa(),l=o.getIterator();for(;l.hasNext()&&(l.getNext().value.forEach((u,c)=>a.set(u,c)),!(a.size()>=i)););return H.resolve(a)}we(t,n,r){const i=this.overlays.get(r.key);if(i!==null){const s=this.ls.get(i.largestBatchId).delete(r.key);this.ls.set(i.largestBatchId,s)}this.overlays=this.overlays.insert(r.key,new Sce(n,r));let o=this.ls.get(n);o===void 0&&(o=Ie(),this.ls.set(n,o)),this.ls.set(n,o.add(r.key))}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class D_{constructor(){this.fs=new Vn(fn.ds),this.ws=new Vn(fn._s)}isEmpty(){return this.fs.isEmpty()}addReference(t,n){const r=new fn(t,n);this.fs=this.fs.add(r),this.ws=this.ws.add(r)}gs(t,n){t.forEach(r=>this.addReference(r,n))}removeReference(t,n){this.ys(new fn(t,n))}ps(t,n){t.forEach(r=>this.removeReference(r,n))}Is(t){const n=new me(new Ct([])),r=new fn(n,t),i=new fn(n,t+1),o=[];return this.ws.forEachInRange([r,i],s=>{this.ys(s),o.push(s.key)}),o}Ts(){this.fs.forEach(t=>this.ys(t))}ys(t){this.fs=this.fs.delete(t),this.ws=this.ws.delete(t)}Es(t){const n=new me(new Ct([])),r=new fn(n,t),i=new fn(n,t+1);let o=Ie();return this.ws.forEachInRange([r,i],s=>{o=o.add(s.key)}),o}containsKey(t){const n=new fn(t,0),r=this.fs.firstAfterOrEqual(n);return r!==null&&t.isEqual(r.key)}}class fn{constructor(t,n){this.key=t,this.As=n}static ds(t,n){return me.comparator(t.key,n.key)||Ke(t.As,n.As)}static _s(t,n){return Ke(t.As,n.As)||me.comparator(t.key,n.key)}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Zce{constructor(t,n){this.indexManager=t,this.referenceDelegate=n,this.mutationQueue=[],this.vs=1,this.Rs=new Vn(fn.ds)}checkEmpty(t){return H.resolve(this.mutationQueue.length===0)}addMutationBatch(t,n,r,i){const o=this.vs;this.vs++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const s=new wce(o,n,r,i);this.mutationQueue.push(s);for(const a of i)this.Rs=this.Rs.add(new fn(a.key,o)),this.indexManager.addToCollectionParentIndex(t,a.key.path.popLast());return H.resolve(s)}lookupMutationBatch(t,n){return H.resolve(this.Ps(n))}getNextMutationBatchAfterBatchId(t,n){const r=n+1,i=this.bs(r),o=i<0?0:i;return H.resolve(this.mutationQueue.length>o?this.mutationQueue[o]:null)}getHighestUnacknowledgedBatchId(){return H.resolve(this.mutationQueue.length===0?-1:this.vs-1)}getAllMutationBatches(t){return H.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(t,n){const r=new fn(n,0),i=new fn(n,Number.POSITIVE_INFINITY),o=[];return this.Rs.forEachInRange([r,i],s=>{const a=this.Ps(s.As);o.push(a)}),H.resolve(o)}getAllMutationBatchesAffectingDocumentKeys(t,n){let r=new Vn(Ke);return n.forEach(i=>{const o=new fn(i,0),s=new fn(i,Number.POSITIVE_INFINITY);this.Rs.forEachInRange([o,s],a=>{r=r.add(a.As)})}),H.resolve(this.Vs(r))}getAllMutationBatchesAffectingQuery(t,n){const r=n.path,i=r.length+1;let o=r;me.isDocumentKey(o)||(o=o.child(""));const s=new fn(new me(o),0);let a=new Vn(Ke);return this.Rs.forEachWhile(l=>{const u=l.key.path;return!!r.isPrefixOf(u)&&(u.length===i&&(a=a.add(l.As)),!0)},s),H.resolve(this.Vs(a))}Vs(t){const n=[];return t.forEach(r=>{const i=this.Ps(r);i!==null&&n.push(i)}),n}removeMutationBatch(t,n){gt(this.Ss(n.batchId,"removed")===0),this.mutationQueue.shift();let r=this.Rs;return H.forEach(n.mutations,i=>{const o=new fn(i.key,n.batchId);return r=r.delete(o),this.referenceDelegate.markPotentiallyOrphaned(t,i.key)}).next(()=>{this.Rs=r})}Cn(t){}containsKey(t,n){const r=new fn(n,0),i=this.Rs.firstAfterOrEqual(r);return H.resolve(n.isEqual(i&&i.key))}performConsistencyCheck(t){return this.mutationQueue.length,H.resolve()}Ss(t,n){return this.bs(t)}bs(t){return this.mutationQueue.length===0?0:t-this.mutationQueue[0].batchId}Ps(t){const n=this.bs(t);return n<0||n>=this.mutationQueue.length?null:this.mutationQueue[n]}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class ede{constructor(t){this.Ds=t,this.docs=new Ot(me.comparator),this.size=0}setIndexManager(t){this.indexManager=t}addEntry(t,n){const r=n.key,i=this.docs.get(r),o=i?i.size:0,s=this.Ds(n);return this.docs=this.docs.insert(r,{document:n.mutableCopy(),size:s}),this.size+=s-o,this.indexManager.addToCollectionParentIndex(t,r.path.popLast())}removeEntry(t){const n=this.docs.get(t);n&&(this.docs=this.docs.remove(t),this.size-=n.size)}getEntry(t,n){const r=this.docs.get(n);return H.resolve(r?r.document.mutableCopy():Dn.newInvalidDocument(n))}getEntries(t,n){let r=Ao();return n.forEach(i=>{const o=this.docs.get(i);r=r.insert(i,o?o.document.mutableCopy():Dn.newInvalidDocument(i))}),H.resolve(r)}getDocumentsMatchingQuery(t,n,r,i){let o=Ao();const s=n.path,a=new me(s.child("")),l=this.docs.getIteratorFrom(a);for(;l.hasNext();){const{key:u,value:{document:c}}=l.getNext();if(!s.isPrefixOf(u.path))break;u.path.length>s.length+1||jue(Lue(c),r)<=0||(i.has(c.key)||By(n,c))&&(o=o.insert(c.key,c.mutableCopy()))}return H.resolve(o)}getAllFromCollectionGroup(t,n,r,i){we()}Cs(t,n){return H.forEach(this.docs,r=>n(r))}newChangeBuffer(t){return new tde(this)}getSize(t){return H.resolve(this.size)}}class tde extends Gce{constructor(t){super(),this.os=t}applyChanges(t){const n=[];return this.changes.forEach((r,i)=>{i.isValidDocument()?n.push(this.os.addEntry(t,i)):this.os.removeEntry(r)}),H.waitFor(n)}getFromCache(t,n){return this.os.getEntry(t,n)}getAllFromCache(t,n){return this.os.getEntries(t,n)}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class nde{constructor(t){this.persistence=t,this.xs=new Fu(n=>T_(n),P_),this.lastRemoteSnapshotVersion=_e.min(),this.highestTargetId=0,this.Ns=0,this.ks=new D_,this.targetCount=0,this.Ms=yu.kn()}forEachTarget(t,n){return this.xs.forEach((r,i)=>n(i)),H.resolve()}getLastRemoteSnapshotVersion(t){return H.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(t){return H.resolve(this.Ns)}allocateTargetId(t){return this.highestTargetId=this.Ms.next(),H.resolve(this.highestTargetId)}setTargetsMetadata(t,n,r){return r&&(this.lastRemoteSnapshotVersion=r),n>this.Ns&&(this.Ns=n),H.resolve()}Fn(t){this.xs.set(t.target,t);const n=t.targetId;n>this.highestTargetId&&(this.Ms=new yu(n),this.highestTargetId=n),t.sequenceNumber>this.Ns&&(this.Ns=t.sequenceNumber)}addTargetData(t,n){return this.Fn(n),this.targetCount+=1,H.resolve()}updateTargetData(t,n){return this.Fn(n),H.resolve()}removeTargetData(t,n){return this.xs.delete(n.target),this.ks.Is(n.targetId),this.targetCount-=1,H.resolve()}removeTargets(t,n,r){let i=0;const o=[];return this.xs.forEach((s,a)=>{a.sequenceNumber<=n&&r.get(a.targetId)===null&&(this.xs.delete(s),o.push(this.removeMatchingKeysForTargetId(t,a.targetId)),i++)}),H.waitFor(o).next(()=>i)}getTargetCount(t){return H.resolve(this.targetCount)}getTargetData(t,n){const r=this.xs.get(n)||null;return H.resolve(r)}addMatchingKeys(t,n,r){return this.ks.gs(n,r),H.resolve()}removeMatchingKeys(t,n,r){this.ks.ps(n,r);const i=this.persistence.referenceDelegate,o=[];return i&&n.forEach(s=>{o.push(i.markPotentiallyOrphaned(t,s))}),H.waitFor(o)}removeMatchingKeysForTargetId(t,n){return this.ks.Is(n),H.resolve()}getMatchingKeysForTargetId(t,n){const r=this.ks.Es(n);return H.resolve(r)}containsKey(t,n){return H.resolve(this.ks.containsKey(n))}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class rde{constructor(t,n){this.$s={},this.overlays={},this.Os=new __(0),this.Fs=!1,this.Fs=!0,this.referenceDelegate=t(this),this.Bs=new nde(this),this.indexManager=new qce,this.remoteDocumentCache=function(r){return new ede(r)}(r=>this.referenceDelegate.Ls(r)),this.serializer=new Wce(n),this.qs=new Xce(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.Fs=!1,Promise.resolve()}get started(){return this.Fs}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(t){return this.indexManager}getDocumentOverlayCache(t){let n=this.overlays[t.toKey()];return n||(n=new Jce,this.overlays[t.toKey()]=n),n}getMutationQueue(t,n){let r=this.$s[t.toKey()];return r||(r=new Zce(n,this.referenceDelegate),this.$s[t.toKey()]=r),r}getTargetCache(){return this.Bs}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.qs}runTransaction(t,n,r){fe("MemoryPersistence","Starting transaction:",t);const i=new ide(this.Os.next());return this.referenceDelegate.Us(),r(i).next(o=>this.referenceDelegate.Ks(i).next(()=>o)).toPromise().then(o=>(i.raiseOnCommittedEvent(),o))}Gs(t,n){return H.or(Object.values(this.$s).map(r=>()=>r.containsKey(t,n)))}}class ide extends zue{constructor(t){super(),this.currentSequenceNumber=t}}class M_{constructor(t){this.persistence=t,this.Qs=new D_,this.js=null}static zs(t){return new M_(t)}get Ws(){if(this.js)return this.js;throw we()}addReference(t,n,r){return this.Qs.addReference(r,n),this.Ws.delete(r.toString()),H.resolve()}removeReference(t,n,r){return this.Qs.removeReference(r,n),this.Ws.add(r.toString()),H.resolve()}markPotentiallyOrphaned(t,n){return this.Ws.add(n.toString()),H.resolve()}removeTarget(t,n){this.Qs.Is(n.targetId).forEach(i=>this.Ws.add(i.toString()));const r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(t,n.targetId).next(i=>{i.forEach(o=>this.Ws.add(o.toString()))}).next(()=>r.removeTargetData(t,n))}Us(){this.js=new Set}Ks(t){const n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return H.forEach(this.Ws,r=>{const i=me.fromPath(r);return this.Hs(t,i).next(o=>{o||n.removeEntry(i,_e.min())})}).next(()=>(this.js=null,n.apply(t)))}updateLimboDocument(t,n){return this.Hs(t,n).next(r=>{r?this.Ws.delete(n.toString()):this.Ws.add(n.toString())})}Ls(t){return 0}Hs(t,n){return H.or([()=>H.resolve(this.Qs.containsKey(n)),()=>this.persistence.getTargetCache().containsKey(t,n),()=>this.persistence.Gs(t,n)])}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class L_{constructor(t,n,r,i){this.targetId=t,this.fromCache=n,this.Fi=r,this.Bi=i}static Li(t,n){let r=Ie(),i=Ie();for(const o of n.docChanges)switch(o.type){case 0:r=r.add(o.doc.key);break;case 1:i=i.add(o.doc.key)}return new L_(t,n.fromCache,r,i)}}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class ode{constructor(){this.qi=!1}initialize(t,n){this.Ui=t,this.indexManager=n,this.qi=!0}getDocumentsMatchingQuery(t,n,r,i){return this.Ki(t,n).next(o=>o||this.Gi(t,n,i,r)).next(o=>o||this.Qi(t,n))}Ki(t,n){if(XP(n))return H.resolve(null);let r=Io(n);return this.indexManager.getIndexType(t,r).next(i=>i===0?null:(n.limit!==null&&i===1&&(n=mw(n,null,"F"),r=Io(n)),this.indexManager.getDocumentsMatchingTarget(t,r).next(o=>{const s=Ie(...o);return this.Ui.getDocuments(t,s).next(a=>this.indexManager.getMinOffset(t,r).next(l=>{const u=this.ji(n,a);return this.zi(n,u,s,l.readTime)?this.Ki(t,mw(n,null,"F")):this.Wi(t,u,n,l)}))})))}Gi(t,n,r,i){return XP(n)||i.isEqual(_e.min())?this.Qi(t,n):this.Ui.getDocuments(t,r).next(o=>{const s=this.ji(n,o);return this.zi(n,s,r,i)?this.Qi(t,n):(BP()<=Be.DEBUG&&fe("QueryEngine","Re-using previous result from %s to execute query: %s",i.toString(),gw(n)),this.Wi(t,s,n,Mue(i,-1)))})}ji(t,n){let r=new Vn(kL(t));return n.forEach((i,o)=>{By(t,o)&&(r=r.add(o))}),r}zi(t,n,r,i){if(t.limit===null)return!1;if(r.size!==n.size)return!0;const o=t.limitType==="F"?n.last():n.first();return!!o&&(o.hasPendingWrites||o.version.compareTo(i)>0)}Qi(t,n){return BP()<=Be.DEBUG&&fe("QueryEngine","Using full collection scan to execute query:",gw(n)),this.Ui.getDocumentsMatchingQuery(t,n,As.min())}Wi(t,n,r,i){return this.Ui.getDocumentsMatchingQuery(t,r,i).next(o=>(n.forEach(s=>{o=o.insert(s.key,s)}),o))}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class sde{constructor(t,n,r,i){this.persistence=t,this.Hi=n,this.serializer=i,this.Ji=new Ot(Ke),this.Yi=new Fu(o=>T_(o),P_),this.Xi=new Map,this.Zi=t.getRemoteDocumentCache(),this.Bs=t.getTargetCache(),this.qs=t.getBundleCache(),this.tr(r)}tr(t){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(t),this.indexManager=this.persistence.getIndexManager(t),this.mutationQueue=this.persistence.getMutationQueue(t,this.indexManager),this.localDocuments=new Yce(this.Zi,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Zi.setIndexManager(this.indexManager),this.Hi.initialize(this.localDocuments,this.indexManager)}collectGarbage(t){return this.persistence.runTransaction("Collect garbage","readwrite-primary",n=>t.collect(n,this.Ji))}}function ade(e,t,n,r){return new sde(e,t,n,r)}async function KL(e,t){const n=Ee(e);return await n.persistence.runTransaction("Handle user change","readonly",r=>{let i;return n.mutationQueue.getAllMutationBatches(r).next(o=>(i=o,n.tr(t),n.mutationQueue.getAllMutationBatches(r))).next(o=>{const s=[],a=[];let l=Ie();for(const u of i){s.push(u.batchId);for(const c of u.mutations)l=l.add(c.key)}for(const u of o){a.push(u.batchId);for(const c of u.mutations)l=l.add(c.key)}return n.localDocuments.getDocuments(r,l).next(u=>({er:u,removedBatchIds:s,addedBatchIds:a}))})})}function lde(e,t){const n=Ee(e);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",r=>{const i=t.batch.keys(),o=n.Zi.newChangeBuffer({trackRemovals:!0});return function(s,a,l,u){const c=l.batch,d=c.keys();let f=H.resolve();return d.forEach(h=>{f=f.next(()=>u.getEntry(a,h)).next(p=>{const y=l.docVersions.get(h);gt(y!==null),p.version.compareTo(y)<0&&(c.applyToRemoteDocument(p,l),p.isValidDocument()&&(p.setReadTime(l.commitVersion),u.addEntry(p)))})}),f.next(()=>s.mutationQueue.removeMutationBatch(a,c))}(n,r,t,o).next(()=>o.apply(r)).next(()=>n.mutationQueue.performConsistencyCheck(r)).next(()=>n.documentOverlayCache.removeOverlaysForBatchId(r,i,t.batch.batchId)).next(()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(r,function(s){let a=Ie();for(let l=0;l<s.mutationResults.length;++l)s.mutationResults[l].transformResults.length>0&&(a=a.add(s.batch.mutations[l].key));return a}(t))).next(()=>n.localDocuments.getDocuments(r,i))})}function GL(e){const t=Ee(e);return t.persistence.runTransaction("Get last remote snapshot version","readonly",n=>t.Bs.getLastRemoteSnapshotVersion(n))}function ude(e,t){const n=Ee(e),r=t.snapshotVersion;let i=n.Ji;return n.persistence.runTransaction("Apply remote event","readwrite-primary",o=>{const s=n.Zi.newChangeBuffer({trackRemovals:!0});i=n.Ji;const a=[];t.targetChanges.forEach((c,d)=>{const f=i.get(d);if(!f)return;a.push(n.Bs.removeMatchingKeys(o,c.removedDocuments,d).next(()=>n.Bs.addMatchingKeys(o,c.addedDocuments,d)));let h=f.withSequenceNumber(o.currentSequenceNumber);t.targetMismatches.get(d)!==null?h=h.withResumeToken(Hn.EMPTY_BYTE_STRING,_e.min()).withLastLimboFreeSnapshotVersion(_e.min()):c.resumeToken.approximateByteSize()>0&&(h=h.withResumeToken(c.resumeToken,r)),i=i.insert(d,h),function(p,y,S){return p.resumeToken.approximateByteSize()===0||y.snapshotVersion.toMicroseconds()-p.snapshotVersion.toMicroseconds()>=3e8?!0:S.addedDocuments.size+S.modifiedDocuments.size+S.removedDocuments.size>0}(f,h,c)&&a.push(n.Bs.updateTargetData(o,h))});let l=Ao(),u=Ie();if(t.documentUpdates.forEach(c=>{t.resolvedLimboDocuments.has(c)&&a.push(n.persistence.referenceDelegate.updateLimboDocument(o,c))}),a.push(cde(o,s,t.documentUpdates).next(c=>{l=c.nr,u=c.sr})),!r.isEqual(_e.min())){const c=n.Bs.getLastRemoteSnapshotVersion(o).next(d=>n.Bs.setTargetsMetadata(o,o.currentSequenceNumber,r));a.push(c)}return H.waitFor(a).next(()=>s.apply(o)).next(()=>n.localDocuments.getLocalViewOfDocuments(o,l,u)).next(()=>l)}).then(o=>(n.Ji=i,o))}function cde(e,t,n){let r=Ie(),i=Ie();return n.forEach(o=>r=r.add(o)),t.getEntries(e,r).next(o=>{let s=Ao();return n.forEach((a,l)=>{const u=o.get(a);l.isFoundDocument()!==u.isFoundDocument()&&(i=i.add(a)),l.isNoDocument()&&l.version.isEqual(_e.min())?(t.removeEntry(a,l.readTime),s=s.insert(a,l)):!u.isValidDocument()||l.version.compareTo(u.version)>0||l.version.compareTo(u.version)===0&&u.hasPendingWrites?(t.addEntry(l),s=s.insert(a,l)):fe("LocalStore","Ignoring outdated watch update for ",a,". Current version:",u.version," Watch version:",l.version)}),{nr:s,sr:i}})}function dde(e,t){const n=Ee(e);return n.persistence.runTransaction("Get next mutation batch","readonly",r=>(t===void 0&&(t=-1),n.mutationQueue.getNextMutationBatchAfterBatchId(r,t)))}function fde(e,t){const n=Ee(e);return n.persistence.runTransaction("Allocate target","readwrite",r=>{let i;return n.Bs.getTargetData(r,t).next(o=>o?(i=o,H.resolve(i)):n.Bs.allocateTargetId(r).next(s=>(i=new ss(t,s,"TargetPurposeListen",r.currentSequenceNumber),n.Bs.addTargetData(r,i).next(()=>i))))}).then(r=>{const i=n.Ji.get(r.targetId);return(i===null||r.snapshotVersion.compareTo(i.snapshotVersion)>0)&&(n.Ji=n.Ji.insert(r.targetId,r),n.Yi.set(t,r.targetId)),r})}async function Sw(e,t,n){const r=Ee(e),i=r.Ji.get(t),o=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",o,s=>r.persistence.referenceDelegate.removeTarget(s,i))}catch(s){if(!Bf(s))throw s;fe("LocalStore",`Failed to update sequence numbers for target ${t}: ${s}`)}r.Ji=r.Ji.remove(t),r.Yi.delete(i.target)}function lI(e,t,n){const r=Ee(e);let i=_e.min(),o=Ie();return r.persistence.runTransaction("Execute query","readonly",s=>function(a,l,u){const c=Ee(a),d=c.Yi.get(u);return d!==void 0?H.resolve(c.Ji.get(d)):c.Bs.getTargetData(l,u)}(r,s,Io(t)).next(a=>{if(a)return i=a.lastLimboFreeSnapshotVersion,r.Bs.getMatchingKeysForTargetId(s,a.targetId).next(l=>{o=l})}).next(()=>r.Hi.getDocumentsMatchingQuery(s,t,n?i:_e.min(),n?o:Ie())).next(a=>(hde(r,oce(t),a),{documents:a,ir:o})))}function hde(e,t,n){let r=e.Xi.get(t)||_e.min();n.forEach((i,o)=>{o.readTime.compareTo(r)>0&&(r=o.readTime)}),e.Xi.set(t,r)}class uI{constructor(){this.activeTargetIds=dce()}lr(t){this.activeTargetIds=this.activeTargetIds.add(t)}dr(t){this.activeTargetIds=this.activeTargetIds.delete(t)}hr(){const t={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(t)}}class pde{constructor(){this.Hr=new uI,this.Jr={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(t){}updateMutationState(t,n,r){}addLocalQueryTarget(t){return this.Hr.lr(t),this.Jr[t]||"not-current"}updateQueryState(t,n,r){this.Jr[t]=n}removeLocalQueryTarget(t){this.Hr.dr(t)}isLocalQueryTarget(t){return this.Hr.activeTargetIds.has(t)}clearQueryState(t){delete this.Jr[t]}getAllActiveQueryTargets(){return this.Hr.activeTargetIds}isActiveQueryTarget(t){return this.Hr.activeTargetIds.has(t)}start(){return this.Hr=new uI,Promise.resolve()}handleUserChange(t,n,r){}setOnlineState(t){}shutdown(){}writeSequenceNumber(t){}notifyBundleLoaded(t){}}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class mde{Yr(t){}shutdown(){}}/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class cI{constructor(){this.Xr=()=>this.Zr(),this.eo=()=>this.no(),this.so=[],this.io()}Yr(t){this.so.push(t)}shutdown(){window.removeEventListener("online",this.Xr),window.removeEventListener("offline",this.eo)}io(){window.addEventListener("online",this.Xr),window.addEventListener("offline",this.eo)}Zr(){fe("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const t of this.so)t(0)}no(){fe("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const t of this.so)t(1)}static D(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}}/**
 * @license
 * Copyright 2023 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */let Fh=null;function t1(){return Fh===null?Fh=268435456+Math.round(2147483648*Math.random()):Fh++,"0x"+Fh.toString(16)}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const gde={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class yde{constructor(t){this.ro=t.ro,this.oo=t.oo}uo(t){this.co=t}ao(t){this.ho=t}onMessage(t){this.lo=t}close(){this.oo()}send(t){this.ro(t)}fo(){this.co()}wo(t){this.ho(t)}_o(t){this.lo(t)}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const An="WebChannelConnection";class vde extends class{constructor(t){this.databaseInfo=t,this.databaseId=t.databaseId;const n=t.ssl?"https":"http";this.mo=n+"://"+t.host,this.yo="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}get po(){return!1}Io(t,n,r,i,o){const s=t1(),a=this.To(t,n);fe("RestConnection",`Sending RPC '${t}' ${s}:`,a,r);const l={};return this.Eo(l,i,o),this.Ao(t,a,l,r).then(u=>(fe("RestConnection",`Received RPC '${t}' ${s}: `,u),u),u=>{throw hu("RestConnection",`RPC '${t}' ${s} failed with error: `,u,"url: ",a,"request:",r),u})}vo(t,n,r,i,o,s){return this.Io(t,n,r,i,o)}Eo(t,n,r){t["X-Goog-Api-Client"]="gl-js/ fire/"+Lu,t["Content-Type"]="text/plain",this.databaseInfo.appId&&(t["X-Firebase-GMPID"]=this.databaseInfo.appId),n&&n.headers.forEach((i,o)=>t[o]=i),r&&r.headers.forEach((i,o)=>t[o]=i)}To(t,n){const r=gde[t];return`${this.mo}/v1/${n}:${r}`}}{constructor(t){super(t),this.forceLongPolling=t.forceLongPolling,this.autoDetectLongPolling=t.autoDetectLongPolling,this.useFetchStreams=t.useFetchStreams,this.longPollingOptions=t.longPollingOptions}Ao(t,n,r,i){const o=t1();return new Promise((s,a)=>{const l=new Eue;l.setWithCredentials(!0),l.listenOnce(xue.COMPLETE,()=>{try{switch(l.getLastErrorCode()){case Zv.NO_ERROR:const c=l.getResponseJson();fe(An,`XHR for RPC '${t}' ${o} received:`,JSON.stringify(c)),s(c);break;case Zv.TIMEOUT:fe(An,`RPC '${t}' ${o} timed out`),a(new pe(B.DEADLINE_EXCEEDED,"Request time out"));break;case Zv.HTTP_ERROR:const d=l.getStatus();if(fe(An,`RPC '${t}' ${o} failed with status:`,d,"response text:",l.getResponseText()),d>0){let f=l.getResponseJson();Array.isArray(f)&&(f=f[0]);const h=f==null?void 0:f.error;if(h&&h.status&&h.message){const p=function(y){const S=y.toLowerCase().replace(/_/g,"-");return Object.values(B).indexOf(S)>=0?S:B.UNKNOWN}(h.status);a(new pe(p,h.message))}else a(new pe(B.UNKNOWN,"Server responded with status "+l.getStatus()))}else a(new pe(B.UNAVAILABLE,"Connection failed."));break;default:we()}}finally{fe(An,`RPC '${t}' ${o} completed.`)}});const u=JSON.stringify(i);fe(An,`RPC '${t}' ${o} sending request:`,i),l.send(n,"POST",u,r,15)})}Ro(t,n,r){const i=t1(),o=[this.mo,"/","google.firestore.v1.Firestore","/",t,"/channel"],s=wue(),a=Sue(),l={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},u=this.longPollingOptions.timeoutSeconds;u!==void 0&&(l.longPollingTimeout=Math.round(1e3*u)),this.useFetchStreams&&(l.xmlHttpFactory=new Cue({})),this.Eo(l.initMessageHeaders,n,r),l.encodeInitMessageHeaders=!0;const c=o.join("");fe(An,`Creating RPC '${t}' stream ${i}: ${c}`,l);const d=s.createWebChannel(c,l);let f=!1,h=!1;const p=new yde({ro:S=>{h?fe(An,`Not sending because RPC '${t}' stream ${i} is closed:`,S):(f||(fe(An,`Opening RPC '${t}' stream ${i} transport.`),d.open(),f=!0),fe(An,`RPC '${t}' stream ${i} sending:`,S),d.send(S))},oo:()=>d.close()}),y=(S,v,m)=>{S.listen(v,b=>{try{m(b)}catch(C){setTimeout(()=>{throw C},0)}})};return y(d,Dh.EventType.OPEN,()=>{h||fe(An,`RPC '${t}' stream ${i} transport opened.`)}),y(d,Dh.EventType.CLOSE,()=>{h||(h=!0,fe(An,`RPC '${t}' stream ${i} transport closed`),p.wo())}),y(d,Dh.EventType.ERROR,S=>{h||(h=!0,hu(An,`RPC '${t}' stream ${i} transport errored:`,S),p.wo(new pe(B.UNAVAILABLE,"The operation could not be completed")))}),y(d,Dh.EventType.MESSAGE,S=>{var v;if(!h){const m=S.data[0];gt(!!m);const b=m,C=b.error||((v=b[0])===null||v===void 0?void 0:v.error);if(C){fe(An,`RPC '${t}' stream ${i} received error:`,C);const k=C.status;let x=function(R){const M=Kt[R];if(M!==void 0)return jL(M)}(k),E=C.message;x===void 0&&(x=B.INTERNAL,E="Unknown error status: "+k+" with message "+C.message),h=!0,p.wo(new pe(x,E)),d.close()}else fe(An,`RPC '${t}' stream ${i} received:`,m),p._o(m)}}),y(a,_ue.STAT_EVENT,S=>{S.stat===zP.PROXY?fe(An,`RPC '${t}' stream ${i} detected buffering proxy`):S.stat===zP.NOPROXY&&fe(An,`RPC '${t}' stream ${i} detected no buffering proxy`)}),setTimeout(()=>{p.fo()},0),p}}function n1(){return typeof document<"u"?document:null}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function qy(e){return new Ace(e,!0)}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class QL{constructor(t,n,r=1e3,i=1.5,o=6e4){this.ii=t,this.timerId=n,this.Po=r,this.bo=i,this.Vo=o,this.So=0,this.Do=null,this.Co=Date.now(),this.reset()}reset(){this.So=0}xo(){this.So=this.Vo}No(t){this.cancel();const n=Math.floor(this.So+this.ko()),r=Math.max(0,Date.now()-this.Co),i=Math.max(0,n-r);i>0&&fe("ExponentialBackoff",`Backing off for ${i} ms (base delay: ${this.So} ms, delay with jitter: ${n} ms, last attempt: ${r} ms ago)`),this.Do=this.ii.enqueueAfterDelay(this.timerId,i,()=>(this.Co=Date.now(),t())),this.So*=this.bo,this.So<this.Po&&(this.So=this.Po),this.So>this.Vo&&(this.So=this.Vo)}Mo(){this.Do!==null&&(this.Do.skipDelay(),this.Do=null)}cancel(){this.Do!==null&&(this.Do.cancel(),this.Do=null)}ko(){return(Math.random()-.5)*this.So}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class YL{constructor(t,n,r,i,o,s,a,l){this.ii=t,this.$o=r,this.Oo=i,this.connection=o,this.authCredentialsProvider=s,this.appCheckCredentialsProvider=a,this.listener=l,this.state=0,this.Fo=0,this.Bo=null,this.Lo=null,this.stream=null,this.qo=new QL(t,n)}Uo(){return this.state===1||this.state===5||this.Ko()}Ko(){return this.state===2||this.state===3}start(){this.state!==4?this.auth():this.Go()}async stop(){this.Uo()&&await this.close(0)}Qo(){this.state=0,this.qo.reset()}jo(){this.Ko()&&this.Bo===null&&(this.Bo=this.ii.enqueueAfterDelay(this.$o,6e4,()=>this.zo()))}Wo(t){this.Ho(),this.stream.send(t)}async zo(){if(this.Ko())return this.close(0)}Ho(){this.Bo&&(this.Bo.cancel(),this.Bo=null)}Jo(){this.Lo&&(this.Lo.cancel(),this.Lo=null)}async close(t,n){this.Ho(),this.Jo(),this.qo.cancel(),this.Fo++,t!==4?this.qo.reset():n&&n.code===B.RESOURCE_EXHAUSTED?(Po(n.toString()),Po("Using maximum backoff delay to prevent overloading the backend."),this.qo.xo()):n&&n.code===B.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.Yo(),this.stream.close(),this.stream=null),this.state=t,await this.listener.ao(n)}Yo(){}auth(){this.state=1;const t=this.Xo(this.Fo),n=this.Fo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([r,i])=>{this.Fo===n&&this.Zo(r,i)},r=>{t(()=>{const i=new pe(B.UNKNOWN,"Fetching auth token failed: "+r.message);return this.tu(i)})})}Zo(t,n){const r=this.Xo(this.Fo);this.stream=this.eu(t,n),this.stream.uo(()=>{r(()=>(this.state=2,this.Lo=this.ii.enqueueAfterDelay(this.Oo,1e4,()=>(this.Ko()&&(this.state=3),Promise.resolve())),this.listener.uo()))}),this.stream.ao(i=>{r(()=>this.tu(i))}),this.stream.onMessage(i=>{r(()=>this.onMessage(i))})}Go(){this.state=5,this.qo.No(async()=>{this.state=0,this.start()})}tu(t){return fe("PersistentStream",`close with error: ${t}`),this.stream=null,this.close(4,t)}Xo(t){return n=>{this.ii.enqueueAndForget(()=>this.Fo===t?n():(fe("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class bde extends YL{constructor(t,n,r,i,o,s){super(t,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",n,r,i,s),this.serializer=o}eu(t,n){return this.connection.Ro("Listen",t,n)}onMessage(t){this.qo.reset();const n=Oce(this.serializer,t),r=function(i){if(!("targetChange"in i))return _e.min();const o=i.targetChange;return o.targetIds&&o.targetIds.length?_e.min():o.readTime?Hi(o.readTime):_e.min()}(t);return this.listener.nu(n,r)}su(t){const n={};n.database=ww(this.serializer),n.addTarget=function(i,o){let s;const a=o.target;if(s=pw(a)?{documents:Mce(i,a)}:{query:Lce(i,a)},s.targetId=o.targetId,o.resumeToken.approximateByteSize()>0){s.resumeToken=VL(i,o.resumeToken);const l=yw(i,o.expectedCount);l!==null&&(s.expectedCount=l)}else if(o.snapshotVersion.compareTo(_e.min())>0){s.readTime=Xm(i,o.snapshotVersion.toTimestamp());const l=yw(i,o.expectedCount);l!==null&&(s.expectedCount=l)}return s}(this.serializer,t);const r=Fce(this.serializer,t);r&&(n.labels=r),this.Wo(n)}iu(t){const n={};n.database=ww(this.serializer),n.removeTarget=t,this.Wo(n)}}class wde extends YL{constructor(t,n,r,i,o,s){super(t,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",n,r,i,s),this.serializer=o,this.ru=!1}get ou(){return this.ru}start(){this.ru=!1,this.lastStreamToken=void 0,super.start()}Yo(){this.ru&&this.uu([])}eu(t,n){return this.connection.Ro("Write",t,n)}onMessage(t){if(gt(!!t.streamToken),this.lastStreamToken=t.streamToken,this.ru){this.qo.reset();const n=Dce(t.writeResults,t.commitTime),r=Hi(t.commitTime);return this.listener.cu(r,n)}return gt(!t.writeResults||t.writeResults.length===0),this.ru=!0,this.listener.au()}hu(){const t={};t.database=ww(this.serializer),this.Wo(t)}uu(t){const n={streamToken:this.lastStreamToken,writes:t.map(r=>Nce(this.serializer,r))};this.Wo(n)}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Sde extends class{}{constructor(t,n,r,i){super(),this.authCredentials=t,this.appCheckCredentials=n,this.connection=r,this.serializer=i,this.lu=!1}fu(){if(this.lu)throw new pe(B.FAILED_PRECONDITION,"The client has already been terminated.")}Io(t,n,r){return this.fu(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([i,o])=>this.connection.Io(t,n,r,i,o)).catch(i=>{throw i.name==="FirebaseError"?(i.code===B.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),i):new pe(B.UNKNOWN,i.toString())})}vo(t,n,r,i){return this.fu(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([o,s])=>this.connection.vo(t,n,r,o,s,i)).catch(o=>{throw o.name==="FirebaseError"?(o.code===B.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),o):new pe(B.UNKNOWN,o.toString())})}terminate(){this.lu=!0}}class xde{constructor(t,n){this.asyncQueue=t,this.onlineStateHandler=n,this.state="Unknown",this.wu=0,this._u=null,this.mu=!0}gu(){this.wu===0&&(this.yu("Unknown"),this._u=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this._u=null,this.pu("Backend didn't respond within 10 seconds."),this.yu("Offline"),Promise.resolve())))}Iu(t){this.state==="Online"?this.yu("Unknown"):(this.wu++,this.wu>=1&&(this.Tu(),this.pu(`Connection failed 1 times. Most recent error: ${t.toString()}`),this.yu("Offline")))}set(t){this.Tu(),this.wu=0,t==="Online"&&(this.mu=!1),this.yu(t)}yu(t){t!==this.state&&(this.state=t,this.onlineStateHandler(t))}pu(t){const n=`Could not reach Cloud Firestore backend. ${t}
This 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.mu?(Po(n),this.mu=!1):fe("OnlineStateTracker",n)}Tu(){this._u!==null&&(this._u.cancel(),this._u=null)}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class _de{constructor(t,n,r,i,o){this.localStore=t,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.Eu=[],this.Au=new Map,this.vu=new Set,this.Ru=[],this.Pu=o,this.Pu.Yr(s=>{r.enqueueAndForget(async()=>{La(this)&&(fe("RemoteStore","Restarting streams for network reachability change."),await async function(a){const l=Ee(a);l.vu.add(4),await Hf(l),l.bu.set("Unknown"),l.vu.delete(4),await Ky(l)}(this))})}),this.bu=new xde(r,i)}}async function Ky(e){if(La(e))for(const t of e.Ru)await t(!0)}async function Hf(e){for(const t of e.Ru)await t(!1)}function XL(e,t){const n=Ee(e);n.Au.has(t.targetId)||(n.Au.set(t.targetId,t),z_(n)?F_(n):zu(n).Ko()&&j_(n,t))}function JL(e,t){const n=Ee(e),r=zu(n);n.Au.delete(t),r.Ko()&&ZL(n,t),n.Au.size===0&&(r.Ko()?r.jo():La(n)&&n.bu.set("Unknown"))}function j_(e,t){if(e.Vu.qt(t.targetId),t.resumeToken.approximateByteSize()>0||t.snapshotVersion.compareTo(_e.min())>0){const n=e.remoteSyncer.getRemoteKeysForTarget(t.targetId).size;t=t.withExpectedCount(n)}zu(e).su(t)}function ZL(e,t){e.Vu.qt(t),zu(e).iu(t)}function F_(e){e.Vu=new kce({getRemoteKeysForTarget:t=>e.remoteSyncer.getRemoteKeysForTarget(t),le:t=>e.Au.get(t)||null,ue:()=>e.datastore.serializer.databaseId}),zu(e).start(),e.bu.gu()}function z_(e){return La(e)&&!zu(e).Uo()&&e.Au.size>0}function La(e){return Ee(e).vu.size===0}function e4(e){e.Vu=void 0}async function Cde(e){e.Au.forEach((t,n)=>{j_(e,t)})}async function Ede(e,t){e4(e),z_(e)?(e.bu.Iu(t),F_(e)):e.bu.set("Unknown")}async function kde(e,t,n){if(e.bu.set("Online"),t instanceof zL&&t.state===2&&t.cause)try{await async function(r,i){const o=i.cause;for(const s of i.targetIds)r.Au.has(s)&&(await r.remoteSyncer.rejectListen(s,o),r.Au.delete(s),r.Vu.removeTarget(s))}(e,t)}catch(r){fe("RemoteStore","Failed to remove targets %s: %s ",t.targetIds.join(","),r),await Jm(e,r)}else if(t instanceof Pp?e.Vu.Ht(t):t instanceof FL?e.Vu.ne(t):e.Vu.Xt(t),!n.isEqual(_e.min()))try{const r=await GL(e.localStore);n.compareTo(r)>=0&&await function(i,o){const s=i.Vu.ce(o);return s.targetChanges.forEach((a,l)=>{if(a.resumeToken.approximateByteSize()>0){const u=i.Au.get(l);u&&i.Au.set(l,u.withResumeToken(a.resumeToken,o))}}),s.targetMismatches.forEach((a,l)=>{const u=i.Au.get(a);if(!u)return;i.Au.set(a,u.withResumeToken(Hn.EMPTY_BYTE_STRING,u.snapshotVersion)),ZL(i,a);const c=new ss(u.target,a,l,u.sequenceNumber);j_(i,c)}),i.remoteSyncer.applyRemoteEvent(s)}(e,n)}catch(r){fe("RemoteStore","Failed to raise snapshot:",r),await Jm(e,r)}}async function Jm(e,t,n){if(!Bf(t))throw t;e.vu.add(1),await Hf(e),e.bu.set("Offline"),n||(n=()=>GL(e.localStore)),e.asyncQueue.enqueueRetryable(async()=>{fe("RemoteStore","Retrying IndexedDB access"),await n(),e.vu.delete(1),await Ky(e)})}function t4(e,t){return t().catch(n=>Jm(e,n,t))}async function Gy(e){const t=Ee(e),n=$s(t);let r=t.Eu.length>0?t.Eu[t.Eu.length-1].batchId:-1;for(;Tde(t);)try{const i=await dde(t.localStore,r);if(i===null){t.Eu.length===0&&n.jo();break}r=i.batchId,Pde(t,i)}catch(i){await Jm(t,i)}n4(t)&&r4(t)}function Tde(e){return La(e)&&e.Eu.length<10}function Pde(e,t){e.Eu.push(t);const n=$s(e);n.Ko()&&n.ou&&n.uu(t.mutations)}function n4(e){return La(e)&&!$s(e).Uo()&&e.Eu.length>0}function r4(e){$s(e).start()}async function Ide(e){$s(e).hu()}async function Ade(e){const t=$s(e);for(const n of e.Eu)t.uu(n.mutations)}async function Rde(e,t,n){const r=e.Eu.shift(),i=R_.from(r,t,n);await t4(e,()=>e.remoteSyncer.applySuccessfulWrite(i)),await Gy(e)}async function $de(e,t){t&&$s(e).ou&&await async function(n,r){if(i=r.code,_ce(i)&&i!==B.ABORTED){const o=n.Eu.shift();$s(n).Qo(),await t4(n,()=>n.remoteSyncer.rejectFailedWrite(o.batchId,r)),await Gy(n)}var i}(e,t),n4(e)&&r4(e)}async function dI(e,t){const n=Ee(e);n.asyncQueue.verifyOperationInProgress(),fe("RemoteStore","RemoteStore received new credentials");const r=La(n);n.vu.add(3),await Hf(n),r&&n.bu.set("Unknown"),await n.remoteSyncer.handleCredentialChange(t),n.vu.delete(3),await Ky(n)}async function Ode(e,t){const n=Ee(e);t?(n.vu.delete(2),await Ky(n)):t||(n.vu.add(2),await Hf(n),n.bu.set("Unknown"))}function zu(e){return e.Su||(e.Su=function(t,n,r){const i=Ee(t);return i.fu(),new bde(n,i.connection,i.authCredentials,i.appCheckCredentials,i.serializer,r)}(e.datastore,e.asyncQueue,{uo:Cde.bind(null,e),ao:Ede.bind(null,e),nu:kde.bind(null,e)}),e.Ru.push(async t=>{t?(e.Su.Qo(),z_(e)?F_(e):e.bu.set("Unknown")):(await e.Su.stop(),e4(e))})),e.Su}function $s(e){return e.Du||(e.Du=function(t,n,r){const i=Ee(t);return i.fu(),new wde(n,i.connection,i.authCredentials,i.appCheckCredentials,i.serializer,r)}(e.datastore,e.asyncQueue,{uo:Ide.bind(null,e),ao:$de.bind(null,e),au:Ade.bind(null,e),cu:Rde.bind(null,e)}),e.Ru.push(async t=>{t?(e.Du.Qo(),await Gy(e)):(await e.Du.stop(),e.Eu.length>0&&(fe("RemoteStore",`Stopping write stream with ${e.Eu.length} pending writes`),e.Eu=[]))})),e.Du}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class V_{constructor(t,n,r,i,o){this.asyncQueue=t,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=o,this.deferred=new pa,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(s=>{})}static createAndSchedule(t,n,r,i,o){const s=Date.now()+r,a=new V_(t,n,s,i,o);return a.start(r),a}start(t){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),t)}skipDelay(){return this.handleDelayElapsed()}cancel(t){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new pe(B.CANCELLED,"Operation cancelled"+(t?": "+t:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then(t=>this.deferred.resolve(t))):Promise.resolve())}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function B_(e,t){if(Po("AsyncQueue",`${t}: ${e}`),Bf(e))return new pe(B.UNAVAILABLE,`${t}: ${e}`);throw e}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Ul{constructor(t){this.comparator=t?(n,r)=>t(n,r)||me.comparator(n.key,r.key):(n,r)=>me.comparator(n.key,r.key),this.keyedMap=Pc(),this.sortedSet=new Ot(this.comparator)}static emptySet(t){return new Ul(t.comparator)}has(t){return this.keyedMap.get(t)!=null}get(t){return this.keyedMap.get(t)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(t){const n=this.keyedMap.get(t);return n?this.sortedSet.indexOf(n):-1}get size(){return this.sortedSet.size}forEach(t){this.sortedSet.inorderTraversal((n,r)=>(t(n),!1))}add(t){const n=this.delete(t.key);return n.copy(n.keyedMap.insert(t.key,t),n.sortedSet.insert(t,null))}delete(t){const n=this.get(t);return n?this.copy(this.keyedMap.remove(t),this.sortedSet.remove(n)):this}isEqual(t){if(!(t instanceof Ul)||this.size!==t.size)return!1;const n=this.sortedSet.getIterator(),r=t.sortedSet.getIterator();for(;n.hasNext();){const i=n.getNext().key,o=r.getNext().key;if(!i.isEqual(o))return!1}return!0}toString(){const t=[];return this.forEach(n=>{t.push(n.toString())}),t.length===0?"DocumentSet ()":`DocumentSet (
  `+t.join(`  
`)+`
)`}copy(t,n){const r=new Ul;return r.comparator=this.comparator,r.keyedMap=t,r.sortedSet=n,r}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class fI{constructor(){this.Cu=new Ot(me.comparator)}track(t){const n=t.doc.key,r=this.Cu.get(n);r?t.type!==0&&r.type===3?this.Cu=this.Cu.insert(n,t):t.type===3&&r.type!==1?this.Cu=this.Cu.insert(n,{type:r.type,doc:t.doc}):t.type===2&&r.type===2?this.Cu=this.Cu.insert(n,{type:2,doc:t.doc}):t.type===2&&r.type===0?this.Cu=this.Cu.insert(n,{type:0,doc:t.doc}):t.type===1&&r.type===0?this.Cu=this.Cu.remove(n):t.type===1&&r.type===2?this.Cu=this.Cu.insert(n,{type:1,doc:r.doc}):t.type===0&&r.type===1?this.Cu=this.Cu.insert(n,{type:2,doc:t.doc}):we():this.Cu=this.Cu.insert(n,t)}xu(){const t=[];return this.Cu.inorderTraversal((n,r)=>{t.push(r)}),t}}class vu{constructor(t,n,r,i,o,s,a,l,u){this.query=t,this.docs=n,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=o,this.fromCache=s,this.syncStateChanged=a,this.excludesMetadataChanges=l,this.hasCachedResults=u}static fromInitialDocuments(t,n,r,i,o){const s=[];return n.forEach(a=>{s.push({type:0,doc:a})}),new vu(t,n,Ul.emptySet(n),s,r,i,!0,!1,o)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(t){if(!(this.fromCache===t.fromCache&&this.hasCachedResults===t.hasCachedResults&&this.syncStateChanged===t.syncStateChanged&&this.mutatedKeys.isEqual(t.mutatedKeys)&&Vy(this.query,t.query)&&this.docs.isEqual(t.docs)&&this.oldDocs.isEqual(t.oldDocs)))return!1;const n=this.docChanges,r=t.docChanges;if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(n[i].type!==r[i].type||!n[i].doc.isEqual(r[i].doc))return!1;return!0}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Nde{constructor(){this.Nu=void 0,this.listeners=[]}}class Dde{constructor(){this.queries=new Fu(t=>EL(t),Vy),this.onlineState="Unknown",this.ku=new Set}}async function Mde(e,t){const n=Ee(e),r=t.query;let i=!1,o=n.queries.get(r);if(o||(i=!0,o=new Nde),i)try{o.Nu=await n.onListen(r)}catch(s){const a=B_(s,`Initialization of query '${gw(t.query)}' failed`);return void t.onError(a)}n.queries.set(r,o),o.listeners.push(t),t.Mu(n.onlineState),o.Nu&&t.$u(o.Nu)&&U_(n)}async function Lde(e,t){const n=Ee(e),r=t.query;let i=!1;const o=n.queries.get(r);if(o){const s=o.listeners.indexOf(t);s>=0&&(o.listeners.splice(s,1),i=o.listeners.length===0)}if(i)return n.queries.delete(r),n.onUnlisten(r)}function jde(e,t){const n=Ee(e);let r=!1;for(const i of t){const o=i.query,s=n.queries.get(o);if(s){for(const a of s.listeners)a.$u(i)&&(r=!0);s.Nu=i}}r&&U_(n)}function Fde(e,t,n){const r=Ee(e),i=r.queries.get(t);if(i)for(const o of i.listeners)o.onError(n);r.queries.delete(t)}function U_(e){e.ku.forEach(t=>{t.next()})}class zde{constructor(t,n,r){this.query=t,this.Ou=n,this.Fu=!1,this.Bu=null,this.onlineState="Unknown",this.options=r||{}}$u(t){if(!this.options.includeMetadataChanges){const r=[];for(const i of t.docChanges)i.type!==3&&r.push(i);t=new vu(t.query,t.docs,t.oldDocs,r,t.mutatedKeys,t.fromCache,t.syncStateChanged,!0,t.hasCachedResults)}let n=!1;return this.Fu?this.Lu(t)&&(this.Ou.next(t),n=!0):this.qu(t,this.onlineState)&&(this.Uu(t),n=!0),this.Bu=t,n}onError(t){this.Ou.error(t)}Mu(t){this.onlineState=t;let n=!1;return this.Bu&&!this.Fu&&this.qu(this.Bu,t)&&(this.Uu(this.Bu),n=!0),n}qu(t,n){if(!t.fromCache)return!0;const r=n!=="Offline";return(!this.options.Ku||!r)&&(!t.docs.isEmpty()||t.hasCachedResults||n==="Offline")}Lu(t){if(t.docChanges.length>0)return!0;const n=this.Bu&&this.Bu.hasPendingWrites!==t.hasPendingWrites;return!(!t.syncStateChanged&&!n)&&this.options.includeMetadataChanges===!0}Uu(t){t=vu.fromInitialDocuments(t.query,t.docs,t.mutatedKeys,t.fromCache,t.hasCachedResults),this.Fu=!0,this.Ou.next(t)}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class i4{constructor(t){this.key=t}}class o4{constructor(t){this.key=t}}class Vde{constructor(t,n){this.query=t,this.Yu=n,this.Xu=null,this.hasCachedResults=!1,this.current=!1,this.Zu=Ie(),this.mutatedKeys=Ie(),this.tc=kL(t),this.ec=new Ul(this.tc)}get nc(){return this.Yu}sc(t,n){const r=n?n.ic:new fI,i=n?n.ec:this.ec;let o=n?n.mutatedKeys:this.mutatedKeys,s=i,a=!1;const l=this.query.limitType==="F"&&i.size===this.query.limit?i.last():null,u=this.query.limitType==="L"&&i.size===this.query.limit?i.first():null;if(t.inorderTraversal((c,d)=>{const f=i.get(c),h=By(this.query,d)?d:null,p=!!f&&this.mutatedKeys.has(f.key),y=!!h&&(h.hasLocalMutations||this.mutatedKeys.has(h.key)&&h.hasCommittedMutations);let S=!1;f&&h?f.data.isEqual(h.data)?p!==y&&(r.track({type:3,doc:h}),S=!0):this.rc(f,h)||(r.track({type:2,doc:h}),S=!0,(l&&this.tc(h,l)>0||u&&this.tc(h,u)<0)&&(a=!0)):!f&&h?(r.track({type:0,doc:h}),S=!0):f&&!h&&(r.track({type:1,doc:f}),S=!0,(l||u)&&(a=!0)),S&&(h?(s=s.add(h),o=y?o.add(c):o.delete(c)):(s=s.delete(c),o=o.delete(c)))}),this.query.limit!==null)for(;s.size>this.query.limit;){const c=this.query.limitType==="F"?s.last():s.first();s=s.delete(c.key),o=o.delete(c.key),r.track({type:1,doc:c})}return{ec:s,ic:r,zi:a,mutatedKeys:o}}rc(t,n){return t.hasLocalMutations&&n.hasCommittedMutations&&!n.hasLocalMutations}applyChanges(t,n,r){const i=this.ec;this.ec=t.ec,this.mutatedKeys=t.mutatedKeys;const o=t.ic.xu();o.sort((u,c)=>function(d,f){const h=p=>{switch(p){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return we()}};return h(d)-h(f)}(u.type,c.type)||this.tc(u.doc,c.doc)),this.oc(r);const s=n?this.uc():[],a=this.Zu.size===0&&this.current?1:0,l=a!==this.Xu;return this.Xu=a,o.length!==0||l?{snapshot:new vu(this.query,t.ec,i,o,t.mutatedKeys,a===0,l,!1,!!r&&r.resumeToken.approximateByteSize()>0),cc:s}:{cc:s}}Mu(t){return this.current&&t==="Offline"?(this.current=!1,this.applyChanges({ec:this.ec,ic:new fI,mutatedKeys:this.mutatedKeys,zi:!1},!1)):{cc:[]}}ac(t){return!this.Yu.has(t)&&!!this.ec.has(t)&&!this.ec.get(t).hasLocalMutations}oc(t){t&&(t.addedDocuments.forEach(n=>this.Yu=this.Yu.add(n)),t.modifiedDocuments.forEach(n=>{}),t.removedDocuments.forEach(n=>this.Yu=this.Yu.delete(n)),this.current=t.current)}uc(){if(!this.current)return[];const t=this.Zu;this.Zu=Ie(),this.ec.forEach(r=>{this.ac(r.key)&&(this.Zu=this.Zu.add(r.key))});const n=[];return t.forEach(r=>{this.Zu.has(r)||n.push(new o4(r))}),this.Zu.forEach(r=>{t.has(r)||n.push(new i4(r))}),n}hc(t){this.Yu=t.ir,this.Zu=Ie();const n=this.sc(t.documents);return this.applyChanges(n,!0)}lc(){return vu.fromInitialDocuments(this.query,this.ec,this.mutatedKeys,this.Xu===0,this.hasCachedResults)}}class Bde{constructor(t,n,r){this.query=t,this.targetId=n,this.view=r}}class Ude{constructor(t){this.key=t,this.fc=!1}}class Wde{constructor(t,n,r,i,o,s){this.localStore=t,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=o,this.maxConcurrentLimboResolutions=s,this.dc={},this.wc=new Fu(a=>EL(a),Vy),this._c=new Map,this.mc=new Set,this.gc=new Ot(me.comparator),this.yc=new Map,this.Ic=new D_,this.Tc={},this.Ec=new Map,this.Ac=yu.Mn(),this.onlineState="Unknown",this.vc=void 0}get isPrimaryClient(){return this.vc===!0}}async function Hde(e,t){const n=tfe(e);let r,i;const o=n.wc.get(t);if(o)r=o.targetId,n.sharedClientState.addLocalQueryTarget(r),i=o.view.lc();else{const s=await fde(n.localStore,Io(t)),a=n.sharedClientState.addLocalQueryTarget(s.targetId);r=s.targetId,i=await qde(n,t,r,a==="current",s.resumeToken),n.isPrimaryClient&&XL(n.remoteStore,s)}return i}async function qde(e,t,n,r,i){e.Rc=(d,f,h)=>async function(p,y,S,v){let m=y.view.sc(S);m.zi&&(m=await lI(p.localStore,y.query,!1).then(({documents:k})=>y.view.sc(k,m)));const b=v&&v.targetChanges.get(y.targetId),C=y.view.applyChanges(m,p.isPrimaryClient,b);return pI(p,y.targetId,C.cc),C.snapshot}(e,d,f,h);const o=await lI(e.localStore,t,!0),s=new Vde(t,o.ir),a=s.sc(o.documents),l=Wf.createSynthesizedTargetChangeForCurrentChange(n,r&&e.onlineState!=="Offline",i),u=s.applyChanges(a,e.isPrimaryClient,l);pI(e,n,u.cc);const c=new Bde(t,n,s);return e.wc.set(t,c),e._c.has(n)?e._c.get(n).push(t):e._c.set(n,[t]),u.snapshot}async function Kde(e,t){const n=Ee(e),r=n.wc.get(t),i=n._c.get(r.targetId);if(i.length>1)return n._c.set(r.targetId,i.filter(o=>!Vy(o,t))),void n.wc.delete(t);n.isPrimaryClient?(n.sharedClientState.removeLocalQueryTarget(r.targetId),n.sharedClientState.isActiveQueryTarget(r.targetId)||await Sw(n.localStore,r.targetId,!1).then(()=>{n.sharedClientState.clearQueryState(r.targetId),JL(n.remoteStore,r.targetId),xw(n,r.targetId)}).catch(Vf)):(xw(n,r.targetId),await Sw(n.localStore,r.targetId,!0))}async function Gde(e,t,n){const r=nfe(e);try{const i=await function(o,s){const a=Ee(o),l=an.now(),u=s.reduce((f,h)=>f.add(h.key),Ie());let c,d;return a.persistence.runTransaction("Locally write mutations","readwrite",f=>{let h=Ao(),p=Ie();return a.Zi.getEntries(f,u).next(y=>{h=y,h.forEach((S,v)=>{v.isValidDocument()||(p=p.add(S))})}).next(()=>a.localDocuments.getOverlayedDocuments(f,h)).next(y=>{c=y;const S=[];for(const v of s){const m=vce(v,c.get(v.key).overlayedDocument);m!=null&&S.push(new Ma(v.key,m,vL(m.value.mapValue),Wi.exists(!0)))}return a.mutationQueue.addMutationBatch(f,l,S,s)}).next(y=>{d=y;const S=y.applyToLocalDocumentSet(c,p);return a.documentOverlayCache.saveOverlays(f,y.batchId,S)})}).then(()=>({batchId:d.batchId,changes:PL(c)}))}(r.localStore,t);r.sharedClientState.addPendingMutation(i.batchId),function(o,s,a){let l=o.Tc[o.currentUser.toKey()];l||(l=new Ot(Ke)),l=l.insert(s,a),o.Tc[o.currentUser.toKey()]=l}(r,i.batchId,n),await qf(r,i.changes),await Gy(r.remoteStore)}catch(i){const o=B_(i,"Failed to persist write");n.reject(o)}}async function s4(e,t){const n=Ee(e);try{const r=await ude(n.localStore,t);t.targetChanges.forEach((i,o)=>{const s=n.yc.get(o);s&&(gt(i.addedDocuments.size+i.modifiedDocuments.size+i.removedDocuments.size<=1),i.addedDocuments.size>0?s.fc=!0:i.modifiedDocuments.size>0?gt(s.fc):i.removedDocuments.size>0&&(gt(s.fc),s.fc=!1))}),await qf(n,r,t)}catch(r){await Vf(r)}}function hI(e,t,n){const r=Ee(e);if(r.isPrimaryClient&&n===0||!r.isPrimaryClient&&n===1){const i=[];r.wc.forEach((o,s)=>{const a=s.view.Mu(t);a.snapshot&&i.push(a.snapshot)}),function(o,s){const a=Ee(o);a.onlineState=s;let l=!1;a.queries.forEach((u,c)=>{for(const d of c.listeners)d.Mu(s)&&(l=!0)}),l&&U_(a)}(r.eventManager,t),i.length&&r.dc.nu(i),r.onlineState=t,r.isPrimaryClient&&r.sharedClientState.setOnlineState(t)}}async function Qde(e,t,n){const r=Ee(e);r.sharedClientState.updateQueryState(t,"rejected",n);const i=r.yc.get(t),o=i&&i.key;if(o){let s=new Ot(me.comparator);s=s.insert(o,Dn.newNoDocument(o,_e.min()));const a=Ie().add(o),l=new Hy(_e.min(),new Map,new Ot(Ke),s,a);await s4(r,l),r.gc=r.gc.remove(o),r.yc.delete(t),W_(r)}else await Sw(r.localStore,t,!1).then(()=>xw(r,t,n)).catch(Vf)}async function Yde(e,t){const n=Ee(e),r=t.batch.batchId;try{const i=await lde(n.localStore,t);l4(n,r,null),a4(n,r),n.sharedClientState.updateMutationState(r,"acknowledged"),await qf(n,i)}catch(i){await Vf(i)}}async function Xde(e,t,n){const r=Ee(e);try{const i=await function(o,s){const a=Ee(o);return a.persistence.runTransaction("Reject batch","readwrite-primary",l=>{let u;return a.mutationQueue.lookupMutationBatch(l,s).next(c=>(gt(c!==null),u=c.keys(),a.mutationQueue.removeMutationBatch(l,c))).next(()=>a.mutationQueue.performConsistencyCheck(l)).next(()=>a.documentOverlayCache.removeOverlaysForBatchId(l,u,s)).next(()=>a.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(l,u)).next(()=>a.localDocuments.getDocuments(l,u))})}(r.localStore,t);l4(r,t,n),a4(r,t),r.sharedClientState.updateMutationState(t,"rejected",n),await qf(r,i)}catch(i){await Vf(i)}}function a4(e,t){(e.Ec.get(t)||[]).forEach(n=>{n.resolve()}),e.Ec.delete(t)}function l4(e,t,n){const r=Ee(e);let i=r.Tc[r.currentUser.toKey()];if(i){const o=i.get(t);o&&(n?o.reject(n):o.resolve(),i=i.remove(t)),r.Tc[r.currentUser.toKey()]=i}}function xw(e,t,n=null){e.sharedClientState.removeLocalQueryTarget(t);for(const r of e._c.get(t))e.wc.delete(r),n&&e.dc.Pc(r,n);e._c.delete(t),e.isPrimaryClient&&e.Ic.Is(t).forEach(r=>{e.Ic.containsKey(r)||u4(e,r)})}function u4(e,t){e.mc.delete(t.path.canonicalString());const n=e.gc.get(t);n!==null&&(JL(e.remoteStore,n),e.gc=e.gc.remove(t),e.yc.delete(n),W_(e))}function pI(e,t,n){for(const r of n)r instanceof i4?(e.Ic.addReference(r.key,t),Jde(e,r)):r instanceof o4?(fe("SyncEngine","Document no longer in limbo: "+r.key),e.Ic.removeReference(r.key,t),e.Ic.containsKey(r.key)||u4(e,r.key)):we()}function Jde(e,t){const n=t.key,r=n.path.canonicalString();e.gc.get(n)||e.mc.has(r)||(fe("SyncEngine","New document in limbo: "+n),e.mc.add(r),W_(e))}function W_(e){for(;e.mc.size>0&&e.gc.size<e.maxConcurrentLimboResolutions;){const t=e.mc.values().next().value;e.mc.delete(t);const n=new me(Ct.fromString(t)),r=e.Ac.next();e.yc.set(r,new Ude(n)),e.gc=e.gc.insert(n,r),XL(e.remoteStore,new ss(Io(I_(n.path)),r,"TargetPurposeLimboResolution",__.ct))}}async function qf(e,t,n){const r=Ee(e),i=[],o=[],s=[];r.wc.isEmpty()||(r.wc.forEach((a,l)=>{s.push(r.Rc(l,t,n).then(u=>{if((u||n)&&r.isPrimaryClient&&r.sharedClientState.updateQueryState(l.targetId,u!=null&&u.fromCache?"not-current":"current"),u){i.push(u);const c=L_.Li(l.targetId,u);o.push(c)}}))}),await Promise.all(s),r.dc.nu(i),await async function(a,l){const u=Ee(a);try{await u.persistence.runTransaction("notifyLocalViewChanges","readwrite",c=>H.forEach(l,d=>H.forEach(d.Fi,f=>u.persistence.referenceDelegate.addReference(c,d.targetId,f)).next(()=>H.forEach(d.Bi,f=>u.persistence.referenceDelegate.removeReference(c,d.targetId,f)))))}catch(c){if(!Bf(c))throw c;fe("LocalStore","Failed to update sequence numbers: "+c)}for(const c of l){const d=c.targetId;if(!c.fromCache){const f=u.Ji.get(d),h=f.snapshotVersion,p=f.withLastLimboFreeSnapshotVersion(h);u.Ji=u.Ji.insert(d,p)}}}(r.localStore,o))}async function Zde(e,t){const n=Ee(e);if(!n.currentUser.isEqual(t)){fe("SyncEngine","User change. New user:",t.toKey());const r=await KL(n.localStore,t);n.currentUser=t,function(i,o){i.Ec.forEach(s=>{s.forEach(a=>{a.reject(new pe(B.CANCELLED,o))})}),i.Ec.clear()}(n,"'waitForPendingWrites' promise is rejected due to a user change."),n.sharedClientState.handleUserChange(t,r.removedBatchIds,r.addedBatchIds),await qf(n,r.er)}}function efe(e,t){const n=Ee(e),r=n.yc.get(t);if(r&&r.fc)return Ie().add(r.key);{let i=Ie();const o=n._c.get(t);if(!o)return i;for(const s of o){const a=n.wc.get(s);i=i.unionWith(a.view.nc)}return i}}function tfe(e){const t=Ee(e);return t.remoteStore.remoteSyncer.applyRemoteEvent=s4.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=efe.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=Qde.bind(null,t),t.dc.nu=jde.bind(null,t.eventManager),t.dc.Pc=Fde.bind(null,t.eventManager),t}function nfe(e){const t=Ee(e);return t.remoteStore.remoteSyncer.applySuccessfulWrite=Yde.bind(null,t),t.remoteStore.remoteSyncer.rejectFailedWrite=Xde.bind(null,t),t}class mI{constructor(){this.synchronizeTabs=!1}async initialize(t){this.serializer=qy(t.databaseInfo.databaseId),this.sharedClientState=this.createSharedClientState(t),this.persistence=this.createPersistence(t),await this.persistence.start(),this.localStore=this.createLocalStore(t),this.gcScheduler=this.createGarbageCollectionScheduler(t,this.localStore),this.indexBackfillerScheduler=this.createIndexBackfillerScheduler(t,this.localStore)}createGarbageCollectionScheduler(t,n){return null}createIndexBackfillerScheduler(t,n){return null}createLocalStore(t){return ade(this.persistence,new ode,t.initialUser,this.serializer)}createPersistence(t){return new rde(M_.zs,this.serializer)}createSharedClientState(t){return new pde}async terminate(){this.gcScheduler&&this.gcScheduler.stop(),await this.sharedClientState.shutdown(),await this.persistence.shutdown()}}class rfe{async initialize(t,n){this.localStore||(this.localStore=t.localStore,this.sharedClientState=t.sharedClientState,this.datastore=this.createDatastore(n),this.remoteStore=this.createRemoteStore(n),this.eventManager=this.createEventManager(n),this.syncEngine=this.createSyncEngine(n,!t.synchronizeTabs),this.sharedClientState.onlineStateHandler=r=>hI(this.syncEngine,r,1),this.remoteStore.remoteSyncer.handleCredentialChange=Zde.bind(null,this.syncEngine),await Ode(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(t){return new Dde}createDatastore(t){const n=qy(t.databaseInfo.databaseId),r=(i=t.databaseInfo,new vde(i));var i;return function(o,s,a,l){return new Sde(o,s,a,l)}(t.authCredentials,t.appCheckCredentials,r,n)}createRemoteStore(t){return n=this.localStore,r=this.datastore,i=t.asyncQueue,o=a=>hI(this.syncEngine,a,0),s=cI.D()?new cI:new mde,new _de(n,r,i,o,s);var n,r,i,o,s}createSyncEngine(t,n){return function(r,i,o,s,a,l,u){const c=new Wde(r,i,o,s,a,l);return u&&(c.vc=!0),c}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,t.initialUser,t.maxConcurrentLimboResolutions,n)}terminate(){return async function(t){const n=Ee(t);fe("RemoteStore","RemoteStore shutting down."),n.vu.add(5),await Hf(n),n.Pu.shutdown(),n.bu.set("Unknown")}(this.remoteStore)}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *//**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class ife{constructor(t){this.observer=t,this.muted=!1}next(t){this.observer.next&&this.Sc(this.observer.next,t)}error(t){this.observer.error?this.Sc(this.observer.error,t):Po("Uncaught Error in snapshot listener:",t.toString())}Dc(){this.muted=!0}Sc(t,n){this.muted||setTimeout(()=>{this.muted||t(n)},0)}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class ofe{constructor(t,n,r,i){this.authCredentials=t,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=i,this.user=On.UNAUTHENTICATED,this.clientId=mL.A(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(r,async o=>{fe("FirestoreClient","Received user=",o.uid),await this.authCredentialListener(o),this.user=o}),this.appCheckCredentials.start(r,o=>(fe("FirestoreClient","Received new app check token=",o),this.appCheckCredentialListener(o,this.user)))}async getConfiguration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(t){this.authCredentialListener=t}setAppCheckTokenChangeListener(t){this.appCheckCredentialListener=t}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new pe(B.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();const t=new pa;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),t.resolve()}catch(n){const r=B_(n,"Failed to shutdown persistence");t.reject(r)}}),t.promise}}async function r1(e,t){e.asyncQueue.verifyOperationInProgress(),fe("FirestoreClient","Initializing OfflineComponentProvider");const n=await e.getConfiguration();await t.initialize(n);let r=n.initialUser;e.setCredentialChangeListener(async i=>{r.isEqual(i)||(await KL(t.localStore,i),r=i)}),t.persistence.setDatabaseDeletedListener(()=>e.terminate()),e._offlineComponents=t}async function gI(e,t){e.asyncQueue.verifyOperationInProgress();const n=await afe(e);fe("FirestoreClient","Initializing OnlineComponentProvider");const r=await e.getConfiguration();await t.initialize(n,r),e.setCredentialChangeListener(i=>dI(t.remoteStore,i)),e.setAppCheckTokenChangeListener((i,o)=>dI(t.remoteStore,o)),e._onlineComponents=t}function sfe(e){return e.name==="FirebaseError"?e.code===B.FAILED_PRECONDITION||e.code===B.UNIMPLEMENTED:!(typeof DOMException<"u"&&e instanceof DOMException)||e.code===22||e.code===20||e.code===11}async function afe(e){if(!e._offlineComponents)if(e._uninitializedComponentsProvider){fe("FirestoreClient","Using user provided OfflineComponentProvider");try{await r1(e,e._uninitializedComponentsProvider._offline)}catch(t){const n=t;if(!sfe(n))throw n;hu("Error using user provided cache. Falling back to memory cache: "+n),await r1(e,new mI)}}else fe("FirestoreClient","Using default OfflineComponentProvider"),await r1(e,new mI);return e._offlineComponents}async function c4(e){return e._onlineComponents||(e._uninitializedComponentsProvider?(fe("FirestoreClient","Using user provided OnlineComponentProvider"),await gI(e,e._uninitializedComponentsProvider._online)):(fe("FirestoreClient","Using default OnlineComponentProvider"),await gI(e,new rfe))),e._onlineComponents}function lfe(e){return c4(e).then(t=>t.syncEngine)}async function yI(e){const t=await c4(e),n=t.eventManager;return n.onListen=Hde.bind(null,t.syncEngine),n.onUnlisten=Kde.bind(null,t.syncEngine),n}/**
 * @license
 * Copyright 2023 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function d4(e){const t={};return e.timeoutSeconds!==void 0&&(t.timeoutSeconds=e.timeoutSeconds),t}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const vI=new Map;/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function f4(e,t,n){if(!n)throw new pe(B.INVALID_ARGUMENT,`Function ${e}() cannot be called with an empty ${t}.`)}function ufe(e,t,n,r){if(t===!0&&r===!0)throw new pe(B.INVALID_ARGUMENT,`${e} and ${n} cannot be used together.`)}function bI(e){if(!me.isDocumentKey(e))throw new pe(B.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`)}function wI(e){if(me.isDocumentKey(e))throw new pe(B.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${e} has ${e.length}.`)}function H_(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";{const t=function(n){return n.constructor?n.constructor.name:null}(e);return t?`a custom ${t} object`:"an object"}}return typeof e=="function"?"a function":we()}function Wl(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new pe(B.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=H_(e);throw new pe(B.INVALID_ARGUMENT,`Expected type '${t.name}', but it was: ${n}`)}}return e}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class SI{constructor(t){var n,r;if(t.host===void 0){if(t.ssl!==void 0)throw new pe(B.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=t.host,this.ssl=(n=t.ssl)===null||n===void 0||n;if(this.credentials=t.credentials,this.ignoreUndefinedProperties=!!t.ignoreUndefinedProperties,this.cache=t.localCache,t.cacheSizeBytes===void 0)this.cacheSizeBytes=41943040;else{if(t.cacheSizeBytes!==-1&&t.cacheSizeBytes<1048576)throw new pe(B.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}ufe("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:t.experimentalAutoDetectLongPolling===void 0?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=d4((r=t.experimentalLongPollingOptions)!==null&&r!==void 0?r:{}),function(i){if(i.timeoutSeconds!==void 0){if(isNaN(i.timeoutSeconds))throw new pe(B.INVALID_ARGUMENT,`invalid long polling timeout: ${i.timeoutSeconds} (must not be NaN)`);if(i.timeoutSeconds<5)throw new pe(B.INVALID_ARGUMENT,`invalid long polling timeout: ${i.timeoutSeconds} (minimum allowed value is 5)`);if(i.timeoutSeconds>30)throw new pe(B.INVALID_ARGUMENT,`invalid long polling timeout: ${i.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!t.useFetchStreams}isEqual(t){return this.host===t.host&&this.ssl===t.ssl&&this.credentials===t.credentials&&this.cacheSizeBytes===t.cacheSizeBytes&&this.experimentalForceLongPolling===t.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===t.experimentalAutoDetectLongPolling&&(n=this.experimentalLongPollingOptions,r=t.experimentalLongPollingOptions,n.timeoutSeconds===r.timeoutSeconds)&&this.ignoreUndefinedProperties===t.ignoreUndefinedProperties&&this.useFetchStreams===t.useFetchStreams;var n,r}}class Qy{constructor(t,n,r,i){this._authCredentials=t,this._appCheckCredentials=n,this._databaseId=r,this._app=i,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new SI({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new pe(B.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!==void 0}_setSettings(t){if(this._settingsFrozen)throw new pe(B.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 SI(t),t.credentials!==void 0&&(this._authCredentials=function(n){if(!n)return new Tue;switch(n.type){case"firstParty":return new Rue(n.sessionIndex||"0",n.iamToken||null,n.authTokenFactory||null);case"provider":return n.client;default:throw new pe(B.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(t.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(t){const n=vI.get(t);n&&(fe("ComponentProvider","Removing Datastore"),vI.delete(t),n.terminate())}(this),Promise.resolve()}}function cfe(e,t,n,r={}){var i;const o=(e=Wl(e,Qy))._getSettings();if(o.host!=="firestore.googleapis.com"&&o.host!==t&&hu("Host has been set in both settings() and useEmulator(), emulator host will be used"),e._setSettings(Object.assign(Object.assign({},o),{host:`${t}:${n}`,ssl:!1})),r.mockUserToken){let s,a;if(typeof r.mockUserToken=="string")s=r.mockUserToken,a=On.MOCK_USER;else{s=Kie(r.mockUserToken,(i=e._app)===null||i===void 0?void 0:i.options.projectId);const l=r.mockUserToken.sub||r.mockUserToken.user_id;if(!l)throw new pe(B.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");a=new On(l)}e._authCredentials=new Pue(new pL(s,a))}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Jr{constructor(t,n,r){this.converter=n,this._key=r,this.type="document",this.firestore=t}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new _s(this.firestore,this.converter,this._key.path.popLast())}withConverter(t){return new Jr(this.firestore,t,this._key)}}class Yy{constructor(t,n,r){this.converter=n,this._query=r,this.type="query",this.firestore=t}withConverter(t){return new Yy(this.firestore,t,this._query)}}class _s extends Yy{constructor(t,n,r){super(t,n,I_(r)),this._path=r,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const t=this._path.popLast();return t.isEmpty()?null:new Jr(this.firestore,null,new me(t))}withConverter(t){return new _s(this.firestore,t,this._path)}}function Ln(e,t,...n){if(e=Wn(e),f4("collection","path",t),e instanceof Qy){const r=Ct.fromString(t,...n);return wI(r),new _s(e,null,r)}{if(!(e instanceof Jr||e instanceof _s))throw new pe(B.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=e._path.child(Ct.fromString(t,...n));return wI(r),new _s(e.firestore,null,r)}}function Ro(e,t,...n){if(e=Wn(e),arguments.length===1&&(t=mL.A()),f4("doc","path",t),e instanceof Qy){const r=Ct.fromString(t,...n);return bI(r),new Jr(e,null,new me(r))}{if(!(e instanceof Jr||e instanceof _s))throw new pe(B.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=e._path.child(Ct.fromString(t,...n));return bI(r),new Jr(e.firestore,e instanceof _s?e.converter:null,new me(r))}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class dfe{constructor(){this.Gc=Promise.resolve(),this.Qc=[],this.jc=!1,this.zc=[],this.Wc=null,this.Hc=!1,this.Jc=!1,this.Yc=[],this.qo=new QL(this,"async_queue_retry"),this.Xc=()=>{const n=n1();n&&fe("AsyncQueue","Visibility state changed to "+n.visibilityState),this.qo.Mo()};const t=n1();t&&typeof t.addEventListener=="function"&&t.addEventListener("visibilitychange",this.Xc)}get isShuttingDown(){return this.jc}enqueueAndForget(t){this.enqueue(t)}enqueueAndForgetEvenWhileRestricted(t){this.Zc(),this.ta(t)}enterRestrictedMode(t){if(!this.jc){this.jc=!0,this.Jc=t||!1;const n=n1();n&&typeof n.removeEventListener=="function"&&n.removeEventListener("visibilitychange",this.Xc)}}enqueue(t){if(this.Zc(),this.jc)return new Promise(()=>{});const n=new pa;return this.ta(()=>this.jc&&this.Jc?Promise.resolve():(t().then(n.resolve,n.reject),n.promise)).then(()=>n.promise)}enqueueRetryable(t){this.enqueueAndForget(()=>(this.Qc.push(t),this.ea()))}async ea(){if(this.Qc.length!==0){try{await this.Qc[0](),this.Qc.shift(),this.qo.reset()}catch(t){if(!Bf(t))throw t;fe("AsyncQueue","Operation failed with retryable error: "+t)}this.Qc.length>0&&this.qo.No(()=>this.ea())}}ta(t){const n=this.Gc.then(()=>(this.Hc=!0,t().catch(r=>{this.Wc=r,this.Hc=!1;const i=function(o){let s=o.message||"";return o.stack&&(s=o.stack.includes(o.message)?o.stack:o.message+`
`+o.stack),s}(r);throw Po("INTERNAL UNHANDLED ERROR: ",i),r}).then(r=>(this.Hc=!1,r))));return this.Gc=n,n}enqueueAfterDelay(t,n,r){this.Zc(),this.Yc.indexOf(t)>-1&&(n=0);const i=V_.createAndSchedule(this,t,n,r,o=>this.na(o));return this.zc.push(i),i}Zc(){this.Wc&&we()}verifyOperationInProgress(){}async sa(){let t;do t=this.Gc,await t;while(t!==this.Gc)}ia(t){for(const n of this.zc)if(n.timerId===t)return!0;return!1}ra(t){return this.sa().then(()=>{this.zc.sort((n,r)=>n.targetTimeMs-r.targetTimeMs);for(const n of this.zc)if(n.skipDelay(),t!=="all"&&n.timerId===t)break;return this.sa()})}oa(t){this.Yc.push(t)}na(t){const n=this.zc.indexOf(t);this.zc.splice(n,1)}}function xI(e){return function(t,n){if(typeof t!="object"||t===null)return!1;const r=t;for(const i of n)if(i in r&&typeof r[i]=="function")return!0;return!1}(e,["next","error","complete"])}class ef extends Qy{constructor(t,n,r,i){super(t,n,r,i),this.type="firestore",this._queue=new dfe,this._persistenceKey=(i==null?void 0:i.name)||"[DEFAULT]"}_terminate(){return this._firestoreClient||p4(this),this._firestoreClient.terminate()}}function ffe(e,t){const n=typeof e=="object"?e:AD(),r=typeof e=="string"?e:t||"(default)",i=Wx(n,"firestore").getImmediate({identifier:r});if(!i._initialized){const o=Hie("firestore");o&&cfe(i,...o)}return i}function h4(e){return e._firestoreClient||p4(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function p4(e){var t,n,r;const i=e._freezeSettings(),o=function(s,a,l,u){return new Uue(s,a,l,u.host,u.ssl,u.experimentalForceLongPolling,u.experimentalAutoDetectLongPolling,d4(u.experimentalLongPollingOptions),u.useFetchStreams)}(e._databaseId,((t=e._app)===null||t===void 0?void 0:t.options.appId)||"",e._persistenceKey,i);e._firestoreClient=new ofe(e._authCredentials,e._appCheckCredentials,e._queue,o),!((n=i.cache)===null||n===void 0)&&n._offlineComponentProvider&&(!((r=i.cache)===null||r===void 0)&&r._onlineComponentProvider)&&(e._firestoreClient._uninitializedComponentsProvider={_offlineKind:i.cache.kind,_offline:i.cache._offlineComponentProvider,_online:i.cache._onlineComponentProvider})}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class bu{constructor(t){this._byteString=t}static fromBase64String(t){try{return new bu(Hn.fromBase64String(t))}catch(n){throw new pe(B.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+n)}}static fromUint8Array(t){return new bu(Hn.fromUint8Array(t))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(t){return this._byteString.isEqual(t._byteString)}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class q_{constructor(...t){for(let n=0;n<t.length;++n)if(t[n].length===0)throw new pe(B.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new Mn(t)}isEqual(t){return this._internalPath.isEqual(t._internalPath)}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class m4{constructor(t){this._methodName=t}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class K_{constructor(t,n){if(!isFinite(t)||t<-90||t>90)throw new pe(B.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(n)||n<-180||n>180)throw new pe(B.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=t,this._long=n}get latitude(){return this._lat}get longitude(){return this._long}isEqual(t){return this._lat===t._lat&&this._long===t._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(t){return Ke(this._lat,t._lat)||Ke(this._long,t._long)}}/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */const hfe=/^__.*__$/;class pfe{constructor(t,n,r){this.data=t,this.fieldMask=n,this.fieldTransforms=r}toMutation(t,n){return this.fieldMask!==null?new Ma(t,this.data,this.fieldMask,n,this.fieldTransforms):new Uf(t,this.data,n,this.fieldTransforms)}}function g4(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw we()}}class G_{constructor(t,n,r,i,o,s){this.settings=t,this.databaseId=n,this.serializer=r,this.ignoreUndefinedProperties=i,o===void 0&&this.ua(),this.fieldTransforms=o||[],this.fieldMask=s||[]}get path(){return this.settings.path}get ca(){return this.settings.ca}aa(t){return new G_(Object.assign(Object.assign({},this.settings),t),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}ha(t){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(t),i=this.aa({path:r,la:!1});return i.fa(t),i}da(t){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(t),i=this.aa({path:r,la:!1});return i.ua(),i}wa(t){return this.aa({path:void 0,la:!0})}_a(t){return Zm(t,this.settings.methodName,this.settings.ma||!1,this.path,this.settings.ga)}contains(t){return this.fieldMask.find(n=>t.isPrefixOf(n))!==void 0||this.fieldTransforms.find(n=>t.isPrefixOf(n.field))!==void 0}ua(){if(this.path)for(let t=0;t<this.path.length;t++)this.fa(this.path.get(t))}fa(t){if(t.length===0)throw this._a("Document fields must not be empty");if(g4(this.ca)&&hfe.test(t))throw this._a('Document fields cannot begin and end with "__"')}}class mfe{constructor(t,n,r){this.databaseId=t,this.ignoreUndefinedProperties=n,this.serializer=r||qy(t)}ya(t,n,r,i=!1){return new G_({ca:t,methodName:n,ga:r,path:Mn.emptyPath(),la:!1,ma:i},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function gfe(e){const t=e._freezeSettings(),n=qy(e._databaseId);return new mfe(e._databaseId,!!t.ignoreUndefinedProperties,n)}function yfe(e,t,n,r,i,o={}){const s=e.ya(o.merge||o.mergeFields?2:0,t,n,i);w4("Data must be an object, but it was:",s,r);const a=v4(r,s);let l,u;if(o.merge)l=new di(s.fieldMask),u=s.fieldTransforms;else if(o.mergeFields){const c=[];for(const d of o.mergeFields){const f=vfe(t,d,n);if(!s.contains(f))throw new pe(B.INVALID_ARGUMENT,`Field '${f}' is specified in your field mask but missing from your input data.`);wfe(c,f)||c.push(f)}l=new di(c),u=s.fieldTransforms.filter(d=>l.covers(d.field))}else l=null,u=s.fieldTransforms;return new pfe(new Hr(a),l,u)}function y4(e,t){if(b4(e=Wn(e)))return w4("Unsupported field value:",t,e),v4(e,t);if(e instanceof m4)return function(n,r){if(!g4(r.ca))throw r._a(`${n._methodName}() can only be used with update() and set()`);if(!r.path)throw r._a(`${n._methodName}() is not currently supported inside arrays`);const i=n._toFieldTransform(r);i&&r.fieldTransforms.push(i)}(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.la&&t.ca!==4)throw t._a("Nested arrays are not supported");return function(n,r){const i=[];let o=0;for(const s of n){let a=y4(s,r.wa(o));a==null&&(a={nullValue:"NULL_VALUE"}),i.push(a),o++}return{arrayValue:{values:i}}}(e,t)}return function(n,r){if((n=Wn(n))===null)return{nullValue:"NULL_VALUE"};if(typeof n=="number")return fce(r.serializer,n);if(typeof n=="boolean")return{booleanValue:n};if(typeof n=="string")return{stringValue:n};if(n instanceof Date){const i=an.fromDate(n);return{timestampValue:Xm(r.serializer,i)}}if(n instanceof an){const i=new an(n.seconds,1e3*Math.floor(n.nanoseconds/1e3));return{timestampValue:Xm(r.serializer,i)}}if(n instanceof K_)return{geoPointValue:{latitude:n.latitude,longitude:n.longitude}};if(n instanceof bu)return{bytesValue:VL(r.serializer,n._byteString)};if(n instanceof Jr){const i=r.databaseId,o=n.firestore._databaseId;if(!o.isEqual(i))throw r._a(`Document reference is for database ${o.projectId}/${o.database} but should be for database ${i.projectId}/${i.database}`);return{referenceValue:N_(n.firestore._databaseId||r.databaseId,n._key.path)}}throw r._a(`Unsupported field value: ${H_(n)}`)}(e,t)}function v4(e,t){const n={};return gL(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):ju(e,(r,i)=>{const o=y4(i,t.ha(r));o!=null&&(n[r]=o)}),{mapValue:{fields:n}}}function b4(e){return!(typeof e!="object"||e===null||e instanceof Array||e instanceof Date||e instanceof an||e instanceof K_||e instanceof bu||e instanceof Jr||e instanceof m4)}function w4(e,t,n){if(!b4(n)||!function(r){return typeof r=="object"&&r!==null&&(Object.getPrototypeOf(r)===Object.prototype||Object.getPrototypeOf(r)===null)}(n)){const r=H_(n);throw r==="an object"?t._a(e+" a custom object"):t._a(e+" "+r)}}function vfe(e,t,n){if((t=Wn(t))instanceof q_)return t._internalPath;if(typeof t=="string")return S4(e,t);throw Zm("Field path arguments must be of type string or ",e,!1,void 0,n)}const bfe=new RegExp("[~\\*/\\[\\]]");function S4(e,t,n){if(t.search(bfe)>=0)throw Zm(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,e,!1,void 0,n);try{return new q_(...t.split("."))._internalPath}catch{throw Zm(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,e,!1,void 0,n)}}function Zm(e,t,n,r,i){const o=r&&!r.isEmpty(),s=i!==void 0;let a=`Function ${t}() called with invalid data`;n&&(a+=" (via `toFirestore()`)"),a+=". ";let l="";return(o||s)&&(l+=" (found",o&&(l+=` in field ${r}`),s&&(l+=` in document ${i}`),l+=")"),new pe(B.INVALID_ARGUMENT,a+e+l)}function wfe(e,t){return e.some(n=>n.isEqual(t))}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class x4{constructor(t,n,r,i,o){this._firestore=t,this._userDataWriter=n,this._key=r,this._document=i,this._converter=o}get id(){return this._key.path.lastSegment()}get ref(){return new Jr(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const t=new Sfe(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(t)}return this._userDataWriter.convertValue(this._document.data.value)}}get(t){if(this._document){const n=this._document.data.field(_4("DocumentSnapshot.get",t));if(n!==null)return this._userDataWriter.convertValue(n)}}}class Sfe extends x4{data(){return super.data()}}function _4(e,t){return typeof t=="string"?S4(e,t):t instanceof q_?t._internalPath:t._delegate._internalPath}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function xfe(e){if(e.limitType==="L"&&e.explicitOrderBy.length===0)throw new pe(B.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class _fe{convertValue(t,n="none"){switch(Ta(t)){case 0:return null;case 1:return t.booleanValue;case 2:return Xt(t.integerValue||t.doubleValue);case 3:return this.convertTimestamp(t.timestampValue);case 4:return this.convertServerTimestamp(t,n);case 5:return t.stringValue;case 6:return this.convertBytes(ka(t.bytesValue));case 7:return this.convertReference(t.referenceValue);case 8:return this.convertGeoPoint(t.geoPointValue);case 9:return this.convertArray(t.arrayValue,n);case 10:return this.convertObject(t.mapValue,n);default:throw we()}}convertObject(t,n){return this.convertObjectMap(t.fields,n)}convertObjectMap(t,n="none"){const r={};return ju(t,(i,o)=>{r[i]=this.convertValue(o,n)}),r}convertGeoPoint(t){return new K_(Xt(t.latitude),Xt(t.longitude))}convertArray(t,n){return(t.values||[]).map(r=>this.convertValue(r,n))}convertServerTimestamp(t,n){switch(n){case"previous":const r=E_(t);return r==null?null:this.convertValue(r,n);case"estimate":return this.convertTimestamp(Qd(t));default:return null}}convertTimestamp(t){const n=Rs(t);return new an(n.seconds,n.nanos)}convertDocumentKey(t,n){const r=Ct.fromString(t);gt(qL(r));const i=new Yd(r.get(1),r.get(3)),o=new me(r.popFirst(5));return i.isEqual(n)||Po(`Document ${o} contains a document reference within a different database (${i.projectId}/${i.database}) which is not supported. It will be treated as a reference in the current database (${n.projectId}/${n.database}) instead.`),o}}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */function Cfe(e,t,n){let r;return r=e?n&&(n.merge||n.mergeFields)?e.toFirestore(t,n):e.toFirestore(t):t,r}/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */class Ac{constructor(t,n){this.hasPendingWrites=t,this.fromCache=n}isEqual(t){return this.hasPendingWrites===t.hasPendingWrites&&this.fromCache===t.fromCache}}class C4 extends x4{constructor(t,n,r,i,o,s){super(t,n,r,i,s),this._firestore=t,this._firestoreImpl=t,this.metadata=o}exists(){return super.exists()}data(t={}){if(this._document){if(this._converter){const n=new Ip(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(n,t)}return this._userDataWriter.convertValue(this._document.data.value,t.serverTimestamps)}}get(t,n={}){if(this._document){const r=this._document.data.field(_4("DocumentSnapshot.get",t));if(r!==null)return this._userDataWriter.convertValue(r,n.serverTimestamps)}}}class Ip extends C4{data(t={}){return super.data(t)}}class Efe{constructor(t,n,r,i){this._firestore=t,this._userDataWriter=n,this._snapshot=i,this.metadata=new Ac(i.hasPendingWrites,i.fromCache),this.query=r}get docs(){const t=[];return this.forEach(n=>t.push(n)),t}get size(){return this._snapshot.docs.size}get empty(){return this.size===0}forEach(t,n){this._snapshot.docs.forEach(r=>{t.call(n,new Ip(this._firestore,this._userDataWriter,r.key,r,new Ac(this._snapshot.mutatedKeys.has(r.key),this._snapshot.fromCache),this.query.converter))})}docChanges(t={}){const n=!!t.includeMetadataChanges;if(n&&this._snapshot.excludesMetadataChanges)throw new pe(B.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===n||(this._cachedChanges=function(r,i){if(r._snapshot.oldDocs.isEmpty()){let o=0;return r._snapshot.docChanges.map(s=>{const a=new Ip(r._firestore,r._userDataWriter,s.doc.key,s.doc,new Ac(r._snapshot.mutatedKeys.has(s.doc.key),r._snapshot.fromCache),r.query.converter);return s.doc,{type:"added",doc:a,oldIndex:-1,newIndex:o++}})}{let o=r._snapshot.oldDocs;return r._snapshot.docChanges.filter(s=>i||s.type!==3).map(s=>{const a=new Ip(r._firestore,r._userDataWriter,s.doc.key,s.doc,new Ac(r._snapshot.mutatedKeys.has(s.doc.key),r._snapshot.fromCache),r.query.converter);let l=-1,u=-1;return s.type!==0&&(l=o.indexOf(s.doc.key),o=o.delete(s.doc.key)),s.type!==1&&(o=o.add(s.doc),u=o.indexOf(s.doc.key)),{type:kfe(s.type),doc:a,oldIndex:l,newIndex:u}})}}(this,n),this._cachedChangesIncludeMetadataChanges=n),this._cachedChanges}}function kfe(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return we()}}class E4 extends _fe{constructor(t){super(),this.firestore=t}convertBytes(t){return new bu(t)}convertReference(t){const n=this.convertDocumentKey(t,this.firestore._databaseId);return new Jr(this.firestore,null,n)}}function Os(e){return k4(Wl(e.firestore,ef),[new A_(e._key,Wi.none())])}function Xy(e,t){const n=Wl(e.firestore,ef),r=Ro(e),i=Cfe(e.converter,t);return k4(n,[yfe(gfe(e.firestore),"addDoc",r._key,i,e.converter!==null,{}).toMutation(r._key,Wi.exists(!1))]).then(()=>r)}function zh(e,...t){var n,r,i;e=Wn(e);let o={includeMetadataChanges:!1},s=0;typeof t[s]!="object"||xI(t[s])||(o=t[s],s++);const a={includeMetadataChanges:o.includeMetadataChanges};if(xI(t[s])){const d=t[s];t[s]=(n=d.next)===null||n===void 0?void 0:n.bind(d),t[s+1]=(r=d.error)===null||r===void 0?void 0:r.bind(d),t[s+2]=(i=d.complete)===null||i===void 0?void 0:i.bind(d)}let l,u,c;if(e instanceof Jr)u=Wl(e.firestore,ef),c=I_(e._key.path),l={next:d=>{t[s]&&t[s](Tfe(u,e,d))},error:t[s+1],complete:t[s+2]};else{const d=Wl(e,Yy);u=Wl(d.firestore,ef),c=d._query;const f=new E4(u);l={next:h=>{t[s]&&t[s](new Efe(u,f,d,h))},error:t[s+1],complete:t[s+2]},xfe(e._query)}return function(d,f,h,p){const y=new ife(p),S=new zde(f,y,h);return d.asyncQueue.enqueueAndForget(async()=>Mde(await yI(d),S)),()=>{y.Dc(),d.asyncQueue.enqueueAndForget(async()=>Lde(await yI(d),S))}}(h4(u),c,a,l)}function k4(e,t){return function(n,r){const i=new pa;return n.asyncQueue.enqueueAndForget(async()=>Gde(await lfe(n),r,i)),i.promise}(h4(e),t)}function Tfe(e,t,n){const r=n.docs.get(t._key),i=new E4(e);return new C4(e,i,t._key,r,new Ac(n.hasPendingWrites,n.fromCache),t.converter)}(function(e,t=!0){(function(n){Lu=n})(Ru),cu(new Sa("firestore",(n,{instanceIdentifier:r,options:i})=>{const o=n.getProvider("app").getImmediate(),s=new ef(new Iue(n.getProvider("auth-internal")),new Oue(n.getProvider("app-check-internal")),function(a,l){if(!Object.prototype.hasOwnProperty.apply(a.options,["projectId"]))throw new pe(B.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Yd(a.options.projectId,l)}(o,r),o);return i=Object.assign({useFetchStreams:t},i),s._setSettings(i),s},"PUBLIC").setMultipleInstances(!0)),xs(VP,"3.12.1",e),xs(VP,"3.12.1","esm2017")})();const Pfe={apiKey:"AIzaSyC2CJyU3dFWF94QTau62rdu3m-SvatawRo",authDomain:"flix-hive.firebaseapp.com",projectId:"flix-hive",storageBucket:"flix-hive.appspot.com",messagingSenderId:"495543220024",appId:"1:495543220024:web:fe29e6433c1e9d9a5473cd"},T4=ID(Pfe),jn=ffe(T4),P4=yle(T4);function Ife(){const[e,t]=w.useState();return w.useEffect(()=>iae(P4,r=>{t(r||null)}),[]),e}const I4=async(e,t)=>{try{await oae(P4),localStorage.removeItem("saveAuth"),sessionStorage.removeItem("saveAuth"),e()}catch{t("Error")}};let Afe=({})=>{var s,a;const[e,t]=w.useState(!1),{auth:n}=Yt(l=>l.auth),r=qg(),i=Tu(),o=()=>{I4(()=>{i("/"),au(r,"Log Out","Successfully")},l=>{ar(r,"Log Out Fail",l)})};return g.jsxs(rn,{p:"20px 5%",alignItems:"flex-end",children:[g.jsxs(Ze,{w:"100%",justifyContent:"space-between",children:[g.jsx(dr,{fontFamily:"Playfair",color:"brand.500",fontSize:"xl",fontWeight:"bold",children:"FlixHive"}),g.jsxs(Ze,{gap:"30px",children:[g.jsx(Ft,{to:"/",children:g.jsx(Q,{fontFamily:"Nunito",fontSize:"xs",color:"text.100",children:"Home"})}),g.jsx(Ft,{to:"/movie",children:g.jsx(Q,{fontFamily:"Nunito",fontSize:"xs",color:"text.100",children:"Movies"})}),g.jsx(Ft,{to:"/series",children:g.jsx(Q,{fontFamily:"Nunito",fontSize:"xs",color:"text.100",children:"TV Series"})}),g.jsxs(Ze,{as:"button",onClick:()=>{t(!e)},children:[g.jsx(Q,{fontFamily:"Nunito",fontSize:"xs",color:"text.100",children:"Genre"}),g.jsx(CJ,{color:"text.100",transitionDuration:"300ms",fontSize:"rg",transform:e?"rotate(180deg)":"rotate(0deg)"})]}),g.jsx(Ft,{to:"/contact",children:g.jsx(Q,{fontFamily:"Nunito",fontSize:"xs",color:"text.100",children:"Contact Us"})}),n!=null?g.jsxs(g.Fragment,{children:[g.jsxs(Ze,{align:"center",as:Ft,to:"/profile",children:[g.jsx(fx,{src:(n==null?void 0:n.photoURL)||void 0,w:"40px",height:"40px"}),g.jsxs(rn,{align:"flex-start",gap:"0px",children:[g.jsx(Q,{lineHeight:"50%",fontFamily:"Nunito",fontSize:"xxs",color:"text.100",children:"Hi,"}),g.jsx(Q,{lineHeight:"50%",fontFamily:"Nunito",fontSize:"xs",color:"text.100",children:(s=n.displayName)==null?void 0:s.split(/\s/)[0]})]})]}),g.jsx(Cn,{fontFamily:"Nunito",fontSize:"xs",p:"0px 15px",height:"35px",color:"dark.700",bgColor:"brand.400",_hover:{bgColor:"brand.500"},onClick:()=>{o()},children:"Log Out"})]}):g.jsxs(g.Fragment,{children:[g.jsx(Ft,{to:"/log-in",children:g.jsx(Cn,{fontFamily:"Nunito",fontSize:"xs",p:"0px 15px",height:"35px",border:"1px",color:"text.100",bgColor:"transparent",_hover:{bgColor:"dark.900"},children:"Sign In"})}),g.jsx(Ft,{to:"/sign-up",children:g.jsx(Cn,{fontFamily:"Nunito",fontSize:"xs",p:"0px 15px",height:"35px",color:"dark.700",bgColor:"brand.400",_hover:{bgColor:"brand.500"},children:"Sign Up"})})]})]})]}),g.jsx(k5,{in:e,animateOpacity:!0,children:g.jsx(Ze,{ml:"45%",w:"55%",flexWrap:"wrap",gap:"1px",justify:"end",children:(a=bN.genres)==null?void 0:a.map((l,u)=>g.jsx(Ft,{to:`/genre/${l.id}`,children:g.jsx(Q,{fontFamily:"Nunito",fontWeight:"medium",fontSize:"xxs",color:"text.200",children:l.name})},u))})})]})};var Q_={},Rfe=Nr;Object.defineProperty(Q_,"__esModule",{value:!0});var A4=Q_.default=void 0;Nfe(w);var $fe=Rfe(Dr()),Ofe=g;function R4(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(R4=function(r){return r?n:t})(e)}function Nfe(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=R4(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}var Dfe=(0,$fe.default)((0,Ofe.jsx)("path",{d:"M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2m13 2h-2.5A3.5 3.5 0 0 0 12 8.5V11h-2v3h2v7h3v-7h3v-3h-3V9a1 1 0 0 1 1-1h2V5z"}),"Facebook");A4=Q_.default=Dfe;var Y_={},Mfe=Nr;Object.defineProperty(Y_,"__esModule",{value:!0});var $4=Y_.default=void 0;Ffe(w);var Lfe=Mfe(Dr()),jfe=g;function O4(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(O4=function(r){return r?n:t})(e)}function Ffe(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=O4(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}var zfe=(0,Lfe.default)((0,jfe.jsx)("path",{d:"M7.8 2h8.4C19.4 2 22 4.6 22 7.8v8.4a5.8 5.8 0 0 1-5.8 5.8H7.8C4.6 22 2 19.4 2 16.2V7.8A5.8 5.8 0 0 1 7.8 2m-.2 2A3.6 3.6 0 0 0 4 7.6v8.8C4 18.39 5.61 20 7.6 20h8.8a3.6 3.6 0 0 0 3.6-3.6V7.6C20 5.61 18.39 4 16.4 4H7.6m9.65 1.5a1.25 1.25 0 0 1 1.25 1.25A1.25 1.25 0 0 1 17.25 8 1.25 1.25 0 0 1 16 6.75a1.25 1.25 0 0 1 1.25-1.25M12 7a5 5 0 0 1 5 5 5 5 0 0 1-5 5 5 5 0 0 1-5-5 5 5 0 0 1 5-5m0 2a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3z"}),"Instagram");$4=Y_.default=zfe;var X_={},Vfe=Nr;Object.defineProperty(X_,"__esModule",{value:!0});var N4=X_.default=void 0;Wfe(w);var Bfe=Vfe(Dr()),Ufe=g;function D4(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(D4=function(r){return r?n:t})(e)}function Wfe(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=D4(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}var Hfe=(0,Bfe.default)((0,Ufe.jsx)("path",{d:"M19 3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14m-.5 15.5v-5.3a3.26 3.26 0 0 0-3.26-3.26c-.85 0-1.84.52-2.32 1.3v-1.11h-2.79v8.37h2.79v-4.93c0-.77.62-1.4 1.39-1.4a1.4 1.4 0 0 1 1.4 1.4v4.93h2.79M6.88 8.56a1.68 1.68 0 0 0 1.68-1.68c0-.93-.75-1.69-1.68-1.69a1.69 1.69 0 0 0-1.69 1.69c0 .93.76 1.68 1.69 1.68m1.39 9.94v-8.37H5.5v8.37h2.77z"}),"LinkedIn");N4=X_.default=Hfe;const qfe="/assets/MovieCam-29284868.png";let Kfe=({})=>g.jsxs(Ze,{w:"100%",h:"300px",bgColor:"rgb(54, 52, 53,0.4)",p:"0px 5%",justifyContent:"space-between",children:[g.jsxs(Ze,{children:[g.jsx(Ft,{to:"/",children:g.jsx(Oa,{src:qfe})}),g.jsxs(yr,{children:[g.jsx(Ft,{to:"/",children:g.jsx(dr,{fontSize:"xxl",fontFamily:"Playfair",color:"brand.400",children:"FlixHive"})}),g.jsx(Q,{fontSize:"xs",fontWeight:"regular",fontFamily:"Nunito",color:"brand.400",children:"Share our site with your friends and help us grow"})]})]}),g.jsxs(yr,{children:[g.jsx(Q,{fontSize:"sm",fontWeight:"regular",fontFamily:"Nunito",color:"text.200",children:"Connect with us"}),g.jsxs(Ft,{to:"https://www.facebook.com/prajwolxhettry/",target:"blank",children:[" ",g.jsx(zt,{as:A4,fontSize:"md",color:"text.400"})]}),g.jsxs(Ft,{to:"https://www.instagram.com/iamprajwolneupane/?hl=en",target:"blank",children:[" ",g.jsx(zt,{as:$4,fontSize:"md",m:"0px 16px",color:"text.400"})]}),g.jsxs(Ft,{to:"https://www.linkedin.com/in/prajwol-neupane-b64418208/",target:"blank",children:[" ",g.jsx(zt,{as:N4,fontSize:"md",color:"text.400"})]})]})]}),Gfe=({})=>g.jsxs(yr,{bg:`linear-gradient(rgb(31, 29, 31,0.98),rgb(31, 29, 31,0.98)),url(${HJ})`,bgAttachment:"fixed",children:[g.jsx(Afe,{}),g.jsx(qR,{}),g.jsx(Kfe,{})]});const Qfe="/assets/Groot-46048bb0.png";let Yfe=({})=>{const{register:e,handleSubmit:t}=Z5(),n=t(r=>{console.log({...r})});return g.jsxs(rn,{w:"100%",h:"90vh",alignItems:"center",justifyContent:"center",children:[g.jsxs(rn,{bgColor:"dark.800",borderRadius:"10px",w:"35%",p:"40px 30px",alignItems:"flex-start",as:"form",onSubmit:n,children:[g.jsx(dr,{fontFamily:"Nunito",fontSize:"md",fontWeight:"semibold",color:"text.300",children:"Lets get connected !"}),g.jsx(P2,{register:e,type:"text",name:"name",label:"Name",placeholder:"Full Name"}),g.jsx(P2,{register:e,type:"text",name:"email",label:"Email",placeholder:"Email Address"}),g.jsx(Q,{fontFamily:"Nunito",fontSize:"xxs",color:"text.500",children:"Message"}),g.jsx(W5,{fontFamily:"Nunito",fontWeight:"regular",_placeholder:{color:"text.500"},placeholder:"Hello I am under the water",bgColor:"dark.700",border:"none",outline:"none",_focusVisible:{outlineColor:"white",outlineWidth:"1px"},fontSize:"xs",color:"text.500",height:"150px",resize:"none"}),g.jsx(Cn,{w:"100%",type:"submit",bgColor:"brand.400",color:"dark.800",_hover:{bgColor:"brand.500"},fontSize:"xs",fontWeight:"semibold",children:"Send"})]}),g.jsx(Oa,{src:Qfe,position:"absolute",left:"0px",top:"31.5%",width:"300px"})]})},_I=["Animation","Comdedy","Adventure"],M4=({})=>g.jsx(yr,{w:"100%",p:"3vh 5%",bg:"linear-gradient(rgb(31, 29, 31,0.5),rgb(31, 29, 31,0.9)),linear-gradient(to right,rgb(31, 29, 31,0.5),rgb(31, 29, 31,0.5),rgb(31, 29, 31,0.9)),url(https://image.tmdb.org/t/p/original/h8gHn0OzBoaefsYseUByqsmEDMY.jpg)",bgPosition:"center",bgSize:"cover",children:g.jsxs(Ze,{h:"400px",gap:"20%",children:[g.jsxs(rn,{w:"50%",alignItems:"flex-start",children:[g.jsx(dr,{fontFamily:"Nunito",fontWeight:"semibold",color:"text.200",fontSize:"lg",children:"John Wick: Chapter 4"}),g.jsx(Q,{fontFamily:"Nunito",fontWeight:"medium",color:"brand.400",fontSize:"xs",children:"2023-03-22"}),g.jsx(Ze,{children:_I.map((e,t)=>t==_I.length-1?g.jsx(Q,{fontFamily:"Nunito",fontWeight:"medium",color:"brand.400",fontSize:"xs",children:e}):g.jsxs(g.Fragment,{children:[g.jsx(Q,{fontFamily:"Nunito",fontWeight:"bold",color:"brand.400",fontSize:"xs",children:e}),g.jsx(Q,{fontFamily:"Nunito",fontWeight:"bold",color:"brand.400",fontSize:"md",children:"·"})]}))}),g.jsx(Q,{fontFamily:"Nunito",fontWeight:"regular",color:"text.100",fontSize:"xs",children:"With the price on his head ever increasing, John Wick uncovers a path to defeating The High Table. But before he can earn his freedom, Wick must face off against a new enemy with powerful alliances across the globe and forces that turn old friends into foes."}),g.jsx(Cn,{w:"150px",type:"submit",bgColor:"brand.400",color:"dark.700",_hover:{bgColor:"brand.500"},fontSize:"xs",fontWeight:"semibold",children:"Watch Now"})]}),g.jsx(Oa,{src:"https://image.tmdb.org/t/p/original/vZloFAK7NmvMGKE7VkF5UHaz0I.jpg",width:"20%",borderRadius:"5px"})]})});var J_={},Xfe=Nr;Object.defineProperty(J_,"__esModule",{value:!0});var Z_=J_.default=void 0,Jfe=Xfe(Dr()),CI=g,Zfe=(0,Jfe.default)([(0,CI.jsx)("path",{d:"m12 12.9-2.13 2.09c-.56.56-.87 1.29-.87 2.07C9 18.68 10.35 20 12 20s3-1.32 3-2.94c0-.78-.31-1.52-.87-2.07L12 12.9z"},"0"),(0,CI.jsx)("path",{d:"m16 6-.44.55C14.38 8.02 12 7.19 12 5.3V2S4 6 4 13c0 2.92 1.56 5.47 3.89 6.86-.56-.79-.89-1.76-.89-2.8 0-1.32.52-2.56 1.47-3.5L12 10.1l3.53 3.47c.95.93 1.47 2.17 1.47 3.5 0 1.02-.31 1.96-.85 2.75 1.89-1.15 3.29-3.06 3.71-5.3.66-3.55-1.07-6.9-3.86-8.52z"},"1")],"LocalFireDepartment");Z_=J_.default=Zfe;var eC={},ehe=Nr;Object.defineProperty(eC,"__esModule",{value:!0});var tC=eC.default=void 0,the=ehe(Dr()),nhe=g,rhe=(0,the.default)((0,nhe.jsx)("path",{d:"m18 4 2 3h-3l-2-3h-2l2 3h-3l-2-3H8l2 3H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4zm-6.75 11.25L10 18l-1.25-2.75L6 14l2.75-1.25L10 10l1.25 2.75L14 14l-2.75 1.25zm5.69-3.31L16 14l-.94-2.06L13 11l2.06-.94L16 8l.94 2.06L19 11l-2.06.94z"}),"MovieFilter");tC=eC.default=rhe;var nC={},ihe=Nr;Object.defineProperty(nC,"__esModule",{value:!0});var rC=nC.default=void 0,ohe=ihe(Dr()),she=g,ahe=(0,ohe.default)((0,she.jsx)("path",{d:"M14.43 10 12 2l-2.43 8H2l6.18 4.41L5.83 22 12 17.31 18.18 22l-2.35-7.59L22 10z"}),"StarRate");rC=nC.default=ahe;var iC={},lhe=Nr;Object.defineProperty(iC,"__esModule",{value:!0});var oC=iC.default=void 0,uhe=lhe(Dr()),che=g,dhe=(0,uhe.default)((0,che.jsx)("path",{d:"M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5z"}),"CallMade");oC=iC.default=dhe;let Gr=({icon:e,title:t,movieData:n,page:r,appendData:i,seiresData:o,defaultLimit:s})=>{const[a,l]=w.useState(s||7);return n!=null?g.jsxs(yr,{w:"100%",p:"25px 0%",children:[g.jsxs(Ze,{children:[g.jsx(zt,{as:e,color:"brand.500",fontSize:"xxl"}),g.jsx(dr,{color:"text.100",fontFamily:"Nunito",fontWeight:"semibold",fontSize:"md",children:t})]}),g.jsx(Ze,{p:"30px 0px",gap:"15px",flexWrap:"wrap",alignItems:"center",justifyContent:"start",children:n==null?void 0:n.slice(0,a).map((u,c)=>g.jsx(I2,{isMovie:!0,title:u.title,image:u.poster_path,date:u.release_date,genre:[u==null?void 0:u.genre_ids["0"],u==null?void 0:u.genre_ids["1"]],id:u==null?void 0:u.id},c))}),g.jsx(Q,{onClick:()=>{l(a+7),a>(n==null?void 0:n.length)&&i(r)},position:"absolute",cursor:"pointer",fontSize:"xs",right:"7%",color:"brand.400",fontFamily:"Nunito",children:"See More"})]}):o!=null?g.jsxs(yr,{w:"100%",p:"25px 0%",children:[g.jsxs(Ze,{children:[g.jsx(zt,{as:e,color:"brand.500",fontSize:"xxl"}),g.jsx(dr,{color:"text.100",fontFamily:"Nunito",fontWeight:"semibold",fontSize:"md",children:t})]}),g.jsx(Ze,{p:"30px 0px",gap:"15px",flexWrap:"wrap",alignItems:"center",justifyContent:"start",children:o==null?void 0:o.slice(0,a).map((u,c)=>g.jsx(I2,{isMovie:!1,title:u.name,image:u.poster_path,date:u.first_air_date,genre:[u==null?void 0:u.genre_ids["0"],u==null?void 0:u.genre_ids["1"]],id:u==null?void 0:u.id},c))}),g.jsx(Q,{onClick:()=>{l(a+7),a>(o==null?void 0:o.length)&&i(r)},position:"absolute",cursor:"pointer",fontSize:"xs",right:"7%",color:"brand.400",fontFamily:"Nunito",children:"See More"})]}):g.jsx(g.Fragment,{})},fhe=({})=>{const e=wy(),{trendingMovie:t}=Yt(o=>o.movieList),{popularMovie:n}=Yt(o=>o.movieList),{upComingMovie:r}=Yt(o=>o.movieList),{topRatedMovie:i}=Yt(o=>o.movieList);return g.jsxs(g.Fragment,{children:[g.jsx(M4,{}),g.jsxs(yr,{w:"100%",p:"25px 5%",children:[g.jsx(Gr,{icon:Z_,title:"Now Trending",movieData:t==null?void 0:t.trendingMovieList,page:t==null?void 0:t.page,appendData:o=>e(Fre(o+1))}),g.jsx(Gr,{icon:oC,title:"Up Coming",movieData:r==null?void 0:r.upComingMovieList,page:r==null?void 0:r.page,appendData:o=>e(jre(o+1))}),g.jsx(Gr,{icon:tC,title:"Popular",movieData:n==null?void 0:n.popularMoiveList,page:n==null?void 0:n.page,appendData:o=>e(Lre(o+1))}),g.jsx(Gr,{icon:rC,title:"Top Rated",movieData:i==null?void 0:i.topRatedMovieList,page:i==null?void 0:i.page,appendData:o=>e(zre(o+1))})]})]})},hhe=({})=>{const e=Ife(),t=localStorage.getItem("saveAuth"),n=sessionStorage.getItem("saveAuth"),r=wy(),[i,o]=w.useState(!0);return w.useEffect(()=>{const s=async()=>{const c=Ln(jn,`${e==null?void 0:e.uid}/like/movie`);zh(c,d=>{var f=d.docs.map(h=>({documentId:h.id,...h.data()}));r(Oie(f))})},a=async()=>{const c=Ln(jn,`${e==null?void 0:e.uid}/watchlater/movie`);zh(c,d=>{var f=d.docs.map(h=>({documentId:h.id,...h.data()}));r(Nie(f))})},l=async()=>{const c=Ln(jn,`${e==null?void 0:e.uid}/like/series`);zh(c,d=>{var f=d.docs.map(h=>({documentId:h.id,...h.data()}));r(Die(f))})},u=async()=>{const c=Ln(jn,`${e==null?void 0:e.uid}/watchlater/series`);zh(c,d=>{var f=d.docs.map(h=>({documentId:h.id,...h.data()}));r(Mie(f))})};e&&(s(),a(),l(),u())},[e]),w.useEffect(()=>{o(!0),t=="true"||n=="true"?r(Rv(e||null)):r(Rv(null)),setTimeout(()=>{o(!1)},1e3)},[e,t,n]),g.jsx(g.Fragment,{children:i?g.jsx(g.Fragment,{children:g.jsx("h1",{children:"Loading"})}):g.jsx(qR,{})})},phe=({})=>{const e=wy(),{popularSeries:t,topRatedSeries:n,trendingSeries:r,upComingSeries:i}=Yt(o=>o.seriesList);return g.jsxs(g.Fragment,{children:[g.jsx(M4,{}),g.jsxs(yr,{w:"100%",p:"25px 5%",children:[g.jsx(Gr,{icon:Z_,title:"Now Trending",seiresData:r==null?void 0:r.trendingSeriesList,page:r==null?void 0:r.page,appendData:o=>e(Aie(o+1))}),g.jsx(Gr,{icon:oC,title:"Up Coming",seiresData:i==null?void 0:i.upComingSeriesList,page:i==null?void 0:i.page,appendData:o=>e(Pie(o+1))}),g.jsx(Gr,{icon:tC,title:"Popular",seiresData:t==null?void 0:t.popularSeriesList,page:t==null?void 0:t.page,appendData:o=>e(Tie(o+1))}),g.jsx(Gr,{icon:rC,title:"Top Rated",seiresData:n==null?void 0:n.topRatedSeriesList,page:n==null?void 0:n.page,appendData:o=>e(Iie(o+1))})]})]})};var sC={},mhe=Nr;Object.defineProperty(sC,"__esModule",{value:!0});var aC=sC.default=void 0;vhe(w);var ghe=mhe(Dr()),yhe=g;function L4(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(L4=function(r){return r?n:t})(e)}function vhe(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=L4(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}var bhe=(0,ghe.default)((0,yhe.jsx)("path",{transform:"scale(0.5, 0.5)",d:"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm-4 29V15l12 9-12 9z"}),"PlayCircleFilledWhite");aC=sC.default=bhe;var lC={},whe=Nr;Object.defineProperty(lC,"__esModule",{value:!0});var eg=lC.default=void 0,She=whe(Dr()),xhe=g,_he=(0,She.default)((0,xhe.jsx)("path",{d:"M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3zm-4.4 15.55-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05z"}),"FavoriteBorder");eg=lC.default=_he;var uC={},Che=Nr;Object.defineProperty(uC,"__esModule",{value:!0});var j4=uC.default=void 0,Ehe=Che(Dr()),khe=g,The=(0,Ehe.default)((0,khe.jsx)("path",{d:"m12 21.35-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"}),"Favorite");j4=uC.default=The;var cC={},Phe=Nr;Object.defineProperty(cC,"__esModule",{value:!0});var tf=cC.default=void 0,Ihe=Phe(Dr()),Ahe=g,Rhe=(0,Ihe.default)((0,Ahe.jsx)("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.2 3.2.8-1.3-4.5-2.7V7z"}),"WatchLaterOutlined");tf=cC.default=Rhe;var dC={},$he=Nr;Object.defineProperty(dC,"__esModule",{value:!0});var nf=dC.default=void 0,Ohe=$he(Dr()),Nhe=g,Dhe=(0,Ohe.default)((0,Nhe.jsx)("path",{d:"M21 6h-7.59l3.29-3.29L16 2l-4 4-4-4-.71.71L10.59 6H3c-1.1 0-2 .89-2 2v12c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.11-.9-2-2-2zm0 14H3V8h18v12zM9 10v8l7-4z"}),"LiveTv");nf=dC.default=Dhe;const Mhe=(e,t,n,r)=>{const i=Ln(jn,`${e}/like/movie`);Xy(i,{...t}).then(()=>{n()}).catch(o=>{r(o)})},Lhe=(e,t,n,r,i)=>{var o=ty(t,n);if(o){const s=Ln(jn,`${e}/like/movie`);Os(Ro(s,t[o].documentId)).then(()=>{r(o)}).catch(a=>{i(a.message)})}else{const s=Ln(jn,`${e}/like/movie`);Os(Ro(s,t[0].documentId)).then(()=>{r(o)}).catch(a=>{i(a.message)})}},jhe=(e,t,n,r)=>{const i=Ln(jn,`${e}/watchlater/movie`);Xy(i,{...t}).then(()=>{n()}).catch(o=>{r(o)})},Fhe=(e,t,n,r,i)=>{var o=ty(t,n);if(o){const s=Ln(jn,`${e}/watchlater/movie`);Os(Ro(s,t[o].documentId)).then(()=>{r(o)}).catch(a=>{i(a.message)})}else{const s=Ln(jn,`${e}/watchlater/movie`);Os(Ro(s,t[0].documentId)).then(()=>{r(o)}).catch(a=>{i(a.message)})}},zhe=(e,t,n,r)=>{const i=Ln(jn,`${e}/like/series`);Xy(i,{...t}).then(()=>{n()}).catch(o=>{r(o)})},Vhe=(e,t,n,r,i)=>{var o=ty(t,n);if(o){const s=Ln(jn,`${e}/like/series`);Os(Ro(s,t[o].documentId)).then(()=>{r(o)}).catch(a=>{i(a.message)})}else{const s=Ln(jn,`${e}/like/series`);Os(Ro(s,t[0].documentId)).then(()=>{r(o)}).catch(a=>{i(a.message)})}},Bhe=(e,t,n,r)=>{const i=Ln(jn,`${e}/watchlater/series`);Xy(i,{...t}).then(()=>{n()}).catch(o=>{r(o)})},Uhe=(e,t,n,r,i)=>{var o=ty(t,n);if(o){const s=Ln(jn,`${e}/watchlater/series`);Os(Ro(s,t[o].documentId)).then(()=>{r(o)}).catch(a=>{i(a.message)})}else{const s=Ln(jn,`${e}/watchlater/series`);Os(Ro(s,t[0].documentId)).then(()=>{r(o)}).catch(a=>{i(a.message)})}};let Whe=({})=>{var C,k;const{id:e}=xS(),{auth:t}=Yt(x=>x.auth),n=qg(),{likeMovie:r,watchLaterMovie:i}=Yt(x=>x.firestoreMovie),o=Tu(),[s,a]=w.useState(),[l,u]=w.useState(),[c,d]=w.useState(1),[f,h]=w.useState([]),[p,y]=w.useState(!1),[S,v]=w.useState(!1);w.useEffect(()=>{const x=async()=>{try{const M=(await kt(`https://api.themoviedb.org/3/movie/${e}?api_key=c62d03cc5058838982afddb016d84f54`)).data;a(M)}catch{}},E=async()=>{try{const M=(await kt(`https://api.themoviedb.org/3/movie/${e}/credits?api_key=c62d03cc5058838982afddb016d84f54`)).data;u(M)}catch(R){console.log(R)}};x(),E()},[e]),w.useEffect(()=>{s&&(async()=>{try{const R=(await kt(`https://api.themoviedb.org/3/discover/movie?with_genres=${(s==null?void 0:s.genres[0].id)+","+(s==null?void 0:s.genres[1].id)}&api_key=c62d03cc5058838982afddb016d84f54&page=${c}`)).data.results;h(R)}catch(E){console.log(E)}})()},[s]),w.useEffect(()=>{s&&r&&i&&(y(_m(r,s)),v(_m(i,s)))},[s,r,i]);const m=x=>{t?x?Lhe(t==null?void 0:t.uid,r,s,()=>{ar(n,"Movie Unliked","Movie unlike successfully")},E=>{ar(n,"Fail to unlike movie",`${E}`)}):Mhe(t.uid,s,()=>{au(n,"Movie Liked","Movie like successfully")},E=>{ar(n,"Fail to like movie",E.message)}):o("/log-in")},b=x=>{t?x?Fhe(t==null?void 0:t.uid,i,s,()=>{ar(n,"Watch Later Movie","Movie removed from watch later successfully")},E=>{ar(n,"Fail to remove movie",`${E}`)}):jhe(t.uid,s,()=>{au(n,"Watch Later Movie","Watch Later Movie successfully")},E=>{ar(n,"Fail to remove movie",`${E}`)}):o("/log-in")};return g.jsxs(rn,{alignItems:"flex-start",m:"0px 5vw",children:[g.jsxs(Q,{fontFamily:"Nunito",color:"brand.500",m:"10px 0px",fontWeight:"regular",fontSize:"xs",children:["Watch Now : Movie : ",s==null?void 0:s.original_title]}),g.jsx(yr,{w:"90vw",h:"550px",bg:`linear-gradient(rgb(31, 29, 31,0.6),rgb(31, 29, 31,0.6)),url(${"https://image.tmdb.org/t/p/original"+(s==null?void 0:s.backdrop_path)})`,style:{backgroundSize:"cover",backgroundPosition:"center",alignItems:"center",justifyContent:"center"},display:"flex",children:g.jsx(zt,{as:aC,color:"brand.400",fontSize:"100px"})}),g.jsxs(Ze,{width:"100%",justifyContent:"flex-end",alignItems:"flex-end",children:[g.jsxs(yr,{sx:{marginRight:"5vw"},children:[g.jsx(Q,{fontFamily:"Nunito",color:"text.500",textAlign:"center",m:"10px 0px",fontWeight:"regular",fontSize:"xs",children:"If the current server doesn’t work please try other server below"}),g.jsxs(Ze,{w:"40vw",bgColor:"dark.800",justifyContent:"space-between",p:"0px 20px",borderRadius:"10px",children:[g.jsx(Q,{color:"brand.500",m:"10px 0px",fontWeight:"medium",fontSize:"xs",children:"Vidstream"}),g.jsx(Q,{cursor:"pointer",_hover:{color:"brand.500"},color:"text.500",m:"10px 0px",fontWeight:"medium",fontSize:"xs",children:"My Cloud"}),g.jsx(Q,{cursor:"pointer",_hover:{color:"brand.500"},color:"text.500",m:"10px 0px",fontWeight:"medium",fontSize:"xs",children:"Up Cloud"}),g.jsx(Q,{cursor:"pointer",_hover:{color:"brand.500"},color:"text.500",m:"10px 0px",fontWeight:"medium",fontSize:"xs",children:"DoodStream"})]})]}),g.jsxs(Ze,{gap:"10px",alignItems:"center",children:[S?g.jsx(Cn,{fontFamily:"Nunito",height:"45px",borderRadius:"10px",color:"text.500",fontWeight:"medium",fontSize:"xs",leftIcon:g.jsx(zt,{as:tf,color:"brand.400"}),bgColor:"dark.700",_hover:{bgColor:"dark.800"},onClick:()=>{b(S)},children:"Remove from Watch Later"}):g.jsx(Cn,{fontFamily:"Nunito",height:"45px",borderRadius:"10px",color:"text.500",fontWeight:"medium",fontSize:"xs",leftIcon:g.jsx(zt,{as:tf,color:"brand.400"}),bgColor:"dark.700",_hover:{bgColor:"dark.800"},onClick:()=>{b(S)},children:"Watch Later"}),p?g.jsx(Cn,{fontFamily:"Nunito",borderRadius:"10px",height:"45px",color:"text.500",fontWeight:"medium",fontSize:"xs",leftIcon:g.jsx(zt,{as:j4,color:"brand.400"}),bgColor:"dark.700",_hover:{bgColor:"dark.800"},onClick:()=>{m(p)},children:"Remove from like"}):g.jsx(Cn,{fontFamily:"Nunito",borderRadius:"10px",height:"45px",color:"text.500",fontWeight:"medium",fontSize:"xs",leftIcon:g.jsx(zt,{as:eg,color:"brand.400"}),bgColor:"dark.700",_hover:{bgColor:"dark.800"},onClick:()=>{m(p)},children:"Like"})]})]}),g.jsxs(Ze,{gap:"40px",pb:"40px",alignItems:"flex-start",children:[g.jsx(Oa,{src:"https://image.tmdb.org/t/p/original"+(s==null?void 0:s.poster_path),w:"25%",height:"400px",borderRadius:"5px",objectFit:"cover"}),g.jsxs(rn,{w:"75%",alignItems:"flex-start",children:[g.jsx(dr,{fontFamily:"Nunito",color:"text.200",m:"10px 0px",fontWeight:"semibold",fontSize:"md",children:s==null?void 0:s.original_title}),g.jsx(Q,{fontFamily:"Nunito",color:"text.100",m:"10px 0px",fontWeight:"regular",fontSize:"xxs",children:s==null?void 0:s.overview}),g.jsx("table",{children:g.jsxs("tbody",{children:[g.jsxs("tr",{children:[g.jsx("td",{style:{width:"180px"},children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"medium",fontSize:"xxs",children:"Type :"})}),g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"regular",fontSize:"xxs",children:"Movie"})})]}),g.jsxs("tr",{children:[g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"medium",fontSize:"xxs",children:"Country :"})}),g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"regular",fontSize:"xxs",children:s==null?void 0:s.production_countries.map((x,E)=>E!=(s==null?void 0:s.production_countries.length)-1?(x==null?void 0:x.name)+", ":x==null?void 0:x.name)})})]}),g.jsxs("tr",{children:[g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"medium",fontSize:"xxs",children:"Genre :"})}),g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"regular",fontSize:"xxs",children:(C=s==null?void 0:s.genres)==null?void 0:C.map((x,E)=>E!=(s==null?void 0:s.genres.length)-1?(x==null?void 0:x.name)+", ":x==null?void 0:x.name)})})]}),g.jsxs("tr",{children:[g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"medium",fontSize:"xxs",children:"Release :"})}),g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"regular",fontSize:"xxs",children:s==null?void 0:s.release_date})})]}),g.jsxs("tr",{children:[g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"medium",fontSize:"xxs",children:"Production Company:"})}),g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"regular",fontSize:"xxs",children:s==null?void 0:s.production_companies.map((x,E)=>E!=(s==null?void 0:s.production_companies.length)-1?(x==null?void 0:x.name)+", ":x==null?void 0:x.name)})})]}),g.jsxs("tr",{children:[g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"medium",fontSize:"xxs",children:"Tag :"})}),g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"regular",fontSize:"xxs",children:s==null?void 0:s.tagline})})]}),g.jsxs("tr",{children:[g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"medium",fontSize:"xxs",children:"Cast :"})}),g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"regular",fontSize:"xxs",children:(k=l==null?void 0:l.cast)==null?void 0:k.slice(0,6).map((x,E)=>E!=5?g.jsx(Ft,{to:`https://www.google.com/search?q=${x==null?void 0:x.name}`,target:"_blank",children:(x==null?void 0:x.name)+" - "+(x==null?void 0:x.character)+", "}):g.jsx(Ft,{to:`https://www.google.com/search?q=${x==null?void 0:x.name}`,target:"_blank",children:(x==null?void 0:x.name)+" - "+(x==null?void 0:x.character)}))})})]})]})})]})]}),g.jsx(Gr,{icon:nf,title:"Similar Movies",movieData:f,page:c,appendData:x=>d(x+1)})]})},Hhe=({})=>{var C,k;const{likeSeries:e,watchLaterSeries:t}=Yt(x=>x.firestoreMovie),{auth:n}=Yt(x=>x.auth),r=qg(),i=Tu(),{id:o}=xS(),[s,a]=w.useState(),[l,u]=w.useState(),[c,d]=w.useState(1),[f,h]=w.useState([]),[p,y]=w.useState(!1),[S,v]=w.useState(!1);w.useEffect(()=>{s&&e&&t&&(y(_m(e,s)),v(_m(t,s)))},[s,e,t]),w.useEffect(()=>{const x=async()=>{try{const M=(await kt(`https://api.themoviedb.org/3/tv/${o}?api_key=c62d03cc5058838982afddb016d84f54`)).data;a(M)}catch{}},E=async()=>{try{const M=(await kt(`https://api.themoviedb.org/3/tv/${o}/credits?api_key=c62d03cc5058838982afddb016d84f54`)).data;u(M)}catch(R){console.log(R)}};x(),E()},[o]),w.useEffect(()=>{s&&(async()=>{var E,R;try{const L=(await kt(`https://api.themoviedb.org/3/discover/tv?with_genres=${((E=s==null?void 0:s.genres[0])==null?void 0:E.id)+","+((R=s==null?void 0:s.genres[1])==null?void 0:R.id)}&api_key=c62d03cc5058838982afddb016d84f54&page=${c}`)).data.results;h(L)}catch(M){console.log(M)}})()},[s]);const m=x=>{n?x?Vhe(n==null?void 0:n.uid,e,s,()=>{ar(r,"Series Unliked","Series unlike successfully")},E=>{ar(r,"Fail to unlike series",`${E}`)}):zhe(n.uid,s,()=>{au(r,"Series Liked","Series like successfully")},E=>{ar(r,"Fail to like series",E.message)}):i("/log-in")},b=x=>{n?x?Uhe(n==null?void 0:n.uid,t,s,()=>{ar(r,"Watch Later Series","Series removed from watch later successfully")},E=>{ar(r,"Fail to remove series",`${E}`)}):Bhe(n.uid,s,()=>{au(r,"Watch Later Series","Watch Later Series successfully")},E=>{ar(r,"Fail to remove series",`${E}`)}):i("/log-in")};return g.jsxs(rn,{alignItems:"flex-start",m:"0px 5vw",children:[g.jsxs(Q,{fontFamily:"Nunito",color:"brand.500",m:"10px 0px",fontWeight:"regular",fontSize:"xs",children:["Watch Now : Series : ",s==null?void 0:s.name]}),g.jsx(yr,{w:"90vw",h:"550px",bg:`linear-gradient(rgb(31, 29, 31,0.6),rgb(31, 29, 31,0.6)),url(${"https://image.tmdb.org/t/p/original"+(s==null?void 0:s.backdrop_path)})`,style:{backgroundSize:"cover",backgroundPosition:"center",alignItems:"center",justifyContent:"center"},display:"flex",children:g.jsx(zt,{as:aC,color:"brand.400",fontSize:"100px"})}),g.jsxs(Ze,{width:"100%",justifyContent:"flex-end",alignItems:"flex-end",children:[g.jsxs(yr,{sx:{marginRight:"5vw"},children:[g.jsx(Q,{fontFamily:"Nunito",color:"text.500",textAlign:"center",m:"10px 0px",fontWeight:"regular",fontSize:"xs",children:"If the current server doesn’t work please try other server below"}),g.jsxs(Ze,{w:"40vw",bgColor:"dark.800",justifyContent:"space-between",p:"0px 20px",borderRadius:"10px",children:[g.jsx(Q,{color:"brand.500",m:"10px 0px",fontWeight:"medium",fontSize:"xs",children:"Vidstream"}),g.jsx(Q,{cursor:"pointer",_hover:{color:"brand.500"},color:"text.500",m:"10px 0px",fontWeight:"medium",fontSize:"xs",children:"My Cloud"}),g.jsx(Q,{cursor:"pointer",_hover:{color:"brand.500"},color:"text.500",m:"10px 0px",fontWeight:"medium",fontSize:"xs",children:"Up Cloud"}),g.jsx(Q,{cursor:"pointer",_hover:{color:"brand.500"},color:"text.500",m:"10px 0px",fontWeight:"medium",fontSize:"xs",children:"DoodStream"})]})]}),g.jsxs(Ze,{gap:"10px",alignItems:"center",children:[S?g.jsx(Cn,{fontFamily:"Nunito",height:"45px",borderRadius:"10px",color:"text.500",fontWeight:"medium",fontSize:"xs",leftIcon:g.jsx(zt,{as:tf,color:"brand.400"}),bgColor:"dark.700",_hover:{bgColor:"dark.800"},onClick:()=>{b(S)},children:"Remove from Watch Later"}):g.jsx(Cn,{fontFamily:"Nunito",height:"45px",borderRadius:"10px",color:"text.500",fontWeight:"medium",fontSize:"xs",leftIcon:g.jsx(zt,{as:tf,color:"brand.400"}),bgColor:"dark.700",_hover:{bgColor:"dark.800"},onClick:()=>{b(S)},children:"Watch Later"}),p?g.jsx(Cn,{fontFamily:"Nunito",borderRadius:"10px",height:"45px",color:"text.500",fontWeight:"medium",fontSize:"xs",leftIcon:g.jsx(zt,{as:eg,color:"brand.400"}),bgColor:"dark.700",_hover:{bgColor:"dark.800"},onClick:()=>{m(p)},children:"Remove from like"}):g.jsx(Cn,{fontFamily:"Nunito",borderRadius:"10px",height:"45px",color:"text.500",fontWeight:"medium",fontSize:"xs",leftIcon:g.jsx(zt,{as:eg,color:"brand.400"}),bgColor:"dark.700",_hover:{bgColor:"dark.800"},onClick:()=>{m(p)},children:"Like"})]})]}),g.jsxs(Ze,{gap:"40px",pb:"40px",alignItems:"flex-start",children:[g.jsx(Oa,{src:"https://image.tmdb.org/t/p/original"+(s==null?void 0:s.poster_path),w:"25%",height:"400px",borderRadius:"5px",objectFit:"cover"}),g.jsxs(rn,{w:"75%",alignItems:"flex-start",children:[g.jsx(dr,{fontFamily:"Nunito",color:"text.200",m:"10px 0px",fontWeight:"semibold",fontSize:"md",children:s==null?void 0:s.name}),g.jsx(Q,{fontFamily:"Nunito",color:"text.100",m:"10px 0px",fontWeight:"regular",fontSize:"xxs",children:s==null?void 0:s.overview}),g.jsx("table",{children:g.jsxs("tbody",{children:[g.jsxs("tr",{children:[g.jsx("td",{style:{width:"180px"},children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"medium",fontSize:"xxs",children:"Type :"})}),g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"regular",fontSize:"xxs",children:"Series"})})]}),g.jsxs("tr",{children:[g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"medium",fontSize:"xxs",children:"Country :"})}),g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"regular",fontSize:"xxs",children:s==null?void 0:s.production_countries.map((x,E)=>E!=(s==null?void 0:s.production_countries.length)-1?(x==null?void 0:x.name)+", ":x==null?void 0:x.name)})})]}),g.jsxs("tr",{children:[g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"medium",fontSize:"xxs",children:"Genre :"})}),g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"regular",fontSize:"xxs",children:(C=s==null?void 0:s.genres)==null?void 0:C.map((x,E)=>E!=(s==null?void 0:s.genres.length)-1?(x==null?void 0:x.name)+", ":x==null?void 0:x.name)})})]}),g.jsxs("tr",{children:[g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"medium",fontSize:"xxs",children:"Release :"})}),g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"regular",fontSize:"xxs",children:s==null?void 0:s.first_air_date})})]}),g.jsxs("tr",{children:[g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"medium",fontSize:"xxs",children:"Production Company:"})}),g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"regular",fontSize:"xxs",children:s==null?void 0:s.production_companies.map((x,E)=>E!=(s==null?void 0:s.production_companies.length)-1?(x==null?void 0:x.name)+", ":x==null?void 0:x.name)})})]}),g.jsxs("tr",{children:[g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"medium",fontSize:"xxs",children:"Season :"})}),g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"regular",fontSize:"xxs",children:s==null?void 0:s.seasons.map((x,E)=>E!=(s==null?void 0:s.seasons.length)-1?s.name+" "+(x==null?void 0:x.name)+",":s.name+" "+(x==null?void 0:x.name))})})]}),g.jsxs("tr",{children:[g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"medium",fontSize:"xxs",children:"Cast :"})}),g.jsx("td",{children:g.jsx(Q,{fontFamily:"Nunito",color:"text.500",fontWeight:"regular",fontSize:"xxs",children:(k=l==null?void 0:l.cast)==null?void 0:k.slice(0,6).map((x,E)=>E!=5?g.jsx(Ft,{to:`https://www.google.com/search?q=${x==null?void 0:x.name}`,target:"_blank",children:(x==null?void 0:x.name)+", "}):g.jsx(Ft,{to:`https://www.google.com/search?q=${x==null?void 0:x.name}`,target:"_blank",children:x==null?void 0:x.name}))})})]})]})})]})]}),g.jsx(Gr,{icon:nf,title:"Similar Series",seiresData:f,page:c,appendData:x=>d(x+1)})]})},qhe=({})=>{const{id:e}=xS(),[t,n]=w.useState([]),[r,i]=w.useState([]),[o,s]=w.useState(1),[a,l]=w.useState(1);return w.useEffect(()=>{s(1),l(1)},[e]),w.useEffect(()=>{const u=async()=>{try{const d=(await kt(`https://api.themoviedb.org/3/discover/movie?with_genres=${e}&api_key=c62d03cc5058838982afddb016d84f54&page=${o}`)).data.results;o==1?n(d):n(t.concat(d))}catch(c){console.log(c)}};e!=""&&u()},[e,o]),w.useEffect(()=>{const u=async()=>{try{const d=(await kt(`https://api.themoviedb.org/3/discover/tv?with_genres=${e}&api_key=c62d03cc5058838982afddb016d84f54&page=${o}`)).data.results;a==1?i(d):i(r.concat(d))}catch(c){console.log(c)}};e!=""&&u()},[e,a]),g.jsx(g.Fragment,{children:g.jsxs(rn,{p:"0px 5%",alignItems:"flex-start",children:[g.jsx(Q,{fontFamily:"Nunito",color:"brand.500",m:"10px 0px",fontWeight:"regular",fontSize:"xs",children:"Genre : "+yp([parseInt(e||"")]).map(u=>u==null?void 0:u.name)}),g.jsx(Gr,{icon:nf,title:yp([parseInt(e||"")]).map(u=>u==null?void 0:u.name)+" Movies",movieData:t,page:o,appendData:u=>s(u+1),defaultLimit:14}),r.length!=0?g.jsx(Gr,{icon:nf,title:yp([parseInt(e||"")]).map(u=>u==null?void 0:u.name)+" Series",seiresData:r,page:a,appendData:u=>l(u+1),defaultLimit:14}):g.jsx(g.Fragment,{})]})})},Khe=({})=>{const{auth:e}=Yt(l=>l.auth),{likeMovie:t,watchLaterMovie:n,likeSeries:r,watchLaterSeries:i}=Yt(l=>l.firestoreMovie),o=Tu(),s=qg(),a=()=>{I4(()=>{o("/"),au(s,"Log Out","Successfully")},l=>{ar(s,"Log Out Fail",l)})};return g.jsx(g.Fragment,{children:e!=null?g.jsx(g.Fragment,{children:g.jsxs(Ze,{padding:"50px 5%",gap:"50px",alignItems:"flex-start",minHeight:"90vh",children:[g.jsxs(rn,{gap:"0px",children:[g.jsx(fx,{src:e.photoURL||"",width:"200px",height:"200px",bgColor:"text.500"}),g.jsx(Q,{lineHeight:"90%",fontFamily:"Nunito",color:"brand.500",m:"10px 0px",fontWeight:"medium",fontSize:"rg",children:e.displayName}),g.jsx(Q,{lineHeight:"90%",fontFamily:"Nunito",color:"text.300",m:"10px 0px",fontWeight:"regular",fontSize:"xs",children:e.email}),g.jsx(Cn,{fontFamily:"Nunito",fontSize:"xs",p:"0px 15px",height:"35px",color:"dark.700",bgColor:"brand.400",borderRadius:"7px",_hover:{bgColor:"brand.500"},onClick:()=>{a()},children:"Log Out"})]}),g.jsxs(z5,{position:"relative",variant:"unstyled",isFitted:!0,align:"center",w:"100%",children:[g.jsxs(B5,{children:[g.jsx(Sc,{children:g.jsxs(Q,{lineHeight:"90%",fontFamily:"Nunito",color:"brand.500",fontWeight:"medium",fontSize:"xs",children:["Movies liked",g.jsx(Q,{as:"span",lineHeight:"90%",fontFamily:"Nunito",color:"text.300",fontWeight:"regular",fontSize:"xxs",ml:"5px",children:t==null?void 0:t.length})]})}),g.jsx(Sc,{children:g.jsxs(Q,{lineHeight:"90%",fontFamily:"Nunito",color:"brand.500",fontWeight:"medium",fontSize:"xs",children:["Watch later Movies",g.jsx(Q,{as:"span",lineHeight:"90%",fontFamily:"Nunito",color:"text.300",fontWeight:"regular",fontSize:"xxs",ml:"5px",children:n==null?void 0:n.length})]})}),g.jsx(Sc,{children:g.jsxs(Q,{lineHeight:"90%",fontFamily:"Nunito",color:"brand.500",fontWeight:"medium",fontSize:"xs",children:["Series liked",g.jsx(Q,{as:"span",lineHeight:"90%",fontFamily:"Nunito",color:"text.300",fontWeight:"regular",fontSize:"xxs",ml:"5px",children:r==null?void 0:r.length})]})}),g.jsx(Sc,{children:g.jsxs(Q,{lineHeight:"90%",fontFamily:"Nunito",color:"brand.500",fontWeight:"medium",fontSize:"xs",children:["Watch later Series",g.jsx(Q,{as:"span",lineHeight:"90%",fontFamily:"Nunito",color:"text.300",fontWeight:"regular",fontSize:"xxs",ml:"5px",children:i==null?void 0:i.length})]})})]}),g.jsx(V5,{mt:"5px",height:"2px",bg:"brand.600",borderRadius:"7px"}),g.jsxs(U5,{children:[g.jsx(wc,{children:g.jsx(Ze,{flexWrap:"wrap",gap:"20px",children:t.map((l,u)=>g.jsxs(rn,{to:`/movie/${l==null?void 0:l.id}`,as:Ft,width:"150px",alignItems:"flex-start",bgColor:"dark.900",borderRadius:"5px",overflow:"hidden",children:[g.jsx(xc,{alt:l==null?void 0:l.title,src:"https://image.tmdb.org/t/p/original"+(l==null?void 0:l.poster_path),width:"150px"}),g.jsx(dr,{lineHeight:"90%",textAlign:"start",fontFamily:"Nunito",fontWeight:"semibold",color:"text.200",fontSize:"xxs",children:l==null?void 0:l.title}),g.jsx(Q,{lineHeight:"90%",fontSize:"xxxs",fontFamily:"Nunito",fontWeight:"regular",color:"text.300",children:l==null?void 0:l.release_date})]},u))})}),g.jsx(wc,{children:g.jsx(Ze,{flexWrap:"wrap",gap:"20px",children:n.map((l,u)=>g.jsxs(rn,{to:`/movie/${l==null?void 0:l.id}`,as:Ft,width:"150px",alignItems:"flex-start",bgColor:"dark.900",borderRadius:"5px",overflow:"hidden",children:[g.jsx(xc,{alt:l==null?void 0:l.title,src:"https://image.tmdb.org/t/p/original"+(l==null?void 0:l.poster_path),width:"150px"}),g.jsx(dr,{lineHeight:"90%",textAlign:"start",fontFamily:"Nunito",fontWeight:"semibold",color:"text.200",fontSize:"xxs",children:l==null?void 0:l.title}),g.jsx(Q,{lineHeight:"90%",fontSize:"xxxs",fontFamily:"Nunito",fontWeight:"regular",color:"text.300",children:l==null?void 0:l.release_date})]},u))})}),g.jsx(wc,{children:g.jsx(Ze,{flexWrap:"wrap",gap:"20px",children:r.map((l,u)=>g.jsxs(rn,{to:`/series/${l==null?void 0:l.id}`,as:Ft,width:"150px",alignItems:"flex-start",bgColor:"dark.900",borderRadius:"5px",overflow:"hidden",children:[g.jsx(xc,{alt:l==null?void 0:l.title,src:"https://image.tmdb.org/t/p/original"+(l==null?void 0:l.poster_path),width:"150px"}),g.jsx(dr,{lineHeight:"90%",textAlign:"start",fontFamily:"Nunito",fontWeight:"semibold",color:"text.200",fontSize:"xxs",children:l==null?void 0:l.name}),g.jsx(Q,{lineHeight:"90%",fontSize:"xxxs",fontFamily:"Nunito",fontWeight:"regular",color:"text.300",children:l==null?void 0:l.first_air_date})]},u))})}),g.jsx(wc,{children:g.jsx(Ze,{flexWrap:"wrap",gap:"20px",children:i.map((l,u)=>g.jsxs(rn,{to:`/series/${l==null?void 0:l.id}`,as:Ft,width:"150px",alignItems:"flex-start",bgColor:"dark.900",borderRadius:"5px",overflow:"hidden",children:[g.jsx(xc,{alt:l==null?void 0:l.title,src:"https://image.tmdb.org/t/p/original"+(l==null?void 0:l.poster_path),width:"150px"}),g.jsx(dr,{lineHeight:"90%",textAlign:"start",fontFamily:"Nunito",fontWeight:"semibold",color:"text.200",fontSize:"xxs",children:l==null?void 0:l.name}),g.jsx(Q,{lineHeight:"90%",fontSize:"xxxs",fontFamily:"Nunito",fontWeight:"regular",color:"text.300",children:l==null?void 0:l.first_air_date})]},u))})})]})]})]})}):g.jsx(Kz,{to:"/log-in"})})};const Ghe=w.lazy(()=>jR(()=>import("./SignupPage-8540aab0.js"),["assets/SignupPage-8540aab0.js","assets/formSchema-656fcca0.js"])),Qhe=w.lazy(()=>jR(()=>import("./LoginPage-91e3616d.js"),["assets/LoginPage-91e3616d.js","assets/formSchema-656fcca0.js"]));function Yhe(){const e=wy(),{pathname:t}=ku(),n=Yt(c=>c.movieList.popularMovie.page),r=Yt(c=>c.movieList.upComingMovie.page),i=Yt(c=>c.movieList.trendingMovie.page),o=Yt(c=>c.movieList.topRatedMovie.page),s=Yt(c=>c.seriesList.popularSeries.page),a=Yt(c=>c.seriesList.topRatedSeries.page),l=Yt(c=>c.seriesList.trendingSeries.page),u=Yt(c=>c.seriesList.upComingSeries.page);return w.useEffect(()=>{window.scrollTo(0,0)},[t]),w.useEffect(()=>{e(QN()),e(JN()),e(eD()),e(XN()),e(fD()),e(pD()),e(yD()),e(mD())},[e]),w.useEffect(()=>{n!=1&&e(YN(n))},[n]),w.useEffect(()=>{i!=1&&e(tD(i))},[i]),w.useEffect(()=>{r!=1&&e(ZN(r))},[r]),w.useEffect(()=>{o!=1&&e(Hb(o))},[o]),w.useEffect(()=>{s!=1&&e(hD(s))},[s]),w.useEffect(()=>{a!=1&&e(Hb(a))},[a]),w.useEffect(()=>{l!=1&&e(vD(l))},[l]),w.useEffect(()=>{u!=1&&e(gD(u+1))},[u]),g.jsx(Qz,{children:g.jsxs(br,{path:"/",element:g.jsx(hhe,{}),children:[g.jsxs(br,{path:"/",element:g.jsx(Gfe,{}),children:[g.jsx(br,{index:!0,element:g.jsx(WJ,{})}),g.jsx(br,{path:"/movie",element:g.jsx(fhe,{})}),g.jsx(br,{path:"/series",element:g.jsx(phe,{})}),g.jsx(br,{path:"/contact",element:g.jsx(Yfe,{})}),g.jsx(br,{path:"/movie/:id",element:g.jsx(Whe,{})}),g.jsx(br,{path:"/series/:id",element:g.jsx(Hhe,{})}),g.jsx(br,{path:"/genre/:id",element:g.jsx(qhe,{})}),g.jsx(br,{path:"/profile",element:g.jsx(Khe,{})})]}),g.jsx(br,{path:"/log-in",element:g.jsx(w.Suspense,{fallback:"Loading...",children:g.jsx(Qhe,{})})}),g.jsx(br,{path:"/sign-up",element:g.jsx(w.Suspense,{fallback:"Loading...",children:g.jsx(Ghe,{})})})]})})}const Xhe={config:{initialColorMode:localStorage.getItem("rmsTheme")||"light",useSystemColorMode:!localStorage.getItem("rmsTheme")},colors:{brand:{900:"#b3a104",800:"#c4b104",700:"#d4bf04",600:"#dbc604",500:"#EFD807",400:"#fce403"},dark:{900:"#1F1D1F",800:"#262425",700:"#2D2B2C",600:"#363435"},text:{500:"#c7c3c5",400:"#d4d2d3",300:"#e6e6e6",200:"#f7f5f6",100:"#ffffff"},error:{900:"#d91c1c",700:"#e82323",500:"#fa2a2a"},success:{900:"#1cd91c",700:"#23e823",500:"#2afa2a"}},fonts:{Nunito:"'Nunito', sans-serif",Playfair:"'Playfair Display', serif"},fontWeights:{regular:"400",medium:"500",semibold:"600",bold:"700"},fontSizes:{xxxl:"45px",xxl:"40px",xl:"35px",lg:"30px",md:"25px",rg:"20px",sm:"18px",xs:"16px",xxs:"14px",xxxs:"12px"},components:{Checkbox:{baseStyle:{control:{bg:"dark.700",_checked:{bg:"dark.700"}}}}}},Jhe=lq(Xhe);o1.createRoot(document.getElementById("root")).render(g.jsx(ur.StrictMode,{children:g.jsx(CX,{theme:Jhe,children:g.jsx(wie,{store:Lie,children:g.jsx(e6,{children:g.jsx(Yhe,{})})})})}));export{rpe as A,HJ as B,ff as C,yi as D,epe as E,Tt as F,tg as G,dr as H,y5 as I,Zhe as J,de as K,P2 as L,St as M,Kz as N,OJ as O,ur as R,Q as T,rn as V,P4 as a,qg as b,ipe as c,Tu as d,Yt as e,Z5 as f,Ze as g,Cn as h,Ft as i,g as j,ar as k,ope as l,Or as m,Ae as n,JX as o,fp as p,eu as q,w as r,au as s,Hk as t,spe as u,is as v,tu as w,iu as x,s9 as y,it as z};
