1function UP(t,e){for(var r=0;r<e.length;r++){const i=e[r];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in t)){const o=Object.getOwnPropertyDescriptor(i,s);o&&Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function r(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerpolicy&&(o.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?o.credentials="include":s.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(s){if(s.ep)return;s.ep=!0;const o=r(s);fetch(s.href,o)}})();var ib=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $y(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ox(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function i(){if(this instanceof i){var s=[null];s.push.apply(s,arguments);var o=Function.bind.apply(e,s);return new o}return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(i){var s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(r,i,s.get?s:{enumerable:!0,get:function(){return t[i]}})}),r}var tu={},BP={get exports(){return tu},set exports(t){tu=t}},Bu={};/* 2object-assign 3(c) Sindre Sorhus 4@license MIT
5*/var sb=Object.getOwnPropertySymbols,jP=Object.prototype.hasOwnProperty,zP=Object.prototype.propertyIsEnumerable;function VP(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function WP(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;var i=Object.getOwnPropertyNames(e).map(function(o){return e[o]});if(i.join("")!=="0123456789")return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach(function(o){s[o]=o}),Object.keys(Object.assign({},s)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var Dx=WP()?Object.assign:function(t,e){for(var r,i=VP(t),s,o=1;o<arguments.length;o++){r=Object(arguments[o]);for(var a in r)jP.call(r,a)&&(i[a]=r[a]);if(sb){s=sb(r);for(var l=0;l<s.length;l++)zP.call(r,s[l])&&(i[s[l]]=r[s[l]])}}return i},P={},GP={get exports(){return P},set exports(t){P=t}},Ke={};/** @license React v17.0.2 6 * react.production.min.js 7 * 8 * Copyright (c) Facebook, Inc. and its affiliates. 9 * 10 * This source code is licensed under the MIT license found in the 11 * LICENSE file in the root directory of this source tree. 12 */var Ly=Dx,pa=60103,Mx=60106;Ke.Fragment=60107;Ke.StrictMode=60108;Ke.Profiler=60114;var Nx=60109,$x=60110,Lx=60112;Ke.Suspense=60113;var Fx=60115,Ux=60116;if(typeof Symbol=="function"&&Symbol.for){var gr=Symbol.for;pa=gr("react.element"),Mx=gr("react.portal"),Ke.Fragment=gr("react.fragment"),Ke.StrictMode=gr("react.strict_mode"),Ke.Profiler=gr("react.profiler"),Nx=gr("react.provider"),$x=gr("react.context"),Lx=gr("react.forward_ref"),Ke.Suspense=gr("react.suspense"),Fx=gr("react.memo"),Ux=gr("react.lazy")}var ob=typeof Symbol=="function"&&Symbol.iterator;function HP(t){return t===null||typeof t!="object"?null:(t=ob&&t[ob]||t["@@iterator"],typeof t=="function"?t:null)}function ju(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Bx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},jx={};function ga(t,e,r){this.props=t,this.context=e,this.refs=jx,this.updater=r||Bx}ga.prototype.isReactComponent={};ga.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error(ju(85));this.updater.enqueueSetState(this,t,e,"setState")};ga.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function zx(){}zx.prototype=ga.prototype;function Fy(t,e,r){this.props=t,this.context=e,this.refs=jx,this.updater=r||Bx}var Uy=Fy.prototype=new zx;Uy.constructor=Fy;Ly(Uy,ga.prototype);Uy.isPureReactComponent=!0;var By={current:null},Vx=Object.prototype.hasOwnProperty,Wx={key:!0,ref:!0,__self:!0,__source:!0};function Gx(t,e,r){var i,s={},o=null,a=null;if(e!=null)for(i in e.ref!==void 0&&(a=e.ref),e.key!==void 0&&(o=""+e.key),e)Vx.call(e,i)&&!Wx.hasOwnProperty(i)&&(s[i]=e[i]);var l=arguments.length-2;if(l===1)s.children=r;else if(1<l){for(var c=Array(l),d=0;d<l;d++)c[d]=arguments[d+2];s.children=c}if(t&&t.defaultProps)for(i in l=t.defaultProps,l)s[i]===void 0&&(s[i]=l[i]);return{$$typeof:pa,type:t,key:o,ref:a,props:s,_owner:By.current}}function qP(t,e){return{$$typeof:pa,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function jy(t){return typeof t=="object"&&t!==null&&t.$$typeof===pa}function KP(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var ab=/\/+/g;function kp(t,e){return typeof t=="object"&&t!==null&&t.key!=null?KP(""+t.key):e.toString(36)}function sd(t,e,r,i,s){var o=typeof t;(o==="undefined"||o==="boolean")&&(t=null);var a=!1;if(t===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case pa:case Mx:a=!0}}if(a)return a=t,s=s(a),t=i===""?"."+kp(a,0):i,Array.isArray(s)?(r="",t!=null&&(r=t.replace(ab,"$&/")+"/"),sd(s,e,r,"",function(d){return d})):s!=null&&(jy(s)&&(s=qP(s,r+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(ab,"$&/")+"/")+t)),e.push(s)),1;if(a=0,i=i===""?".":i+":",Array.isArray(t))for(var l=0;l<t.length;l++){o=t[l];var c=i+kp(o,l);a+=sd(o,e,r,c,s)}else if(c=HP(t),typeof c=="function")for(t=c.call(t),l=0;!(o=t.next()).done;)o=o.value,c=i+kp(o,l++),a+=sd(o,e,r,c,s);else if(o==="object")throw e=""+t,Error(ju(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e));return a}function Ac(t,e,r){if(t==null)return t;var i=[],s=0;return sd(t,i,"","",function(o){return e.call(r,o,s++)}),i}function YP(t){if(t._status===-1){var e=t._result;e=e(),t._status=0,t._result=e,e.then(function(r){t._status===0&&(r=r.default,t._status=1,t._result=r)},function(r){t._status===0&&(t._status=2,t._result=r)})}if(t._status===1)return t._result;throw t._result}var Hx={current:null};function li(){var t=Hx.current;if(t===null)throw Error(ju(321));return t}var XP={ReactCurrentDispatcher:Hx,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:By,IsSomeRendererActing:{current:!1},assign:Ly};
vendor: 5,629 bytes, lines 12-26
12Ke.Children={map:Ac,forEach:function(t,e,r){Ac(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return Ac(t,function(){e++}),e},toArray:function(t){return Ac(t,function(e){return e})||[]},only:function(t){if(!jy(t))throw Error(ju(143));return t}};Ke.Component=ga;Ke.PureComponent=Fy;Ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=XP;Ke.cloneElement=function(t,e,r){if(t==null)throw Error(ju(267,t));var i=Ly({},t.props),s=t.key,o=t.ref,a=t._owner;if(e!=null){if(e.ref!==void 0&&(o=e.ref,a=By.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(c in e)Vx.call(e,c)&&!Wx.hasOwnProperty(c)&&(i[c]=e[c]===void 0&&l!==void 0?l[c]:e[c])}var c=arguments.length-2;if(c===1)i.children=r;else if(1<c){l=Array(c);for(var d=0;d<c;d++)l[d]=arguments[d+2];i.children=l}return{$$typeof:pa,type:t.type,key:s,ref:o,props:i,_owner:a}};Ke.createContext=function(t,e){return e===void 0&&(e=null),t={$$typeof:$x,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider={$$typeof:Nx,_context:t},t.Consumer=t};Ke.createElement=Gx;Ke.createFactory=function(t){var e=Gx.bind(null,t);return e.type=t,e};Ke.createRef=function(){return{current:null}};Ke.forwardRef=function(t){return{$$typeof:Lx,render:t}};Ke.isValidElement=jy;Ke.lazy=function(t){return{$$typeof:Ux,_payload:{_status:-1,_result:t},_init:YP}};Ke.memo=function(t,e){return{$$typeof:Fx,type:t,compare:e===void 0?null:e}};Ke.useCallback=function(t,e){return li().useCallback(t,e)};Ke.useContext=function(t,e){return li().useContext(t,e)};Ke.useDebugValue=function(){};Ke.useEffect=function(t,e){return li().useEffect(t,e)};Ke.useImperativeHandle=function(t,e,r){return li().useImperativeHandle(t,e,r)};Ke.useLayoutEffect=function(t,e){return li().useLayoutEffect(t,e)};Ke.useMemo=function(t,e){return li().useMemo(t,e)};Ke.useReducer=function(t,e,r){return li().useReducer(t,e,r)};Ke.useRef=function(t){return li().useRef(t)};Ke.useState=function(t){return li().useState(t)};Ke.version="17.0.2";(function(t){t.exports=Ke})(GP);const yr=$y(P),js=UP({__proto__:null,default:yr},[P]);/** @license React v17.0.2 13 * react-jsx-runtime.production.min.js 14 * 15 * Copyright (c) Facebook, Inc. and its affiliates. 16 * 17 * This source code is licensed under the MIT license found in the 18 * LICENSE file in the root directory of this source tree. 19 */var QP=P,qx=60103;Bu.Fragment=60107;if(typeof Symbol=="function"&&Symbol.for){var lb=Symbol.for;qx=lb("react.element"),Bu.Fragment=lb("react.fragment")}var JP=QP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ZP=Object.prototype.hasOwnProperty,e2={key:!0,ref:!0,__self:!0,__source:!0};function Kx(t,e,r){var i,s={},o=null,a=null;r!==void 0&&(o=""+r),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(a=e.ref);for(i in e)ZP.call(e,i)&&!e2.hasOwnProperty(i)&&(s[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps,e)s[i]===void 0&&(s[i]=e[i]);return{$$typeof:qx,type:t,key:o,ref:a,props:s,_owner:JP.current}}Bu.jsx=Kx;Bu.jsxs=Kx;(function(t){t.exports=Bu})(BP);const Rd=tu.Fragment,$=tu.jsx,be=tu.jsxs,t2=Object.freeze(Object.defineProperty({__proto__:null,Fragment:Rd,jsx:$,jsxs:be},Symbol.toStringTag,{value:"Module"}));var nu={},n2={get exports(){return nu},set exports(t){nu=t}},ar={},Ng={},r2={get exports(){return Ng},set exports(t){Ng=t}},Yx={};/** @license React v0.20.2 20 * scheduler.production.min.js 21 * 22 * Copyright (c) Facebook, Inc. and its affiliates. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE file in the root directory of this source tree. 26 */(function(t){var e,r,i,s;if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}if(typeof window>"u"||typeof MessageChannel!="function"){var c=null,d=null,f=function(){if(c!==null)try{var K=t.unstable_now();c(!0,K),c=null}catch(ne){throw setTimeout(f,0),ne}};e=function(K){c!==null?setTimeout(e,0,K):(c=K,setTimeout(f,0))},r=function(K,ne){d=setTimeout(K,ne)},i=function(){clearTimeout(d)},t.unstable_shouldYield=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var g=window.setTimeout,v=window.clearTimeout;if(typeof console<"u"){var _=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof _!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var w=!1,k=null,y=-1,b=5,x=0;t.unstable_shouldYield=function(){return t.unstable_now()>=x},s=function(){},t.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<K?Math.floor(1e3/K):5};var R=new MessageChannel,E=R.port2;R.port1.onmessage=function(){if(k!==null){var K=t.unstable_now();x=K+b;try{k(!0,K)?E.postMessage(null):(w=!1,k=null)}catch(ne){throw E.postMessage(null),ne}}else w=!1},e=function(K){k=K,w||(w=!0,E.postMessage(null))},r=function(K,ne){y=g(function(){K(t.unstable_now())},ne)},i=function(){v(y),y=-1}}function C(K,ne){var ee=K.length;K.push(ne);e:for(;;){var ce=ee-1>>>1,ye=K[ce];if(ye!==void 0&&0<U(ye,ne))K[ce]=ne,K[ee]=ye,ee=ce;else break e}}function D(K){return K=K[0],K===void 0?null:K}function A(K){var ne=K[0];if(ne!==void 0){var ee=K.pop();
vendor: 30,490 bytes, lines 26-37
26if(ee!==ne){K[0]=ee;e:for(var ce=0,ye=K.length;ce<ye;){var _e=2*(ce+1)-1,Oe=K[_e],He=_e+1,we=K[He];if(Oe!==void 0&&0>U(Oe,ee))we!==void 0&&0>U(we,Oe)?(K[ce]=we,K[He]=ee,ce=He):(K[ce]=Oe,K[_e]=ee,ce=_e);else if(we!==void 0&&0>U(we,ee))K[ce]=we,K[He]=ee,ce=He;else break e}}return ne}return null}function U(K,ne){var ee=K.sortIndex-ne.sortIndex;return ee!==0?ee:K.id-ne.id}var B=[],z=[],V=1,j=null,N=3,G=!1,W=!1,q=!1;function X(K){for(var ne=D(z);ne!==null;){if(ne.callback===null)A(z);else if(ne.startTime<=K)A(z),ne.sortIndex=ne.expirationTime,C(B,ne);else break;ne=D(z)}}function J(K){if(q=!1,X(K),!W)if(D(B)!==null)W=!0,e(Z);else{var ne=D(z);ne!==null&&r(J,ne.startTime-K)}}function Z(K,ne){W=!1,q&&(q=!1,i()),G=!0;var ee=N;try{for(X(ne),j=D(B);j!==null&&(!(j.expirationTime>ne)||K&&!t.unstable_shouldYield());){var ce=j.callback;if(typeof ce=="function"){j.callback=null,N=j.priorityLevel;var ye=ce(j.expirationTime<=ne);ne=t.unstable_now(),typeof ye=="function"?j.callback=ye:j===D(B)&&A(B),X(ne)}else A(B);j=D(B)}if(j!==null)var _e=!0;else{var Oe=D(z);Oe!==null&&r(J,Oe.startTime-ne),_e=!1}return _e}finally{j=null,N=ee,G=!1}}var re=s;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(K){K.callback=null},t.unstable_continueExecution=function(){W||G||(W=!0,e(Z))},t.unstable_getCurrentPriorityLevel=function(){return N},t.unstable_getFirstCallbackNode=function(){return D(B)},t.unstable_next=function(K){switch(N){case 1:case 2:case 3:var ne=3;break;default:ne=N}var ee=N;N=ne;try{return K()}finally{N=ee}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=re,t.unstable_runWithPriority=function(K,ne){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var ee=N;N=K;try{return ne()}finally{N=ee}},t.unstable_scheduleCallback=function(K,ne,ee){var ce=t.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ce+ee:ce):ee=ce,K){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=ee+ye,K={id:V++,callback:ne,priorityLevel:K,startTime:ee,expirationTime:ye,sortIndex:-1},ee>ce?(K.sortIndex=ee,C(z,K),D(B)===null&&K===D(z)&&(q?i():q=!0,r(J,ee-ce))):(K.sortIndex=ye,C(B,K),W||G||(W=!0,e(Z))),K},t.unstable_wrapCallback=function(K){var ne=N;return function(){var ee=N;N=ne;try{return K.apply(this,arguments)}finally{N=ee}}}})(Yx);(function(t){t.exports=Yx})(r2);/** @license React v17.0.2 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var Ih=P,pt=Dx,zt=Ng;function ue(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!Ih)throw Error(ue(227));var Xx=new Set,ru={};function no(t,e){Jo(t,e),Jo(t+"Capture",e)}function Jo(t,e){for(ru[t]=e,t=0;t<e.length;t++)Xx.add(e[t])}var ni=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),i2=/^[: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]*$/,ub=Object.prototype.hasOwnProperty,cb={},db={};function s2(t){return ub.call(db,t)?!0:ub.call(cb,t)?!1:i2.test(t)?db[t]=!0:(cb[t]=!0,!1)}function o2(t,e,r,i){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return i?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function a2(t,e,r,i){if(e===null||typeof e>"u"||o2(t,e,r,i))return!0;if(i)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function kn(t,e,r,i,s,o,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=i,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=a}var tn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){tn[t]=new kn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];tn[e]=new kn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){tn[t]=new kn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){tn[t]=new kn(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){tn[t]=new kn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){tn[t]=new kn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){tn[t]=new kn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){tn[t]=new kn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){tn[t]=new kn(t,5,!1,t.toLowerCase(),null,!1,!1)});var zy=/[\-:]([a-z])/g;function Vy(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(zy,Vy);tn[e]=new kn(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(zy,Vy);tn[e]=new kn(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(zy,Vy);tn[e]=new kn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){tn[t]=new kn(t,1,!1,t.toLowerCase(),null,!1,!1)});tn.xlinkHref=new kn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){tn[t]=new kn(t,1,!1,t.toLowerCase(),null,!0,!0)});function Wy(t,e,r,i){var s=tn.hasOwnProperty(e)?tn[e]:null,o=s!==null?s.type===0:i?!1:!(!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N");o||(a2(e,r,s,i)&&(r=null),i||s===null?s2(e)&&(r===null?t.removeAttribute(e):t.setAttribute(e,""+r)):s.mustUseProperty?t[s.propertyName]=r===null?s.type===3?!1:"":r:(e=s.attributeName,i=s.attributeNamespace,r===null?t.removeAttribute(e):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,i?t.setAttributeNS(i,e,r):t.setAttribute(e,r))))}var ro=Ih.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,gl=60103,xs=60106,Si=60107,Gy=60108,Pl=60114,Hy=60109,qy=60110,Rh=60112,Al=60113,Pd=60120,Ph=60115,Ky=60116,Yy=60121,Xy=60128,Qx=60129,Qy=60130,$g=60131;if(typeof Symbol=="function"&&Symbol.for){var Bt=Symbol.for;gl=Bt("react.element"),xs=Bt("react.portal"),Si=Bt("react.fragment"),Gy=Bt("react.strict_mode"),Pl=Bt("react.profiler"),Hy=Bt("react.provider"),qy=Bt("react.context"),Rh=Bt("react.forward_ref"),Al=Bt("react.suspense"),Pd=Bt("react.suspense_list"),Ph=Bt("react.memo"),Ky=Bt("react.lazy"),Yy=Bt("react.block"),Bt("react.scope"),Xy=Bt("react.opaque.id"),Qx=Bt("react.debug_trace_mode"),Qy=Bt("react.offscreen"),$g=Bt("react.legacy_hidden")}var hb=typeof Symbol=="function"&&Symbol.iterator;function Ha(t){return t===null||typeof t!="object"?null:(t=hb&&t[hb]||t["@@iterator"],typeof t=="function"?t:null)}var Tp;function ml(t){if(Tp===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);Tp=e&&e[1]||""}return` 34`+Tp+t}var Ip=!1;function Oc(t,e){if(!t||Ip)return"";Ip=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var i=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){i=c}t.call(e.prototype)}else{try{throw Error()}catch(c){i=c}t()}}catch(c){if(c&&i&&typeof c.stack=="string"){for(var s=c.stack.split(` 35`),o=i.stack.split(` 36`),a=s.length-1,l=o.length-1;1<=a&&0<=l&&s[a]!==o[l];)l--;for(;1<=a&&0<=l;a--,l--)if(s[a]!==o[l]){if(a!==1||l!==1)do if(a--,l--,0>l||s[a]!==o[l])return` 37`+s[a].replace(" at new "," at ");while(1<=a&&0<=l);break}}}finally{Ip=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?ml(t):""}function l2(t){switch(t.tag){case 5:return ml(t.type);case 16:return ml("Lazy");case 13:return ml("Suspense");case 19:return ml("SuspenseList");case 0:case 2:case 15:return t=Oc(t.type,!1),t;case 11:return t=Oc(t.type.render,!1),t;case 22:return t=Oc(t.type._render,!1),t;case 1:return t=Oc(t.type,!0),t;default:return""}}function No(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Si:return"Fragment";case xs:return"Portal";case Pl:return"Profiler";case Gy:return"StrictMode";case Al:return"Suspense";case Pd:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case qy:return(t.displayName||"Context")+".Consumer";case Hy:return(t._context.displayName||"Context")+".Provider";case Rh:var e=t.render;return e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case Ph:return No(t.type);case Yy:return No(t._render);case Ky:e=t._payload,t=t._init;try{return No(t(e))}catch{}}return null}function Wi(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}function Jx(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function u2(t){var e=Jx(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),i=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,o=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(a){i=""+a,o.call(this,a)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(a){i=""+a},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Dc(t){t._valueTracker||(t._valueTracker=u2(t))}function Zx(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),i="";return t&&(i=Jx(t)?t.checked?"true":"false":t.value),t=i,t!==r?(e.setValue(t),!0):!1}function Ad(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Lg(t,e){var r=e.checked;return pt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function fb(t,e){var r=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;r=Wi(e.value!=null?e.value:r),t._wrapperState={initialChecked:i,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function e_(t,e){e=e.checked,e!=null&&Wy(t,"checked",e,!1)}function Fg(t,e){e_(t,e);var r=Wi(e.value),i=e.type;if(r!=null)i==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(i==="submit"||i==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Ug(t,e.type,r):e.hasOwnProperty("defaultValue")&&Ug(t,e.type,Wi(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function pb(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!(i!=="submit"&&i!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function Ug(t,e,r){(e!=="number"||Ad(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}function c2(t){var e="";return Ih.Children.forEach(t,function(r){r!=null&&(e+=r)}),e}function Bg(t,e){return t=pt({children:void 0},e),(e=c2(e.children))&&(t.children=e),t}function $o(t,e,r,i){if(t=t.options,e){e={};for(var s=0;s<r.length;s++)e["$"+r[s]]=!0;for(r=0;r<t.length;r++)s=e.hasOwnProperty("$"+t[r].value),t[r].selected!==s&&(t[r].selected=s),s&&i&&(t[r].defaultSelected=!0)}else{for(r=""+Wi(r),e=null,s=0;s<t.length;s++){if(t[s].value===r){t[s].selected=!0,i&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function jg(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(ue(91));return pt({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function gb(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error(ue(92));if(Array.isArray(r)){if(!(1>=r.length))throw Error(ue(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:Wi(r)}}function t_(t,e){var r=Wi(e.value),i=Wi(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),i!=null&&(t.defaultValue=""+i)}function mb(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}var zg={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function n_(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Vg(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?n_(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Mc,r_=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,i,s){MSApp.execUnsafeLocalFunction(function(){return t(e,r,i,s)})}:t}(function(t,e){if(t.namespaceURI!==zg.svg||"innerHTML"in t)t.innerHTML=e;else{for(Mc=Mc||document.createElement("div"),Mc.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Mc.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function iu(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Ol={animationIterationCount:!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},d2=["Webkit","ms","Moz","O"];Object.keys(Ol).forEach(function(t){d2.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Ol[e]=Ol[t]})});function i_(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Ol.hasOwnProperty(t)&&Ol[t]?(""+e).trim():e+"px"}function s_(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var i=r.indexOf("--")===0,s=i_(r,e[r],i);r==="float"&&(r="cssFloat"),i?t.setProperty(r,s):t[r]=s}}var h2=pt({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 Wg(t,e){if(e){if(h2[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ue(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ue(60));if(!(typeof e.dangerouslySetInnerHTML=="object"&&"__html"in e.dangerouslySetInnerHTML))throw Error(ue(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ue(62))}}function Gg(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Jy(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Hg=null,Lo=null,Fo=null;function yb(t){if(t=Vu(t)){if(typeof Hg!="function")throw Error(ue(280));var e=t.stateNode;e&&(e=$h(e),Hg(t.stateNode,t.type,e))}}function o_(t){Lo?Fo?Fo.push(t):Fo=[t]:Lo=t}function a_(){if(Lo){var t=Lo,e=Fo;if(Fo=Lo=null,yb(t),e)for(t=0;t<e.length;t++)yb(e[t])}}function Zy(t,e){return t(e)}function l_(t,e,r,i,s){return t(e,r,i,s)}function ev(){}var u_=Zy,_s=!1,Rp=!1;function tv(){(Lo!==null||Fo!==null)&&(ev(),a_())}function f2(t,e,r){if(Rp)return t(e,r);Rp=!0;try{return u_(t,e,r)}finally{Rp=!1,tv()}}function su(t,e){var r=t.stateNode;if(r===null)return null;var i=$h(r);if(i===null)return null;r=i[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(t=t.type,i=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!i;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(ue(231,e,typeof r));return r}var qg=!1;if(ni)try{var qa={};Object.defineProperty(qa,"passive",{get:function(){qg=!0}}),window.addEventListener("test",qa,qa),window.removeEventListener("test",qa,qa)}catch{qg=!1}function p2(t,e,r,i,s,o,a,l,c){var d=Array.prototype.slice.call(arguments,3);try{e.apply(r,d)}catch(f){this.onError(f)}}var Dl=!1,Od=null,Dd=!1,Kg=null,g2={onError:function(t){Dl=!0,Od=t}};function m2(t,e,r,i,s,o,a,l,c){Dl=!1,Od=null,p2.apply(g2,arguments)}function y2(t,e,r,i,s,o,a,l,c){if(m2.apply(this,arguments),Dl){if(Dl){var d=Od;Dl=!1,Od=null}else throw Error(ue(198));Dd||(Dd=!0,Kg=d)}}function io(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&1026&&(r=e.return),t=e.return;while(t)}return e.tag===3?r:null}function c_(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function vb(t){if(io(t)!==t)throw Error(ue(188))}function v2(t){var e=t.alternate;if(!e){if(e=io(t),e===null)throw Error(ue(188));return e!==t?null:t}for(var r=t,i=e;;){var s=r.return;if(s===null)break;var o=s.alternate;if(o===null){if(i=s.return,i!==null){r=i;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===r)return vb(s),t;if(o===i)return vb(s),e;o=o.sibling}throw Error(ue(188))}if(r.return!==i.return)r=s,i=o;else{for(var a=!1,l=s.child;l;){if(l===r){a=!0,r=s,i=o;break}if(l===i){a=!0,i=s,r=o;break}l=l.sibling}if(!a){for(l=o.child;l;){if(l===r){a=!0,r=o,i=s;break}if(l===i){a=!0,i=o,r=s;break}l=l.sibling}if(!a)throw Error(ue(189))}}if(r.alternate!==i)throw Error(ue(190))}if(r.tag!==3)throw Error(ue(188));return r.stateNode.current===r?t:e}function d_(t){if(t=v2(t),!t)return null;for(var e=t;;){if(e.tag===5||e.tag===6)return e;if(e.child)e.child.return=e,e=e.child;else{if(e===t)break;for(;!e.sibling;){if(!e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}}return null}function bb(t,e){for(var r=t.alternate;e!==null;){if(e===t||e===r)return!0;e=e.return}return!1}var h_,nv,f_,p_,Yg=!1,kr=[],Oi=null,Di=null,Mi=null,ou=new Map,au=new Map,Ka=[],wb="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 Xg(t,e,r,i,s){return{blockedOn:t,domEventName:e,eventSystemFlags:r|16,nativeEvent:s,targetContainers:[i]}}function Sb(t,e){switch(t){case"focusin":case"focusout":Oi=null;break;case"dragenter":case"dragleave":Di=null;break;case"mouseover":case"mouseout":Mi=null;break;case"pointerover":case"pointerout":ou.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":au.delete(e.pointerId)}}function Ya(t,e,r,i,s,o){return t===null||t.nativeEvent!==o?(t=Xg(e,r,i,s,o),e!==null&&(e=Vu(e),e!==null&&nv(e)),t):(t.eventSystemFlags|=i,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function b2(t,e,r,i,s){switch(e){case"focusin":return Oi=Ya(Oi,t,e,r,i,s),!0;case"dragenter":return Di=Ya(Di,t,e,r,i,s),!0;case"mouseover":return Mi=Ya(Mi,t,e,r,i,s),!0;case"pointerover":var o=s.pointerId;return ou.set(o,Ya(ou.get(o)||null,t,e,r,i,s)),!0;case"gotpointercapture":return o=s.pointerId,au.set(o,Ya(au.get(o)||null,t,e,r,i,s)),!0}return!1}function w2(t){var e=Es(t.target);if(e!==null){var r=io(e);if(r!==null){if(e=r.tag,e===13){if(e=c_(r),e!==null){t.blockedOn=e,p_(t.lanePriority,function(){zt.unstable_runWithPriority(t.priority,function(){f_(r)})});return}}else if(e===3&&r.stateNode.hydrate){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function od(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=ov(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r!==null)return e=Vu(r),e!==null&&nv(e),t.blockedOn=r,!1;e.shift()}return!0}function Cb(t,e,r){od(t)&&r.delete(e)}function S2(){for(Yg=!1;0<kr.length;){var t=kr[0];if(t.blockedOn!==null){t=Vu(t.blockedOn),t!==null&&h_(t);break}for(var e=t.targetContainers;0<e.length;){var r=ov(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r!==null){t.blockedOn=r;break}e.shift()}t.blockedOn===null&&kr.shift()}Oi!==null&&od(Oi)&&(Oi=null),Di!==null&&od(Di)&&(Di=null),Mi!==null&&od(Mi)&&(Mi=null),ou.forEach(Cb),au.forEach(Cb)}function Xa(t,e){t.blockedOn===e&&(t.blockedOn=null,Yg||(Yg=!0,zt.unstable_scheduleCallback(zt.unstable_NormalPriority,S2)))}function g_(t){function e(s){return Xa(s,t)}if(0<kr.length){Xa(kr[0],t);for(var r=1;r<kr.length;r++){var i=kr[r];i.blockedOn===t&&(i.blockedOn=null)}}for(Oi!==null&&Xa(Oi,t),Di!==null&&Xa(Di,t),Mi!==null&&Xa(Mi,t),ou.forEach(e),au.forEach(e),r=0;r<Ka.length;r++)i=Ka[r],i.blockedOn===t&&(i.blockedOn=null);for(;0<Ka.length&&(r=Ka[0],r.blockedOn===null);)w2(r),r.blockedOn===null&&Ka.shift()}function Nc(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var Eo={animationend:Nc("Animation","AnimationEnd"),animationiteration:Nc("Animation","AnimationIteration"),animationstart:Nc("Animation","AnimationStart"),transitionend:Nc("Transition","TransitionEnd")},Pp={},m_={};ni&&(m_=document.createElement("div").style,"AnimationEvent"in window||(delete Eo.animationend.animation,delete Eo.animationiteration.animation,delete Eo.animationstart.animation),"TransitionEvent"in window||delete Eo.transitionend.transition);function Ah(t){if(Pp[t])return Pp[t];if(!Eo[t])return t;var e=Eo[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in m_)return Pp[t]=e[r];return t}var y_=Ah("animationend"),v_=Ah("animationiteration"),b_=Ah("animationstart"),w_=Ah("transitionend"),S_=new Map,rv=new Map,C2=["abort","abort",y_,"animationEnd",v_,"animationIteration",b_,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",w_,"transitionEnd","waiting","waiting"];function iv(t,e){for(var r=0;r<t.length;r+=2){var i=t[r],s=t[r+1];s="on"+(s[0].toUpperCase()+s.slice(1)),rv.set(i,e),S_.set(i,s),no(s,[i])}}var x2=zt.unstable_now;x2();var at=8;function Co(t){if(1&t)return at=15,1;if(2&t)return at=14,2;if(4&t)return at=13,4;var e=24&t;return e!==0?(at=12,e):t&32?(at=11,32):(e=192&t,e!==0?(at=10,e):t&256?(at=9,256):(e=3584&t,e!==0?(at=8,e):t&4096?(at=7,4096):(e=4186112&t,e!==0?(at=6,e):(e=62914560&t,e!==0?(at=5,e):t&67108864?(at=4,67108864):t&134217728?(at=3,134217728):(e=805306368&t,e!==0?(at=2,e):1073741824&t?(at=1,1073741824):(at=8,t))))))}function _2(t){switch(t){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function E2(t){switch(t){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(ue(358,t))}}function lu(t,e){var r=t.pendingLanes;if(r===0)return at=0;var i=0,s=0,o=t.expiredLanes,a=t.suspendedLanes,l=t.pingedLanes;if(o!==0)i=o,s=at=15;else if(o=r&134217727,o!==0){var c=o&~a;c!==0?(i=Co(c),s=at):(l&=o,l!==0&&(i=Co(l),s=at))}else o=r&~a,o!==0?(i=Co(o),s=at):l!==0&&(i=Co(l),s=at);if(i===0)return 0;if(i=31-Gi(i),i=r&((0>i?0:1<<i)<<1)-1,e!==0&&e!==i&&!(e&a)){if(Co(e),s<=at)return e;at=s}if(e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=i;0<e;)r=31-Gi(e),s=1<<r,i|=t[r],e&=~s;return i}function C_(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Md(t,e){switch(t){case 15:return 1;case 14:return 2;case 12:return t=xo(24&~e),t===0?Md(10,e):t;case 10:return t=xo(192&~e),t===0?Md(8,e):t;case 8:return t=xo(3584&~e),t===0&&(t=xo(4186112&~e),t===0&&(t=512)),t;case 2:return e=xo(805306368&~e),e===0&&(e=268435456),e}throw Error(ue(358,t))}function xo(t){return t&-t}function Ap(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function Oh(t,e,r){t.pendingLanes|=e;var i=e-1;t.suspendedLanes&=i,t.pingedLanes&=i,t=t.eventTimes,e=31-Gi(e),t[e]=r}var Gi=Math.clz32?Math.clz32:I2,k2=Math.log,T2=Math.LN2;function I2(t){return t===0?32:31-(k2(t)/T2|0)|0}var R2=zt.unstable_UserBlockingPriority,P2=zt.unstable_runWithPriority,ad=!0;function A2(t,e,r,i){_s||ev();var s=sv,o=_s;_s=!0;try{l_(s,t,e,r,i)}finally{(_s=o)||tv()}}function O2(t,e,r,i){P2(R2,sv.bind(null,t,e,r,i))}function sv(t,e,r,i){if(ad){var s;if((s=(e&4)===0)&&0<kr.length&&-1<wb.indexOf(t))t=Xg(null,t,e,r,i),kr.push(t);else{var o=ov(t,e,r,i);if(o===null)s&&Sb(t,i);else{if(s){if(-1<wb.indexOf(t)){t=Xg(o,t,e,r,i),kr.push(t);return}if(b2(o,t,e,r,i))return;Sb(t,i)}N_(t,e,i,null,r)}}}}function ov(t,e,r,i){var s=Jy(i);if(s=Es(s),s!==null){var o=io(s);if(o===null)s=null;else{var a=o.tag;if(a===13){if(s=c_(o),s!==null)return s;s=null}else if(a===3){if(o.stateNode.hydrate)return o.tag===3?o.stateNode.containerInfo:null;s=null}else o!==s&&(s=null)}}return N_(t,e,i,s,r),null}var Ti=null,av=null,ld=null;function x_(){if(ld)return ld;var t,e=av,r=e.length,i,s="value"in Ti?Ti.value:Ti.textContent,o=s.length;for(t=0;t<r&&e[t]===s[t];t++);var a=r-t;for(i=1;i<=a&&e[r-i]===s[o-i];i++);return ld=s.slice(t,1<i?1-i:void 0)}function ud(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function $c(){return!0}function xb(){return!1}function Yn(t){function e(r,i,s,o,a){this._reactName=r,this._targetInst=s,this.type=i,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var l in t)t.hasOwnProperty(l)&&(r=t[l],this[l]=r?r(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?$c:xb,this.isPropagationStopped=xb,this}return pt(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=$c)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=$c)},persist:function(){},isPersistent:$c}),e}var ma={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},lv=Yn(ma),zu=pt({},ma,{view:0,detail:0}),D2=Yn(zu),Op,Dp,Qa,Dh=pt({},zu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:uv,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Qa&&(Qa&&t.type==="mousemove"?(Op=t.screenX-Qa.screenX,Dp=t.screenY-Qa.screenY):Dp=Op=0,Qa=t),Op)},movementY:function(t){return"movementY"in t?t.movementY:Dp}}),_b=Yn(Dh),M2=pt({},Dh,{dataTransfer:0}),N2=Yn(M2),$2=pt({},zu,{relatedTarget:0}),Mp=Yn($2),L2=pt({},ma,{animationName:0,elapsedTime:0,pseudoElement:0}),F2=Yn(L2),U2=pt({},ma,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),B2=Yn(U2),j2=pt({},ma,{data:0}),Eb=Yn(j2),z2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"}
vendor: 4,287 bytes, line 37
37,V2={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"},W2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function G2(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=W2[t])?!!e[t]:!1}function uv(){return G2}var H2=pt({},zu,{key:function(t){if(t.key){var e=z2[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=ud(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?V2[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:uv,charCode:function(t){return t.type==="keypress"?ud(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ud(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),q2=Yn(H2),K2=pt({},Dh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kb=Yn(K2),Y2=pt({},zu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:uv}),X2=Yn(Y2),Q2=pt({},ma,{propertyName:0,elapsedTime:0,pseudoElement:0}),J2=Yn(Q2),Z2=pt({},Dh,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),eA=Yn(Z2),tA=[9,13,27,32],cv=ni&&"CompositionEvent"in window,Ml=null;ni&&"documentMode"in document&&(Ml=document.documentMode);var nA=ni&&"TextEvent"in window&&!Ml,__=ni&&(!cv||Ml&&8<Ml&&11>=Ml),Tb=String.fromCharCode(32),Ib=!1;function E_(t,e){switch(t){case"keyup":return tA.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function k_(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ko=!1;function rA(t,e){switch(t){case"compositionend":return k_(e);case"keypress":return e.which!==32?null:(Ib=!0,Tb);case"textInput":return t=e.data,t===Tb&&Ib?null:t;default:return null}}function iA(t,e){if(ko)return t==="compositionend"||!cv&&E_(t,e)?(t=x_(),ld=av=Ti=null,ko=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return __&&e.locale!=="ko"?null:e.data;default:return null}}var sA={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 Rb(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!sA[t.type]:e==="textarea"}function T_(t,e,r,i){o_(i),e=Nd(e,"onChange"),0<e.length&&(r=new lv("onChange","change",null,r,i),t.push({event:r,listeners:e}))}var Nl=null,uu=null;function oA(t){O_(t,0)}function Mh(t){var e=Io(t);if(Zx(e))return t}function aA(t,e){if(t==="change")return e}var I_=!1;if(ni){var Np;if(ni){var $p="oninput"in document;if(!$p){var Pb=document.createElement("div");Pb.setAttribute("oninput","return;"),$p=typeof Pb.oninput=="function"}Np=$p}else Np=!1;I_=Np&&(!document.documentMode||9<document.documentMode)}function Ab(){Nl&&(Nl.detachEvent("onpropertychange",R_),uu=Nl=null)}function R_(t){if(t.propertyName==="value"&&Mh(uu)){var e=[];if(T_(e,uu,t,Jy(t)),t=oA,_s)t(e);else{_s=!0;try{Zy(t,e)}finally{_s=!1,tv()}}}}function lA(t,e,r){t==="focusin"?(Ab(),Nl=e,uu=r,Nl.attachEvent("onpropertychange",R_)):t==="focusout"&&Ab()}function uA(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Mh(uu)}function cA(t,e){if(t==="click")return Mh(e)}function dA(t,e){if(t==="input"||t==="change")return Mh(e)}function hA(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Zn=typeof Object.is=="function"?Object.is:hA,fA=Object.prototype.hasOwnProperty;function cu(t,e){if(Zn(t,e))return!0;
vendor: 48,480 bytes, line 37
37if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),i=Object.keys(e);if(r.length!==i.length)return!1;for(i=0;i<r.length;i++)if(!fA.call(e,r[i])||!Zn(t[r[i]],e[r[i]]))return!1;return!0}function Ob(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Db(t,e){var r=Ob(t);t=0;for(var i;r;){if(r.nodeType===3){if(i=t+r.textContent.length,t<=e&&i>=e)return{node:r,offset:e-t};t=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Ob(r)}}function P_(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?P_(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Mb(){for(var t=window,e=Ad();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Ad(t.document)}return e}function Qg(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var pA=ni&&"documentMode"in document&&11>=document.documentMode,To=null,Jg=null,$l=null,Zg=!1;function Nb(t,e,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Zg||To==null||To!==Ad(i)||(i=To,"selectionStart"in i&&Qg(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),$l&&cu($l,i)||($l=i,i=Nd(Jg,"onSelect"),0<i.length&&(e=new lv("onSelect","select",null,e,r),t.push({event:e,listeners:i}),e.target=To)))}iv("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0);iv("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);iv(C2,2);for(var $b="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Lp=0;Lp<$b.length;Lp++)rv.set($b[Lp],0);Jo("onMouseEnter",["mouseout","mouseover"]);Jo("onMouseLeave",["mouseout","mouseover"]);Jo("onPointerEnter",["pointerout","pointerover"]);Jo("onPointerLeave",["pointerout","pointerover"]);no("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));no("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));no("onBeforeInput",["compositionend","keypress","textInput","paste"]);no("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));no("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));no("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),A_=new Set("cancel close invalid load scroll toggle".split(" ").concat(yl));function Lb(t,e,r){var i=t.type||"unknown-event";t.currentTarget=r,y2(i,e,void 0,t),t.currentTarget=null}function O_(t,e){e=(e&4)!==0;for(var r=0;r<t.length;r++){var i=t[r],s=i.event;i=i.listeners;e:{var o=void 0;if(e)for(var a=i.length-1;0<=a;a--){var l=i[a],c=l.instance,d=l.currentTarget;if(l=l.listener,c!==o&&s.isPropagationStopped())break e;Lb(s,l,d),o=c}else for(a=0;a<i.length;a++){if(l=i[a],c=l.instance,d=l.currentTarget,l=l.listener,c!==o&&s.isPropagationStopped())break e;Lb(s,l,d),o=c}}}if(Dd)throw t=Kg,Dd=!1,Kg=null,t}function ut(t,e){var r=L_(e),i=t+"__bubble";r.has(i)||(M_(e,t,2,!1),r.add(i))}var Fb="_reactListening"+Math.random().toString(36).slice(2);function D_(t){t[Fb]||(t[Fb]=!0,Xx.forEach(function(e){A_.has(e)||Ub(e,!1,t,null),Ub(e,!0,t,null)}))}function Ub(t,e,r,i){var s=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,o=r;if(t==="selectionchange"&&r.nodeType!==9&&(o=r.ownerDocument),i!==null&&!e&&A_.has(t)){if(t!=="scroll")return;s|=2,o=i}var a=L_(o),l=t+"__"+(e?"capture":"bubble");a.has(l)||(e&&(s|=4),M_(o,t,s,e),a.add(l))}function M_(t,e,r,i){var s=rv.get(e);switch(s===void 0?2:s){case 0:s=A2;break;case 1:s=O2;break;default:s=sv}r=s.bind(null,e,r,t),s=void 0,!qg||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),i?s!==void 0?t.addEventListener(e,r,{capture:!0,passive:s}):t.addEventListener(e,r,!0):s!==void 0?t.addEventListener(e,r,{passive:s}):t.addEventListener(e,r,!1)}function N_(t,e,r,i,s){var o=i;if(!(e&1)&&!(e&2)&&i!==null)e:for(;;){if(i===null)return;var a=i.tag;if(a===3||a===4){var l=i.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(a===4)for(a=i.return;a!==null;){var c=a.tag;if((c===3||c===4)&&(c=a.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;a=a.return}for(;l!==null;){if(a=Es(l),a===null)return;if(c=a.tag,c===5||c===6){i=o=a;continue e}l=l.parentNode}}i=i.return}f2(function(){var d=o,f=Jy(r),g=[];e:{var v=S_.get(t);if(v!==void 0){var _=lv,w=t;switch(t){case"keypress":if(ud(r)===0)break e;case"keydown":case"keyup":_=q2;break;case"focusin":w="focus",_=Mp;break;case"focusout":w="blur",_=Mp;break;case"beforeblur":case"afterblur":_=Mp;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":_=_b;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_=N2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_=X2;break;case y_:case v_:case b_:_=F2;break;case w_:_=J2;break;case"scroll":_=D2;break;case"wheel":_=eA;break;case"copy":case"cut":case"paste":_=B2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_=kb}var k=(e&4)!==0,y=!k&&t==="scroll",b=k?v!==null?v+"Capture":null:v;k=[];for(var x=d,R;x!==null;){R=x;var E=R.stateNode;if(R.tag===5&&E!==null&&(R=E,b!==null&&(E=su(x,b),E!=null&&k.push(du(x,E,R)))),y)break;x=x.return}0<k.length&&(v=new _(v,w,null,r,f),g.push({event:v,listeners:k}))}}if(!(e&7)){e:{if(v=t==="mouseover"||t==="pointerover",_=t==="mouseout"||t==="pointerout",v&&!(e&16)&&(w=r.relatedTarget||r.fromElement)&&(Es(w)||w[ya]))break e;if((_||v)&&(v=f.window===f?f:(v=f.ownerDocument)?v.defaultView||v.parentWindow:window,_?(w=r.relatedTarget||r.toElement,_=d,w=w?Es(w):null,w!==null&&(y=io(w),w!==y||w.tag!==5&&w.tag!==6)&&(w=null)):(_=null,w=d),_!==w)){if(k=_b,E="onMouseLeave",b="onMouseEnter",x="mouse",(t==="pointerout"||t==="pointerover")&&(k=kb,E="onPointerLeave",b="onPointerEnter",x="pointer"),y=_==null?v:Io(_),R=w==null?v:Io(w),v=new k(E,x+"leave",_,r,f),v.target=y,v.relatedTarget=R,E=null,Es(f)===d&&(k=new k(b,x+"enter",w,r,f),k.target=R,k.relatedTarget=y,E=k),y=E,_&&w)t:{for(k=_,b=w,x=0,R=k;R;R=co(R))x++;for(R=0,E=b;E;E=co(E))R++;for(;0<x-R;)k=co(k),x--;for(;0<R-x;)b=co(b),R--;for(;x--;){if(k===b||b!==null&&k===b.alternate)break t;k=co(k),b=co(b)}k=null}else k=null;_!==null&&Bb(g,v,_,k,!1),w!==null&&y!==null&&Bb(g,y,w,k,!0)}}e:{if(v=d?Io(d):window,_=v.nodeName&&v.nodeName.toLowerCase(),_==="select"||_==="input"&&v.type==="file")var C=aA;else if(Rb(v))if(I_)C=dA;else{C=uA;var D=lA}else(_=v.nodeName)&&_.toLowerCase()==="input"&&(v.type==="checkbox"||v.type==="radio")&&(C=cA);if(C&&(C=C(t,d))){T_(g,C,r,f);break e}D&&D(t,v,d),t==="focusout"&&(D=v._wrapperState)&&D.controlled&&v.type==="number"&&Ug(v,"number",v.value)}switch(D=d?Io(d):window,t){case"focusin":(Rb(D)||D.contentEditable==="true")&&(To=D,Jg=d,$l=null);break;case"focusout":$l=Jg=To=null;break;case"mousedown":Zg=!0;break;case"contextmenu":case"mouseup":case"dragend":Zg=!1,Nb(g,r,f);break;case"selectionchange":if(pA)break;case"keydown":case"keyup":Nb(g,r,f)}var A;if(cv)e:{switch(t){case"compositionstart":var U="onCompositionStart";break e;case"compositionend":U="onCompositionEnd";break e;case"compositionupdate":U="onCompositionUpdate";break e}U=void 0}else ko?E_(t,r)&&(U="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(U="onCompositionStart");U&&(__&&r.locale!=="ko"&&(ko||U!=="onCompositionStart"?U==="onCompositionEnd"&&ko&&(A=x_()):(Ti=f,av="value"in Ti?Ti.value:Ti.textContent,ko=!0)),D=Nd(d,U),0<D.length&&(U=new Eb(U,t,null,r,f),g.push({event:U,listeners:D}),A?U.data=A:(A=k_(r),A!==null&&(U.data=A)))),(A=nA?rA(t,r):iA(t,r))&&(d=Nd(d,"onBeforeInput"),0<d.length&&(f=new Eb("onBeforeInput","beforeinput",null,r,f),g.push({event:f,listeners:d}),f.data=A))}O_(g,e)})}function du(t,e,r){return{instance:t,listener:e,currentTarget:r}}function Nd(t,e){for(var r=e+"Capture",i=[];t!==null;){var s=t,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=su(t,r),o!=null&&i.unshift(du(t,o,s)),o=su(t,e),o!=null&&i.push(du(t,o,s))),t=t.return}return i}function co(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Bb(t,e,r,i,s){for(var o=e._reactName,a=[];r!==null&&r!==i;){var l=r,c=l.alternate,d=l.stateNode;if(c!==null&&c===i)break;l.tag===5&&d!==null&&(l=d,s?(c=su(r,o),c!=null&&a.unshift(du(r,c,l))):s||(c=su(r,o),c!=null&&a.push(du(r,c,l)))),r=r.return}a.length!==0&&t.push({event:e,listeners:a})}function $d(){}var Fp=null,Up=null;function $_(t,e){switch(t){case"button":case"input":case"select":case"textarea":return!!e.autoFocus}return!1}function em(t,e){return t==="textarea"||t==="option"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var jb=typeof setTimeout=="function"?setTimeout:void 0,gA=typeof clearTimeout=="function"?clearTimeout:void 0;function dv(t){t.nodeType===1?t.textContent="":t.nodeType===9&&(t=t.body,t!=null&&(t.textContent=""))}function Uo(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break}return t}function zb(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"){if(e===0)return t;e--}else r==="/$"&&e++}t=t.previousSibling}return null}var Bp=0;function mA(t){return{$$typeof:Xy,toString:t,valueOf:t}}var Nh=Math.random().toString(36).slice(2),Ii="__reactFiber$"+Nh,Ld="__reactProps$"+Nh,ya="__reactContainer$"+Nh,Vb="__reactEvents$"+Nh;function Es(t){var e=t[Ii];if(e)return e;for(var r=t.parentNode;r;){if(e=r[ya]||r[Ii]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=zb(t);t!==null;){if(r=t[Ii])return r;t=zb(t)}return e}t=r,r=t.parentNode}return null}function Vu(t){return t=t[Ii]||t[ya],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Io(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(ue(33))}function $h(t){return t[Ld]||null}function L_(t){var e=t[Vb];return e===void 0&&(e=t[Vb]=new Set),e}var tm=[],Ro=-1;function is(t){return{current:t}}function dt(t){0>Ro||(t.current=tm[Ro],tm[Ro]=null,Ro--)}function bt(t,e){Ro++,tm[Ro]=t.current,t.current=e}var Hi={},yn=is(Hi),Nn=is(!1),zs=Hi;function Zo(t,e){var r=t.type.contextTypes;if(!r)return Hi;var i=t.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in r)s[o]=e[o];return i&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function $n(t){return t=t.childContextTypes,t!=null}function Fd(){dt(Nn),dt(yn)}function Wb(t,e,r){if(yn.current!==Hi)throw Error(ue(168));bt(yn,e),bt(Nn,r)}function F_(t,e,r){var i=t.stateNode;if(t=e.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var s in i)if(!(s in t))throw Error(ue(108,No(e)||"Unknown",s));return pt({},r,i)}function cd(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Hi,zs=yn.current,bt(yn,t),bt(Nn,Nn.current),!0}function Gb(t,e,r){var i=t.stateNode;if(!i)throw Error(ue(169));r?(t=F_(t,e,zs),i.__reactInternalMemoizedMergedChildContext=t,dt(Nn),dt(yn),bt(yn,t)):dt(Nn),bt(Nn,r)}var hv=null,Ds=null,yA=zt.unstable_runWithPriority,fv=zt.unstable_scheduleCallback,nm=zt.unstable_cancelCallback,vA=zt.unstable_shouldYield,Hb=zt.unstable_requestPaint,rm=zt.unstable_now,bA=zt.unstable_getCurrentPriorityLevel,Lh=zt.unstable_ImmediatePriority,U_=zt.unstable_UserBlockingPriority,B_=zt.unstable_NormalPriority,j_=zt.unstable_LowPriority,z_=zt.unstable_IdlePriority,jp={},wA=Hb!==void 0?Hb:function(){},Hr=null,dd=null,zp=!1,qb=rm(),hn=1e4>qb?rm:function(){return rm()-qb};function ea(){switch(bA()){case Lh:return 99;case U_:return 98;case B_:return 97;case j_:return 96;case z_:return 95;default:throw Error(ue(332))}}function V_(t){switch(t){case 99:return Lh;case 98:return U_;case 97:return B_;case 96:return j_;case 95:return z_;default:throw Error(ue(332))}}function Vs(t,e){return t=V_(t),yA(t,e)}function hu(t,e,r){return t=V_(t),fv(t,e,r)}function Ur(){if(dd!==null){var t=dd;dd=null,nm(t)}W_()}function W_(){if(!zp&&Hr!==null){zp=!0;var t=0;try{var e=Hr;Vs(99,function(){for(;t<e.length;t++){var r=e[t];do r=r(!0);while(r!==null)}}),Hr=null}catch(r){throw Hr!==null&&(Hr=Hr.slice(t+1)),fv(Lh,Ur),r}finally{zp=!1}}}var SA=ro.ReactCurrentBatchConfig;function mr(t,e){if(t&&t.defaultProps){e=pt({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}var Ud=is(null),Bd=null,Po=null,jd=null;function pv(){jd=Po=Bd=null}function gv(t){var e=Ud.current;dt(Ud),t.type._context._currentValue=e}function G_(t,e){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)===e){if(r===null||(r.childLanes&e)===e)break;r.childLanes|=e}else t.childLanes|=e,r!==null&&(r.childLanes|=e);t=t.return}}function Bo(t,e){Bd=t,jd=Po=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(vr=!0),t.firstContext=null)}function rr(t,e){if(jd!==t&&e!==!1&&e!==0)if((typeof e!="number"||e===1073741823)&&(jd=t,e=1073741823),e={context:t,observedBits:e,next:null},Po===null){if(Bd===null)throw Error(ue(308));Po=e,Bd.dependencies={lanes:0,firstContext:e,responders:null}}else Po=Po.next=e;return t._currentValue}var wi=!1;function mv(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function H_(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Ni(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function $i(t,e){if(t=t.updateQueue,t!==null){t=t.shared;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}}function Kb(t,e){var r=t.updateQueue,i=t.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var s=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?s=o=a:o=o.next=a,r=r.next}while(r!==null);o===null?s=o=e:o=o.next=e}else s=o=e;r={baseState:i.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:i.shared,effects:i.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function fu(t,e,r,i){var s=t.updateQueue;wi=!1;var o=s.firstBaseUpdate,a=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,d=c.next;c.next=null,a===null?o=d:a.next=d,a=c;var f=t.alternate;if(f!==null){f=f.updateQueue;var g=f.lastBaseUpdate;g!==a&&(g===null?f.firstBaseUpdate=d:g.next=d,f.lastBaseUpdate=c)}}if(o!==null){g=s.baseState,a=0,f=d=c=null;do{l=o.lane;var v=o.eventTime;if((i&l)===l){f!==null&&(f=f.next={eventTime:v,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var _=t,w=o;switch(l=e,v=r,w.tag){case 1:if(_=w.payload,typeof _=="function"){g=_.call(v,g,l);break e}g=_;break e;case 3:_.flags=_.flags&-4097|64;case 0:if(_=w.payload,l=typeof _=="function"?_.call(v,g,l):_,l==null)break e;g=pt({},g,l);break e;case 2:wi=!0}}o.callback!==null&&(t.flags|=32,l=s.effects,l===null?s.effects=[o]:l.push(o))}else v={eventTime:v,lane:l,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(d=f=v,c=g):f=f.next=v,a|=l;if(o=o.next,o===null){if(l=s.shared.pending,l===null)break;o=l.next,l.next=null,s.lastBaseUpdate=l,s.shared.pending=null}}while(1);f===null&&(c=g),s.baseState=c,s.firstBaseUpdate=d,s.lastBaseUpdate=f,Gu|=a,t.lanes=a,t.memoizedState=g}}function Yb(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var i=t[e],s=i.callback;if(s!==null){if(i.callback=null,i=r,typeof s!="function")throw Error(ue(191,s));s.call(i)}}}var q_=new Ih.Component().refs;function zd(t,e,r,i){e=t.memoizedState,r=r(i,e),r=r==null?e:pt({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var Fh={isMounted:function(t){return(t=t._reactInternals)?io(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var i=Hn(),s=Li(t),o=Ni(i,s);o.payload=e,r!=null&&(o.callback=r),$i(t,o),Fi(t,s,i)},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var i=Hn(),s=Li(t),o=Ni(i,s);o.tag=1,o.payload=e,r!=null&&(o.callback=r),$i(t,o),Fi(t,s,i)},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=Hn(),i=Li(t),s=Ni(r,i);s.tag=2,e!=null&&(s.callback=e),$i(t,s),Fi(t,i,r)}};function Xb(t,e,r,i,s,o,a){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(i,o,a):e.prototype&&e.prototype.isPureReactComponent?!cu(r,i)||!cu(s,o):!0}function K_(t,e,r){var i=!1,s=Hi,o=e.contextType;return typeof o=="object"&&o!==null?o=rr(o):(s=$n(e)?zs:yn.current,i=e.contextTypes,o=(i=i!=null)?Zo(t,s):Hi),e=new e(r,o),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Fh,t.stateNode=e,e._reactInternals=t,i&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=o),e}function Qb(t,e,r,i){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(r,i),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(r,i),e.state!==t&&Fh.enqueueReplaceState(e,e.state,null)}function im(t,e,r,i){var s=t.stateNode;s.props=r,s.state=t.memoizedState,s.refs=q_,mv(t);var o=e.contextType;typeof o=="object"&&o!==null?s.context=rr(o):(o=$n(e)?zs:yn.current,s.context=Zo(t,o)),fu(t,r,s,i),s.state=t.memoizedState,o=e.getDerivedStateFromProps,typeof o=="function"&&(zd(t,e,o,r),s.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(e=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),e!==s.state&&Fh.enqueueReplaceState(s,s.state,null),fu(t,r,s,i),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4)}var Lc=Array.isArray;function Ja(t,e,r){if(t=r.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(ue(309));var i=r.stateNode}if(!i)throw Error(ue(147,t));var s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var a=i.refs;a===q_&&(a=i.refs={}),o===null?delete a[s]:a[s]=o},e._stringRef=s,e)}if(typeof t!="string")throw Error(ue(284));if(!r._owner)throw Error(ue(290,t))}return t}function Fc(t,e){if(t.type!=="textarea")throw Error(ue(31,Object.prototype.toString.call(e)==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":e))}function Y_(t){function e(y,b){if(t){var x=y.lastEffect;x!==null?(x.nextEffect=b,y.lastEffect=b):y.firstEffect=y.lastEffect=b,b.nextEffect=null,b.flags=8}}function r(y,b){if(!t)return null;for(;b!==null;)e(y,b),b=b.sibling;return null}function i(y,b){for(y=new Map;b!==null;)b.key!==null?y.set(b.key,b):y.set(b.index,b),b=b.sibling;return y}function s(y,b){return y=Ki(y,b),y.index=0,y.sibling=null,y}function o(y,b,x){return y.index=x,t?(x=y.alternate,x!==null?(x=x.index,x<b?(y.flags=2,b):x):(y.flags=2,b)):b}function a(y){return t&&y.alternate===null&&(y.flags=2),y}function l(y,b,x,R){return b===null||b.tag!==6?(b=qp(x,y.mode,R),b.return=y,b):(b=s(b,x),b.return=y,b)}function c(y,b,x,R){return b!==null&&b.elementType===x.type?(R=s(b,x.props),R.ref=Ja(y,b,x),R.return=y,R):(R=gd(x.type,x.key,x.props,null,y.mode,R),R.ref=Ja(y,b,x),R.return=y,R)}function d(y,b,x,R){return b===null||b.tag!==4||b.stateNode.containerInfo!==x.containerInfo||b.stateNode.implementation!==x.implementation?(b=Kp(x,y.mode,R),b.return=y,b):(b=s(b,x.children||[]),b.return=y,b)}function f(y,b,x,R,E){return b===null||b.tag!==7?(b=Wo(x,y.mode,R,E),b.return=y,b):(b=s(b,x),b.return=y,b)}function g(y,b,x){if(typeof b=="string"||typeof b=="number")return b=qp(""+b,y.mode,x),b.return=y,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case gl:return x=gd(b.type,b.key,b.props,null,y.mode,x),x.ref=Ja(y,null,b),x.return=y,x;case xs:return b=Kp(b,y.mode,x),b.return=y,b}if(Lc(b)||Ha(b))return b=Wo(b,y.mode,x,null),b.return=y,b;Fc(y,b)}return null}function v(y,b,x,R){var E=b!==null?b.key:null;if(typeof x=="string"||typeof x=="number")return E!==null?null:l(y,b,""+x,R);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case gl:return x.key===E?x.type===Si?f(y,b,x.props.children,R,E):c(y,b,x,R):null;case xs:return x.key===E?d(y,b,x,R):null}if(Lc(x)||Ha(x))return E!==null?null:f(y,b,x,R,null);Fc(y,x)}return null}function _(y,b,x,R,E){if(typeof R=="string"||typeof R=="number")return y=y.get(x)||null,l(b,y,""+R,E);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case gl:return y=y.get(R.key===null?x:R.key)||null,R.type===Si?f(b,y,R.props.children,E,R.key):c(b,y,R,E);case xs:return y=y.get(R.key===null?x:R.key)||null,d(b,y,R,E)}if(Lc(R)||Ha(R))return y=y.get(x)||null,f(b,y,R,E,null);Fc(b,R)}return null}function w(y,b,x,R){for(var E=null,C=null,D=b,A=b=0,U=null;D!==null&&A<x.length;A++){D.index>A?(U=D,D=null):U=D.sibling;var B=v(y,D,x[A],R);if(B===null){D===null&&(D=U);break}t&&D&&B.alternate===null&&e(y,D),b=o(B,b,A),C===null?E=B:C.sibling=B,C=B,D=U}if(A===x.length)return r(y,D),E;if(D===null){for(;A<x.length;A++)D=g(y,x[A],R),D!==null&&(b=o(D,b,A),C===null?E=D:C.sibling=D,C=D);return E}for(D=i(y,D);A<x.length;A++)U=_(D,y,A,x[A],R),U!==null&&(t&&U.alternate!==null&&D.delete(U.key===null?A:U.key),b=o(U,b,A),C===null?E=U:C.sibling=U,C=U);return t&&D.forEach(function(z){return e(y,z)}),E}function k(y,b,x,R){var E=Ha(x);if(typeof E!="function")throw Error(ue(150));if(x=E.call(x),x==null)throw Error(ue(151));for(var C=E=null,D=b,A=b=0,U=null,B=x.next();D!==null&&!B.done;A++,B=x.next()){D.index>A?(U=D,D=null):U=D.sibling;var z=v(y,D,B.value,R);if(z===null){D===null&&(D=U);break}t&&D&&z.alternate===null&&e(y,D),b=o(z,b,A),C===null?E=z:C.sibling=z,C=z,D=U}if(B.done)return r(y,D),E;if(D===null){for(;!B.done;A++,B=x.next())B=g(y,B.value,R),B!==null&&(b=o(B,b,A),C===null?E=B:C.sibling=B,C=B);return E}for(D=i(y,D);!B.done;A++,B=x.next())B=_(D,y,A,B.value,R),B!==null&&(t&&B.alternate!==null&&D.delete(B.key===null?A:B.key),b=o(B,b,A),C===null?E=B:C.sibling=B,C=B);return t&&D.forEach(function(V){return e(y,V)}),E}return function(y,b,x,R){var E=typeof x=="object"&&x!==null&&x.type===Si&&x.key===null;E&&(x=x.props.children);var C=typeof x=="object"&&x!==null;if(C)switch(x.$$typeof){case gl:e:{for(C=x.key,E=b;E!==null;){if(E.key===C){switch(E.tag){case 7:if(x.type===Si){r(y,E.sibling),b=s(E,x.props.children),b.return=y,y=b;break e}break;default:if(E.elementType===x.type){r(y,E.sibling),b=s(E,x.props),b.ref=Ja(y,E,x),b.return=y,y=b;break e}}r(y,E);break}else e(y,E);E=E.sibling}x.type===Si?(b=Wo(x.props.children,y.mode,R,x.key),b.return=y,y=b):(R=gd(x.type,x.key,x.props,null,y.mode,R),R.ref=Ja(y,b,x),R.return=y,y=R)}return a(y);case xs:e:{for(E=x.key;b!==null;){if(b.key===E)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){r(y,b.sibling),b=s(b,x.children||[]),b.return=y,y=b;break e}else{r(y,b);break}else e(y,b);b=b.sibling}b=Kp(x,y.mode,R),b.return=y,y=b}return a(y)}if(typeof x=="string"||typeof x=="number")return x=""+x,b!==null&&b.tag===6?(r(y,b.sibling),b=s(b,x),b.return=y,y=b):(r(y,b),b=qp(x,y.mode,R),b.return=y,y=b),a(y);if(Lc(x))return w(y,b,x,R);if(Ha(x))return k(y,b,x,R);if(C&&Fc(y,x),typeof x>"u"&&!E)switch(y.tag){case 1:case 22:case 0:case 11:case 15:throw Error(ue(152,No(y.type)||"Component"))}return r(y,b)}}var Vd=Y_(!0),X_=Y_(!1),Wu={},Ar=is(Wu),pu=is(Wu),gu=is(Wu);function ks(t){if(t===Wu)throw Error(ue(174));return t}function sm(t,e){switch(bt(gu,e),bt(pu,t),bt(Ar,Wu),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Vg(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Vg(e,t)}dt(Ar),bt(Ar,e)}function ta(){dt(Ar),dt(pu),dt(gu)}function Jb(t){ks(gu.current);var e=ks(Ar.current),r=Vg(e,t.type);e!==r&&(bt(pu,t),bt(Ar,r))}function yv(t){pu.current===t&&(dt(Ar),dt(pu))}var vt=is(0);function Wd(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&64)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Kr=null,Ri=null,Or=!1;function Q_(t,e){var r=er(5,null,null,0);r.elementType="DELETED",r.type="DELETED",r.stateNode=e,r.return=t,r.flags=8,t.lastEffect!==null?(t.lastEffect.nextEffect=r,t.lastEffect=r):t.firstEffect=t.lastEffect=r}function Zb(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,!0):!1;case 13:return!1;default:return!1}}function om(t){if(Or){var e=Ri;if(e){var r=e;if(!Zb(t,e)){if(e=Uo(r.nextSibling),!e||!Zb(t,e)){t.flags=t.flags&-1025|2,Or=!1,Kr=t;return}Q_(Kr,r)}Kr=t,Ri=Uo(e.firstChild)}else t.flags=t.flags&-1025|2,Or=!1,Kr=t}}function ew(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Kr=t}function Uc(t){if(t!==Kr)return!1;if(!Or)return ew(t),Or=!0,!1;var e=t.type;if(t.tag!==5||e!=="head"&&e!=="body"&&!em(e,t.memoizedProps))for(e=Ri;e;)Q_(t,e),e=Uo(e.nextSibling);if(ew(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(ue(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){Ri=Uo(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}Ri=null}}else Ri=Kr?Uo(t.stateNode.nextSibling):null;return!0}function Vp(){Ri=Kr=null,Or=!1}var jo=[];function vv(){for(var t=0;t<jo.length;t++)jo[t]._workInProgressVersionPrimary=null;jo.length=0}var Ll=ro.ReactCurrentDispatcher,tr=ro.ReactCurrentBatchConfig,mu=0,Et=null,un=null,Ht=null,Gd=!1,Fl=!1;function Pn(){throw Error(ue(321))}function bv(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!Zn(t[r],e[r]))return!1;return!0}function wv(t,e,r,i,s,o){if(mu=o,Et=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Ll.current=t===null||t.memoizedState===null?xA:_A,t=r(i,s),Fl){o=0;do{if(Fl=!1,!(25>o))throw Error(ue(301));o+=1,Ht=un=null,e.updateQueue=null,Ll.current=EA,t=r(i,s)}while(Fl)}if(Ll.current=Yd,e=un!==null&&un.next!==null,mu=0,Ht=un=Et=null,Gd=!1,e)throw Error(ue(300));return t}function Ts(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ht===null?Et.memoizedState=Ht=t:Ht=Ht.next=t,Ht}function so(){if(un===null){var t=Et.alternate;t=t!==null?t.memoizedState:null}else t=un.next;var e=Ht===null?Et.memoizedState:Ht.next;if(e!==null)Ht=e,un=t;else{if(t===null)throw Error(ue(310));un=t,t={memoizedState:un.memoizedState,baseState:un.baseState,baseQueue:un.baseQueue,queue:un.queue,next:null},Ht===null?Et.memoizedState=Ht=t:Ht=Ht.next=t}return Ht}function Tr(t,e){return typeof e=="function"?e(t):e}function Za(t){var e=so(),r=e.queue;if(r===null)throw Error(ue(311));r.lastRenderedReducer=t;var i=un,s=i.baseQueue,o=r.pending;if(o!==null){if(s!==null){var a=s.next;s.next=o.next,o.next=a}i.baseQueue=s=o,r.pending=null}if(s!==null){s=s.next,i=i.baseState;var l=a=o=null,c=s;do{var d=c.lane;if((mu&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),i=c.eagerReducer===t?c.eagerState:t(i,c.action);else{var f={lane:d,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};l===null?(a=l=f,o=i):l=l.next=f,Et.lanes|=d,Gu|=d}c=c.next}while(c!==null&&c!==s);l===null?o=i:l.next=a,Zn(i,e.memoizedState)||(vr=!0),e.memoizedState=i,e.baseState=o,e.baseQueue=l,r.lastRenderedState=i}return[e.memoizedState,r.dispatch]}function el(t){var e=so(),r=e.queue;if(r===null)throw Error(ue(311));r.lastRenderedReducer=t;var i=r.dispatch,s=r.pending,o=e.memoizedState;if(s!==null){r.pending=null;var a=s=s.next;do o=t(o,a.action),a=a.next;while(a!==s);Zn(o,e.memoizedState)||(vr=!0),e.memoizedState=o,e.baseQueue===null&&(e.baseState=o),r.lastRenderedState=o}return[o,i]}function tw(t,e,r){var i=e._getVersion;i=i(e._source);var s=e._workInProgressVersionPrimary;if(s!==null?t=s===i:(t=t.mutableReadLanes,(t=(mu&t)===t)&&(e._workInProgressVersionPrimary=i,jo.push(e))),t)return r(e._source);throw jo.push(e),Error(ue(350))}function J_(t,e,r,i){var s=_n;if(s===null)throw Error(ue(349));var o=e._getVersion,a=o(e._source),l=Ll.current,c=l.useState(function(){return tw(s,e,r)}),d=c[1],f=c[0];c=Ht;var g=t.memoizedState,v=g.refs,_=v.getSnapshot,w=g.source;g=g.subscribe;var k=Et;return t.memoizedState={refs:v,source:e,subscribe:i},l.useEffect(function(){v.getSnapshot=r,v.setSnapshot=d;var y=o(e._source);if(!Zn(a,y)){y=r(e._source),Zn(f,y)||(d(y),y=Li(k),s.mutableReadLanes|=y&s.pendingLanes),y=s.mutableReadLanes,s.entangledLanes|=y;for(var b=s.entanglements,x=y;0<x;){var R=31-Gi(x),E=1<<R;b[R]|=y,x&=~E}}},[r,e,i]),l.useEffect(function(){return i(e._source,function(){var y=v.getSnapshot,b=v.setSnapshot;try{b(y(e._source));var x=Li(k);s.mutableReadLanes|=x&s.pendingLanes}catch(R){b(function(){throw R})}})},[e,i]),Zn(_,r)&&Zn(w,e)&&Zn(g,i)||(t={pending:null,dispatch:null,lastRenderedReducer:Tr,lastRenderedState:f},t.dispatch=d=xv.bind(null,Et,t),c.queue=t,c.baseQueue=null,f=tw(s,e,r),c.memoizedState=c.baseState=f),f}function Z_(t,e,r){var i=so();return J_(i,t,e,r)}function tl(t){var e=Ts();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t=e.queue={pending:null,dispatch:null,lastRenderedReducer:Tr,lastRenderedState:t},t=t.dispatch=xv.bind(null,Et,t),[e.memoizedState,t]}function Hd(t,e,r,i){return t={tag:t,create:e,destroy:r,deps:i,next:null},e=Et.updateQueue,e===null?(e={lastEffect:null},Et.updateQueue=e,e.lastEffect=t.next=t):(r=e.lastEffect,r===null?e.lastEffect=t.next=t:(i=r.next,r.next=t,t.next=i,e.lastEffect=t)),t}function nw(t){var e=Ts();return t={current:t},e.memoizedState=t}function qd(){return so().memoizedState}function am(t,e,r,i){var s=Ts();Et.flags|=t,s.memoizedState=Hd(1|e,r,void 0,i===void 0?null:i)}function Sv(t,e,r,i){var s=so();i=i===void 0?null:i;var o=void 0;if(un!==null){var a=un.memoizedState;if(o=a.destroy,i!==null&&bv(i,a.deps)){Hd(e,r,o,i);return}}Et.flags|=t,s.memoizedState=Hd(1|e,r,o,i)}function rw(t,e){return am(516,4,t,e)}function Kd(t,e){return Sv(516,4,t,e)}function eE(t,e){return Sv(4,2,t,e)}function tE(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function nE(t,e,r){return r=r!=null?r.concat([t]):null,Sv(4,2,tE.bind(null,e,t),r)}function Cv(){}function rE(t,e){var r=so();e=e===void 0?null:e;var i=r.memoizedState;return i!==null&&e!==null&&bv(e,i[1])?i[0]:(r.memoizedState=[t,e],t)}function iE(t,e){var r=so();e=e===void 0?null:e;var i=r.memoizedState;return i!==null&&e!==null&&bv(e,i[1])?i[0]:(t=t(),r.memoizedState=[t,e],t)}function CA(t,e){var r=ea();Vs(98>r?98:r,function(){t(!0)}),Vs(97<r?97:r,function(){var i=tr.transition;tr.transition=1;try{t(!1),e()}finally{tr.transition=i}})}function xv(t,e,r){var i=Hn(),s=Li(t),o={lane:s,action:r,eagerReducer:null,eagerState:null,next:null},a=e.pending;if(a===null?o.next=o:(o.next=a.next,a.next=o),e.pending=o,a=t.alternate,t===Et||a!==null&&a===Et)Fl=Gd=!0;else{if(t.lanes===0&&(a===null||a.lanes===0)&&(a=e.lastRenderedReducer,a!==null))try{var l=e.lastRenderedState,c=a(l,r);if(o.eagerReducer=a,o.eagerState=c,Zn(c,l))return}catch{}finally{}Fi(t,s,i)}}var Yd={readContext:rr,useCallback:Pn,useContext:Pn,useEffect:Pn,useImperativeHandle:Pn,useLayoutEffect:Pn,useMemo:Pn,useReducer:Pn,useRef:Pn,useState:Pn,useDebugValue:Pn,useDeferredValue:Pn,useTransition:Pn,useMutableSource:Pn,useOpaqueIdentifier:Pn,unstable_isNewReconciler:!1},xA={readContext:rr,useCallback:function(t,e){return Ts().memoizedState=[t,e===void 0?null:e],t},useContext:rr,useEffect:rw,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,am(4,2,tE.bind(null,e,t),r)},useLayoutEffect:function(t,e){return am(4,2,t,e)},useMemo:function(t,e){var r=Ts();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var i=Ts();return e=r!==void 0?r(e):e,i.memoizedState=i.baseState=e,t=i.queue={pending:null,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},t=t.dispatch=xv.bind(null,Et,t),[i.memoizedState,t]},useRef:nw,useState:tl,useDebugValue:Cv,useDeferredValue:function(t){var e=tl(t),r=e[0],i=e[1];return rw(function(){var s=tr.transition;tr.transition=1;try{i(t)}finally{tr.transition=s}},[t]),r},useTransition:function(){var t=tl(!1),e=t[0];return t=CA.bind(null,t[1]),nw(t),[t,e]},useMutableSource:function(t,e,r){var i=Ts();return i.memoizedState={refs:{getSnapshot:e,setSnapshot:null},source:t,subscribe:r},J_(i,t,e,r)},useOpaqueIdentifier:function(){if(Or){var t=!1,e=mA(function(){throw t||(t=!0,r("r:"+(Bp++).toString(36))),Error(ue(355))}),r=tl(e)[1];return!(Et.mode&2)&&(Et.flags|=516,Hd(5,function(){r("r:"+(Bp++).toString(36))},void 0,null)),e}return e="r:"+(Bp++).toString(36),tl(e),e},unstable_isNewReconciler:!1},_A={readContext:rr,useCallback:rE,useContext:rr,useEffect:Kd,useImperativeHandle:nE,useLayoutEffect:eE,useMemo:iE,useReducer:Za,useRef:qd,useState:function(){return Za(Tr)},useDebugValue:Cv,useDeferredValue:function(t){var e=Za(Tr),r=e[0],i=e[1];return Kd(function(){var s=tr.transition;tr.transition=1;try{i(t)}finally{tr.transition=s}},[t]),r},useTransition:function(){var t=Za(Tr)[0];return[qd().current,t]},useMutableSource:Z_,useOpaqueIdentifier:function(){return Za(Tr)[0]},unstable_isNewReconciler:!1},EA={readContext:rr,useCallback:rE,useContext:rr,useEffect:Kd,useImperativeHandle:nE,useLayoutEffect:eE,useMemo:iE,useReducer:el,useRef:qd,useState:function(){return el(Tr)},useDebugValue:Cv,useDeferredValue:function(t){var e=el(Tr),r=e[0],i=e[1];return Kd(function(){var s=tr.transition;tr.transition=1;try{i(t)}finally{tr.transition=s}},[t]),r},useTransition:function(){var t=el(Tr)[0];return[qd().current,t]},useMutableSource:Z_,useOpaqueIdentifier:function(){return el(Tr)[0]},unstable_isNewReconciler:!1},kA=ro.ReactCurrentOwner,vr=!1;function An(t,e,r,i){e.child=t===null?X_(e,null,r,i):Vd(e,t.child,r,i)}function iw(t,e,r,i,s){r=r.render;var o=e.ref;return Bo(e,s),i=wv(t,e,r,i,o,s),t!==null&&!vr?(e.updateQueue=t.updateQueue,e.flags&=-517,t.lanes&=~s,Yr(t,e,s)):(e.flags|=1,An(t,e,i,s),e.child)}function sw(t,e,r,i,s,o){if(t===null){var a=r.type;return typeof a=="function"&&!Rv(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=a,sE(t,e,a,i,s,o)):(t=gd(r.type,null,i,e,e.mode,o),t.ref=e.ref,t.return=e,e.child=t)}return a=t.child,!(s&o)&&(s=a.memoizedProps,r=r.compare,r=r!==null?r:cu,r(s,i)&&t.ref===e.ref)?Yr(t,e,o):(e.flags|=1,t=Ki(a,i),t.ref=e.ref,t.return=e,e.child=t)}function sE(t,e,r,i,s,o){if(t!==null&&cu(t.memoizedProps,i)&&t.ref===e.ref)if(vr=!1,(o&s)!==0)t.flags&16384&&(vr=!0);else return e.lanes=t.lanes,Yr(t,e,o);return lm(t,e,r,i,o)}function Wp(t,e,r){var i=e.pendingProps,s=i.children,o=t!==null?t.memoizedState:null;if(i.mode==="hidden"||i.mode==="unstable-defer-without-hiding")if(!(e.mode&4))e.memoizedState={baseLanes:0},jc(e,r);else if(r&1073741824)e.memoizedState={baseLanes:0},jc(e,o!==null?o.baseLanes:r);else return t=o!==null?o.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t},jc(e,t),null;else o!==null?(i=o.baseLanes|r,e.memoizedState=null):i=r,jc(e,i);return An(t,e,s,r),e.child}function oE(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=128)}function lm(t,e,r,i,s){var o=$n(r)?zs:yn.current;return o=Zo(e,o),Bo(e,s),r=wv(t,e,r,i,o,s),t!==null&&!vr?(e.updateQueue=t.updateQueue,e.flags&=-517,t.lanes&=~s,Yr(t,e,s)):(e.flags|=1,An(t,e,r,s),e.child)}function ow(t,e,r,i,s){if($n(r)){var o=!0;cd(e)}else o=!1;if(Bo(e,s),e.stateNode===null)t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),K_(e,r,i),im(e,r,i,s),i=!0;else if(t===null){var a=e.stateNode,l=e.memoizedProps;a.props=l;var c=a.context,d=r.contextType;typeof d=="object"&&d!==null?d=rr(d):(d=$n(r)?zs:yn.current,d=Zo(e,d));var f=r.getDerivedStateFromProps,g=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function";g||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==i||c!==d)&&Qb(e,a,i,d),wi=!1;var v=e.memoizedState;a.state=v,fu(e,i,a,s),c=e.memoizedState,l!==i||v!==c||Nn.current||wi?(typeof f=="function"&&(zd(e,r,f,i),c=e.memoizedState),(l=wi||Xb(e,r,l,i,v,c,d))?(g||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(e.flags|=4)):(typeof a.componentDidMount=="function"&&(e.flags|=4),e.memoizedProps=i,e.memoizedState=c),a.props=i,a.state=c,a.context=d,i=l):(typeof a.componentDidMount=="function"&&(e.flags|=4),i=!1)}else{a=e.stateNode,H_(t,e),l=e.memoizedProps,d=e.type===e.elementType?l:mr(e.type,l),a.props=d,g=e.pendingProps,v=a.context,c=r.contextType,typeof c=="object"&&c!==null?c=rr(c):(c=$n(r)?zs:yn.current,c=Zo(e,c));var _=r.getDerivedStateFromProps;(f=typeof _=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==g||v!==c)&&Qb(e,a,i,c),wi=!1,v=e.memoizedState,a.state=v,fu(e,i,a,s);var w=e.memoizedState;l!==g||v!==w||Nn.current||wi?(typeof _=="function"&&(zd(e,r,_,i),w=e.memoizedState),(d=wi||Xb(e,r,d,i,v,w,c))?(f||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(i,w,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(i,w,c)),typeof a.componentDidUpdate=="function"&&(e.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(e.flags|=256)):(typeof a.componentDidUpdate!="function"||l===t.memoizedProps&&v===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&v===t.memoizedState||(e.flags|=256),e.memoizedProps=i,e.memoizedState=w),a.props=i,a.state=w,a.context=c,i=d):(typeof a.componentDidUpdate!="function"||l===t.memoizedProps&&v===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&v===t.memoizedState||(e.flags|=256),i=!1)}return um(t,e,r,i,o,s)}function um(t,e,r,i,s,o){oE(t,e);var a=(e.flags&64)!==0;if(!i&&!a)return s&&Gb(e,r,!1),Yr(t,e,o);i=e.stateNode,kA.current=e;var l=a&&typeof r.getDerivedStateFromError!="function"?null:i.render();return e.flags|=1,t!==null&&a?(e.child=Vd(e,t.child,null,o),e.child=Vd(e,null,l,o)):An(t,e,l,o),e.memoizedState=i.state,s&&Gb(e,r,!0),e.child}function aw(t){var e=t.stateNode;e.pendingContext?Wb(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Wb(t,e.context,!1),sm(t,e.containerInfo)}var Bc={dehydrated:null,retryLane:0};function lw(t,e,r){var i=e.pendingProps,s=vt.current,o=!1,a;return(a=(e.flags&64)!==0)||(a=t!==null&&t.memoizedState===null?!1:(s&2)!==0),a?(o=!0,e.flags&=-65):t!==null&&t.memoizedState===null||i.fallback===void 0||i.unstable_avoidThisFallback===!0||(s|=1),bt(vt,s&1),t===null?(i.fallback!==void 0&&om(e),t=i.children,s=i.fallback,o?(t=uw(e,t,s,r),e.child.memoizedState={baseLanes:r},e.memoizedState=Bc,t):typeof i.unstable_expectedLoadTime=="number"?(t=uw(e,t,s,r),e.child.memoizedState={baseLanes:r},e.memoizedState=Bc,e.lanes=33554432,t):(r=Pv({mode:"visible",children:t},e.mode,r,null),r.return=e,e.child=r)):t.memoizedState!==null?o?(i=dw(t,e,i.children,i.fallback,r),o=e.child,s=t.child.memoizedState,o.memoizedState=s===null?{baseLanes:r}:{baseLanes:s.baseLanes|r},o.childLanes=t.childLanes&~r,e.memoizedState=Bc,i):(r=cw(t,e,i.children,r),e.memoizedState=null,r):o?(i=dw(t,e,i.children,i.fallback,r),o=e.child,s=t.child.memoizedState,o.memoizedState=s===null?{baseLanes:r}:{baseLanes:s.baseLanes|r},o.childLanes=t.childLanes&~r,e.memoizedState=Bc,i):(r=cw(t,e,i.children,r),e.memoizedState=null,r)}function uw(t,e,r,i){var s=t.mode,o=t.child;return e={mode:"hidden",children:e},!(s&2)&&o!==null?(o.childLanes=0,o.pendingProps=e):o=Pv(e,s,0,null),r=Wo(r,s,i,null),o.return=t,r.return=t,o.sibling=r,t.child=o,r}function cw(t,e,r,i){var s=t.child;return t=s.sibling,r=Ki(s,{mode:"visible",children:r}),!(e.mode&2)&&(r.lanes=i),r.return=e,r.sibling=null,t!==null&&(t.nextEffect=null,t.flags=8,e.firstEffect=e.lastEffect=t),e.child=r}function dw(t,e,r,i,s){var o=e.mode,a=t.child;t=a.sibling;var l={mode:"hidden",children:r};return!(o&2)&&e.child!==a?(r=e.child,r.childLanes=0,r.pendingProps=l,a=r.lastEffect,a!==null?(e.firstEffect=r.firstEffect,e.lastEffect=a,a.nextEffect=null):e.firstEffect=e.lastEffect=null):r=Ki(a,l),t!==null?i=Ki(t,i):(i=Wo(i,o,s,null),i.flags|=2),i.return=e,r.return=e,r.sibling=i,e.child=r,i}function hw(t,e){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),G_(t.return,e)}function Gp(t,e,r,i,s,o){var a=t.memoizedState;a===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:s,lastEffect:o}:(a.isBackwards=e,a.rendering=null,a.renderingStartTime=0,a.last=i,a.tail=r,a.tailMode=s,a.lastEffect=o)}function fw(t,e,r){var i=e.pendingProps,s=i.revealOrder,o=i.tail;if(An(t,e,i.children,r),i=vt.current,i&2)i=i&1|2,e.flags|=64;else{if(t!==null&&t.flags&64)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&hw(t,r);else if(t.tag===19)hw(t,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}i&=1}if(bt(vt,i),!(e.mode&2))e.memoizedState=null;else switch(s){case"forwards":for(r=e.child,s=null;r!==null;)t=r.alternate,t!==null&&Wd(t)===null&&(s=r),r=r.sibling;r=s,r===null?(s=e.child,e.child=null):(s=r.sibling,r.sibling=null),Gp(e,!1,s,r,o,e.lastEffect);break;case"backwards":for(r=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&Wd(t)===null){e.child=s;break}t=s.sibling,s.sibling=r,r=s,s=t}Gp(e,!0,r,null,o,e.lastEffect);break;case"together":Gp(e,!1,null,null,void 0,e.lastEffect);break;default:e.memoizedState=null}return e.child}function Yr(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),Gu|=e.lanes,r&e.childLanes){if(t!==null&&e.child!==t.child)throw Error(ue(153));if(e.child!==null){for(t=e.child,r=Ki(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=Ki(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}return null}var aE,cm,lE,uE;aE=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};cm=function(){};lE=function(t,e,r,i){var s=t.memoizedProps;if(s!==i){t=e.stateNode,ks(Ar.current);var o=null;switch(r){case"input":s=Lg(t,s),i=Lg(t,i),o=[];break;case"option":s=Bg(t,s),i=Bg(t,i),o=[];break;case"select":s=pt({},s,{value:void 0}),i=pt({},i,{value:void 0}),o=[];break;case"textarea":s=jg(t,s),i=jg(t,i),o=[];break;default:typeof s.onClick!="function"&&typeof i.onClick=="function"&&(t.onclick=$d)}Wg(r,i);var a;r=null;for(d in s)if(!i.hasOwnProperty(d)&&s.hasOwnProperty(d)&&s[d]!=null)if(d==="style"){var l=s[d];for(a in l)l.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(ru.hasOwnProperty(d)?o||(o=[]):(o=o||[]).push(d,null));for(d in i){var c=i[d];if(l=s!=null?s[d]:void 0,i.hasOwnProperty(d)&&c!==l&&(c!=null||l!=null))if(d==="style")if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(r||(r={}),r[a]=c[a])}else r||(o||(o=[]),o.push(d,r)),r=c;else d==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(o=o||[]).push(d,c)):d==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(d,""+c):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(ru.hasOwnProperty(d)?(c!=null&&d==="onScroll"&&ut("scroll",t),o||l===c||(o=[])):typeof c=="object"&&c!==null&&c.$$typeof===Xy?c.toString():(o=o||[]).push(d,c))}r&&(o=o||[]).push("style",r);var d=o;(e.updateQueue=d)&&(e.flags|=4)}};uE=function(t,e,r,i){r!==i&&(e.flags|=4)};function nl(t,e){if(!Or)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:i.sibling=null}}function TA(t,e,r){var i=e.pendingProps;switch(e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return $n(e.type)&&Fd(),null;case 3:return ta(),dt(Nn),dt(yn),vv(),i=e.stateNode,i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(Uc(e)?e.flags|=4:i.hydrate||(e.flags|=256)),cm(e),null;case 5:yv(e);var s=ks(gu.current);if(r=e.type,t!==null&&e.stateNode!=null)lE(t,e,r,i,s),t.ref!==e.ref&&(e.flags|=128);else{if(!i){if(e.stateNode===null)throw Error(ue(166));return null}if(t=ks(Ar.current),Uc(e)){i=e.stateNode,r=e.type;var o=e.memoizedProps;switch(i[Ii]=e,i[Ld]=o,r){case"dialog":ut("cancel",i),ut("close",i);break;case"iframe":case"object":case"embed":ut("load",i);break;case"video":case"audio":for(t=0;t<yl.length;t++)ut(yl[t],i);break;case"source":ut("error",i);break;case"img":case"image":case"link":ut("error",i),ut("load",i);break;case"details":ut("toggle",i);break;case"input":fb(i,o),ut("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!o.multiple},ut("invalid",i);break;case"textarea":gb(i,o),ut("invalid",i)}Wg(r,o),t=null;for(var a in o)o.hasOwnProperty(a)&&(s=o[a],a==="children"?typeof s=="string"?i.textContent!==s&&(t=["children",s]):typeof s=="number"&&i.textContent!==""+s&&(t=["children",""+s]):ru.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&ut("scroll",i));switch(r){case"input":Dc(i),pb(i,o,!0);break;case"textarea":Dc(i),mb(i);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(i.onclick=$d)}i=t,e.updateQueue=i,i!==null&&(e.flags|=4)}else{switch(a=s.nodeType===9?s:s.ownerDocument,t===zg.html&&(t=n_(r)),t===zg.html?r==="script"?(t=a.createElement("div"),t.innerHTML="<script><\/script>
37",t=t.removeChild(t.firstChild)):typeof i.is=="string"?t=a.createElement(r,{is:i.is}):(t=a.createElement(r),r==="select"&&(a=t,i.multiple?a.multiple=!0:i.size&&(a.size=i.size))):t=a.createElementNS(t,r),t[Ii]=e,t[Ld]=i,aE(t,e,!1,!1),e.stateNode=t,a=Gg(r,i),r){case"dialog":ut("cancel",t),ut("close",t),s=i;break;case"iframe":case"object":case"embed":ut("load",t),s=i;break;case"video":case"audio":for(s=0;s<yl.length;s++)ut(yl[s],t);s=i;break;case"source":ut("error",t),s=i;break;case"img":case"image":case"link":ut("error",t),ut("load",t),s=i;break;case"details":ut("toggle",t),s=i;break;case"input":fb(t,i),s=Lg(t,i),ut("invalid",t);break;case"option":s=Bg(t,i);break;case"select":t._wrapperState={wasMultiple:!!i.multiple},s=pt({},i,{value:void 0}),ut("invalid",t);break;case"textarea":gb(t,i),s=jg(t,i),ut("invalid",t);break;default:s=i}Wg(r,s);var l=s;for(o in l)if(l.hasOwnProperty(o)){var c=l[o];o==="style"?s_(t,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&r_(t,c)):o==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&iu(t,c):typeof c=="number"&&iu(t,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(ru.hasOwnProperty(o)?c!=null&&o==="onScroll"&&ut("scroll",t):c!=null&&Wy(t,o,c,a))}switch(r){case"input":Dc(t),pb(t,i,!1);break;case"textarea":Dc(t),mb(t);break;case"option":i.value!=null&&t.setAttribute("value",""+Wi(i.value));break;case"select":t.multiple=!!i.multiple,o=i.value,o!=null?$o(t,!!i.multiple,o,!1):i.defaultValue!=null&&$o(t,!!i.multiple,i.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=$d)}$_(r,i)&&(e.flags|=4)}e.ref!==null&&(e.flags|=128)}return null;case 6:if(t&&e.stateNode!=null)uE(t,e,t.memoizedProps,i);else{if(typeof i!="string"&&e.stateNode===null)throw Error(ue(166));r=ks(gu.current),ks(Ar.current),Uc(e)?(i=e.stateNode,r=e.memoizedProps,i[Ii]=e,i.nodeValue!==r&&(e.flags|=4)):(i=(r.nodeType===9?r:r.ownerDocument).createTextNode(i),i[Ii]=e,e.stateNode=i)}return null;case 13:return dt(vt),i=e.memoizedState,e.flags&64?(e.lanes=r,e):(i=i!==null,r=!1,t===null?e.memoizedProps.fallback!==void 0&&Uc(e):r=t.memoizedState!==null,i&&!r&&e.mode&2&&(t===null&&e.memoizedProps.unstable_avoidThisFallback!==!0||vt.current&1?Xt===0&&(Xt=3):((Xt===0||Xt===3)&&(Xt=4),_n===null||!(Gu&134217727)&&!(ba&134217727)||zo(_n,pn))),(i||r)&&(e.flags|=4),null);case 4:return ta(),cm(e),t===null&&D_(e.stateNode.containerInfo),null;case 10:return gv(e),null;case 17:return $n(e.type)&&Fd(),null;case 19:if(dt(vt),i=e.memoizedState,i===null)return null;if(o=(e.flags&64)!==0,a=i.rendering,a===null)if(o)nl(i,!1);else{if(Xt!==0||t!==null&&t.flags&64)for(t=e.child;t!==null;){if(a=Wd(t),a!==null){for(e.flags|=64,nl(i,!1),o=a.updateQueue,o!==null&&(e.updateQueue=o,e.flags|=4),i.lastEffect===null&&(e.firstEffect=null),e.lastEffect=i.lastEffect,i=r,r=e.child;r!==null;)o=r,t=i,o.flags&=2,o.nextEffect=null,o.firstEffect=null,o.lastEffect=null,a=o.alternate,a===null?(o.childLanes=0,o.lanes=t,o.child=null,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,t=a.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return bt(vt,vt.current&1|2),e.child}t=t.sibling}i.tail!==null&&hn()>mm&&(e.flags|=64,o=!0,nl(i,!1),e.lanes=33554432)}else{if(!o)if(t=Wd(a),t!==null){if(e.flags|=64,o=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),nl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Or)return e=e.lastEffect=i.lastEffect,e!==null&&(e.nextEffect=null),null}else 2*hn()-i.renderingStartTime>mm&&r!==1073741824&&(e.flags|=64,o=!0,nl(i,!1),e.lanes=33554432);i.isBackwards?(a.sibling=e.child,e.child=a):(r=i.last,r!==null?r.sibling=a:e.child=a,i.last=a)}return i.tail!==null?(r=i.tail,i.rendering=r,i.tail=r.sibling,i.lastEffect=e.lastEffect,i.renderingStartTime=hn(),r.sibling=null,e=vt.current,bt(vt,o?e&1|2:e&1),r):null;case 23:case 24:return Iv(),t!==null&&t.memoizedState!==null!=(e.memoizedState!==null)&&i.mode!=="unstable-defer-without-hiding"&&(e.flags|=4),null}throw Error(ue(156,e.tag))}function IA(t){switch(t.tag){case 1:$n(t.type)&&Fd();var e=t.flags;return e&4096?(t.flags=e&-4097|64,t):null;case 3:if(ta(),dt(Nn),dt(yn),vv(),e=t.flags,e&64)throw Error(ue(285));return t.flags=e&-4097|64,t;case 5:return yv(t),null;case 13:return dt(vt),e=t.flags,e&4096?(t.flags=e&-4097|64,t):null;case 19:return dt(vt),null;case 4:return ta(),null;case 10:return gv(t),null;case 23:case 24:return Iv(),null;default:return null}}function _v(t,e){try{var r="",i=e;do r+=l2(i),i=i.return;while(i);var s=r}catch(o){s=` 38Error generating stack: `+o.message+` 39`+o.stack}return{value:t,source:e,stack:s}}function dm(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}
vendor: 10,808 bytes, line 39
39var RA=typeof WeakMap=="function"?WeakMap:Map;function cE(t,e,r){r=Ni(-1,r),r.tag=3,r.payload={element:null};var i=e.value;return r.callback=function(){Qd||(Qd=!0,ym=i),dm(t,e)},r}function dE(t,e,r){r=Ni(-1,r),r.tag=3;var i=t.type.getDerivedStateFromError;if(typeof i=="function"){var s=e.value;r.payload=function(){return dm(t,e),i(s)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){typeof i!="function"&&(Ir===null?Ir=new Set([this]):Ir.add(this),dm(t,e));var a=e.stack;this.componentDidCatch(e.value,{componentStack:a!==null?a:""})}),r}var PA=typeof WeakSet=="function"?WeakSet:Set;function pw(t){var e=t.ref;if(e!==null)if(typeof e=="function")try{e(null)}catch(r){Ui(t,r)}else e.current=null}function AA(t,e){switch(e.tag){case 0:case 11:case 15:case 22:return;case 1:if(e.flags&256&&t!==null){var r=t.memoizedProps,i=t.memoizedState;t=e.stateNode,e=t.getSnapshotBeforeUpdate(e.elementType===e.type?r:mr(e.type,r),i),t.__reactInternalSnapshotBeforeUpdate=e}return;case 3:e.flags&256&&dv(e.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(ue(163))}function OA(t,e,r){switch(r.tag){case 0:case 11:case 15:case 22:if(e=r.updateQueue,e=e!==null?e.lastEffect:null,e!==null){t=e=e.next;do{if((t.tag&3)===3){var i=t.create;t.destroy=i()}t=t.next}while(t!==e)}if(e=r.updateQueue,e=e!==null?e.lastEffect:null,e!==null){t=e=e.next;do{var s=t;i=s.next,s=s.tag,s&4&&s&1&&(wE(r,t),BA(r,t)),t=i}while(t!==e)}return;case 1:t=r.stateNode,r.flags&4&&(e===null?t.componentDidMount():(i=r.elementType===r.type?e.memoizedProps:mr(r.type,e.memoizedProps),t.componentDidUpdate(i,e.memoizedState,t.__reactInternalSnapshotBeforeUpdate))),e=r.updateQueue,e!==null&&Yb(r,e,t);return;case 3:if(e=r.updateQueue,e!==null){if(t=null,r.child!==null)switch(r.child.tag){case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}Yb(r,e,t)}return;case 5:t=r.stateNode,e===null&&r.flags&4&&$_(r.type,r.memoizedProps)&&t.focus();return;case 6:return;case 4:return;case 12:return;case 13:r.memoizedState===null&&(r=r.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&g_(r))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(ue(163))}function gw(t,e){for(var r=t;;){if(r.tag===5){var i=r.stateNode;if(e)i=i.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none";else{i=r.stateNode;var s=r.memoizedProps.style;s=s!=null&&s.hasOwnProperty("display")?s.display:null,i.style.display=i_("display",s)}}else if(r.tag===6)r.stateNode.nodeValue=e?"":r.memoizedProps;else if((r.tag!==23&&r.tag!==24||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}}function mw(t,e){if(Ds&&typeof Ds.onCommitFiberUnmount=="function")try{Ds.onCommitFiberUnmount(hv,e)}catch{}switch(e.tag){case 0:case 11:case 14:case 15:case 22:if(t=e.updateQueue,t!==null&&(t=t.lastEffect,t!==null)){var r=t=t.next;do{var i=r,s=i.destroy;if(i=i.tag,s!==void 0)if(i&4)wE(e,r);else{i=e;try{s()}catch(o){Ui(i,o)}}r=r.next}while(r!==t)}break;case 1:if(pw(e),t=e.stateNode,typeof t.componentWillUnmount=="function")try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(o){Ui(e,o)}break;case 5:pw(e);break;case 4:hE(t,e)}}function yw(t){t.alternate=null,t.child=null,t.dependencies=null,t.firstEffect=null,t.lastEffect=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.return=null,t.updateQueue=null}function vw(t){return t.tag===5||t.tag===3||t.tag===4}function bw(t){e:{for(var e=t.return;e!==null;){if(vw(e))break e;e=e.return}throw Error(ue(160))}var r=e;switch(e=r.stateNode,r.tag){case 5:var i=!1;break;case 3:e=e.containerInfo,i=!0;break;case 4:e=e.containerInfo,i=!0;break;default:throw Error(ue(161))}r.flags&16&&(iu(e,""),r.flags&=-17);e:t:for(r=t;;){for(;r.sibling===null;){if(r.return===null||vw(r.return)){r=null;break e}r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue t;r.child.return=r,r=r.child}if(!(r.flags&2)){r=r.stateNode;break e}}i?hm(t,r,e):fm(t,r,e)}function hm(t,e,r){var i=t.tag,s=i===5||i===6;if(s)t=s?t.stateNode:t.stateNode.instance,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=$d));else if(i!==4&&(t=t.child,t!==null))for(hm(t,e,r),t=t.sibling;t!==null;)hm(t,e,r),t=t.sibling}function fm(t,e,r){var i=t.tag,s=i===5||i===6;if(s)t=s?t.stateNode:t.stateNode.instance,e?r.insertBefore(t,e):r.appendChild(t);else if(i!==4&&(t=t.child,t!==null))for(fm(t,e,r),t=t.sibling;t!==null;)fm(t,e,r),t=t.sibling}function hE(t,e){for(var r=e,i=!1,s,o;;){if(!i){i=r.return;e:for(;;){if(i===null)throw Error(ue(160));switch(s=i.stateNode,i.tag){case 5:o=!1;break e;case 3:s=s.containerInfo,o=!0;break e;case 4:s=s.containerInfo,o=!0;break e}i=i.return}i=!0}if(r.tag===5||r.tag===6){e:for(var a=t,l=r,c=l;;)if(mw(a,c),c.child!==null&&c.tag!==4)c.child.return=c,c=c.child;else{if(c===l)break e;for(;c.sibling===null;){if(c.return===null||c.return===l)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}o?(a=s,l=r.stateNode,a.nodeType===8?a.parentNode.removeChild(l):a.removeChild(l)):s.removeChild(r.stateNode)}else if(r.tag===4){if(r.child!==null){s=r.stateNode.containerInfo,o=!0,r.child.return=r,r=r.child;continue}}else if(mw(t,r),r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return,r.tag===4&&(i=!1)}r.sibling.return=r.return,r=r.sibling}}function Hp(t,e){switch(e.tag){case 0:case 11:case 14:case 15:case 22:var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do(i.tag&3)===3&&(t=i.destroy,i.destroy=void 0,t!==void 0&&t()),i=i.next;while(i!==r)}return;case 1:return;case 5:if(r=e.stateNode,r!=null){i=e.memoizedProps;var s=t!==null?t.memoizedProps:i;t=e.type;var o=e.updateQueue;if(e.updateQueue=null,o!==null){for(r[Ld]=i,t==="input"&&i.type==="radio"&&i.name!=null&&e_(r,i),Gg(t,s),e=Gg(t,i),s=0;s<o.length;s+=2){var a=o[s],l=o[s+1];a==="style"?s_(r,l):a==="dangerouslySetInnerHTML"?r_(r,l):a==="children"?iu(r,l):Wy(r,a,l,e)}switch(t){case"input":Fg(r,i);break;case"textarea":t_(r,i);break;case"select":t=r._wrapperState.wasMultiple,r._wrapperState.wasMultiple=!!i.multiple,o=i.value,o!=null?$o(r,!!i.multiple,o,!1):t!==!!i.multiple&&(i.defaultValue!=null?$o(r,!!i.multiple,i.defaultValue,!0):$o(r,!!i.multiple,i.multiple?[]:"",!1))}}}return;case 6:if(e.stateNode===null)throw Error(ue(162));e.stateNode.nodeValue=e.memoizedProps;return;case 3:r=e.stateNode,r.hydrate&&(r.hydrate=!1,g_(r.containerInfo));return;case 12:return;case 13:e.memoizedState!==null&&(Tv=hn(),gw(e.child,!0)),ww(e);return;case 19:ww(e);return;case 17:return;case 23:case 24:gw(e,e.memoizedState!==null);return}throw Error(ue(163))}function ww(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new PA),e.forEach(function(i){var s=VA.bind(null,t,i);r.has(i)||(r.add(i),i.then(s,s))})}}function DA(t,e){return t!==null&&(t=t.memoizedState,t===null||t.dehydrated!==null)?(e=e.memoizedState,e!==null&&e.dehydrated===null):!1}var MA=Math.ceil,Xd=ro.ReactCurrentDispatcher,Ev=ro.ReactCurrentOwner,Pe=0,_n=null,Nt=null,pn=0,Ws=0,pm=is(0),Xt=0,Uh=null,va=0,Gu=0,ba=0,kv=0,gm=null,Tv=0,mm=1/0;function wa(){mm=hn()+500}var ve=null,Qd=!1,ym=null,Ir=null,qi=!1,Ul=null,vl=90,vm=[],bm=[],ei=null,Bl=0,wm=null,hd=-1,qr=0,fd=0,jl=null,pd=!1;function Hn(){return Pe&48?hn():hd!==-1?hd:hd=hn()}function Li(t){if(t=t.mode,!(t&2))return 1;if(!(t&4))return ea()===99?1:2;if(qr===0&&(qr=va),SA.transition!==0){fd!==0&&(fd=gm!==null?gm.pendingLanes:0),t=qr;var e=4186112&~fd;return e&=-e,e===0&&(t=4186112&~t,e=t&-t,e===0&&(e=8192)),e}return t=ea(),Pe&4&&t===98?t=Md(12,qr):(t=_2(t),t=Md(t,qr)),t}function Fi(t,e,r){if(50<Bl)throw Bl=0,wm=null,Error(ue(185));if(t=Bh(t,e),t===null)return null;Oh(t,e,r),t===_n&&(ba|=e,Xt===4&&zo(t,pn));var i=ea();e===1?Pe&8&&!(Pe&48)?Sm(t):(ir(t,r),Pe===0&&(wa(),Ur())):(!(Pe&4)||i!==98&&i!==99||(ei===null?ei=new Set([t]):ei.add(t)),ir(t,r)),gm=t}function Bh(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}function ir(t,e){for(var r=t.callbackNode,i=t.suspendedLanes,s=t.pingedLanes,o=t.expirationTimes,a=t.pendingLanes;0<a;){var l=31-Gi(a),c=1<<l,d=o[l];if(d===-1){if(!(c&i)||c&s){d=e,Co(c);var f=at;o[l]=10<=f?d+250:6<=f?d+5e3:-1}}else d<=e&&(t.expiredLanes|=c);a&=~c}if(i=lu(t,t===_n?pn:0),e=at,i===0)r!==null&&(r!==jp&&nm(r),t.callbackNode=null,t.callbackPriority=0);else{if(r!==null){if(t.callbackPriority===e)return;r!==jp&&nm(r)}e===15?(r=Sm.bind(null,t),Hr===null?(Hr=[r],dd=fv(Lh,W_)):Hr.push(r),r=jp):e===14?r=hu(99,Sm.bind(null,t)):(r=E2(e),r=hu(r,fE.bind(null,t))),t.callbackPriority=e,t.callbackNode=r}}function fE(t){if(hd=-1,fd=qr=0,Pe&48)throw Error(ue(327));var e=t.callbackNode;if(ss()&&t.callbackNode!==e)return null;var r=lu(t,t===_n?pn:0);if(r===0)return null;var i=r,s=Pe;Pe|=16;var o=yE();(_n!==t||pn!==i)&&(wa(),Vo(t,i));do try{LA();break}catch(l){mE(t,l)}while(1);if(pv(),Xd.current=o,Pe=s,Nt!==null?i=0:(_n=null,pn=0,i=Xt),va&ba)Vo(t,0);else if(i!==0){if(i===2&&(Pe|=64,t.hydrate&&(t.hydrate=!1,dv(t.containerInfo)),r=C_(t),r!==0&&(i=bl(t,r))),i===1)throw e=Uh,Vo(t,0),zo(t,r),ir(t,hn()),e;switch(t.finishedWork=t.current.alternate,t.finishedLanes=r,i){case 0:case 1:throw Error(ue(345));case 2:ys(t);break;case 3:if(zo(t,r),(r&62914560)===r&&(i=Tv+500-hn(),10<i)){if(lu(t,0)!==0)break;if(s=t.suspendedLanes,(s&r)!==r){Hn(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=jb(ys.bind(null,t),i);break}ys(t);break;case 4:if(zo(t,r),(r&4186112)===r)break;for(i=t.eventTimes,s=-1;0<r;){var a=31-Gi(r);o=1<<a,a=i[a],a>s&&(s=a),r&=~o}if(r=s,r=hn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*MA(r/1960))-r,10<r){t.timeoutHandle=jb(ys.bind(null,t),r);break}ys(t);break;case 5:ys(t);break;default:throw Error(ue(329))}}return ir(t,hn()),t.callbackNode===e?fE.bind(null,t):null}function zo(t,e){for(e&=~kv,e&=~ba,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-Gi(e),i=1<<r;t[r]=-1,e&=~i}}function Sm(t){if(Pe&48)throw Error(ue(327));if(ss(),t===_n&&t.expiredLanes&pn){var e=pn,r=bl(t,e);va&ba&&(e=lu(t,e),r=bl(t,e))}else e=lu(t,0),r=bl(t,e);if(t.tag!==0&&r===2&&(Pe|=64,t.hydrate&&(t.hydrate=!1,dv(t.containerInfo)),e=C_(t),e!==0&&(r=bl(t,e))),r
vendor: 10,404 bytes, lines 39-41
39===1)throw r=Uh,Vo(t,0),zo(t,e),ir(t,hn()),r;return t.finishedWork=t.current.alternate,t.finishedLanes=e,ys(t),ir(t,hn()),null}function NA(){if(ei!==null){var t=ei;ei=null,t.forEach(function(e){e.expiredLanes|=24&e.pendingLanes,ir(e,hn())})}Ur()}function pE(t,e){var r=Pe;Pe|=1;try{return t(e)}finally{Pe=r,Pe===0&&(wa(),Ur())}}function gE(t,e){var r=Pe;Pe&=-2,Pe|=8;try{return t(e)}finally{Pe=r,Pe===0&&(wa(),Ur())}}function jc(t,e){bt(pm,Ws),Ws|=e,va|=e}function Iv(){Ws=pm.current,dt(pm)}function Vo(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,gA(r)),Nt!==null)for(r=Nt.return;r!==null;){var i=r;switch(i.tag){case 1:i=i.type.childContextTypes,i!=null&&Fd();break;case 3:ta(),dt(Nn),dt(yn),vv();break;case 5:yv(i);break;case 4:ta();break;case 13:dt(vt);break;case 19:dt(vt);break;case 10:gv(i);break;case 23:case 24:Iv()}r=r.return}_n=t,Nt=Ki(t.current,null),pn=Ws=va=e,Xt=0,Uh=null,kv=ba=Gu=0}function mE(t,e){do{var r=Nt;try{if(pv(),Ll.current=Yd,Gd){for(var i=Et.memoizedState;i!==null;){var s=i.queue;s!==null&&(s.pending=null),i=i.next}Gd=!1}if(mu=0,Ht=un=Et=null,Fl=!1,Ev.current=null,r===null||r.return===null){Xt=1,Uh=e,Nt=null;break}e:{var o=t,a=r.return,l=r,c=e;if(e=pn,l.flags|=2048,l.firstEffect=l.lastEffect=null,c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=c;if(!(l.mode&2)){var f=l.alternate;f?(l.updateQueue=f.updateQueue,l.memoizedState=f.memoizedState,l.lanes=f.lanes):(l.updateQueue=null,l.memoizedState=null)}var g=(vt.current&1)!==0,v=a;do{var _;if(_=v.tag===13){var w=v.memoizedState;if(w!==null)_=w.dehydrated!==null;else{var k=v.memoizedProps;_=k.fallback===void 0?!1:k.unstable_avoidThisFallback!==!0?!0:!g}}if(_){var y=v.updateQueue;if(y===null){var b=new Set;b.add(d),v.updateQueue=b}else y.add(d);if(!(v.mode&2)){if(v.flags|=64,l.flags|=16384,l.flags&=-2981,l.tag===1)if(l.alternate===null)l.tag=17;else{var x=Ni(-1,1);x.tag=2,$i(l,x)}l.lanes|=1;break e}c=void 0,l=e;var R=o.pingCache;if(R===null?(R=o.pingCache=new RA,c=new Set,R.set(d,c)):(c=R.get(d),c===void 0&&(c=new Set,R.set(d,c))),!c.has(l)){c.add(l);var E=zA.bind(null,o,d,l);d.then(E,E)}v.flags|=4096,v.lanes=e;break e}v=v.return}while(v!==null);c=Error((No(l.type)||"A React component")+` suspended while rendering, but no fallback UI was specified. 40 41Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}Xt!==5&&(Xt=2),c=_v(c,l),v=a;do{switch(v.tag){case 3:o=c,v.flags|=4096,e&=-e,v.lanes|=e;var C=cE(v,o,e);Kb(v,C);break e;case 1:o=c;var D=v.type,A=v.stateNode;if(!(v.flags&64)&&(typeof D.getDerivedStateFromError=="function"||A!==null&&typeof A.componentDidCatch=="function"&&(Ir===null||!Ir.has(A)))){v.flags|=4096,e&=-e,v.lanes|=e;var U=dE(v,o,e);Kb(v,U);break e}}v=v.return}while(v!==null)}bE(r)}catch(B){e=B,Nt===r&&r!==null&&(Nt=r=r.return);continue}break}while(1)}function yE(){var t=Xd.current;return Xd.current=Yd,t===null?Yd:t}function bl(t,e){var r=Pe;Pe|=16;var i=yE();_n===t&&pn===e||Vo(t,e);do try{$A();break}catch(s){mE(t,s)}while(1);if(pv(),Pe=r,Xd.current=i,Nt!==null)throw Error(ue(261));return _n=null,pn=0,Xt}function $A(){for(;Nt!==null;)vE(Nt)}function LA(){for(;Nt!==null&&!vA();)vE(Nt)}function vE(t){var e=SE(t.alternate,t,Ws);t.memoizedProps=t.pendingProps,e===null?bE(t):Nt=e,Ev.current=null}function bE(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&2048){if(r=IA(e),r!==null){r.flags&=2047,Nt=r;return}t!==null&&(t.firstEffect=t.lastEffect=null,t.flags|=2048)}else{if(r=TA(r,e,Ws),r!==null){Nt=r;return}if(r=e,r.tag!==24&&r.tag!==23||r.memoizedState===null||Ws&1073741824||!(r.mode&4)){for(var i=0,s=r.child;s!==null;)i|=s.lanes|s.childLanes,s=s.sibling;r.childLanes=i}t!==null&&!(t.flags&2048)&&(t.firstEffect===null&&(t.firstEffect=e.firstEffect),e.lastEffect!==null&&(t.lastEffect!==null&&(t.lastEffect.nextEffect=e.firstEffect),t.lastEffect=e.lastEffect),1<e.flags&&(t.lastEffect!==null?t.lastEffect.nextEffect=e:t.firstEffect=e,t.lastEffect=e))}if(e=e.sibling,e!==null){Nt=e;return}Nt=e=t}while(e!==null);Xt===0&&(Xt=5)}function ys(t){var e=ea();return Vs(99,FA.bind(null,t,e)),null}function FA(t,e){do ss();while(Ul!==null);if(Pe&48)throw Error(ue(327));var r=t.finishedWork;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(ue(177));t.callbackNode=null;var i=r.lanes|r.childLanes,s=i,o=t.pendingLanes&~s;t.pendingLanes=s,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=s,t.mutableReadLanes&=s,t.entangledLanes&=s,s=t.entanglements;for(var a=t.eventTimes,l=t.expirationTimes;0<o;){var c=31-Gi(o),d=1<<c;s[c]=0,a[c]=-1,l[c]=-1,o&=~d}if(ei!==null&&!(i&24)&&ei.has(t)&&ei.delete(t),t===_n&&(Nt=_n=null,pn=0),1<r.flags?r.lastEffect!==null?(r.lastEffect.nextEffect=r,i=r.firstEffect):i=r:i=r.firstEffect,i!==null){if(s=Pe,Pe|=32,Ev.current=null,Fp=ad,a=Mb(),Qg(a)){if("selectionStart"in a)l={start:a.selectionStart,end:a.selectionEnd};else e:if(l=(l=a.ownerDocument)&&l.defaultView||window,(d=l.getSelection&&l.getSelection())&&d.rangeCount!==0){l=d.anchorNode,o=d.anchorOffset,c=d.focusNode,d=d.focusOffset;try{l.nodeType,c.nodeType}catch{l=null;break e}var f=0,g=-1,v=-1,_=0,w=0,k=a,y=null;t:for(;;){for(var b;k!==l||o!==0&&k.nodeType!==3||(g=f+o),k!==c||d!==0&&k.nodeType!==3||(v=f+d),k.nodeType===3&&(f+=k.nodeValue.length),(b=k.firstChild)!==null;)y=k,k=b;for(;;){if(k===a)break t;if(y===l&&++_===o&&(g=f),y===c&&++w===d&&(v=f),(b=k.nextSibling)!==null)break;k=y,y=k.parentNode}k=b}l=g===-1||v===-1?null:{start:g,end:v}}else l=null;l=l||{start:0,end:0}}else l=null;Up={focusedElem:a,selectionRange:l},ad=!1,jl=null,pd=!1,ve=i;do try{UA()}catch(B){if(ve===null)throw Error(ue(330));Ui(ve,B),ve=ve.nextEffect}while(ve!==null);jl=null,ve=i;do try{for(a=t;ve!==null;){var x=ve.flags;if(x&16&&iu(ve.stateNode,""),x&128){var R=ve.alternate;if(R!==null){var E=R.ref;E!==null&&(typeof E=="function"?E(null):E.current=null)}}switch(x&1038){case 2:bw(ve),ve.flags&=-3;break;case 6:bw(ve),ve.flags&=-3,Hp(ve.alternate,ve);break;case 1024:ve.flags&=-1025;break;case 1028:ve.flags&=-1025,Hp(ve.alternate,ve);break;case 4:Hp(ve.alternate,ve);break;case 8:l=ve,hE(a,l);var C=l.alternate;yw(l),C!==null&&yw(C)}ve=ve.nextEffect}}catch(B){if(ve===null)throw Error(ue(330));Ui(ve,B),ve=ve.nextEffect}while(ve!==null);if(E=Up,R=Mb(),x=E.focusedElem,a=E.selectionRange,R!==x&&x&&x.ownerDocument&&P_(x.ownerDocument.documentElement,x)){for(a!==null&&Qg(x)&&(R=a.start,E=a.end,E===void 0&&(E=R),"selectionStart"in x?(x.selectionStart=R,x.selectionEnd=Math.min(E,x.value.length)):(E=(R=x.ownerDocument||document)&&R.defaultView||window,E.getSelection&&(E=E.getSelection(),l=x.textContent.length,C=Math.min(a.start,l),a=a.end===void 0?C:Math.min(a.end,l),!E.extend&&C>a&&(l=a,a=C,C=l),l=Db(x,C),o=Db(x,a),l&&o&&(E.rangeCount!==1||E.anchorNode!==l.node||E.anchorOffset!==l.offset||E.focusNode!==o.node||E.focusOffset!==o.offset)&&(R=R.createRange(),R.setStart(l.node,l.offset),E.removeAllRanges(),C>a?(E.addRange(R),E.extend(o.node,o.offset)):(R.setEnd(o.node,o.offset),E.addRange(R)))))),R=[],E=x;E=E.parentNode;)E.nodeType===1&&R.push({element:E,left:E.scrollLeft,top:E.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<R.length;x++)E=R[x],E.element.scrollLeft=E.left,E.element.scrollTop=E.top}ad=!!Fp,Up=Fp=null,t.current=r,ve=i;do try{for(x=t;ve!==null;){var D=ve.flags;if(D&36&&OA(x,ve.alternate,ve),D&128){R=void 0;var A=ve.ref;if(A!==null){var U=ve.stateNode;switch(ve.tag){case 5:R=U;break;default:R=U}typeof A=="function"?A(R):A.current=R}}ve=ve.nextEffect}}catch(B){if(ve===null)throw Error(ue(330));Ui(ve,B),ve=ve.nextEffect}while(ve!==null);ve=null,wA(),Pe=s}else t.current=r;if(qi)qi=!1,Ul=t,vl=e;else for(ve=i;ve!==null;)e=ve.nextEffect,ve.nextEffect=null,ve.flags&8&&(D=ve,D.sibling=null,D.stateNode=null),ve=e;if(i=t.pendingLanes,i===0&&(Ir=null),i===1?t===wm?Bl++:(Bl=0,wm=t):Bl=0,r=r.stateNode,Ds&&typeof Ds.onCommitFiberRoot=="function")try{Ds.onCommitFiberRoot(hv,r,void 0,(r.current.flags&64)===64)}catch{}if(ir(t,hn()),Qd)throw Qd=!1,t=ym,ym=null,t;return Pe&8||Ur(),null}function UA(){for(;ve!==null;){var t=ve.alternate;pd||jl===null||(ve.flags&8?bb(ve,jl)&&(pd=!0):ve.tag===13&&DA(t,ve)&&bb(ve,jl)&&(pd=!0));var e=ve.flags;e&256&&AA(t,ve),!(e&512)||qi||(qi=!0,hu(97,function(){return ss(),null})),ve=ve.nextEffect}}function ss(){if(vl!==90){var t=97<vl?97:vl;return vl=90,Vs(t,jA)}return!1}function BA(t,e){vm.push(e,t),qi||(qi=!0,hu(97,function(){return ss(),null}))}function wE(t,e){bm.push(e,t),qi||(qi=!0,hu(97,function(){return ss(),null}))}function jA(){if(Ul===null)return!1;var t=Ul;if(Ul=null,Pe&48)throw Error(ue(331));var e=Pe;Pe|=32;var r=bm;bm=[];for(var i=0;i<r.length;i+=2){var s=r[i],o=r[i+1],a=s.destroy;if(s.destroy=void 0,typeof a=="function")try{a()}catch(c){if(o===null)throw Error(ue(330));Ui(o,c)}}for(r=vm,vm=[],i=0;i<r.length;i+=2){s=r[i],o=r[i+1];try{var l=s.create;s.destroy=l()}catch(c){if(o===null)throw Error(ue(330));Ui(o,c)}}for(l=t.current.firstEffect;l!==null;)t=l.nextEffect,l.nextEffect=null,l.flags&8&&(l.sibling=null,l.stateNode=null),l=t;return Pe=e,Ur(),!0}function Sw(t,e,r){e=_v(r,e),e=cE(t,e,1),$i(t,e),e=Hn(),t=Bh(t,1),t!==null&&(Oh(t,1,e),ir(t,e))}function Ui(t,e){if(t.tag===3)Sw(t,t,e);else for(var r=t.return;r!==null;){if(r.tag===3){Sw(r,t,e);break}else if(r.tag===1){var i=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Ir===null||!Ir.has(i))){t=_v(e,t);var s=dE(r,t,1);if($i(r,s),s=Hn(),r=Bh(r,1),r!==null)Oh(r,1,s),ir(r,s);else if(typeof i.componentDidCatch=="function"&&(Ir===null||!Ir.has(i)))try{i.componentDidCatch(e,t)}catch{}break}}r=r.return}}function zA(t,e,r){var i=t.pingCache;i!==null&&i.delete(e),e=Hn(),t.pingedLanes|=t.suspendedLanes&r,_n===t&&(pn&r)===r&&(Xt===4||Xt===3&&(pn&62914560)===pn&&500>hn()-Tv?Vo(t,0):kv|=r),ir(t,e)}function VA(t,e){var r=t.stateNode;r!==null&&r.delete(e),e=0,e===0&&(e=t.mode,e&2?e&4?(qr===0&&(qr=va),e=xo(62914560&~qr),e===0&&(e=4194304)):e=ea()===99?1:2:e=1),r=Hn(),t=Bh(t,e),t!==null&&(Oh(t,e,r),ir(t,r))}var SE;SE=function(t,e,r){var i=e.lanes;if(t!==null)if(t.memoizedProps!==e.pendingProps||Nn.current)vr=!0;else if(r&i)vr=!!(t.flags&16384);else{switch(vr=!1,e.tag){case 3:aw(e),Vp();break;case 5:Jb(e);break;case 1:$n(e.type)&&cd(e);break;case 4:sm(e,e.stateNode.containerInfo);break;case 10:i=e.memoizedProps.value;
vendor: 11,204 bytes, line 41
41var s=e.type._context;bt(Ud,s._currentValue),s._currentValue=i;break;case 13:if(e.memoizedState!==null)return r&e.child.childLanes?lw(t,e,r):(bt(vt,vt.current&1),e=Yr(t,e,r),e!==null?e.sibling:null);bt(vt,vt.current&1);break;case 19:if(i=(r&e.childLanes)!==0,t.flags&64){if(i)return fw(t,e,r);e.flags|=64}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),bt(vt,vt.current),i)break;return null;case 23:case 24:return e.lanes=0,Wp(t,e,r)}return Yr(t,e,r)}else vr=!1;switch(e.lanes=0,e.tag){case 2:if(i=e.type,t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,s=Zo(e,yn.current),Bo(e,r),s=wv(null,e,i,t,s,r),e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0){if(e.tag=1,e.memoizedState=null,e.updateQueue=null,$n(i)){var o=!0;cd(e)}else o=!1;e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,mv(e);var a=i.getDerivedStateFromProps;typeof a=="function"&&zd(e,i,a,t),s.updater=Fh,e.stateNode=s,s._reactInternals=e,im(e,i,t,r),e=um(null,e,i,!0,o,r)}else e.tag=0,An(null,e,s,r),e=e.child;return e;case 16:s=e.elementType;e:{switch(t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,o=s._init,s=o(s._payload),e.type=s,o=e.tag=GA(s),t=mr(s,t),o){case 0:e=lm(null,e,s,t,r);break e;case 1:e=ow(null,e,s,t,r);break e;case 11:e=iw(null,e,s,t,r);break e;case 14:e=sw(null,e,s,mr(s.type,t),i,r);break e}throw Error(ue(306,s,""))}return e;case 0:return i=e.type,s=e.pendingProps,s=e.elementType===i?s:mr(i,s),lm(t,e,i,s,r);case 1:return i=e.type,s=e.pendingProps,s=e.elementType===i?s:mr(i,s),ow(t,e,i,s,r);case 3:if(aw(e),i=e.updateQueue,t===null||i===null)throw Error(ue(282));if(i=e.pendingProps,s=e.memoizedState,s=s!==null?s.element:null,H_(t,e),fu(e,i,null,r),i=e.memoizedState.element,i===s)Vp(),e=Yr(t,e,r);else{if(s=e.stateNode,(o=s.hydrate)&&(Ri=Uo(e.stateNode.containerInfo.firstChild),Kr=e,o=Or=!0),o){if(t=s.mutableSourceEagerHydrationData,t!=null)for(s=0;s<t.length;s+=2)o=t[s],o._workInProgressVersionPrimary=t[s+1],jo.push(o);for(r=X_(e,null,i,r),e.child=r;r;)r.flags=r.flags&-3|1024,r=r.sibling}else An(t,e,i,r),Vp();e=e.child}return e;case 5:return Jb(e),t===null&&om(e),i=e.type,s=e.pendingProps,o=t!==null?t.memoizedProps:null,a=s.children,em(i,s)?a=null:o!==null&&em(i,o)&&(e.flags|=16),oE(t,e),An(t,e,a,r),e.child;case 6:return t===null&&om(e),null;case 13:return lw(t,e,r);case 4:return sm(e,e.stateNode.containerInfo),i=e.pendingProps,t===null?e.child=Vd(e,null,i,r):An(t,e,i,r),e.child;case 11:return i=e.type,s=e.pendingProps,s=e.elementType===i?s:mr(i,s),iw(t,e,i,s,r);case 7:return An(t,e,e.pendingProps,r),e.child;case 8:return An(t,e,e.pendingProps.children,r),e.child;case 12:return An(t,e,e.pendingProps.children,r),e.child;case 10:e:{i=e.type._context,s=e.pendingProps,a=e.memoizedProps,o=s.value;var l=e.type._context;if(bt(Ud,l._currentValue),l._currentValue=o,a!==null)if(l=a.value,o=Zn(l,o)?0:(typeof i._calculateChangedBits=="function"?i._calculateChangedBits(l,o):1073741823)|0,o===0){if(a.children===s.children&&!Nn.current){e=Yr(t,e,r);break e}}else for(l=e.child,l!==null&&(l.return=e);l!==null;){var c=l.dependencies;if(c!==null){a=l.child;for(var d=c.firstContext;d!==null;){if(d.context===i&&d.observedBits&o){l.tag===1&&(d=Ni(-1,r&-r),d.tag=2,$i(l,d)),l.lanes|=r,d=l.alternate,d!==null&&(d.lanes|=r),G_(l.return,r),c.lanes|=r;break}d=d.next}}else a=l.tag===10&&l.type===e.type?null:l.child;if(a!==null)a.return=l;else for(a=l;a!==null;){if(a===e){a=null;break}if(l=a.sibling,l!==null){l.return=a.return,a=l;break}a=a.return}l=a}An(t,e,s.children,r),e=e.child}return e;case 9:return s=e.type,o=e.pendingProps,i=o.children,Bo(e,r),s=rr(s,o.unstable_observedBits),i=i(s),e.flags|=1,An(t,e,i,r),e.child;case 14:return s=e.type,o=mr(s,e.pendingProps),o=mr(s.type,o),sw(t,e,s,o,i,r);case 15:return sE(t,e,e.type,e.pendingProps,i,r);case 17:return i=e.type,s=e.pendingProps,s=e.elementType===i?s:mr(i,s),t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2),e.tag=1,$n(i)?(t=!0,cd(e)):t=!1,Bo(e,r),K_(e,i,s),im(e,i,s,r),um(null,e,i,!0,t,r);case 19:return fw(t,e,r);case 23:return Wp(t,e,r);case 24:return Wp(t,e,r)}throw Error(ue(156,e.tag))};function WA(t,e,r,i){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function er(t,e,r,i){return new WA(t,e,r,i)}function Rv(t){return t=t.prototype,!(!t||!t.isReactComponent)}function GA(t){if(typeof t=="function")return Rv(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Rh)return 11;if(t===Ph)return 14}return 2}function Ki(t,e){var r=t.alternate;return r===null?(r=er(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function gd(t,e,r,i,s,o){var a=2;if(i=t,typeof t=="function")Rv(t)&&(a=1);else if(typeof t=="string")a=5;else e:switch(t){case Si:return Wo(r.children,s,o,e);case Qx:a=8,s|=16;break;case Gy:a=8,s|=1;break;case Pl:return t=er(12,r,e,s|8),t.elementType=Pl,t.type=Pl,t.lanes=o,t;case Al:return t=er(13,r,e,s),t.type=Al,t.elementType=Al,t.lanes=o,t;case Pd:return t=er(19,r,e,s),t.elementType=Pd,t.lanes=o,t;case Qy:return Pv(r,s,o,e);case $g:return t=er(24,r,e,s),t.elementType=$g,t.lanes=o,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Hy:a=10;break e;case qy:a=9;break e;case Rh:a=11;break e;case Ph:a=14;break e;case Ky:a=16,i=null;break e;case Yy:a=22;break e}throw Error(ue(130,t==null?t:typeof t,""))}return e=er(a,r,e,s),e.elementType=t,e.type=i,e.lanes=o,e}function Wo(t,e,r,i){return t=er(7,t,i,e),t.lanes=r,t}function Pv(t,e,r,i){return t=er(23,t,i,e),t.elementType=Qy,t.lanes=r,t}function qp(t,e,r){return t=er(6,t,null,e),t.lanes=r,t}function Kp(t,e,r){return e=er(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function HA(t,e,r){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=r,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Ap(0),this.expirationTimes=Ap(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ap(0),this.mutableSourceEagerHydrationData=null}function qA(t,e,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:xs,key:i==null?null:""+i,children:t,containerInfo:e,implementation:r}}function Jd(t,e,r,i){var s=e.current,o=Hn(),a=Li(s);e:if(r){r=r._reactInternals;t:{if(io(r)!==r||r.tag!==1)throw Error(ue(170));var l=r;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if($n(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(l!==null);throw Error(ue(171))}if(r.tag===1){var c=r.type;if($n(c)){r=F_(r,c,l);break e}}r=l}else r=Hi;return e.context===null?e.context=r:e.pendingContext=r,e=Ni(o,a),e.payload={element:t},i=i===void 0?null:i,i!==null&&(e.callback=i),$i(s,e),Fi(s,a,o),a}function Yp(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Cw(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function Av(t,e){Cw(t,e),(t=t.alternate)&&Cw(t,e)}function KA(){return null}function Ov(t,e,r){var i=r!=null&&r.hydrationOptions!=null&&r.hydrationOptions.mutableSources||null;if(r=new HA(t,e,r!=null&&r.hydrate===!0),e=er(3,null,null,e===2?7:e===1?3:0),r.current=e,e.stateNode=r,mv(e),t[ya]=r.current,D_(t.nodeType===8?t.parentNode:t),i)for(t=0;t<i.length;t++){e=i[t];var s=e._getVersion;s=s(e._source),r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[e,s]:r.mutableSourceEagerHydrationData.push(e,s)}this._internalRoot=r}Ov.prototype.render=function(t){Jd(t,this._internalRoot,null,null)};Ov.prototype.unmount=function(){var t=this._internalRoot,e=t.containerInfo;Jd(null,t,null,function(){e[ya]=null})};function Hu(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function YA(t,e){if(e||(e=t?t.nodeType===9?t.documentElement:t.firstChild:null,e=!(!e||e.nodeType!==1||!e.hasAttribute("data-reactroot"))),!e)for(var r;r=t.lastChild;)t.removeChild(r);return new Ov(t,0,e?{hydrate:!0}:void 0)}function jh(t,e,r,i,s){var o=r._reactRootContainer;if(o){var a=o._internalRoot;if(typeof s=="function"){var l=s;s=function(){var d=Yp(a);l.call(d)}}Jd(e,a,t,s)}else{if(o=r._reactRootContainer=YA(r,i),a=o._internalRoot,typeof s=="function"){var c=s;s=function(){var d=Yp(a);c.call(d)}}gE(function(){Jd(e,a,t,s)})}return Yp(a)}h_=function(t){if(t.tag===13){var e=Hn();Fi(t,4,e),Av(t,4)}};nv=function(t){if(t.tag===13){var e=Hn();Fi(t,67108864,e),Av(t,67108864)}};f_=function(t){if(t.tag===13){var e=Hn(),r=Li(t);Fi(t,r,e),Av(t,r)}};p_=function(t,e){return e()};Hg=function(t,e,r){switch(e){case"input":if(Fg(t,r),e=r.name,r.type==="radio"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var i=r[e];if(i!==t&&i.form===t.form){var s=$h(i);if(!s)throw Error(ue(90));Zx(i),Fg(i,s)}}}break;case"textarea":t_(t,r);break;case"select":e=r.value,e!=null&&$o(t,!!r.multiple,e,!1)}};Zy=pE;l_=function(t,e,r,i,s){var o=Pe;Pe|=4;try{return Vs(98,t.bind(null,e,r,i,s))}finally{Pe=o,Pe===0&&(wa(),Ur())}};ev=function(){!(Pe&49)&&(NA(),ss())};u_=function(t,e){var r=Pe;Pe|=2;try{return t(e)}finally{Pe=r,Pe===0&&(wa(),Ur())}};function CE(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Hu(e))throw Error(ue(200));return qA(t,e,null,r)}var XA={Events:[Vu,Io,$h,o_,a_,ss,{current:!1}]},rl={findFiberByHostInstance:Es,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},QA={bundleType:rl.bundleType,version:rl.version,rendererPackageName:rl.rendererPackageName,rendererConfig:rl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ro.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=d_(t),t===null?null:t.stateNode},findFiberByHostInstance:rl.findFiberByHostInstance||KA,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};
41if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zc.isDisabled&&zc.supportsFiber)try{hv=zc.inject(QA),Ds=zc}catch{}}ar.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=XA;ar.createPortal=CE;ar.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(ue(188)):Error(ue(268,Object.keys(t)));return t=d_(e),t=t===null?null:t.stateNode,t};ar.flushSync=function(t,e){var r=Pe;if(r&48)return t(e);Pe|=1;try{if(t)return Vs(99,t.bind(null,e))}finally{Pe=r,Ur()}};ar.hydrate=function(t,e,r){if(!Hu(e))throw Error(ue(200));return jh(null,t,e,!0,r)};ar.render=function(t,e,r){if(!Hu(e))throw Error(ue(200));return jh(null,t,e,!1,r)};ar.unmountComponentAtNode=function(t){if(!Hu(t))throw Error(ue(40));return t._reactRootContainer?(gE(function(){jh(null,null,t,!1,function(){t._reactRootContainer=null,t[ya]=null})}),!0):!1};ar.unstable_batchedUpdates=pE;ar.unstable_createPortal=function(t,e){return CE(t,e,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};ar.unstable_renderSubtreeIntoContainer=function(t,e,r,i){if(!Hu(r))throw Error(ue(200));if(t==null||t._reactInternals===void 0)throw Error(ue(38));return jh(t,e,r,!1,i)};ar.version="17.0.2";(function(t){function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}e(),t.exports=ar})(n2);const wl=$y(nu);/** 42 * @remix-run/router v1.0.1 43 * 44 * Copyright (c) Remix Software Inc. 45 * 46 * This source code is licensed under the MIT license found in the 47 * LICENSE.md file in the root directory of this source tree. 48 * 49 * @license MIT 50 */function Zd(){return Zd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Zd.apply(this,arguments)}var Pi;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Pi||(Pi={}));const xw="popstate";function JA(t){t===void 0&&(t={});function e(i,s){let{pathname:o,search:a,hash:l}=i.location;return Cm("",{pathname:o,search:a,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(i,s){return typeof s=="string"?s:xm(s)}return eO(e,r,null,t)}function ZA(){return Math.random().toString(36).substr(2,8)}function _w(t){return{usr:t.state,key:t.key}}function Cm(t,e,r,i){return r===void 0&&(r=null),Zd({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Sa(e):e,{state:r,key:e&&e.key||i||ZA()})}function xm(t){let{pathname:e="/",search:r="",hash:i=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function Sa(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let i=t.indexOf("?");i>=0&&(e.search=t.substr(i),t=t.substr(0,i)),t&&(e.pathname=t)}return e}function eO(t,e,r,i){i===void 0&&(i={});let{window:s=document.defaultView,v5Compat:o=!1}=i,a=s.history,l=Pi.Pop,c=null;function d(){l=Pi.Pop,c&&c({action:l,location:v.location})}function f(_,w){l=Pi.Push;let k=Cm(v.location,_,w);r&&r(k,_);let y=_w(k),b=v.createHref(k);try{a.pushState(y,"",b)}catch{s.location.assign(b)}o&&c&&c({action:l,location:k})}function g(_,w){l=Pi.Replace;let k=Cm(v.location,_,w);r&&r(k,_);let y=_w(k),b=v.createHref(k);a.replaceState(y,"",b),o&&c&&c({action:l,location:k})}let v={get action(){return l},get location(){return t(s,a)},listen(_){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(xw,d),c=_,()=>{s.removeEventListener(xw,d),c=null}},createHref(_){return e(s,_)},push:f,replace:g,go(_){return a.go(_)}};return v}var Ew;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Ew||(Ew={}));function tO(t,e,r){r===void 0&&(r="/");let i=typeof e=="string"?Sa(e):e,s=_E(i.pathname||"/",r);if(s==null)return null;let o=xE(t);nO(o);let a=null;for(let l=0;a==null&&l<o.length;++l)a=dO(o[l],s);return a}function xE(t,e,r,i){return e===void 0&&(e=[]),r===void 0&&(r=[]),i===void 0&&(i=""),t.forEach((s,o)=>{let a={relativePath:s.path||"",caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};a.relativePath.startsWith("/")&&(En(a.relativePath.startsWith(i),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+i+'" is not val
50id. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(i.length));let l=Bi([i,a.relativePath]),c=r.concat(a);s.children&&s.children.length>0&&(En(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),xE(s.children,e,c,l)),!(s.path==null&&!s.index)&&e.push({path:l,score:uO(l,s.index),routesMeta:c})}),e}function nO(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:cO(e.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}const rO=/^:\w+$/,iO=3,sO=2,oO=1,aO=10,lO=-2,kw=t=>t==="*";function uO(t,e){let r=t.split("/"),i=r.length;return r.some(kw)&&(i+=lO),e&&(i+=sO),r.filter(s=>!kw(s)).reduce((s,o)=>s+(rO.test(o)?iO:o===""?oO:aO),i)}function cO(t,e){return t.length===e.length&&t.slice(0,-1).every((i,s)=>i===e[s])?t[t.length-1]-e[e.length-1]:0}function dO(t,e){let{routesMeta:r}=t,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,d=s==="/"?e:e.slice(s.length)||"/",f=hO({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d);if(!f)return null;
50Object.assign(i,f.params);let g=l.route;o.push({params:i,pathname:Bi([s,f.pathname]),pathnameBase:yO(Bi([s,f.pathnameBase])),route:g}),f.pathnameBase!=="/"&&(s=Bi([s,f.pathnameBase]))}return o}function hO(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,i]=fO(t.path,t.caseSensitive,t.end),s=e.match(r);if(!s)return null;let o=s[0],a=o.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:i.reduce((d,f,g)=>{if(f==="*"){let v=l[g]||"";a=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}return d[f]=pO(l[g]||"",f),d},{}),pathname:o,pathnameBase:a,pattern:t}}function fO(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),EE(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let i=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/:(\w+)/g,(a,l)=>(i.push(l),"([^\\/]+)"));return t.endsWith("*")?(i.push("*"),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s+=r?"\\/*$":"(?:(?=[@.~-]|%[0-9A-F]{2})|\\b|\\/|$)",[new RegExp(s,e?void 0:"i"),i]}function pO(t,e){try{return decodeURIComponent(t)}catch(r){return EE(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+t+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),t}}function _E(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,i=t.charAt(r);return i&&i!=="/"?null:t.slice(r)||"/"}function En(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function EE(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function gO(t,e){e===void 0&&(e="/");let{pathname:r,search:i="",hash:s=""}=typeof t=="string"?Sa(t):t;return{pathname:r?r.startsWith("/")?r:mO(r,e):e,search:vO(i),hash:bO(s)}}function mO(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function kE(t,e,r,i){i===void 0&&(i=!1);let s=typeof t=="string"?Sa(t):Zd({},t),o=t===""||s.pathname==="",a=o?"/":s.pathname,l;if(i||a==null)l=r;else{let g=e.length-1;if(a.startsWith("..")){let v=a.split("/");for(;v[0]==="..";)v.shift(),g-=1;s.pathname=v.join("/")}l=g>=0?e[g]:"/"}let c=gO(s,l),d=a&&a!=="/"&&a.endsWith("/"),f=(o||a===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(d||f)&&(c.pathname+="/"),c}const Bi=t=>t.join("/").replace(/\/\/+/g,"/"),yO=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),vO=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,bO=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class wO{constructor(e,r,i){this.status=e,this.statusText=r||"",this.data=i}}function SO(t){return t instanceof wO}/** 51 * React Router v6.4.1 52 * 53 * Copyright (c) Remix Software Inc. 54 * 55 * This source code is licensed under the MIT license found in the 56 * LICENSE.md file in the root directory of this source tree. 57 * 58 * @license MIT 59 */function _m(){return _m=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},_m.apply(this,arguments)}function CO(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}const xO=typeof Object.is=="function"?Object.is:CO,{useState:_O,useEffect:EO,useLayoutEffect:kO,useDebugValue:TO}=js;function IO(t,e,r){const i=e(),[{inst:s},o]=_O({inst:{value:i,getSnapshot:e}});return kO(()=>{s.value=i,s.getSnapshot=e,Xp(s)&&o({inst:s})},[t,i,e]),EO(()=>(Xp(s)&&o({inst:s}),t(()=>{Xp(s)&&o({inst:s})})),[t]),TO(i),i}function Xp(t){const e=t.getSnapshot,r=t.value;try{const i=e();return!xO(r,i)}catch{return!0}}function RO(t,e,r){return e()}const PO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",AO=!PO,OO=AO?RO:IO;"useSyncExternalStore"in js&&(t=>t.useSyncExternalStore)(js);const DO=P.createContext(null),MO=P.createContext(null),Dv=P.createContext(null),Mv=P.createContext(null),zh=P.createContext(null),qu=P.createContext({outlet:null,matches:[]}),TE=P.createContext(null);function NO(t,e){let{relative:r}=e===void 0?{}:e;Ca()||En(!1);let{basename:i,navigator:s}=P.useContext(Mv),{hash:o,pathname:a,search:l}=RE(t,{relative:r}),c=a;return i!=="/"&&(c=a==="/"?i:Bi([i,a])),s.createHref({pathname:c,search:l,hash:o})}function Ca(){return P.useContext(zh)!=null}function Vh(){return Ca()||En(!1),P.useContext(zh).location}function IE(t){return t.filter((e,r)=>r===0||!e.route.index&&e.pathnameBase!==t[r-1].pathnameBase)}function Ku(){Ca()||En(!1);let{basename:t,navigator:e}=P.useContext(Mv),{matches:r}=P.useContext(qu),{pathname:i}=Vh(),s=JSON.stringify(IE(r).map(l=>l.pathnameBase)),o=P.useRef(!1);return P.useEffect(()=>{o.current=!0}
59),P.useCallback(function(l,c){if(c===void 0&&(c={}),!o.current)return;if(typeof l=="number"){e.go(l);return}let d=kE(l,JSON.parse(s),i,c.relative==="path");t!=="/"&&(d.pathname=d.pathname==="/"?t:Bi([t,d.pathname])),(c.replace?e.replace:e.push)(d,c.state,c)},[t,e,s,i])}function RE(t,e){let{relative:r}=e===void 0?{}:e,{matches:i}=P.useContext(qu),{pathname:s}=Vh(),o=JSON.stringify(IE(i).map(a=>a.pathnameBase));return P.useMemo(()=>kE(t,JSON.parse(o),s,r==="path"),[t,o,s,r])}function $O(t,e){Ca()||En(!1);let r=P.useContext(Dv),{matches:i}=P.useContext(qu),s=i[i.length-1],o=s?s.params:{};s&&s.pathname;let a=s?s.pathnameBase:"/";s&&s.route;let l=Vh(),c;if(e){var d;let w=typeof e=="string"?Sa(e):e;a==="/"||(d=w.pathname)!=null&&d.startsWith(a)||En(!1),c=w}else c=l;let f=c.pathname||"/",g=a==="/"?f:f.slice(a.length)||"/",v=tO(t,{pathname:g}),_=BO(v&&v.map(w=>Object.assign({},w,{params:Object.assign({},o,w.params),pathname:Bi([a,w.pathname]),pathnameBase:w.pathnameBase==="/"?a:Bi([a,w.pathnameBase])})),i,r||void 0);return e?P.createElement(zh.Provider,{value:{location:_m({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Pi.Pop}},_):_}function LO(){let t=zO(),e=SO(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:i},o={padding:"2px 4px",backgroundColor:i};return P.createElement(P.Fragment,null,P.createElement("h2",null,"Unhandled Thrown Error!"),P.createElement("h3",{style:{fontStyle:"italic"}},e),r?P.createElement("pre",{style:s},r):null,P.createElement("p",null,"💿 Hey developer 👋"),P.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",P.createElement("code",{style:o},"errorElement")," props on ",P.createElement("code",{style:o},"<Route>")))}class FO extends P.Component{constructor(e){super(e),this.state={location:e.location,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location?{error:e.error,location:e.location}:{error:e.error||r.error,location:r.location}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error?P.createElement(TE.Provider,{value:this.state.error,children:this.props.component}):this.props.children}}function UO(t){let{routeContext:e,match:r,children:i}=t,s=P.useContext(DO);return s&&r.route.errorElement&&(s._deepestRenderedBoundaryId=r.route.id),P.createElement(qu.Provider,{value:e},i)}function BO(t,e,r){if(e===void 0&&(e=[]),t==null)if(r!=null&&r.errors)t=r.matches;else return null;let i=t,s=r==null?void 0:r.errors;if(s!=null){let o=i.findIndex(a=>a.route.id&&(s==null?void 0:s[a.route.id]));o>=0||En(!1),i=i.slice(0,Math.min(i.length,o+1))}return i.reduceRight((o,a,l)=>{let c=a.route.id?s==null?void 0:s[a.route.id]:null,d=r?a.route.errorElement||P.createElement(LO,null):null,f=()=>P.createElement(UO,{match:a,routeContext:{outlet:o,matches:e.concat(i.slice(0,l+1))}},c?d:a.route.element!==void 0?a.route.element:o);return r&&(a.route.errorElement||l===0)?P.createElement(FO,{location:r.location,component:d,error:c,children:f()}):f()},null)}var Em;(function(t){t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator"})(Em||(Em={}));function jO(t){let e=P.useContext(Dv);return e||En(!1),e}function zO(){var t;let e=P.useContext(TE),r=jO(Em.UseRouteError),i=P.useContext(qu),s=i.matches[i.matches.length-1];return e||(i||En(!1),s.route.id||En(!1),(t=r.errors)==null?void 0:t[s.route.id])}function ho(t){let{to:e,replace:r,state:i,relative:s}=t;Ca()||En(!1);let o=P.useContext(Dv),a=Ku();return P.useEffect(()=>{o&&o.navigation.state!=="idle"||a(e,{replace:r,state:i,relative:s})}),null}function Gr(t){En(!1)}function VO(t){let{basename:e="/",children:r=null,location:i,navigationType:s=Pi.Pop,navigator:o,static:a=!1}=t;Ca()&&En(!1);let l=e.replace(/^\/*/,"/"),c=P.useMemo(()=>({basename:l,navigator:o,static:a}),[l,o,a]);typeof i=="string"&&(i=Sa(i));let{pathname:d="/",search:f="",hash:g="",state:v=null,key:_="default"}=i,w=P.useMemo(()=>{let k=_E(d,l);return k==null?null:{pathname:k,search:f,hash:g,state:v,key:_}},[l,d,f,g,v,_]);return w==null?null:P.createElement(Mv.Provider,{value:c},P.createElement(zh.Provider,{children:r,value:{location:w,navigationType:s}}))}function WO(t){let{children:e,location:r}=t,i=P.useContext(MO),s=i&&!e?i.router.routes:km(e);return $O(s,r)}var Tw;(function(t){t[t.pending=0]="pending",t[t.success=1]="success",t[t.error=2]="error"})(Tw||(Tw={}));new Promise(()=>{});function km(t,e){e===void 0&&(e=[]);let r=[];
59return P.Children.forEach(t,(i,s)=>{if(!P.isValidElement(i))return;if(i.type===P.Fragment){r.push.apply(r,km(i.props.children,e));return}i.type!==Gr&&En(!1);let o=[...e,s],a={id:i.props.id||o.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,hasErrorBoundary:i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle};i.props.children&&(a.children=km(i.props.children,o)),r.push(a)}),r}/** 60 * React Router DOM v6.4.1 61 * 62 * Copyright (c) Remix Software Inc. 63 * 64 * This source code is licensed under the MIT license found in the 65 * LICENSE.md file in the root directory of this source tree. 66 * 67 * @license MIT 68 */function Tm(){return Tm=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Tm.apply(this,arguments)}function GO(t,e){if(t==null)return{};var r={},i=Object.keys(t),s,o;for(o=0;o<i.length;o++)s=i[o],!(e.indexOf(s)>=0)&&(r[s]=t[s]);return r}function HO(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function qO(t,e){return t.button===0&&(!e||e==="_self")&&!HO(t)}const KO=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function YO(t){let{basename:e,children:r,window:i}=t,s=P.useRef();s.current==null&&(s.current=JA({window:i,v5Compat:!0}));let o=s.current,[a,l]=P.useState({action:o.action,location:o.location});return P.useLayoutEffect(()=>o.listen(l),[o]),P.createElement(VO,{basename:e,children:r,location:a.location,navigationType:a.action,navigator:o})}const eh=P.forwardRef(function(e,r){let{onClick:i,relative:s,reloadDocument:o,replace:a,state:l,target:c,to:d,preventScrollReset:f}=e,g=GO(e,KO),v=NO(d,{relative:s}),_=XO(d,{replace:a,state:l,target:c,preventScrollReset:f,relative:s});function w(k){i&&i(k),k.defaultPrevented||_(k)}return P.createElement("a",Tm({},g,{href:v,onClick:o?i:w,ref:r,target:c}))});function XO(t,e){let{target:r,replace:i,state:s,preventScrollReset:o,relative:a}=e===void 0?{}:e,l=Ku(),c=Vh(),d=RE(t,{relative:a});return P.useCallback(f=>{if(qO(f,r)){f.preventDefault();let g=i!==void 0?i:xm(c)===xm(d);l(t,{replace:g,state:s,preventScrollReset:o,relative:a})}},[c,l,d,i,s,r,t,o,a])}function M(){return M=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},M.apply(this,arguments)}function Ss(t){return t!==null&&typeof t=="object"&&t.constructor===Object}function PE(t){if(!Ss(t))return t;const e={};return Object.keys(t).forEach(r=>{e[r]=PE(t[r])}),e}function Ln(t,e,r={clone:!0}){const i=r.clone?M({},t):t;return Ss(t)&&Ss(e)&&Object.keys(e).forEach(s=>{s!=="__proto__"&&(Ss(e[s])&&s in t&&Ss(t[s])?i[s]=Ln(t[s],e[s],r):r.clone?i[s]=Ss(e[s])?PE(e[s]):e[s]:i[s]=e[s])}),i}var Is={},QO={get exports(){return Is},set exports(t){Is=t}},JO="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ZO=JO,eD=ZO;function AE(){}function OE(){}OE.resetWarningCache=AE;var tD=function(){function t(i,s,o,a,l,c){if(c!==eD){var d=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 d.name="Invariant Violation",d}}t.isRequired=t;function e(){return t}var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:OE,resetWarningCache:AE};return r.PropTypes=r,r};QO.exports=tD();function Yi(t){let e="https://mui.com/production-error/?code="+t;for(let r=1;r<arguments.length;r+=1)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified MUI error #"+t+"; visit "+e+" for the full message."}function he(t){if(typeof t!="string")throw new Error(Yi(7));return t.charAt(0).toUpperCase()+t.slice(1)}function Im(...t){return t.reduce((e,r)=>r==null?e:function(...s){e.apply(this,s),r.apply(this,s)},()=>{})}function Nv(t,e=166){let r;function i(...s){const o=()=>{t.apply(this,s)};clearTimeout(r),r=setTimeout(o,e)}return i.clear=()=>{clearTimeout(r)},i}function nD(t,e){return()=>null}function md(t,e){return P.isValidElement(t)&&e.indexOf(t.type.muiName)!==-1}function Jt(t){return t&&t.ownerDocument||document}function Xi(t){return Jt(t).defaultView||window}function rD(t,e){return()=>null}function th(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const iD=typeof window<"u"?P.useLayoutEffect:P.useEffect,Lr=iD;let Iw=0;function sD(t){const[e,r]=P.useState(t),i=t||e;return P.useEffect(()=>{e==null&&(Iw+=1,r(`mui-${Iw}`))},[e]),i}const Rw=js["useId"];function $v(t){if(Rw!==void 0){const e=Rw();return t??e}return sD(t)}function oD(t,e,r,i,s){return null}function Rm({controlled:t,default:e,name:r,state:i="value"}){const{current:s}=P.useRef(t!==void 0),[o,a]=P.useState(e),l=s?t:o,c=P.useCallback(d=>{s||a(d)},[]);return[l,c]}function Rr(t){const e=P.useRef(t);return Lr(()=>{e.current=t}),P.useCallback((...r)=>(0,e.current)(...r),[])}function nn(...t){return P.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(r=>{th(r,e)})},t)}let Wh=!0,Pm=!1,Pw;const aD={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 lD(t){const{type:e,tagName:r}=t;return!!(r==="INPUT"&&aD[e]&&!t.readOnly||r==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function uD(t){t.metaKey||t.altKey||t.ctrlKey||(Wh=!0)}function Qp(){Wh=!1}function cD(){this.visibilityState==="hidden"&&Pm&&(Wh=!0)}function dD(t){t.addEventListener("keydown",uD,!0),t.addEventListener("mousedown",Qp,!0),t.addEventListener("pointerdown",Qp,!0),t.addEventListener("touchstart",Qp,!0),t.addEventListener("visibilitychange",cD,!0)}function hD(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch{}return Wh||lD(e)}function DE(){const t=P.useCallback(s=>{s!=null&&dD(s.ownerDocument)},[]),e=P.useRef(!1);function r(){return e.current?(Pm=!0,window.clearTimeout(Pw),Pw=window.setTimeout(()=>{Pm=!1},100),e.current=!1,!0):!1}function i(s){return hD(s)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:i,onBlur:r,ref:t}}function ME(t){const e=t.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}function Lv(t,e){const r=M({},e);return Object.keys(t).forEach(i=>
68{if(i.toString().match(/^(components|slots)$/))r[i]=M({},t[i],r[i]);else if(i.toString().match(/^(componentsProps|slotProps)$/)){const s=t[i]||{},o=e[i];r[i]={},!o||!Object.keys(o)?r[i]=s:!s||!Object.keys(s)?r[i]=o:(r[i]=M({},o),Object.keys(s).forEach(a=>{r[i][a]=Lv(s[a],o[a])}))}else r[i]===void 0&&(r[i]=t[i])}),r}function Me(t,e,r){const i={};return Object.keys(t).forEach(s=>{i[s]=t[s].reduce((o,a)=>(a&&(o.push(e(a)),r&&r[a]&&o.push(r[a])),o),[]).join(" ")}),i}const Aw=t=>t,fD=()=>{let t=Aw;return{configure(e){t=e},generate(e){return t(e)},reset(){t=Aw}}},pD=fD(),Fv=pD,gD={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function Ae(t,e,r="Mui"){const i=gD[e];return i?`${r}-${i}`:`${Fv.generate(t)}-${e}`}function Re(t,e,r="Mui"){const i={};return e.forEach(s=>{i[s]=Ae(t,s,r)}),i}function pe(t,e){if(t==null)return{};var r={},i=Object.keys(t),s,o;for(o=0;o<i.length;o++)s=i[o],!(e.indexOf(s)>=0)&&(r[s]=t[s]);return r}function NE(t){var e=Object.create(null);return function(r){return e[r]===void 0&&(e[r]=t(r)),e[r]}}var mD=/^((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)-.*))$/,yD=NE(function(t){return mD.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91});function vD(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function bD(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var wD=function(){function t(r){var i=this;this._insertTag=function(s){var o;i.tags.length===0?i.insertionPoint?o=i.insertionPoint.nextSibling:i.prepend?o=i.container.firstChild:o=i.before:o=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(s,o),i.tags.push(s)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepe
vendor: 5,922 bytes, line 68
68nd,this.insertionPoint=r.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(i){i.forEach(this._insertTag)},e.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(bD(this));var s=this.tags[this.tags.length-1];if(this.isSpeedy){var o=vD(s);try{o.insertRule(i,o.cssRules.length)}catch{}}else s.appendChild(document.createTextNode(i));this.ctr++},e.flush=function(){this.tags.forEach(function(i){return i.parentNode&&i.parentNode.removeChild(i)}),this.tags=[],this.ctr=0},t}(),ln="-ms-",nh="-moz-",Xe="-webkit-",$E="comm",Uv="rule",Bv="decl",SD="@import",LE="@keyframes",CD=Math.abs,Gh=String.fromCharCode,xD=Object.assign;function _D(t,e){return Kt(t,0)^45?(((e<<2^Kt(t,0))<<2^Kt(t,1))<<2^Kt(t,2))<<2^Kt(t,3):0}function FE(t){return t.trim()}function ED(t,e){return(t=e.exec(t))?t[0]:t}function Je(t,e,r){return t.replace(e,r)}function Am(t,e){return t.indexOf(e)}function Kt(t,e){return t.charCodeAt(e)|0}function yu(t,e,r){return t.slice(e,r)}function Cr(t){return t.length}function jv(t){return t.length}function Vc(t,e){return e.push(t),t}function kD(t,e){return t.map(e).join("")}var Hh=1,na=1,UE=0,Un=0,Ot=0,xa="";function qh(t,e,r,i,s,o,a){return{value:t,root:e,parent:r,type:i,props:s,children:o,line:Hh,column:na,length:a,return:""}}function il(t,e){return xD(qh("",null,null,"",null,null,0),t,{length:-t.length},e)}function TD(){return Ot}function ID(){return Ot=Un>0?Kt(xa,--Un):0,na--,Ot===10&&(na=1,Hh--),Ot}function qn(){return Ot=Un<UE?Kt(xa,Un++):0,na++,Ot===10&&(na=1,Hh++),Ot}function Dr(){return Kt(xa,Un)}function yd(){return Un}function Yu(t,e){return yu(xa,t,e)}function vu(t){switch(t){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 BE(t){return Hh=na=1,UE=Cr(xa=t),Un=0,[]}function jE(t){return xa="",t}function vd(t){return FE(Yu(Un-1,Om(t===91?t+2:t===40?t+1:t)))}function RD(t){for(;(Ot=Dr())&&Ot<33;)qn();return vu(t)>2||vu(Ot)>3?"":" "}function PD(t,e){for(;--e&&qn()&&!(Ot<48||Ot>102||Ot>57&&Ot<65||Ot>70&&Ot<97););return Yu(t,yd()+(e<6&&Dr()==32&&qn()==32))}function Om(t){for(;qn();)switch(Ot){case t:return Un;case 34:case 39:t!==34&&t!==39&&Om(Ot);break;case 40:t===41&&Om(t);break;case 92:qn();break}return Un}function AD(t,e){for(;qn()&&t+Ot!==47+10;)if(t+Ot===42+42&&Dr()===47)break;return"/*"+Yu(e,Un-1)+"*"+Gh(t===47?t:qn())}function OD(t){for(;!vu(Dr());)qn();return Yu(t,Un)}function DD(t){return jE(bd("",null,null,null,[""],t=BE(t),0,[0],t))}function bd(t,e,r,i,s,o,a,l,c){for(var d=0,f=0,g=a,v=0,_=0,w=0,k=1,y=1,b=1,x=0,R="",E=s,C=o,D=i,A=R;y;)switch(w=x,x=qn()){case 40:if(w!=108&&Kt(A,g-1)==58){Am(A+=Je(vd(x),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:A+=vd(x);break;case 9:case 10:case 13:case 32:A+=RD(w);break;case 92:A+=PD(yd()-1,7);continue;case 47:switch(Dr()){case 42:case 47:Vc(MD(AD(qn(),yd()),e,r),c);break;default:A+="/"}break;case 123*k:l[d++]=Cr(A)*b;case 125*k:case 59:case 0:switch(x){case 0:case 125:y=0;case 59+f:_>0&&Cr(A)-g&&Vc(_>32?Dw(A+";",i,r,g-1):Dw(Je(A," ","")+";",i,r,g-2),c);break;case 59:A+=";";default:if(Vc(D=Ow(A,e,r,d,f,s,l,R,E=[],C=[],g),o),x===123)if(f===0)bd(A,e,D,D,E,o,g,l,C);else switch(v===99&&Kt(A,3)===110?100:v){case 100:case 109:case 115:bd(t,D,D,i&&Vc(Ow(t,D,D,0,0,s,l,R,s,E=[],g),C),s,C,g,l,i?E:C);break;default:bd(A,D,D,D,[""],C,0,l,C)}}d=f=_=0,k=b=1,R=A="",g=a;break;case 58:g=1+Cr(A),_=w;default:if(k<1){if(x==123)--k;else if(x==125&&k++==0&&ID()==125)continue}switch(A+=Gh(x),x*k){case 38:b=f>0?1:(A+="\f",-1);break;case 44:l[d++]=(Cr(A)-1)*b,b=1;break;case 64:Dr()===45&&(A+=vd(qn())),v=Dr(),f=g=Cr(R=A+=OD(yd())),x++;break;case 45:w===45&&Cr(A)==2&&(k=0)}}return o}function Ow(t,e,r,i,s,o,a,l,c,d,f){for(var g=s-1,v=s===0?o:[""],_=jv(v),w=0,k=0,y=0;w<i;++w)for(var b=0,x=yu(t,g+1,g=CD(k=a[w])),R=t;b<_;++b)(R=FE(k>0?v[b]+" "+x:Je(x,/&\f/g,v[b])))&&(c[y++]=R);return qh(t,e,r,s===0?Uv:l,c,d,f)}function MD(t,e,r){return qh(t,e,r,$E,Gh(TD()),yu(t,2,-2),0)}function Dw(t,e,r,i){return qh(t,e,r,Bv,yu(t,0,i),yu(t,i+1,-1),i)}function Go(t,e){for(var r="",i=jv(t),s=0;s<i;s++)r+=e(t[s],s,t,e)||"";return r}function ND(t,e,r,i){switch(t.type){case SD:case Bv:return t.return=t.return||t.value;case $E:return"";case LE:return t.return=t.value+"{"+Go(t.children,i)+"}";case Uv:t.value=t.props.join(",")}return Cr(r=Go(t.children,i))?t.return=t.value+"{"+r+"}":""}function $D(t){var e=jv(t);return function(r,i,s,o){for(var a="",l=0;l<e;l++)a+=t[l](r,i,s,o)||"";return a}}function LD(t){return function(e){e.root||(e=e.return)&&t(e)}}var FD=function(e,r,i){for(var s=0,o=0;s=o,o=Dr(),s===38&&o===12&&(r[i]=1),!vu(o);)qn();return Yu(e,Un)},UD=function(e,r){var i=-1,s=44;do switch(vu(s)){case 0:s===38&&Dr()===12&&(r[i]=1),e[i]+=FD(Un-1,r,i);break;case 2:e[i]+=vd(s);break;case 4:if(s===44){e[++i]=Dr()===58?"&\f":"",r[i]=e[i].length;break}default:e[i]+=Gh(s)}while(s=qn());return e},BD=function(e,r){return jE(UD(BE(e),r))},Mw=new WeakMap,jD=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var r=e.value,i=e.parent,s=e.column===i.column&&e.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(e.props.length===1&&r.charCodeAt(0)!==58&&!Mw.get(i))&&!s){Mw.set(e,!0);for(var o=[],a=BD(r,o),l=i.props,c=0,d=0;c<a.length;c++)for(var f=0;f<l.length;f++,d++)e.props[d]=o[c]?a[c].replace(/&\f/g,l[f]):l[f]+" "+a[c]}}},zD=function(e){if(e.type==="decl"){var r=e.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(e.return="",e.value="")}};function zE(t,e){switch(_D(t,e)){case 5103:return Xe+"print-"+t+t;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 Xe+t+t;
vendor: 1,666 bytes, line 68
68case 5349:case 4246:case 4810:case 6968:case 2756:return Xe+t+nh+t+ln+t+t;case 6828:case 4268:return Xe+t+ln+t+t;case 6165:return Xe+t+ln+"flex-"+t+t;case 5187:return Xe+t+Je(t,/(\w+).+(:[^]+)/,Xe+"box-$1$2"+ln+"flex-$1$2")+t;case 5443:return Xe+t+ln+"flex-item-"+Je(t,/flex-|-self/,"")+t;case 4675:return Xe+t+ln+"flex-line-pack"+Je(t,/align-content|flex-|-self/,"")+t;case 5548:return Xe+t+ln+Je(t,"shrink","negative")+t;case 5292:return Xe+t+ln+Je(t,"basis","preferred-size")+t;case 6060:return Xe+"box-"+Je(t,"-grow","")+Xe+t+ln+Je(t,"grow","positive")+t;case 4554:return Xe+Je(t,/([^-])(transform)/g,"$1"+Xe+"$2")+t;case 6187:return Je(Je(Je(t,/(zoom-|grab)/,Xe+"$1"),/(image-set)/,Xe+"$1"),t,"")+t;case 5495:case 3959:return Je(t,/(image-set\([^]*)/,Xe+"$1$`$1");case 4968:return Je(Je(t,/(.+:)(flex-)?(.*)/,Xe+"box-pack:$3"+ln+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Xe+t+t;case 4095:case 3583:case 4068:case 2532:return Je(t,/(.+)-inline(.+)/,Xe+"$1$2")+t;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(Cr(t)-1-e>6)switch(Kt(t,e+1)){case 109:if(Kt(t,e+4)!==45)break;case 102:return Je(t,/(.+:)(.+)-([^]+)/,"$1"+Xe+"$2-$3$1"+nh+(Kt(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Am(t,"stretch")?zE(Je(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Kt(t,e+1)!==115)break;case 6444:switch(Kt(t,Cr(t)-3-(~Am(t,"!important")&&10))){case 107:return Je(t,":",":"+Xe)+t;case 101:return Je(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Xe+(Kt(t,14)===45?"inline-":"")+"box$3$1"+Xe+"$2$3$1"+ln+"$2box$3")+t}break;case 5936:switch(Kt(t,e+11)){case 114:return Xe+t+ln+Je(t,/[svh]\w+-[tblr]{2}/,"tb")+t;
vendor: 5,054 bytes, lines 68-75
68case 108:return Xe+t+ln+Je(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Xe+t+ln+Je(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return Xe+t+ln+t+t}return t}var VD=function(e,r,i,s){if(e.length>-1&&!e.return)switch(e.type){case Bv:e.return=zE(e.value,e.length);break;case LE:return Go([il(e,{value:Je(e.value,"@","@"+Xe)})],s);case Uv:if(e.length)return kD(e.props,function(o){switch(ED(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Go([il(e,{props:[Je(o,/:(read-\w+)/,":"+nh+"$1")]})],s);case"::placeholder":return Go([il(e,{props:[Je(o,/:(plac\w+)/,":"+Xe+"input-$1")]}),il(e,{props:[Je(o,/:(plac\w+)/,":"+nh+"$1")]}),il(e,{props:[Je(o,/:(plac\w+)/,ln+"input-$1")]})],s)}return""})}},WD=[VD],GD=function(e){var r=e.key;if(r==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(k){var y=k.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(k),k.setAttribute("data-s",""))})}var s=e.stylisPlugins||WD,o={},a,l=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(k){for(var y=k.getAttribute("data-emotion").split(" "),b=1;b<y.length;b++)o[y[b]]=!0;l.push(k)});var c,d=[jD,zD];{var f,g=[ND,LD(function(k){f.insert(k)})],v=$D(d.concat(s,g)),_=function(y){return Go(DD(y),v)};c=function(y,b,x,R){f=x,_(y?y+"{"+b.styles+"}":b.styles),R&&(w.inserted[b.name]=!0)}}var w={key:r,sheet:new wD({key:r,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:c};return w.sheet.hydrate(l),w},Dm={},HD={get exports(){return Dm},set exports(t){Dm=t}},tt={};/** @license React v16.13.1 69 * react-is.production.min.js 70 * 71 * Copyright (c) Facebook, Inc. and its affiliates. 72 * 73 * This source code is licensed under the MIT license found in the 74 * LICENSE file in the root directory of this source tree. 75 */var Wt=typeof Symbol=="function"&&Symbol.for,zv=Wt?Symbol.for("react.element"):60103,Vv=Wt?Symbol.for("react.portal"):60106,Kh=Wt?Symbol.for("react.fragment"):60107,Yh=Wt?Symbol.for("react.strict_mode"):60108,Xh=Wt?Symbol.for("react.profiler"):60114,Qh=Wt?Symbol.for("react.provider"):60109,Jh=Wt?Symbol.for("react.context"):60110,Wv=Wt?Symbol.for("react.async_mode"):60111,Zh=Wt?Symbol.for("react.concurrent_mode"):60111,ef=Wt?Symbol.for("react.forward_ref"):60112,tf=Wt?Symbol.for("react.suspense"):60113,qD=Wt?Symbol.for("react.suspense_list"):60120,nf=Wt?Symbol.for("react.memo"):60115,rf=Wt?Symbol.for("react.lazy"):60116,KD=Wt?Symbol.for("react.block"):60121,YD=Wt?Symbol.for("react.fundamental"):60117,XD=Wt?Symbol.for("react.responder"):60118,QD=Wt?Symbol.for("react.scope"):60119;function Xn(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case zv:switch(t=t.type,t){case Wv:case Zh:case Kh:case Xh:case Yh:case tf:return t;default:switch(t=t&&t.$$typeof,t){case Jh:case ef:case rf:case nf:case Qh:return t;default:return e}}case Vv:return e}}}function VE(t){return Xn(t)===Zh}tt.AsyncMode=Wv;tt.ConcurrentMode=Zh;tt.ContextConsumer=Jh;tt.ContextProvider=Qh;tt.Element=zv;tt.ForwardRef=ef;tt.Fragment=Kh;tt.Lazy=rf;tt.Memo=nf;tt.Portal=Vv;tt.Profiler=Xh;tt.StrictMode=Yh;tt.Suspense=tf;tt.isAsyncMode=function(t){return VE(t)||Xn(t)===Wv};tt.isConcurrentMode=VE;tt.isContextConsumer=function(t){return Xn(t)===Jh};tt.isContextProvider=function(t){return Xn(t)===Qh};tt.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===zv};tt.isForwardRef=function(t){return Xn(t)===ef};tt.isFragment=function(t){return Xn(t)===Kh};tt.isLazy=function(t){return Xn(t)===rf};tt.isMemo=function(t){return Xn(t)===nf};tt.isPortal=function(t){return Xn(t)===Vv};tt.isProfiler=function(t){return Xn(t)===Xh};tt.isStrictMode=function(t){return Xn(t)===Yh};tt.isSuspense=function(t){return Xn(t)===tf};tt.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Kh||t===Zh||t===Xh||t===Yh||t===tf||t===qD||typeof t=="object"&&t!==null&&(t.$$typeof===rf||t.$$typeof===nf||t.$$typeof===Qh||t.$$typeof===Jh||t.$$typeof===ef||t.$$typeof===YD||t.$$typeof===XD||t.$$typeof===QD||t.$$typeof===KD)};tt.typeOf=Xn;(function(t){t.exports=tt})(HD);var WE=Dm,JD={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ZD={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},GE={};GE[WE.ForwardRef]=JD;GE[WE.Memo]=ZD;var eM=!0;function tM(t,e,r){var i="";return r.split(" ").forEach(function(s){t[s]!==void 0?e.push(t[s]+";"):i+=s+" "}),i}var HE=function(e,r,i){var s=e.key+"-"+r.name;(i===!1||eM===!1)&&e.registered[s]===void 0&&(e.registered[s]=r.styles)},qE=function(e,r,i){HE(e,r,i);var s=e.key+"-"+r.name;if(e.inserted[r.name]===void 0){var o=r;do e.insert(r===o?"."+s:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function nM(t){for(var e=0,r,i=0,s=t.length;s>=4;++i,s-=4)r=t.charCodeAt(i)&255|(t.charCodeAt(++i)&255)<<8|(t.charCodeAt(++i)&255)<<16|(t.charCodeAt(++i)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>
vendor: 4,436 bytes, line 75
75>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(s){case 3:e^=(t.charCodeAt(i+2)&255)<<16;case 2:e^=(t.charCodeAt(i+1)&255)<<8;case 1:e^=t.charCodeAt(i)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var rM={animationIterationCount: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},iM=/[A-Z]|^ms/g,sM=/_EMO_([^_]+?)_([^]*?)_EMO_/g,KE=function(e){return e.charCodeAt(1)===45},Nw=function(e){return e!=null&&typeof e!="boolean"},Jp=NE(function(t){return KE(t)?t:t.replace(iM,"-$&").toLowerCase()}),$w=function(e,r){switch(e){case"animation":case"animationName":if(typeof r=="string")return r.replace(sM,function(i,s,o){return xr={name:s,styles:o,next:xr},s})}return rM[e]!==1&&!KE(e)&&typeof r=="number"&&r!==0?r+"px":r};function bu(t,e,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return xr={name:r.name,styles:r.styles,next:xr},r.name;if(r.styles!==void 0){var i=r.next;if(i!==void 0)for(;i!==void 0;)xr={name:i.name,styles:i.styles,next:xr},i=i.next;var s=r.styles+";";return s}return oM(t,e,r)}case"function":{if(t!==void 0){var o=xr,a=r(t);return xr=o,bu(t,e,a)}break}}if(e==null)return r;var l=e[r];return l!==void 0?l:r}function oM(t,e,r){var i="";if(Array.isArray(r))for(var s=0;s<r.length;s++)i+=bu(t,e,r[s])+";";else for(var o in r){var a=r[o];if(typeof a!="object")e!=null&&e[a]!==void 0?i+=o+"{"+e[a]+"}":Nw(a)&&(i+=Jp(o)+":"+$w(o,a)+";");else if(Array.isArray(a)&&typeof a[0]=="string"&&(e==null||e[a[0]]===void 0))for(var l=0;l<a.length;l++)Nw(a[l])&&(i+=Jp(o)+":"+$w(o,a[l])+";");else{var c=bu(t,e,a);switch(o){case"animation":case"animationName":{i+=Jp(o)+":"+c+";";break}default:i+=o+"{"+c+"}"}}}return i}var Lw=/label:\s*([^\s;\n{]+)\s*(;|$)/g,xr,Gv=function(e,r,i){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var s=!0,o="";xr=void 0;var a=e[0];a==null||a.raw===void 0?(s=!1,o+=bu(i,r,a)):o+=a[0];for(var l=1;l<e.length;l++)o+=bu(i,r,e[l]),s&&(o+=a[l]);Lw.lastIndex=0;for(var c="",d;(d=Lw.exec(o))!==null;)c+="-"+d[1];var f=nM(o)+c;return{name:f,styles:o,next:xr}},aM=function(e){return e()},YE=js["useInsertionEffect"]?js["useInsertionEffect"]:!1,lM=YE||aM,Fw=YE||P.useLayoutEffect,XE=P.createContext(typeof HTMLElement<"u"?GD({key:"css"}):null);XE.Provider;var QE=function(e){return P.forwardRef(function(r,i){var s=P.useContext(XE);return e(r,s,i)})},Hv=P.createContext({}),uM=QE(function(t,e){var r=t.styles,i=Gv([r],void 0,P.useContext(Hv)),s=P.useRef();return Fw(function(){var o=e.key+"-global",a=new e.sheet.constructor({key:o,nonce:e.sheet.nonce,container:e.sheet.container,speedy:e.sheet.isSpeedy}),l=!1,c=document.querySelector('style[data-emotion="'+o+" "+i.name+'"]');return e.sheet.tags.length&&(a.before=e.sheet.tags[0]),c!==null&&(l=!0,c.setAttribute("data-emotion",o),a.hydrate([c])),s.current=[a,l],function(){a.flush()}},[e]),Fw(function(){var o=s.current,a=o[0],l=o[1];if(l){o[1]=!1;return}if(i.next!==void 0&&qE(e,i.next,!0),a.tags.length){var c=a.tags[a.tags.length-1].nextElementSibling;a.before=c,a.flush()}e.insert("",i,a,!1)},[e,i.name]),null});function _a(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Gv(e)}var os=function(){var e=_a.apply(void 0,arguments),r="animation-"+e.name;return{name:r,styles:"@keyframes "+r+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},cM=yD,dM=function(e){return e!=="theme"},Uw=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?cM:dM},Bw=function(e,r,i){var s;if(r){var o=r.shouldForwardProp;s=e.__emotion_forwardProp&&o?function(a){return e.__emotion_forwardProp(a)&&o(a)}:o}return typeof s!="function"&&i&&(s=e.__emotion_forwardProp),s}
vendor: 2,505 bytes, line 75
75,hM=function(e){var r=e.cache,i=e.serialized,s=e.isStringTag;return HE(r,i,s),lM(function(){return qE(r,i,s)}),null},fM=function t(e,r){var i=e.__emotion_real===e,s=i&&e.__emotion_base||e,o,a;r!==void 0&&(o=r.label,a=r.target);var l=Bw(e,r,i),c=l||Uw(s),d=!c("as");return function(){var f=arguments,g=i&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(o!==void 0&&g.push("label:"+o+";"),f[0]==null||f[0].raw===void 0)g.push.apply(g,f);else{g.push(f[0][0]);for(var v=f.length,_=1;_<v;_++)g.push(f[_],f[0][_])}var w=QE(function(k,y,b){var x=d&&k.as||s,R="",E=[],C=k;if(k.theme==null){C={};for(var D in k)C[D]=k[D];C.theme=P.useContext(Hv)}typeof k.className=="string"?R=tM(y.registered,E,k.className):k.className!=null&&(R=k.className+" ");var A=Gv(g.concat(E),y.registered,C);R+=y.key+"-"+A.name,a!==void 0&&(R+=" "+a);var U=d&&l===void 0?Uw(x):c,B={};for(var z in k)d&&z==="as"||U(z)&&(B[z]=k[z]);return B.className=R,B.ref=b,P.createElement(P.Fragment,null,P.createElement(hM,{cache:y,serialized:A,isStringTag:typeof x=="string"}),P.createElement(x,B))});return w.displayName=o!==void 0?o:"Styled("+(typeof s=="string"?s:s.displayName||s.name||"Component")+")",w.defaultProps=e.defaultProps,w.__emotion_real=w,w.__emotion_base=s,w.__emotion_styles=g,w.__emotion_forwardProp=l,Object.defineProperty(w,"toString",{value:function(){return"."+a}}),w.withComponent=function(k,y){return t(k,M({},r,y,{shouldForwardProp:Bw(w,y,!0)})).apply(void 0,g)},w}},pM=["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"],Mm=fM.bind();
vendor: 4,980 bytes, lines 75-79
75pM.forEach(function(t){Mm[t]=Mm(t)});const gM=Mm;function mM(t){return t==null||Object.keys(t).length===0}function yM(t){const{styles:e,defaultTheme:r={}}=t;return $(uM,{styles:typeof e=="function"?s=>e(mM(s)?r:s):e})}/** @license MUI v5.11.0 76 * 77 * This source code is licensed under the MIT license found in the 78 * LICENSE file in the root directory of this source tree. 79 */function JE(t,e){return gM(t,e)}const vM=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))};function zl(t,e){return e?Ln(t,e,{clone:!1}):t}const qv={xs:0,sm:600,md:900,lg:1200,xl:1536},jw={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${qv[t]}px)`};function sr(t,e,r){const i=t.theme||{};if(Array.isArray(e)){const o=i.breakpoints||jw;return e.reduce((a,l,c)=>(a[o.up(o.keys[c])]=r(e[c]),a),{})}if(typeof e=="object"){const o=i.breakpoints||jw;return Object.keys(e).reduce((a,l)=>{if(Object.keys(o.values||qv).indexOf(l)!==-1){const c=o.up(l);a[c]=r(e[l],l)}else{const c=l;a[c]=e[c]}return a},{})}return r(e)}function bM(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((i,s)=>{const o=t.up(s);return i[o]={},i},{}))||{}}function wM(t,e){return t.reduce((r,i)=>{const s=r[i];return(!s||Object.keys(s).length===0)&&delete r[i],r},e)}function SM(t,e){if(typeof t!="object")return{};const r={},i=Object.keys(e);return Array.isArray(t)?i.forEach((s,o)=>{o<t.length&&(r[s]=!0)}):i.forEach(s=>{t[s]!=null&&(r[s]=!0)}),r}function sf({values:t,breakpoints:e,base:r}){const i=r||SM(t,e),s=Object.keys(i);if(s.length===0)return t;let o;return s.reduce((a,l,c)=>(Array.isArray(t)?(a[l]=t[c]!=null?t[c]:t[o],o=c):typeof t=="object"?(a[l]=t[l]!=null?t[l]:t[o],o=l):a[l]=t,a),{})}function of(t,e,r=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&r){const i=`vars.${e}`.split(".").reduce((s,o)=>s&&s[o]?s[o]:null,t);if(i!=null)return i}return e.split(".").reduce((i,s)=>i&&i[s]!=null?i[s]:null,t)}function rh(t,e,r,i=r){let s;return typeof t=="function"?s=t(r):Array.isArray(t)?s=t[r]||i:s=of(t,r)||i,e&&(s=e(s,i,t)),s}function et(t){const{prop:e,cssProperty:r=t.prop,themeKey:i,transform:s}=t,o=a=>{if(a[e]==null)return null;const l=a[e],c=a.theme,d=of(c,i)||{};return sr(a,l,g=>{let v=rh(d,s,g);return g===v&&typeof g=="string"&&(v=rh(d,s,`${e}${g==="default"?"":he(g)}`,g)),r===!1?v:{[r]:v}})};return o.propTypes={},o.filterProps=[e],o}function af(...t){const e=t.reduce((i,s)=>(s.filterProps.forEach(o=>{i[o]=s}),i),{}),r=i=>Object.keys(i).reduce((s,o)=>e[o]?zl(s,e[o](i)):s,{});return r.propTypes={},r.filterProps=t.reduce((i,s)=>i.concat(s.filterProps),[]),r}function CM(t){const e={};return r=>(e[r]===void 0&&(e[r]=t(r)),e[r])}const xM={m:"margin",p:"padding"},_M={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},zw={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},EM=CM(t=>{if(t.length>2)if(zw[t])t=zw[t];else return[t];const[e,r]=t.split(""),i=xM[e],s=_M[r]||"";return Array.isArray(s)?s.map(o=>i+o):[i+s]}),Kv=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Yv=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Kv,...Yv];function Xu(t,e,r,i){var s;const o=(s=of(t,e,!1))!=null?s:r;return typeof o=="number"?a=>typeof a=="string"?a:o*a:Array.isArray(o)?a=>typeof a=="string"?a:o[a]:typeof o=="function"?o:()=>{}}function ZE(t){return Xu(t,"spacing",8)}function Qu(t,e){if(typeof e=="string"||e==null)return e;const r=Math.abs(e),i=t(r);return e>=0?i:typeof i=="number"?-i:`-${i}`}function kM(t,e){return r=>t.reduce((i,s)=>(i[s]=Qu(e,r),i),{})}function TM(t,e,r,i){if(e.indexOf(r)===-1)return null;const s=EM(r),o=kM(s,i),a=t[r];return sr(t,a,o)}function ek(t,e){const r=ZE(t.theme);return Object.keys(t).map(i=>TM(t,e,i,r)).reduce(zl,{})}function mt(t){return ek(t,Kv)}mt.propTypes={};mt.filterProps=Kv;function yt(t){return ek(t,Yv)}yt.propTypes={};yt.filterProps=Yv;function _r(t){return typeof t!="number"?t:`${t}px solid`}const IM=et({prop:"border",themeKey:"borders",transform:_r}),RM=et({prop:"borderTop",themeKey:"borders",transform:_r}),PM=et({prop:"borderRight",themeKey:"borders",transform:_r}),AM=et({prop:"borderBottom",themeKey:"borders",transform:_r}),OM=et({prop:"borderLeft",themeKey:"borders",transform:_r}),DM=et({prop:"borderColor",themeKey:"palette"}),MM=et({prop:"borderTopColor",themeKey:"palette"}),NM=et({prop:"borderRightColor",themeKey:"palette"}),$M=et({prop:"borderBottomColor",themeKey:"palette"}),LM=et({prop:"borderLeftColor",themeKey:"palette"}),lf=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=Xu(t.theme,"shape.borderRadius",4),r=i=>({borderRadius:Qu(e,i)});return sr(t,t.borderRadius,r)}return null};
79lf.propTypes={};lf.filterProps=["borderRadius"];af(IM,RM,PM,AM,OM,DM,MM,NM,$M,LM,lf);const uf=t=>{if(t.gap!==void 0&&t.gap!==null){const e=Xu(t.theme,"spacing",8),r=i=>({gap:Qu(e,i)});return sr(t,t.gap,r)}return null};uf.propTypes={};uf.filterProps=["gap"];const cf=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=Xu(t.theme,"spacing",8),r=i=>({columnGap:Qu(e,i)});return sr(t,t.columnGap,r)}return null};cf.propTypes={};cf.filterProps=["columnGap"];const df=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=Xu(t.theme,"spacing",8),r=i=>({rowGap:Qu(e,i)});return sr(t,t.rowGap,r)}return null};df.propTypes={};df.filterProps=["rowGap"];const FM=et({prop:"gridColumn"}),UM=et({prop:"gridRow"}),BM=et({prop:"gridAutoFlow"}),jM=et({prop:"gridAutoColumns"}),zM=et({prop:"gridAutoRows"}),VM=et({prop:"gridTemplateColumns"}),WM=et({prop:"gridTemplateRows"}),GM=et({prop:"gridTemplateAreas"}),HM=et({prop:"gridArea"});af(uf,cf,df,FM,UM,BM,jM,zM,VM,WM,GM,HM);function Ho(t,e){return e==="grey"?e:t}const qM=et({prop:"color",themeKey:"palette",transform:Ho}),KM=et({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ho}),YM=et({prop:"backgroundColor",themeKey:"palette",transform:Ho});af(qM,KM,YM);function Wn(t){return t<=1&&t!==0?`${t*100}%`:t}const XM=et({prop:"width",transform:Wn}),Xv=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=r=>{var i,s,o;return{maxWidth:((i=t.theme)==null||(s=i.breakpoints)==null||(o=s.values)==null?void 0:o[r])||qv[r]||Wn(r)}};return sr(t,t.maxWidth,e)}return null};Xv.filterProps=["maxWidth"];const QM=et({prop:"minWidth",transform:Wn}),JM=et({prop:"height",transform:Wn}),ZM=et({prop:"maxHeight",transform:Wn}),eN=et({prop:"minHeight",transform:Wn});et({prop:"size",cssProperty:"width",transform:Wn});et({prop:"size",cssProperty:"height",transform:Wn});const tN=et({prop:"boxSizing"});af(XM,Xv,QM,JM,ZM,eN,tN);const nN={border:{themeKey:"borders",transform:_r},borderTop:{themeKey:"borders",transform:_r},borderRight:{themeKey:"borders",transform:_r},borderBottom:{themeKey:"borders",transform:_r},borderLeft:{themeKey:"borders",transform:_r},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:lf},color:{themeKey:"palette",transform:Ho},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ho},backgroundColor:{themeKey:"palette",transform:Ho},p:{style:yt},pt:{style:yt},pr:{style:yt},pb:{style:yt},pl:{style:yt},px:{style:yt},py:{style:yt},padding:{style:yt},paddingTop:{style:yt},paddingRight:{style:yt},paddingBottom:{style:yt},paddingLeft:{style:yt},paddingX:{style:yt},paddingY:{style:yt},paddingInline:{style:yt},paddingInlineStart:{style:yt},paddingInlineEnd:{style:yt},paddingBlock:{style:yt},paddingBlockStart:{style:yt},paddingBlockEnd:{style:yt},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:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:uf},rowGap:{style:df},columnGap:{style:cf},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Wn},maxWidth:{style:Xv},minWidth:{transform:Wn},height:{transform:Wn},maxHeight:{transform:Wn},minHeight:{transform:Wn},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},hf=nN;function rN(...t){const e=t.reduce((i,s)=>i.concat(Object.keys(s)),[]),r=new Set(e);return t.every(i=>r.size===Object.keys(i).length)}function iN(t,e){return typeof t=="function"?t(e):t}function sN(){function t(r,i,s,o){const a={[r]:i,theme:s},l=o[r];if(!l)return{[r]:i};const{cssProperty:c=r,themeKey:d,transform:f,style:g}=l;if(i==null)return null;const v=of(s,d)||{};return g?g(a):sr(a,i,w=>{let k=rh(v,f,w);return w===k&&typeof w=="string"&&(k=rh(v,f,`${r}${w==="default"?"":he(w)}`,w)),c===!1?k:{[c]:k}})}function e(r){var i;const{sx:s,theme:o={}}=r||{};if(!s)return null;const a=(i=o.unstable_sxConfig)!=null?i:hf;function l(c){let d=c;if(typeof c=="function")d=c(o);else if(typeof c!="object")return c;if(!d)return null;const f=bM(o.breakpoints),g=Object.keys(f);let v=f;
79return Object.keys(d).forEach(_=>{const w=iN(d[_],o);if(w!=null)if(typeof w=="object")if(a[_])v=zl(v,t(_,w,o,a));else{const k=sr({theme:o},w,y=>({[_]:y}));rN(k,w)?v[_]=e({sx:w,theme:o}):v=zl(v,k)}else v=zl(v,t(_,w,o,a))}),wM(g,v)}return Array.isArray(s)?s.map(l):l(s)}return e}const tk=sN();tk.filterProps=["sx"];const ff=tk,oN=["sx"],aN=t=>{var e,r;const i={systemProps:{},otherProps:{}},s=(e=t==null||(r=t.theme)==null?void 0:r.unstable_sxConfig)!=null?e:hf;return Object.keys(t).forEach(o=>{s[o]?i.systemProps[o]=t[o]:i.otherProps[o]=t[o]}),i};function Qv(t){const{sx:e}=t,r=pe(t,oN),{systemProps:i,otherProps:s}=aN(r);let o;return Array.isArray(e)?o=[i,...e]:typeof e=="function"?o=(...a)=>{const l=e(...a);return Ss(l)?M({},i,l):i}:o=M({},i,e),M({},s,{sx:o})}function nk(t){var e,r,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(r=nk(t[e]))&&(i&&(i+=" "),i+=r);else for(e in t)t[e]&&(i&&(i+=" "),i+=e);return i}function Se(){for(var t,e,r=0,i="";r<arguments.length;)(t=arguments[r++])&&(e=nk(t))&&(i&&(i+=" "),i+=e);return i}const lN=["values","unit","step"],uN=t=>{const e=Object.keys(t).map(r=>({key:r,val:t[r]}))||[];return e.sort((r,i)=>r.val-i.val),e.reduce((r,i)=>M({},r,{[i.key]:i.val}),{})};function cN(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:i=5}=t,s=pe(t,lN),o=uN(e),a=Object.keys(o);function l(v){return`@media (min-width:${typeof e[v]=="number"?e[v]:v}${r})`}function c(v){return`@media (max-width:${(typeof e[v]=="number"?e[v]:v)-i/100}${r})`}function d(v,_){const w=a.indexOf(_);return`@media (min-width:${typeof e[v]=="number"?e[v]:v}${r}) and (max-width:${(w!==-1&&typeof e[a[w]]=="number"?e[a[w]]:_)-i/100}${r})`}function f(v){return a.indexOf(v)+1<a.length?d(v,a[a.indexOf(v)+1]):l(v)}function g(v){const _=a.indexOf(v);return _===0?l(a[1]):_===a.length-1?c(a[_]):d(v,a[a.indexOf(v)+1]).replace("@media","@media not all and")}return M({keys:a,values:o,up:l,down:c,between:d,only:f,not:g,unit:r},s)}const dN={borderRadius:4},hN=dN;function fN(t=8){if(t.mui)return t;const e=ZE({spacing:t}),r=(...i)=>(i.length===0?[1]:i).map(o=>{const a=e(o);return typeof a=="number"?`${a}px`:a}).join(" ");return r.mui=!0,r}const pN=["breakpoints","palette","spacing","shape"];function pf(t={},...e){const{breakpoints:r={},palette:i={},spacing:s,shape:o={}}=t,a=pe(t,pN),l=cN(r),c=fN(s);let d=Ln({breakpoints:l,direction:"ltr",components:{},palette:M({mode:"light"},i),spacing:c,shape:M({},hN,o)},a);return d=e.reduce((f,g)=>Ln(f,g),d),d.unstable_sxConfig=M({},hf,a==null?void 0:a.unstable_sxConfig),d.unstable_sx=function(g){return ff({sx:g,theme:this})},d}const gN=P.createContext(null),rk=gN;function Jv(){return P.useContext(rk)}const mN=typeof Symbol=="function"&&Symbol.for,ik=mN?Symbol.for("mui.nested"):"__THEME_NESTED__";function yN(t,e){return typeof e=="function"?e(t):M({},t,e)}function vN(t){const{children:e,theme:r}=t,i=Jv(),s=P.useMemo(()=>{const o=i===null?r:yN(i,r);return o!=null&&(o[ik]=i!==null),o},[r,i]);return $(rk.Provider,{value:s,children:e})}function bN(t){return Object.keys(t).length===0}function sk(t=null){const e=Jv();return!e||bN(e)?t:e}const wN=pf();function gf(t=wN){return sk(t)}const SN=["className","component"];function CN(t={}){const{defaultTheme:e,defaultClassName:r="MuiBox-root",generateClassName:i}=t,s=JE("div",{shouldForwardProp:a=>a!=="theme"&&a!=="sx"&&a!=="as"})(ff);return P.forwardRef(function(l,c){const d=gf(e),f=Qv(l),{className:g,component:v="div"}=f,_=pe(f,SN);return $(s,M({as:v,ref:c,className:Se(g,i?i(r):r),theme:d},_))})}const xN=["variant"];function Vw(t){return t.length===0}function ok(t){const{variant:e}=t,r=pe(t,xN);let i=e||"";return Object.keys(r).sort().forEach(s=>{s==="color"?i+=Vw(i)?t[s]:he(t[s]):i+=`${Vw(i)?s:he(s)}${he(t[s].toString())}`}),i}const _N=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],EN=["theme"],kN=["theme"];function sl(t){return Object.keys(t).length===0}function TN(t){return typeof t=="string"&&t.charCodeAt(0)>96}const IN=(t,e)=>e.components&&e.components[t]&&e.components[t].styleOverrides?e.components[t].styleOverrides:null,RN=(t,e)=>{let r=[];e&&e.components&&e.components[t]&&e.components[t].variants&&(r=e.components[t].variants);const i={};return r.forEach(s=>{const o=ok(s.props);i[o]=s.style}),i},PN=(t,e,r,i)=>{var s,o;const{ownerState:a={}}=t,l=[],c=r==null||(s=r.components)==null||(o=s[i])==null?void 0:o.variants;
79return c&&c.forEach(d=>{let f=!0;Object.keys(d.props).forEach(g=>{a[g]!==d.props[g]&&t[g]!==d.props[g]&&(f=!1)}),f&&l.push(e[ok(d.props)])}),l};function Vl(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const AN=pf();function ak(t={}){const{defaultTheme:e=AN,rootShouldForwardProp:r=Vl,slotShouldForwardProp:i=Vl}=t,s=o=>{const a=sl(o.theme)?e:o.theme;return ff(M({},o,{theme:a}))};return s.__mui_systemSx=!0,(o,a={})=>{vM(o,R=>R.filter(E=>!(E!=null&&E.__mui_systemSx)));const{name:l,slot:c,skipVariantsResolver:d,skipSx:f,overridesResolver:g}=a,v=pe(a,_N),_=d!==void 0?d:c&&c!=="Root"||!1,w=f||!1;let k,y=Vl;c==="Root"?y=r:c?y=i:TN(o)&&(y=void 0);const b=JE(o,M({shouldForwardProp:y,label:k},v)),x=(R,...E)=>{const C=E?E.map(B=>typeof B=="function"&&B.__emotion_real!==B?z=>{let{theme:V}=z,j=pe(z,EN);return B(M({theme:sl(V)?e:V},j))}:B):[];let D=R;l&&g&&C.push(B=>{const z=sl(B.theme)?e:B.theme,V=IN(l,z);if(V){const j={};return Object.entries(V).forEach(([N,G])=>{j[N]=typeof G=="function"?G(M({},B,{theme:z})):G}),g(B,j)}return null}),l&&!_&&C.push(B=>{const z=sl(B.theme)?e:B.theme;return PN(B,RN(l,z),z,l)}),w||C.push(s);const A=C.length-E.length;if(Array.isArray(R)&&A>0){const B=new Array(A).fill("");D=[...R,...B],D.raw=[...R.raw,...B]}else typeof R=="function"&&R.__emotion_real!==R&&(D=B=>{let{theme:z}=B,V=pe(B,kN);return R(M({theme:sl(z)?e:z},V))});return b(D,...C)};return b.withConfig&&(x.withConfig=b.withConfig),x}}const ON=ak(),DN=ON;function Zv(t){const{theme:e,name:r,props:i}=t;return!e||!e.components||!e.components[r]||!e.components[r].defaultProps?i:Lv(e.components[r].defaultProps,i)}function lk({props:t,name:e,defaultTheme:r}){const i=gf(r);return Zv({theme:i,name:e,props:t})}function e0(t,e=0,r=1){return Math.min(Math.max(e,t),r)}function MN(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let r=t.match(e);return r&&r[0].length===1&&(r=r.map(i=>i+i)),r?`rgb${r.length===4?"a":""}(${r.map((i,s)=>s<3?parseInt(i,16):Math.round(parseInt(i,16)/255*1e3)/1e3).join(", ")})`:""}function Gs(t){if(t.type)return t;if(t.charAt(0)==="#")return Gs(MN(t));const e=t.indexOf("("),r=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(r)===-1)throw new Error(Yi(9,t));let i=t.substring(e+1,t.length-1),s;if(r==="color"){if(i=i.split(" "),s=i.shift(),i.length===4&&i[3].charAt(0)==="/"&&(i[3]=i[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(s)===-1)throw new Error(Yi(10,s))}else i=i.split(",");return i=i.map(o=>parseFloat(o)),{type:r,values:i,colorSpace:s}}function mf(t){const{type:e,colorSpace:r}=t;let{values:i}=t;return e.indexOf("rgb")!==-1?i=i.map((s,o)=>o<3?parseInt(s,10):s):e.indexOf("hsl")!==-1&&(i[1]=`${i[1]}%`,i[2]=`${i[2]}%`),e.indexOf("color")!==-1?i=`${r} ${i.join(" ")}`:i=`${i.join(", ")}`,`${e}(${i})`}function NN(t){t=Gs(t);const{values:e}=t,r=e[0],i=e[1]/100,s=e[2]/100,o=i*Math.min(s,1-s),a=(d,f=(d+r/30)%12)=>s-o*Math.max(Math.min(f-3,9-f,1),-1);let l="rgb";const c=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return t.type==="hsla"&&(l+="a",c.push(e[3])),mf({type:l,values:c})}function Nm(t){t=Gs(t);let e=t.type==="hsl"||t.type==="hsla"?Gs(NN(t)).values:t.values;return e=e.map(r=>(t.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function $N(t,e){const r=Nm(t),i=Nm(e);return(Math.max(r,i)+.05)/(Math.min(r,i)+.05)}function fn(t,e){return t=Gs(t),e=e0(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,mf(t)}function ra(t,e){if(t=Gs(t),e=e0(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)t.values[r]*=1-e;return mf(t)}function ia(t,e){if(t=Gs(t),e=e0(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let r=0;r<3;r+=1)t.values[r]+=(255-t.values[r])*e;else if(t.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)t.values[r]+=(1-t.values[r])*e;return mf(t)}function LN(t,e=.15){return Nm(t)>.5?ra(t,e):ia(t,e)}const FN={};function UN(t){const e=gf();return $(Hv.Provider,{value:typeof e=="object"?e:FN,children:t.children})}function BN(t){const{children:e,theme:r}=t;return $(vN,{theme:r,children:$(UN,{children:e})})}const jN=["className","component","disableGutters","fixed","maxWidth","classes"],zN=pf(),VN=DN("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`maxWidth${he(String(r.maxWidth))}`],r.fixed&&e.fixed,r.disableGutters&&e.disableGutters]}}),WN=t=>lk({props:t,name:"MuiContainer",defaultTheme:zN}),GN=(t,e)=>{const r=c=>Ae(e,c),{classes:i,fixed:s,disableGutters:o,maxWidth:a}=t,l={root:["root",a&&`maxWidth${he(String(a))}`,s&&"fixed",o&&"disableGutters"]};return Me(l,r,i)};function HN(t={}){const{createStyledComponent:e=VN,useThemeProps:r=WN,componentName:i="MuiContainer"}=t,s=e(({theme:a,ownerState:l})=>M({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!l.disableGutters&&{paddingLeft:a.spacing(2),paddingRight:a.spacing(2),[a.breakpoints.up("sm")]:{paddingLeft:a.spacing(3),paddingRight:a.spacing(3)}}),({theme:a,ownerState:l})=>l.fixed&&Object.keys(a.breakpoints.values).reduce((c,d)=>{const f=d,g=a.breakpoints.values[f];return g!==0&&(c[a.breakpoints.up(f)]={maxWidth:`${g}${a.breakpoints.unit}`}),c},{}),({theme:a,ownerState:l})=>M({},l.maxWidth==="xs"&&{[a.breakpoints.up("xs")]:{maxWidth:Math.max(a.breakpoints.values.xs,444)}},l.maxWidth&&l.maxWidth!=="xs"&&{[a.breakpoints.up(l.maxWidth)]:{maxWidth:`${a.breakpoints.values[l.maxWidth]}${a.breakpoints.unit}`}}));return P.forwardRef(function(l,c){const d=r(l),{className:f,component:g="div",disableGutters:v=!1,fixed:_=!1,maxWidth:w="lg"}=d,k=pe(d,jN),y=M({},d,{component:g,disableGutters:v,fixed:_,maxWidth:w}),b=GN(y,i);return $(s,M({as:g,ownerState:y,className:Se(b.root,f),ref:c},k))})}function qN(t,e){return M({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}const KN={black:"#000",white:"#fff"},wu=KN,YN={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"},XN=YN,QN={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"},fo=QN,JN={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"},po=JN,ZN={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"},ol=ZN,e$={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"},go=e$,t$={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"},mo=t$,n$={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"},yo=n$,r$=["mode","contrastThreshold","tonalOffset"],Ww={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:wu.white,default:wu.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)",disabledBackgroun
79d:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Zp={text:{primary:wu.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:wu.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 Gw(t,e,r,i){const s=i.light||i,o=i.dark||i*1.5;t[e]||(t.hasOwnProperty(r)?t[e]=t[r]:e==="light"?t.light=ia(t.main,s):e==="dark"&&(t.dark=ra(t.main,o)))}function i$(t="light"){return t==="dark"?{main:go[200],light:go[50],dark:go[400]}:{main:go[700],light:go[400],dark:go[800]}}function s$(t="light"){return t==="dark"?{main:fo[200],light:fo[50],dark:fo[400]}:{main:fo[500],light:fo[300],dark:fo[700]}}function o$(t="light"){return t==="dark"?{main:po[500],light:po[300],dark:po[700]}:{main:po[700],light:po[400],dark:po[800]}}function a$(t="light"){return t==="dark"?{main:mo[400],light:mo[300],dark:mo[700]}:{main:mo[700],light:mo[500],dark:mo[900]}}function l$(t="light"){return t==="dark"?{main:yo[400],light:yo[300],dark:yo[700]}:{main:yo[800],light:yo[500],dark:yo[900]}}function u$(t="light"){return t==="dark"?{main:ol[400],light:ol[300],dark:ol[700]}:{main:"#ed6c02",light:ol[500],dark:ol[900]}}function c$(t){const{mode:e="light",contrastThreshold:r=3,tonalOffset:i=.2}=t,s=pe(t,r$),o=t.primary||i$(e),a=t.secondary||s$(e),l=t.error||o$(e),c=t.info||a$(e),d=t.success||l$(e),f=t.warning||u$(e);function g(k){return $N(k,Zp.text.primary)>=r?Zp.text.primary:Ww.text.primary}const v=({color:k,name:y,mainShade:b=500,lightShade:x=300,darkShade:R=700})=>{if(k=M({},k),!k.main&&k[b]&&(k.main=k[b]),!k.hasOwnProperty("main"))throw new Error(Yi(11,y?` (${y})`:"",b));if(typeof k.main!="string")throw new Error(Yi(12,y?` (${y})`:"",JSON.stringify(k.main)));return Gw(k,"light",x,i),Gw(k,"dark",R,i),k.contrastText||(k.contrastText=g(k.main)),k},_={dark:Zp,light:Ww};return Ln(M({common:M({},wu),mode:e,primary:v({color:o,name:"primary"}),secondary:v({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:v({color:l,name:"error"}),warning:v({color:f,name:"warning"}),info:v({color:c,name:"info"}),success:v({color:d,name:"success"}),grey:XN,contrastThreshold:r,getContrastText:g,augmentColor:v,tonalOffset:i},_[e]),s)}const d$=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function h$(t){return Math.round(t*1e5)/1e5}const Hw={textTransform:"uppercase"},qw='"Roboto", "Helvetica", "Arial", sans-serif';function f$(t,e){const r=typeof e=="function"?e(t):e,{fontFamily:i=qw,fontSize:s=14,fontWeightLight:o=300,fontWeightRegular:a=400,fontWeightMedium:l=500,fontWeightBold:c=700,htmlFontSize:d=16,allVariants:f,pxToRem:g}=r,v=pe(r,d$),_=s/14,w=g||(b=>`${b/d*_}rem`),k=(b,x,R,E,C)=>M({fontFamily:i,fontWeight:b,fontSize:w(x),lineHeight:R},i===qw?{letterSpacing:`${h$(E/x)}em`}:{},C,f),y={h1:k(o,96,1.167,-1.5),h2:k(o,60,1.2,-.5),h3:k(a,48,1.167,0),h4:k(a,34,1.235,.25),h5:k(a,24,1.334,0),h6:k(l,20,1.6,.15),subtitle1:k(a,16,1.75,.15),subtitle2:k(l,14,1.57,.1),body1:k(a,16,1.5,.15),body2:k(a,14,1.43,.15),button:k(l,14,1.75,.4,Hw),caption:k(a,12,1.66,.4),overline:k(a,12,2.66,1,Hw)};return Ln(M({htmlFontSize:d,pxToRem:w,fontFamily:i,fontSize:s,fontWeightLight:o,fontWeightRegular:a,fontWeightMedium:l,fontWeightBold:c},y),v,{clone:!1})}const p$=.2,g$=.14,m$=.12;function ht(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${p$})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${g$})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${m$})`].join(",")}const y$=["none",ht(0,2,1,-1,0,1,1,0,0,1,3,0),ht(0,3,1,-2,0,2,2,0,0,1,5,0),ht(0,3,3,-2,0,3,4,0,0,1,8,0),ht(0,2,4,-1,0,4,5,0,0,1,10,0),ht(0,3,5,-1,0,5,8,0,0,1,14,0),ht(0,3,5,-1,0,6,10,0,0,1,18,0),ht(0,4,5,-2,0,7,10,1,0,2,16,1),ht(0,5,5,-3,0,8,10,1,0,3,14,2),ht(0,5,6,-3,0,9,12,1,0,3,16,2),ht(0,6,6,-3,0,10,14,1,0,4,18,3),ht(0,6,7,-4,0,11,15,1,0,4,20,3),ht(0,7,8,-4,0,12,17,2,0,5,22,4),ht(0,7,8,-4,0,13,19,2,0,5,24,4),ht(0,7,9,-4,0,14,21,2,0,5,26,4),ht(0,8,9,-5,0,15,22,2,0,6,28,5),ht(0,8,10,-5,0,16,24,2,0,6,30,5),ht(0,8,11,-5,0,17,26,2,0,6,32,5),ht(0,9,11,-5,0,18,28,2,0,7,34,6),ht(0,9,12,-6,0,19,29,2,0,7,36,6
79),ht(0,10,13,-6,0,20,31,3,0,8,38,7),ht(0,10,13,-6,0,21,33,3,0,8,40,7),ht(0,10,14,-6,0,22,35,3,0,8,42,7),ht(0,11,14,-7,0,23,36,3,0,9,44,8),ht(0,11,15,-7,0,24,38,3,0,9,46,8)],v$=y$,b$=["duration","easing","delay"],w$={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)"},S$={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Kw(t){return`${Math.round(t)}ms`}function C$(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function x$(t){const e=M({},w$,t.easing),r=M({},S$,t.duration);return M({getAutoHeightDuration:C$,create:(s=["all"],o={})=>{const{duration:a=r.standard,easing:l=e.easeInOut,delay:c=0}=o;return pe(o,b$),(Array.isArray(s)?s:[s]).map(d=>`${d} ${typeof a=="string"?a:Kw(a)} ${l} ${typeof c=="string"?c:Kw(c)}`).join(",")}},t,{easing:e,duration:r})}const _$={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},E$=_$,k$=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function t0(t={},...e){const{mixins:r={},palette:i={},transitions:s={},typography:o={}}=t,a=pe(t,k$);if(t.vars)throw new Error(Yi(18));const l=c$(i),c=pf(t);let d=Ln(c,{mixins:qN(c.breakpoints,r),palette:l,shadows:v$.slice(),typography:f$(l,o),transitions:x$(s),zIndex:M({},E$)});return d=Ln(d,a),d=e.reduce((f,g)=>Ln(f,g),d),d.unstable_sxConfig=M({},hf,a==null?void 0:a.unstable_sxConfig),d.unstable_sx=function(g){return ff({sx:g,theme:this})},d}const T$=t0(),yf=T$;function lr(){return gf(yf)}function Ne({props:t,name:e}){return lk({props:t,name:e,defaultTheme:yf})}const Br=t=>Vl(t)&&t!=="classes",I$=Vl,R$=ak({defaultTheme:yf,rootShouldForwardProp:Br}),fe=R$,P$=t=>{let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,(e/100).toFixed(2)},Yw=P$;function uk(t){return $(yM,M({},t,{defaultTheme:yf}))}const A$=(t,e)=>M({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},e&&!t.vars&&{colorScheme:t.palette.mode}),O$=t=>M({color:(t.vars||t).palette.text.primary},t.typography.body1,{backgroundColor:(t.vars||t).palette.background.default,"@media print":{backgroundColor:(t.vars||t).palette.common.white}}),D$=(t,e=!1)=>{var r,i;const s={};e&&t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([l,c])=>{var d;s[t.getColorSchemeSelector(l).replace(/\s*&/,"")]={colorScheme:(d=c.palette)==null?void 0:d.mode}});let o=M({html:A$(t,e),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:M({margin:0},O$(t),{"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}})},s);const a=(r=t.components)==null||(i=r.MuiCssBaseline)==null?void 0:i.styleOverrides;return a&&(o=[o,a]),o};function M$(t){const e=Ne({props:t,name:"MuiCssBaseline"}),{children:r,enableColorScheme:i=!1}=e;return be(P.Fragment,{children:[$(uk,{styles:s=>D$(s,i)}),r]})}/** 80 * @license 81 * Copyright 2017 Google LLC 82 * 83 * Licensed under the Apache License, Version 2.0 (the "License"); 84 * you may not use this file except in compliance with the License. 85 * You may obtain a copy of the License at 86 * 87 * http://www.apache.org/licenses/LICENSE-2.0 88 * 89 * Unless required by applicable law or agreed to in writing, software 90 * distributed under the License is distributed on an "AS IS" BASIS, 91 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 92 * See the License for the specific language governing permissions and 93 * limitations under the License. 94 *//** 95 * @license 96 * Copyright 2017 Google LLC 97 * 98 * Licensed under the Apache License, Version 2.0 (the "License"); 99 * you may not use this file except in compliance with the License. 100 * You may obtain a copy of the License at 101 * 102 * http://www.apache.org/licenses/LICENSE-2.0 103 * 104 * Unless required by applicable law or agreed to in writing, software 105 * distributed under the License is distributed on an "AS IS" BASIS, 106 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 107 * See the License for the specific language governing permissions and 108 * limitations under the License. 109 */const ck=function(t){const e=[];let r=0;for(let i=0;i<t.length;i++){let s=t.charCodeAt(i);s<128?e[r++]=s:s<2048?(e[r++]=s>>6|192,e[r++]=s&63|128):(s&64512)===55296&&i+1<t.length&&(t.charCodeAt(i+1)&64512)===56320?(s=65536+((s&1023)<<10)+(t.charCodeAt(++i)&1023),e[r++]=s>>18|240,e[r++]=s>>12&63|128,e[r++]=s>>6&63|128,e[r++]=s&63|128):(e[r++]=s>>12|224,e[r++]=s>>6&63|128,e[r++]=s&63|128)}return e},N$=function(t){const e=[];let r=0,i=0;for(;r<t.length;){const s=t[r++];if(s<128)e[i++]=String.fromCharCode(s);else if(s>191&&s<224){const o=t[r++];e[i++]=String.fromCharCode((s&31)<<6|o&63)}else if(s>239&&s<365){const o=t[r++],a=t[r++],l=t[r++],c=((s&7)<<18|(o&63)<<12|(a&63)<<6|l&63)-65536;e[i++]=String.fromCharCode(55296+(c>>10)),e[i++]=String.fromCharCode(56320+(c&1023))}else{const o=t[r++],a=t[r++];e[i++]=String.fromCharCode((s&15)<<12|(o&63)<<6|a&63)}}return e.join("")},dk={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(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const r=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,i=[];for(let s=0;s<t.length;s+=3){const o=t[s],a=s+1<t.length,l=a?t[s+1]:0,c=s+2<t.length,d=c?t[s+2]:0,f=o>>2,g=(o&3)<<4|l>>4;let v=(l&15)<<2|d>>6,_=d&63;c||(_=64,a||(v=64)),i.push(r[f],r[g],r[v],r[_])}return i.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(ck(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):N$(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const r=e?this.charToByteMapWebSafe_:this.charToByteMap_,i=[];for(let s=0;s<t.length;){const o=r[t.charAt(s++)],l=s<t.length?r[t.charAt(s)]:0;++s;const d=s<t.length?r[t.charAt(s)]:64;++s;const g=s<t.length?r[t.charAt(s)]:64;if(++s,o==null||l==null||d==null||g==null)throw Error();const v=o<<2|l>>4;if(i.push(v),d!==64){const _=l<<4&240|d>>2;if(i.push(_),g!==64){const w=d<<6&192|g;i.push(w)}}}return i},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},$$=function(t){const e=ck(t);return dk.encodeByteArray(e,!0)},hk=function(t){return $$(t).replace(/\./g,"")},L$=function(t){try{return dk.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/** 110 * @license 111 * Copyright 2017 Google LLC 112 * 113 * Licensed under the Apache License, Version 2.0 (the "License");
114 * you may not use this file except in compliance with the License. 115 * You may obtain a copy of the License at 116 * 117 * http://www.apache.org/licenses/LICENSE-2.0 118 * 119 * Unless required by applicable law or agreed to in writing, software 120 * distributed under the License is distributed on an "AS IS" BASIS, 121 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 122 * See the License for the specific language governing permissions and 123 * limitations under the License. 124 */class F${constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,r)=>{this.resolve=e,this.reject=r})}wrapCallback(e){return(r,i)=>{r?this.reject(r):this.resolve(i),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(r):e(r,i))}}}/** 125 * @license 126 * Copyright 2017 Google LLC 127 * 128 * Licensed under the Apache License, Version 2.0 (the "License"); 129 * you may not use this file except in compliance with the License. 130 * You may obtain a copy of the License at 131 * 132 * http://www.apache.org/licenses/LICENSE-2.0 133 * 134 * Unless required by applicable law or agreed to in writing, software 135 * distributed under the License is distributed on an "AS IS" BASIS, 136 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 137 * See the License for the specific language governing permissions and 138 * limitations under the License. 139 */function vn(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function U$(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(vn())}function B$(){const t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function j$(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function z$(){const t=vn();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function V$(){return typeof indexedDB=="object"}function W$(){return new Promise((t,e)=>{try{let r=!0;const i="validate-browser-context-for-indexeddb-analytics-module",s=self.indexedDB.open(i);s.onsuccess=()=>{s.result.close(),r||self.indexedDB.deleteDatabase(i),t(!0)},s.onupgradeneeded=()=>{r=!1},s.onerror=()=>{var o;e(((o=s.error)===null||o===void 0?void 0:o.message)||"")}}catch(r){e(r)}})}/** 140 * @license 141 * Copyright 2017 Google LLC 142 * 143 * Licensed under the Apache License, Version 2.0 (the "License"); 144 * you may not use this file except in compliance with the License. 145 * You may obtain a copy of the License at 146 * 147 * http://www.apache.org/licenses/LICENSE-2.0 148 * 149 * Unless required by applicable law or agreed to in writing, software 150 * distributed under the License is distributed on an "AS IS" BASIS, 151 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 152 * See the License for the specific language governing permissions and 153 * limitations under the License. 154 */const G$="FirebaseError";class jr extends Error{constructor(e,r,i){super(r),this.code=e,this.customData=i,this.name=G$,Object.setPrototypeOf(this,jr.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Ju.prototype.create)}}class Ju{constructor(e,r,i){this.service=e,this.serviceName=r,this.errors=i}create(e,...r){const i=r[0]||{},s=`${this.service}/${e}`,o=this.errors[e],a=o?H$(o,i):"Error",l=`${this.serviceName}: ${a} (${s}).`;return new jr(s,l,i)}}function H$(t,e){return t.replace(q$,(r,i)=>{const s=e[i];return s!=null?String(s):`<${i}?>`})}const q$=/\{\$([^}]+)}/g;function K$(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function ih(t,e){if(t===e)return!0;const r=Object.keys(t),i=Object.keys(e);for(const s of r){if(!i.includes(s))return!1;const o=t[s],a=e[s];if(Xw(o)&&Xw(a)){if(!ih(o,a))return!1}else if(o!==a)return!1}for(const s of i)if(!r.includes(s))return!1;return!0}function Xw(t){return t!==null&&typeof t=="object"}/** 155 * @license 156 * Copyright 2017 Google LLC 157 * 158 * Licensed under the Apache License, Version 2.0 (the "License"); 159 * you may not use this file except in compliance with the License. 160 * You may obtain a copy of the License at 161 * 162 * http://www.apache.org/licenses/LICENSE-2.0 163 * 164 * Unless required by applicable law or agreed to in writing, softw
164are 165 * distributed under the License is distributed on an "AS IS" BASIS, 166 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 167 * See the License for the specific language governing permissions and 168 * limitations under the License. 169 */function Zu(t){const e=[];for(const[r,i]of Object.entries(t))Array.isArray(i)?i.forEach(s=>{e.push(encodeURIComponent(r)+"="+encodeURIComponent(s))}):e.push(encodeURIComponent(r)+"="+encodeURIComponent(i));return e.length?"&"+e.join("&"):""}function Sl(t){const e={};return t.replace(/^\?/,"").split("&").forEach(i=>{if(i){const[s,o]=i.split("=");e[decodeURIComponent(s)]=decodeURIComponent(o)}}),e}function Cl(t){const e=t.indexOf("?");if(!e)return"";const r=t.indexOf("#",e);return t.substring(e,r>0?r:void 0)}function Y$(t,e){const r=new X$(t,e);return r.subscribe.bind(r)}class X${constructor(e,r){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=r,this.task.then(()=>{e(this)}).catch(i=>{this.error(i)})}next(e){this.forEachObserver(r=>{r.next(e)})}error(e){this.forEachObserver(r=>{r.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,r,i){let s;if(e===void 0&&r===void 0&&i===void 0)throw new Error("Missing Observer.");Q$(e,["next","error","complete"])?s=e:s={next:e,error:r,complete:i},s.next===void 0&&(s.next=eg),s.error===void 0&&(s.error=eg),s.complete===void 0&&(s.complete=eg);const o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?s.error(this.finalError):s.complete()}catch{}}),this.observers.push(s),o}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let r=0;r<this.observers.length;r++)this.sendOne(r,e)}sendOne(e,r){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{r(this.observers[e])}catch(i){typeof console<"u"&&console.error&&console.error(i)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function Q$(t,e){if(typeof t!="object"||t===null)return!1;for(const r of e)if(r in t&&typeof t[r]=="function")return!0;return!1}function eg(){}/** 170 * @license 171 * Copyright 2021 Google LLC 172 * 173 * Licensed under the Apache License, Version 2.0 (the "License"); 174 * you may not use this file except in compliance with the License. 175 * You may obtain a copy of the License at 176 * 177 * http://www.apache.org/licenses/LICENSE-2.0 178 * 179 * Unless required by applicable law or agreed to in writing, software 180 * distributed under the License is distributed on an "AS IS" BASIS, 181 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 182 * See the License for the specific language governing permissions and 183 * limitations under the License. 184 */function ot(t){return t&&t._delegate?t._delegate:t}class Qi{constructor(e,r,i){this.name=e,this.instanceFactory=r,this.type=i,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/** 185 * @license 186 * Copyright 2019 Google LLC 187 * 188 * Licensed under the Apache License, Version 2.0 (the "License"); 189 * you may not use this file except in compliance with the License. 190 * You may obtain a copy of the License at 191 * 192 * http://www.apache.org/licenses/LICENSE-2.0 193 * 194 * Unless required by applicable law or agreed to in writing, software 195 * distributed under the License is distributed on an "AS IS" BASIS, 196 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 197 * See the License for the specific language governing permissions and 198 * limitations under the License. 199 */const vs="[DEFAULT]";/** 200 * @license 201 * Copyright 2019 Google LLC 202 * 203 * Licensed under the Apache License, Version 2.0 (the "License");
204 * you may not use this file except in compliance with the License. 205 * You may obtain a copy of the License at 206 * 207 * http://www.apache.org/licenses/LICENSE-2.0 208 * 209 * Unless required by applicable law or agreed to in writing, software 210 * distributed under the License is distributed on an "AS IS" BASIS, 211 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 212 * See the License for the specific language governing permissions and 213 * limitations under the License. 214 */class J${constructor(e,r){this.name=e,this.container=r,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const r=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(r)){const i=new F$;if(this.instancesDeferred.set(r,i),this.isInitialized(r)||this.shouldAutoInitialize())try{const s=this.getOrInitializeService({instanceIdentifier:r});s&&i.resolve(s)}catch{}}return this.instancesDeferred.get(r).promise}getImmediate(e){var r;const i=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),s=(r=e==null?void 0:e.optional)!==null&&r!==void 0?r:!1;if(this.isInitialized(i)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:i})}catch(o){if(s)return null;throw o}else{if(s)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(eL(e))try{this.getOrInitializeService({instanceIdentifier:vs})}catch{}for(const[r,i]of this.instancesDeferred.entries()){const s=this.normalizeInstanceIdentifier(r);try{const o=this.getOrInitializeService({instanceIdentifier:s});i.resolve(o)}catch{}}}}clearInstance(e=vs){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(r=>"INTERNAL"in r).map(r=>r.INTERNAL.delete()),...e.filter(r=>"_delete"in r).map(r=>r._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=vs){return this.instances.has(e)}getOptions(e=vs){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:r={}}=e,i=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(i))throw Error(`${this.name}(${i}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const s=this.getOrInitializeService({instanceIdentifier:i,options:r});for(const[o,a]of this.instancesDeferred.entries()){const l=this.normalizeInstanceIdentifier(o);i===l&&a.resolve(s)}return s}onInit(e,r){var i;const s=this.normalizeInstanceIdentifier(r),o=(i=this.onInitCallbacks.get(s))!==null&&i!==void 0?i:new Set;o.add(e),this.onInitCallbacks.set(s,o);const a=this.instances.get(s);return a&&e(a,s),()=>{o.delete(e)}}invokeOnInitCallbacks(e,r){const i=this.onInitCallbacks.get(r);if(i)for(const s of i)try{s(e,r)}catch{}}getOrInitializeService({instanceIdentifier:e,options:r={}}){let i=this.instances.get(e);if(!i&&this.component&&(i=this.component.instanceFactory(this.container,{instanceIdentifier:Z$(e),options:r}),this.instances.set(e,i),this.instancesOptions.set(e,r),this.invokeOnInitCallbacks(i,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,i)}catch{}return i||null}normalizeInstanceIdentifier(e=vs){return this.component?this.component.multipleInstances?e:vs:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function Z$(t){return t===vs?void 0:t}function eL(t){return t.instantiationMode==="EAGER"}/** 215 * @license 216 * Copyright 2019 Google LLC 217 * 218 * Licensed under the Apache License, Version 2.0 (the "License"); 219 * you may not use this file except in compliance with the License. 220 * You may obtain a copy of the License at 221 * 222 * http://www.apache.org/licenses/LICENSE-2.0 223 * 224 * Unless required by applicable law or agreed to in writing, softw
224are 225 * distributed under the License is distributed on an "AS IS" BASIS, 226 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 227 * See the License for the specific language governing permissions and 228 * limitations under the License. 229 */class tL{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const r=this.getProvider(e.name);if(r.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);r.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const r=new J$(e,this);return this.providers.set(e,r),r}getProviders(){return Array.from(this.providers.values())}}/** 230 * @license 231 * Copyright 2017 Google LLC 232 * 233 * Licensed under the Apache License, Version 2.0 (the "License"); 234 * you may not use this file except in compliance with the License. 235 * You may obtain a copy of the License at 236 * 237 * http://www.apache.org/licenses/LICENSE-2.0 238 * 239 * Unless required by applicable law or agreed to in writing, software 240 * distributed under the License is distributed on an "AS IS" BASIS, 241 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 242 * See the License for the specific language governing permissions and 243 * limitations under the License. 244 */var Qe;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(Qe||(Qe={}));const nL={debug:Qe.DEBUG,verbose:Qe.VERBOSE,info:Qe.INFO,warn:Qe.WARN,error:Qe.ERROR,silent:Qe.SILENT},rL=Qe.INFO,iL={[Qe.DEBUG]:"log",[Qe.VERBOSE]:"log",[Qe.INFO]:"info",[Qe.WARN]:"warn",[Qe.ERROR]:"error"},sL=(t,e,...r)=>{if(e<t.logLevel)return;const i=new Date().toISOString(),s=iL[e];if(s)console[s](`[${i}] ${t.name}:`,...r);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class n0{constructor(e){this.name=e,this._logLevel=rL,this._logHandler=sL,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in Qe))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?nL[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,Qe.DEBUG,...e),this._logHandler(this,Qe.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,Qe.VERBOSE,...e),this._logHandler(this,Qe.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,Qe.INFO,...e),this._logHandler(this,Qe.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,Qe.WARN,...e),this._logHandler(this,Qe.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,Qe.ERROR,...e),this._logHandler(this,Qe.ERROR,...e)}}const oL=(t,e)=>e.some(r=>t instanceof r);let Qw,Jw;function aL(){return Qw||(Qw=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function lL(){return Jw||(Jw=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const fk=new WeakMap,$m=new WeakMap,pk=new WeakMap,tg=new WeakMap,r0=new WeakMap;function uL(t){const e=new Promise((r,i)=>{const s=()=>{t.removeEventListener("success",o),t.removeEventListener("error",a)},o=()=>{r(ji(t.result)),s()},a=()=>{i(t.error),s()};t.addEventListener("success",o),t.addEventListener("error",a)});return e.then(r=>{r instanceof IDBCursor&&fk.set(r,t)}).catch(()=>{}),r0.set(e,t),e}function cL(t){if($m.has(t))return;const e=new Promise((r,i)=>{const s=()=>{t.removeEventListener("complete",o),t.removeEventListener("error",a),t.removeEventListener("abort",a)},o=()=>{r(),s()},a=()=>{i(t.error||new DOMException("AbortError","AbortError")),s()};t.addEventListener("complete",o),t.addEventListener("error",a),t.addEventListener("abort",a)});$m.set(t,e)}let Lm={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return $m.get(t);if(e==="objectStoreNames")return t.objectStoreNames||pk.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return ji(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function dL(t){Lm=t(Lm)}function hL(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const i=t.call(ng(this),e,...r);return pk.set(i,e.sort?e.sort():[e]),ji(i)}:lL().includes(t)?function(...e){return t.apply(ng(this),e),ji(fk.get(this))}:function(...e){return ji(t.apply(ng(this),e))}}function fL(t){return typeof t=="function"?hL(t):(t instanceof IDBTransaction&&cL(t),oL(t,aL())?new Proxy(t,Lm):t)}function ji(t){if(t instanceof IDBRequest)return uL(t);if(tg.has(t))return tg.get(t);const e=fL(t);return e!==t&&(tg.set(t,e),r0.set(e,t)),e}const ng=t=>r0.get(t);function pL(t,e,{blocked:r,upgrade:i,blocking:s,terminated:o}={}){const a=indexedDB.open(t,e),l=ji(a);return i&&a.addEventListener("upgradeneeded",c=>{i(ji(a.result),c.oldVersion,c.newVersion,ji(a.transaction))}),r&&a.addEventListener("blocked",()=>r()),l.then(c=>{o&&c.addEventListener("close",()=>o()),s&&c.addEventListener("versionchange",()=>s())}).catch(()=>{}),l}const gL=["get","getKey","getAll","getAllKeys","count"],mL=["put","add","delete","clear"],rg=new Map;function Zw(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(rg.get(e))return rg.get(e);const r=e.replace(/FromIndex$/,""),i=e!==r,s=mL.includes(r);if(!(r in(i?IDBIndex:IDBObjectStore).prototype)||!(s||gL.includes(r)))return;const o=async function(a,...l){const c=this.transaction(a,s?"readwrite":"readonly");let d=c.store;
244return i&&(d=d.index(l.shift())),(await Promise.all([d[r](...l),s&&c.done]))[0]};return rg.set(e,o),o}dL(t=>({...t,get:(e,r,i)=>Zw(e,r)||t.get(e,r,i),has:(e,r)=>!!Zw(e,r)||t.has(e,r)}));/** 245 * @license 246 * Copyright 2019 Google LLC 247 * 248 * Licensed under the Apache License, Version 2.0 (the "License"); 249 * you may not use this file except in compliance with the License. 250 * You may obtain a copy of the License at 251 * 252 * http://www.apache.org/licenses/LICENSE-2.0 253 * 254 * Unless required by applicable law or agreed to in writing, software 255 * distributed under the License is distributed on an "AS IS" BASIS, 256 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 257 * See the License for the specific language governing permissions and 258 * limitations under the License. 259 */class yL{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(r=>{if(vL(r)){const i=r.getImmediate();return`${i.library}/${i.version}`}else return null}).filter(r=>r).join(" ")}}function vL(t){const e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}const Fm="@firebase/app",eS="0.7.33";/** 260 * @license 261 * Copyright 2019 Google LLC 262 * 263 * Licensed under the Apache License, Version 2.0 (the "License"); 264 * you may not use this file except in compliance with the License. 265 * You may obtain a copy of the License at 266 * 267 * http://www.apache.org/licenses/LICENSE-2.0 268 * 269 * Unless required by applicable law or agreed to in writing, software 270 * distributed under the License is distributed on an "AS IS" BASIS, 271 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 272 * See the License for the specific language governing permissions and 273 * limitations under the License. 274 */const Hs=new n0("@firebase/app"),bL="@firebase/app-compat",wL="@firebase/analytics-compat",SL="@firebase/analytics",CL="@firebase/app-check-compat",xL="@firebase/app-check",_L="@firebase/auth",EL="@firebase/auth-compat",kL="@firebase/database",TL="@firebase/database-compat",IL="@firebase/functions",RL="@firebase/functions-compat",PL="@firebase/installations",AL="@firebase/installations-compat",OL="@firebase/messaging",DL="@firebase/messaging-compat",ML="@firebase/performance",NL="@firebase/performance-compat",$L="@firebase/remote-config",LL="@firebase/remote-config-compat",FL="@firebase/storage",UL="@firebase/storage-compat",BL="@firebase/firestore",jL="@firebase/firestore-compat",zL="firebase",VL="9.10.0";/** 275 * @license 276 * Copyright 2019 Google LLC 277 * 278 * Licensed under the Apache License, Version 2.0 (the "License"); 279 * you may not use this file except in compliance with the License. 280 * You may obtain a copy of the License at 281 * 282 * http://www.apache.org/licenses/LICENSE-2.0 283 * 284 * Unless required by applicable law or agreed to in writing, software 285 * distributed under the License is distributed on an "AS IS" BASIS, 286 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 287 * See the License for the specific language governing permissions and 288 * limitations under the License. 289 */const gk="[DEFAULT]",WL={[Fm]:"fire-core",[bL]:"fire-core-compat",[SL]:"fire-analytics",[wL]:"fire-analytics-compat",[xL]:"fire-app-check",[CL]:"fire-app-check-compat",[_L]:"fire-auth",[EL]:"fire-auth-compat",[kL]:"fire-rtdb",[TL]:"fire-rtdb-compat",[IL]:"fire-fn",[RL]:"fire-fn-compat",[PL]:"fire-iid",[AL]:"fire-iid-compat",[OL]:"fire-fcm",[DL]:"fire-fcm-compat",[ML]:"fire-perf",[NL]:"fire-perf-compat",[$L]:"fire-rc",[LL]:"fire-rc-compat",[FL]:"fire-gcs",[UL]:"fire-gcs-compat",[BL]:"fire-fst",[jL]:"fire-fst-compat","fire-js":"fire-js",[zL]:"fire-js-all"};/** 290 * @license 291 * Copyright 2019 Google LLC 292 * 293 * Licensed under the Apache License, Version 2.0 (the "License"); 294 * you may not use this file except in compliance with the License. 295 * You may obtain a copy of the License at 296 * 297 * http://www.apache.org/licenses/LICENSE-2.0 298 * 299 * Unless required by applicable law or agreed to in writing, software 300 * distributed under the License is distributed on an "AS IS" BASIS, 301 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 302 * See the License for the specific language governing permissions and 303 * limitations under the License. 304 */const sh=new Map,Um=new Map;function GL(t,e){try{t.container.addComponent(e)}catch(r){Hs.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,r)}}function qs(t){const e=t.name;if(Um.has(e))return Hs.debug(`There were multiple attempts to register component ${e}.`),!1;Um.set(e,t);for(const r of sh.values())GL(r,t);return!0}function vf(t,e){const r=t.container.getProvider("heartbeat").getImmediate({optional:!0});return r&&r.triggerHeartbeat(),t.container.getProvider(e)}/** 305 * @license 306 * Copyright 2019 Google LLC 307 * 308 * Licensed under the Apache License, Version 2.0 (the "License");
309 * you may not use this file except in compliance with the License. 310 * You may obtain a copy of the License at 311 * 312 * http://www.apache.org/licenses/LICENSE-2.0 313 * 314 * Unless required by applicable law or agreed to in writing, software 315 * distributed under the License is distributed on an "AS IS" BASIS, 316 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 317 * See the License for the specific language governing permissions and 318 * limitations under the License. 319 */const HL={["no-app"]:"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",["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",["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}."},Ks=new Ju("app","Firebase",HL);/** 320 * @license 321 * Copyright 2019 Google LLC 322 * 323 * Licensed under the Apache License, Version 2.0 (the "License"); 324 * you may not use this file except in compliance with the License. 325 * You may obtain a copy of the License at 326 * 327 * http://www.apache.org/licenses/LICENSE-2.0 328 * 329 * Unless required by applicable law or agreed to in writing, software 330 * distributed under the License is distributed on an "AS IS" BASIS, 331 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 332 * See the License for the specific language governing permissions and 333 * limitations under the License. 334 */class qL{constructor(e,r,i){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},r),this._name=r.name,this._automaticDataCollectionEnabled=r.automaticDataCollectionEnabled,this._container=i,this.container.addComponent(new Qi("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw Ks.create("app-deleted",{appName:this._name})}}/** 335 * @license 336 * Copyright 2019 Google LLC 337 * 338 * Licensed under the Apache License, Version 2.0 (the "License"); 339 * you may not use this file except in compliance with the License. 340 * You may obtain a copy of the License at 341 * 342 * http://www.apache.org/licenses/LICENSE-2.0 343 * 344 * Unless required by applicable law or agreed to in writing, software 345 * distributed under the License is distributed on an "AS IS" BASIS, 346 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 347 * See the License for the specific language governing permissions and 348 * limitations under the License. 349 */const Ea=VL;function KL(t,e={}){typeof e!="object"&&(e={name:e});const r=Object.assign({name:gk,automaticDataCollectionEnabled:!1},e),i=r.name;if(typeof i!="string"||!i)throw Ks.create("bad-app-name",{appName:String(i)});const s=sh.get(i);if(s){if(ih(t,s.options)&&ih(r,s.config))return s;throw Ks.create("duplicate-app",{appName:i})}const o=new tL(i);for(const l of Um.values())o.addComponent(l);const a=new qL(t,r,o);return sh.set(i,a),a}function i0(t=gk){const e=sh.get(t);if(!e)throw Ks.create("no-app",{appName:t});return e}function Mr(t,e,r){var i;let s=(i=WL[t])!==null&&i!==void 0?i:t;r&&(s+=`-${r}`);const o=s.match(/\s|\//),a=e.match(/\s|\//);if(o||a){const l=[`Unable to register library "${s}" with version "${e}":`];o&&l.push(`library name "${s}" contains illegal characters (whitespace or "/")`),o&&a&&l.push("and"),a&&l.push(`version name "${e}" contains illegal characters (whitespace or "/")`),Hs.warn(l.join(" "));return}qs(new Qi(`${s}-version`,()=>({library:s,version:e}),"VERSION"))}/** 350 * @license 351 * Copyright 2021 Google LLC 352 * 353 * Licensed under the Apache License, Version 2.0 (the "License");
354 * you may not use this file except in compliance with the License. 355 * You may obtain a copy of the License at 356 * 357 * http://www.apache.org/licenses/LICENSE-2.0 358 * 359 * Unless required by applicable law or agreed to in writing, software 360 * distributed under the License is distributed on an "AS IS" BASIS, 361 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 362 * See the License for the specific language governing permissions and 363 * limitations under the License. 364 */const YL="firebase-heartbeat-database",XL=1,Su="firebase-heartbeat-store";let ig=null;function mk(){return ig||(ig=pL(YL,XL,{upgrade:(t,e)=>{switch(e){case 0:t.createObjectStore(Su)}}}).catch(t=>{throw Ks.create("idb-open",{originalErrorMessage:t.message})})),ig}async function QL(t){var e;try{return(await mk()).transaction(Su).objectStore(Su).get(yk(t))}catch(r){if(r instanceof jr)Hs.warn(r.message);else{const i=Ks.create("idb-get",{originalErrorMessage:(e=r)===null||e===void 0?void 0:e.message});Hs.warn(i.message)}}}async function tS(t,e){var r;try{const s=(await mk()).transaction(Su,"readwrite");return await s.objectStore(Su).put(e,yk(t)),s.done}catch(i){if(i instanceof jr)Hs.warn(i.message);else{const s=Ks.create("idb-set",{originalErrorMessage:(r=i)===null||r===void 0?void 0:r.message});Hs.warn(s.message)}}}function yk(t){return`${t.name}!${t.options.appId}`}/** 365 * @license 366 * Copyright 2021 Google LLC 367 * 368 * Licensed under the Apache License, Version 2.0 (the "License"); 369 * you may not use this file except in compliance with the License. 370 * You may obtain a copy of the License at 371 * 372 * http://www.apache.org/licenses/LICENSE-2.0 373 * 374 * Unless required by applicable law or agreed to in writing, software 375 * distributed under the License is distributed on an "AS IS" BASIS, 376 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 377 * See the License for the specific language governing permissions and 378 * limitations under the License. 379 */const JL=1024,ZL=30*24*60*60*1e3;class e5{constructor(e){this.container=e,this._heartbeatsCache=null;const r=this.container.getProvider("app").getImmediate();this._storage=new n5(r),this._heartbeatsCachePromise=this._storage.read().then(i=>(this._heartbeatsCache=i,i))}async triggerHeartbeat(){const r=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),i=nS();if(this._heartbeatsCache===null&&(this._heartbeatsCache=await this._heartbeatsCachePromise),!(this._heartbeatsCache.lastSentHeartbeatDate===i||this._heartbeatsCache.heartbeats.some(s=>s.date===i)))return this._heartbeatsCache.heartbeats.push({date:i,agent:r}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(s=>{const o=new Date(s.date).valueOf();return Date.now()-o<=ZL}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache===null||this._heartbeatsCache.heartbeats.length===0)return"";const e=nS(),{heartbeatsToSend:r,unsentEntries:i}=t5(this._heartbeatsCache.heartbeats),s=hk(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=e,i.length>0?(this._heartbeatsCache.heartbeats=i,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s}}function nS(){return new Date().toISOString().substring(0,10)}function t5(t,e=JL){const r=[];let i=t.slice();for(const s of t){const o=r.find(a=>a.agent===s.agent);if(o){if(o.dates.push(s.date),rS(r)>e){o.dates.pop();break}}else if(r.push({agent:s.agent,dates:[s.date]}),rS(r)>e){r.pop();break}i=i.slice(1)}return{heartbeatsToSend:r,unsentEntries:i}}class n5{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return V$()?W$().then(()=>!0).catch(()=>!1):!1}async read(){return await this._canUseIndexedDBPromise?await QL(this.app)||{heartbeats:[]}:{heartbeats:[]}}async overwrite(e){var r;if(await this._canUseIndexedDBPromise){const s=await this.read();return tS(this.app,{lastSentHeartbeatDate:(r=e.lastSentHeartbeatDate)!==null&&r!==void 0?r:s.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var r;if(await this._canUseIndexedDBPromise){const s=await this.read();return tS(this.app,{lastSentHeartbeatDate:(r=e.lastSentHeartbeatDate)!==null&&r!==void 0?r:s.lastSentHeartbeatDate,heartbeats:[...s.heartbeats,...e.heartbeats]})}else return}}function rS(t){return hk(JSON.stringify({version:2,heartbeats:t})).length}/** 380 * @license 381 * Copyright 2019 Google LLC 382 * 383 * Licensed under the Apache License, Version 2.0 (the "License");
384 * you may not use this file except in compliance with the License. 385 * You may obtain a copy of the License at 386 * 387 * http://www.apache.org/licenses/LICENSE-2.0 388 * 389 * Unless required by applicable law or agreed to in writing, software 390 * distributed under the License is distributed on an "AS IS" BASIS, 391 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 392 * See the License for the specific language governing permissions and 393 * limitations under the License. 394 */function r5(t){qs(new Qi("platform-logger",e=>new yL(e),"PRIVATE")),qs(new Qi("heartbeat",e=>new e5(e),"PRIVATE")),Mr(Fm,eS,t),Mr(Fm,eS,"esm2017"),Mr("fire-js","")}r5("");var i5="firebase",s5="9.10.0";/** 395 * @license 396 * Copyright 2020 Google LLC 397 * 398 * Licensed under the Apache License, Version 2.0 (the "License"); 399 * you may not use this file except in compliance with the License. 400 * You may obtain a copy of the License at 401 * 402 * http://www.apache.org/licenses/LICENSE-2.0 403 * 404 * Unless required by applicable law or agreed to in writing, software 405 * distributed under the License is distributed on an "AS IS" BASIS, 406 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 407 * See the License for the specific language governing permissions and 408 * limitations under the License. 409 */Mr(i5,s5,"app");function s0(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(r[i[s]]=t[i[s]]);return r}function vk(){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 o5=vk,bk=new Ju("auth","Firebase",vk());/** 410 * @license 411 * Copyright 2020 Google LLC 412 * 413 * Licensed under the Apache License, Version 2.0 (the "License"); 414 * you may not use this file except in compliance with the License. 415 * You may obtain a copy of the License at 416 * 417 * http://www.apache.org/licenses/LICENSE-2.0 418 * 419 * Unless required by applicable law or agreed to in writing, software 420 * distributed under the License is distributed on an "AS IS" BASIS, 421 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 422 * See the License for the specific language governing permissions and 423 * limitations under the License. 424 */const iS=new n0("@firebase/auth");function wd(t,...e){iS.logLevel<=Qe.ERROR&&iS.error(`Auth (${Ea}): ${t}`,...e)}/** 425 * @license 426 * Copyright 2020 Google LLC 427 * 428 * Licensed under the Apache License, Version 2.0 (the "License"); 429 * you may not use this file except in compliance with the License. 430 * You may obtain a copy of the License at 431 * 432 * http://www.apache.org/licenses/LICENSE-2.0 433 * 434 * Unless required by applicable law or agreed to in writing, software 435 * distributed under the License is distributed on an "AS IS" BASIS, 436 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 437 * See the License for the specific language governing permissions and 438 * limitations under the License. 439 */function or(t,...e){throw o0(t,...e)}function Nr(t,...e){return o0(t,...e)}function a5(t,e,r){const i=Object.assign(Object.assign({},o5()),{[e]:r});return new Ju("auth","Firebase",i).create(e,{appName:t.name})}function o0(t,...e){if(typeof t!="string"){const r=e[0],i=[...e.slice(1)];return i[0]&&(i[0].appName=t.name),t._errorFactory.create(r,...i)}return bk.create(t,...e)}function Ie(t,e,...r){if(!t)throw o0(e,...r)}function Xr(t){const e="INTERNAL ASSERTION FAILED: "+t;throw wd(e),new Error(e)}function ri(t,e){t||Xr(e)}/** 440 * @license 441 * Copyright 2020 Google LLC 442 * 443 * Licensed under the Apache License, Version 2.0 (the "License"); 444 * you may not use this file except in compliance with the License. 445 * You may obtain a copy of the License at 446 * 447 * http://www.apache.org/licenses/LICENSE-2.0 448 * 449 * Unless required by applicable law or agreed to in writing, softw
449are 450 * distributed under the License is distributed on an "AS IS" BASIS, 451 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 452 * See the License for the specific language governing permissions and 453 * limitations under the License. 454 */const sS=new Map;function Qr(t){ri(t instanceof Function,"Expected a class definition");let e=sS.get(t);return e?(ri(e instanceof t,"Instance stored in cache mismatched with class"),e):(e=new t,sS.set(t,e),e)}/** 455 * @license 456 * Copyright 2020 Google LLC 457 * 458 * Licensed under the Apache License, Version 2.0 (the "License"); 459 * you may not use this file except in compliance with the License. 460 * You may obtain a copy of the License at 461 * 462 * http://www.apache.org/licenses/LICENSE-2.0 463 * 464 * Unless required by applicable law or agreed to in writing, software 465 * distributed under the License is distributed on an "AS IS" BASIS, 466 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 467 * See the License for the specific language governing permissions and 468 * limitations under the License. 469 */function l5(t,e){const r=vf(t,"auth");if(r.isInitialized()){const s=r.getImmediate(),o=r.getOptions();if(ih(o,e??{}))return s;or(s,"already-initialized")}return r.initialize({options:e})}function u5(t,e){const r=(e==null?void 0:e.persistence)||[],i=(Array.isArray(r)?r:[r]).map(Qr);e!=null&&e.errorMap&&t._updateErrorMap(e.errorMap),t._initializeWithPersistence(i,e==null?void 0:e.popupRedirectResolver)}/** 470 * @license 471 * Copyright 2020 Google LLC 472 * 473 * Licensed under the Apache License, Version 2.0 (the "License"); 474 * you may not use this file except in compliance with the License. 475 * You may obtain a copy of the License at 476 * 477 * http://www.apache.org/licenses/LICENSE-2.0 478 * 479 * Unless required by applicable law or agreed to in writing, software 480 * distributed under the License is distributed on an "AS IS" BASIS, 481 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 482 * See the License for the specific language governing permissions and 483 * limitations under the License. 484 */function Bm(){var t;return typeof self<"u"&&((t=self.location)===null||t===void 0?void 0:t.href)||""}function c5(){return oS()==="http:"||oS()==="https:"}function oS(){var t;return typeof self<"u"&&((t=self.location)===null||t===void 0?void 0:t.protocol)||null}/** 485 * @license 486 * Copyright 2020 Google LLC 487 * 488 * Licensed under the Apache License, Version 2.0 (the "License"); 489 * you may not use this file except in compliance with the License. 490 * You may obtain a copy of the License at 491 * 492 * http://www.apache.org/licenses/LICENSE-2.0 493 * 494 * Unless required by applicable law or agreed to in writing, software 495 * distributed under the License is distributed on an "AS IS" BASIS, 496 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 497 * See the License for the specific language governing permissions and 498 * limitations under the License. 499 */function d5(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(c5()||B$()||"connection"in navigator)?navigator.onLine:!0}function h5(){if(typeof navigator>"u")return null;const t=navigator;return t.languages&&t.languages[0]||t.language||null}/** 500 * @license 501 * Copyright 2020 Google LLC 502 * 503 * Licensed under the Apache License, Version 2.0 (the "License"); 504 * you may not use this file except in compliance with the License. 505 * You may obtain a copy of the License at 506 * 507 * http://www.apache.org/licenses/LICENSE-2.0 508 * 509 * Unless required by applicable law or agreed to in writing, software 510 * distributed under the License is distributed on an "AS IS" BASIS, 511 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 512 * See the License for the specific language governing permissions and 513 * limitations under the License. 514 */class ec{constructor(e,r){this.shortDelay=e,this.longDelay=r,ri(r>e,"Short delay should be less than long delay!"),this.isMobile=U$()||j$()}get(){return d5()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/** 515 * @license 516 * Copyright 2020 Google LLC 517 * 518 * Licensed under the Apache License, Version 2.0 (the "License");
519 * you may not use this file except in compliance with the License. 520 * You may obtain a copy of the License at 521 * 522 * http://www.apache.org/licenses/LICENSE-2.0 523 * 524 * Unless required by applicable law or agreed to in writing, software 525 * distributed under the License is distributed on an "AS IS" BASIS, 526 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 527 * See the License for the specific language governing permissions and 528 * limitations under the License. 529 */function a0(t,e){ri(t.emulator,"Emulator should always be set here");const{url:r}=t.emulator;return e?`${r}${e.startsWith("/")?e.slice(1):e}`:r}/** 530 * @license 531 * Copyright 2020 Google LLC 532 * 533 * Licensed under the Apache License, Version 2.0 (the "License"); 534 * you may not use this file except in compliance with the License. 535 * You may obtain a copy of the License at 536 * 537 * http://www.apache.org/licenses/LICENSE-2.0 538 * 539 * Unless required by applicable law or agreed to in writing, software 540 * distributed under the License is distributed on an "AS IS" BASIS, 541 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 542 * See the License for the specific language governing permissions and 543 * limitations under the License. 544 */class wk{static initialize(e,r,i){this.fetchImpl=e,r&&(this.headersImpl=r),i&&(this.responseImpl=i)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;Xr("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;Xr("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;Xr("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/** 545 * @license 546 * Copyright 2020 Google LLC 547 * 548 * Licensed under the Apache License, Version 2.0 (the "License"); 549 * you may not use this file except in compliance with the License. 550 * You may obtain a copy of the License at 551 * 552 * http://www.apache.org/licenses/LICENSE-2.0 553 * 554 * Unless required by applicable law or agreed to in writing, software 555 * distributed under the License is distributed on an "AS IS" BASIS, 556 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 557 * See the License for the specific language governing permissions and 558 * limitations under the License. 559 */const f5={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:"internal-error",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"};/** 560 * @license 561 * Copyright 2020 Google LLC 562 * 563 * Licensed under the Apache License, Version 2.0 (the "License");
564 * you may not use this file except in compliance with the License. 565 * You may obtain a copy of the License at 566 * 567 * http://www.apache.org/licenses/LICENSE-2.0 568 * 569 * Unless required by applicable law or agreed to in writing, software 570 * distributed under the License is distributed on an "AS IS" BASIS, 571 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 572 * See the License for the specific language governing permissions and 573 * limitations under the License. 574 */const p5=new ec(3e4,6e4);function as(t,e){return t.tenantId&&!e.tenantId?Object.assign(Object.assign({},e),{tenantId:t.tenantId}):e}async function ui(t,e,r,i,s={}){return Sk(t,s,async()=>{let o={},a={};i&&(e==="GET"?a=i:o={body:JSON.stringify(i)});const l=Zu(Object.assign({key:t.config.apiKey},a)).slice(1),c=await t._getAdditionalHeaders();return c["Content-Type"]="application/json",t.languageCode&&(c["X-Firebase-Locale"]=t.languageCode),wk.fetch()(Ck(t,t.config.apiHost,r,l),Object.assign({method:e,headers:c,referrerPolicy:"no-referrer"},o))})}async function Sk(t,e,r){t._canInitEmulator=!1;const i=Object.assign(Object.assign({},f5),e);try{const s=new g5(t),o=await Promise.race([r(),s.promise]);s.clearNetworkTimeout();const a=await o.json();if("needConfirmation"in a)throw Wc(t,"account-exists-with-different-credential",a);if(o.ok&&!("errorMessage"in a))return a;{const l=o.ok?a.errorMessage:a.error.message,[c,d]=l.split(" : ");if(c==="FEDERATED_USER_ID_ALREADY_LINKED")throw Wc(t,"credential-already-in-use",a);if(c==="EMAIL_EXISTS")throw Wc(t,"email-already-in-use",a);if(c==="USER_DISABLED")throw Wc(t,"user-disabled",a);const f=i[c]||c.toLowerCase().replace(/[_\s]+/g,"-");if(d)throw a5(t,f,d);or(t,f)}}catch(s){if(s instanceof jr)throw s;or(t,"network-request-failed")}}async function tc(t,e,r,i,s={}){const o=await ui(t,e,r,i,s);return"mfaPendingCredential"in o&&or(t,"multi-factor-auth-required",{_serverResponse:o}),o}function Ck(t,e,r,i){const s=`${e}${r}?${i}`;return t.config.emulator?a0(t.config,s):`${t.config.apiScheme}://${s}`}class g5{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((r,i)=>{this.timer=setTimeout(()=>i(Nr(this.auth,"network-request-failed")),p5.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function Wc(t,e,r){const i={appName:t.name};r.email&&(i.email=r.email),r.phoneNumber&&(i.phoneNumber=r.phoneNumber);const s=Nr(t,e,i);return s.customData._tokenResponse=r,s}/** 575 * @license 576 * Copyright 2020 Google LLC 577 * 578 * Licensed under the Apache License, Version 2.0 (the "License"); 579 * you may not use this file except in compliance with the License. 580 * You may obtain a copy of the License at 581 * 582 * http://www.apache.org/licenses/LICENSE-2.0 583 * 584 * Unless required by applicable law or agreed to in writing, software 585 * distributed under the License is distributed on an "AS IS" BASIS, 586 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 587 * See the License for the specific language governing permissions and 588 * limitations under the License. 589 */async function m5(t,e){return ui(t,"POST","/v1/accounts:delete",e)}async function y5(t,e){return ui(t,"POST","/v1/accounts:lookup",e)}/** 590 * @license 591 * Copyright 2020 Google LLC 592 * 593 * Licensed under the Apache License, Version 2.0 (the "License"); 594 * you may not use this file except in compliance with the License. 595 * You may obtain a copy of the License at 596 * 597 * http://www.apache.org/licenses/LICENSE-2.0 598 * 599 * Unless required by applicable law or agreed to in writing, software 600 * distributed under the License is distributed on an "AS IS" BASIS, 601 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 602 * See the License for the specific language governing permissions and 603 * limitations under the License. 604 */function Wl(t){if(t)try{const e=new Date(Number(t));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}async function v5(t,e=!1){const r=ot(t),i=await r.getIdToken(e),s=l0(i);Ie(s&&s.exp&&s.auth_time&&s.iat,r.auth,"internal-error");const o=typeof s.firebase=="object"?s.firebase:void 0,a=o==null?void 0:o.sign_in_provider;return{claims:s,token:i,authTime:Wl(sg(s.auth_time)),issuedAtTime:Wl(sg(s.iat)),expirationTime:Wl(sg(s.exp)),signInProvider:a||null,signInSecondFactor:(o==null?void 0:o.sign_in_second_factor)||null}}function sg(t){return Number(t)*1e3}function l0(t){var e;const[r,i,s]=t.split(".");if(r===void 0||i===void 0||s===void 0)return wd("JWT malformed, contained fewer than 3 sections"),null;try{const o=L$(i);return o?JSON.parse(o):(wd("Failed to decode base64 JWT payload"),null)}catch(o){return wd("Caught error parsing JWT payload as JSON",(e=o)===null||e===void 0?void 0:e.toString()),null}}function b5(t){const e=l0(t);return Ie(e,"internal-error"),Ie(typeof e.exp<"u","internal-error"),Ie(typeof e.iat
604<"u","internal-error"),Number(e.exp)-Number(e.iat)}/** 605 * @license 606 * Copyright 2020 Google LLC 607 * 608 * Licensed under the Apache License, Version 2.0 (the "License"); 609 * you may not use this file except in compliance with the License. 610 * You may obtain a copy of the License at 611 * 612 * http://www.apache.org/licenses/LICENSE-2.0 613 * 614 * Unless required by applicable law or agreed to in writing, software 615 * distributed under the License is distributed on an "AS IS" BASIS, 616 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 617 * See the License for the specific language governing permissions and 618 * limitations under the License. 619 */async function Ys(t,e,r=!1){if(r)return e;try{return await e}catch(i){throw i instanceof jr&&w5(i)&&t.auth.currentUser===t&&await t.auth.signOut(),i}}function w5({code:t}){return t==="auth/user-disabled"||t==="auth/user-token-expired"}/** 620 * @license 621 * Copyright 2020 Google LLC 622 * 623 * Licensed under the Apache License, Version 2.0 (the "License"); 624 * you may not use this file except in compliance with the License. 625 * You may obtain a copy of the License at 626 * 627 * http://www.apache.org/licenses/LICENSE-2.0 628 * 629 * Unless required by applicable law or agreed to in writing, software 630 * distributed under the License is distributed on an "AS IS" BASIS, 631 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 632 * See the License for the specific language governing permissions and 633 * limitations under the License. 634 */class S5{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(e){var r;if(e){const i=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),i}else{this.errorBackoff=3e4;const s=((r=this.user.stsTokenManager.expirationTime)!==null&&r!==void 0?r:0)-Date.now()-3e5;return Math.max(0,s)}}schedule(e=!1){if(!this.isRunning)return;const r=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},r)}async iteration(){var e;try{await this.user.getIdToken(!0)}catch(r){((e=r)===null||e===void 0?void 0:e.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/** 635 * @license 636 * Copyright 2020 Google LLC 637 * 638 * Licensed under the Apache License, Version 2.0 (the "License"); 639 * you may not use this file except in compliance with the License. 640 * You may obtain a copy of the License at 641 * 642 * http://www.apache.org/licenses/LICENSE-2.0 643 * 644 * Unless required by applicable law or agreed to in writing, software 645 * distributed under the License is distributed on an "AS IS" BASIS, 646 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 647 * See the License for the specific language governing permissions and 648 * limitations under the License. 649 */class xk{constructor(e,r){this.createdAt=e,this.lastLoginAt=r,this._initializeTime()}_initializeTime(){this.lastSignInTime=Wl(this.lastLoginAt),this.creationTime=Wl(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/** 650 * @license 651 * Copyright 2019 Google LLC 652 * 653 * Licensed under the Apache License, Version 2.0 (the "License"); 654 * you may not use this file except in compliance with the License. 655 * You may obtain a copy of the License at 656 * 657 * http://www.apache.org/licenses/LICENSE-2.0 658 * 659 * Unless required by applicable law or agreed to in writing, software 660 * distributed under the License is distributed on an "AS IS" BASIS, 661 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 662 * See the License for the specific language governing permissions and 663 * limitations under the License. 664 */async function oh(t){var e;const r=t.auth,i=await t.getIdToken(),s=await Ys(t,y5(r,{idToken:i}));Ie(s==null?void 0:s.users.length,r,"internal-error");const o=s.users[0];t._notifyReloadListener(o);const a=!((e=o.providerUserInfo)===null||e===void 0)&&e.length?_5(o.providerUserInfo):[],l=x5(t.providerData,a),c=t.isAnonymous,d=!(t.email&&o.passwordHash)&&!(l!=null&&l.length),f=c?d:!1,g={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:l,metadata:new xk(o.createdAt,o.lastLoginAt),isAnonymous:f};Object.assign(t,g)}async function C5(t){const e=ot(t);await oh(e),await e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)}function x5(t,e){return[...t.filter(i=>
664!e.some(s=>s.providerId===i.providerId)),...e]}function _5(t){return t.map(e=>{var{providerId:r}=e,i=s0(e,["providerId"]);return{providerId:r,uid:i.rawId||"",displayName:i.displayName||null,email:i.email||null,phoneNumber:i.phoneNumber||null,photoURL:i.photoUrl||null}})}/** 665 * @license 666 * Copyright 2020 Google LLC 667 * 668 * Licensed under the Apache License, Version 2.0 (the "License"); 669 * you may not use this file except in compliance with the License. 670 * You may obtain a copy of the License at 671 * 672 * http://www.apache.org/licenses/LICENSE-2.0 673 * 674 * Unless required by applicable law or agreed to in writing, software 675 * distributed under the License is distributed on an "AS IS" BASIS, 676 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 677 * See the License for the specific language governing permissions and 678 * limitations under the License. 679 */async function E5(t,e){const r=await Sk(t,{},async()=>{const i=Zu({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:s,apiKey:o}=t.config,a=Ck(t,s,"/v1/token",`key=${o}`),l=await t._getAdditionalHeaders();return l["Content-Type"]="application/x-www-form-urlencoded",wk.fetch()(a,{method:"POST",headers:l,body:i})});return{accessToken:r.access_token,expiresIn:r.expires_in,refreshToken:r.refresh_token}}/** 680 * @license 681 * Copyright 2020 Google LLC 682 * 683 * Licensed under the Apache License, Version 2.0 (the "License"); 684 * you may not use this file except in compliance with the License. 685 * You may obtain a copy of the License at 686 * 687 * http://www.apache.org/licenses/LICENSE-2.0 688 * 689 * Unless required by applicable law or agreed to in writing, software 690 * distributed under the License is distributed on an "AS IS" BASIS, 691 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 692 * See the License for the specific language governing permissions and 693 * limitations under the License. 694 */class Cu{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){Ie(e.idToken,"internal-error"),Ie(typeof e.idToken<"u","internal-error"),Ie(typeof e.refreshToken<"u","internal-error");const r="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):b5(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,r)}async getToken(e,r=!1){return Ie(!this.accessToken||this.refreshToken,e,"user-token-expired"),!r&&this.accessToken&&!this.isExpired?this.accessToken:this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null}clearRefreshToken(){this.refreshToken=null}async refresh(e,r){const{accessToken:i,refreshToken:s,expiresIn:o}=await E5(e,r);this.updateTokensAndExpiration(i,s,Number(o))}updateTokensAndExpiration(e,r,i){this.refreshToken=r||null,this.accessToken=e||null,this.expirationTime=Date.now()+i*1e3}static fromJSON(e,r){const{refreshToken:i,accessToken:s,expirationTime:o}=r,a=new Cu;return i&&(Ie(typeof i=="string","internal-error",{appName:e}),a.refreshToken=i),s&&(Ie(typeof s=="string","internal-error",{appName:e}),a.accessToken=s),o&&(Ie(typeof o=="number","internal-error",{appName:e}),a.expirationTime=o),a}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new Cu,this.toJSON())}_performRefresh(){return Xr("not implemented")}}/** 695 * @license 696 * Copyright 2020 Google LLC 697 * 698 * Licensed under the Apache License, Version 2.0 (the "License"); 699 * you may not use this file except in compliance with the License. 700 * You may obtain a copy of the License at 701 * 702 * http://www.apache.org/licenses/LICENSE-2.0 703 * 704 * Unless required by applicable law or agreed to in writing, software 705 * distributed under the License is distributed on an "AS IS" BASIS, 706 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 707 * See the License for the specific language governing permissions and 708 * limitations under the License. 709 */function mi(t,e){Ie(typeof t=="string"||typeof t>"u","internal-error",{appName:e})}class Ms{constructor(e){var{uid:r,auth:i,stsTokenManager:s}=e,o=s0(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new S5(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=r,this.auth=i,this.stsTokenManager=s,this.accessToken=s.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 xk(o.createdAt||void 0,o.lastLoginAt||void 0)}async getIdToken(e){const r=await Ys(this,this.stsTokenManager.getToken(this.auth,e));return Ie(r,this.auth,"internal-error"),this.accessToken!==r&&(this.accessToken=r,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),r}getIdTokenResult(e){return v5(this,e)}reload(){return C5(this)}_assign(e){this!==e&&(Ie(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.ph
709otoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(r=>Object.assign({},r)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){return new Ms(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}))}_onReload(e){Ie(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,r=!1){let i=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),i=!0),r&&await oh(this),await this.auth._persistUserIfCurrent(this),i&&this.auth._notifyListenersIfCurrent(this)}async delete(){const e=await this.getIdToken();return await Ys(this,m5(this.auth,{idToken:e})),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(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,r){var i,s,o,a,l,c,d,f;const g=(i=r.displayName)!==null&&i!==void 0?i:void 0,v=(s=r.email)!==null&&s!==void 0?s:void 0,_=(o=r.phoneNumber)!==null&&o!==void 0?o:void 0,w=(a=r.photoURL)!==null&&a!==void 0?a:void 0,k=(l=r.tenantId)!==null&&l!==void 0?l:void 0,y=(c=r._redirectEventId)!==null&&c!==void 0?c:void 0,b=(d=r.createdAt)!==null&&d!==void 0?d:void 0,x=(f=r.lastLoginAt)!==null&&f!==void 0?f:void 0,{uid:R,emailVerified:E,isAnonymous:C,providerData:D,stsTokenManager:A}=r;Ie(R&&A,e,"internal-error");const U=Cu.fromJSON(this.name,A);Ie(typeof R=="string",e,"internal-error"),mi(g,e.name),mi(v,e.name),Ie(typeof E=="boolean",e,"internal-error"),Ie(typeof C=="boolean",e,"internal-error"),mi(_,e.name),mi(w,e.name),mi(k,e.name),mi(y,e.name),mi(b,e.name),mi(x,e.name);const B=new Ms({uid:R,auth:e,email:v,emailVerified:E,displayName:g,isAnonymous:C,photoURL:w,phoneNumber:_,tenantId:k,stsTokenManager:U,createdAt:b,lastLoginAt:x});return D&&Array.isArray(D)&&(B.providerData=D.map(z=>Object.assign({},z))),y&&(B._redirectEventId=y),B}static async _fromIdTokenResponse(e,r,i=!1){const s=new Cu;s.updateFromServerResponse(r);const o=new Ms({uid:r.localId,auth:e,stsTokenManager:s,isAnonymous:i});return await oh(o),o}}/** 710 * @license 711 * Copyright 2019 Google LLC 712 * 713 * Licensed under the Apache License, Version 2.0 (the "License"); 714 * you may not use this file except in compliance with the License. 715 * You may obtain a copy of the License at 716 * 717 * http://www.apache.org/licenses/LICENSE-2.0 718 * 719 * Unless required by applicable law or agreed to in writing, software 720 * distributed under the License is distributed on an "AS IS" BASIS, 721 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 722 * See the License for the specific language governing permissions and 723 * limitations under the License. 724 */class _k{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,r){this.storage[e]=r}async _get(e){const r=this.storage[e];return r===void 0?null:r}async _remove(e){delete this.storage[e]}_addListener(e,r){}_removeListener(e,r){}}_k.type="NONE";const aS=_k;/** 725 * @license 726 * Copyright 2019 Google LLC 727 * 728 * Licensed under the Apache License, Version 2.0 (the "License"); 729 * you may not use this file except in compliance with the License. 730 * You may obtain a copy of the License at 731 * 732 * http://www.apache.org/licenses/LICENSE-2.0 733 * 734 * Unless required by applicable law or agreed to in writing, softw
734are 735 * distributed under the License is distributed on an "AS IS" BASIS, 736 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 737 * See the License for the specific language governing permissions and 738 * limitations under the License. 739 */function Sd(t,e,r){return`firebase:${t}:${e}:${r}`}class qo{constructor(e,r,i){this.persistence=e,this.auth=r,this.userKey=i;const{config:s,name:o}=this.auth;this.fullUserKey=Sd(this.userKey,s.apiKey,o),this.fullPersistenceKey=Sd("persistence",s.apiKey,o),this.boundEventHandler=r._onStorageEvent.bind(r),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);return e?Ms._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const r=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,r)return this.setCurrentUser(r)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,r,i="authUser"){if(!r.length)return new qo(Qr(aS),e,i);const s=(await Promise.all(r.map(async d=>{if(await d._isAvailable())return d}))).filter(d=>d);let o=s[0]||Qr(aS);const a=Sd(i,e.config.apiKey,e.name);let l=null;for(const d of r)try{const f=await d._get(a);if(f){const g=Ms._fromJSON(e,f);d!==o&&(l=g),o=d;break}}catch{}const c=s.filter(d=>d._shouldAllowMigration);return!o._shouldAllowMigration||!c.length?new qo(o,e,i):(o=c[0],l&&await o._set(a,l.toJSON()),await Promise.all(r.map(async d=>{if(d!==o)try{await d._remove(a)}catch{}})),new qo(o,e,i))}}/** 740 * @license 741 * Copyright 2020 Google LLC 742 * 743 * Licensed under the Apache License, Version 2.0 (the "License"); 744 * you may not use this file except in compliance with the License. 745 * You may obtain a copy of the License at 746 * 747 * http://www.apache.org/licenses/LICENSE-2.0 748 * 749 * Unless required by applicable law or agreed to in writing, software 750 * distributed under the License is distributed on an "AS IS" BASIS, 751 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 752 * See the License for the specific language governing permissions and 753 * limitations under the License. 754 */function lS(t){const e=t.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(Tk(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(Ek(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(Rk(e))return"Blackberry";if(Pk(e))return"Webos";if(u0(e))return"Safari";if((e.includes("chrome/")||kk(e))&&!e.includes("edge/"))return"Chrome";if(Ik(e))return"Android";{const r=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,i=t.match(r);if((i==null?void 0:i.length)===2)return i[1]}return"Other"}function Ek(t=vn()){return/firefox\//i.test(t)}function u0(t=vn()){const e=t.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function kk(t=vn()){return/crios\//i.test(t)}function Tk(t=vn()){return/iemobile/i.test(t)}function Ik(t=vn()){return/android/i.test(t)}function Rk(t=vn()){return/blackberry/i.test(t)}function Pk(t=vn()){return/webos/i.test(t)}function bf(t=vn()){return/iphone|ipad|ipod/i.test(t)||/macintosh/i.test(t)&&/mobile/i.test(t)}function k5(t=vn()){var e;return bf(t)&&!!(!((e=window.navigator)===null||e===void 0)&&e.standalone)}function T5(){return z$()&&document.documentMode===10}function Ak(t=vn()){return bf(t)||Ik(t)||Pk(t)||Rk(t)||/windows phone/i.test(t)||Tk(t)}function I5(){try{return!!(window&&window!==window.top)}catch{return!1}}/** 755 * @license 756 * Copyright 2020 Google LLC 757 * 758 * Licensed under the Apache License, Version 2.0 (the "License"); 759 * you may not use this file except in compliance with the License. 760 * You may obtain a copy of the License at 761 * 762 * http://www.apache.org/licenses/LICENSE-2.0 763 * 764 * Unless required by applicable law or agreed to in writing, softw
764are 765 * distributed under the License is distributed on an "AS IS" BASIS, 766 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 767 * See the License for the specific language governing permissions and 768 * limitations under the License. 769 */function Ok(t,e=[]){let r;switch(t){case"Browser":r=lS(vn());break;case"Worker":r=`${lS(vn())}-${t}`;break;default:r=t}const i=e.length?e.join(","):"FirebaseCore-web";return`${r}/JsCore/${Ea}/${i}`}/** 770 * @license 771 * Copyright 2022 Google LLC 772 * 773 * Licensed under the Apache License, Version 2.0 (the "License"); 774 * you may not use this file except in compliance with the License. 775 * You may obtain a copy of the License at 776 * 777 * http://www.apache.org/licenses/LICENSE-2.0 778 * 779 * Unless required by applicable law or agreed to in writing, software 780 * distributed under the License is distributed on an "AS IS" BASIS, 781 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 782 * See the License for the specific language governing permissions and 783 * limitations under the License. 784 */class R5{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,r){const i=o=>new Promise((a,l)=>{try{const c=e(o);a(c)}catch(c){l(c)}});i.onAbort=r,this.queue.push(i);const s=this.queue.length-1;return()=>{this.queue[s]=()=>Promise.resolve()}}async runMiddleware(e){var r;if(this.auth.currentUser===e)return;const i=[];try{for(const s of this.queue)await s(e),s.onAbort&&i.push(s.onAbort)}catch(s){i.reverse();for(const o of i)try{o()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:(r=s)===null||r===void 0?void 0:r.message})}}}/** 785 * @license 786 * Copyright 2020 Google LLC 787 * 788 * Licensed under the Apache License, Version 2.0 (the "License"); 789 * you may not use this file except in compliance with the License. 790 * You may obtain a copy of the License at 791 * 792 * http://www.apache.org/licenses/LICENSE-2.0 793 * 794 * Unless required by applicable law or agreed to in writing, software 795 * distributed under the License is distributed on an "AS IS" BASIS, 796 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 797 * See the License for the specific language governing permissions and 798 * limitations under the License. 799 */class P5{constructor(e,r,i){this.app=e,this.heartbeatServiceProvider=r,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new uS(this),this.idTokenSubscription=new uS(this),this.beforeStateQueue=new R5(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=bk,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=i.sdkClientVersion}_initializeWithPersistence(e,r){return r&&(this._popupRedirectResolver=Qr(r)),this._initializationPromise=this.queue(async()=>{var i,s;if(!this._deleted&&(this.persistenceManager=await qo.create(this,e),!this._deleted)){if(!((i=this._popupRedirectResolver)===null||i===void 0)&&i._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(r),this.lastNotifiedUid=((s=this.currentUser)===null||s===void 0?void 0:s.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!e)){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUser(e){var r;const i=await this.assertedPersistence.getCurrentUser();let s=i,o=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const a=(r=this.redirectUser)===null||r===void 0?void 0:r._redirectEventId,l=s==null?void 0:s._redirectEventId,c=await this.tryRedirectSignIn(e);(!a||a===l)&&(c!=null&&c.user)&&(s=c.user,o=!0)}if(!s)return this.directlySetCurrentUser(null);
799if(!s._redirectEventId){if(o)try{await this.beforeStateQueue.runMiddleware(s)}catch(a){s=i,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(a))}return s?this.reloadAndSetCurrentUserOrClear(s):this.directlySetCurrentUser(null)}return Ie(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===s._redirectEventId?this.directlySetCurrentUser(s):this.reloadAndSetCurrentUserOrClear(s)}async tryRedirectSignIn(e){let r=null;try{r=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch{await this._setRedirectUser(null)}return r}async reloadAndSetCurrentUserOrClear(e){var r;try{await oh(e)}catch(i){if(((r=i)===null||r===void 0?void 0:r.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=h5()}async _delete(){this._deleted=!0}async updateCurrentUser(e){const r=e?ot(e):null;return r&&Ie(r.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(r&&r._clone(this))}async _updateCurrentUser(e,r=!1){if(!this._deleted)return e&&Ie(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),r||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0)}setPersistence(e){return this.queue(async()=>{await this.assertedPersistence.setPersistence(Qr(e))})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new Ju("auth","Firebase",e())}onAuthStateChanged(e,r,i){return this.registerStateListener(this.authStateSubscription,e,r,i)}beforeAuthStateChanged(e,r){return this.beforeStateQueue.pushCallback(e,r)}onIdTokenChanged(e,r,i){return this.registerStateListener(this.idTokenSubscription,e,r,i)}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(e=this._currentUser)===null||e===void 0?void 0:e.toJSON()}}async _setRedirectUser(e,r){const i=await this.getOrInitRedirectPersistenceManager(r);return e===null?i.removeCurrentUser():i.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const r=e&&Qr(e)||this._popupRedirectResolver;Ie(r,this,"argument-error"),this.redirectPersistenceManager=await qo.create(this,[Qr(r._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var r,i;return this._isInitialized&&await this.queue(async()=>{}),((r=this._currentUser)===null||r===void 0?void 0:r._redirectEventId)===e?this._currentUser:((i=this.redirectUser)===null||i===void 0?void 0:i._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,r;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const i=(r=(e=this.currentUser)===null||e===void 0?void 0:e.uid)!==null&&r!==void 0?r:null;this.lastNotifiedUid!==i&&(this.lastNotifiedUid=i,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,r,i,s){if(this._deleted)return()=>{};const o=typeof r=="function"?r:r.next.bind(r),a=this._isInitialized?Promise.resolve():this._initializationPromise;return Ie(a,this,"internal-error"),a.then(()=>o(this.currentUser)),typeof r=="function"?e.addObserver(r,i,s):e.addObserver(r)}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return Ie(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=Ok(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;const r={["X-Client-Version"]:this.clientVersion};this.app.options.appId&&(r["X-Firebase-gmpid"]=this.app.options.appId);const i=await((e=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getHeartbeatsHeader());return i&&(r["X-Firebase-Client"]=i),r}}function nc(t){return ot(t)}class uS{constructor(e){this.auth=e,this.observer=null,this.addObserver=Y$(r=>this.observer=r)}get next(){return Ie(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/** 800 * @license 801 * Copyright 2020 Google LLC 802 * 803 * Licensed under the Apache License, Version 2.0 (the "License");
804 * you may not use this file except in compliance with the License. 805 * You may obtain a copy of the License at 806 * 807 * http://www.apache.org/licenses/LICENSE-2.0 808 * 809 * Unless required by applicable law or agreed to in writing, software 810 * distributed under the License is distributed on an "AS IS" BASIS, 811 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 812 * See the License for the specific language governing permissions and 813 * limitations under the License. 814 */class c0{constructor(e,r){this.providerId=e,this.signInMethod=r}toJSON(){return Xr("not implemented")}_getIdTokenResponse(e){return Xr("not implemented")}_linkToIdToken(e,r){return Xr("not implemented")}_getReauthenticationResolver(e){return Xr("not implemented")}}/** 815 * @license 816 * Copyright 2020 Google LLC 817 * 818 * Licensed under the Apache License, Version 2.0 (the "License"); 819 * you may not use this file except in compliance with the License. 820 * You may obtain a copy of the License at 821 * 822 * http://www.apache.org/licenses/LICENSE-2.0 823 * 824 * Unless required by applicable law or agreed to in writing, software 825 * distributed under the License is distributed on an "AS IS" BASIS, 826 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 827 * See the License for the specific language governing permissions and 828 * limitations under the License. 829 */async function Dk(t,e){return ui(t,"POST","/v1/accounts:resetPassword",as(t,e))}async function Mk(t,e){return ui(t,"POST","/v1/accounts:update",e)}async function A5(t,e){return ui(t,"POST","/v1/accounts:update",as(t,e))}/** 830 * @license 831 * Copyright 2020 Google LLC 832 * 833 * Licensed under the Apache License, Version 2.0 (the "License"); 834 * you may not use this file except in compliance with the License. 835 * You may obtain a copy of the License at 836 * 837 * http://www.apache.org/licenses/LICENSE-2.0 838 * 839 * Unless required by applicable law or agreed to in writing, software 840 * distributed under the License is distributed on an "AS IS" BASIS, 841 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 842 * See the License for the specific language governing permissions and 843 * limitations under the License. 844 */async function O5(t,e){return tc(t,"POST","/v1/accounts:signInWithPassword",as(t,e))}async function Nk(t,e){return ui(t,"POST","/v1/accounts:sendOobCode",as(t,e))}async function D5(t,e){return Nk(t,e)}async function M5(t,e){return Nk(t,e)}/** 845 * @license 846 * Copyright 2020 Google LLC 847 * 848 * Licensed under the Apache License, Version 2.0 (the "License"); 849 * you may not use this file except in compliance with the License. 850 * You may obtain a copy of the License at 851 * 852 * http://www.apache.org/licenses/LICENSE-2.0 853 * 854 * Unless required by applicable law or agreed to in writing, software 855 * distributed under the License is distributed on an "AS IS" BASIS, 856 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 857 * See the License for the specific language governing permissions and 858 * limitations under the License. 859 */async function N5(t,e){return tc(t,"POST","/v1/accounts:signInWithEmailLink",as(t,e))}async function $5(t,e){return tc(t,"POST","/v1/accounts:signInWithEmailLink",as(t,e))}/** 860 * @license 861 * Copyright 2020 Google LLC 862 * 863 * Licensed under the Apache License, Version 2.0 (the "License"); 864 * you may not use this file except in compliance with the License. 865 * You may obtain a copy of the License at 866 * 867 * http://www.apache.org/licenses/LICENSE-2.0 868 * 869 * Unless required by applicable law or agreed to in writing, software 870 * distributed under the License is distributed on an "AS IS" BASIS, 871 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 872 * See the License for the specific language governing permissions and 873 * limitations under the License. 874 */class xu extends c0{constructor(e,r,i,s=null){super("password",i),this._email=e,this._password=r,this._tenantId=s}static _fromEmailAndPassword(e,r){return new xu(e,r,"password")}static _fromEmailAndCode(e,r,i=null){return new xu(e,r,"emailLink",i)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){const r=typeof e=="string"?JSON.parse(e):e;if(r!=null&&r.email&&(r!=null&&r.password)){if(r.signInMethod==="password")return this._fromEmailAndPassword(r.email,r.password);if(r.signInMethod==="emailLink")return this._fromEmailAndCode(r.email,r.password,r.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":return O5(e,{returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return N5(e,{email:this._email,oobCode:this._password});default:or(e,"internal-error")}}async _linkToIdToken(e,r){switch(this.signInMethod){case"password":return Mk(e,{idToken:r,returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return $5(e,{idToken:r,email:this._email,oobCode:this._password});default:or(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}/** 875 * @license 876 * Copyright 2020 Google LLC 877 * 878 * Licensed under the Apache License, Version 2.0 (the "License");
879 * you may not use this file except in compliance with the License. 880 * You may obtain a copy of the License at 881 * 882 * http://www.apache.org/licenses/LICENSE-2.0 883 * 884 * Unless required by applicable law or agreed to in writing, software 885 * distributed under the License is distributed on an "AS IS" BASIS, 886 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 887 * See the License for the specific language governing permissions and 888 * limitations under the License. 889 */async function Ko(t,e){return tc(t,"POST","/v1/accounts:signInWithIdp",as(t,e))}/** 890 * @license 891 * Copyright 2020 Google LLC 892 * 893 * Licensed under the Apache License, Version 2.0 (the "License"); 894 * you may not use this file except in compliance with the License. 895 * You may obtain a copy of the License at 896 * 897 * http://www.apache.org/licenses/LICENSE-2.0 898 * 899 * Unless required by applicable law or agreed to in writing, software 900 * distributed under the License is distributed on an "AS IS" BASIS, 901 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 902 * See the License for the specific language governing permissions and 903 * limitations under the License. 904 */const L5="http://localhost";class Xs extends c0{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const r=new Xs(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(r.idToken=e.idToken),e.accessToken&&(r.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(r.nonce=e.nonce),e.pendingToken&&(r.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(r.accessToken=e.oauthToken,r.secret=e.oauthTokenSecret):or("argument-error"),r}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
904once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const r=typeof e=="string"?JSON.parse(e):e,{providerId:i,signInMethod:s}=r,o=s0(r,["providerId","signInMethod"]);if(!i||!s)return null;const a=new Xs(i,s);return a.idToken=o.idToken||void 0,a.accessToken=o.accessToken||void 0,a.secret=o.secret,a.nonce=o.nonce,a.pendingToken=o.pendingToken||null,a}_getIdTokenResponse(e){const r=this.buildRequest();return Ko(e,r)}_linkToIdToken(e,r){const i=this.buildRequest();return i.idToken=r,Ko(e,i)}_getReauthenticationResolver(e){const r=this.buildRequest();return r.autoCreate=!1,Ko(e,r)}buildRequest(){const e={requestUri:L5,returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const r={};this.idToken&&(r.id_token=this.idToken),this.accessToken&&(r.access_token=this.accessToken),this.secret&&(r.oauth_token_secret=this.secret),r.providerId=this.providerId,this.nonce&&!this.pendingToken&&(r.nonce=this.nonce),e.postBody=Zu(r)}return e}}/** 905 * @license 906 * Copyright 2020 Google LLC 907 * 908 * Licensed under the Apache License, Version 2.0 (the "License"); 909 * you may not use this file except in compliance with the License. 910 * You may obtain a copy of the License at 911 * 912 * http://www.apache.org/licenses/LICENSE-2.0 913 * 914 * Unless required by applicable law or agreed to in writing, software 915 * distributed under the License is distributed on an "AS IS" BASIS, 916 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 917 * See the License for the specific language governing permissions and 918 * limitations under the License. 919 */function F5(t){switch(t){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 U5(t){const e=Sl(Cl(t)).link,r=e?Sl(Cl(e)).deep_link_id:null,i=Sl(Cl(t)).deep_link_id;return(i?Sl(Cl(i)).link:null)||i||r||e||t}class d0{constructor(e){var r,i,s,o,a,l;const c=Sl(Cl(e)),d=(r=c.apiKey)!==null&&r!==void 0?r:null,f=(i=c.oobCode)!==null&&i!==void 0?i:null,g=F5((s=c.mode)!==null&&s!==void 0?s:null);Ie(d&&f&&g,"argument-error"),this.apiKey=d,this.operation=g,this.code=f,this.continueUrl=(o=c.continueUrl)!==null&&o!==void 0?o:null,this.languageCode=(a=c.languageCode)!==null&&a!==void 0?a:null,this.tenantId=(l=c.tenantId)!==null&&l!==void 0?l:null}static parseLink(e){const r=U5(e);try{return new d0(r)}catch{return null}}}/** 920 * @license 921 * Copyright 2020 Google LLC 922 * 923 * Licensed under the Apache License, Version 2.0 (the "License"); 924 * you may not use this file except in compliance with the License. 925 * You may obtain a copy of the License at 926 * 927 * http://www.apache.org/licenses/LICENSE-2.0 928 * 929 * Unless required by applicable law or agreed to in writing, software 930 * distributed under the License is distributed on an "AS IS" BASIS, 931 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 932 * See the License for the specific language governing permissions and 933 * limitations under the License. 934 */class ka{constructor(){this.providerId=ka.PROVIDER_ID}static credential(e,r){return xu._fromEmailAndPassword(e,r)}static credentialWithLink(e,r){const i=d0.parseLink(r);return Ie(i,"argument-error"),xu._fromEmailAndCode(e,i.code,i.tenantId)}}ka.PROVIDER_ID="password";ka.EMAIL_PASSWORD_SIGN_IN_METHOD="password";ka.EMAIL_LINK_SIGN_IN_METHOD="emailLink";/** 935 * @license 936 * Copyright 2020 Google LLC 937 * 938 * Licensed under the Apache License, Version 2.0 (the "License"); 939 * you may not use this file except in compliance with the License. 940 * You may obtain a copy of the License at 941 * 942 * http://www.apache.org/licenses/LICENSE-2.0 943 * 944 * Unless required by applicable law or agreed to in writing, software 945 * distributed under the License is distributed on an "AS IS" BASIS, 946 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 947 * See the License for the specific language governing permissions and 948 * limitations under the License. 949 */class $k{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}/** 950 * @license 951 * Copyright 2019 Google LLC 952 * 953 * Licensed under the Apache License, Version 2.0 (the "License");
954 * you may not use this file except in compliance with the License. 955 * You may obtain a copy of the License at 956 * 957 * http://www.apache.org/licenses/LICENSE-2.0 958 * 959 * Unless required by applicable law or agreed to in writing, software 960 * distributed under the License is distributed on an "AS IS" BASIS, 961 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 962 * See the License for the specific language governing permissions and 963 * limitations under the License. 964 */class rc extends $k{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}/** 965 * @license 966 * Copyright 2020 Google LLC 967 * 968 * Licensed under the Apache License, Version 2.0 (the "License"); 969 * you may not use this file except in compliance with the License. 970 * You may obtain a copy of the License at 971 * 972 * http://www.apache.org/licenses/LICENSE-2.0 973 * 974 * Unless required by applicable law or agreed to in writing, software 975 * distributed under the License is distributed on an "AS IS" BASIS, 976 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 977 * See the License for the specific language governing permissions and 978 * limitations under the License. 979 */class Ci extends rc{constructor(){super("facebook.com")}static credential(e){return Xs._fromParams({providerId:Ci.PROVIDER_ID,signInMethod:Ci.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Ci.credentialFromTaggedObject(e)}static credentialFromError(e){return Ci.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return Ci.credential(e.oauthAccessToken)}catch{return null}}}Ci.FACEBOOK_SIGN_IN_METHOD="facebook.com";Ci.PROVIDER_ID="facebook.com";/** 980 * @license 981 * Copyright 2020 Google LLC 982 * 983 * Licensed under the Apache License, Version 2.0 (the "License"); 984 * you may not use this file except in compliance with the License. 985 * You may obtain a copy of the License at 986 * 987 * http://www.apache.org/licenses/LICENSE-2.0 988 * 989 * Unless required by applicable law or agreed to in writing, software 990 * distributed under the License is distributed on an "AS IS" BASIS, 991 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 992 * See the License for the specific language governing permissions and 993 * limitations under the License. 994 */class xi extends rc{constructor(){super("google.com"),this.addScope("profile")}static credential(e,r){return Xs._fromParams({providerId:xi.PROVIDER_ID,signInMethod:xi.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:r})}static credentialFromResult(e){return xi.credentialFromTaggedObject(e)}static credentialFromError(e){return xi.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:r,oauthAccessToken:i}=e;if(!r&&!i)return null;try{return xi.credential(r,i)}catch{return null}}}xi.GOOGLE_SIGN_IN_METHOD="google.com";xi.PROVIDER_ID="google.com";/** 995 * @license 996 * Copyright 2020 Google LLC 997 * 998 * Licensed under the Apache License, Version 2.0 (the "License"); 999 * you may not use this file except in compliance with the License. 1000 * You may obtain a copy of the License at 1001 * 1002 * http://www.apache.org/licenses/LICENSE-2.0 1003 * 1004 * Unless required by applicable law or agreed to in writing, software 1005 * distributed under the License is distributed on an "AS IS" BASIS, 1006 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1007 * See the License for the specific language governing permissions and 1008 * limitations under the License. 1009 */class _i extends rc{constructor(){super("github.com")}static credential(e){return Xs._fromParams({providerId:_i.PROVIDER_ID,signInMethod:_i.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return _i.credentialFromTaggedObject(e)}static credentialFromError(e){return _i.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return _i.credential(e.oauthAccessToken)}catch{return null}}}_i.GITHUB_SIGN_IN_METHOD="github.com";_i.PROVIDER_ID="github.com";/** 1010 * @license 1011 * Copyright 2020 Google LLC 1012 * 1013 * Licensed under the Apache License, Version 2.0 (the "License");
1014 * you may not use this file except in compliance with the License. 1015 * You may obtain a copy of the License at 1016 * 1017 * http://www.apache.org/licenses/LICENSE-2.0 1018 * 1019 * Unless required by applicable law or agreed to in writing, software 1020 * distributed under the License is distributed on an "AS IS" BASIS, 1021 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1022 * See the License for the specific language governing permissions and 1023 * limitations under the License. 1024 */class Ei extends rc{constructor(){super("twitter.com")}static credential(e,r){return Xs._fromParams({providerId:Ei.PROVIDER_ID,signInMethod:Ei.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:r})}static credentialFromResult(e){return Ei.credentialFromTaggedObject(e)}static credentialFromError(e){return Ei.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:r,oauthTokenSecret:i}=e;if(!r||!i)return null;try{return Ei.credential(r,i)}catch{return null}}}Ei.TWITTER_SIGN_IN_METHOD="twitter.com";Ei.PROVIDER_ID="twitter.com";/** 1025 * @license 1026 * Copyright 2020 Google LLC 1027 * 1028 * Licensed under the Apache License, Version 2.0 (the "License"); 1029 * you may not use this file except in compliance with the License. 1030 * You may obtain a copy of the License at 1031 * 1032 * http://www.apache.org/licenses/LICENSE-2.0 1033 * 1034 * Unless required by applicable law or agreed to in writing, software 1035 * distributed under the License is distributed on an "AS IS" BASIS, 1036 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1037 * See the License for the specific language governing permissions and 1038 * limitations under the License. 1039 */async function B5(t,e){return tc(t,"POST","/v1/accounts:signUp",as(t,e))}/** 1040 * @license 1041 * Copyright 2020 Google LLC 1042 * 1043 * Licensed under the Apache License, Version 2.0 (the "License"); 1044 * you may not use this file except in compliance with the License. 1045 * You may obtain a copy of the License at 1046 * 1047 * http://www.apache.org/licenses/LICENSE-2.0 1048 * 1049 * Unless required by applicable law or agreed to in writing, software 1050 * distributed under the License is distributed on an "AS IS" BASIS, 1051 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1052 * See the License for the specific language governing permissions and 1053 * limitations under the License. 1054 */class Qs{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,r,i,s=!1){const o=await Ms._fromIdTokenResponse(e,i,s),a=cS(i);return new Qs({user:o,providerId:a,_tokenResponse:i,operationType:r})}static async _forOperation(e,r,i){await e._updateTokensIfNecessary(i,!0);const s=cS(i);return new Qs({user:e,providerId:s,_tokenResponse:i,operationType:r})}}function cS(t){return t.providerId?t.providerId:"phoneNumber"in t?"phone":null}/** 1055 * @license 1056 * Copyright 2020 Google LLC 1057 * 1058 * Licensed under the Apache License, Version 2.0 (the "License"); 1059 * you may not use this file except in compliance with the License. 1060 * You may obtain a copy of the License at 1061 * 1062 * http://www.apache.org/licenses/LICENSE-2.0 1063 * 1064 * Unless required by applicable law or agreed to in writing, software 1065 * distributed under the License is distributed on an "AS IS" BASIS, 1066 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1067 * See the License for the specific language governing permissions and 1068 * limitations under the License. 1069 */class ah extends jr{constructor(e,r,i,s){var o;super(r.code,r.message),this.operationType=i,this.user=s,Object.setPrototypeOf(this,ah.prototype),this.customData={appName:e.name,tenantId:(o=e.tenantId)!==null&&o!==void 0?o:void 0,_serverResponse:r.customData._serverResponse,operationType:i}}static _fromErrorAndOperation(e,r,i,s){return new ah(e,r,i,s)}}function Lk(t,e,r,i){return(e==="reauthenticate"?r._getReauthenticationResolver(t):r._getIdTokenResponse(t)).catch(o=>{throw o.code==="auth/multi-factor-auth-required"?ah._fromErrorAndOperation(t,o,e,i):o})}async function j5(t,e,r=!1){const i=await Ys(t,e._linkToIdToken(t.auth,await t.getIdToken()),r);return Qs._forOperation(t,"link",i)}/** 1070 * @license 1071 * Copyright 2019 Google LLC 1072 * 1073 * Licensed under the Apache License, Version 2.0 (the "License");
1074 * you may not use this file except in compliance with the License. 1075 * You may obtain a copy of the License at 1076 * 1077 * http://www.apache.org/licenses/LICENSE-2.0 1078 * 1079 * Unless required by applicable law or agreed to in writing, software 1080 * distributed under the License is distributed on an "AS IS" BASIS, 1081 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1082 * See the License for the specific language governing permissions and 1083 * limitations under the License. 1084 */async function z5(t,e,r=!1){var i;const{auth:s}=t,o="reauthenticate";try{const a=await Ys(t,Lk(s,o,e,t),r);Ie(a.idToken,s,"internal-error");const l=l0(a.idToken);Ie(l,s,"internal-error");const{sub:c}=l;return Ie(t.uid===c,s,"user-mismatch"),Qs._forOperation(t,o,a)}catch(a){throw((i=a)===null||i===void 0?void 0:i.code)==="auth/user-not-found"&&or(s,"user-mismatch"),a}}/** 1085 * @license 1086 * Copyright 2020 Google LLC 1087 * 1088 * Licensed under the Apache License, Version 2.0 (the "License"); 1089 * you may not use this file except in compliance with the License. 1090 * You may obtain a copy of the License at 1091 * 1092 * http://www.apache.org/licenses/LICENSE-2.0 1093 * 1094 * Unless required by applicable law or agreed to in writing, software 1095 * distributed under the License is distributed on an "AS IS" BASIS, 1096 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1097 * See the License for the specific language governing permissions and 1098 * limitations under the License. 1099 */async function Fk(t,e,r=!1){const i="signIn",s=await Lk(t,i,e),o=await Qs._fromIdTokenResponse(t,i,s);return r||await t._updateCurrentUser(o.user),o}async function V5(t,e){return Fk(nc(t),e)}/** 1100 * @license 1101 * Copyright 2020 Google LLC 1102 * 1103 * Licensed under the Apache License, Version 2.0 (the "License"); 1104 * you may not use this file except in compliance with the License. 1105 * You may obtain a copy of the License at 1106 * 1107 * http://www.apache.org/licenses/LICENSE-2.0 1108 * 1109 * Unless required by applicable law or agreed to in writing, software 1110 * distributed under the License is distributed on an "AS IS" BASIS, 1111 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1112 * See the License for the specific language governing permissions and 1113 * limitations under the License. 1114 */class Uk{constructor(e,r){this.factorId=e,this.uid=r.mfaEnrollmentId,this.enrollmentTime=new Date(r.enrolledAt).toUTCString(),this.displayName=r.displayName}static _fromServerResponse(e,r){return"phoneInfo"in r?h0._fromServerResponse(e,r):or(e,"internal-error")}}class h0 extends Uk{constructor(e){super("phone",e),this.phoneNumber=e.phoneInfo}static _fromServerResponse(e,r){return new h0(r)}}/** 1115 * @license 1116 * Copyright 2020 Google LLC 1117 * 1118 * Licensed under the Apache License, Version 2.0 (the "License"); 1119 * you may not use this file except in compliance with the License. 1120 * You may obtain a copy of the License at 1121 * 1122 * http://www.apache.org/licenses/LICENSE-2.0 1123 * 1124 * Unless required by applicable law or agreed to in writing, software 1125 * distributed under the License is distributed on an "AS IS" BASIS, 1126 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1127 * See the License for the specific language governing permissions and 1128 * limitations under the License. 1129 */function Bk(t,e,r){var i;Ie(((i=r.url)===null||i===void 0?void 0:i.length)>0,t,"invalid-continue-uri"),Ie(typeof r.dynamicLinkDomain>"u"||r.dynamicLinkDomain.length>0,t,"invalid-dynamic-link-domain"),e.continueUrl=r.url,e.dynamicLinkDomain=r.dynamicLinkDomain,e.canHandleCodeInApp=r.handleCodeInApp,r.iOS&&(Ie(r.iOS.bundleId.length>0,t,"missing-ios-bundle-id"),e.iOSBundleId=r.iOS.bundleId),r.android&&(Ie(r.android.packageName.length>0,t,"missing-android-pkg-name"),e.androidInstallApp=r.android.installApp,e.androidMinimumVersionCode=r.android.minimumVersion,e.androidPackageName=r.android.packageName)}/** 1130 * @license 1131 * Copyright 2020 Google LLC 1132 * 1133 * Licensed under the Apache License, Version 2.0 (the "License"); 1134 * you may not use this file except in compliance with the License. 1135 * You may obtain a copy of the License at 1136 * 1137 * http://www.apache.org/licenses/LICENSE-2.0 1138 * 1139 * Unless required by applicable law or agreed to in writing, softw
1139are 1140 * distributed under the License is distributed on an "AS IS" BASIS, 1141 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1142 * See the License for the specific language governing permissions and 1143 * limitations under the License. 1144 */async function jk(t,e,r){const i=ot(t),s={requestType:"PASSWORD_RESET",email:e};r&&Bk(i,s,r),await M5(i,s)}async function W5(t,e,r){await Dk(ot(t),{oobCode:e,newPassword:r})}async function zk(t,e){await A5(ot(t),{oobCode:e})}async function Vk(t,e){const r=ot(t),i=await Dk(r,{oobCode:e}),s=i.requestType;switch(Ie(s,r,"internal-error"),s){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":Ie(i.newEmail,r,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":Ie(i.mfaInfo,r,"internal-error");default:Ie(i.email,r,"internal-error")}let o=null;return i.mfaInfo&&(o=Uk._fromServerResponse(nc(r),i.mfaInfo)),{data:{email:(i.requestType==="VERIFY_AND_CHANGE_EMAIL"?i.newEmail:i.email)||null,previousEmail:(i.requestType==="VERIFY_AND_CHANGE_EMAIL"?i.email:i.newEmail)||null,multiFactorInfo:o},operation:s}}async function G5(t,e){const{data:r}=await Vk(ot(t),e);return r.email}async function H5(t,e,r){const i=nc(t),s=await B5(i,{returnSecureToken:!0,email:e,password:r}),o=await Qs._fromIdTokenResponse(i,"signIn",s);return await i._updateCurrentUser(o.user),o}function q5(t,e,r){return V5(ot(t),ka.credential(e,r))}async function f0(t,e){const r=ot(t),s={requestType:"VERIFY_EMAIL",idToken:await t.getIdToken()};e&&Bk(r.auth,s,e);const{email:o}=await D5(r.auth,s);o!==t.email&&await t.reload()}/** 1145 * @license 1146 * Copyright 2020 Google LLC 1147 * 1148 * Licensed under the Apache License, Version 2.0 (the "License"); 1149 * you may not use this file except in compliance with the License. 1150 * You may obtain a copy of the License at 1151 * 1152 * http://www.apache.org/licenses/LICENSE-2.0 1153 * 1154 * Unless required by applicable law or agreed to in writing, software 1155 * distributed under the License is distributed on an "AS IS" BASIS, 1156 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1157 * See the License for the specific language governing permissions and 1158 * limitations under the License. 1159 */async function K5(t,e){return ui(t,"POST","/v1/accounts:update",e)}/** 1160 * @license 1161 * Copyright 2020 Google LLC 1162 * 1163 * Licensed under the Apache License, Version 2.0 (the "License"); 1164 * you may not use this file except in compliance with the License. 1165 * You may obtain a copy of the License at 1166 * 1167 * http://www.apache.org/licenses/LICENSE-2.0 1168 * 1169 * Unless required by applicable law or agreed to in writing, software 1170 * distributed under the License is distributed on an "AS IS" BASIS, 1171 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1172 * See the License for the specific language governing permissions and 1173 * limitations under the License. 1174 */async function jm(t,{displayName:e,photoURL:r}){if(e===void 0&&r===void 0)return;const i=ot(t),o={idToken:await i.getIdToken(),displayName:e,photoUrl:r,returnSecureToken:!0},a=await Ys(i,K5(i.auth,o));i.displayName=a.displayName||null,i.photoURL=a.photoUrl||null;const l=i.providerData.find(({providerId:c})=>c==="password");l&&(l.displayName=i.displayName,l.photoURL=i.photoURL),await i._updateTokensIfNecessary(a)}function Y5(t,e){return X5(ot(t),e,null)}async function X5(t,e,r){const{auth:i}=t,o={idToken:await t.getIdToken(),returnSecureToken:!0};e&&(o.email=e),r&&(o.password=r);const a=await Ys(t,Mk(i,o));await t._updateTokensIfNecessary(a,!0)}const lh="__sak";/** 1175 * @license 1176 * Copyright 2019 Google LLC 1177 * 1178 * Licensed under the Apache License, Version 2.0 (the "License"); 1179 * you may not use this file except in compliance with the License. 1180 * You may obtain a copy of the License at 1181 * 1182 * http://www.apache.org/licenses/LICENSE-2.0 1183 * 1184 * Unless required by applicable law or agreed to in writing, software 1185 * distributed under the License is distributed on an "AS IS" BASIS, 1186 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1187 * See the License for the specific language governing permissions and 1188 * limitations under the License. 1189 */class Wk{constructor(e,r){this.storageRetriever=e,this.type=r}_isAvailable(){try{return this.storage?(this.storage.setItem(lh,"1"),this.storage.removeItem(lh),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(e,r){return this.storage.setItem(e,JSON.stringify(r)),Promise.resolve()}_get(e){const r=this.storage.getItem(e);return Promise.resolve(r?JSON.parse(r):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}/** 1190 * @license 1191 * Copyright 2020 Google LLC 1192 * 1193 * Licensed under the Apache License, Version 2.0 (the "License");
1194 * you may not use this file except in compliance with the License. 1195 * You may obtain a copy of the License at 1196 * 1197 * http://www.apache.org/licenses/LICENSE-2.0 1198 * 1199 * Unless required by applicable law or agreed to in writing, software 1200 * distributed under the License is distributed on an "AS IS" BASIS, 1201 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1202 * See the License for the specific language governing permissions and 1203 * limitations under the License. 1204 */function Q5(){const t=vn();return u0(t)||bf(t)}const J5=1e3,Z5=10;class Gk extends Wk{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,r)=>this.onStorageEvent(e,r),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=Q5()&&I5(),this.fallbackToPolling=Ak(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const r of Object.keys(this.listeners)){const i=this.storage.getItem(r),s=this.localCache[r];i!==s&&e(r,s,i)}}onStorageEvent(e,r=!1){if(!e.key){this.forAllChangedKeys((a,l,c)=>{this.notifyListeners(a,c)});return}const i=e.key;if(r?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const a=this.storage.getItem(i);if(e.newValue!==a)e.newValue!==null?this.storage.setItem(i,e.newValue):this.storage.removeItem(i);else if(this.localCache[i]===e.newValue&&!r)return}const s=()=>{const a=this.storage.getItem(i);!r&&this.localCache[i]===a||this.notifyListeners(i,a)},o=this.storage.getItem(i);T5()&&o!==e.newValue&&e.newValue!==e.oldValue?setTimeout(s,Z5):s()}notifyListeners(e,r){this.localCache[e]=r;const i=this.listeners[e];if(i)for(const s of Array.from(i))s(r&&JSON.parse(r))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,r,i)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:r,newValue:i}),!0)})},J5)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,r){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(r)}_removeListener(e,r){this.listeners[e]&&(this.listeners[e].delete(r),this.listeners[e].size===0&&delete this.listeners[e]),Ob
1204ject.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(e,r){await super._set(e,r),this.localCache[e]=JSON.stringify(r)}async _get(e){const r=await super._get(e);return this.localCache[e]=JSON.stringify(r),r}async _remove(e){await super._remove(e),delete this.localCache[e]}}Gk.type="LOCAL";const e3=Gk;/** 1205 * @license 1206 * Copyright 2020 Google LLC 1207 * 1208 * Licensed under the Apache License, Version 2.0 (the "License"); 1209 * you may not use this file except in compliance with the License. 1210 * You may obtain a copy of the License at 1211 * 1212 * http://www.apache.org/licenses/LICENSE-2.0 1213 * 1214 * Unless required by applicable law or agreed to in writing, software 1215 * distributed under the License is distributed on an "AS IS" BASIS, 1216 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1217 * See the License for the specific language governing permissions and 1218 * limitations under the License. 1219 */class Hk extends Wk{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,r){}_removeListener(e,r){}}Hk.type="SESSION";const qk=Hk;/** 1220 * @license 1221 * Copyright 2019 Google LLC 1222 * 1223 * Licensed under the Apache License, Version 2.0 (the "License"); 1224 * you may not use this file except in compliance with the License. 1225 * You may obtain a copy of the License at 1226 * 1227 * http://www.apache.org/licenses/LICENSE-2.0 1228 * 1229 * Unless required by applicable law or agreed to in writing, software 1230 * distributed under the License is distributed on an "AS IS" BASIS, 1231 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1232 * See the License for the specific language governing permissions and 1233 * limitations under the License. 1234 */function t3(t){return Promise.all(t.map(async e=>{try{return{fulfilled:!0,value:await e}}catch(r){return{fulfilled:!1,reason:r}}}))}/** 1235 * @license 1236 * Copyright 2019 Google LLC 1237 * 1238 * Licensed under the Apache License, Version 2.0 (the "License"); 1239 * you may not use this file except in compliance with the License. 1240 * You may obtain a copy of the License at 1241 * 1242 * http://www.apache.org/licenses/LICENSE-2.0 1243 * 1244 * Unless required by applicable law or agreed to in writing, software 1245 * distributed under the License is distributed on an "AS IS" BASIS, 1246 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1247 * See the License for the specific language governing permissions and 1248 * limitations under the License. 1249 */class wf{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const r=this.receivers.find(s=>s.isListeningto(e));if(r)return r;const i=new wf(e);return this.receivers.push(i),i}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const r=e,{eventId:i,eventType:s,data:o}=r.data,a=this.handlersMap[s];if(!(a!=null&&a.size))return;r.ports[0].postMessage({status:"ack",eventId:i,eventType:s});const l=Array.from(a).map(async d=>d(r.origin,o)),c=await t3(l);r.ports[0].postMessage({status:"done",eventId:i,eventType:s,response:c})}_subscribe(e,r){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(r)}_unsubscribe(e,r){this.handlersMap[e]&&r&&this.handlersMap[e].delete(r),(!r||this.handlersMap[e].size===0)&&delete this.handlersMap[e],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}wf.receivers=[];/** 1250 * @license 1251 * Copyright 2020 Google LLC 1252 * 1253 * Licensed under the Apache License, Version 2.0 (the "License"); 1254 * you may not use this file except in compliance with the License. 1255 * You may obtain a copy of the License at 1256 * 1257 * http://www.apache.org/licenses/LICENSE-2.0 1258 * 1259 * Unless required by applicable law or agreed to in writing, software 1260 * distributed under the License is distributed on an "AS IS" BASIS, 1261 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1262 * See the License for the specific language governing permissions and 1263 * limitations under the License. 1264 */function p0(t="",e=10){let r="";for(let i=0;i<e;i++)r+=Math.floor(Math.random()*10);return t+r}/** 1265 * @license 1266 * Copyright 2019 Google LLC 1267 * 1268 * Licensed under the Apache License, Version 2.0 (the "License");
1269 * you may not use this file except in compliance with the License. 1270 * You may obtain a copy of the License at 1271 * 1272 * http://www.apache.org/licenses/LICENSE-2.0 1273 * 1274 * Unless required by applicable law or agreed to in writing, software 1275 * distributed under the License is distributed on an "AS IS" BASIS, 1276 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1277 * See the License for the specific language governing permissions and 1278 * limitations under the License. 1279 */class n3{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,r,i=50){const s=typeof MessageChannel<"u"?new MessageChannel:null;if(!s)throw new Error("connection_unavailable");let o,a;return new Promise((l,c)=>{const d=p0("",20);s.port1.start();const f=setTimeout(()=>{c(new Error("unsupported_event"))},i);a={messageChannel:s,onMessage(g){const v=g;if(v.data.eventId===d)switch(v.data.status){case"ack":clearTimeout(f),o=setTimeout(()=>{c(new Error("timeout"))},3e3);break;case"done":clearTimeout(o),l(v.data.response);break;default:clearTimeout(f),clearTimeout(o),c(new Error("invalid_response"));break}}},this.handlers.add(a),s.port1.addEventListener("message",a.onMessage),this.target.postMessage({eventType:e,eventId:d,data:r},[s.port2])}).finally(()=>{a&&this.removeMessageHandler(a)})}}/** 1280 * @license 1281 * Copyright 2020 Google LLC 1282 * 1283 * Licensed under the Apache License, Version 2.0 (the "License"); 1284 * you may not use this file except in compliance with the License. 1285 * You may obtain a copy of the License at 1286 * 1287 * http://www.apache.org/licenses/LICENSE-2.0 1288 * 1289 * Unless required by applicable law or agreed to in writing, software 1290 * distributed under the License is distributed on an "AS IS" BASIS, 1291 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1292 * See the License for the specific language governing permissions and 1293 * limitations under the License. 1294 */function $r(){return window}function r3(t){$r().location.href=t}/** 1295 * @license 1296 * Copyright 2020 Google LLC. 1297 * 1298 * Licensed under the Apache License, Version 2.0 (the "License"); 1299 * you may not use this file except in compliance with the License. 1300 * You may obtain a copy of the License at 1301 * 1302 * http://www.apache.org/licenses/LICENSE-2.0 1303 * 1304 * Unless required by applicable law or agreed to in writing, software 1305 * distributed under the License is distributed on an "AS IS" BASIS, 1306 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1307 * See the License for the specific language governing permissions and 1308 * limitations under the License. 1309 */function Kk(){return typeof $r().WorkerGlobalScope<"u"&&typeof $r().importScripts=="function"}async function i3(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function s3(){var t;return((t=navigator==null?void 0:navigator.serviceWorker)===null||t===void 0?void 0:t.controller)||null}function o3(){return Kk()?self:null}/** 1310 * @license 1311 * Copyright 2019 Google LLC 1312 * 1313 * Licensed under the Apache License, Version 2.0 (the "License"); 1314 * you may not use this file except in compliance with the License. 1315 * You may obtain a copy of the License at 1316 * 1317 * http://www.apache.org/licenses/LICENSE-2.0 1318 * 1319 * Unless required by applicable law or agreed to in writing, software 1320 * distributed under the License is distributed on an "AS IS" BASIS, 1321 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1322 * See the License for the specific language governing permissions and 1323 * limitations under the License. 1324 */const Yk="firebaseLocalStorageDb",a3=1,uh="firebaseLocalStorage",Xk="fbase_key";class ic{constructor(e){this.request=e}toPromise(){return new Promise((e,r)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{r(this.request.error)})})}}function Sf(t,e){return t.transaction([uh],e?"readwrite":"readonly").objectStore(uh)}function l3(){const t=indexedDB.deleteDatabase(Yk);
1324return new ic(t).toPromise()}function zm(){const t=indexedDB.open(Yk,a3);return new Promise((e,r)=>{t.addEventListener("error",()=>{r(t.error)}),t.addEventListener("upgradeneeded",()=>{const i=t.result;try{i.createObjectStore(uh,{keyPath:Xk})}catch(s){r(s)}}),t.addEventListener("success",async()=>{const i=t.result;i.objectStoreNames.contains(uh)?e(i):(i.close(),await l3(),e(await zm()))})})}async function dS(t,e,r){const i=Sf(t,!0).put({[Xk]:e,value:r});return new ic(i).toPromise()}async function u3(t,e){const r=Sf(t,!1).get(e),i=await new ic(r).toPromise();return i===void 0?null:i.value}function hS(t,e){const r=Sf(t,!0).delete(e);return new ic(r).toPromise()}const c3=800,d3=3;class Qk{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 zm(),this.db)}async _withRetries(e){let r=0;for(;;)try{const i=await this._openDb();return await e(i)}catch(i){if(r++>d3)throw i;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return Kk()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=wf._getInstance(o3()),this.receiver._subscribe("keyChanged",async(e,r)=>({keyProcessed:(await this._poll()).includes(r.key)})),this.receiver._subscribe("ping",async(e,r)=>["keyChanged"])}async initializeSender(){var e,r;if(this.activeServiceWorker=await i3(),!this.activeServiceWorker)return;this.sender=new n3(this.activeServiceWorker);const i=await this.sender._send("ping",{},800);i&&!((e=i[0])===null||e===void 0)&&e.fulfilled&&!((r=i[0])===null||r===void 0)&&r.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(!(!this.sender||!this.activeServiceWorker||s3()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await zm();return await dS(e,lh,"1"),await hS(e,lh),!0}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,r){return this._withPendingWrite(async()=>(await this._withRetries(i=>dS(i,e,r)),this.localCache[e]=r,this.notifyServiceWorker(e)))}async _get(e){const r=await this._withRetries(i=>u3(i,e));return this.localCache[e]=r,r}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(r=>hS(r,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){const e=await this._withRetries(s=>{const o=Sf(s,!1).getAll();return new ic(o).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];const r=[],i=new Set;for(const{fbase_key:s,value:o}of e)i.add(s),JSON.stringify(this.localCache[s])!==JSON.stringify(o)&&(this.notifyListeners(s,o),r.push(s));for(const s of Object.keys(this.localCache))this.localCache[s]&&!i.has(s)&&(this.notifyListeners(s,null),r.push(s));return r}notifyListeners(e,r){this.localCache[e]=r;const i=this.listeners[e];if(i)for(const s of Array.from(i))s(r)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),c3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,r){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(r)}_removeListener(e,r){this.listeners[e]&&(this.listeners[e].delete(r),this.listeners[e].size===0&&delete this.listeners[e]),Ob
1324ject.keys(this.listeners).length===0&&this.stopPolling()}}Qk.type="LOCAL";const h3=Qk;/** 1325 * @license 1326 * Copyright 2020 Google LLC 1327 * 1328 * Licensed under the Apache License, Version 2.0 (the "License"); 1329 * you may not use this file except in compliance with the License. 1330 * You may obtain a copy of the License at 1331 * 1332 * http://www.apache.org/licenses/LICENSE-2.0 1333 * 1334 * Unless required by applicable law or agreed to in writing, software 1335 * distributed under the License is distributed on an "AS IS" BASIS, 1336 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1337 * See the License for the specific language governing permissions and 1338 * limitations under the License. 1339 */function f3(){var t,e;return(e=(t=document.getElementsByTagName("head"))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:document}function p3(t){return new Promise((e,r)=>{const i=document.createElement("script");i.setAttribute("src",t),i.onload=e,i.onerror=s=>{const o=Nr("internal-error");o.customData=s,r(o)},i.type="text/javascript",i.charset="UTF-8",f3().appendChild(i)})}function g3(t){return`__${t}${Math.floor(Math.random()*1e6)}`}new ec(3e4,6e4);/** 1340 * @license 1341 * Copyright 2021 Google LLC 1342 * 1343 * Licensed under the Apache License, Version 2.0 (the "License"); 1344 * you may not use this file except in compliance with the License. 1345 * You may obtain a copy of the License at 1346 * 1347 * http://www.apache.org/licenses/LICENSE-2.0 1348 * 1349 * Unless required by applicable law or agreed to in writing, software 1350 * distributed under the License is distributed on an "AS IS" BASIS, 1351 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1352 * See the License for the specific language governing permissions and 1353 * limitations under the License. 1354 */function m3(t,e){return e?Qr(e):(Ie(t._popupRedirectResolver,t,"argument-error"),t._popupRedirectResolver)}/** 1355 * @license 1356 * Copyright 2019 Google LLC 1357 * 1358 * Licensed under the Apache License, Version 2.0 (the "License"); 1359 * you may not use this file except in compliance with the License. 1360 * You may obtain a copy of the License at 1361 * 1362 * http://www.apache.org/licenses/LICENSE-2.0 1363 * 1364 * Unless required by applicable law or agreed to in writing, software 1365 * distributed under the License is distributed on an "AS IS" BASIS, 1366 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1367 * See the License for the specific language governing permissions and 1368 * limitations under the License. 1369 */class g0 extends c0{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return Ko(e,this._buildIdpRequest())}_linkToIdToken(e,r){return Ko(e,this._buildIdpRequest(r))}_getReauthenticationResolver(e){return Ko(e,this._buildIdpRequest())}_buildIdpRequest(e){const r={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(r.idToken=e),r}}function y3(t){return Fk(t.auth,new g0(t),t.bypassAuthState)}function v3(t){const{auth:e,user:r}=t;return Ie(r,e,"internal-error"),z5(r,new g0(t),t.bypassAuthState)}async function b3(t){const{auth:e,user:r}=t;return Ie(r,e,"internal-error"),j5(r,new g0(t),t.bypassAuthState)}/** 1370 * @license 1371 * Copyright 2020 Google LLC 1372 * 1373 * Licensed under the Apache License, Version 2.0 (the "License"); 1374 * you may not use this file except in compliance with the License. 1375 * You may obtain a copy of the License at 1376 * 1377 * http://www.apache.org/licenses/LICENSE-2.0 1378 * 1379 * Unless required by applicable law or agreed to in writing, software 1380 * distributed under the License is distributed on an "AS IS" BASIS, 1381 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1382 * See the License for the specific language governing permissions and 1383 * limitations under the License. 1384 */class Jk{constructor(e,r,i,s,o=!1){this.auth=e,this.resolver=i,this.user=s,this.bypassAuthState=o,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(r)?r:[r]}execute(){return new Promise(async(e,r)=>{this.pendingPromise={resolve:e,reject:r};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(i){this.reject(i)}})}async onAuthEvent(e){const{urlResponse:r,sessionId:i,postBody:s,tenantId:o,error:a,type:l}=e;if(a){this.reject(a);return}const c={auth:this.auth,requestUri:r,sessionId:i,tenantId:o||void 0,postBody:s||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(l)(c))}catch(d){this.reject(d)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return y3;case"linkViaPopup":case"linkViaRedirect":return b3;case"reauthViaPopup":case"reauthViaRedirect":return v3;default:or(this.auth,"internal-error")}}resolve(e){ri(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){ri(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/** 1385 * @license 1386 * Copyright 2020 Google LLC 1387 * 1388 * Licensed under the Apache License, Version 2.0 (the "License");
1389 * you may not use this file except in compliance with the License. 1390 * You may obtain a copy of the License at 1391 * 1392 * http://www.apache.org/licenses/LICENSE-2.0 1393 * 1394 * Unless required by applicable law or agreed to in writing, software 1395 * distributed under the License is distributed on an "AS IS" BASIS, 1396 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1397 * See the License for the specific language governing permissions and 1398 * limitations under the License. 1399 */const w3=new ec(2e3,1e4);class Ao extends Jk{constructor(e,r,i,s,o){super(e,r,s,o),this.provider=i,this.authWindow=null,this.pollId=null,Ao.currentPopupAction&&Ao.currentPopupAction.cancel(),Ao.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return Ie(e,this.auth,"internal-error"),e}async onExecution(){ri(this.filter.length===1,"Popup operations only handle one event");const e=p0();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(r=>{this.reject(r)}),this.resolver._isIframeWebStorageSupported(this.auth,r=>{r||this.reject(Nr(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return((e=this.authWindow)===null||e===void 0?void 0:e.associatedEvent)||null}cancel(){this.reject(Nr(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,Ao.currentPopupAction=null}pollUserCancellation(){const e=()=>{var r,i;if(!((i=(r=this.authWindow)===null||r===void 0?void 0:r.window)===null||i===void 0)&&i.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(Nr(this.auth,"popup-closed-by-user"))},2e3);return}this.pollId=window.setTimeout(e,w3.get())};e()}}Ao.currentPopupAction=null;/** 1400 * @license 1401 * Copyright 2020 Google LLC 1402 * 1403 * Licensed under the Apache License, Version 2.0 (the "License"); 1404 * you may not use this file except in compliance with the License. 1405 * You may obtain a copy of the License at 1406 * 1407 * http://www.apache.org/licenses/LICENSE-2.0 1408 * 1409 * Unless required by applicable law or agreed to in writing, software 1410 * distributed under the License is distributed on an "AS IS" BASIS, 1411 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1412 * See the License for the specific language governing permissions and 1413 * limitations under the License. 1414 */const S3="pendingRedirect",Cd=new Map;class C3 extends Jk{constructor(e,r,i=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],r,void 0,i),this.eventId=null}async execute(){let e=Cd.get(this.auth._key());if(!e){try{const i=await x3(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(i)}catch(r){e=()=>Promise.reject(r)}Cd.set(this.auth._key(),e)}return this.bypassAuthState||Cd.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if(e.type==="signInViaRedirect")return super.onAuthEvent(e);if(e.type==="unknown"){this.resolve(null);return}if(e.eventId){const r=await this.auth._redirectUserForId(e.eventId);if(r)return this.user=r,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function x3(t,e){const r=k3(e),i=E3(t);if(!await i._isAvailable())return!1;const s=await i._get(r)==="true";return await i._remove(r),s}function _3(t,e){Cd.set(t._key(),e)}function E3(t){return Qr(t._redirectPersistence)}function k3(t){return Sd(S3,t.config.apiKey,t.name)}async function T3(t,e,r=!1){const i=nc(t),s=m3(i,e),a=await new C3(i,s,r).execute();return a&&!r&&(delete a.user._redirectEventId,await i._persistUserIfCurrent(a.user),await i._setRedirectUser(null,e)),a}/** 1415 * @license 1416 * Copyright 2020 Google LLC 1417 * 1418 * Licensed under the Apache License, Version 2.0 (the "License"); 1419 * you may not use this file except in compliance with the License. 1420 * You may obtain a copy of the License at 1421 * 1422 * http://www.apache.org/licenses/LICENSE-2.0 1423 * 1424 * Unless required by applicable law or agreed to in writing, softw
1424are 1425 * distributed under the License is distributed on an "AS IS" BASIS, 1426 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1427 * See the License for the specific language governing permissions and 1428 * limitations under the License. 1429 */const I3=10*60*1e3;class R3{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let r=!1;return this.consumers.forEach(i=>{this.isEventForConsumer(e,i)&&(r=!0,this.sendToConsumer(e,i),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!P3(e)||(this.hasHandledPotentialRedirect=!0,r||(this.queuedRedirectEvent=e,r=!0)),r}sendToConsumer(e,r){var i;if(e.error&&!Zk(e)){const s=((i=e.error.code)===null||i===void 0?void 0:i.split("auth/")[1])||"internal-error";r.onError(Nr(this.auth,s))}else r.onAuthEvent(e)}isEventForConsumer(e,r){const i=r.eventId===null||!!e.eventId&&e.eventId===r.eventId;return r.filter.includes(e.type)&&i}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=I3&&this.cachedEventUids.clear(),this.cachedEventUids.has(fS(e))}saveEventToCache(e){this.cachedEventUids.add(fS(e)),this.lastProcessedEventTime=Date.now()}}function fS(t){return[t.type,t.eventId,t.sessionId,t.tenantId].filter(e=>e).join("-")}function Zk({type:t,error:e}){return t==="unknown"&&(e==null?void 0:e.code)==="auth/no-auth-event"}function P3(t){switch(t.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return Zk(t);default:return!1}}/** 1430 * @license 1431 * Copyright 2020 Google LLC 1432 * 1433 * Licensed under the Apache License, Version 2.0 (the "License"); 1434 * you may not use this file except in compliance with the License. 1435 * You may obtain a copy of the License at 1436 * 1437 * http://www.apache.org/licenses/LICENSE-2.0 1438 * 1439 * Unless required by applicable law or agreed to in writing, software 1440 * distributed under the License is distributed on an "AS IS" BASIS, 1441 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1442 * See the License for the specific language governing permissions and 1443 * limitations under the License. 1444 */async function A3(t,e={}){return ui(t,"GET","/v1/projects",e)}/** 1445 * @license 1446 * Copyright 2020 Google LLC 1447 * 1448 * Licensed under the Apache License, Version 2.0 (the "License"); 1449 * you may not use this file except in compliance with the License. 1450 * You may obtain a copy of the License at 1451 * 1452 * http://www.apache.org/licenses/LICENSE-2.0 1453 * 1454 * Unless required by applicable law or agreed to in writing, software 1455 * distributed under the License is distributed on an "AS IS" BASIS, 1456 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1457 * See the License for the specific language governing permissions and 1458 * limitations under the License. 1459 */const O3=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,D3=/^https?/;async function M3(t){if(t.config.emulator)return;const{authorizedDomains:e}=await A3(t);for(const r of e)try{if(N3(r))return}catch{}or(t,"unauthorized-domain")}function N3(t){const e=Bm(),{protocol:r,hostname:i}=new URL(e);if(t.startsWith("chrome-extension://")){const a=new URL(t);return a.hostname===""&&i===""?r==="chrome-extension:"&&t.replace("chrome-extension://","")===e.replace("chrome-extension://",""):r==="chrome-extension:"&&a.hostname===i}if(!D3.test(r))return!1;if(O3.test(t))return i===t;const s=t.replace(/\./g,"\\.");return new RegExp("^(.+\\."+s+"|"+s+")$","i").test(i)}/** 1460 * @license 1461 * Copyright 2020 Google LLC. 1462 * 1463 * Licensed under the Apache License, Version 2.0 (the "License"); 1464 * you may not use this file except in compliance with the License. 1465 * You may obtain a copy of the License at 1466 * 1467 * http://www.apache.org/licenses/LICENSE-2.0 1468 * 1469 * Unless required by applicable law or agreed to in writing, softw
1469are 1470 * distributed under the License is distributed on an "AS IS" BASIS, 1471 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1472 * See the License for the specific language governing permissions and 1473 * limitations under the License. 1474 */const $3=new ec(3e4,6e4);function pS(){const t=$r().___jsl;if(t!=null&&t.H){for(const e of Object.keys(t.H))if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=[...t.H[e].L],t.CP)for(let r=0;r<t.CP.length;r++)t.CP[r]=null}}function L3(t){return new Promise((e,r)=>{var i,s,o;function a(){pS(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{pS(),r(Nr(t,"network-request-failed"))},timeout:$3.get()})}if(!((s=(i=$r().gapi)===null||i===void 0?void 0:i.iframes)===null||s===void 0)&&s.Iframe)e(gapi.iframes.getContext());else if(!((o=$r().gapi)===null||o===void 0)&&o.load)a();else{const l=g3("iframefcb");return $r()[l]=()=>{gapi.load?a():r(Nr(t,"network-request-failed"))},p3(`https://apis.google.com/js/api.js?onload=${l}`).catch(c=>r(c))}}).catch(e=>{throw xd=null,e})}let xd=null;function F3(t){return xd=xd||L3(t),xd}/** 1475 * @license 1476 * Copyright 2020 Google LLC. 1477 * 1478 * Licensed under the Apache License, Version 2.0 (the "License"); 1479 * you may not use this file except in compliance with the License. 1480 * You may obtain a copy of the License at 1481 * 1482 * http://www.apache.org/licenses/LICENSE-2.0 1483 * 1484 * Unless required by applicable law or agreed to in writing, software 1485 * distributed under the License is distributed on an "AS IS" BASIS, 1486 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1487 * See the License for the specific language governing permissions and 1488 * limitations under the License. 1489 */const U3=new ec(5e3,15e3),B3="__/auth/iframe",j3="emulator/auth/iframe",z3={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},V3=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function W3(t){const e=t.config;Ie(e.authDomain,t,"auth-domain-config-required");const r=e.emulator?a0(e,j3):`https://${t.config.authDomain}/${B3}`,i={apiKey:e.apiKey,appName:t.name,v:Ea},s=V3.get(t.config.apiHost);s&&(i.eid=s);const o=t._getFrameworks();return o.length&&(i.fw=o.join(",")),`${r}?${Zu(i).slice(1)}`}async function G3(t){const e=await F3(t),r=$r().gapi;return Ie(r,t,"internal-error"),e.open({where:document.body,url:W3(t),messageHandlersFilter:r.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:z3,dontclear:!0},i=>new Promise(async(s,o)=>{await i.restyle({setHideOnLeave:!1});const a=Nr(t,"network-request-failed"),l=$r().setTimeout(()=>{o(a)},U3.get());function c(){$r().clearTimeout(l),s(i)}i.ping(c).then(c,()=>{o(a)})}))}/** 1490 * @license 1491 * Copyright 2020 Google LLC. 1492 * 1493 * Licensed under the Apache License, Version 2.0 (the "License"); 1494 * you may not use this file except in compliance with the License. 1495 * You may obtain a copy of the License at 1496 * 1497 * http://www.apache.org/licenses/LICENSE-2.0 1498 * 1499 * Unless required by applicable law or agreed to in writing, software 1500 * distributed under the License is distributed on an "AS IS" BASIS, 1501 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1502 * See the License for the specific language governing permissions and 1503 * limitations under the License. 1504 */const H3={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},q3=500,K3=600,Y3="_blank",X3="http://localhost";class gS{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function Q3(t,e,r,i=q3,s=K3){const o=Math.max((window.screen.availHeight-s)/2,0).toString(),a=Math.max((window.screen.availWidth-i)/2,0).toString();let l="";const c=Object.assign(Object.assign({},H3),{width:i.toString(),height:s.toString(),top:o,left:a}),d=vn().toLowerCase();r&&(l=kk(d)?Y3:r),Ek(d)&&(e=e||X3,c.scrollbars="yes");const f=Object.entries(c).reduce((v,[_,w])=>`${v}${_}=${w},`,"");if(k5(d)&&l!=="_self")return J3(e||"",l),new gS(null);const g=window.open(e||"",l,f);Ie(g,t,"popup-blocked");try{g.focus()}catch{}return new gS(g)}function J3(t,e){const r=document.createElement("a");r.href=t,r.target=e;const i=document.createEvent("MouseEvent");
1504i.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),r.dispatchEvent(i)}/** 1505 * @license 1506 * Copyright 2021 Google LLC 1507 * 1508 * Licensed under the Apache License, Version 2.0 (the "License"); 1509 * you may not use this file except in compliance with the License. 1510 * You may obtain a copy of the License at 1511 * 1512 * http://www.apache.org/licenses/LICENSE-2.0 1513 * 1514 * Unless required by applicable law or agreed to in writing, software 1515 * distributed under the License is distributed on an "AS IS" BASIS, 1516 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1517 * See the License for the specific language governing permissions and 1518 * limitations under the License. 1519 */const Z3="__/auth/handler",eF="emulator/auth/handler";function mS(t,e,r,i,s,o){Ie(t.config.authDomain,t,"auth-domain-config-required"),Ie(t.config.apiKey,t,"invalid-api-key");const a={apiKey:t.config.apiKey,appName:t.name,authType:r,redirectUrl:i,v:Ea,eventId:s};if(e instanceof $k){e.setDefaultLanguage(t.languageCode),a.providerId=e.providerId||"",K$(e.getCustomParameters())||(a.customParameters=JSON.stringify(e.getCustomParameters()));for(const[c,d]of Object.entries(o||{}))a[c]=d}if(e instanceof rc){const c=e.getScopes().filter(d=>d!=="");c.length>0&&(a.scopes=c.join(","))}t.tenantId&&(a.tid=t.tenantId);const l=a;for(const c of Object.keys(l))l[c]===void 0&&delete l[c];return`${tF(t)}?${Zu(l).slice(1)}`}function tF({config:t}){return t.emulator?a0(t,eF):`https://${t.authDomain}/${Z3}`}/** 1520 * @license 1521 * Copyright 2020 Google LLC 1522 * 1523 * Licensed under the Apache License, Version 2.0 (the "License"); 1524 * you may not use this file except in compliance with the License. 1525 * You may obtain a copy of the License at 1526 * 1527 * http://www.apache.org/licenses/LICENSE-2.0 1528 * 1529 * Unless required by applicable law or agreed to in writing, software 1530 * distributed under the License is distributed on an "AS IS" BASIS, 1531 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1532 * See the License for the specific language governing permissions and 1533 * limitations under the License. 1534 */const og="webStorageSupport";class nF{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=qk,this._completeRedirectFn=T3,this._overrideRedirectResult=_3}async _openPopup(e,r,i,s){var o;ri((o=this.eventManagers[e._key()])===null||o===void 0?void 0:o.manager,"_initialize() not called before _openPopup()");const a=mS(e,r,i,Bm(),s);return Q3(e,a,p0())}async _openRedirect(e,r,i,s){return await this._originValidation(e),r3(mS(e,r,i,Bm(),s)),new Promise(()=>{})}_initialize(e){const r=e._key();if(this.eventManagers[r]){const{manager:s,promise:o}=this.eventManagers[r];return s?Promise.resolve(s):(ri(o,"If manager is not set, promise should be"),o)}const i=this.initAndGetManager(e);return this.eventManagers[r]={promise:i},i.catch(()=>{delete this.eventManagers[r]}),i}async initAndGetManager(e){const r=await G3(e),i=new R3(e);return r.register("authEvent",s=>(Ie(s==null?void 0:s.authEvent,e,"invalid-auth-event"),{status:i.onEvent(s.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:i},this.iframes[e._key()]=r,i}_isIframeWebStorageSupported(e,r){this.iframes[e._key()].send(og,{type:og},s=>{var o;const a=(o=s==null?void 0:s[0])===null||o===void 0?void 0:o[og];a!==void 0&&r(!!a),or(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const r=e._key();return this.originValidationPromises[r]||(this.originValidationPromises[r]=M3(e)),this.originValidationPromises[r]}get _shouldInitProactively(){return Ak()||u0()||bf()}}const rF=nF;var yS="@firebase/auth",vS="0.20.7";/** 1535 * @license 1536 * Copyright 2020 Google LLC 1537 * 1538 * Licensed under the Apache License, Version 2.0 (the "License"); 1539 * you may not use this file except in compliance with the License. 1540 * You may obtain a copy of the License at 1541 * 1542 * http://www.apache.org/licenses/LICENSE-2.0 1543 * 1544 * Unless required by applicable law or agreed to in writing, software 1545 * distributed under the License is distributed on an "AS IS" BASIS, 1546 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1547 * See the License for the specific language governing permissions and 1548 * limitations under the License. 1549 */class iF{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),((e=this.auth.currentUser)===null||e===void 0?void 0:e.uid)||null}async getToken(e){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const r=this.auth.onIdTokenChanged(i=>{var s;e(((s=i)===null||s===void 0?void 0:s.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,r),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const r=this.internalListeners.get(e);r&&(this.internalListeners.delete(e),r(),this.updateProactiveRefresh())}assertAuthConfigured(){Ie(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/** 1550 * @license 1551 * Copyright 2020 Google LLC 1552 * 1553 * Licensed under the Apache License, Version 2.0 (the "License");
1554 * you may not use this file except in compliance with the License. 1555 * You may obtain a copy of the License at 1556 * 1557 * http://www.apache.org/licenses/LICENSE-2.0 1558 * 1559 * Unless required by applicable law or agreed to in writing, software 1560 * distributed under the License is distributed on an "AS IS" BASIS, 1561 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1562 * See the License for the specific language governing permissions and 1563 * limitations under the License. 1564 */function sF(t){switch(t){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}function oF(t){qs(new Qi("auth",(e,{options:r})=>{const i=e.getProvider("app").getImmediate(),s=e.getProvider("heartbeat"),{apiKey:o,authDomain:a}=i.options;return((l,c)=>{Ie(o&&!o.includes(":"),"invalid-api-key",{appName:l.name}),Ie(!(a!=null&&a.includes(":")),"argument-error",{appName:l.name});const d={apiKey:o,authDomain:a,clientPlatform:t,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Ok(t)},f=new P5(l,c,d);return u5(f,r),f})(i,s)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,r,i)=>{e.getProvider("auth-internal").initialize()})),qs(new Qi("auth-internal",e=>{const r=nc(e.getProvider("auth").getImmediate());return(i=>new iF(i))(r)},"PRIVATE").setInstantiationMode("EXPLICIT")),Mr(yS,vS,sF(t)),Mr(yS,vS,"esm2017")}/** 1565 * @license 1566 * Copyright 2021 Google LLC 1567 * 1568 * Licensed under the Apache License, Version 2.0 (the "License"); 1569 * you may not use this file except in compliance with the License. 1570 * You may obtain a copy of the License at 1571 * 1572 * http://www.apache.org/licenses/LICENSE-2.0 1573 * 1574 * Unless required by applicable law or agreed to in writing, software 1575 * distributed under the License is distributed on an "AS IS" BASIS, 1576 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1577 * See the License for the specific language governing permissions and 1578 * limitations under the License. 1579 */function aF(t=i0()){const e=vf(t,"auth");return e.isInitialized()?e.getImmediate():l5(t,{popupRedirectResolver:rF,persistence:[h3,e3,qk]})}oF("Browser");var lF=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},xe,m0=m0||{},De=lF||self;function ch(){}function Cf(t){var e=typeof t;return e=e!="object"?e:t?Array.isArray(t)?"array":e:"null",e=="array"||e=="object"&&typeof t.length=="number"}function sc(t){var e=typeof t;return e=="object"&&t!=null||e=="function"}function uF(t){return Object.prototype.hasOwnProperty.call(t,ag)&&t[ag]||(t[ag]=++cF)}var ag="closure_uid_"+(1e9*Math.random()>>>0),cF=0;function dF(t,e,r){return t.call.apply(t.bind,arguments)}function hF(t,e,r){if(!t)throw Error();if(2<arguments.length){var i=Array.prototype.slice.call(arguments,2);return function(){var s=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(s,i),t.apply(e,s)}}return function(){return t.apply(e,arguments)}}function gn(t,e,r){return Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?gn=dF:gn=hF,gn.apply(null,arguments)}function Gc(t,e){var r=Array.prototype.slice.call(arguments,1);return function(){var i=r.slice();return i.push.apply(i,arguments),t.apply(this,i)}}function sn(t,e){function r(){}r.prototype=e.prototype,t.X=e.prototype,t.prototype=new r,t.prototype.constructor=t,t.Vb=function(i,s,o){for(var a=Array(arguments.length-2),l=2;l<arguments.length;l++)a[l-2]=arguments[l];return e.prototype[s].apply(i,a)}}function ls(){this.s=this.s,this.o=this.o}var fF=0;ls.prototype.s=!1;ls.prototype.na=function(){!this.s&&(this.s=!0,this.M(),fF!=0)&&uF(this)};ls.prototype.M=function(){if(this.o)for(;this.o.length;)this.o.shift()()};const eT=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if(typeof t=="string")return typeof e!="string"||e.length!=1?-1:t.indexOf(e,0);for(let r=0;r<t.length;r++)if(r in t&&t[r]===e)return r;return-1};function y0(t){const e=t.length;if(0<e){const r=Array(e);for(let i=0;i<e;i++)r[i]=t[i];return r}return[]}function bS(t,e){for(let r=1;r<arguments.length;r++){const i=arguments[r];if(Cf(i)){const s=t.length||0,o=i.length||0;t.length=s+o;for(let a=0;a<o;a++)t[s+a]=i[a]}else t.push(i)}}function mn(t,e){this.type=t,this.g=this.target=e,this.defaultPrevented=!1}mn.prototype.h=function(){this.defaultPrevented=!0};var pF=function(){if(!De.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});try{De.addEventListener("test",ch,e),De.removeEventListener("test",ch,e)}catch{}return t}();function dh(t){return/^[\s\xa0]*$/.test(t)}var wS=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]};function lg(t,e){return t<e?-1:t>e?1:0}function xf(){var t=De.navigator;return t&&(t=t.userAgent)?t:""}function Er(t){return xf().indexOf(t)!=-1}function v0(t){return v0[" "](t),t}v0[" "]=ch;function gF(t){var e=vF;return Object.prototype.hasOwnProperty.call(e,9)?e[9]:e[9]=t(9)}var mF=Er("Opera"),sa=Er("Trident")||Er("MSIE"),tT=Er("Edge"),Vm=tT||sa,nT=Er("Gecko")&&!(xf().toLowerCase().indexOf("webkit")!=-1&&!Er("Edge"))&&!(Er("Trident")||Er("MSIE"))&&!Er("Edge"),yF=xf().toLowerCase().indexOf("webkit")!=-1&&!Er("Edge");function rT(){var t=De.document;return t?t.documentMode:void 0}var hh;e:{var ug="",cg=function(){var t=xf();if(nT)return/rv:([^\);]+)(\)|;)/.exec(t);if(tT)return/Edge\/([\d\.]+)/.exec(t);if(sa)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(t);if(yF)return/WebKit\/(\S+)/.exec(t);if(mF)return/(?:Version)[ \/]?(\S+)/.exec(t)}();if(cg&&(ug=cg?cg[1]:""),sa){var dg=rT();if(dg!=null&&dg>parseFloat(ug)){hh=String(dg);break e}}hh=ug}var vF={};function bF(){return gF(function(){let t=0;const e=wS(String(hh)).split("."),r=wS("9").split("."),i=Math.max(e.length,r.length);for(let a=0;t==0&&a<i;a++){var s=e[a]||"",o=r[a]||"";do{if(s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],o=/(\d*)(\D*)(.*)/.exec(o)||["","","",""],s[0].length==0&&o[0].length==0)break;t=lg(s[1].length==0?0:parseInt(s[1],10),o[1].length==0?0:parseInt(o[1],10))||lg(s[2].length==0,o[2].length==0)||lg(s[2],o[2]),s=s[3],o=o[3]}while(t==0)}return 0<=t})}var Wm;if(De.document&&sa){var SS=rT();Wm=SS||parseInt(hh,10)||void 0}else Wm=void 0;var wF=Wm;function _u(t,e){if(mn.call(this,t?t.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,t){var r=this.t
vendor: 5,703 bytes, line 1579
1579ype=t.type,i=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.g=e,e=t.relatedTarget){if(nT){e:{try{v0(e.nodeName);var s=!0;break e}catch{}s=!1}s||(e=null)}}else r=="mouseover"?e=t.fromElement:r=="mouseout"&&(e=t.toElement);this.relatedTarget=e,i?(this.clientX=i.clientX!==void 0?i.clientX:i.pageX,this.clientY=i.clientY!==void 0?i.clientY:i.pageY,this.screenX=i.screenX||0,this.screenY=i.screenY||0):(this.clientX=t.clientX!==void 0?t.clientX:t.pageX,this.clientY=t.clientY!==void 0?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType=typeof t.pointerType=="string"?t.pointerType:SF[t.pointerType]||"",this.state=t.state,this.i=t,t.defaultPrevented&&_u.X.h.call(this)}}sn(_u,mn);var SF={2:"touch",3:"pen",4:"mouse"};_u.prototype.h=function(){_u.X.h.call(this);var t=this.i;t.preventDefault?t.preventDefault():t.returnValue=!1};var oc="closure_listenable_"+(1e6*Math.random()|0),CF=0;function xF(t,e,r,i,s){this.listener=t,this.proxy=null,this.src=e,this.type=r,this.capture=!!i,this.ha=s,this.key=++CF,this.ba=this.ea=!1}function _f(t){t.ba=!0,t.listener=null,t.proxy=null,t.src=null,t.ha=null}function b0(t,e,r){for(const i in t)e.call(r,t[i],i,t)}function iT(t){const e={};for(const r in t)e[r]=t[r];return e}const CS="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function sT(t,e){let r,i;for(let s=1;s<arguments.length;s++){i=arguments[s];for(r in i)t[r]=i[r];for(let o=0;o<CS.length;o++)r=CS[o],Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}}function Ef(t){this.src=t,this.g={},this.h=0}Ef.prototype.add=function(t,e,r,i,s){var o=t.toString();t=this.g[o],t||(t=this.g[o]=[],this.h++);var a=Hm(t,e,i,s);return-1<a?(e=t[a],r||(e.ea=!1)):(e=new xF(e,this.src,o,!!i,s),e.ea=r,t.push(e)),e};function Gm(t,e){var r=e.type;if(r in t.g){var i=t.g[r],s=eT(i,e),o;(o=0<=s)&&Array.prototype.splice.call(i,s,1),o&&(_f(e),t.g[r].length==0&&(delete t.g[r],t.h--))}}function Hm(t,e,r,i){for(var s=0;s<t.length;++s){var o=t[s];if(!o.ba&&o.listener==e&&o.capture==!!r&&o.ha==i)return s}return-1}var w0="closure_lm_"+(1e6*Math.random()|0),hg={};function oT(t,e,r,i,s){if(i&&i.once)return lT(t,e,r,i,s);if(Array.isArray(e)){for(var o=0;o<e.length;o++)oT(t,e[o],r,i,s);return null}return r=x0(r),t&&t[oc]?t.N(e,r,sc(i)?!!i.capture:!!i,s):aT(t,e,r,!1,i,s)}function aT(t,e,r,i,s,o){if(!e)throw Error("Invalid event type");var a=sc(s)?!!s.capture:!!s,l=C0(t);if(l||(t[w0]=l=new Ef(t)),r=l.add(e,r,i,a,o),r.proxy)return r;if(i=_F(),r.proxy=i,i.src=t,i.listener=r,t.addEventListener)pF||(s=a),s===void 0&&(s=!1),t.addEventListener(e.toString(),i,s);else if(t.attachEvent)t.attachEvent(cT(e.toString()),i);else if(t.addListener&&t.removeListener)t.addListener(i);else throw Error("addEventListener and attachEvent are unavailable.");return r}function _F(){function t(r){return e.call(t.src,t.listener,r)}const e=EF;return t}function lT(t,e,r,i,s){if(Array.isArray(e)){for(var o=0;o<e.length;o++)lT(t,e[o],r,i,s);return null}return r=x0(r),t&&t[oc]?t.O(e,r,sc(i)?!!i.capture:!!i,s):aT(t,e,r,!0,i,s)}function uT(t,e,r,i,s){if(Array.isArray(e))for(var o=0;o<e.length;o++)uT(t,e[o],r,i,s);else i=sc(i)?!!i.capture:!!i,r=x0(r),t&&t[oc]?(t=t.i,e=String(e).toString(),e in t.g&&(o=t.g[e],r=Hm(o,r,i,s),-1<r&&(_f(o[r]),Array.prototype.splice.call(o,r,1),o.length==0&&(delete t.g[e],t.h--)))):t&&(t=C0(t))&&(e=t.g[e.toString()],t=-1,e&&(t=Hm(e,r,i,s)),(r=-1<t?e[t]:null)&&S0(r))}function S0(t){if(typeof t!="number"&&t&&!t.ba){var e=t.src;if(e&&e[oc])Gm(e.i,t);else{var r=t.type,i=t.proxy;e.removeEventListener?e.removeEventListener(r,i,t.capture):e.detachEvent?e.detachEvent(cT(r),i):e.addListener&&e.removeListener&&e.removeListener(i),(r=C0(e))?(Gm(r,t),r.h==0&&(r.src=null,e[w0]=null)):_f(t)}}}function cT(t){return t in hg?hg[t]:hg[t]="on"+t}function EF(t,e){if(t.ba)t=!0;else{e=new _u(e,this);var r=t.listener,i=t.ha||t.src;t.ea&&S0(t),t=r.call(i,e)}return t}function C0(t){return t=t[w0],t instanceof Ef?t:null}var fg="__closure_events_fn_"+(1e9*Math.random()>>>0);function x0(t){return typeof t=="function"?t:(t[fg]||(t[fg]=function(e){return t.handleEvent(e)}),t[fg])}function Vt(){ls.call(this),this.i=new Ef(this),this.P=this,this.I=null}sn(Vt,ls);Vt.prototype[oc]=!0;Vt.prototype.removeEventListener=function(t,e,r,i){uT(this,t,e,r,i)};function Zt(t,e){var r,i=t.I;if(i)for(r=[];i;i=i.I)r.push(i);if(t=t.P,i=e.type||e,typeof e=="string")e=new mn(e,t);else if(e instanceof mn)e.target=e.target||t;else{var s=e;e=new mn(i,t),sT(e,s)}if(s=!0,r)for(var o=r.length-1;0<=o;o--){var a=e.g=r[o];s=Hc(a,i,!0,e)&&s}if(a=e.g=t,s=Hc(a,i,!0,e)&&s,s=Hc(a,i,!1,e)&&s,r)for(o=0;o<r.length;o++)a=e.g=r[o],s=Hc(a,i,!1,e)&&s}Vt.prototype.M=function(){if(Vt.X.M.call(this),this.i){var t=this.i,e;for(e in t.g){for(var r=t.g[e],i=0;i<r.length;i++)_f(r[i]);delete t.g[e],t.h--}}this.I=null};Vt.prototype.N=function(t,e,r,i){return this.i.add(String(t),e,!1,r,i)};Vt.prototype.O=function(t,e,r,i){return this.i.add(String(t),e,!0,r,i)};function Hc(t,e,r,i){if(e=t.i.g[String(e)],!e)return!0;e=e.concat();for(var s=!0,o=0;o<e.length;++o){var a=e[o];if(a&&!a.ba&&a.capture==r){var l=a.listener,c=a.ha||a.src;a.ea&&Gm(t.i,a),s=l.call(c,i)!==!1&&s}}return s&&!i.defaultPrevented}var _0=De.JSON.stringify;function kF(){var t=fT;let e=null;return t.g&&(e=t.g,t.g=t.g.next,t.g||(t.h=null),e.next=null),e}class TF{constructor(){this.h=this.g=null}add(e,r){const i=dT.get();i.set(e,r),this.h?this.h.next=i:this.g=i,this.h=i}}
1579var dT=new class{constructor(t,e){this.i=t,this.j=e,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}}(()=>new IF,t=>t.reset());class IF{constructor(){this.next=this.g=this.h=null}set(e,r){this.h=e,this.g=r,this.next=null}reset(){this.next=this.g=this.h=null}}function RF(t){De.setTimeout(()=>{throw t},0)}function hT(t,e){qm||PF(),Km||(qm(),Km=!0),fT.add(t,e)}var qm;function PF(){var t=De.Promise.resolve(void 0);qm=function(){t.then(AF)}}var Km=!1,fT=new TF;function AF(){for(var t;t=kF();){try{t.h.call(t.g)}catch(r){RF(r)}var e=dT;e.j(t),100>e.h&&(e.h++,t.next=e.g,e.g=t)}Km=!1}function kf(t,e){Vt.call(this),this.h=t||1,this.g=e||De,this.j=gn(this.kb,this),this.l=Date.now()}sn(kf,Vt);xe=kf.prototype;xe.ca=!1;xe.R=null;xe.kb=function(){if(this.ca){var t=Date.now()-this.l;0<t&&t<.8*this.h?this.R=this.g.setTimeout(this.j,this.h-t):(this.R&&(this.g.clearTimeout(this.R),this.R=null),Zt(this,"tick"),this.ca&&(E0(this),this.start()))}};xe.start=function(){this.ca=!0,this.R||(this.R=this.g.setTimeout(this.j,this.h),this.l=Date.now())};function E0(t){t.ca=!1,t.R&&(t.g.clearTimeout(t.R),t.R=null)}xe.M=function(){kf.X.M.call(this),E0(this),delete this.g};function k0(t,e,r){if(typeof t=="function")r&&(t=gn(t,r));else if(t&&typeof t.handleEvent=="function")t=gn(t.handleEvent,t);else throw Error("Invalid listener argument");return 2147483647<Number(e)?-1:De.setTimeout(t,e||0)}function pT(t){t.g=k0(()=>{t.g=null,t.i&&(t.i=!1,pT(t))},t.j);const e=t.h;t.h=null,t.m.apply(null,e)}class OF extends ls{constructor(e,r){super(),this.m=e,this.j=r,this.h=null,this.i=!1,this.g=null}l(e){this.h=arguments,this.g?this.i=!0:pT(this)}M(){super.M(),this.g&&(De.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function Eu(t){ls.call(this),this.h=t,this.g={}}sn(Eu,ls);var xS=[];function gT(t,e,r,i){Array.isArray(r)||(r&&(xS[0]=r.toString()),r=xS);for(var s=0;s<r.length;s++){var o=oT(e,r[s],i||t.handleEvent,!1,t.h||t);if(!o)break;t.g[o.key]=o}}function mT(t){b0(t.g,function(e,r){this.g.hasOwnProperty(r)&&S0(e)},t),t.g={}}Eu.prototype.M=function(){Eu.X.M.call(this),mT(this)};Eu.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};function Tf(){this.g=!0}Tf.prototype.Aa=function(){this.g=!1};function DF(t,e,r,i,s,o){t.info(function(){if(t.g)if(o)for(var a="",l=o.split("&"),c=0;c<l.length;c++){var d=l[c].split("=");if(1<d.length){var f=d[0];d=d[1];var g=f.split("_");a=2<=g.length&&g[1]=="type"?a+(f+"="+d+"&"):a+(f+"=redacted&")}}else a=null;else a=o;return"XMLHTTP REQ ("+i+") [attempt "+s+"]: "+e+` 1580`+r+` 1581`+a})}function MF(t,e,r,i,s,o,a){t.info(function(){return"XMLHTTP RESP ("+i+") [ attempt "+s+"]: "+e+` 1582`+r+` 1583`+o+" "+a})}function Oo(t,e,r,i){t.info(function(){return"XMLHTTP TEXT ("+e+"): "+$F(t,r)+(i?" "+i:"")})}function NF(t,e){t.info(function(){return"TIMEOUT: "+e})}Tf.prototype.info=function(){};function $F(t,e){if(!t.g)return e;if(!e)return null;try{var r=JSON.parse(e);if(r){for(t=0;t<r.length;t++)if(Array.isArray(r[t])){var i=r[t];if(!(2>i.length)){var s=i[1];if(Array.isArray(s)&&!(1>s.length)){var o=s[0];if(o!="noop"&&o!="stop"&&o!="close")for(var a=1;a<s.length;a++)s[a]=""}}}}return _0(r)}catch{return e}}var oo={},_S=null;function If(){return _S=_S||new Vt}oo.Oa="serverreachability";function yT(t){mn.call(this,oo.Oa,t)}sn(yT,mn);function ku(t){const e=If();Zt(e,new yT(e))}oo.STAT_EVENT="statevent";function vT(t,e){mn.call(this,oo.STAT_EVENT,t),this.stat=e}sn(vT,mn);function Sn(t){const e=If();Zt(e,new vT(e,t))}oo.Pa="timingevent";function bT(t,e){mn.call(this,oo.Pa,t),this.size=e}sn(bT,mn);function ac(t,e){if(typeof t!="function")throw Error("Fn must not be null and must be a function");return De.setTimeout(function(){t()},e)}var Rf={NO_ERROR:0,lb:1,yb:2,xb:3,sb:4,wb:5,zb:6,La:7,TIMEOUT:8,Cb:9},wT={qb:"complete",Mb:"success",Ma:"error",La:"abort",Eb:"ready",Fb:"readystatechange",TIMEOUT:"timeout",Ab:"incrementaldata",Db:"progress",tb:"downloadprogress",Ub:"uploadprogress"};function T0(){}T0.prototype.h=null;function ES(t){return t.h||(t.h=t.i())}function ST(){}var lc={OPEN:"a",pb:"b",Ma:"c",Bb:"d"};function I0(){mn.call(this,"d")}sn(I0,mn);function R0(){mn.call(this,"c")}sn(R0,mn);var Ym;function Pf(){}sn(Pf,T0);Pf.prototype.g=function(){return new XMLHttpRequest};Pf.prototype.i=function(){return{}};Ym=new Pf;function uc(t,e,r,i){this.l=t,this.j=e,this.m=r,this.U=i||1,this.S=new Eu(this),this.O=LF,t=Vm?125:void 0,this.T=new kf(t),this.H=null,this.i=!1,this.s=this.A=this.v=this.K=this.F=this.V=this.B=null,this.D=[],this.g=null,this.C=0,this.o=this.u=null,this.Y=-1,this.I=!1,this.N=0,this.L=null,this.$=this.J=this.Z=this.P=!1,this.h=new CT}function CT(){this.i=null,this.g="",this.h=!1}var LF=45e3,Xm={},fh={};xe=uc.prototype;xe.setTimeout=function(t){this.O=t};function Qm(t,e,r){t.K=1,t.v=Of(ii(e)),t.s=r,t.P=!0,xT(t,null)}function xT(t,e){t.F=Date.now(),cc(t),t.A=ii(t.v);var r=t.A,i=t.U;Array.isArray(i)||(i=[String(i)]),AT(r.i,"t",i),t.C=0,r=t.l.H,t.h=new CT,t.g=JT(t.l,r?e:null,!t.s),0<t.N&&(t.L=new OF(gn(t.K
1583a,t,t.g),t.N)),gT(t.S,t.g,"readystatechange",t.hb),e=t.H?iT(t.H):{},t.s?(t.u||(t.u="POST"),e["Content-Type"]="application/x-www-form-urlencoded",t.g.da(t.A,t.u,t.s,e)):(t.u="GET",t.g.da(t.A,t.u,null,e)),ku(),DF(t.j,t.u,t.A,t.m,t.U,t.s)}xe.hb=function(t){t=t.target;const e=this.L;e&&Jr(t)==3?e.l():this.Ka(t)};xe.Ka=function(t){try{if(t==this.g)e:{const f=Jr(this.g);var e=this.g.Ea();const g=this.g.aa();if(!(3>f)&&(f!=3||Vm||this.g&&(this.h.h||this.g.fa()||RS(this.g)))){this.I||f!=4||e==7||(e==8||0>=g?ku(3):ku(2)),Af(this);var r=this.g.aa();this.Y=r;t:if(_T(this)){var i=RS(this.g);t="";var s=i.length,o=Jr(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){Rs(this),Gl(this);var a="";break t}this.h.i=new De.TextDecoder}for(e=0;e<s;e++)this.h.h=!0,t+=this.h.i.decode(i[e],{stream:o&&e==s-1});i.splice(0,s),this.h.g+=t,this.C=0,a=this.h.g}else a=this.g.fa();if(this.i=r==200,MF(this.j,this.u,this.A,this.m,this.U,f,r),this.i){if(this.Z&&!this.J){t:{if(this.g){var l,c=this.g;if((l=c.g?c.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!dh(l)){var d=l;break t}}d=null}if(r=d)Oo(this.j,this.m,r,"Initial handshake response via X-HTTP-Initial-Response"),this.J=!0,Jm(this,r);else{this.i=!1,this.o=3,Sn(12),Rs(this),Gl(this);break e}}this.P?(ET(this,f,a),Vm&&this.i&&f==3&&(gT(this.S,this.T,"tick",this.gb),this.T.start())):(Oo(this.j,this.m,a,null),Jm(this,a)),f==4&&Rs(this),this.i&&!this.I&&(f==4?KT(this.l,this):(this.i=!1,cc(this)))}else r==400&&0<a.indexOf("Unknown SID")?(this.o=3,Sn(12)):(this.o=0,Sn(13)),Rs(this),Gl(this)}}}catch{}finally{}};function _T(t){return t.g?t.u=="GET"&&t.K!=2&&t.l.Da:!1}function ET(t,e,r){let i=!0,s;for(;!t.I&&t.C<r.length;)if(s=FF(t,r),s==fh){e==4&&(t.o=4,Sn(14),i=!1),Oo(t.j,t.m,null,"[Incomplete Response]");break}else if(s==Xm){t.o=4,Sn(15),Oo(t.j,t.m,r,"[Invalid Chunk]"),i=!1;break}else Oo(t.j,t.m,s,null),Jm(t,s);_T(t)&&s!=fh&&s!=Xm&&(t.h.g="",t.C=0),e!=4||r.length!=0||t.h.h||(t.o=1,Sn(16),i=!1),t.i=t.i&&i,i?0<r.length&&!t.$&&(t.$=!0,e=t.l,e.g==t&&e.$&&!e.K&&(e.j.info("Great, no buffering proxy detected. Bytes received: "+r.length),$0(e),e.K=!0,Sn(11))):(Oo(t.j,t.m,r,"[Invalid Chunked Response]"),Rs(t),Gl(t))}xe.gb=function(){if(this.g){var t=Jr(this.g),e=this.g.fa();this.C<e.length&&(Af(this),ET(this,t,e),this.i&&t!=4&&cc(this))}};function FF(t,e){var r=t.C,i=e.indexOf(` 1584`,r);return i==-1?fh:(r=Number(e.substring(r,i)),isNaN(r)?Xm:(i+=1,i+r>e.length?fh:(e=e.substr(i,r),t.C=i+r,e)))}xe.cancel=function(){this.I=!0,Rs(this)};function cc(t){t.V=Date.now()+t.O,kT(t,t.O)}function kT(t,e){if(t.B!=null)throw Error("WatchDog timer not null");t.B=ac(gn(t.fb,t),e)}function Af(t){t.B&&(De.clearTimeout(t.B),t.B=null)}xe.fb=function(){this.B=null;const t=Date.now();0<=t-this.V?(NF(this.j,this.A),this.K!=2&&(ku(),Sn(17)),Rs(this),this.o=2,Gl(this)):kT(this,this.V-t)};function Gl(t){t.l.G==0||t.I||KT(t.l,t)}function Rs(t){Af(t);var e=t.L;e&&typeof e.na=="function"&&e.na(),t.L=null,E0(t.T),mT(t.S),t.g&&(e=t.g,t.g=null,e.abort(),e.na())}function Jm(t,e){try{var r=t.l;if(r.G!=0&&(r.g==t||Zm(r.h,t))){if(!t.J&&Zm(r.h,t)&&r.G==3){try{var i=r.Fa.g.parse(e)}catch{i=null}if(Array.isArray(i)&&i.length==3){var s=i;if(s[0]==0){e:if(!r.u){if(r.g)if(r.g.F+3e3<t.F)mh(r),Nf(r);else break e;N0(r),Sn(18)}}else r.Ba=s[1],0<r.Ba-r.T&&37500>s[2]&&r.L&&r.A==0&&!r.v&&(r.v=ac(gn(r.bb,r),6e3));if(1>=MT(r.h)&&r.ja){try{r.ja()}catch{}r.ja=void 0}}else Ps(r,11)}else if((t.J||r.g==t)&&mh(r),!dh(e))for(s=r.Fa.g.parse(e),e=0;e<s.length;e++){let d=s[e];if(r.T=d[0],d=d[1],r.G==2)if(d[0]=="c"){r.I=d[1],r.ka=d[2];const f=d[3];f!=null&&(r.ma=f,r.j.info("VER="+r.ma));const g=d[4];g!=null&&(r.Ca=g,r.j.info("SVER="+r.Ca));const v=d[5];v!=null&&typeof v=="number"&&0<v&&(i=1.5*v,r.J=i,r.j.info("backChannelRequestTimeoutMs_="+i)),i=r;const _=t.g;if(_){const w=_.g?_.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(w){var o=i.h;o.g||w.indexOf("spdy")==-1&&w.indexOf("quic")==-1&&w.indexOf("h2")==-1||(o.j=o.l,o.g=new Set,o.h&&(P0(o,o.h),o.h=null))}if(i.D){const k=_.g?_.g.getResponseHeader("X-HTTP-Session-Id"):null;k&&(i.za=k,ft(i.F,i.D,k))}}r.G=3,r.l&&r.l.xa(),r.$&&(r.P=Date.now()-t.F,r.j.info("Handshake RTT: "+r.P+"ms")),i=r;var a=t;if(i.sa=QT(i,i.H?i.ka:null,i.V),a.J){NT(i.h,a);var l=a,c=i.J;c&&l.setTimeout(c),l.B&&(Af(l),cc(l)),i.g=a}else HT(i);0<r.i.length&&$f(r)}else d[0]!="stop"&&d[0]!="close"||Ps(r,7);else r.G==3&&(d[0]=="stop"||d[0]=="close"?d[0]=="stop"?Ps(r,7):M0(r):d[0]!="noop"&&r.l&&r.l.wa(d),r.A=0)}}ku(4)}catch{}}function UF(t){if(t.W&&typeof t.W=="function")return t.W();if(typeof Map<"u"&&t instanceof Map||typeof Set<"u"&&t instanceof Set)return Array.from(t.values());if(typeof t=="string")return t.split("");
vendor: 3,658 bytes, line 1584
1584if(Cf(t)){for(var e=[],r=t.length,i=0;i<r;i++)e.push(t[i]);return e}e=[],r=0;for(i in t)e[r++]=t[i];return e}function BF(t){if(t.oa&&typeof t.oa=="function")return t.oa();if(!t.W||typeof t.W!="function"){if(typeof Map<"u"&&t instanceof Map)return Array.from(t.keys());if(!(typeof Set<"u"&&t instanceof Set)){if(Cf(t)||typeof t=="string"){var e=[];t=t.length;for(var r=0;r<t;r++)e.push(r);return e}e=[],r=0;for(const i in t)e[r++]=i;return e}}}function TT(t,e){if(t.forEach&&typeof t.forEach=="function")t.forEach(e,void 0);else if(Cf(t)||typeof t=="string")Array.prototype.forEach.call(t,e,void 0);else for(var r=BF(t),i=UF(t),s=i.length,o=0;o<s;o++)e.call(void 0,i[o],r&&r[o],t)}var IT=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function jF(t,e){if(t){t=t.split("&");for(var r=0;r<t.length;r++){var i=t[r].indexOf("="),s=null;if(0<=i){var o=t[r].substring(0,i);s=t[r].substring(i+1)}else o=t[r];e(o,s?decodeURIComponent(s.replace(/\+/g," ")):"")}}}function Ns(t,e){if(this.g=this.s=this.j="",this.m=null,this.o=this.l="",this.h=!1,t instanceof Ns){this.h=e!==void 0?e:t.h,ph(this,t.j),this.s=t.s,this.g=t.g,gh(this,t.m),this.l=t.l,e=t.i;var r=new Tu;r.i=e.i,e.g&&(r.g=new Map(e.g),r.h=e.h),kS(this,r),this.o=t.o}else t&&(r=String(t).match(IT))?(this.h=!!e,ph(this,r[1]||"",!0),this.s=xl(r[2]||""),this.g=xl(r[3]||"",!0),gh(this,r[4]),this.l=xl(r[5]||"",!0),kS(this,r[6]||"",!0),this.o=xl(r[7]||"")):(this.h=!!e,this.i=new Tu(null,this.h))}Ns.prototype.toString=function(){var t=[],e=this.j;e&&t.push(_l(e,TS,!0),":");var r=this.g;return(r||e=="file")&&(t.push("//"),(e=this.s)&&t.push(_l(e,TS,!0),"@"),t.push(encodeURIComponent(String(r)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),r=this.m,r!=null&&t.push(":",String(r))),(r=this.l)&&(this.g&&r.charAt(0)!="/"&&t.push("/"),t.push(_l(r,r.charAt(0)=="/"?WF:VF,!0))),(r=this.i.toString())&&t.push("?",r),(r=this.o)&&t.push("#",_l(r,HF)),t.join("")};function ii(t){return new Ns(t)}function ph(t,e,r){t.j=r?xl(e,!0):e,t.j&&(t.j=t.j.replace(/:$/,""))}function gh(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.m=e}else t.m=null}function kS(t,e,r){e instanceof Tu?(t.i=e,qF(t.i,t.h)):(r||(e=_l(e,GF)),t.i=new Tu(e,t.h))}function ft(t,e,r){t.i.set(e,r)}function Of(t){return ft(t,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),t}function xl(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function _l(t,e,r){return typeof t=="string"?(t=encodeURI(t).replace(e,zF),r&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function zF(t){return t=t.charCodeAt(0),"%"+(t>>4&15).toString(16)+(t&15).toString(16)}var TS=/[#\/\?@]/g,VF=/[#\?:]/g,WF=/[#\?]/g,GF=/[#\?@]/g,HF=/#/g;function Tu(t,e){this.h=this.g=null,this.i=t||null,this.j=!!e}function us(t){t.g||(t.g=new Map,t.h=0,t.i&&jF(t.i,function(e,r){t.add(decodeURIComponent(e.replace(/\+/g," ")),r)}))}xe=Tu.prototype;xe.add=function(t,e){us(this),this.i=null,t=Ta(this,t);var r=this.g.get(t);return r||this.g.set(t,r=[]),r.push(e),this.h+=1,this};function RT(t,e){us(t),e=Ta(t,e),t.g.has(e)&&(t.i=null,t.h-=t.g.get(e).length,t.g.delete(e))}function PT(t,e){return us(t),e=Ta(t,e),t.g.has(e)}xe.forEach=function(t,e){us(this),this.g.forEach(function(r,i){r.forEach(function(s){t.call(e,s,i,this)},this)},this)};xe.oa=function(){us(this);const t=Array.from(this.g.values()),e=Array.from(this.g.keys()),r=[];for(let i=0;i<e.length;i++){const s=t[i];for(let o=0;o<s.length;o++)r.push(e[i])}return r};xe.W=function(t){us(this);let e=[];
1584if(typeof t=="string")PT(this,t)&&(e=e.concat(this.g.get(Ta(this,t))));else{t=Array.from(this.g.values());for(let r=0;r<t.length;r++)e=e.concat(t[r])}return e};xe.set=function(t,e){return us(this),this.i=null,t=Ta(this,t),PT(this,t)&&(this.h-=this.g.get(t).length),this.g.set(t,[e]),this.h+=1,this};xe.get=function(t,e){return t?(t=this.W(t),0<t.length?String(t[0]):e):e};function AT(t,e,r){RT(t,e),0<r.length&&(t.i=null,t.g.set(Ta(t,e),y0(r)),t.h+=r.length)}xe.toString=function(){if(this.i)return this.i;if(!this.g)return"";const t=[],e=Array.from(this.g.keys());for(var r=0;r<e.length;r++){var i=e[r];const o=encodeURIComponent(String(i)),a=this.W(i);for(i=0;i<a.length;i++){var s=o;a[i]!==""&&(s+="="+encodeURIComponent(String(a[i]))),t.push(s)}}return this.i=t.join("&")};function Ta(t,e){return e=String(e),t.j&&(e=e.toLowerCase()),e}function qF(t,e){e&&!t.j&&(us(t),t.i=null,t.g.forEach(function(r,i){var s=i.toLowerCase();i!=s&&(RT(this,i),AT(this,s,r))},t)),t.j=e}var KF=class{constructor(t,e){this.h=t,this.g=e}};function OT(t){this.l=t||YF,De.PerformanceNavigationTiming?(t=De.performance.getEntriesByType("navigation"),t=0<t.length&&(t[0].nextHopProtocol=="hq"||t[0].nextHopProtocol=="h2")):t=!!(De.g&&De.g.Ga&&De.g.Ga()&&De.g.Ga().Zb),this.j=t?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}var YF=10;function DT(t){return t.h?!0:t.g?t.g.size>=t.j:!1}function MT(t){return t.h?1:t.g?t.g.size:0}function Zm(t,e){return t.h?t.h==e:t.g?t.g.has(e):!1}function P0(t,e){t.g?t.g.add(e):t.h=e}function NT(t,e){t.h&&t.h==e?t.h=null:t.g&&t.g.has(e)&&t.g.delete(e)}OT.prototype.cancel=function(){if(this.i=$T(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const t of this.g.values())t.cancel();this.g.clear()}};function $T(t){if(t.h!=null)return t.i.concat(t.h.D);if(t.g!=null&&t.g.size!==0){let e=t.i;for(const r of t.g.values())e=e.concat(r.D);return e}return y0(t.i)}function A0(){}A0.prototype.stringify=function(t){return De.JSON.stringify(t,void 0)};A0.prototype.parse=function(t){return De.JSON.parse(t,void 0)};function XF(){this.g=new A0}function QF(t,e,r){const i=r||"";try{TT(t,function(s,o){let a=s;sc(s)&&(a=_0(s)),e.push(i+o+"="+encodeURIComponent(a))})}catch(s){throw e.push(i+"type="+encodeURIComponent("_badmap")),s}}function JF(t,e){const r=new Tf;if(De.Image){const i=new Image;i.onload=Gc(qc,r,i,"TestLoadImage: loaded",!0,e),i.onerror=Gc(qc,r,i,"TestLoadImage: error",!1,e),i.onabort=Gc(qc,r,i,"TestLoadImage: abort",!1,e),i.ontimeout=Gc(qc,r,i,"TestLoadImage: timeout",!1,e),De.setTimeout(function(){i.ontimeout&&i.ontimeout()},1e4),i.src=t}else e(!1)}function qc(t,e,r,i,s){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,s(i)}catch{}}function dc(t){this.l=t.$b||null,this.j=t.ib||!1}sn(dc,T0);dc.prototype.g=function(){return new Df(this.l,this.j)};dc.prototype.i=function(t){return function(){return t}}({});function Df(t,e){Vt.call(this),this.D=t,this.u=e,this.m=void 0,this.readyState=O0,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}sn(Df,Vt);var O0=0;xe=Df.prototype;xe.open=function(t,e){if(this.readyState!=O0)throw this.abort(),Error("Error reopening a connection");this.C=t,this.B=e,this.readyState=1,Iu(this)};xe.send=function(t){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;const e={headers:this.v,method:this.C,credentials:this.m,cache:void 0};t&&(e.body=t),(this.D||De).fetch(new Request(this.B,e)).then(this.Va.bind(this),this.ga.bind(this))};xe.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,hc(this)),this.readyState=O0};xe.Va=function(t){if(this.g&&(this.l=t,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=t.headers,this.readyState=2,Iu(this)),this.g&&(this.readyState=3,Iu(this),this.g)))if(this.responseType==="arraybuffer")t.arrayBuffer().then(this.Ta.bind(this),this.ga.bind(this));else if(typeof De.ReadableStream<"u"&&"body"in t){if(this.j=t.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;LT(this)}else t.text().then(this.Ua.bind(this),this.ga.bind(this))};function LT(t){t.j.read().then(t.Sa.bind(t)).catch(t.ga.bind(t))}xe.Sa=function(t){if(this.g){if(this.u&&t.value)this.response.push(t.value);else if(!this.u){var e=t.value?t.value:new Uint8Array(0);(e=this.A.decode(e,{stream:!t.done}))&&(this.response=this.responseText+=e)}t.done?hc(this):Iu(this),this.readyState==3&<(this)}};xe.Ua=function(t){this.g&&(this.response=this.responseText=t,hc(this))};xe.Ta=function(t){this.g&&(this.response=t,hc(this))};xe.ga=function(){this.g&&hc(this)};function hc(t){t.readyState=4,t.l=null,t.j=null,t.A=null,Iu(t)}xe.setRequestHeader=function(t,e){this.v.append(t,e)};xe.getResponseHeader=function(t){return this.h&&this.h.get(t.toLowerCase())||""};xe.getAllResponseHeaders=function(){if(!this.h)return"";const t=[],e=this.h.entries();for(var r=e.next();!r.done;)r=r.value,t.push(r[0]+": "+r[1]),r=e.next();return t.join(`\r 1585`)};function Iu(t){t.onreadystatechange&&t.onreadystatechange.call(t)}Object.defineProperty(Df.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(t){this.m=t?"include":"same-origin"}});var ZF=De.JSON.parse;function Dt(t){Vt.call(this),this.headers=new Map,this.u=t||null,this.h=!1,this.C=this.g=null,this.H="",this.m=0,this.j="",this.l=this.F=this.v=this.D=!1,this.B=0,this.A=null,this.J=FT,this.K=this.L=!1}sn(Dt,Vt);var FT="",e4=/^https?$/i,t4=["POST","PUT"];xe=Dt.prototype;xe.da=function(t,e,r,i){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.H+"; newUri="+t);e=e?e.toUpperCase():"GET",this.H=t,this.j="",this.m=0,this.D=!1,this.h=!0,this.g=this.u?this.u.g():Ym.g(),this.C=this.u?ES(this.u):ES(Ym),this.g.onreadystatechange=gn(this.Ha,this);try{this.F=!0,this.g.open(e,String(t),!0),this.F=!1}catch(o){IS(this,o);return}if(t=r||"",r=new Map(this.headers),i)if(Object.getPrototypeOf(i)===Object.prototype)for(var s in i)r.set(s,i[s]);else if(typeof i.keys=="function"&&typeof i.get=="function")for(const o of i.keys())r.set(o,i.get(o));else throw Error("Unknown input type for opt_headers: "+String(i));i=Array.from(r.keys()).find(o=>o.toLowerCase()=="content-type"),s=De.FormData&&t instanceof De.FormData,!(0<=eT(t4,e))||i||s||r.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[o,a]of r)this.g.setRequestHeader(o,a);this.J&&(this.g.responseType=this.J),"withCredentials"in this.g&&this.g.withCredentials!==this.L&&(this.g.withCredentials=this.L);try{jT(this),0<this.B&&((this.K=n4(this.g))?(this.g.timeout=this.B,this.g.ontimeout=gn(this.qa,this)):this.A=k0(this.qa,this.B,this)),this.v=!0,this.g.send(t),this.v=!1}catch(o){IS(this,o)}};function n4(t){return sa&&bF()&&typeof t.timeout=="number"&&t.ontimeout!==void 0}xe.qa=function(){typeof m0<"u"&&this.g&&(this.j="Timed out after "+this.B+"ms, aborting",this.m=8,Zt(this,"timeout"),this.abort(8))};function IS(t,e){t.h=!1,t.g&&(t.l=!0,t.g.abort(),t.l=!1),t.j=e,t.m=5,UT(t),Mf(t)}function UT(t){t.D||(t.D=!0,Zt(t,"complete"),Zt(t,"error"))}xe.abort=function(t){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=t||7,Zt(this,"complete"),Zt(this,"abort"),Mf(this))};xe.M=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),Mf(this,!0)),Dt.X.M.call(this)};xe.Ha=function(){this.s||(this.F||this.v||this.l?BT(this):this.eb())};xe.eb=function(){BT(this)};function BT(t){if(t.h&&typeof m0<"u"&&(!t.C[1]||Jr(t)!=4||t.aa()!=2)){if(t.v&&Jr(t)==4)k0(t.Ha,0,t);else if(Zt(t,"readystatechange"),Jr(t)==4){t.h=!1;try{const l=t.aa();e:switch(l){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var e=!0;break e;default:e=!1}var r;if(!(r=e)){var i;if(i=l===0){var s=String(t.H).match(IT)[1]||null;if(!s&&De.self&&De.self.location){var o=De.self.location.protocol;s=o.substr(0,o.length-1)}i=!e4.test(s?s.toLowerCase():"")}r=i}if(r)Zt(t,"complete"),Zt(t,"success");else{t.m=6;try{var a=2<Jr(t)?t.g.statusText:""}catch{a=""}t.j=a+" ["+t.aa()+"]",UT(t)}}finally{Mf(t)}
vendor: 8,362 bytes, lines 1585-1586
1585}}}function Mf(t,e){if(t.g){jT(t);const r=t.g,i=t.C[0]?ch:null;t.g=null,t.C=null,e||Zt(t,"ready");try{r.onreadystatechange=i}catch{}}}function jT(t){t.g&&t.K&&(t.g.ontimeout=null),t.A&&(De.clearTimeout(t.A),t.A=null)}function Jr(t){return t.g?t.g.readyState:0}xe.aa=function(){try{return 2<Jr(this)?this.g.status:-1}catch{return-1}};xe.fa=function(){try{return this.g?this.g.responseText:""}catch{return""}};xe.Ra=function(t){if(this.g){var e=this.g.responseText;return t&&e.indexOf(t)==0&&(e=e.substring(t.length)),ZF(e)}};function RS(t){try{if(!t.g)return null;if("response"in t.g)return t.g.response;switch(t.J){case FT:case"text":return t.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in t.g)return t.g.mozResponseArrayBuffer}return null}catch{return null}}xe.Ea=function(){return this.m};xe.Na=function(){return typeof this.j=="string"?this.j:String(this.j)};function zT(t){let e="";return b0(t,function(r,i){e+=i,e+=":",e+=r,e+=`\r 1586`}),e}function D0(t,e,r){e:{for(i in r){var i=!1;break e}i=!0}i||(r=zT(r),typeof t=="string"?r!=null&&encodeURIComponent(String(r)):ft(t,e,r))}function al(t,e,r){return r&&r.internalChannelParams&&r.internalChannelParams[t]||e}function VT(t){this.Ca=0,this.i=[],this.j=new Tf,this.ka=this.sa=this.F=this.V=this.g=this.za=this.D=this.ia=this.o=this.S=this.s=null,this.$a=this.U=0,this.Ya=al("failFast",!1,t),this.L=this.v=this.u=this.m=this.l=null,this.Y=!0,this.pa=this.Ba=this.T=-1,this.Z=this.A=this.C=0,this.Wa=al("baseRetryDelayMs",5e3,t),this.ab=al("retryDelaySeedMs",1e4,t),this.Za=al("forwardChannelMaxRetries",2,t),this.ta=al("forwardChannelRequestTimeoutMs",2e4,t),this.ra=t&&t.xmlHttpFactory||void 0,this.Da=t&&t.Yb||!1,this.J=void 0,this.H=t&&t.supportsCrossDomainXhr||!1,this.I="",this.h=new OT(t&&t.concurrentRequestLimit),this.Fa=new XF,this.O=t&&t.fastHandshake||!1,this.N=t&&t.encodeInitMessageHeaders||!1,this.O&&this.N&&(this.N=!1),this.Xa=t&&t.Wb||!1,t&&t.Aa&&this.j.Aa(),t&&t.forceLongPolling&&(this.Y=!1),this.$=!this.O&&this.Y&&t&&t.detectBufferingProxy||!1,this.ja=void 0,this.P=0,this.K=!1,this.la=this.B=null}xe=VT.prototype;xe.ma=8;xe.G=1;function M0(t){if(WT(t),t.G==3){var e=t.U++,r=ii(t.F);ft(r,"SID",t.I),ft(r,"RID",e),ft(r,"TYPE","terminate"),fc(t,r),e=new uc(t,t.j,e,void 0),e.K=2,e.v=Of(ii(r)),r=!1,De.navigator&&De.navigator.sendBeacon&&(r=De.navigator.sendBeacon(e.v.toString(),"")),!r&&De.Image&&(new Image().src=e.v,r=!0),r||(e.g=JT(e.l,null),e.g.da(e.v)),e.F=Date.now(),cc(e)}XT(t)}function Nf(t){t.g&&($0(t),t.g.cancel(),t.g=null)}function WT(t){Nf(t),t.u&&(De.clearTimeout(t.u),t.u=null),mh(t),t.h.cancel(),t.m&&(typeof t.m=="number"&&De.clearTimeout(t.m),t.m=null)}function $f(t){DT(t.h)||t.m||(t.m=!0,hT(t.Ja,t),t.C=0)}function r4(t,e){return MT(t.h)>=t.h.j-(t.m?1:0)?!1:t.m?(t.i=e.D.concat(t.i),!0):t.G==1||t.G==2||t.C>=(t.Ya?0:t.Za)?!1:(t.m=ac(gn(t.Ja,t,e),YT(t,t.C)),t.C++,!0)}xe.Ja=function(t){if(this.m)if(this.m=null,this.G==1){if(!t){this.U=Math.floor(1e5*Math.random()),t=this.U++;const s=new uc(this,this.j,t,void 0);let o=this.s;if(this.S&&(o?(o=iT(o),sT(o,this.S)):o=this.S),this.o!==null||this.N||(s.H=o,o=null),this.O)e:{for(var e=0,r=0;r<this.i.length;r++){t:{var i=this.i[r];if("__data__"in i.g&&(i=i.g.__data__,typeof i=="string")){i=i.length;break t}i=void 0}if(i===void 0)break;if(e+=i,4096<e){e=r;break e}if(e===4096||r===this.i.length-1){e=r+1;break e}}e=1e3}else e=1e3;e=GT(this,s,e),r=ii(this.F),ft(r,"RID",t),ft(r,"CVER",22),this.D&&ft(r,"X-HTTP-Session-Id",this.D),fc(this,r),o&&(this.N?e="headers="+encodeURIComponent(String(zT(o)))+"&"+e:this.o&&D0(r,this.o,o)),P0(this.h,s),this.Xa&&ft(r,"TYPE","init"),this.O?(ft(r,"$req",e),ft(r,"SID","null"),s.Z=!0,Qm(s,r,null)):Qm(s,r,e),this.G=2}}else this.G==3&&(t?PS(this,t):this.i.length==0||DT(this.h)||PS(this))};function PS(t,e){var r;e?r=e.m:r=t.U++;const i=ii(t.F);ft(i,"SID",t.I),ft(i,"RID",r),ft(i,"AID",t.T),fc(t,i),t.o&&t.s&&D0(i,t.o,t.s),r=new uc(t,t.j,r,t.C+1),t.o===null&&(r.H=t.s),e&&(t.i=e.D.concat(t.i)),e=GT(t,r,1e3),r.setTimeout(Math.round(.5*t.ta)+Math.round(.5*t.ta*Math.random())),P0(t.h,r),Qm(r,i,e)}function fc(t,e){t.ia&&b0(t.ia,function(r,i){ft(e,i,r)}),t.l&&TT({},function(r,i){ft(e,i,r)})}function GT(t,e,r){r=Math.min(t.i.length,r);var i=t.l?gn(t.l.Qa,t.l,t):null;e:{var s=t.i;let o=-1;for(;;){const a=["count="+r];o==-1?0<r?(o=s[0].h,a.push("ofs="+o)):o=0:a.push("ofs="+o);let l=!0;for(let c=0;c<r;c++){let d=s[c].h;const f=s[c].g;if(d-=o,0>d)o=Math.max(0,s[c].h-100),l=!1;else try{QF(f,a,"req"+d+"_")}catch{i&&i(f)}}if(l){i=a.join("&");break e}}}return t=t.i.splice(0,r),e.D=t,i}function HT(t){t.g||t.u||(t.Z=1,hT(t.Ia,t),t.A=0)}function N0(t){return t.g||t.u||3<=t.A?!1:(t.Z++,t.u=ac(gn(t.Ia,t),YT(t,t.A)),t.A++,!0)}xe.Ia=function(){if(this.u=null,qT(this),this.$&&!(this.K||this.g==null||0>=this.P)){var t=2*this.P;this.j.info("BP detection timer enabled: "+t),this.B=ac(gn(this.cb,this),t)}};xe.cb=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.L=!1,this.K=!0,Sn(10),Nf(this),qT(this))};function $0(t){t.B!=null&&(De.clearTimeout(t.B),t.B=null)}function qT(t){t.g=new uc(t,t.j,"rpc",t.Z),t.o===null&&(t.g.H=t.s),t.g.N=0;var e=ii(t.sa);ft(e,"RID","rpc"),ft(e,"SID",t.I),ft(e,"CI",t.L?"0":"1"),ft(e,"AID",t.T),ft(e,"TYPE","xmlhttp"),fc(t,e),t.o&&t.s&&D0(e,t.o,t.s),t.J&&t.g.setTimeout(t.J);var r=t.g;t=t.ka,r.K=1,r.v=Of(ii(e)),r.s=null,r.P=!0,xT(r,t)}xe.bb=function(){this.v!=null&&(this.v=null,Nf(this),N0(this),Sn(19))};function mh(t){t.v!=null&&(De.clearTimeout(t.v),t.v=null)}function KT(t,e){var r=null;if(t.g==e){mh(t),$0(t),t.g=null;var i=2}else if(Zm(t.h,e))r=e.D,NT(t.h,e),i=1;else return;if(t.G!=0){if(t.pa=e.Y,e.i)if(i==1){r=e.s?e.s.length:0,e=Date.now()-e.F;var s=t.C;i=If(),Zt(i,new bT(i,r)),$f(t)}else HT(t);else if(s=e.o,s==3||s==0&&0<t.pa||!(i==1&&r4(t,e)||i==2&&N0(t)))switch(r&&0<r.length&&(e=t.h,e.i=e.i.concat(r)),s){case 1:Ps(t,5);break;case 4:Ps(t,10);break;case 3:Ps(t,6);break;default:Ps(t,2)}}}function YT(t,e){let r=t.Wa+Math.floor(Math.random()*t.ab);return t.l||(r*=2),r*e}function Ps(t,e){if(t.j.info("Error code "+e),e==2){var r=null;t.l&&(r=null);var i=gn(t.jb,t);r||(r=new Ns("//www.google.com/images/cleardot.gif"),De.location&&De.location.protocol=="http"||ph(r,"https"),Of(r)),JF(r.toString(),i)}else Sn(2);t.G=0,t.l&&t.l.va(e),XT(t),WT(t)}xe.jb=function(t){t?(this.j.info("Successfully pinged google.com"),Sn(2)):(this.j.info("Failed to ping google.com"),Sn(1))};function XT(t){if(t.G=0,t.la=[],t.l){const e=$T(t.h);(e.length!=0||t.i.length!=0)&&(bS(t.la,e),bS(t.la,t.i),t.h.i.length=0,y0(t.i),t.i.length=0),t.l.ua()}}function QT(t,e,r){var i=r instanceof Ns?ii(r):new Ns(r,void 0);if(i.g!="")e&&(i.g=e+"."+i.g),gh(i,i.m);else{var s=De.location;i=s.protocol,e=e?e+"."+s.hostname:s.hostname,s=+s.port;var o=new Ns(null,void 0);i&&ph(o,i),e&&(o.g=e),s&&gh(o,s),r&&(o.l=r),i=o}return r=t.D,e=t.za,r&&e&&ft(i,r,e),ft(i,"VER",t.ma),fc(t,i),i}function JT(t,e,r){if(e&&!t.H)throw Error("Can't create secondary domain capable XhrIo object.");return e=r&&t.Da&&!t.ra?new Dt(new dc({ib:!0})):new Dt(t.ra),e.L=t.H,e}function ZT(){}xe=ZT.prototype;xe.xa=function(){};xe.wa=function(){};xe.va=function(){};xe.ua=function(){};xe.Qa=function(){};function yh(){if(sa&&!(10<=Number(wF)))throw Error("Environmental error: no available transport.")}yh.prototype.g=function(t,e){return new Kn(t,e)};function Kn(t,e){Vt.call(this),this.g=new VT(e),this.l=t,this.h=e&&e.messageUrlParams||null,t=e&&e.messageHeaders||null,e&&e.clientProtocolHeaderRequired&&(t?t["X-Client-Protocol"]="webchannel":t={"X-Client-Protocol":"webchannel"}),this.g.s=t,t=e&&e.initMessageHeaders||null,e&&e.messageContentType&&(t?t["X-WebChannel-Content-Type"]=e.messageContentType:t={"X-WebChannel-Content-Type":e.messageContentType}),e&&e.ya&&(t?t["X-WebChannel-Client-Profile"]=e.ya:t={"X-WebChannel-Client-Profile":e.ya}),this.g.S=t,(t=e&&e.Xb)&&!dh(t)&&(this.g.o=t),this.A=e&&e.supportsCrossDomainXhr||!1,this.v=e&&e.sendRawJson||!1,(e=e&&e.httpSessionIdParam)&&!dh(e)&&(this.g.D=e,t=this.h,t!==null&&e in t&&(t=this.h,e in t&&delete t[e])),this.j=new Ia(this)}sn(Kn,Vt);Kn.prototype.m=function(){this.g.l=this.j,this.A&&(this.g.H=!0);var t=this.g,e=this.l,r=this.h||void 0;Sn(0),t.V=e,t.ia=r||{},t.L=t.Y,t.F=QT(t,null,t.V),$f(t)};Kn.prototype.close=function(){M0(this.g)};
1586Kn.prototype.u=function(t){var e=this.g;if(typeof t=="string"){var r={};r.__data__=t,t=r}else this.v&&(r={},r.__data__=_0(t),t=r);e.i.push(new KF(e.$a++,t)),e.G==3&&$f(e)};Kn.prototype.M=function(){this.g.l=null,delete this.j,M0(this.g),delete this.g,Kn.X.M.call(this)};function eI(t){I0.call(this);var e=t.__sm__;if(e){e:{for(const r in e){t=r;break e}t=void 0}(this.i=t)&&(t=this.i,e=e!==null&&t in e?e[t]:void 0),this.data=e}else this.data=t}sn(eI,I0);function tI(){R0.call(this),this.status=1}sn(tI,R0);function Ia(t){this.g=t}sn(Ia,ZT);Ia.prototype.xa=function(){Zt(this.g,"a")};Ia.prototype.wa=function(t){Zt(this.g,new eI(t))};Ia.prototype.va=function(t){Zt(this.g,new tI)};Ia.prototype.ua=function(){Zt(this.g,"b")};yh.prototype.createWebChannel=yh.prototype.g;Kn.prototype.send=Kn.prototype.u;Kn.prototype.open=Kn.prototype.m;Kn.prototype.close=Kn.prototype.close;Rf.NO_ERROR=0;Rf.TIMEOUT=8;Rf.HTTP_ERROR=6;wT.COMPLETE="complete";ST.EventType=lc;lc.OPEN="a";lc.CLOSE="b";lc.ERROR="c";lc.MESSAGE="d";Vt.prototype.listen=Vt.prototype.N;Dt.prototype.listenOnce=Dt.prototype.O;Dt.prototype.getLastError=Dt.prototype.Na;Dt.prototype.getLastErrorCode=Dt.prototype.Ea;Dt.prototype.getStatus=Dt.prototype.aa;Dt.prototype.getResponseJson=Dt.prototype.Ra;Dt.prototype.getResponseText=Dt.prototype.fa;Dt.prototype.send=Dt.prototype.da;var i4=function(){return new yh},s4=function(){return If()},pg=Rf,o4=wT,a4=oo,AS={rb:0,ub:1,vb:2,Ob:3,Tb:4,Qb:5,Rb:6,Pb:7,Nb:8,Sb:9,PROXY:10,NOPROXY:11,Lb:12,Hb:13,Ib:14,Gb:15,Jb:16,Kb:17,nb:18,mb:19,ob:20},l4=dc,Kc=ST,u4=Dt;const OS="@firebase/firestore";/** 1587 * @license 1588 * Copyright 2017 Google LLC 1589 * 1590 * Licensed under the Apache License, Version 2.0 (the "License"); 1591 * you may not use this file except in compliance with the License. 1592 * You may obtain a copy of the License at 1593 * 1594 * http://www.apache.org/licenses/LICENSE-2.0 1595 * 1596 * Unless required by applicable law or agreed to in writing, software 1597 * distributed under the License is distributed on an "AS IS" BASIS, 1598 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1599 * See the License for the specific language governing permissions and 1600 * limitations under the License. 1601 */let On=class{constructor(e){this.uid=e}isAuthenticated(){return this.uid!=null}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}};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");/** 1602 * @license 1603 * Copyright 2017 Google LLC 1604 * 1605 * Licensed under the Apache License, Version 2.0 (the "License"); 1606 * you may not use this file except in compliance with the License. 1607 * You may obtain a copy of the License at 1608 * 1609 * http://www.apache.org/licenses/LICENSE-2.0 1610 * 1611 * Unless required by applicable law or agreed to in writing, software 1612 * distributed under the License is distributed on an "AS IS" BASIS, 1613 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1614 * See the License for the specific language governing permissions and 1615 * limitations under the License. 1616 */let Ra="9.10.0";/** 1617 * @license 1618 * Copyright 2017 Google LLC 1619 * 1620 * Licensed under the Apache License, Version 2.0 (the "License"); 1621 * you may not use this file except in compliance with the License. 1622 * You may obtain a copy of the License at 1623 * 1624 * http://www.apache.org/licenses/LICENSE-2.0 1625 * 1626 * Unless required by applicable law or agreed to in writing, software 1627 * distributed under the License is distributed on an "AS IS" BASIS, 1628 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1629 * See the License for the specific language governing permissions and 1630 * limitations under the License. 1631 */const Js=new n0("@firebase/firestore");function DS(){return Js.logLevel}function Ee(t,...e){if(Js.logLevel<=Qe.DEBUG){const r=e.map(L0);Js.debug(`Firestore (${Ra}): ${t}`,...r)}}function si(t,...e){if(Js.logLevel<=Qe.ERROR){const r=e.map(L0);Js.error(`Firestore (${Ra}): ${t}`,...r)}}function MS(t,...e){if(Js.logLevel<=Qe.WARN){const r=e.map(L0);Js.warn(`Firestore (${Ra}): ${t}`,...r)}}function L0(t){if(typeof t=="string")return t;try{return e=t,JSON.stringify(e)}catch{return t}/** 1632* @license 1633* Copyright 2020 Google LLC 1634* 1635* Licensed under the Apache License, Version 2.0 (the "License");
1636* you may not use this file except in compliance with the License. 1637* You may obtain a copy of the License at 1638* 1639* http://www.apache.org/licenses/LICENSE-2.0 1640* 1641* Unless required by applicable law or agreed to in writing, software 1642* distributed under the License is distributed on an "AS IS" BASIS, 1643* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1644* See the License for the specific language governing permissions and 1645* limitations under the License. 1646*/var e}/** 1647 * @license 1648 * Copyright 2017 Google LLC 1649 * 1650 * Licensed under the Apache License, Version 2.0 (the "License"); 1651 * you may not use this file except in compliance with the License. 1652 * You may obtain a copy of the License at 1653 * 1654 * http://www.apache.org/licenses/LICENSE-2.0 1655 * 1656 * Unless required by applicable law or agreed to in writing, software 1657 * distributed under the License is distributed on an "AS IS" BASIS, 1658 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1659 * See the License for the specific language governing permissions and 1660 * limitations under the License. 1661 */function $e(t="Unexpected state"){const e=`FIRESTORE (${Ra}) INTERNAL ASSERTION FAILED: `+t;throw si(e),new Error(e)}function lt(t,e){t||$e()}function Ue(t,e){return t}/** 1662 * @license 1663 * Copyright 2017 Google LLC 1664 * 1665 * Licensed under the Apache License, Version 2.0 (the "License"); 1666 * you may not use this file except in compliance with the License. 1667 * You may obtain a copy of the License at 1668 * 1669 * http://www.apache.org/licenses/LICENSE-2.0 1670 * 1671 * Unless required by applicable law or agreed to in writing, software 1672 * distributed under the License is distributed on an "AS IS" BASIS, 1673 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1674 * See the License for the specific language governing permissions and 1675 * limitations under the License. 1676 */const se={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 Ce extends jr{constructor(e,r){super(e,r),this.code=e,this.message=r,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/** 1677 * @license 1678 * Copyright 2017 Google LLC 1679 * 1680 * Licensed under the Apache License, Version 2.0 (the "License"); 1681 * you may not use this file except in compliance with the License. 1682 * You may obtain a copy of the License at 1683 * 1684 * http://www.apache.org/licenses/LICENSE-2.0 1685 * 1686 * Unless required by applicable law or agreed to in writing, software 1687 * distributed under the License is distributed on an "AS IS" BASIS, 1688 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1689 * See the License for the specific language governing permissions and 1690 * limitations under the License. 1691 */class $s{constructor(){this.promise=new Promise((e,r)=>{this.resolve=e,this.reject=r})}}/** 1692 * @license 1693 * Copyright 2017 Google LLC 1694 * 1695 * Licensed under the Apache License, Version 2.0 (the "License"); 1696 * you may not use this file except in compliance with the License. 1697 * You may obtain a copy of the License at 1698 * 1699 * http://www.apache.org/licenses/LICENSE-2.0 1700 * 1701 * Unless required by applicable law or agreed to in writing, software 1702 * distributed under the License is distributed on an "AS IS" BASIS, 1703 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1704 * See the License for the specific language governing permissions and 1705 * limitations under the License. 1706 */class c4{constructor(e,r){this.user=r,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}let d4=class{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,r){e.enqueueRetryable(()=>r(On.UNAUTHENTICATED))}shutdown(){}};class h4{constructor(e){this.t=e,this.currentUser=On.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,r){let i=this.i;const s=c=>this.i!==i?(i=this.i,r(c)):Promise.resolve();let o=new $s;this.o=()=>{this.i++,this.currentUser=this.u(),o.resolve(),o=new $s,e.enqueueRetryable(()=>s(this.currentUser))};const a=()=>{const c=o;e.enqueueRetryable(async()=>{await c.promise,await s(this.currentUser)})},l=c=>{Ee("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=c,this.auth.addAuthTokenListener(this.o),a()};this.t.onInit(c=>l(c)),setTimeout(()=>{if(!this.auth){const c=this.t.getImmediate({optional:!0});c?l(c):(Ee("FirebaseAuthCredentialsProvider","Auth not yet detected"),o.resolve(),o=new $s)}},0),a()}getToken(){const e=this.i,r=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(r).then(i=>this.i!==e?(Ee("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):i?(lt(typeof i.accessToken=="string"),new c4(i.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){const e=this.auth&&this.auth.getUid();return lt(e===null||typeof e=="string"),new On(e)}}class f4{constructor(e,r,i,s){this.h=e,this.l=r,this.m=i,this.g=s,this.type="FirstParty",this.user=On.FIRST_PARTY,this.p=new Map}I(){return this.g?this.g():(lt(!(typeof this.h!="object"||this.h===null||!this.h.auth||!this.h.auth.getAuthHeaderValueForFirstParty)),this.h.auth.getAuthHeaderValueForFirstParty([]))}get headers(){this.p.set("X-Goog-AuthUser",this.l);const e=this.I();return e&&this.p.set("Authorization",e),this.m&&this.p.set("X-Goog-Iam-Authorization-Token",this.m),this.p}}class p4{constructor(e,r,i,s){this.h=e,this.l=r,this.m=i,this.g=s}getToken(){return Promise.resolve(new f4(this.h,this.l,this.m,this.g))}start(e,r){e.enqueueRetryable(()=>r(On.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class g4{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class m4{constructor(e){this.T=e,this.forceRefresh=!1,this.appCheck=null,this.A=null}start(e,r){const i=o=>{o.error!=null&&Ee("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${o.error.message}`);const a=o.token!==this.A;return this.A=o.token,Ee("FirebaseAppCheckTokenProvider",`Received ${a?"new":"existing"} token.`),a?r(o.token):Promise.resolve()};this.o=o=>{e.enqueueRetryable(()=>i(o))};const s=o=>{Ee("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=o,this.appCheck.addTokenListener(this.o)};this.T.onInit(o=>s(o)),setTimeout(()=>{if(!this.appCheck){const o=this.T.getImmediate({optional:!0});o?s(o):Ee("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(r=>r?(lt(typeof r.token=="string"),this.A=r.token,new g4(r.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}/** 1707 * @license 1708 * Copyright 2020 Google LLC 1709 * 1710 * Licensed under the Apache License, Version 2.0 (the "License");
1711 * you may not use this file except in compliance with the License. 1712 * You may obtain a copy of the License at 1713 * 1714 * http://www.apache.org/licenses/LICENSE-2.0 1715 * 1716 * Unless required by applicable law or agreed to in writing, software 1717 * distributed under the License is distributed on an "AS IS" BASIS, 1718 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1719 * See the License for the specific language governing permissions and 1720 * limitations under the License. 1721 */function y4(t){const e=typeof self<"u"&&(self.crypto||self.msCrypto),r=new Uint8Array(t);if(e&&typeof e.getRandomValues=="function")e.getRandomValues(r);else for(let i=0;i<t;i++)r[i]=Math.floor(256*Math.random());return r}/** 1722 * @license 1723 * Copyright 2017 Google LLC 1724 * 1725 * Licensed under the Apache License, Version 2.0 (the "License"); 1726 * you may not use this file except in compliance with the License. 1727 * You may obtain a copy of the License at 1728 * 1729 * http://www.apache.org/licenses/LICENSE-2.0 1730 * 1731 * Unless required by applicable law or agreed to in writing, software 1732 * distributed under the License is distributed on an "AS IS" BASIS, 1733 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1734 * See the License for the specific language governing permissions and 1735 * limitations under the License. 1736 */class nI{static R(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=Math.floor(256/e.length)*e.length;let i="";for(;i.length<20;){const s=y4(40);for(let o=0;o<s.length;++o)i.length<20&&s[o]<r&&(i+=e.charAt(s[o]%e.length))}return i}}function Ze(t,e){return t<e?-1:t>e?1:0}function oa(t,e,r){return t.length===e.length&&t.every((i,s)=>r(i,e[s]))}/** 1737 * @license 1738 * Copyright 2017 Google LLC 1739 * 1740 * Licensed under the Apache License, Version 2.0 (the "License"); 1741 * you may not use this file except in compliance with the License. 1742 * You may obtain a copy of the License at 1743 * 1744 * http://www.apache.org/licenses/LICENSE-2.0 1745 * 1746 * Unless required by applicable law or agreed to in writing, software 1747 * distributed under the License is distributed on an "AS IS" BASIS, 1748 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1749 * See the License for the specific language governing permissions and 1750 * limitations under the License. 1751 */class $t{constructor(e,r){if(this.seconds=e,this.nanoseconds=r,r<0)throw new Ce(se.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+r);if(r>=1e9)throw new Ce(se.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+r);if(e<-62135596800)throw new Ce(se.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new Ce(se.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return $t.fromMillis(Date.now())}static fromDate(e){return $t.fromMillis(e.getTime())}static fromMillis(e){const r=Math.floor(e/1e3),i=Math.floor(1e6*(e-1e3*r));return new $t(r,i)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?Ze(this.nanoseconds,e.nanoseconds):Ze(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){const e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}/** 1752 * @license 1753 * Copyright 2017 Google LLC 1754 * 1755 * Licensed under the Apache License, Version 2.0 (the "License"); 1756 * you may not use this file except in compliance with the License. 1757 * You may obtain a copy of the License at 1758 * 1759 * http://www.apache.org/licenses/LICENSE-2.0 1760 * 1761 * Unless required by applicable law or agreed to in writing, software 1762 * distributed under the License is distributed on an "AS IS" BASIS, 1763 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1764 * See the License for the specific language governing permissions and 1765 * limitations under the License. 1766 */class Ve{constructor(e){this.timestamp=e}static fromTimestamp(e){return new Ve(e)}static min(){return new Ve(new $t(0,0))}static max(){return new Ve(new $t(253402300799,999999999))}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/** 1767 * @license 1768 * Copyright 2017 Google LLC 1769 * 1770 * Licensed under the Apache License, Version 2.0 (the "License");
1771 * you may not use this file except in compliance with the License. 1772 * You may obtain a copy of the License at 1773 * 1774 * http://www.apache.org/licenses/LICENSE-2.0 1775 * 1776 * Unless required by applicable law or agreed to in writing, software 1777 * distributed under the License is distributed on an "AS IS" BASIS, 1778 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1779 * See the License for the specific language governing permissions and 1780 * limitations under the License. 1781 */class Ru{constructor(e,r,i){r===void 0?r=0:r>e.length&&$e(),i===void 0?i=e.length-r:i>e.length-r&&$e(),this.segments=e,this.offset=r,this.len=i}get length(){return this.len}isEqual(e){return Ru.comparator(this,e)===0}child(e){const r=this.segments.slice(this.offset,this.limit());return e instanceof Ru?e.forEach(i=>{r.push(i)}):r.push(e),this.construct(r)}limit(){return this.offset+this.length}popFirst(e){return e=e===void 0?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return this.length===0}isPrefixOf(e){if(e.length<this.length)return!1;for(let r=0;r<this.length;r++)if(this.get(r)!==e.get(r))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let r=0;r<this.length;r++)if(this.get(r)!==e.get(r))return!1;return!0}forEach(e){for(let r=this.offset,i=this.limit();r<i;r++)e(this.segments[r])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,r){const i=Math.min(e.length,r.length);for(let s=0;s<i;s++){const o=e.get(s),a=r.get(s);if(o<a)return-1;if(o>a)return 1}return e.length<r.length?-1:e.length>r.length?1:0}}class ct extends Ru{construct(e,r,i){return new ct(e,r,i)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}static fromString(...e){const r=[];for(const i of e){if(i.indexOf("//")>=0)throw new Ce(se.INVALID_ARGUMENT,`Invalid segment (${i}). Paths must not contain // in them.`);r.push(...i.split("/").filter(s=>s.length>0))}return new ct(r)}static emptyPath(){return new ct([])}}const v4=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class dn extends Ru{construct(e,r,i){return new dn(e,r,i)}static isValidIdentifier(e){return v4.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),dn.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)==="__name__"}static keyField(){return new dn(["__name__"])}static fromServerFormat(e){const r=[];let i="",s=0;const o=()=>{if(i.length===0)throw new Ce(se.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);r.push(i),i=""};let a=!1;for(;s<e.length;){const l=e[s];if(l==="\\"){if(s+1===e.length)throw new Ce(se.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const c=e[s+1];if(c!=="\\"&&c!=="."&&c!=="`")throw new Ce(se.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);i+=c,s+=2}else l==="`"?(a=!a,s++):l!=="."||a?(i+=l,s++):(o(),s++)}if(o(),a)throw new Ce(se.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new dn(r)}static emptyPath(){return new dn([])}}/** 1782 * @license 1783 * Copyright 2017 Google LLC 1784 * 1785 * Licensed under the Apache License, Version 2.0 (the "License"); 1786 * you may not use this file except in compliance with the License. 1787 * You may obtain a copy of the License at 1788 * 1789 * http://www.apache.org/licenses/LICENSE-2.0 1790 * 1791 * Unless required by applicable law or agreed to in writing, software 1792 * distributed under the License is distributed on an "AS IS" BASIS, 1793 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1794 * See the License for the specific language governing permissions and 1795 * limitations under the License. 1796 */class ke{constructor(e){this.path=e}static fromPath(e){return new ke(ct.fromString(e))}static fromName(e){return new ke(ct.fromString(e).popFirst(5))}static empty(){return new ke(ct.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return e!==null&&ct.comparator(this.path,e.path)===0}toString(){return this.path.toString()}static comparator(e,r){return ct.comparator(e.path,r.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new ke(new ct(e.slice()))}}function b4(t,e){const r=t.toTimestamp().seconds,i=t.toTimestamp().nanoseconds+1,s=Ve.fromTimestamp(i===1e9?new $t(r+1,0):new $t(r,i));return new Ji(s,ke.empty(),e)}function w4(t){return new Ji(t.readTime,t.key,-1)}class Ji{constructor(e,r,i){this.readTime=e,this.documentKey=r,this.largestBatchId=i}static min(){return new Ji(Ve.min(),ke.empty(),-1)}static max(){return new Ji(Ve.max(),ke.empty(),-1)}}function S4(t,e){let r=t.readTime.compareTo(e.readTime);return r!==0?r:(r=ke.comparator(t.documentKey,e.documentKey),r!==0?r:Ze(t.largestBatchId,e.largestBatchId))}/** 1797 * @license 1798 * Copyright 2020 Google LLC 1799 * 1800 * Licensed under the Apache License, Version 2.0 (the "License");
1801 * you may not use this file except in compliance with the License. 1802 * You may obtain a copy of the License at 1803 * 1804 * http://www.apache.org/licenses/LICENSE-2.0 1805 * 1806 * Unless required by applicable law or agreed to in writing, software 1807 * distributed under the License is distributed on an "AS IS" BASIS, 1808 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1809 * See the License for the specific language governing permissions and 1810 * limitations under the License. 1811 */const C4="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class x4{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}/** 1812 * @license 1813 * Copyright 2017 Google LLC 1814 * 1815 * Licensed under the Apache License, Version 2.0 (the "License"); 1816 * you may not use this file except in compliance with the License. 1817 * You may obtain a copy of the License at 1818 * 1819 * http://www.apache.org/licenses/LICENSE-2.0 1820 * 1821 * Unless required by applicable law or agreed to in writing, software 1822 * distributed under the License is distributed on an "AS IS" BASIS, 1823 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1824 * See the License for the specific language governing permissions and 1825 * limitations under the License. 1826 */async function pc(t){if(t.code!==se.FAILED_PRECONDITION||t.message!==C4)throw t;Ee("LocalStore","Unexpectedly lost primary lease")}/** 1827 * @license 1828 * Copyright 2017 Google LLC 1829 * 1830 * Licensed under the Apache License, Version 2.0 (the "License"); 1831 * you may not use this file except in compliance with the License. 1832 * You may obtain a copy of the License at 1833 * 1834 * http://www.apache.org/licenses/LICENSE-2.0 1835 * 1836 * Unless required by applicable law or agreed to in writing, software 1837 * distributed under the License is distributed on an "AS IS" BASIS, 1838 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1839 * See the License for the specific language governing permissions and 1840 * limitations under the License. 1841 */class le{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(r=>{this.isDone=!0,this.result=r,this.nextCallback&&this.nextCallback(r)},r=>{this.isDone=!0,this.error=r,this.catchCallback&&this.catchCallback(r)})}catch(e){return this.next(void 0,e)}next(e,r){return this.callbackAttached&&$e(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(r,this.error):this.wrapSuccess(e,this.result):new le((i,s)=>{this.nextCallback=o=>{this.wrapSuccess(e,o).next(i,s)},this.catchCallback=o=>{this.wrapFailure(r,o).next(i,s)}})}toPromise(){return new Promise((e,r)=>{this.next(e,r)})}wrapUserFunction(e){try{const r=e();return r instanceof le?r:le.resolve(r)}catch(r){return le.reject(r)}}wrapSuccess(e,r){return e?this.wrapUserFunction(()=>e(r)):le.resolve(r)}wrapFailure(e,r){return e?this.wrapUserFunction(()=>e(r)):le.reject(r)}static resolve(e){return new le((r,i)=>{r(e)})}static reject(e){return new le((r,i)=>{i(e)})}static waitFor(e){return new le((r,i)=>{let s=0,o=0,a=!1;e.forEach(l=>{++s,l.next(()=>{++o,a&&o===s&&r()},c=>i(c))}),a=!0,o===s&&r()})}static or(e){let r=le.resolve(!1);for(const i of e)r=r.next(s=>s?le.resolve(s):i());return r}static forEach(e,r){const i=[];return e.forEach((s,o)=>{i.push(r.call(this,s,o))}),this.waitFor(i)}static mapArray(e,r){return new le((i,s)=>{const o=e.length,a=new Array(o);let l=0;for(let c=0;c<o;c++){const d=c;r(e[d]).next(f=>{a[d]=f,++l,l===o&&i(a)},f=>s(f))}})}static doWhile(e,r){return new le((i,s)=>{const o=()=>{e()===!0?r().next(()=>{o()},s):i()};o()})}}function gc(t){return t.name==="IndexedDbTransactionError"}/** 1842 * @license 1843 * Copyright 2018 Google LLC 1844 * 1845 * Licensed under the Apache License, Version 2.0 (the "License"); 1846 * you may not use this file except in compliance with the License. 1847 * You may obtain a copy of the License at 1848 * 1849 * http://www.apache.org/licenses/LICENSE-2.0 1850 * 1851 * Unless required by applicable law or agreed to in writing, softw
1851are 1852 * distributed under the License is distributed on an "AS IS" BASIS, 1853 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1854 * See the License for the specific language governing permissions and 1855 * limitations under the License. 1856 */class F0{constructor(e,r){this.previousValue=e,r&&(r.sequenceNumberHandler=i=>this.ut(i),this.ct=i=>r.writeSequenceNumber(i))}ut(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.ct&&this.ct(e),e}}/** 1857 * @license 1858 * Copyright 2017 Google LLC 1859 * 1860 * Licensed under the Apache License, Version 2.0 (the "License"); 1861 * you may not use this file except in compliance with the License. 1862 * You may obtain a copy of the License at 1863 * 1864 * http://www.apache.org/licenses/LICENSE-2.0 1865 * 1866 * Unless required by applicable law or agreed to in writing, software 1867 * distributed under the License is distributed on an "AS IS" BASIS, 1868 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1869 * See the License for the specific language governing permissions and 1870 * limitations under the License. 1871 */function NS(t){let e=0;for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}function ao(t,e){for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&e(r,t[r])}function rI(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}/** 1872 * @license 1873 * Copyright 2017 Google LLC 1874 * 1875 * Licensed under the Apache License, Version 2.0 (the "License"); 1876 * you may not use this file except in compliance with the License. 1877 * You may obtain a copy of the License at 1878 * 1879 * http://www.apache.org/licenses/LICENSE-2.0 1880 * 1881 * Unless required by applicable law or agreed to in writing, software 1882 * distributed under the License is distributed on an "AS IS" BASIS, 1883 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1884 * See the License for the specific language governing permissions and 1885 * limitations under the License. 1886 */F0.at=-1;class Ft{constructor(e,r){this.comparator=e,this.root=r||qt.EMPTY}insert(e,r){return new Ft(this.comparator,this.root.insert(e,r,this.comparator).copy(null,null,qt.BLACK,null,null))}remove(e){return new Ft(this.comparator,this.root.remove(e,this.comparator).copy(null,null,qt.BLACK,null,null))}get(e){let r=this.root;for(;!r.isEmpty();){const i=this.comparator(e,r.key);if(i===0)return r.value;i<0?r=r.left:i>0&&(r=r.right)}return null}indexOf(e){let r=0,i=this.root;for(;!i.isEmpty();){const s=this.comparator(e,i.key);if(s===0)return r+i.left.size;s<0?i=i.left:(r+=i.left.size+1,i=i.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((r,i)=>(e(r,i),!1))}toString(){const e=[];return this.inorderTraversal((r,i)=>(e.push(`${r}:${i}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new Yc(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new Yc(this.root,e,this.comparator,!1)}getReverseIterator(){return new Yc(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new Yc(this.root,e,this.comparator,!0)}}class Yc{constructor(e,r,i,s){this.isReverse=s,this.nodeStack=[];let o=1;for(;!e.isEmpty();)if(o=r?i(e.key,r):1,r&&s&&(o*=-1),o<0)e=this.isReverse?e.left:e.right;else{if(o===0){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const r={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return r}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class qt{constructor(e,r,i,s,o){this.key=e,this.value=r,this.color=i??qt.RED,this.left=s??qt.EMPTY,this.right=o??qt.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,r,i,s,o){return new qt(e??this.key,r??this.value,i??this.color,s??this.left,o??this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,r,i){let s=this;const o=i(e,s.key);return s=o<0?s.copy(null,null,null,s.left.insert(e,r,i),null):o===0?s.copy(null,r,null,null,null):s.copy(null,null,null,null,s.right.insert(e,r,i)),s.fixUp()}removeMin(){if(this.left.isEmpty())return qt.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,r){let i,s=this;if(r(e,s.key)<0)s.left.isEmpty()||s.left.isRed()||s.left.left.isRed()||(s=s.moveRedLeft()),s=s.copy(null,null,null,s.left.remove(e,r),null);else{if(s.left.isRed()&&(s=s.rotateRight()),s.right.isEmpty()||s.right.isRed()||s.right.left.isRed()||(s=s.moveRedRight()),r(e,s.key)===0){if(s.right.isEmpty())return qt.EMPTY;i=s.right.min(),s=s.copy(i.key,i.value,null,null,s.right.removeMin())}s=s.copy(null,null,null,null,s.right.remove(e,r))}return s.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,qt.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,qt.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){const e=this.left.copy(null,null,!this.left.color,null,null),r=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,r)}checkMaxDepth(){const e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw $e();const e=this.left.check();if(e!==this.right.check())throw $e();return e+(this.isRed()?0:1)}}qt.EMPTY=null,qt.RED=!0,qt.BLACK=!1;
1886qt.EMPTY=new class{constructor(){this.size=0}get key(){throw $e()}get value(){throw $e()}get color(){throw $e()}get left(){throw $e()}get right(){throw $e()}copy(t,e,r,i,s){return this}insert(t,e,r){return new qt(t,e)}remove(t,e){return this}isEmpty(){return!0}inorderTraversal(t){return!1}reverseTraversal(t){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};/** 1887 * @license 1888 * Copyright 2017 Google LLC 1889 * 1890 * Licensed under the Apache License, Version 2.0 (the "License"); 1891 * you may not use this file except in compliance with the License. 1892 * You may obtain a copy of the License at 1893 * 1894 * http://www.apache.org/licenses/LICENSE-2.0 1895 * 1896 * Unless required by applicable law or agreed to in writing, software 1897 * distributed under the License is distributed on an "AS IS" BASIS, 1898 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1899 * See the License for the specific language governing permissions and 1900 * limitations under the License. 1901 */class Lt{constructor(e){this.comparator=e,this.data=new Ft(this.comparator)}has(e){return this.data.get(e)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((r,i)=>(e(r),!1))}forEachInRange(e,r){const i=this.data.getIteratorFrom(e[0]);for(;i.hasNext();){const s=i.getNext();if(this.comparator(s.key,e[1])>=0)return;r(s.key)}}forEachWhile(e,r){let i;for(i=r!==void 0?this.data.getIteratorFrom(r):this.data.getIterator();i.hasNext();)if(!e(i.getNext().key))return}firstAfterOrEqual(e){const r=this.data.getIteratorFrom(e);return r.hasNext()?r.getNext().key:null}getIterator(){return new $S(this.data.getIterator())}getIteratorFrom(e){return new $S(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let r=this;return r.size<e.size&&(r=e,e=this),e.forEach(i=>{r=r.add(i)}),r}isEqual(e){if(!(e instanceof Lt)||this.size!==e.size)return!1;const r=this.data.getIterator(),i=e.data.getIterator();for(;r.hasNext();){const s=r.getNext().key,o=i.getNext().key;if(this.comparator(s,o)!==0)return!1}return!0}toArray(){const e=[];return this.forEach(r=>{e.push(r)}),e}toString(){const e=[];return this.forEach(r=>e.push(r)),"SortedSet("+e.toString()+")"}copy(e){const r=new Lt(this.comparator);return r.data=e,r}}class $S{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}/** 1902 * @license 1903 * Copyright 2020 Google LLC 1904 * 1905 * Licensed under the Apache License, Version 2.0 (the "License"); 1906 * you may not use this file except in compliance with the License. 1907 * You may obtain a copy of the License at 1908 * 1909 * http://www.apache.org/licenses/LICENSE-2.0 1910 * 1911 * Unless required by applicable law or agreed to in writing, software 1912 * distributed under the License is distributed on an "AS IS" BASIS, 1913 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1914 * See the License for the specific language governing permissions and 1915 * limitations under the License. 1916 */class nr{constructor(e){this.fields=e,e.sort(dn.comparator)}static empty(){return new nr([])}unionWith(e){let r=new Lt(dn.comparator);for(const i of this.fields)r=r.add(i);for(const i of e)r=r.add(i);return new nr(r.toArray())}covers(e){for(const r of this.fields)if(r.isPrefixOf(e))return!0;return!1}isEqual(e){return oa(this.fields,e.fields,(r,i)=>r.isEqual(i))}}/** 1917 * @license 1918 * Copyright 2020 Google LLC 1919 * 1920 * Licensed under the Apache License, Version 2.0 (the "License"); 1921 * you may not use this file except in compliance with the License. 1922 * You may obtain a copy of the License at 1923 * 1924 * http://www.apache.org/licenses/LICENSE-2.0 1925 * 1926 * Unless required by applicable law or agreed to in writing, software 1927 * distributed under the License is distributed on an "AS IS" BASIS, 1928 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1929 * See the License for the specific language governing permissions and 1930 * limitations under the License. 1931 */class rn{constructor(e){this.binaryString=e}static fromBase64String(e){const r=atob(e);return new rn(r)}static fromUint8Array(e){const r=function(i){let s="";for(let o=0;o<i.length;++o)s+=String.fromCharCode(i[o]);return s}(e);return new rn(r)}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return e=this.binaryString,btoa(e);var e}
1931toUint8Array(){return function(e){const r=new Uint8Array(e.length);for(let i=0;i<e.length;i++)r[i]=e.charCodeAt(i);return r}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return Ze(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}rn.EMPTY_BYTE_STRING=new rn("");const _4=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Zi(t){if(lt(!!t),typeof t=="string"){let e=0;const r=_4.exec(t);if(lt(!!r),r[1]){let s=r[1];s=(s+"000000000").substr(0,9),e=Number(s)}const i=new Date(t);return{seconds:Math.floor(i.getTime()/1e3),nanos:e}}return{seconds:At(t.seconds),nanos:At(t.nanos)}}function At(t){return typeof t=="number"?t:typeof t=="string"?Number(t):0}function aa(t){return typeof t=="string"?rn.fromBase64String(t):rn.fromUint8Array(t)}/** 1932 * @license 1933 * Copyright 2020 Google LLC 1934 * 1935 * Licensed under the Apache License, Version 2.0 (the "License"); 1936 * you may not use this file except in compliance with the License. 1937 * You may obtain a copy of the License at 1938 * 1939 * http://www.apache.org/licenses/LICENSE-2.0 1940 * 1941 * Unless required by applicable law or agreed to in writing, software 1942 * distributed under the License is distributed on an "AS IS" BASIS, 1943 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1944 * See the License for the specific language governing permissions and 1945 * limitations under the License. 1946 */function iI(t){var e,r;return((r=(((e=t==null?void 0:t.mapValue)===null||e===void 0?void 0:e.fields)||{}).__type__)===null||r===void 0?void 0:r.stringValue)==="server_timestamp"}function sI(t){const e=t.mapValue.fields.__previous_value__;return iI(e)?sI(e):e}function Pu(t){const e=Zi(t.mapValue.fields.__local_write_time__.timestampValue);return new $t(e.seconds,e.nanos)}/** 1947 * @license 1948 * Copyright 2017 Google LLC 1949 * 1950 * Licensed under the Apache License, Version 2.0 (the "License"); 1951 * you may not use this file except in compliance with the License. 1952 * You may obtain a copy of the License at 1953 * 1954 * http://www.apache.org/licenses/LICENSE-2.0 1955 * 1956 * Unless required by applicable law or agreed to in writing, software 1957 * distributed under the License is distributed on an "AS IS" BASIS, 1958 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1959 * See the License for the specific language governing permissions and 1960 * limitations under the License. 1961 */class E4{constructor(e,r,i,s,o,a,l,c){this.databaseId=e,this.appId=r,this.persistenceKey=i,this.host=s,this.ssl=o,this.forceLongPolling=a,this.autoDetectLongPolling=l,this.useFetchStreams=c}}class Au{constructor(e,r){this.projectId=e,this.database=r||"(default)"}static empty(){return new Au("","")}get isDefaultDatabase(){return this.database==="(default)"}isEqual(e){return e instanceof Au&&e.projectId===this.projectId&&e.database===this.database}}function Lf(t){return t==null}function vh(t){return t===0&&1/t==-1/0}function k4(t){return typeof t=="number"&&Number.isInteger(t)&&!vh(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER}/** 1962 * @license 1963 * Copyright 2020 Google LLC 1964 * 1965 * Licensed under the Apache License, Version 2.0 (the "License"); 1966 * you may not use this file except in compliance with the License. 1967 * You may obtain a copy of the License at 1968 * 1969 * http://www.apache.org/licenses/LICENSE-2.0 1970 * 1971 * Unless required by applicable law or agreed to in writing, software 1972 * distributed under the License is distributed on an "AS IS" BASIS, 1973 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1974 * See the License for the specific language governing permissions and 1975 * limitations under the License. 1976 */const Xc={mapValue:{fields:{__type__:{stringValue:"__max__"}}}};function Zs(t){return"nullValue"in t?0:"booleanValue"in t?1:"integerValue"in t||"doubleValue"in t?2:"timestampValue"in t?3:"stringValue"in t?5:"bytesValue"in t?6:"referenceValue"in t?7:"geoPointValue"in t?8:"arrayValue"in t?9:"mapValue"in t?iI(t)?4:T4(t)?9007199254740991:10:$e()}function Fr(t,e){if(t===e)return!0;const r=Zs(t);if(r!==Zs(e))return!1;switch(r){case 0:case 9007199254740991:return!0;case 1:return t.booleanValue===e.booleanValue;case 4:return Pu(t).isEqual(Pu(e));case 3:return function(i,s){if(typeof i.timestampValue=="string"&&typeof s.timestampValue=="string"&&i.timestampValue.length===s.timestampValue.length)return i.timestampValue===s.timestampValue;const o=Zi(i.timestampValue),a=Zi(s.timestampValue);return o.seconds===a.seconds&&o.nanos===a.nanos}(t,e);case 5:return t.stringValue===e.stringValue;case 6:return function(i,s){return aa(i.bytesValue).isEqual(aa(s.bytesValue))}(t,e);case 7:return t.referenceValue===e.referenceValue;case 8:return function(i,s){return At(i.geoPointValue.latitude)===At(s.geoPointValue.latitude)&&At(i.geoPointValue.longitude)===At(s.geoPointValue.longitude)}(t,e);case 2:return function(i,s){if("integerValue"in i&&"integerValue"in s)return At(i.integerValue)===At(s.integerValue);if("doubleValue"in i&&"doubleValue"in s){const o=At(i.doubleValue),a=At(s.doubleValue);return o===a?vh(o)===vh(a):isNaN(o)&&isNaN(a)}return!1}(t,e);case 9:return oa(t.arrayValue.values||[],e.arrayValue.values||[],Fr);case 10:return function(i,s){const o=i.mapValue.fields||{},a=s.mapValue.fields||{};if(NS(o)!==NS(a))return!1;for(const l in o)if(o.hasOwnProperty(l)&&(a[l]===void 0||!Fr(o[l],a[l])))return!1;return!0}(t,e);default:return $e()}}function Ou(t,e){return(t.values||[]).find(r=>Fr(r,e))!==void 0}function la(t,e){if(t===e)return 0;const r=Zs(t),i=Zs(e);if(r!==i)return Ze(r,i);switch(r){case 0:case 9007199254740991:return 0;case 1:return Ze(t.booleanValue,e.booleanValue);case 2:return function(s,o){const a=At(s.integerValue||s.doubleValue),l=At(o.integerValue||o.doubleValue);return a<l?-1:a>l?1:a===l?0:isNaN(a)?isNaN(l)?0:-1:1}(t,e);case 3:return LS(t.timestampValue,e.timestampValue);
1976case 4:return LS(Pu(t),Pu(e));case 5:return Ze(t.stringValue,e.stringValue);case 6:return function(s,o){const a=aa(s),l=aa(o);return a.compareTo(l)}(t.bytesValue,e.bytesValue);case 7:return function(s,o){const a=s.split("/"),l=o.split("/");for(let c=0;c<a.length&&c<l.length;c++){const d=Ze(a[c],l[c]);if(d!==0)return d}return Ze(a.length,l.length)}(t.referenceValue,e.referenceValue);case 8:return function(s,o){const a=Ze(At(s.latitude),At(o.latitude));return a!==0?a:Ze(At(s.longitude),At(o.longitude))}(t.geoPointValue,e.geoPointValue);case 9:return function(s,o){const a=s.values||[],l=o.values||[];for(let c=0;c<a.length&&c<l.length;++c){const d=la(a[c],l[c]);if(d)return d}return Ze(a.length,l.length)}(t.arrayValue,e.arrayValue);case 10:return function(s,o){if(s===Xc.mapValue&&o===Xc.mapValue)return 0;if(s===Xc.mapValue)return 1;if(o===Xc.mapValue)return-1;const a=s.fields||{},l=Object.keys(a),c=o.fields||{},d=Object.keys(c);l.sort(),d.sort();for(let f=0;f<l.length&&f<d.length;++f){const g=Ze(l[f],d[f]);if(g!==0)return g;const v=la(a[l[f]],c[d[f]]);if(v!==0)return v}return Ze(l.length,d.length)}(t.mapValue,e.mapValue);default:throw $e()}}function LS(t,e){if(typeof t=="string"&&typeof e=="string"&&t.length===e.length)return Ze(t,e);const r=Zi(t),i=Zi(e),s=Ze(r.seconds,i.seconds);return s!==0?s:Ze(r.nanos,i.nanos)}function Yo(t){return ey(t)}function ey(t){return"nullValue"in t?"null":"booleanValue"in t?""+t.booleanValue:"integerValue"in t?""+t.integerValue:"doubleValue"in t?""+t.doubleValue:"timestampValue"in t?function(i){const s=Zi(i);return`time(${s.seconds},${s.nanos})`}(t.timestampValue):"stringValue"in t?t.stringValue:"bytesValue"in t?aa(t.bytesValue).toBase64():"referenceValue"in t?(r=t.referenceValue,ke.fromName(r).toString()):"geoPointValue"in t?`geo(${(e=t.geoPointValue).latitude},${e.longitude})`:"arrayValue"in t?function(i){let s="[",o=!0;for(const a of i.values||[])o?o=!1:s+=",",s+=ey(a);return s+"]"}(t.arrayValue):"mapValue"in t?function(i){const s=Object.keys(i.fields||{}).sort();let o="{",a=!0;for(const l of s)a?a=!1:o+=",",o+=`${l}:${ey(i.fields[l])}`;return o+"}"}(t.mapValue):$e();var e,r}function FS(t,e){return{referenceValue:`projects/${t.projectId}/databases/${t.database}/documents/${e.path.canonicalString()}`}}function ty(t){return!!t&&"integerValue"in t}function U0(t){return!!t&&"arrayValue"in t}function US(t){return!!t&&"nullValue"in t}function BS(t){return!!t&&"doubleValue"in t&&isNaN(Number(t.doubleValue))}function _d(t){return!!t&&"mapValue"in t}function Hl(t){if(t.geoPointValue)return{geoPointValue:Object.assign({},t.geoPointValue)};if(t.timestampValue&&typeof t.timestampValue=="object")return{timestampValue:Object.assign({},t.timestampValue)};if(t.mapValue){const e={mapValue:{fields:{}}};return ao(t.mapValue.fields,(r,i)=>e.mapValue.fields[r]=Hl(i)),e}if(t.arrayValue){const e={arrayValue:{values:[]}};for(let r=0;r<(t.arrayValue.values||[]).length;++r)e.arrayValue.values[r]=Hl(t.arrayValue.values[r]);return e}return Object.assign({},t)}function T4(t){return(((t.mapValue||{}).fields||{}).__type__||{}).stringValue==="__max__"}/** 1977 * @license 1978 * Copyright 2017 Google LLC 1979 * 1980 * Licensed under the Apache License, Version 2.0 (the "License"); 1981 * you may not use this file except in compliance with the License. 1982 * You may obtain a copy of the License at 1983 * 1984 * http://www.apache.org/licenses/LICENSE-2.0 1985 * 1986 * Unless required by applicable law or agreed to in writing, software 1987 * distributed under the License is distributed on an "AS IS" BASIS, 1988 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1989 * See the License for the specific language governing permissions and 1990 * limitations under the License. 1991 */class Dn{constructor(e){this.value=e}static empty(){return new Dn({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let r=this.value;for(let i=0;i<e.length-1;++i)if(r=(r.mapValue.fields||{})[e.get(i)],!_d(r))return null;return r=(r.mapValue.fields||{})[e.lastSegment()],r||null}}set(e,r){this.getFieldsMap(e.popLast())[e.lastSegment()]=Hl(r)}setAll(e){let r=dn.emptyPath(),i={},s=[];e.forEach((a,l)=>{if(!r.isImmediateParentOf(l)){const c=this.getFieldsMap(r);this.applyChanges(c,i,s),i={},s=[],r=l.popLast()}a?i[l.lastSegment()]=Hl(a):s.push(l.lastSegment())});const o=this.getFieldsMap(r);this.applyChanges(o,i,s)}delete(e){const r=this.field(e.popLast());_d(r)&&r.mapValue.fields&&delete r.mapValue.fields[e.lastSegment()]}isEqual(e){return Fr(this.value,e.value)}getFieldsMap(e){let r=this.value;r.mapValue.fields||(r.mapValue={fields:{}});for(let i=0;i<e.length;++i){let s=r.mapValue.fields[e.get(i)];_d(s)&&s.mapValue.fields||(s={mapValue:{fields:{}}},r.mapValue.fields[e.get(i)]=s),r=s}return r.mapValue.fields}
1991applyChanges(e,r,i){ao(r,(s,o)=>e[s]=o);for(const s of i)delete e[s]}clone(){return new Dn(Hl(this.value))}}function oI(t){const e=[];return ao(t.fields,(r,i)=>{const s=new dn([r]);if(_d(i)){const o=oI(i.mapValue).fields;if(o.length===0)e.push(s);else for(const a of o)e.push(s.child(a))}else e.push(s)}),new nr(e)}/** 1992 * @license 1993 * Copyright 2017 Google LLC 1994 * 1995 * Licensed under the Apache License, Version 2.0 (the "License"); 1996 * you may not use this file except in compliance with the License. 1997 * You may obtain a copy of the License at 1998 * 1999 * http://www.apache.org/licenses/LICENSE-2.0 2000 * 2001 * Unless required by applicable law or agreed to in writing, software 2002 * distributed under the License is distributed on an "AS IS" BASIS, 2003 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2004 * See the License for the specific language governing permissions and 2005 * limitations under the License. 2006 */class Qt{constructor(e,r,i,s,o,a){this.key=e,this.documentType=r,this.version=i,this.readTime=s,this.data=o,this.documentState=a}static newInvalidDocument(e){return new Qt(e,0,Ve.min(),Ve.min(),Dn.empty(),0)}static newFoundDocument(e,r,i){return new Qt(e,1,r,Ve.min(),i,0)}static newNoDocument(e,r){return new Qt(e,2,r,Ve.min(),Dn.empty(),0)}static newUnknownDocument(e,r){return new Qt(e,3,r,Ve.min(),Dn.empty(),2)}convertToFoundDocument(e,r){return this.version=e,this.documentType=1,this.data=r,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=Dn.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=Dn.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=Ve.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return this.documentState===1}get hasCommittedMutations(){return this.documentState===2}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return this.documentType!==0}isFoundDocument(){return this.documentType===1}isNoDocument(){return this.documentType===2}isUnknownDocument(){return this.documentType===3}isEqual(e){return e instanceof Qt&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new Qt(this.key,this.documentType,this.version,this.readTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}/** 2007 * @license 2008 * Copyright 2019 Google LLC 2009 * 2010 * Licensed under the Apache License, Version 2.0 (the "License"); 2011 * you may not use this file except in compliance with the License. 2012 * You may obtain a copy of the License at 2013 * 2014 * http://www.apache.org/licenses/LICENSE-2.0 2015 * 2016 * Unless required by applicable law or agreed to in writing, software 2017 * distributed under the License is distributed on an "AS IS" BASIS, 2018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2019 * See the License for the specific language governing permissions and 2020 * limitations under the License. 2021 */class I4{constructor(e,r=null,i=[],s=[],o=null,a=null,l=null){this.path=e,this.collectionGroup=r,this.orderBy=i,this.filters=s,this.limit=o,this.startAt=a,this.endAt=l,this.ht=null}}function jS(t,e=null,r=[],i=[],s=null,o=null,a=null){return new I4(t,e,r,i,s,o,a)}function B0(t){const e=Ue(t);if(e.ht===null){let r=e.path.canonicalString();e.collectionGroup!==null&&(r+="|cg:"+e.collectionGroup),r+="|f:",r+=e.filters.map(i=>{return(s=i).field.canonicalString()+s.op.toString()+Yo(s.value);var s}).join(","),r+="|ob:",r+=e.orderBy.map(i=>function(s){return s.field.canonicalString()+s.dir}(i)).join(","),Lf(e.limit)||(r+="|l:",r+=e.limit),e.startAt&&(r+="|lb:",r+=e.startAt.inclusive?"b:":"a:",r+=e.startAt.position.map(i=>Yo(i)).join(",")),e.endAt&&(r+="|ub:",r+=e.endAt.inclusive?"a:":"b:",r+=e.endAt.position.map(i=>Yo(i)).join(",")),e.ht=r}return e.ht}function R4(t){let e=t.path.canonicalString();return t.collectionGroup!==null&&(e+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(e+=`, filters: [${t.filters.map(r=>{return`${(i=r).field.canonicalString()} ${i.op} ${Yo(i.value)}`;var i}).join(", ")}]`),Lf(t.limit)||(e+=", limit: "+t.limit),t.orderBy.length>0&&(e+=`, orderBy: [${t.orderBy.map(r=>function(i){return`${i.field.canonicalString()} (${i.dir})`}(r)).join(", ")}]`),t.startAt&&(e+=", startAt: ",e+=t.startAt.inclusive?"b:":"a:",e+=t.startAt.position.map(r=>Yo(r)).join(",")),t.endAt&&(e+=", endAt: ",e+=t.endAt.inclusive?"a:":"b:",e+=t.endAt.position.map(r=>Yo(r)).join(",")),`Target(${e})`}function j0(t,e){if(t.limit!==e.limit||t.orderBy.length!==e.orderBy.length)return!1;for(let s=0;s<t.orderBy.length;s++)if(!L4(t.orderBy[s],e.orderBy[s]))return!1;if(t.filters.length!==e.filters.length)return!1;for(let s=0;s<t.filters.length;s++)if(r=t.filters[s],i=e.filters[s],r.op!==i.op||!r.field.isEqual(i.field)||!Fr(r.value,i.value))return!1;var r,i;return t.collectionGroup===e.collectionGroup&&!!t.path.isEqual(e.path)&&!!VS(t.startAt,e.startAt)&&VS(t.endAt,e.endAt)}function ny(t){return ke.isDocumentKey(t.path)&&t.collectionGroup===null&&t.filters.length===0}class Cn extends class{}{constructor(e,r,i){super(),this.field=e,this.op=r,this.value=i}static create(e,r,i){return e.isKeyField()?r==="in"||r==="not-in"?this.lt(e,r,i):new P4(e,r,i):r==="array-contains"?new D4(e,i):r==="in"?new M4(e,i):r==="not-in"?new N4(e,i):r==="array-contains-any"?new $4(e,i):new Cn(e,r,i)}static lt(e,r,i){return r==="in"?new A4(e,i):new O4(e,i)}matches(e){const r=e.data.field(this.field);return this.op==="!="?r!==null&&this.ft(la(r,this.value)):r!==null&&Zs(this.value)===Zs(r)&&this.ft(la(r,this.value))}ft(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return e===0;case"!=":return e!==0;case">":return e>0;case">=":return e>=0;default:return $e()}}dt(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}}class P4 extends Cn{constructor(e,r,i){super(e,r,i),this.key=ke.fromName(i.referenceValue)}matches(e){const r=ke.comparator(e.key,this.key);return this.ft(r)}}class A4 extends Cn{constructor(e,r){super(e,"in",r),this.keys=aI("in",r)}matches(e){return this.keys.some(r=>r.isEqual(e.key))}}class O4 extends Cn{constructor(e,r){super(e,"not-in",r),this.keys=aI("not-in",r)}matches(e){return!this.keys.some(r=>r.isEqual(e.key))}}function aI(t,e){var r;return(((r=e.arrayValue)===null||r===void 0?void 0:r.values)||[]).map(i=>ke.fromName(i.referenceValue))}class D4 extends Cn{constructor(e,r){super(e,"array-contains",r)}matches(e){const r=e.data.field(this.field);return U0(r)&&Ou(r.arrayValue,this.value)}}class M4 extends Cn{constructor(e,r){super(e,"in",r)}matches(e){const r=e.data.field(this.field);return r!==null&&Ou(this.value.arrayValue,r)}}class N4 extends Cn{constructor(e,r){super(e,"not-in",r)}matches(e){if(Ou(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const r=e.data.field(this.field);return r!==null&&!Ou(this.value.arrayValue,r)}}class $4 extends Cn{constructor(e,r){super(e,"array-contains-any",r)}matches(e){const r=e.data.field(this.field);return!(!U0(r)||!r.arrayValue.values)&&r.arrayValue.values.some(i=>Ou(this.value.arrayValue,i))}}class bh{constructor(e,r){this.position=e,this.inclusive=r}}class ql{constructor(e,r="asc"){this.field=e,this.dir=r}}function L4(t,e){return t.dir===e.dir&&t.field.isEqual(e.field)}function zS(t,e,r){let i=0;for(let s=0;s<t.position.length;s++){const o=e[s],a=t.position[s];if(o.field.isKeyField()?i=ke.comparator(ke.fromName(a.referenceValue),r.key):i=la(a,r.data.field(o.field)),o.dir==="desc"&&(i*=-1),i!==0)break}return i}function VS(t,e){if(t===null)return e===null;if(e===null||t.inclusive!==e.inclusive||t.position.length!==e.position.length)return!1;for(let r=0;r<t.position.length;r++)if(!Fr(t.position[r],e.position[r]))return!1;return!0}/** 2022 * @license 2023 * Copyright 2017 Google LLC 2024 * 2025 * Licensed under the Apache License, Version 2.0 (the "License");
2026 * you may not use this file except in compliance with the License. 2027 * You may obtain a copy of the License at 2028 * 2029 * http://www.apache.org/licenses/LICENSE-2.0 2030 * 2031 * Unless required by applicable law or agreed to in writing, software 2032 * distributed under the License is distributed on an "AS IS" BASIS, 2033 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2034 * See the License for the specific language governing permissions and 2035 * limitations under the License. 2036 */class mc{constructor(e,r=null,i=[],s=[],o=null,a="F",l=null,c=null){this.path=e,this.collectionGroup=r,this.explicitOrderBy=i,this.filters=s,this.limit=o,this.limitType=a,this.startAt=l,this.endAt=c,this._t=null,this.wt=null,this.startAt,this.endAt}}function F4(t,e,r,i,s,o,a,l){return new mc(t,e,r,i,s,o,a,l)}function z0(t){return new mc(t)}function WS(t){return t.filters.length===0&&t.limit===null&&t.startAt==null&&t.endAt==null&&(t.explicitOrderBy.length===0||t.explicitOrderBy.length===1&&t.explicitOrderBy[0].field.isKeyField())}function lI(t){return t.explicitOrderBy.length>0?t.explicitOrderBy[0].field:null}function uI(t){for(const e of t.filters)if(e.dt())return e.field;return null}function cI(t){return t.collectionGroup!==null}function Du(t){const e=Ue(t);if(e._t===null){e._t=[];const r=uI(e),i=lI(e);if(r!==null&&i===null)r.isKeyField()||e._t.push(new ql(r)),e._t.push(new ql(dn.keyField(),"asc"));else{let s=!1;for(const o of e.explicitOrderBy)e._t.push(o),o.field.isKeyField()&&(s=!0);if(!s){const o=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";e._t.push(new ql(dn.keyField(),o))}}}return e._t}function oi(t){const e=Ue(t);if(!e.wt)if(e.limitType==="F")e.wt=jS(e.path,e.collectionGroup,Du(e),e.filters,e.limit,e.startAt,e.endAt);else{const r=[];for(const o of Du(e)){const a=o.dir==="desc"?"asc":"desc";r.push(new ql(o.field,a))}const i=e.endAt?new bh(e.endAt.position,e.endAt.inclusive):null,s=e.startAt?new bh(e.startAt.position,e.startAt.inclusive):null;e.wt=jS(e.path,e.collectionGroup,r,e.filters,e.limit,i,s)}return e.wt}function ry(t,e,r){return new mc(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),e,r,t.startAt,t.endAt)}function Ff(t,e){return j0(oi(t),oi(e))&&t.limitType===e.limitType}function dI(t){return`${B0(oi(t))}|lt:${t.limitType}`}function iy(t){return`Query(target=${R4(oi(t))}; limitType=${t.limitType})`}function V0(t,e){return e.isFoundDocument()&&function(r,i){const s=i.key.path;return r.collectionGroup!==null?i.key.hasCollectionId(r.collectionGroup)&&r.path.isPrefixOf(s):ke.isDocumentKey(r.path)?r.path.isEqual(s):r.path.isImmediateParentOf(s)}(t,e)&&function(r,i){for(const s of r.explicitOrderBy)if(!s.field.isKeyField()&&i.data.field(s.field)===null)return!1;return!0}(t,e)&&function(r,i){for(const s of r.filters)if(!s.matches(i))return!1;return!0}(t,e)&&function(r,i){return!(r.startAt&&!function(s,o,a){const l=zS(s,o,a);return s.inclusive?l<=0:l<0}(r.startAt,Du(r),i)||r.endAt&&!function(s,o,a){const l=zS(s,o,a);return s.inclusive?l>=0:l>0}(r.endAt,Du(r),i))}(t,e)}function U4(t){return t.collectionGroup||(t.path.length%2==1?t.path.lastSegment():t.path.get(t.path.length-2))}function hI(t){return(e,r)=>{let i=!1;for(const s of Du(t)){const o=B4(s,e,r);if(o!==0)return o;i=i||s.field.isKeyField()}return 0}}function B4(t,e,r){const i=t.field.isKeyField()?ke.comparator(e.key,r.key):function(s,o,a){const l=o.data.field(s),c=a.data.field(s);return l!==null&&c!==null?la(l,c):$e()}(t.field,e,r);switch(t.dir){case"asc":return i;case"desc":return-1*i;default:return $e()}}/** 2037 * @license 2038 * Copyright 2020 Google LLC 2039 * 2040 * Licensed under the Apache License, Version 2.0 (the "License"); 2041 * you may not use this file except in compliance with the License. 2042 * You may obtain a copy of the License at 2043 * 2044 * http://www.apache.org/licenses/LICENSE-2.0 2045 * 2046 * Unless required by applicable law or agreed to in writing, software 2047 * distributed under the License is distributed on an "AS IS" BASIS, 2048 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2049 * See the License for the specific language governing permissions and 2050 * limitations under the License. 2051 */function fI(t,e){if(t.gt){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:vh(e)?"-0":e}}function pI(t){return{integerValue:""+t}}function j4(t,e){return k4(e)?pI(e):fI(t,e)}/** 2052 * @license 2053 * Copyright 2018 Google LLC 2054 * 2055 * Licensed under the Apache License, Version 2.0 (the "License");
2056 * you may not use this file except in compliance with the License. 2057 * You may obtain a copy of the License at 2058 * 2059 * http://www.apache.org/licenses/LICENSE-2.0 2060 * 2061 * Unless required by applicable law or agreed to in writing, software 2062 * distributed under the License is distributed on an "AS IS" BASIS, 2063 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2064 * See the License for the specific language governing permissions and 2065 * limitations under the License. 2066 */class Uf{constructor(){this._=void 0}}function z4(t,e,r){return t instanceof Mu?function(i,s){const o={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:i.seconds,nanos:i.nanoseconds}}}};return s&&(o.fields.__previous_value__=s),{mapValue:o}}(r,e):t instanceof Nu?mI(t,e):t instanceof $u?yI(t,e):function(i,s){const o=gI(i,s),a=GS(o)+GS(i.yt);return ty(o)&&ty(i.yt)?pI(a):fI(i.It,a)}(t,e)}function V4(t,e,r){return t instanceof Nu?mI(t,e):t instanceof $u?yI(t,e):r}function gI(t,e){return t instanceof wh?ty(r=e)||function(i){return!!i&&"doubleValue"in i}(r)?e:{integerValue:0}:null;var r}class Mu extends Uf{}class Nu extends Uf{constructor(e){super(),this.elements=e}}function mI(t,e){const r=vI(e);for(const i of t.elements)r.some(s=>Fr(s,i))||r.push(i);return{arrayValue:{values:r}}}class $u extends Uf{constructor(e){super(),this.elements=e}}function yI(t,e){let r=vI(e);for(const i of t.elements)r=r.filter(s=>!Fr(s,i));return{arrayValue:{values:r}}}class wh extends Uf{constructor(e,r){super(),this.It=e,this.yt=r}}function GS(t){return At(t.integerValue||t.doubleValue)}function vI(t){return U0(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]}/** 2067 * @license 2068 * Copyright 2017 Google LLC 2069 * 2070 * Licensed under the Apache License, Version 2.0 (the "License"); 2071 * you may not use this file except in compliance with the License. 2072 * You may obtain a copy of the License at 2073 * 2074 * http://www.apache.org/licenses/LICENSE-2.0 2075 * 2076 * Unless required by applicable law or agreed to in writing, software 2077 * distributed under the License is distributed on an "AS IS" BASIS, 2078 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2079 * See the License for the specific language governing permissions and 2080 * limitations under the License. 2081 */class W4{constructor(e,r){this.field=e,this.transform=r}}function G4(t,e){return t.field.isEqual(e.field)&&function(r,i){return r instanceof Nu&&i instanceof Nu||r instanceof $u&&i instanceof $u?oa(r.elements,i.elements,Fr):r instanceof wh&&i instanceof wh?Fr(r.yt,i.yt):r instanceof Mu&&i instanceof Mu}(t.transform,e.transform)}class H4{constructor(e,r){this.version=e,this.transformResults=r}}class br{constructor(e,r){this.updateTime=e,this.exists=r}static none(){return new br}static exists(e){return new br(void 0,e)}static updateTime(e){return new br(e)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function Ed(t,e){return t.updateTime!==void 0?e.isFoundDocument()&&e.version.isEqual(t.updateTime):t.exists===void 0||t.exists===e.isFoundDocument()}class Bf{}function bI(t,e){if(!t.hasLocalMutations||e&&e.fields.length===0)return null;if(e===null)return t.isNoDocument()?new W0(t.key,br.none()):new yc(t.key,t.data,br.none());{const r=t.data,i=Dn.empty();let s=new Lt(dn.comparator);for(let o of e.fields)if(!s.has(o)){let a=r.field(o);a===null&&o.length>1&&(o=o.popLast(),a=r.field(o)),a===null?i.delete(o):i.set(o,a),s=s.add(o)}return new cs(t.key,i,new nr(s.toArray()),br.none())}}function q4(t,e,r){t instanceof yc?function(i,s,o){const a=i.value.clone(),l=qS(i.fieldTransforms,s,o.transformResults);a.setAll(l),s.convertToFoundDocument(o.version,a).setHasCommittedMutations()}(t,e,r):t instanceof cs?function(i,s,o){if(!Ed(i.precondition,s))return void s.convertToUnknownDocument(o.version);const a=qS(i.fieldTransforms,s,o.transformResults),l=s.data;l.setAll(wI(i)),l.setAll(a),s.convertToFoundDocument(o.version,l).setHasCommittedMutations()}(t,e,r):function(i,s,o){s.convertToNoDocument(o.version).setHasCommittedMutations()}(0,e,r)}function Kl(t,e,r,i){return t instanceof yc?function(s,o,a,l){if(!Ed(s.prec
2081ondition,o))return a;const c=s.value.clone(),d=KS(s.fieldTransforms,l,o);return c.setAll(d),o.convertToFoundDocument(o.version,c).setHasLocalMutations(),null}(t,e,r,i):t instanceof cs?function(s,o,a,l){if(!Ed(s.precondition,o))return a;const c=KS(s.fieldTransforms,l,o),d=o.data;return d.setAll(wI(s)),d.setAll(c),o.convertToFoundDocument(o.version,d).setHasLocalMutations(),a===null?null:a.unionWith(s.fieldMask.fields).unionWith(s.fieldTransforms.map(f=>f.field))}(t,e,r,i):function(s,o,a){return Ed(s.precondition,o)?(o.convertToNoDocument(o.version).setHasLocalMutations(),null):a}(t,e,r)}function K4(t,e){let r=null;for(const i of t.fieldTransforms){const s=e.data.field(i.field),o=gI(i.transform,s||null);o!=null&&(r===null&&(r=Dn.empty()),r.set(i.field,o))}return r||null}function HS(t,e){return t.type===e.type&&!!t.key.isEqual(e.key)&&!!t.precondition.isEqual(e.precondition)&&!!function(r,i){return r===void 0&&i===void 0||!(!r||!i)&&oa(r,i,(s,o)=>G4(s,o))}(t.fieldTransforms,e.fieldTransforms)&&(t.type===0?t.value.isEqual(e.value):t.type!==1||t.data.isEqual(e.data)&&t.fieldMask.isEqual(e.fieldMask))}class yc extends Bf{constructor(e,r,i,s=[]){super(),this.key=e,this.value=r,this.precondition=i,this.fieldTransforms=s,this.type=0}getFieldMask(){return null}}class cs extends Bf{constructor(e,r,i,s,o=[]){super(),this.key=e,this.data=r,this.fieldMask=i,this.precondition=s,this.fieldTransforms=o,this.type=1}getFieldMask(){return this.fieldMask}}function wI(t){const e=new Map;return t.fieldMask.fields.forEach(r=>{if(!r.isEmpty()){const i=t.data.field(r);e.set(r,i)}}),e}function qS(t,e,r){const i=new Map;lt(t.length===r.length);for(let s=0;s<r.length;s++){const o=t[s],a=o.transform,l=e.data.field(o.field);i.set(o.field,V4(a,l,r[s]))}return i}function KS(t,e,r){const i=new Map;for(const s of t){const o=s.transform,a=r.data.field(s.field);i.set(s.field,z4(o,a,e))}return i}class W0 extends Bf{constructor(e,r){super(),this.key=e,this.precondition=r,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class Y4 extends Bf{constructor(e,r){super(),this.key=e,this.precondition=r,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}/** 2082 * @license 2083 * Copyright 2017 Google LLC 2084 * 2085 * Licensed under the Apache License, Version 2.0 (the "License"); 2086 * you may not use this file except in compliance with the License. 2087 * You may obtain a copy of the License at 2088 * 2089 * http://www.apache.org/licenses/LICENSE-2.0 2090 * 2091 * Unless required by applicable law or agreed to in writing, software 2092 * distributed under the License is distributed on an "AS IS" BASIS, 2093 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2094 * See the License for the specific language governing permissions and 2095 * limitations under the License. 2096 */class X4{constructor(e){this.count=e}}/** 2097 * @license 2098 * Copyright 2017 Google LLC 2099 * 2100 * Licensed under the Apache License, Version 2.0 (the "License"); 2101 * you may not use this file except in compliance with the License. 2102 * You may obtain a copy of the License at 2103 * 2104 * http://www.apache.org/licenses/LICENSE-2.0 2105 * 2106 * Unless required by applicable law or agreed to in writing, software 2107 * distributed under the License is distributed on an "AS IS" BASIS, 2108 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2109 * See the License for the specific language governing permissions and 2110 * limitations under the License. 2111 */var Pt,Ge;function Q4(t){switch(t){default:return $e();case se.CANCELLED:case se.UNKNOWN:case se.DEADLINE_EXCEEDED:case se.RESOURCE_EXHAUSTED:case se.INTERNAL:case se.UNAVAILABLE:case se.UNAUTHENTICATED:return!1;case se.INVALID_ARGUMENT:case se.NOT_FOUND:case se.ALREADY_EXISTS:case se.PERMISSION_DENIED:case se.FAILED_PRECONDITION:case se.ABORTED:case se.OUT_OF_RANGE:case se.UNIMPLEMENTED:case se.DATA_LOSS:return!0}}function SI(t){if(t===void 0)return si("GRPC error has no .code"),se.UNKNOWN;switch(t){case Pt.OK:return se.OK;case Pt.CANCELLED:return se.CANCELLED;case Pt.UNKNOWN:return se.UNKNOWN;case Pt.DEADLINE_EXCEEDED:return se.DEADLINE_EXCEEDED;case Pt.RESOURCE_EXHAUSTED:return se.RESOURCE_EXHAUSTED;case Pt.INTERNAL:return se.INTERNAL;case Pt.UNAVAILABLE:return se.UNAVAILABLE;case Pt.UNAUTHENTICATED:return se.UNAUTHENTICATED;
2111case Pt.INVALID_ARGUMENT:return se.INVALID_ARGUMENT;case Pt.NOT_FOUND:return se.NOT_FOUND;case Pt.ALREADY_EXISTS:return se.ALREADY_EXISTS;case Pt.PERMISSION_DENIED:return se.PERMISSION_DENIED;case Pt.FAILED_PRECONDITION:return se.FAILED_PRECONDITION;case Pt.ABORTED:return se.ABORTED;case Pt.OUT_OF_RANGE:return se.OUT_OF_RANGE;case Pt.UNIMPLEMENTED:return se.UNIMPLEMENTED;case Pt.DATA_LOSS:return se.DATA_LOSS;default:return $e()}}(Ge=Pt||(Pt={}))[Ge.OK=0]="OK",Ge[Ge.CANCELLED=1]="CANCELLED",Ge[Ge.UNKNOWN=2]="UNKNOWN",Ge[Ge.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",Ge[Ge.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",Ge[Ge.NOT_FOUND=5]="NOT_FOUND",Ge[Ge.ALREADY_EXISTS=6]="ALREADY_EXISTS",Ge[Ge.PERMISSION_DENIED=7]="PERMISSION_DENIED",Ge[Ge.UNAUTHENTICATED=16]="UNAUTHENTICATED",Ge[Ge.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",Ge[Ge.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",Ge[Ge.ABORTED=10]="ABORTED",Ge[Ge.OUT_OF_RANGE=11]="OUT_OF_RANGE",Ge[Ge.UNIMPLEMENTED=12]="UNIMPLEMENTED",Ge[Ge.INTERNAL=13]="INTERNAL",Ge[Ge.UNAVAILABLE=14]="UNAVAILABLE",Ge[Ge.DATA_LOSS=15]="DATA_LOSS";/** 2112 * @license 2113 * Copyright 2017 Google LLC 2114 * 2115 * Licensed under the Apache License, Version 2.0 (the "License"); 2116 * you may not use this file except in compliance with the License. 2117 * You may obtain a copy of the License at 2118 * 2119 * http://www.apache.org/licenses/LICENSE-2.0 2120 * 2121 * Unless required by applicable law or agreed to in writing, software 2122 * distributed under the License is distributed on an "AS IS" BASIS, 2123 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2124 * See the License for the specific language governing permissions and 2125 * limitations under the License. 2126 */class Pa{constructor(e,r){this.mapKeyFn=e,this.equalsFn=r,this.inner={},this.innerSize=0}get(e){const r=this.mapKeyFn(e),i=this.inner[r];if(i!==void 0){for(const[s,o]of i)if(this.equalsFn(s,e))return o}}has(e){return this.get(e)!==void 0}set(e,r){const i=this.mapKeyFn(e),s=this.inner[i];if(s===void 0)return this.inner[i]=[[e,r]],void this.innerSize++;for(let o=0;o<s.length;o++)if(this.equalsFn(s[o][0],e))return void(s[o]=[e,r]);s.push([e,r]),this.innerSize++}delete(e){const r=this.mapKeyFn(e),i=this.inner[r];if(i===void 0)return!1;for(let s=0;s<i.length;s++)if(this.equalsFn(i[s][0],e))return i.length===1?delete this.inner[r]:i.splice(s,1),this.innerSize--,!0;return!1}forEach(e){ao(this.inner,(r,i)=>{for(const[s,o]of i)e(s,o)})}isEmpty(){return rI(this.inner)}size(){return this.innerSize}}/** 2127 * @license 2128 * Copyright 2017 Google LLC 2129 * 2130 * Licensed under the Apache License, Version 2.0 (the "License"); 2131 * you may not use this file except in compliance with the License. 2132 * You may obtain a copy of the License at 2133 * 2134 * http://www.apache.org/licenses/LICENSE-2.0 2135 * 2136 * Unless required by applicable law or agreed to in writing, software 2137 * distributed under the License is distributed on an "AS IS" BASIS, 2138 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2139 * See the License for the specific language governing permissions and 2140 * limitations under the License. 2141 */const J4=new Ft(ke.comparator);function ai(){return J4}const CI=new Ft(ke.comparator);function El(...t){let e=CI;for(const r of t)e=e.insert(r.key,r);return e}function xI(t){let e=CI;return t.forEach((r,i)=>e=e.insert(r,i.overlayedDocument)),e}function As(){return Yl()}function _I(){return Yl()}function Yl(){return new Pa(t=>t.toString(),(t,e)=>t.isEqual(e))}const Z4=new Ft(ke.comparator),eU=new Lt(ke.comparator);function We(...t){let e=eU;for(const r of t)e=e.add(r);return e}const tU=new Lt(Ze);function EI(){return tU}/** 2142 * @license 2143 * Copyright 2017 Google LLC 2144 * 2145 * Licensed under the Apache License, Version 2.0 (the "License"); 2146 * you may not use this file except in compliance with the License. 2147 * You may obtain a copy of the License at 2148 * 2149 * http://www.apache.org/licenses/LICENSE-2.0 2150 * 2151 * Unless required by applicable law or agreed to in writing, software 2152 * distributed under the License is distributed on an "AS IS" BASIS, 2153 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2154 * See the License for the specific language governing permissions and 2155 * limitations under the License. 2156 */class jf{constructor(e,r,i,s,o){this.snapshotVersion=e,this.targetChanges=r,this.targetMismatches=i,this.documentUpdates=s,this.resolvedLimboDocuments=o}static createSynthesizedRemoteEventForCurrentChange(e,r){const i=new Map;return i.set(e,vc.createSynthesizedTargetChangeForCurrentChange(e,r)),new jf(Ve.min(),i,EI(),ai(),We())}}class vc{constructor(e,r,i,s,o){this.resumeToken=e,this.current=r,this.addedDocuments=i,this.modifiedDocuments=s,this.removedDocuments=o}static createSynthesizedTargetChangeForCurrentChange(e,r){return new vc(rn.EMPTY_BYTE_STRING,r,We(),We(),We())}}/** 2157 * @license 2158 * Copyright 2017 Google LLC 2159 * 2160 * Licensed under the Apache License, Version 2.0 (the "License");
2161 * you may not use this file except in compliance with the License. 2162 * You may obtain a copy of the License at 2163 * 2164 * http://www.apache.org/licenses/LICENSE-2.0 2165 * 2166 * Unless required by applicable law or agreed to in writing, software 2167 * distributed under the License is distributed on an "AS IS" BASIS, 2168 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2169 * See the License for the specific language governing permissions and 2170 * limitations under the License. 2171 */let kd=class{constructor(e,r,i,s){this.Tt=e,this.removedTargetIds=r,this.key=i,this.Et=s}};class kI{constructor(e,r){this.targetId=e,this.At=r}}class TI{constructor(e,r,i=rn.EMPTY_BYTE_STRING,s=null){this.state=e,this.targetIds=r,this.resumeToken=i,this.cause=s}}class YS{constructor(){this.Rt=0,this.bt=QS(),this.Pt=rn.EMPTY_BYTE_STRING,this.vt=!1,this.Vt=!0}get current(){return this.vt}get resumeToken(){return this.Pt}get St(){return this.Rt!==0}get Dt(){return this.Vt}Ct(e){e.approximateByteSize()>0&&(this.Vt=!0,this.Pt=e)}xt(){let e=We(),r=We(),i=We();return this.bt.forEach((s,o)=>{switch(o){case 0:e=e.add(s);break;case 2:r=r.add(s);break;case 1:i=i.add(s);break;default:$e()}}),new vc(this.Pt,this.vt,e,r,i)}Nt(){this.Vt=!1,this.bt=QS()}kt(e,r){this.Vt=!0,this.bt=this.bt.insert(e,r)}Mt(e){this.Vt=!0,this.bt=this.bt.remove(e)}Ot(){this.Rt+=1}Ft(){this.Rt-=1}$t(){this.Vt=!0,this.vt=!0}}class nU{constructor(e){this.Bt=e,this.Lt=new Map,this.Ut=ai(),this.qt=XS(),this.Kt=new Lt(Ze)}Gt(e){for(const r of e.Tt)e.Et&&e.Et.isFoundDocument()?this.Qt(r,e.Et):this.jt(r,e.key,e.Et);for(const r of e.removedTargetIds)this.jt(r,e.key,e.Et)}Wt(e){this.forEachTarget(e,r=>{const i=this.zt(r);switch(e.state){case 0:this.Ht(r)&&i.Ct(e.resumeToken);break;case 1:i.Ft(),i.St||i.Nt(),i.Ct(e.resumeToken);break;case 2:i.Ft(),i.St||this.removeTarget(r);break;case 3:this.Ht(r)&&(i.$t(),i.Ct(e.resumeToken));break;case 4:this.Ht(r)&&(this.Jt(r),i.Ct(e.resumeToken));break;default:$e()}})}forEachTarget(e,r){e.targetIds.length>0?e.targetIds.forEach(r):this.Lt.forEach((i,s)=>{this.Ht(s)&&r(s)})}Yt(e){const r=e.targetId,i=e.At.count,s=this.Xt(r);if(s){const o=s.target;if(ny(o))if(i===0){const a=new ke(o.path);this.jt(r,a,Qt.newNoDocument(a,Ve.min()))}else lt(i===1);else this.Zt(r)!==i&&(this.Jt(r),this.Kt=this.Kt.add(r))}}te(e){const r=new Map;this.Lt.forEach((o,a)=>{const l=this.Xt(a);if(l){if(o.current&&ny(l.target)){const c=new ke(l.target.path);this.Ut.get(c)!==null||this.ee(a,c)||this.jt(a,c,Qt.newNoDocument(c,e))}o.Dt&&(r.set(a,o.xt()),o.Nt())}});let i=We();this.qt.forEach((o,a)=>{let l=!0;a.forEachWhile(c=>{const d=this.Xt(c);return!d||d.purpose===2||(l=!1,!1)}),l&&(i=i.add(o))}),this.Ut.forEach((o,a)=>a.setReadTime(e));const s=new jf(e,r,this.Kt,this.Ut,i);return this.Ut=ai(),this.qt=XS(),this.Kt=new Lt(Ze),s}Qt(e,r){if(!this.Ht(e))return;const i=this.ee(e,r.key)?2:0;this.zt(e).kt(r.key,i),this.Ut=this.Ut.insert(r.key,r),this.qt=this.qt.insert(r.key,this.ne(r.key).add(e))}jt(e,r,i){if(!this.Ht(e))return;const s=this.zt(e);this.ee(e,r)?s.kt(r,1):s.Mt(r),this.qt=this.qt.insert(r,this.ne(r).delete(e)),i&&(this.Ut=this.Ut.insert(r,i))}removeTarget(e){this.Lt.delete(e)}Zt(e){const r=this.zt(e).xt();return this.Bt.getRemoteKeysForTarget(e).size+r.addedDocuments.size-r.removedDocuments.size}Ot(e){this.zt(e).Ot()}zt(e){let r=this.Lt.get(e);return r||(r=new YS,this.Lt.set(e,r)),r}ne(e){let r=this.qt.get(e);return r||(r=new Lt(Ze),this.qt=this.qt.insert(e,r)),r}Ht(e){const r=this.Xt(e)!==null;return r||Ee("WatchChangeAggregator","Detected inactive target",e),r}Xt(e){const r=this.Lt.get(e);return r&&r.St?null:this.Bt.se(e)}Jt(e){this.Lt.set(e,new YS),this.Bt.getRemoteKeysForTarget(e).forEach(r=>{this.jt(e,r,null)})}ee(e,r){return this.Bt.getRemoteKeysForTarget(e).has(r)}}function XS(){return new Ft(ke.comparator)}function QS(){return new Ft(ke.comparator)}/** 2172 * @license 2173 * Copyright 2017 Google LLC 2174 * 2175 * Licensed under the Apache License, Version 2.0 (the "License"); 2176 * you may not use this file except in compliance with the License. 2177 * You may obtain a copy of the License at 2178 * 2179 * http://www.apache.org/licenses/LICENSE-2.0 2180 * 2181 * Unless required by applicable law or agreed to in writing, softw
2181are 2182 * distributed under the License is distributed on an "AS IS" BASIS, 2183 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2184 * See the License for the specific language governing permissions and 2185 * limitations under the License. 2186 */const rU=(()=>({asc:"ASCENDING",desc:"DESCENDING"}))(),iU=(()=>({"<":"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"}))();class sU{constructor(e,r){this.databaseId=e,this.gt=r}}function Sh(t,e){return t.gt?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function II(t,e){return t.gt?e.toBase64():e.toUint8Array()}function oU(t,e){return Sh(t,e.toTimestamp())}function ti(t){return lt(!!t),Ve.fromTimestamp(function(e){const r=Zi(e);return new $t(r.seconds,r.nanos)}(t))}function G0(t,e){return function(r){return new ct(["projects",r.projectId,"databases",r.database])}(t).child("documents").child(e).canonicalString()}function RI(t){const e=ct.fromString(t);return lt(OI(e)),e}function sy(t,e){return G0(t.databaseId,e.path)}function gg(t,e){const r=RI(e);if(r.get(1)!==t.databaseId.projectId)throw new Ce(se.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+r.get(1)+" vs "+t.databaseId.projectId);if(r.get(3)!==t.databaseId.database)throw new Ce(se.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+r.get(3)+" vs "+t.databaseId.database);return new ke(PI(r))}function oy(t,e){return G0(t.databaseId,e)}function aU(t){const e=RI(t);return e.length===4?ct.emptyPath():PI(e)}function ay(t){return new ct(["projects",t.databaseId.projectId,"databases",t.databaseId.database]).canonicalString()}function PI(t){return lt(t.length>4&&t.get(4)==="documents"),t.popFirst(5)}function JS(t,e,r){return{name:sy(t,e),fields:r.value.mapValue.fields}}function lU(t,e){let r;if("targetChange"in e){e.targetChange;const i=function(c){return c==="NO_CHANGE"?0:c==="ADD"?1:c==="REMOVE"?2:c==="CURRENT"?3:c==="RESET"?4:$e()}(e.targetChange.targetChangeType||"NO_CHANGE"),s=e.targetChange.targetIds||[],o=function(c,d){return c.gt?(lt(d===void 0||typeof d=="string"),rn.fromBase64String(d||"")):(lt(d===void 0||d instanceof Uint8Array),rn.fromUint8Array(d||new Uint8Array))}(t,e.targetChange.resumeToken),a=e.targetChange.cause,l=a&&function(c){const d=c.code===void 0?se.UNKNOWN:SI(c.code);return new Ce(d,c.message||"")}(a);r=new TI(i,s,o,l||null)}else if("documentChange"in e){e.documentChange;const i=e.documentChange;i.document,i.document.name,i.document.updateTime;const s=gg(t,i.document.name),o=ti(i.document.updateTime),a=new Dn({mapValue:{fields:i.document.fields}}),l=Qt.newFoundDocument(s,o,a),c=i.targetIds||[],d=i.removedTargetIds||[];r=new kd(c,d,l.key,l)}else if("documentDelete"in e){e.documentDelete;const i=e.documentDelete;i.document;const s=gg(t,i.document),o=i.readTime?ti(i.readTime):Ve.min(),a=Qt.newNoDocument(s,o),l=i.removedTargetIds||[];r=new kd([],l,a.key,a)}else if("documentRemove"in e){e.documentRemove;const i=e.documentRemove;i.document;const s=gg(t,i.document),o=i.removedTargetIds||[];r=new kd([],o,s,null)}else{if(!("filter"in e))return $e();{e.filter;const i=e.filter;i.targetId;const s=i.count||0,o=new X4(s),a=i.targetId;r=new kI(a,o)}}return r}function uU(t,e){let r;if(e instanceof yc)r={update:JS(t,e.key,e.value)};else if(e instanceof W0)r={delete:sy(t,e.key)};else if(e instanceof cs)r={update:JS(t,e.key,e.data),updateMask:bU(e.fieldMask)};else{if(!(e instanceof Y4))return $e();r={verify:sy(t,e.key)}}return e.fieldTransforms.length>0&&(r.updateTransforms=e.fieldTransforms.map(i=>function(s,o){const a=o.transform;if(a instanceof Mu)return{fieldPath:o.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(a instanceof Nu)return{fieldPath:o.field.canonicalString(),appendMissingElements:{values:a.elements}};if(a instanceof $u)return{fieldPath:o.field.canonicalString(),removeAllFromArray:{values:a.elements}};if(a instanceof wh)return{fieldPath:o.field.canonicalString(),increment:a.yt};throw $e()}(0,i))),e.precondition.isNone||(r.currentDocument=function(i,s){return s.updateTime!==void 0?{updateTime:oU(i,s.updateTime)}:s.exists!==void 0?{exists:s.exists}:$e()}(t,e.precondition)),r}function cU(t,e){return t&&t.length>0?(lt(e!==void 0),t.map(r=>function(i,s){let o=i.updateTime?ti(i.updateTime):ti(s);return o.isEqual(Ve.min())&&(o=ti(s)),new H4(o,i.transformResults||[])}(r,e))):[]}function dU(t,e){return{documents:[oy(t,e.path)]}}function hU(t,e){const r={structuredQuery:{}},i=e.path;e.collectionGroup!==null?(r.parent=oy(t,i),r.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(r.parent=oy(t,i.popLast()),r.structuredQuery.from=[{collectionId:i.lastSegment()}]);const s=function(c){if(c.length===0)return;const d=c.map(f=>function(g){if(g.op==="=="){if(BS(g.value))return{unaryFilter:{field:vo(g.field),op:"IS_NAN"}};if(US(g.value))return{unaryFilter:{field:vo(g.field),op:"IS_NULL"}}}else if(g.op==="!="){if(BS(g.value))return{unaryFilter:{field:vo(g.field),op:"IS_NOT_NA
2186N"}};if(US(g.value))return{unaryFilter:{field:vo(g.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:vo(g.field),op:mU(g.op),value:g.value}}}(f));return d.length===1?d[0]:{compositeFilter:{op:"AND",filters:d}}}(e.filters);s&&(r.structuredQuery.where=s);const o=function(c){if(c.length!==0)return c.map(d=>function(f){return{field:vo(f.field),direction:gU(f.dir)}}(d))}(e.orderBy);o&&(r.structuredQuery.orderBy=o);const a=function(c,d){return c.gt||Lf(d)?d:{value:d}}(t,e.limit);var l;return a!==null&&(r.structuredQuery.limit=a),e.startAt&&(r.structuredQuery.startAt={before:(l=e.startAt).inclusive,values:l.position}),e.endAt&&(r.structuredQuery.endAt=function(c){return{before:!c.inclusive,values:c.position}}(e.endAt)),r}function fU(t){let e=aU(t.parent);const r=t.structuredQuery,i=r.from?r.from.length:0;let s=null;if(i>0){lt(i===1);const f=r.from[0];f.allDescendants?s=f.collectionId:e=e.child(f.collectionId)}let o=[];r.where&&(o=AI(r.where));let a=[];r.orderBy&&(a=r.orderBy.map(f=>function(g){return new ql(Do(g.field),function(v){switch(v){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(g.direction))}(f)));let l=null;r.limit&&(l=function(f){let g;return g=typeof f=="object"?f.value:f,Lf(g)?null:g}(r.limit));let c=null;r.startAt&&(c=function(f){const g=!!f.before,v=f.values||[];return new bh(v,g)}(r.startAt));let d=null;return r.endAt&&(d=function(f){const g=!f.before,v=f.values||[];return new bh(v,g)}(r.endAt)),F4(e,s,a,o,l,"F",c,d)}function pU(t,e){const r=function(i,s){switch(s){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return $e()}}(0,e.purpose);return r==null?null:{"goog-listen-tags":r}}function AI(t){return t?t.unaryFilter!==void 0?[vU(t)]:t.fieldFilter!==void 0?[yU(t)]:t.compositeFilter!==void 0?t.compositeFilter.filters.map(e=>AI(e)).reduce((e,r)=>e.concat(r)):$e():[]}function gU(t){return rU[t]}function mU(t){return iU[t]}function vo(t){return{fieldPath:t.canonicalString()}}function Do(t){return dn.fromServerFormat(t.fieldPath)}function yU(t){return Cn.create(Do(t.fieldFilter.field),function(e){switch(e){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return $e()}}(t.fieldFilter.op),t.fieldFilter.value)}function vU(t){switch(t.unaryFilter.op){case"IS_NAN":const e=Do(t.unaryFilter.field);return Cn.create(e,"==",{doubleValue:NaN});case"IS_NULL":const r=Do(t.unaryFilter.field);return Cn.create(r,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const i=Do(t.unaryFilter.field);return Cn.create(i,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const s=Do(t.unaryFilter.field);return Cn.create(s,"!=",{nullValue:"NULL_VALUE"});default:return $e()}}function bU(t){const e=[];return t.fields.forEach(r=>e.push(r.canonicalString())),{fieldPaths:e}}function OI(t){return t.length>=4&&t.get(0)==="projects"&&t.get(2)==="databases"}/** 2187 * @license 2188 * Copyright 2017 Google LLC 2189 * 2190 * Licensed under the Apache License, Version 2.0 (the "License"); 2191 * you may not use this file except in compliance with the License. 2192 * You may obtain a copy of the License at 2193 * 2194 * http://www.apache.org/licenses/LICENSE-2.0 2195 * 2196 * Unless required by applicable law or agreed to in writing, software 2197 * distributed under the License is distributed on an "AS IS" BASIS, 2198 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2199 * See the License for the specific language governing permissions and 2200 * limitations under the License. 2201 */class wU{constructor(e,r,i,s){this.batchId=e,this.localWriteTime=r,this.baseMutations=i,this.mutations=s}applyToRemoteDocument(e,r){const i=r.mutationResults;for(let s=0;s<this.mutations.length;s++){const o=this.mutations[s];o.key.isEqual(e.key)&&q4(o,e,i[s])}}applyToLocalView(e,r){for(const i of this.baseMutations)i.key.isEqual(e.key)&&(r=Kl(i,e,r,this.localWriteTime));
2201for(const i of this.mutations)i.key.isEqual(e.key)&&(r=Kl(i,e,r,this.localWriteTime));return r}applyToLocalDocumentSet(e,r){const i=_I();return this.mutations.forEach(s=>{const o=e.get(s.key),a=o.overlayedDocument;let l=this.applyToLocalView(a,o.mutatedFields);l=r.has(s.key)?null:l;const c=bI(a,l);c!==null&&i.set(s.key,c),a.isValidDocument()||a.convertToNoDocument(Ve.min())}),i}keys(){return this.mutations.reduce((e,r)=>e.add(r.key),We())}isEqual(e){return this.batchId===e.batchId&&oa(this.mutations,e.mutations,(r,i)=>HS(r,i))&&oa(this.baseMutations,e.baseMutations,(r,i)=>HS(r,i))}}class H0{constructor(e,r,i,s){this.batch=e,this.commitVersion=r,this.mutationResults=i,this.docVersions=s}static from(e,r,i){lt(e.mutations.length===i.length);let s=Z4;const o=e.mutations;for(let a=0;a<o.length;a++)s=s.insert(o[a].key,i[a].version);return new H0(e,r,i,s)}}/** 2202 * @license 2203 * Copyright 2022 Google LLC 2204 * 2205 * Licensed under the Apache License, Version 2.0 (the "License"); 2206 * you may not use this file except in compliance with the License. 2207 * You may obtain a copy of the License at 2208 * 2209 * http://www.apache.org/licenses/LICENSE-2.0 2210 * 2211 * Unless required by applicable law or agreed to in writing, software 2212 * distributed under the License is distributed on an "AS IS" BASIS, 2213 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2214 * See the License for the specific language governing permissions and 2215 * limitations under the License. 2216 */class SU{constructor(e,r){this.largestBatchId=e,this.mutation=r}getKey(){return this.mutation.key}isEqual(e){return e!==null&&this.mutation===e.mutation}toString(){return`Overlay{ 2217 largestBatchId: ${this.largestBatchId}, 2218 mutation: ${this.mutation.toString()} 2219 }`}}/** 2220 * @license 2221 * Copyright 2017 Google LLC 2222 * 2223 * Licensed under the Apache License, Version 2.0 (the "License"); 2224 * you may not use this file except in compliance with the License. 2225 * You may obtain a copy of the License at 2226 * 2227 * http://www.apache.org/licenses/LICENSE-2.0 2228 * 2229 * Unless required by applicable law or agreed to in writing, software 2230 * distributed under the License is distributed on an "AS IS" BASIS, 2231 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2232 * See the License for the specific language governing permissions and 2233 * limitations under the License. 2234 */class Ls{constructor(e,r,i,s,o=Ve.min(),a=Ve.min(),l=rn.EMPTY_BYTE_STRING){this.target=e,this.targetId=r,this.purpose=i,this.sequenceNumber=s,this.snapshotVersion=o,this.lastLimboFreeSnapshotVersion=a,this.resumeToken=l}withSequenceNumber(e){return new Ls(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken)}withResumeToken(e,r){return new Ls(this.target,this.targetId,this.purpose,this.sequenceNumber,r,this.lastLimboFreeSnapshotVersion,e)}withLastLimboFreeSnapshotVersion(e){return new Ls(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken)}}/** 2235 * @license 2236 * Copyright 2017 Google LLC 2237 * 2238 * Licensed under the Apache License, Version 2.0 (the "License"); 2239 * you may not use this file except in compliance with the License. 2240 * You may obtain a copy of the License at 2241 * 2242 * http://www.apache.org/licenses/LICENSE-2.0 2243 * 2244 * Unless required by applicable law or agreed to in writing, software 2245 * distributed under the License is distributed on an "AS IS" BASIS, 2246 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2247 * See the License for the specific language governing permissions and 2248 * limitations under the License. 2249 */class CU{constructor(e){this.re=e}}function xU(t){const e=fU({parent:t.parent,structuredQuery:t.structuredQuery});return t.limitType==="LAST"?ry(e,e.limit,"L"):e}/** 2250 * @license 2251 * Copyright 2019 Google LLC 2252 * 2253 * Licensed under the Apache License, Version 2.0 (the "License"); 2254 * you may not use this file except in compliance with the License. 2255 * You may obtain a copy of the License at 2256 * 2257 * http://www.apache.org/licenses/LICENSE-2.0 2258 * 2259 * Unless required by applicable law or agreed to in writing, softw
2259are 2260 * distributed under the License is distributed on an "AS IS" BASIS, 2261 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2262 * See the License for the specific language governing permissions and 2263 * limitations under the License. 2264 */class _U{constructor(){this.Ye=new EU}addToCollectionParentIndex(e,r){return this.Ye.add(r),le.resolve()}getCollectionParents(e,r){return le.resolve(this.Ye.getEntries(r))}addFieldIndex(e,r){return le.resolve()}deleteFieldIndex(e,r){return le.resolve()}getDocumentsMatchingTarget(e,r){return le.resolve(null)}getIndexType(e,r){return le.resolve(0)}getFieldIndexes(e,r){return le.resolve([])}getNextCollectionGroupToUpdate(e){return le.resolve(null)}getMinOffset(e,r){return le.resolve(Ji.min())}getMinOffsetFromCollectionGroup(e,r){return le.resolve(Ji.min())}updateCollectionGroup(e,r,i){return le.resolve()}updateIndexEntries(e,r){return le.resolve()}}class EU{constructor(){this.index={}}add(e){const r=e.lastSegment(),i=e.popLast(),s=this.index[r]||new Lt(ct.comparator),o=!s.has(i);return this.index[r]=s.add(i),o}has(e){const r=e.lastSegment(),i=e.popLast(),s=this.index[r];return s&&s.has(i)}getEntries(e){return(this.index[e]||new Lt(ct.comparator)).toArray()}}/** 2265 * @license 2266 * Copyright 2017 Google LLC 2267 * 2268 * Licensed under the Apache License, Version 2.0 (the "License"); 2269 * you may not use this file except in compliance with the License. 2270 * You may obtain a copy of the License at 2271 * 2272 * http://www.apache.org/licenses/LICENSE-2.0 2273 * 2274 * Unless required by applicable law or agreed to in writing, software 2275 * distributed under the License is distributed on an "AS IS" BASIS, 2276 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2277 * See the License for the specific language governing permissions and 2278 * limitations under the License. 2279 */class ua{constructor(e){this.bn=e}next(){return this.bn+=2,this.bn}static Pn(){return new ua(0)}static vn(){return new ua(-1)}}/** 2280 * @license 2281 * Copyright 2017 Google LLC 2282 * 2283 * Licensed under the Apache License, Version 2.0 (the "License"); 2284 * you may not use this file except in compliance with the License. 2285 * You may obtain a copy of the License at 2286 * 2287 * http://www.apache.org/licenses/LICENSE-2.0 2288 * 2289 * Unless required by applicable law or agreed to in writing, software 2290 * distributed under the License is distributed on an "AS IS" BASIS, 2291 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2292 * See the License for the specific language governing permissions and 2293 * limitations under the License. 2294 */class kU{constructor(){this.changes=new Pa(e=>e.toString(),(e,r)=>e.isEqual(r)),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,r){this.assertNotApplied(),this.changes.set(e,Qt.newInvalidDocument(e).setReadTime(r))}getEntry(e,r){this.assertNotApplied();const i=this.changes.get(r);return i!==void 0?le.resolve(i):this.getFromCache(e,r)}getEntries(e,r){return this.getAllFromCache(e,r)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}/** 2295 * @license 2296 * Copyright 2017 Google LLC 2297 * 2298 * Licensed under the Apache License, Version 2.0 (the "License"); 2299 * you may not use this file except in compliance with the License. 2300 * You may obtain a copy of the License at 2301 * 2302 * http://www.apache.org/licenses/LICENSE-2.0 2303 * 2304 * Unless required by applicable law or agreed to in writing, software 2305 * distributed under the License is distributed on an "AS IS" BASIS, 2306 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2307 * See the License for the specific language governing permissions and 2308 * limitations under the License. 2309 *//** 2310 * @license 2311 * Copyright 2022 Google LLC 2312 * 2313 * Licensed under the Apache License, Version 2.0 (the "License"); 2314 * you may not use this file except in compliance with the License. 2315 * You may obtain a copy of the License at 2316 * 2317 * http://www.apache.org/licenses/LICENSE-2.0 2318 * 2319 * Unless required by applicable law or agreed to in writing, software 2320 * distributed under the License is distributed on an "AS IS" BASIS, 2321 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2322 * See the License for the specific language governing permissions and 2323 * limitations under the License. 2324 */class TU{constructor(e,r){this.overlayedDocument=e,this.mutatedFields=r}}/** 2325 * @license 2326 * Copyright 2017 Google LLC 2327 * 2328 * Licensed under the Apache License, Version 2.0 (the "License");
2329 * you may not use this file except in compliance with the License. 2330 * You may obtain a copy of the License at 2331 * 2332 * http://www.apache.org/licenses/LICENSE-2.0 2333 * 2334 * Unless required by applicable law or agreed to in writing, software 2335 * distributed under the License is distributed on an "AS IS" BASIS, 2336 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2337 * See the License for the specific language governing permissions and 2338 * limitations under the License. 2339 */class IU{constructor(e,r,i,s){this.remoteDocumentCache=e,this.mutationQueue=r,this.documentOverlayCache=i,this.indexManager=s}getDocument(e,r){let i=null;return this.documentOverlayCache.getOverlay(e,r).next(s=>(i=s,this.getBaseDocument(e,r,i))).next(s=>(i!==null&&Kl(i.mutation,s,nr.empty(),$t.now()),s))}getDocuments(e,r){return this.remoteDocumentCache.getEntries(e,r).next(i=>this.getLocalViewOfDocuments(e,i,We()).next(()=>i))}getLocalViewOfDocuments(e,r,i=We()){const s=As();return this.populateOverlays(e,s,r).next(()=>this.computeViews(e,r,s,i).next(o=>{let a=El();return o.forEach((l,c)=>{a=a.insert(l,c.overlayedDocument)}),a}))}getOverlayedDocuments(e,r){const i=As();return this.populateOverlays(e,i,r).next(()=>this.computeViews(e,r,i,We()))}populateOverlays(e,r,i){const s=[];return i.forEach(o=>{r.has(o)||s.push(o)}),this.documentOverlayCache.getOverlays(e,s).next(o=>{o.forEach((a,l)=>{r.set(a,l)})})}computeViews(e,r,i,s){let o=ai();const a=Yl(),l=Yl();return r.forEach((c,d)=>{const f=i.get(d.key);s.has(d.key)&&(f===void 0||f.mutation instanceof cs)?o=o.insert(d.key,d):f!==void 0&&(a.set(d.key,f.mutation.getFieldMask()),Kl(f.mutation,d,f.mutation.getFieldMask(),$t.now()))}),this.recalculateAndSaveOverlays(e,o).next(c=>(c.forEach((d,f)=>a.set(d,f)),r.forEach((d,f)=>{var g;return l.set(d,new TU(f,(g=a.get(d))!==null&&g!==void 0?g:null))}),l))}recalculateAndSaveOverlays(e,r){const i=Yl();let s=new Ft((a,l)=>a-l),o=We();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,r).next(a=>{for(const l of a)l.keys().forEach(c=>{const d=r.get(c);if(d===null)return;let f=i.get(c)||nr.empty();f=l.applyToLocalView(d,f),i.set(c,f);const g=(s.get(l.batchId)||We()).add(c);s=s.insert(l.batchId,g)})}).next(()=>{const a=[],l=s.getReverseIterator();for(;l.hasNext();){const c=l.getNext(),d=c.key,f=c.value,g=_I();f.forEach(v=>{if(!o.has(v)){const _=bI(r.get(v),i.get(v));_!==null&&g.set(v,_),o=o.add(v)}}),a.push(this.documentOverlayCache.saveOverlays(e,d,g))}return le.waitFor(a)}).next(()=>i)}recalculateAndSaveOverlaysForDocumentKeys(e,r){return this.remoteDocumentCache.getEntries(e,r).next(i=>this.recalculateAndSaveOverlays(e,i))}getDocumentsMatchingQuery(e,r,i){return function(s){return ke.isDocumentKey(s.path)&&s.collectionGroup===null&&s.filters.length===0}(r)?this.getDocumentsMatchingDocumentQuery(e,r.path):cI(r)?this.getDocumentsMatchingCollectionGroupQuery(e,r,i):this.getDocumentsMatchingCollectionQuery(e,r,i)}getNextDocuments(e,r,i,s){return this.remoteDocumentCache.getAllFromCollectionGroup(e,r,i,s).next(o=>{const a=s-o.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,r,i.largestBatchId,s-o.size):le.resolve(As());let l=-1,c=o;return a.next(d=>le.forEach(d,(f,g)=>(l<g.largestBatchId&&(l=g.largestBatchId),o.get(f)?le.resolve():this.getBaseDocument(e,f,g).next(v=>{c=c.insert(f,v)}))).next(()=>this.populateOverlays(e,d,o)).next(()=>this.computeViews(e,c,d,We())).next(f=>({batchId:l,changes:xI(f)})))})}getDocumentsMatchingDocumentQuery(e,r){return this.getDocument(e,new ke(r)).next(i=>{let s=El();return i.isFoundDocument()&&(s=s.insert(i.key,i)),s})}getDocumentsMatchingCollectionGroupQuery(e,r,i){const s=r.collectionGroup;let o=El();return this.indexManager.getCollectionParents(e,s).next(a=>le.forEach(a,l=>{const c=function(d,f){return new mc(f,null,d.explicitOrderBy.slice(),d.filters.slice(),d.limit,d.limitType,d.startAt,d.endAt)}(r,l.child(s));return this.getDocumentsMatchingCollectionQuery(e,c,i).next(d=>{d.forEach((f,g)=>{o=o.insert(f,g)})})}).next(()=>o))}getDocumentsMatchingCollectionQuery(e,r,i){let s;return this.remoteDocumentCache.getAllFromCollection(e,r.path,i).next(o=>(s=o,this.documentOverlayCache.getOverlaysForCollection(e,r.path,i.largestBatchId))).next(o=>{o.forEach((l,c)=>{const d=c.getKey();s.get(d)===null&&(s=s.insert(d,Qt.newInvalidDocument(d)))});let a=El();
2339return s.forEach((l,c)=>{const d=o.get(l);d!==void 0&&Kl(d.mutation,c,nr.empty(),$t.now()),V0(r,c)&&(a=a.insert(l,c))}),a})}getBaseDocument(e,r,i){return i===null||i.mutation.type===1?this.remoteDocumentCache.getEntry(e,r):le.resolve(Qt.newInvalidDocument(r))}}/** 2340 * @license 2341 * Copyright 2020 Google LLC 2342 * 2343 * Licensed under the Apache License, Version 2.0 (the "License"); 2344 * you may not use this file except in compliance with the License. 2345 * You may obtain a copy of the License at 2346 * 2347 * http://www.apache.org/licenses/LICENSE-2.0 2348 * 2349 * Unless required by applicable law or agreed to in writing, software 2350 * distributed under the License is distributed on an "AS IS" BASIS, 2351 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2352 * See the License for the specific language governing permissions and 2353 * limitations under the License. 2354 */class RU{constructor(e){this.It=e,this.Zn=new Map,this.ts=new Map}getBundleMetadata(e,r){return le.resolve(this.Zn.get(r))}saveBundleMetadata(e,r){var i;return this.Zn.set(r.id,{id:(i=r).id,version:i.version,createTime:ti(i.createTime)}),le.resolve()}getNamedQuery(e,r){return le.resolve(this.ts.get(r))}saveNamedQuery(e,r){return this.ts.set(r.name,function(i){return{name:i.name,query:xU(i.bundledQuery),readTime:ti(i.readTime)}}(r)),le.resolve()}}/** 2355 * @license 2356 * Copyright 2022 Google LLC 2357 * 2358 * Licensed under the Apache License, Version 2.0 (the "License"); 2359 * you may not use this file except in compliance with the License. 2360 * You may obtain a copy of the License at 2361 * 2362 * http://www.apache.org/licenses/LICENSE-2.0 2363 * 2364 * Unless required by applicable law or agreed to in writing, software 2365 * distributed under the License is distributed on an "AS IS" BASIS, 2366 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2367 * See the License for the specific language governing permissions and 2368 * limitations under the License. 2369 */class PU{constructor(){this.overlays=new Ft(ke.comparator),this.es=new Map}getOverlay(e,r){return le.resolve(this.overlays.get(r))}getOverlays(e,r){const i=As();return le.forEach(r,s=>this.getOverlay(e,s).next(o=>{o!==null&&i.set(s,o)})).next(()=>i)}saveOverlays(e,r,i){return i.forEach((s,o)=>{this.ue(e,r,o)}),le.resolve()}removeOverlaysForBatchId(e,r,i){const s=this.es.get(i);return s!==void 0&&(s.forEach(o=>this.overlays=this.overlays.remove(o)),this.es.delete(i)),le.resolve()}getOverlaysForCollection(e,r,i){const s=As(),o=r.length+1,a=new ke(r.child("")),l=this.overlays.getIteratorFrom(a);for(;l.hasNext();){const c=l.getNext().value,d=c.getKey();if(!r.isPrefixOf(d.path))break;d.path.length===o&&c.largestBatchId>i&&s.set(c.getKey(),c)}return le.resolve(s)}getOverlaysForCollectionGroup(e,r,i,s){let o=new Ft((d,f)=>d-f);const a=this.overlays.getIterator();for(;a.hasNext();){const d=a.getNext().value;if(d.getKey().getCollectionGroup()===r&&d.largestBatchId>i){let f=o.get(d.largestBatchId);f===null&&(f=As(),o=o.insert(d.largestBatchId,f)),f.set(d.getKey(),d)}}const l=As(),c=o.getIterator();for(;c.hasNext()&&(c.getNext().value.forEach((d,f)=>l.set(d,f)),!(l.size()>=s)););return le.resolve(l)}ue(e,r,i){const s=this.overlays.get(i.key);if(s!==null){const a=this.es.get(s.largestBatchId).delete(i.key);this.es.set(s.largestBatchId,a)}this.overlays=this.overlays.insert(i.key,new SU(r,i));let o=this.es.get(r);o===void 0&&(o=We(),this.es.set(r,o)),this.es.set(r,o.add(i.key))}}/** 2370 * @license 2371 * Copyright 2017 Google LLC 2372 * 2373 * Licensed under the Apache License, Version 2.0 (the "License"); 2374 * you may not use this file except in compliance with the License. 2375 * You may obtain a copy of the License at 2376 * 2377 * http://www.apache.org/licenses/LICENSE-2.0 2378 * 2379 * Unless required by applicable law or agreed to in writing, software 2380 * distributed under the License is distributed on an "AS IS" BASIS, 2381 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2382 * See the License for the specific language governing permissions and 2383 * limitations under the License. 2384 */class q0{constructor(){this.ns=new Lt(jt.ss),this.rs=new Lt(jt.os)}isEmpty(){return this.ns.isEmpty()}addReference(e,r){const i=new jt(e,r);this.ns=this.ns.add(i),this.rs=this.rs.add(i)}us(e,r){e.forEach(i=>
2384this.addReference(i,r))}removeReference(e,r){this.cs(new jt(e,r))}hs(e,r){e.forEach(i=>this.removeReference(i,r))}ls(e){const r=new ke(new ct([])),i=new jt(r,e),s=new jt(r,e+1),o=[];return this.rs.forEachInRange([i,s],a=>{this.cs(a),o.push(a.key)}),o}fs(){this.ns.forEach(e=>this.cs(e))}cs(e){this.ns=this.ns.delete(e),this.rs=this.rs.delete(e)}ds(e){const r=new ke(new ct([])),i=new jt(r,e),s=new jt(r,e+1);let o=We();return this.rs.forEachInRange([i,s],a=>{o=o.add(a.key)}),o}containsKey(e){const r=new jt(e,0),i=this.ns.firstAfterOrEqual(r);return i!==null&&e.isEqual(i.key)}}class jt{constructor(e,r){this.key=e,this._s=r}static ss(e,r){return ke.comparator(e.key,r.key)||Ze(e._s,r._s)}static os(e,r){return Ze(e._s,r._s)||ke.comparator(e.key,r.key)}}/** 2385 * @license 2386 * Copyright 2017 Google LLC 2387 * 2388 * Licensed under the Apache License, Version 2.0 (the "License"); 2389 * you may not use this file except in compliance with the License. 2390 * You may obtain a copy of the License at 2391 * 2392 * http://www.apache.org/licenses/LICENSE-2.0 2393 * 2394 * Unless required by applicable law or agreed to in writing, software 2395 * distributed under the License is distributed on an "AS IS" BASIS, 2396 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2397 * See the License for the specific language governing permissions and 2398 * limitations under the License. 2399 */class AU{constructor(e,r){this.indexManager=e,this.referenceDelegate=r,this.mutationQueue=[],this.ws=1,this.gs=new Lt(jt.ss)}checkEmpty(e){return le.resolve(this.mutationQueue.length===0)}addMutationBatch(e,r,i,s){const o=this.ws;this.ws++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const a=new wU(o,r,i,s);this.mutationQueue.push(a);for(const l of s)this.gs=this.gs.add(new jt(l.key,o)),this.indexManager.addToCollectionParentIndex(e,l.key.path.popLast());return le.resolve(a)}lookupMutationBatch(e,r){return le.resolve(this.ys(r))}getNextMutationBatchAfterBatchId(e,r){const i=r+1,s=this.ps(i),o=s<0?0:s;return le.resolve(this.mutationQueue.length>o?this.mutationQueue[o]:null)}getHighestUnacknowledgedBatchId(){return le.resolve(this.mutationQueue.length===0?-1:this.ws-1)}getAllMutationBatches(e){return le.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,r){const i=new jt(r,0),s=new jt(r,Number.POSITIVE_INFINITY),o=[];return this.gs.forEachInRange([i,s],a=>{const l=this.ys(a._s);o.push(l)}),le.resolve(o)}getAllMutationBatchesAffectingDocumentKeys(e,r){let i=new Lt(Ze);return r.forEach(s=>{const o=new jt(s,0),a=new jt(s,Number.POSITIVE_INFINITY);this.gs.forEachInRange([o,a],l=>{i=i.add(l._s)})}),le.resolve(this.Is(i))}getAllMutationBatchesAffectingQuery(e,r){const i=r.path,s=i.length+1;let o=i;ke.isDocumentKey(o)||(o=o.child(""));const a=new jt(new ke(o),0);let l=new Lt(Ze);return this.gs.forEachWhile(c=>{const d=c.key.path;return!!i.isPrefixOf(d)&&(d.length===s&&(l=l.add(c._s)),!0)},a),le.resolve(this.Is(l))}Is(e){const r=[];return e.forEach(i=>{const s=this.ys(i);s!==null&&r.push(s)}),r}removeMutationBatch(e,r){lt(this.Ts(r.batchId,"removed")===0),this.mutationQueue.shift();let i=this.gs;return le.forEach(r.mutations,s=>{const o=new jt(s.key,r.batchId);return i=i.delete(o),this.referenceDelegate.markPotentiallyOrphaned(e,s.key)}).next(()=>{this.gs=i})}An(e){}containsKey(e,r){const i=new jt(r,0),s=this.gs.firstAfterOrEqual(i);return le.resolve(r.isEqual(s&&s.key))}performConsistencyCheck(e){return this.mutationQueue.length,le.resolve()}Ts(e,r){return this.ps(e)}ps(e){return this.mutationQueue.length===0?0:e-this.mutationQueue[0].batchId}ys(e){const r=this.ps(e);return r<0||r>=this.mutationQueue.length?null:this.mutationQueue[r]}}/** 2400 * @license 2401 * Copyright 2017 Google LLC 2402 * 2403 * Licensed under the Apache License, Version 2.0 (the "License"); 2404 * you may not use this file except in compliance with the License. 2405 * You may obtain a copy of the License at 2406 * 2407 * http://www.apache.org/licenses/LICENSE-2.0 2408 * 2409 * Unless required by applicable law or agreed to in writing, software 2410 * distributed under the License is distributed on an "AS IS" BASIS, 2411 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2412 * See the License for the specific language governing permissions and 2413 * limitations under the License. 2414 */class OU{constructor(e){this.Es=e,this.docs=new Ft(ke.comparator),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,r){const i=r.key,s=this.docs.get(i),o=s?s.size:0,a=this.Es(r);return this.docs=this.docs.insert(i,{document:r.mutableCopy(),size:a}),this.size+=a-o,this.indexManager.addToCollectionParentIndex(e,i.path.popLast())}removeEntry(e){const r=this.docs.get(e);r&&(this.docs=this.docs.remove(e),this.size-=r.size)}getEntry(e,r){const i=this.docs.get(r);return le.resolve(i?i.document.mutableCopy():Qt.newInvalidDocument(r))}getEntries(e,r){let i=ai();return r.forEach(s=>{const o=this.docs.get(s);i=i.insert(s,o?o.document.mutableCopy():Qt.newInvalidDocument(s))}),le.resolve(i)}getAllFromCollection(e,r,i){let s=ai();const o=new ke(r.child("")),a=this.docs.getIteratorFrom(o);for(;a.hasNext();){const{key:l,value:{document:c}}=a.getNext();if(!r.isPrefixOf(l.path))break;l.path.length>r.length+1||S4(w4(c),i)<=0||(s=s.insert(c.key,c.mutableCopy()))}return le.resolve(s)}getAllFromCollectionGroup(e,r,i,s){$e()}As(e,r){return le.forEach(this.docs,i=>r(i))}newChangeBuffer(e){return new DU(this)}getSize(e){return le.resolve(this.size)}}class DU extends kU{constructor(e){super(),this.Yn=e}applyChanges(e){const r=[];
vendor: 4,879 bytes, lines 2414-2444
2414return this.changes.forEach((i,s)=>{s.isValidDocument()?r.push(this.Yn.addEntry(e,s)):this.Yn.removeEntry(i)}),le.waitFor(r)}getFromCache(e,r){return this.Yn.getEntry(e,r)}getAllFromCache(e,r){return this.Yn.getEntries(e,r)}}/** 2415 * @license 2416 * Copyright 2017 Google LLC 2417 * 2418 * Licensed under the Apache License, Version 2.0 (the "License"); 2419 * you may not use this file except in compliance with the License. 2420 * You may obtain a copy of the License at 2421 * 2422 * http://www.apache.org/licenses/LICENSE-2.0 2423 * 2424 * Unless required by applicable law or agreed to in writing, software 2425 * distributed under the License is distributed on an "AS IS" BASIS, 2426 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2427 * See the License for the specific language governing permissions and 2428 * limitations under the License. 2429 */class MU{constructor(e){this.persistence=e,this.Rs=new Pa(r=>B0(r),j0),this.lastRemoteSnapshotVersion=Ve.min(),this.highestTargetId=0,this.bs=0,this.Ps=new q0,this.targetCount=0,this.vs=ua.Pn()}forEachTarget(e,r){return this.Rs.forEach((i,s)=>r(s)),le.resolve()}getLastRemoteSnapshotVersion(e){return le.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return le.resolve(this.bs)}allocateTargetId(e){return this.highestTargetId=this.vs.next(),le.resolve(this.highestTargetId)}setTargetsMetadata(e,r,i){return i&&(this.lastRemoteSnapshotVersion=i),r>this.bs&&(this.bs=r),le.resolve()}Dn(e){this.Rs.set(e.target,e);const r=e.targetId;r>this.highestTargetId&&(this.vs=new ua(r),this.highestTargetId=r),e.sequenceNumber>this.bs&&(this.bs=e.sequenceNumber)}addTargetData(e,r){return this.Dn(r),this.targetCount+=1,le.resolve()}updateTargetData(e,r){return this.Dn(r),le.resolve()}removeTargetData(e,r){return this.Rs.delete(r.target),this.Ps.ls(r.targetId),this.targetCount-=1,le.resolve()}removeTargets(e,r,i){let s=0;const o=[];return this.Rs.forEach((a,l)=>{l.sequenceNumber<=r&&i.get(l.targetId)===null&&(this.Rs.delete(a),o.push(this.removeMatchingKeysForTargetId(e,l.targetId)),s++)}),le.waitFor(o).next(()=>s)}getTargetCount(e){return le.resolve(this.targetCount)}getTargetData(e,r){const i=this.Rs.get(r)||null;return le.resolve(i)}addMatchingKeys(e,r,i){return this.Ps.us(r,i),le.resolve()}removeMatchingKeys(e,r,i){this.Ps.hs(r,i);const s=this.persistence.referenceDelegate,o=[];return s&&r.forEach(a=>{o.push(s.markPotentiallyOrphaned(e,a))}),le.waitFor(o)}removeMatchingKeysForTargetId(e,r){return this.Ps.ls(r),le.resolve()}getMatchingKeysForTargetId(e,r){const i=this.Ps.ds(r);return le.resolve(i)}containsKey(e,r){return le.resolve(this.Ps.containsKey(r))}}/** 2430 * @license 2431 * Copyright 2017 Google LLC 2432 * 2433 * Licensed under the Apache License, Version 2.0 (the "License"); 2434 * you may not use this file except in compliance with the License. 2435 * You may obtain a copy of the License at 2436 * 2437 * http://www.apache.org/licenses/LICENSE-2.0 2438 * 2439 * Unless required by applicable law or agreed to in writing, software 2440 * distributed under the License is distributed on an "AS IS" BASIS, 2441 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2442 * See the License for the specific language governing permissions and 2443 * limitations under the License. 2444 */class NU{constructor(e,r){this.Vs={},this.overlays={},this.Ss=new F0(0),this.Ds=!1,this.Ds=!0,this.referenceDelegate=e(this),this.Cs=new MU(this),this.indexManager=new _U,this.remoteDocumentCache=function(i){return new OU(i)}(i=>this.referenceDelegate.xs(i)),this.It=new CU(r),this.Ns=new RU(this.It)}start(){return Promise.resolve()}shutdown(){return this.Ds=!1,Promise.resolve()}get started(){return this.Ds}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let r=this.overlays[e.toKey()];return r||(r=new PU,this.overlays[e.toKey()]=r),r}getMutationQueue(e,r){let i=this.Vs[e.toKey()];return i||(i=new AU(r,this.referenceDelegate),this.Vs[e.toKey()]=i),i}getTargetCache(){return this.Cs}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Ns}runTransaction(e,r,i){Ee("MemoryPersistence","Starting transaction:",e);const s=new $U(this.Ss.next());return this.referenceDelegate.ks(),i(s).next(o=>this.referenceDelegate.Ms(s).next(()=>o)).toPromise().then(o=>(s.raiseOnCommittedEvent(),o))}Os(e,r){return le.or(Object.values(this.Vs).map(i=>()=>i.containsKey(e,r)))}}class $U extends x4{constructor(e){super(),this.currentSequenceNumber=e}}class K0{constructor(e){this.persistence=e,this.Fs=new q0,this.$s=null}static Bs(e){return new K0(e)}get Ls(){if(this.$s)return this.$s;throw $e()}addReference(e,r,i){return this.Fs.addReference(i,r),this.Ls.delete(i.toString()),le.resolve()}removeReference(e,r,i){return this.Fs.removeReference(i,r),this.Ls.add(i.toString()),le.resolve()}markPotentiallyOrphaned(e,r){return this.Ls.add(r.toString()),le.resolve()}
2444removeTarget(e,r){this.Fs.ls(r.targetId).forEach(s=>this.Ls.add(s.toString()));const i=this.persistence.getTargetCache();return i.getMatchingKeysForTargetId(e,r.targetId).next(s=>{s.forEach(o=>this.Ls.add(o.toString()))}).next(()=>i.removeTargetData(e,r))}ks(){this.$s=new Set}Ms(e){const r=this.persistence.getRemoteDocumentCache().newChangeBuffer();return le.forEach(this.Ls,i=>{const s=ke.fromPath(i);return this.Us(e,s).next(o=>{o||r.removeEntry(s,Ve.min())})}).next(()=>(this.$s=null,r.apply(e)))}updateLimboDocument(e,r){return this.Us(e,r).next(i=>{i?this.Ls.delete(r.toString()):this.Ls.add(r.toString())})}xs(e){return 0}Us(e,r){return le.or([()=>le.resolve(this.Fs.containsKey(r)),()=>this.persistence.getTargetCache().containsKey(e,r),()=>this.persistence.Os(e,r)])}}/** 2445 * @license 2446 * Copyright 2017 Google LLC 2447 * 2448 * Licensed under the Apache License, Version 2.0 (the "License"); 2449 * you may not use this file except in compliance with the License. 2450 * You may obtain a copy of the License at 2451 * 2452 * http://www.apache.org/licenses/LICENSE-2.0 2453 * 2454 * Unless required by applicable law or agreed to in writing, software 2455 * distributed under the License is distributed on an "AS IS" BASIS, 2456 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2457 * See the License for the specific language governing permissions and 2458 * limitations under the License. 2459 */class Y0{constructor(e,r,i,s){this.targetId=e,this.fromCache=r,this.Si=i,this.Di=s}static Ci(e,r){let i=We(),s=We();for(const o of r.docChanges)switch(o.type){case 0:i=i.add(o.doc.key);break;case 1:s=s.add(o.doc.key)}return new Y0(e,r.fromCache,i,s)}}/** 2460 * @license 2461 * Copyright 2019 Google LLC 2462 * 2463 * Licensed under the Apache License, Version 2.0 (the "License"); 2464 * you may not use this file except in compliance with the License. 2465 * You may obtain a copy of the License at 2466 * 2467 * http://www.apache.org/licenses/LICENSE-2.0 2468 * 2469 * Unless required by applicable law or agreed to in writing, software 2470 * distributed under the License is distributed on an "AS IS" BASIS, 2471 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2472 * See the License for the specific language governing permissions and 2473 * limitations under the License. 2474 */class LU{constructor(){this.xi=!1}initialize(e,r){this.Ni=e,this.indexManager=r,this.xi=!0}getDocumentsMatchingQuery(e,r,i,s){return this.ki(e,r).next(o=>o||this.Mi(e,r,s,i)).next(o=>o||this.Oi(e,r))}ki(e,r){if(WS(r))return le.resolve(null);let i=oi(r);return this.indexManager.getIndexType(e,i).next(s=>s===0?null:(r.limit!==null&&s===1&&(r=ry(r,null,"F"),i=oi(r)),this.indexManager.getDocumentsMatchingTarget(e,i).next(o=>{const a=We(...o);return this.Ni.getDocuments(e,a).next(l=>this.indexManager.getMinOffset(e,i).next(c=>{const d=this.Fi(r,l);return this.$i(r,d,a,c.readTime)?this.ki(e,ry(r,null,"F")):this.Bi(e,d,r,c)}))})))}Mi(e,r,i,s){return WS(r)||s.isEqual(Ve.min())?this.Oi(e,r):this.Ni.getDocuments(e,i).next(o=>{const a=this.Fi(r,o);return this.$i(r,a,i,s)?this.Oi(e,r):(DS()<=Qe.DEBUG&&Ee("QueryEngine","Re-using previous result from %s to execute query: %s",s.toString(),iy(r)),this.Bi(e,a,r,b4(s,-1)))})}Fi(e,r){let i=new Lt(hI(e));return r.forEach((s,o)=>{V0(e,o)&&(i=i.add(o))}),i}$i(e,r,i,s){if(e.limit===null)return!1;if(i.size!==r.size)return!0;const o=e.limitType==="F"?r.last():r.first();return!!o&&(o.hasPendingWrites||o.version.compareTo(s)>0)}Oi(e,r){return DS()<=Qe.DEBUG&&Ee("QueryEngine","Using full collection scan to execute query:",iy(r)),this.Ni.getDocumentsMatchingQuery(e,r,Ji.min())}Bi(e,r,i,s){return this.Ni.getDocumentsMatchingQuery(e,i,s).next(o=>(r.forEach(a=>{o=o.insert(a.key,a)}),o))}}/** 2475 * @license 2476 * Copyright 2020 Google LLC 2477 * 2478 * Licensed under the Apache License, Version 2.0 (the "License"); 2479 * you may not use this file except in compliance with the License. 2480 * You may obtain a copy of the License at 2481 * 2482 * http://www.apache.org/licenses/LICENSE-2.0 2483 * 2484 * Unless required by applicable law or agreed to in writing, software 2485 * distributed under the License is distributed on an "AS IS" BASIS, 2486 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2487 * See the License for the specific language governing permissions and 2488 * limitations under the License. 2489 */class FU{constructor(e,r,i,s){this.persistence=e,this.Li=r,this.It=s,this.Ui=new Ft(Ze),this.qi=new Pa(o=>B0(o),j0),this.Ki=new Map,this.Gi=e.getRemoteDocumentCache(),this.Cs=e.getTargetCache(),this.Ns=e.getBundleCache(),this.Qi(i)}Qi(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutation
2489Queue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new IU(this.Gi,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Gi.setIndexManager(this.indexManager),this.Li.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",r=>e.collect(r,this.Ui))}}function UU(t,e,r,i){return new FU(t,e,r,i)}async function DI(t,e){const r=Ue(t);return await r.persistence.runTransaction("Handle user change","readonly",i=>{let s;return r.mutationQueue.getAllMutationBatches(i).next(o=>(s=o,r.Qi(e),r.mutationQueue.getAllMutationBatches(i))).next(o=>{const a=[],l=[];let c=We();for(const d of s){a.push(d.batchId);for(const f of d.mutations)c=c.add(f.key)}for(const d of o){l.push(d.batchId);for(const f of d.mutations)c=c.add(f.key)}return r.localDocuments.getDocuments(i,c).next(d=>({ji:d,removedBatchIds:a,addedBatchIds:l}))})})}function BU(t,e){const r=Ue(t);return r.persistence.runTransaction("Acknowledge batch","readwrite-primary",i=>{const s=e.batch.keys(),o=r.Gi.newChangeBuffer({trackRemovals:!0});return function(a,l,c,d){const f=c.batch,g=f.keys();let v=le.resolve();return g.forEach(_=>{v=v.next(()=>d.getEntry(l,_)).next(w=>{const k=c.docVersions.get(_);lt(k!==null),w.version.compareTo(k)<0&&(f.applyToRemoteDocument(w,c),w.isValidDocument()&&(w.setReadTime(c.commitVersion),d.addEntry(w)))})}),v.next(()=>a.mutationQueue.removeMutationBatch(l,f))}(r,i,e,o).next(()=>o.apply(i)).next(()=>r.mutationQueue.performConsistencyCheck(i)).next(()=>r.documentOverlayCache.removeOverlaysForBatchId(i,s,e.batch.batchId)).next(()=>r.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(i,function(a){let l=We();for(let c=0;c<a.mutationResults.length;++c)a.mutationResults[c].transformResults.length>0&&(l=l.add(a.batch.mutations[c].key));return l}(e))).next(()=>r.localDocuments.getDocuments(i,s))})}function MI(t){const e=Ue(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",r=>e.Cs.getLastRemoteSnapshotVersion(r))}function jU(t,e){const r=Ue(t),i=e.snapshotVersion;let s=r.Ui;return r.persistence.runTransaction("Apply remote event","readwrite-primary",o=>{const a=r.Gi.newChangeBuffer({trackRemovals:!0});s=r.Ui;const l=[];
2489e.targetChanges.forEach((f,g)=>{const v=s.get(g);if(!v)return;l.push(r.Cs.removeMatchingKeys(o,f.removedDocuments,g).next(()=>r.Cs.addMatchingKeys(o,f.addedDocuments,g)));let _=v.withSequenceNumber(o.currentSequenceNumber);e.targetMismatches.has(g)?_=_.withResumeToken(rn.EMPTY_BYTE_STRING,Ve.min()).withLastLimboFreeSnapshotVersion(Ve.min()):f.resumeToken.approximateByteSize()>0&&(_=_.withResumeToken(f.resumeToken,i)),s=s.insert(g,_),function(w,k,y){return w.resumeToken.approximateByteSize()===0||k.snapshotVersion.toMicroseconds()-w.snapshotVersion.toMicroseconds()>=3e8?!0:y.addedDocuments.size+y.modifiedDocuments.size+y.removedDocuments.size>0}(v,_,f)&&l.push(r.Cs.updateTargetData(o,_))});let c=ai(),d=We();if(e.documentUpdates.forEach(f=>{e.resolvedLimboDocuments.has(f)&&l.push(r.persistence.referenceDelegate.updateLimboDocument(o,f))}),l.push(zU(o,a,e.documentUpdates).next(f=>{c=f.Wi,d=f.zi})),!i.isEqual(Ve.min())){const f=r.Cs.getLastRemoteSnapshotVersion(o).next(g=>r.Cs.setTargetsMetadata(o,o.currentSequenceNumber,i));l.push(f)}return le.waitFor(l).next(()=>a.apply(o)).next(()=>r.localDocuments.getLocalViewOfDocuments(o,c,d)).next(()=>c)}).then(o=>(r.Ui=s,o))}function zU(t,e,r){let i=We(),s=We();return r.forEach(o=>i=i.add(o)),e.getEntries(t,i).next(o=>{let a=ai();return r.forEach((l,c)=>{const d=o.get(l);c.isFoundDocument()!==d.isFoundDocument()&&(s=s.add(l)),c.isNoDocument()&&c.version.isEqual(Ve.min())?(e.removeEntry(l,c.readTime),a=a.insert(l,c)):!d.isValidDocument()||c.version.compareTo(d.version)>0||c.version.compareTo(d.version)===0&&d.hasPendingWrites?(e.addEntry(c),a=a.insert(l,c)):Ee("LocalStore","Ignoring outdated watch update for ",l,". Current version:",d.version," Watch version:",c.version)}),{Wi:a,zi:s}})}function VU(t,e){const r=Ue(t);return r.persistence.runTransaction("Get next mutation batch","readonly",i=>(e===void 0&&(e=-1),r.mutationQueue.getNextMutationBatchAfterBatchId(i,e)))}function WU(t,e){const r=Ue(t);return r.persistence.runTransaction("Allocate target","readwrite",i=>{let s;return r.Cs.getTargetData(i,e).next(o=>o?(s=o,le.resolve(s)):r.Cs.allocateTargetId(i).next(a=>(s=new Ls(e,a,0,i.currentSequenceNumber),r.Cs.addTargetData(i,s).next(()=>s))))}).then(i=>{const s=r.Ui.get(i.targetId);return(s===null||i.snapshotVersion.compareTo(s.snapshotVersion)>0)&&(r.Ui=r.Ui.insert(i.targetId,i),r.qi.set(e,i.targetId)),i})}async function ly(t,e,r){const i=Ue(t),s=i.Ui.get(e),o=r?"readwrite":"readwrite-primary";try{r||await i.persistence.runTransaction("Release target",o,a=>i.persistence.referenceDelegate.removeTarget(a,s))}catch(a){if(!gc(a))throw a;Ee("LocalStore",`Failed to update sequence numbers for target ${e}: ${a}`)}i.Ui=i.Ui.remove(e),i.qi.delete(s.target)}function ZS(t,e,r){const i=Ue(t);let s=Ve.min(),o=We();return i.persistence.runTransaction("Execute query","readonly",a=>function(l,c,d){const f=Ue(l),g=f.qi.get(d);return g!==void 0?le.resolve(f.Ui.get(g)):f.Cs.getTargetData(c,d)}(i,a,oi(e)).next(l=>{if(l)return s=l.lastLimboFreeSnapshotVersion,i.Cs.getMatchingKeysForTargetId(a,l.targetId).next(c=>{o=c})}).next(()=>i.Li.getDocumentsMatchingQuery(a,e,r?s:Ve.min(),r?o:We())).next(l=>(GU(i,U4(e),l),{documents:l,Hi:o})))}function GU(t,e,r){let i=Ve.min();r.forEach((s,o)=>{o.readTime.compareTo(i)>0&&(i=o.readTime)}),t.Ki.set(e,i)}class eC{constructor(){this.activeTargetIds=EI()}er(e){this.activeTargetIds=this.activeTargetIds.add(e)}nr(e){this.activeTargetIds=this.activeTargetIds.delete(e)}tr(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class HU{constructor(){this.Lr=new eC,this.Ur={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,r,i){}addLocalQueryTarget(e){return this.Lr.er(e),this.Ur[e]||"not-current"}updateQueryState(e,r,i){this.Ur[e]=r}removeLocalQueryTarget(e){this.Lr.nr(e)}isLocalQueryTarget(e){return this.Lr.activeTargetIds.has(e)}clearQueryState(e){delete this.Ur[e]}getAllActiveQueryTargets(){return this.Lr.activeTargetIds}isActiveQueryTarget(e){return this.Lr.activeTargetIds.has(e)}start(){return this.Lr=new eC,Promise.resolve()}handleUserChange(e,r,i){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}/** 2490 * @license 2491 * Copyright 2019 Google LLC 2492 * 2493 * Licensed under the Apache License, Version 2.0 (the "License");
2494 * you may not use this file except in compliance with the License. 2495 * You may obtain a copy of the License at 2496 * 2497 * http://www.apache.org/licenses/LICENSE-2.0 2498 * 2499 * Unless required by applicable law or agreed to in writing, software 2500 * distributed under the License is distributed on an "AS IS" BASIS, 2501 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2502 * See the License for the specific language governing permissions and 2503 * limitations under the License. 2504 */class qU{qr(e){}shutdown(){}}/** 2505 * @license 2506 * Copyright 2019 Google LLC 2507 * 2508 * Licensed under the Apache License, Version 2.0 (the "License"); 2509 * you may not use this file except in compliance with the License. 2510 * You may obtain a copy of the License at 2511 * 2512 * http://www.apache.org/licenses/LICENSE-2.0 2513 * 2514 * Unless required by applicable law or agreed to in writing, software 2515 * distributed under the License is distributed on an "AS IS" BASIS, 2516 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2517 * See the License for the specific language governing permissions and 2518 * limitations under the License. 2519 */class tC{constructor(){this.Kr=()=>this.Gr(),this.Qr=()=>this.jr(),this.Wr=[],this.zr()}qr(e){this.Wr.push(e)}shutdown(){window.removeEventListener("online",this.Kr),window.removeEventListener("offline",this.Qr)}zr(){window.addEventListener("online",this.Kr),window.addEventListener("offline",this.Qr)}Gr(){Ee("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const e of this.Wr)e(0)}jr(){Ee("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const e of this.Wr)e(1)}static C(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}}/** 2520 * @license 2521 * Copyright 2020 Google LLC 2522 * 2523 * Licensed under the Apache License, Version 2.0 (the "License"); 2524 * you may not use this file except in compliance with the License. 2525 * You may obtain a copy of the License at 2526 * 2527 * http://www.apache.org/licenses/LICENSE-2.0 2528 * 2529 * Unless required by applicable law or agreed to in writing, software 2530 * distributed under the License is distributed on an "AS IS" BASIS, 2531 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2532 * See the License for the specific language governing permissions and 2533 * limitations under the License. 2534 */const KU={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery"};/** 2535 * @license 2536 * Copyright 2017 Google LLC 2537 * 2538 * Licensed under the Apache License, Version 2.0 (the "License"); 2539 * you may not use this file except in compliance with the License. 2540 * You may obtain a copy of the License at 2541 * 2542 * http://www.apache.org/licenses/LICENSE-2.0 2543 * 2544 * Unless required by applicable law or agreed to in writing, software 2545 * distributed under the License is distributed on an "AS IS" BASIS, 2546 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2547 * See the License for the specific language governing permissions and 2548 * limitations under the License. 2549 */class YU{constructor(e){this.Hr=e.Hr,this.Jr=e.Jr}Yr(e){this.Xr=e}Zr(e){this.eo=e}onMessage(e){this.no=e}close(){this.Jr()}send(e){this.Hr(e)}so(){this.Xr()}io(e){this.eo(e)}ro(e){this.no(e)}}/** 2550 * @license 2551 * Copyright 2017 Google LLC 2552 * 2553 * Licensed under the Apache License, Version 2.0 (the "License"); 2554 * you may not use this file except in compliance with the License. 2555 * You may obtain a copy of the License at 2556 * 2557 * http://www.apache.org/licenses/LICENSE-2.0 2558 * 2559 * Unless required by applicable law or agreed to in writing, software 2560 * distributed under the License is distributed on an "AS IS" BASIS, 2561 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2562 * See the License for the specific language governing permissions and 2563 * limitations under the License. 2564 */class XU extends class{constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;const r=e.ssl?"https":"http";this.oo=r+"://"+e.host,this.uo="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}co(e,r,i,s,o){const a=this.ao(e,r);Ee("RestConnection","Sending: ",a,i);const l={};return this.ho(l,s,o),this.lo(e,a,l,i).then(c=>(Ee("RestConnection","Received: ",c),c),c=>{throw MS("RestConnection",`${e} failed with error: `,c,"url: ",a,"request:",i),c})}fo(e,r,i,s,o,a){return this.co(e,r,i,s,o)}
2564ho(e,r,i){e["X-Goog-Api-Client"]="gl-js/ fire/"+Ra,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),r&&r.headers.forEach((s,o)=>e[o]=s),i&&i.headers.forEach((s,o)=>e[o]=s)}ao(e,r){const i=KU[e];return`${this.oo}/v1/${r}:${i}`}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams}lo(e,r,i,s){return new Promise((o,a)=>{const l=new u4;l.listenOnce(o4.COMPLETE,()=>{try{switch(l.getLastErrorCode()){case pg.NO_ERROR:const d=l.getResponseJson();Ee("Connection","XHR received:",JSON.stringify(d)),o(d);break;case pg.TIMEOUT:Ee("Connection",'RPC "'+e+'" timed out'),a(new Ce(se.DEADLINE_EXCEEDED,"Request time out"));break;case pg.HTTP_ERROR:const f=l.getStatus();if(Ee("Connection",'RPC "'+e+'" failed with status:',f,"response text:",l.getResponseText()),f>0){const g=l.getResponseJson().error;if(g&&g.status&&g.message){const v=function(_){const w=_.toLowerCase().replace(/_/g,"-");return Object.values(se).indexOf(w)>=0?w:se.UNKNOWN}(g.status);a(new Ce(v,g.message))}else a(new Ce(se.UNKNOWN,"Server responded with status "+l.getStatus()))}else a(new Ce(se.UNAVAILABLE,"Connection failed."));break;default:$e()}}finally{Ee("Connection",'RPC "'+e+'" completed.')}});const c=JSON.stringify(s);l.send(r,"POST",c,i,15)})}_o(e,r,i){const s=[this.oo,"/","google.firestore.v1.Firestore","/",e,"/channel"],o=i4(),a=s4(),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};this.useFetchStreams&&(l.xmlHttpFactory=new l4({})),this.ho(l.initMessageHeaders,r,i),l.encodeInitMessageHeaders=!0;const c=s.join("");Ee("Connection","Creating WebChannel: "+c,l);const d=o.createWebChannel(c,l);let f=!1,g=!1;const v=new YU({Hr:w=>{g?Ee("Connection","Not sending because WebChannel is closed:",w):(f||(Ee("Connection","Opening WebChannel transport."),d.open(),f=!0),Ee("Connection","WebChannel sending:",w),d.send(w))},Jr:()=>d.close()}),_=(w,k,y)=>{w.listen(k,b=>{try{y(b)}catch(x){setTimeout(()=>{throw x},0)}})};return _(d,Kc.EventType.OPEN,()=>{g||Ee("Connection","WebChannel transport opened.")}),_(d,Kc.EventType.CLOSE,()=>{g||(g=!0,Ee("Connection","WebChannel transport closed"),v.io())}),_(d,Kc.EventType.ERROR,w=>{g||(g=!0,MS("Connection","WebChannel transport errored:",w),v.io(new Ce(se.UNAVAILABLE,"The operation could not be completed")))}),_(d,Kc.EventType.MESSAGE,w=>{var k;if(!g){const y=w.data[0];lt(!!y);const b=y,x=b.error||((k=b[0])===null||k===void 0?void 0:k.error);if(x){Ee("Connection","WebChannel received error:",x);const R=x.status;let E=function(D){const A=Pt[D];if(A!==void 0)return SI(A)}(R),C=x.message;E===void 0&&(E=se.INTERNAL,C="Unknown error status: "+R+" with message "+x.message),g=!0,v.io(new Ce(E,C)),d.close()}else Ee("Connection","WebChannel received:",y),v.ro(y)}}),_(a,a4.STAT_EVENT,w=>{w.stat===AS.PROXY?Ee("Connection","Detected buffering proxy"):w.stat===AS.NOPROXY&&Ee("Connection","Detected no buffering proxy")}),setTimeout(()=>{v.so()},0),v}}function mg(){return typeof document<"u"?document:null}/** 2565 * @license 2566 * Copyright 2020 Google LLC 2567 * 2568 * Licensed under the Apache License, Version 2.0 (the "License"); 2569 * you may not use this file except in compliance with the License. 2570 * You may obtain a copy of the License at 2571 * 2572 * http://www.apache.org/licenses/LICENSE-2.0 2573 * 2574 * Unless required by applicable law or agreed to in writing, software 2575 * distributed under the License is distributed on an "AS IS" BASIS, 2576 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2577 * See the License for the specific language governing permissions and 2578 * limitations under the License. 2579 */function zf(t){return new sU(t,!0)}class NI{constructor(e,r,i=1e3,s=1.5,o=6e4){this.Hs=e,this.timerId=r,this.wo=i,this.mo=s,this.yo=o,this.po=0,this.Io=null,this.To=Date.now(),this.reset()}reset(){this.po=0}Eo(){this.po=this.yo}Ao(e){this.cancel();const r=Math.floor(this.po+this.Ro()),i=Math.max(0,Date.now()-this.To),s=Math.max(0,r-i);s>0&&Ee("ExponentialBackoff",`Backing off for ${s} ms (base delay: ${this.po}
2579 ms, delay with jitter: ${r} ms, last attempt: ${i} ms ago)`),this.Io=this.Hs.enqueueAfterDelay(this.timerId,s,()=>(this.To=Date.now(),e())),this.po*=this.mo,this.po<this.wo&&(this.po=this.wo),this.po>this.yo&&(this.po=this.yo)}bo(){this.Io!==null&&(this.Io.skipDelay(),this.Io=null)}cancel(){this.Io!==null&&(this.Io.cancel(),this.Io=null)}Ro(){return(Math.random()-.5)*this.po}}/** 2580 * @license 2581 * Copyright 2017 Google LLC 2582 * 2583 * Licensed under the Apache License, Version 2.0 (the "License"); 2584 * you may not use this file except in compliance with the License. 2585 * You may obtain a copy of the License at 2586 * 2587 * http://www.apache.org/licenses/LICENSE-2.0 2588 * 2589 * Unless required by applicable law or agreed to in writing, software 2590 * distributed under the License is distributed on an "AS IS" BASIS, 2591 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2592 * See the License for the specific language governing permissions and 2593 * limitations under the License. 2594 */class $I{constructor(e,r,i,s,o,a,l,c){this.Hs=e,this.Po=i,this.vo=s,this.Vo=o,this.authCredentialsProvider=a,this.appCheckCredentialsProvider=l,this.listener=c,this.state=0,this.So=0,this.Do=null,this.Co=null,this.stream=null,this.xo=new NI(e,r)}No(){return this.state===1||this.state===5||this.ko()}ko(){return this.state===2||this.state===3}start(){this.state!==4?this.auth():this.Mo()}async stop(){this.No()&&await this.close(0)}Oo(){this.state=0,this.xo.reset()}Fo(){this.ko()&&this.Do===null&&(this.Do=this.Hs.enqueueAfterDelay(this.Po,6e4,()=>this.$o()))}Bo(e){this.Lo(),this.stream.send(e)}async $o(){if(this.ko())return this.close(0)}Lo(){this.Do&&(this.Do.cancel(),this.Do=null)}Uo(){this.Co&&(this.Co.cancel(),this.Co=null)}async close(e,r){this.Lo(),this.Uo(),this.xo.cancel(),this.So++,e!==4?this.xo.reset():r&&r.code===se.RESOURCE_EXHAUSTED?(si(r.toString()),si("Using maximum backoff delay to prevent overloading the backend."),this.xo.Eo()):r&&r.code===se.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.qo(),this.stream.close(),this.stream=null),this.state=e,await this.listener.Zr(r)}qo(){}auth(){this.state=1;const e=this.Ko(this.So),r=this.So;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([i,s])=>{this.So===r&&this.Go(i,s)},i=>{e(()=>{const s=new Ce(se.UNKNOWN,"Fetching auth token failed: "+i.message);return this.Qo(s)})})}Go(e,r){const i=this.Ko(this.So);this.stream=this.jo(e,r),this.stream.Yr(()=>{i(()=>(this.state=2,this.Co=this.Hs.enqueueAfterDelay(this.vo,1e4,()=>(this.ko()&&(this.state=3),Promise.resolve())),this.listener.Yr()))}),this.stream.Zr(s=>{i(()=>this.Qo(s))}),this.stream.onMessage(s=>{i(()=>this.onMessage(s))})}Mo(){this.state=5,this.xo.Ao(async()=>{this.state=0,this.start()})}Qo(e){return Ee("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}Ko(e){return r=>{this.Hs.enqueueAndForget(()=>this.So===e?r():(Ee("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class QU extends $I{constructor(e,r,i,s,o,a){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",r,i,s,a),this.It=o}jo(e,r){return this.Vo._o("Listen",e,r)}onMessage(e){this.xo.reset();const r=lU(this.It,e),i=function(s){if(!("targetChange"in s))return Ve.min();const o=s.targetChange;return o.targetIds&&o.targetIds.length?Ve.min():o.readTime?ti(o.readTime):Ve.min()}(e);return this.listener.Wo(r,i)}zo(e){const r={};r.database=ay(this.It),r.addTarget=function(s,o){let a;const l=o.target;return a=ny(l)?{documents:dU(s,l)}:{query:hU(s,l)},a.targetId=o.targetId,o.resumeToken.approximateByteSize()>0?a.resumeToken=II(s,o.resumeToken):o.snapshotVersion.compareTo(Ve.min())>0&&(a.readTime=Sh(s,o.snapshotVersion.toTimestamp())),a}(this.It,e);const i=pU(this.It,e);i&&(r.labels=i),this.Bo(r)}Ho(e){const r={};r.database=ay(this.It),r.removeTarget=e,this.Bo(r)}}class JU extends $I{constructor(e,r,i,s,o,a){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",r,i,s,a),this.It=o,this.Jo=!1}get Yo(){return this.Jo}start(){this.Jo=!1,this.lastStreamToken=void 0,super.start()}qo(){this.Jo&&this.Xo([])}jo(e,r){return this.Vo._o("Write",e,r)}onMessage(e){if(lt(!!e.streamToken),this.lastStreamToken=e.streamToken,this.Jo){this.xo.reset();const r=cU(e.writeResults,e.commitTime),i=ti(e.commitTime);return this.listener.Zo(i,r)}return lt(!e.writeResults||e.writeResults.length===0),this.Jo=!0,this.listener.tu()}eu(){const e={};e.database=ay(this.It),this.Bo(e)}Xo(e){const r={streamToken:this.lastStreamToken,writes:e.map(i=>uU(this.It,i))};this.Bo(r)}}/** 2595 * @license 2596 * Copyright 2017 Google LLC 2597 * 2598 * Licensed under the Apache License, Version 2.0 (the "License");
2599 * you may not use this file except in compliance with the License. 2600 * You may obtain a copy of the License at 2601 * 2602 * http://www.apache.org/licenses/LICENSE-2.0 2603 * 2604 * Unless required by applicable law or agreed to in writing, software 2605 * distributed under the License is distributed on an "AS IS" BASIS, 2606 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2607 * See the License for the specific language governing permissions and 2608 * limitations under the License. 2609 */class ZU extends class{}{constructor(e,r,i,s){super(),this.authCredentials=e,this.appCheckCredentials=r,this.Vo=i,this.It=s,this.nu=!1}su(){if(this.nu)throw new Ce(se.FAILED_PRECONDITION,"The client has already been terminated.")}co(e,r,i){return this.su(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,o])=>this.Vo.co(e,r,i,s,o)).catch(s=>{throw s.name==="FirebaseError"?(s.code===se.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new Ce(se.UNKNOWN,s.toString())})}fo(e,r,i,s){return this.su(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([o,a])=>this.Vo.fo(e,r,i,o,a,s)).catch(o=>{throw o.name==="FirebaseError"?(o.code===se.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),o):new Ce(se.UNKNOWN,o.toString())})}terminate(){this.nu=!0}}class eB{constructor(e,r){this.asyncQueue=e,this.onlineStateHandler=r,this.state="Unknown",this.iu=0,this.ru=null,this.ou=!0}uu(){this.iu===0&&(this.cu("Unknown"),this.ru=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.ru=null,this.au("Backend didn't respond within 10 seconds."),this.cu("Offline"),Promise.resolve())))}hu(e){this.state==="Online"?this.cu("Unknown"):(this.iu++,this.iu>=1&&(this.lu(),this.au(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.cu("Offline")))}set(e){this.lu(),this.iu=0,e==="Online"&&(this.ou=!1),this.cu(e)}cu(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}au(e){const r=`Could not reach Cloud Firestore backend. ${e} 2610This 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.ou?(si(r),this.ou=!1):Ee("OnlineStateTracker",r)}lu(){this.ru!==null&&(this.ru.cancel(),this.ru=null)}}/** 2611 * @license 2612 * Copyright 2017 Google LLC 2613 * 2614 * Licensed under the Apache License, Version 2.0 (the "License"); 2615 * you may not use this file except in compliance with the License. 2616 * You may obtain a copy of the License at 2617 * 2618 * http://www.apache.org/licenses/LICENSE-2.0 2619 * 2620 * Unless required by applicable law or agreed to in writing, software 2621 * distributed under the License is distributed on an "AS IS" BASIS, 2622 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2623 * See the License for the specific language governing permissions and 2624 * limitations under the License. 2625 */class tB{constructor(e,r,i,s,o){this.localStore=e,this.datastore=r,this.asyncQueue=i,this.remoteSyncer={},this.fu=[],this.du=new Map,this._u=new Set,this.wu=[],this.mu=o,this.mu.qr(a=>{i.enqueueAndForget(async()=>{lo(this)&&(Ee("RemoteStore","Restarting streams for network reachability change."),await async function(l){const c=Ue(l);c._u.add(4),await bc(c),c.gu.set("Unknown"),c._u.delete(4),await Vf(c)}(this))})}),this.gu=new eB(i,s)}}async function Vf(t){if(lo(t))for(const e of t.wu)await e(!0)}async function bc(t){for(const e of t.wu)await e(!1)}function LI(t,e){const r=Ue(t);r.du.has(e.targetId)||(r.du.set(e.targetId,e),J0(r)?Q0(r):Aa(r).ko()&&X0(r,e))}function FI(t,e){const r=Ue(t),i=Aa(r);r.du.delete(e),i.ko()&&UI(r,e),r.du.size===0&&(i.ko()?i.Fo():lo(r)&&r.gu.set("Unknown"))}function X0(t,e){t.yu.Ot(e.targetId),Aa(t).zo(e)}function UI(t,e){t.yu.Ot(e),Aa(t).Ho(e)}function Q0(t){t.yu=new nU({getRemoteKeysForTarget:e=>t.remoteSyncer.getRemoteKeysForTarget(e),se:e=>t.du.get(e)||null}),Aa(t).start(),t.gu.uu()}function J0(t){return lo(t)&&!Aa(t).No()&&t.du.size>0}function lo(t){return Ue(t)._u.size===0}function BI(t){t.yu=void 0}async function nB(t){t.du.forEach((e,r)=>{X0(t,e)})}async function rB(t,e){BI(t),J0(t)?(t.gu.hu(e),Q0(t)):t.gu.set("Unknown")}async function iB(t,e,r){if(t.gu.set("Online"),e instanceof TI&&e.state===2&&e.cause)try{await async function(i,s){const o=s.cause;for(const a of s.targetIds)i.du.has(a)&&(await i.remoteSyncer.rejectListen(a,o),i.du.delete(a),i.yu.removeTarget(a))}(t,e)}catch(i){Ee("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),i),await Ch(t,i)}else if(e instanceof kd?t.yu.Gt(e):e instanceof kI?t.yu.Yt(e):t.yu.Wt(e),!r.isEqual(Ve.min()))try{const i=await MI(t.localStore);r.compareTo(i)>=0&&await function(s,o){const a=s.yu.te(o);
2625return a.targetChanges.forEach((l,c)=>{if(l.resumeToken.approximateByteSize()>0){const d=s.du.get(c);d&&s.du.set(c,d.withResumeToken(l.resumeToken,o))}}),a.targetMismatches.forEach(l=>{const c=s.du.get(l);if(!c)return;s.du.set(l,c.withResumeToken(rn.EMPTY_BYTE_STRING,c.snapshotVersion)),UI(s,l);const d=new Ls(c.target,l,1,c.sequenceNumber);X0(s,d)}),s.remoteSyncer.applyRemoteEvent(a)}(t,r)}catch(i){Ee("RemoteStore","Failed to raise snapshot:",i),await Ch(t,i)}}async function Ch(t,e,r){if(!gc(e))throw e;t._u.add(1),await bc(t),t.gu.set("Offline"),r||(r=()=>MI(t.localStore)),t.asyncQueue.enqueueRetryable(async()=>{Ee("RemoteStore","Retrying IndexedDB access"),await r(),t._u.delete(1),await Vf(t)})}function jI(t,e){return e().catch(r=>Ch(t,r,e))}async function Wf(t){const e=Ue(t),r=es(e);let i=e.fu.length>0?e.fu[e.fu.length-1].batchId:-1;for(;sB(e);)try{const s=await VU(e.localStore,i);if(s===null){e.fu.length===0&&r.Fo();break}i=s.batchId,oB(e,s)}catch(s){await Ch(e,s)}zI(e)&&VI(e)}function sB(t){return lo(t)&&t.fu.length<10}function oB(t,e){t.fu.push(e);const r=es(t);r.ko()&&r.Yo&&r.Xo(e.mutations)}function zI(t){return lo(t)&&!es(t).No()&&t.fu.length>0}function VI(t){es(t).start()}async function aB(t){es(t).eu()}async function lB(t){const e=es(t);for(const r of t.fu)e.Xo(r.mutations)}async function uB(t,e,r){const i=t.fu.shift(),s=H0.from(i,e,r);await jI(t,()=>t.remoteSyncer.applySuccessfulWrite(s)),await Wf(t)}async function cB(t,e){e&&es(t).Yo&&await async function(r,i){if(s=i.code,Q4(s)&&s!==se.ABORTED){const o=r.fu.shift();es(r).Oo(),await jI(r,()=>r.remoteSyncer.rejectFailedWrite(o.batchId,i)),await Wf(r)}var s}(t,e),zI(t)&&VI(t)}async function nC(t,e){const r=Ue(t);r.asyncQueue.verifyOperationInProgress(),Ee("RemoteStore","RemoteStore received new credentials");const i=lo(r);r._u.add(3),await bc(r),i&&r.gu.set("Unknown"),await r.remoteSyncer.handleCredentialChange(e),r._u.delete(3),await Vf(r)}async function dB(t,e){const r=Ue(t);e?(r._u.delete(2),await Vf(r)):e||(r._u.add(2),await bc(r),r.gu.set("Unknown"))}function Aa(t){return t.pu||(t.pu=function(e,r,i){const s=Ue(e);return s.su(),new QU(r,s.Vo,s.authCredentials,s.appCheckCredentials,s.It,i)}(t.datastore,t.asyncQueue,{Yr:nB.bind(null,t),Zr:rB.bind(null,t),Wo:iB.bind(null,t)}),t.wu.push(async e=>{e?(t.pu.Oo(),J0(t)?Q0(t):t.gu.set("Unknown")):(await t.pu.stop(),BI(t))})),t.pu}function es(t){return t.Iu||(t.Iu=function(e,r,i){const s=Ue(e);return s.su(),new JU(r,s.Vo,s.authCredentials,s.appCheckCredentials,s.It,i)}(t.datastore,t.asyncQueue,{Yr:aB.bind(null,t),Zr:cB.bind(null,t),tu:lB.bind(null,t),Zo:uB.bind(null,t)}),t.wu.push(async e=>{e?(t.Iu.Oo(),await Wf(t)):(await t.Iu.stop(),t.fu.length>0&&(Ee("RemoteStore",`Stopping write stream with ${t.fu.length} pending writes`),t.fu=[]))})),t.Iu}/** 2626 * @license 2627 * Copyright 2017 Google LLC 2628 * 2629 * Licensed under the Apache License, Version 2.0 (the "License"); 2630 * you may not use this file except in compliance with the License. 2631 * You may obtain a copy of the License at 2632 * 2633 * http://www.apache.org/licenses/LICENSE-2.0 2634 * 2635 * Unless required by applicable law or agreed to in writing, software 2636 * distributed under the License is distributed on an "AS IS" BASIS, 2637 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2638 * See the License for the specific language governing permissions and 2639 * limitations under the License. 2640 */class Z0{constructor(e,r,i,s,o){this.asyncQueue=e,this.timerId=r,this.targetTimeMs=i,this.op=s,this.removalCallback=o,this.deferred=new $s,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(a=>{})}static createAndSchedule(e,r,i,s,o){const a=Date.now()+i,l=new Z0(e,r,a,s,o);return l.start(i),l}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new Ce(se.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function e1(t,e){if(si("AsyncQueue",`${e}: ${t}`),gc(t))return new Ce(se.UNAVAILABLE,`${e}: ${t}`);throw t}/** 2641 * @license 2642 * Copyright 2017 Google LLC 2643 * 2644 * Licensed under the Apache License, Version 2.0 (the "License");
2645 * you may not use this file except in compliance with the License. 2646 * You may obtain a copy of the License at 2647 * 2648 * http://www.apache.org/licenses/LICENSE-2.0 2649 * 2650 * Unless required by applicable law or agreed to in writing, software 2651 * distributed under the License is distributed on an "AS IS" BASIS, 2652 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2653 * See the License for the specific language governing permissions and 2654 * limitations under the License. 2655 */class Xo{constructor(e){this.comparator=e?(r,i)=>e(r,i)||ke.comparator(r.key,i.key):(r,i)=>ke.comparator(r.key,i.key),this.keyedMap=El(),this.sortedSet=new Ft(this.comparator)}static emptySet(e){return new Xo(e.comparator)}has(e){return this.keyedMap.get(e)!=null}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const r=this.keyedMap.get(e);return r?this.sortedSet.indexOf(r):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((r,i)=>(e(r),!1))}add(e){const r=this.delete(e.key);return r.copy(r.keyedMap.insert(e.key,e),r.sortedSet.insert(e,null))}delete(e){const r=this.get(e);return r?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(r)):this}isEqual(e){if(!(e instanceof Xo)||this.size!==e.size)return!1;const r=this.sortedSet.getIterator(),i=e.sortedSet.getIterator();for(;r.hasNext();){const s=r.getNext().key,o=i.getNext().key;if(!s.isEqual(o))return!1}return!0}toString(){const e=[];return this.forEach(r=>{e.push(r.toString())}),e.length===0?"DocumentSet ()":`DocumentSet ( 2656 `+e.join(` 2657`)+` 2658)`}copy(e,r){const i=new Xo;return i.comparator=this.comparator,i.keyedMap=e,i.sortedSet=r,i}}/** 2659 * @license 2660 * Copyright 2017 Google LLC 2661 * 2662 * Licensed under the Apache License, Version 2.0 (the "License"); 2663 * you may not use this file except in compliance with the License. 2664 * You may obtain a copy of the License at 2665 * 2666 * http://www.apache.org/licenses/LICENSE-2.0 2667 * 2668 * Unless required by applicable law or agreed to in writing, software 2669 * distributed under the License is distributed on an "AS IS" BASIS, 2670 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2671 * See the License for the specific language governing permissions and 2672 * limitations under the License. 2673 */class rC{constructor(){this.Tu=new Ft(ke.comparator)}track(e){const r=e.doc.key,i=this.Tu.get(r);i?e.type!==0&&i.type===3?this.Tu=this.Tu.insert(r,e):e.type===3&&i.type!==1?this.Tu=this.Tu.insert(r,{type:i.type,doc:e.doc}):e.type===2&&i.type===2?this.Tu=this.Tu.insert(r,{type:2,doc:e.doc}):e.type===2&&i.type===0?this.Tu=this.Tu.insert(r,{type:0,doc:e.doc}):e.type===1&&i.type===0?this.Tu=this.Tu.remove(r):e.type===1&&i.type===2?this.Tu=this.Tu.insert(r,{type:1,doc:i.doc}):e.type===0&&i.type===1?this.Tu=this.Tu.insert(r,{type:2,doc:e.doc}):$e():this.Tu=this.Tu.insert(r,e)}Eu(){const e=[];return this.Tu.inorderTraversal((r,i)=>{e.push(i)}),e}}class ca{constructor(e,r,i,s,o,a,l,c){this.query=e,this.docs=r,this.oldDocs=i,this.docChanges=s,this.mutatedKeys=o,this.fromCache=a,this.syncStateChanged=l,this.excludesMetadataChanges=c}static fromInitialDocuments(e,r,i,s){const o=[];return r.forEach(a=>{o.push({type:0,doc:a})}),new ca(e,r,Xo.emptySet(r),o,i,s,!0,!1)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&Ff(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const r=this.docChanges,i=e.docChanges;if(r.length!==i.length)return!1;for(let s=0;s<r.length;s++)if(r[s].type!==i[s].type||!r[s].doc.isEqual(i[s].doc))return!1;return!0}}/** 2674 * @license 2675 * Copyright 2017 Google LLC 2676 * 2677 * Licensed under the Apache License, Version 2.0 (the "License"); 2678 * you may not use this file except in compliance with the License. 2679 * You may obtain a copy of the License at 2680 * 2681 * http://www.apache.org/licenses/LICENSE-2.0 2682 * 2683 * Unless required by applicable law or agreed to in writing, softw
2683are 2684 * distributed under the License is distributed on an "AS IS" BASIS, 2685 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2686 * See the License for the specific language governing permissions and 2687 * limitations under the License. 2688 */class hB{constructor(){this.Au=void 0,this.listeners=[]}}class fB{constructor(){this.queries=new Pa(e=>dI(e),Ff),this.onlineState="Unknown",this.Ru=new Set}}async function pB(t,e){const r=Ue(t),i=e.query;let s=!1,o=r.queries.get(i);if(o||(s=!0,o=new hB),s)try{o.Au=await r.onListen(i)}catch(a){const l=e1(a,`Initialization of query '${iy(e.query)}' failed`);return void e.onError(l)}r.queries.set(i,o),o.listeners.push(e),e.bu(r.onlineState),o.Au&&e.Pu(o.Au)&&t1(r)}async function gB(t,e){const r=Ue(t),i=e.query;let s=!1;const o=r.queries.get(i);if(o){const a=o.listeners.indexOf(e);a>=0&&(o.listeners.splice(a,1),s=o.listeners.length===0)}if(s)return r.queries.delete(i),r.onUnlisten(i)}function mB(t,e){const r=Ue(t);let i=!1;for(const s of e){const o=s.query,a=r.queries.get(o);if(a){for(const l of a.listeners)l.Pu(s)&&(i=!0);a.Au=s}}i&&t1(r)}function yB(t,e,r){const i=Ue(t),s=i.queries.get(e);if(s)for(const o of s.listeners)o.onError(r);i.queries.delete(e)}function t1(t){t.Ru.forEach(e=>{e.next()})}class vB{constructor(e,r,i){this.query=e,this.vu=r,this.Vu=!1,this.Su=null,this.onlineState="Unknown",this.options=i||{}}Pu(e){if(!this.options.includeMetadataChanges){const i=[];for(const s of e.docChanges)s.type!==3&&i.push(s);e=new ca(e.query,e.docs,e.oldDocs,i,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0)}let r=!1;return this.Vu?this.Du(e)&&(this.vu.next(e),r=!0):this.Cu(e,this.onlineState)&&(this.xu(e),r=!0),this.Su=e,r}onError(e){this.vu.error(e)}bu(e){this.onlineState=e;let r=!1;return this.Su&&!this.Vu&&this.Cu(this.Su,e)&&(this.xu(this.Su),r=!0),r}Cu(e,r){if(!e.fromCache)return!0;const i=r!=="Offline";return(!this.options.Nu||!i)&&(!e.docs.isEmpty()||r==="Offline")}Du(e){if(e.docChanges.length>0)return!0;const r=this.Su&&this.Su.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!r)&&this.options.includeMetadataChanges===!0}xu(e){e=ca.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache),this.Vu=!0,this.vu.next(e)}}/** 2689 * @license 2690 * Copyright 2017 Google LLC 2691 * 2692 * Licensed under the Apache License, Version 2.0 (the "License"); 2693 * you may not use this file except in compliance with the License. 2694 * You may obtain a copy of the License at 2695 * 2696 * http://www.apache.org/licenses/LICENSE-2.0 2697 * 2698 * Unless required by applicable law or agreed to in writing, software 2699 * distributed under the License is distributed on an "AS IS" BASIS, 2700 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2701 * See the License for the specific language governing permissions and 2702 * limitations under the License. 2703 */class WI{constructor(e){this.key=e}}class GI{constructor(e){this.key=e}}class bB{constructor(e,r){this.query=e,this.Lu=r,this.Uu=null,this.current=!1,this.qu=We(),this.mutatedKeys=We(),this.Ku=hI(e),this.Gu=new Xo(this.Ku)}get Qu(){return this.Lu}ju(e,r){const i=r?r.Wu:new rC,s=r?r.Gu:this.Gu;let o=r?r.mutatedKeys:this.mutatedKeys,a=s,l=!1;const c=this.query.limitType==="F"&&s.size===this.query.limit?s.last():null,d=this.query.limitType==="L"&&s.size===this.query.limit?s.first():null;if(e.inorderTraversal((f,g)=>{const v=s.get(f),_=V0(this.query,g)?g:null,w=!!v&&this.mutatedKeys.has(v.key),k=!!_&&(_.hasLocalMutations||this.mutatedKeys.has(_.key)&&_.hasCommittedMutations);let y=!1;v&&_?v.data.isEqual(_.data)?w!==k&&(i.track({type:3,doc:_}),y=!0):this.zu(v,_)||(i.track({type:2,doc:_}),y=!0,(c&&this.Ku(_,c)>0||d&&this.Ku(_,d)<0)&&(l=!0)):!v&&_?(i.track({type:0,doc:_}),y=!0):v&&!_&&(i.track({type:1,doc:v}),y=!0,(c||d)&&(l=!0)),y&&(_?(a=a.add(_),o=k?o.add(f):o.delete(f)):(a=a.delete(f),o=o.delete(f)))}),this.query.limit!==null)for(;a.size>this.query.limit;){const f=this.query.limitType==="F"?a.last():a.first();a=a.delete(f.key),o=o.delete(f.key),i.track({type:1,doc:f})}return{Gu:a,Wu:i,$i:l,mutatedKeys:o}}zu(e,r){return e.hasLocalMutations&&r.hasCommittedMutations&&!r.hasLocalMutations}
2703applyChanges(e,r,i){const s=this.Gu;this.Gu=e.Gu,this.mutatedKeys=e.mutatedKeys;const o=e.Wu.Eu();o.sort((d,f)=>function(g,v){const _=w=>{switch(w){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return $e()}};return _(g)-_(v)}(d.type,f.type)||this.Ku(d.doc,f.doc)),this.Hu(i);const a=r?this.Ju():[],l=this.qu.size===0&&this.current?1:0,c=l!==this.Uu;return this.Uu=l,o.length!==0||c?{snapshot:new ca(this.query,e.Gu,s,o,e.mutatedKeys,l===0,c,!1),Yu:a}:{Yu:a}}bu(e){return this.current&&e==="Offline"?(this.current=!1,this.applyChanges({Gu:this.Gu,Wu:new rC,mutatedKeys:this.mutatedKeys,$i:!1},!1)):{Yu:[]}}Xu(e){return!this.Lu.has(e)&&!!this.Gu.has(e)&&!this.Gu.get(e).hasLocalMutations}Hu(e){e&&(e.addedDocuments.forEach(r=>this.Lu=this.Lu.add(r)),e.modifiedDocuments.forEach(r=>{}),e.removedDocuments.forEach(r=>this.Lu=this.Lu.delete(r)),this.current=e.current)}Ju(){if(!this.current)return[];const e=this.qu;this.qu=We(),this.Gu.forEach(i=>{this.Xu(i.key)&&(this.qu=this.qu.add(i.key))});const r=[];return e.forEach(i=>{this.qu.has(i)||r.push(new GI(i))}),this.qu.forEach(i=>{e.has(i)||r.push(new WI(i))}),r}Zu(e){this.Lu=e.Hi,this.qu=We();const r=this.ju(e.documents);return this.applyChanges(r,!0)}tc(){return ca.fromInitialDocuments(this.query,this.Gu,this.mutatedKeys,this.Uu===0)}}class wB{constructor(e,r,i){this.query=e,this.targetId=r,this.view=i}}class SB{constructor(e){this.key=e,this.ec=!1}}class CB{constructor(e,r,i,s,o,a){this.localStore=e,this.remoteStore=r,this.eventManager=i,this.sharedClientState=s,this.currentUser=o,this.maxConcurrentLimboResolutions=a,this.nc={},this.sc=new Pa(l=>dI(l),Ff),this.ic=new Map,this.rc=new Set,this.oc=new Ft(ke.comparator),this.uc=new Map,this.cc=new q0,this.ac={},this.hc=new Map,this.lc=ua.vn(),this.onlineState="Unknown",this.fc=void 0}get isPrimaryClient(){return this.fc===!0}}async function xB(t,e){const r=DB(t);let i,s;const o=r.sc.get(e);
2703if(o)i=o.targetId,r.sharedClientState.addLocalQueryTarget(i),s=o.view.tc();else{const a=await WU(r.localStore,oi(e));r.isPrimaryClient&&LI(r.remoteStore,a);const l=r.sharedClientState.addLocalQueryTarget(a.targetId);i=a.targetId,s=await _B(r,e,i,l==="current")}return s}async function _B(t,e,r,i){t.dc=(f,g,v)=>async function(_,w,k,y){let b=w.view.ju(k);b.$i&&(b=await ZS(_.localStore,w.query,!1).then(({documents:E})=>w.view.ju(E,b)));const x=y&&y.targetChanges.get(w.targetId),R=w.view.applyChanges(b,_.isPrimaryClient,x);return sC(_,w.targetId,R.Yu),R.snapshot}(t,f,g,v);const s=await ZS(t.localStore,e,!0),o=new bB(e,s.Hi),a=o.ju(s.documents),l=vc.createSynthesizedTargetChangeForCurrentChange(r,i&&t.onlineState!=="Offline"),c=o.applyChanges(a,t.isPrimaryClient,l);sC(t,r,c.Yu);const d=new wB(e,r,o);return t.sc.set(e,d),t.ic.has(r)?t.ic.get(r).push(e):t.ic.set(r,[e]),c.snapshot}async function EB(t,e){const r=Ue(t),i=r.sc.get(e),s=r.ic.get(i.targetId);if(s.length>1)return r.ic.set(i.targetId,s.filter(o=>!Ff(o,e))),void r.sc.delete(e);r.isPrimaryClient?(r.sharedClientState.removeLocalQueryTarget(i.targetId),r.sharedCl
2703ientState.isActiveQueryTarget(i.targetId)||await ly(r.localStore,i.targetId,!1).then(()=>{r.sharedClientState.clearQueryState(i.targetId),FI(r.remoteStore,i.targetId),uy(r,i.targetId)}).catch(pc)):(uy(r,i.targetId),await ly(r.localStore,i.targetId,!0))}async function kB(t,e,r){const i=MB(t);try{const s=await function(o,a){const l=Ue(o),c=$t.now(),d=a.reduce((v,_)=>v.add(_.key),We());let f,g;return l.persistence.runTransaction("Locally write mutations","readwrite",v=>{let _=ai(),w=We();return l.Gi.getEntries(v,d).next(k=>{_=k,_.forEach((y,b)=>{b.isValidDocument()||(w=w.add(y))})}).next(()=>l.localDocuments.getOverlayedDocuments(v,_)).next(k=>{f=k;const y=[];for(const b of a){const x=K4(b,f.get(b.key).overlayedDocument);x!=null&&y.push(new cs(b.key,x,oI(x.value.mapValue),br.exists(!0)))}return l.mutationQueue.addMutationBatch(v,c,y,a)}).next(k=>{g=k;const y=k.applyToLocalDocumentSet(f,w);return l.documentOverlayCache.saveOverlays(v,k.batchId,y)})}).then(()=>({batchId:g.batchId,changes:xI(f)}))}(i.localStore,e);i.sharedClientState.addPendingMutation(s.batchId),function(o,a,l){let c=o.ac[o.currentUser.toKey()];c||(c=new Ft(Ze)),c=c.insert(a,l),o.ac[o.currentUser.toKey()]=c}(i,s.batchId,r),await wc(i,s.changes),await Wf(i.remoteStore)}catch(s){const o=e1(s,"Failed to persist write");r.reject(o)}}async function HI(t,e){const r=Ue(t);try{const i=await jU(r.localStore,e);
2703e.targetChanges.forEach((s,o)=>{const a=r.uc.get(o);a&&(lt(s.addedDocuments.size+s.modifiedDocuments.size+s.removedDocuments.size<=1),s.addedDocuments.size>0?a.ec=!0:s.modifiedDocuments.size>0?lt(a.ec):s.removedDocuments.size>0&&(lt(a.ec),a.ec=!1))}),await wc(r,i,e)}catch(i){await pc(i)}}function iC(t,e,r){const i=Ue(t);if(i.isPrimaryClient&&r===0||!i.isPrimaryClient&&r===1){const s=[];i.sc.forEach((o,a)=>{const l=a.view.bu(e);l.snapshot&&s.push(l.snapshot)}),function(o,a){const l=Ue(o);l.onlineState=a;let c=!1;l.queries.forEach((d,f)=>{for(const g of f.listeners)g.bu(a)&&(c=!0)}),c&&t1(l)}(i.eventManager,e),s.length&&i.nc.Wo(s),i.onlineState=e,i.isPrimaryClient&&i.sharedClientState.setOnlineState(e)}}async function TB(t,e,r){const i=Ue(t);i.sharedClientState.updateQueryState(e,"rejected",r);const s=i.uc.get(e),o=s&&s.key;if(o){let a=new Ft(ke.comparator);a=a.insert(o,Qt.newNoDocument(o,Ve.min()));const l=We().add(o),c=new jf(Ve.min(),new Map,new Lt(Ze),a,l);await HI(i,c),i.oc=i.oc.remove(o),i.uc.delete(e),n1(i)}else await ly(i.localStore,e,!1).then(()=>uy(i,e,r)).catch(pc)}async function IB(t,e){const r=Ue(t),i=e.batch.batchId;try{const s=await BU(r.localStore,e);
2703KI(r,i,null),qI(r,i),r.sharedClientState.updateMutationState(i,"acknowledged"),await wc(r,s)}catch(s){await pc(s)}}async function RB(t,e,r){const i=Ue(t);try{const s=await function(o,a){const l=Ue(o);return l.persistence.runTransaction("Reject batch","readwrite-primary",c=>{let d;return l.mutationQueue.lookupMutationBatch(c,a).next(f=>(lt(f!==null),d=f.keys(),l.mutationQueue.removeMutationBatch(c,f))).next(()=>l.mutationQueue.performConsistencyCheck(c)).next(()=>l.documentOverlayCache.removeOverlaysForBatchId(c,d,a)).next(()=>l.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(c,d)).next(()=>l.localDocuments.getDocuments(c,d))})}(i.localStore,e);KI(i,e,r),qI(i,e),i.sharedClientState.updateMutationState(e,"rejected",r),await wc(i,s)}catch(s){await pc(s)}}function qI(t,e){(t.hc.get(e)||[]).forEach(r=>{r.resolve()}),t.hc.delete(e)}function KI(t,e,r){const i=Ue(t);let s=i.ac[i.currentUser.toKey()];if(s){const o=s.get(e);o&&(r?o.reject(r):o.resolve(),s=s.remove(e)),i.ac[i.currentUser.toKey()]=s}}function uy(t,e,r=null){t.sharedCl
2703ientState.removeLocalQueryTarget(e);for(const i of t.ic.get(e))t.sc.delete(i),r&&t.nc._c(i,r);t.ic.delete(e),t.isPrimaryClient&&t.cc.ls(e).forEach(i=>{t.cc.containsKey(i)||YI(t,i)})}function YI(t,e){t.rc.delete(e.path.canonicalString());const r=t.oc.get(e);r!==null&&(FI(t.remoteStore,r),t.oc=t.oc.remove(e),t.uc.delete(r),n1(t))}function sC(t,e,r){for(const i of r)i instanceof WI?(t.cc.addReference(i.key,e),PB(t,i)):i instanceof GI?(Ee("SyncEngine","Document no longer in limbo: "+i.key),t.cc.removeReference(i.key,e),t.cc.containsKey(i.key)||YI(t,i.key)):$e()}function PB(t,e){const r=e.key,i=r.path.canonicalString();t.oc.get(r)||t.rc.has(i)||(Ee("SyncEngine","New document in limbo: "+r),t.rc.add(i),n1(t))}function n1(t){for(;t.rc.size>0&&t.oc.size<t.maxConcurrentLimboResolutions;){const e=t.rc.values().next().value;t.rc.delete(e);const r=new ke(ct.fromString(e)),i=t.lc.next();t.uc.set(i,new SB(r)),t.oc=t.oc.insert(r,i),LI(t.remoteStore,new Ls(oi(z0(r.path)),i,2,F0.at))}}async function wc(t,e,r){const i=Ue(t),s=[],o=[],a=[];i.sc.isEmpty()||(i.sc.forEach((l,c)=>{a.push(i.dc(c,e,r).then(d=>{if(d){i.isPrimaryClient&&i.sharedClientState.updateQueryState(c.targetId,d.fromCache?"not-current":"current"),s.push(d);const f=Y0.Ci(c.targetId,d);o.push(f)}}))}),await Promise.all(a),i.nc.Wo(s),await async function(l,c){const d=Ue(l);try{await d.persistence.runTransaction("notifyLocalViewChanges","readwrite",f=>le.forEach(c,g=>le.forEach(g.Si,v=>d.persistence.referenceDelegate.addReference(f,g.targetId,v)).next(()=>le.forEach(g.Di,v=>d.persistence.referenceDelegate.removeReference(f,g.targetId,v)))))}catch(f){if(!gc(f))throw f;Ee("LocalStore","Failed to update sequence numbers: "+f)}for(const f of c){const g=f.targetId;if(!f.fromCache){const v=d.Ui.get(g),_=v.snapshotVersion,w=v.withLastLimboFreeSnapshotVersion(_);d.Ui=d.Ui.insert(g,w)}}}(i.localStore,o))}async function AB(t,e){const r=Ue(t);if(!r.currentUser.isEqual(e)){Ee("SyncEngine","User change. New user:",e.toKey());const i=await DI(r.localStore,e);r.currentUser=e,function(s,o){s.hc.forEach(a=>{a.forEach(l=>{l.reject(new Ce(se.CANCELLED,o))})}),s.hc.clear()}(r,"'waitForPendingWrites' promise is rejected due to a user change."),r.sharedClientState.handleUserChange(e,i.removedBatchIds,i.addedBatchIds),await wc(r,i.ji)}}function OB(t,e){const r=Ue(t),i=r.uc.get(e);if(i&&i.ec)return We().add(i.key);{let s=We();const o=r.ic.get(e);if(!o)return s;for(const a of o){const l=r.sc.get(a);s=s.unionWith(l.view.Qu)}return s}}function DB(t){const e=Ue(t);return e.remoteStore.remoteSyncer.applyRemoteEvent=HI.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=OB.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=TB.bind(null,e),e.nc.Wo=mB.bind(null,e.eventManager),e.nc._c=yB.bind(null,e.eventManager),e}function MB(t){const e=Ue(t);return e.remoteStore.remoteSyncer.applySuccessfulWrite=IB.bind(null,e),e.remoteStore.remoteSyncer.rejectFailedWrite=RB.bind(null,e),e}class NB{constructor(){this.synchronizeTabs=!1}async initialize(e){this.It=zf(e.databaseInfo.databaseId),this.sharedClientState=this.mc(e),this.persistence=this.gc(e),await this.persistence.start(),this.localStore=this.yc(e),this.gcScheduler=this.Ic(e,this.localStore),this.indexBackfillerScheduler=this.Tc(e,this.localStore)}Ic(e,r){return null}Tc(e,r){return null}yc(e){return UU(this.persistence,new LU,e.initialUser,this.It)}gc(e){return new NU(K0.Bs,this.It)}mc(e){return new HU}async terminate(){this.gcScheduler&&this.gcScheduler.stop(),await this.sharedClientState.shutdown(),await this.persistence.shutdown()}}class $B{async initialize(e,r){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(r),this.remoteStore=this.createRemoteStore(r),this.eventManager=this.createEventManager(r),this.syncEngine=this.createSyncEngine(r,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=i=>iC(this.syncEngine,i,1),this.remoteStore.remoteSyncer.handleCredentialChange=AB.bind(null,this.syncEngine),await dB(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return new fB}createDatastore(e){const r=zf(e.databaseInfo.databaseId),i=(s=e.databaseInfo,new XU(s));var s;return function(o,a,l,c){return new ZU(o,a,l,c)}(e.authCredentials,e.appCheckCredentials,i,r)}createRemoteStore(e){return r=this.localStore,i=this.datastore,s=e.asyncQueue,o=l=>iC(this.syncEngine,l,0),a=tC.C()?new tC:new qU,new tB(r,i,s,o,a);var r,i,s,o,a}createSyncEngine(e,r){return function(i,s,o,a,l,c,d){const f=new CB(i,s,o,a,l,c);return d&&(f.fc=!0),f}(this.localStore,this.remoteStore,this.eventManager,this.sharedCl
2703ientState,e.initialUser,e.maxConcurrentLimboResolutions,r)}terminate(){return async function(e){const r=Ue(e);Ee("RemoteStore","RemoteStore shutting down."),r._u.add(5),await bc(r),r.mu.shutdown(),r.gu.set("Unknown")}(this.remoteStore)}}/** 2704 * @license 2705 * Copyright 2020 Google LLC 2706 * 2707 * Licensed under the Apache License, Version 2.0 (the "License"); 2708 * you may not use this file except in compliance with the License. 2709 * You may obtain a copy of the License at 2710 * 2711 * http://www.apache.org/licenses/LICENSE-2.0 2712 * 2713 * Unless required by applicable law or agreed to in writing, software 2714 * distributed under the License is distributed on an "AS IS" BASIS, 2715 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2716 * See the License for the specific language governing permissions and 2717 * limitations under the License. 2718 *//** 2719 * @license 2720 * Copyright 2017 Google LLC 2721 * 2722 * Licensed under the Apache License, Version 2.0 (the "License"); 2723 * you may not use this file except in compliance with the License. 2724 * You may obtain a copy of the License at 2725 * 2726 * http://www.apache.org/licenses/LICENSE-2.0 2727 * 2728 * Unless required by applicable law or agreed to in writing, software 2729 * distributed under the License is distributed on an "AS IS" BASIS, 2730 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2731 * See the License for the specific language governing permissions and 2732 * limitations under the License. 2733 */class LB{constructor(e){this.observer=e,this.muted=!1}next(e){this.observer.next&&this.Ac(this.observer.next,e)}error(e){this.observer.error?this.Ac(this.observer.error,e):si("Uncaught Error in snapshot listener:",e)}Rc(){this.muted=!0}Ac(e,r){this.muted||setTimeout(()=>{this.muted||e(r)},0)}}/** 2734 * @license 2735 * Copyright 2017 Google LLC 2736 * 2737 * Licensed under the Apache License, Version 2.0 (the "License"); 2738 * you may not use this file except in compliance with the License. 2739 * You may obtain a copy of the License at 2740 * 2741 * http://www.apache.org/licenses/LICENSE-2.0 2742 * 2743 * Unless required by applicable law or agreed to in writing, software 2744 * distributed under the License is distributed on an "AS IS" BASIS, 2745 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2746 * See the License for the specific language governing permissions and 2747 * limitations under the License. 2748 */class FB{constructor(e,r,i,s){this.authCredentials=e,this.appCheckCredentials=r,this.asyncQueue=i,this.databaseInfo=s,this.user=On.UNAUTHENTICATED,this.clientId=nI.R(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(i,async o=>{Ee("FirestoreClient","Received user=",o.uid),await this.authCredentialListener(o),this.user=o}),this.appCheckCredentials.start(i,o=>(Ee("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(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new Ce(se.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();const e=new $s;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this.onlineComponents&&await this.onlineComponents.terminate(),this.offlineComponents&&await this.offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(r){const i=e1(r,"Failed to shutdown persistence");e.reject(i)}}),e.promise}}async function UB(t,e){t.asyncQueue.verifyOperationInProgress(),Ee("FirestoreClient","Initializing OfflineComponentProvider");const r=await t.getConfiguration();await e.initialize(r);let i=r.initialUser;t.setCredentialChangeListener(async s=>{i.isEqual(s)||(await DI(e.localStore,s),i=s)}),e.persistence.setDatabaseDeletedListener(()=>t.terminate()),t.offlineComponents=e}async function BB(t,e){t.asyncQueue.verifyOperationInProgress();const r=await jB(t);Ee("FirestoreClient","Initializing OnlineComponentProvider");const i=await t.getConfiguration();await e.initialize(r,i),t.setCredentialChangeListener(s=>nC(e.remoteStore,s)),t.setAppCheckTokenChangeListener((s,o)=>nC(e.remoteStore,o)),t.onlineComponents=e}async function jB(t){return t.offlineComponents||(Ee("FirestoreClient","Using default OfflineComponentProvider"),await UB(t,new NB)),t.offlineComponents}async function XI(t){return t.onlineComponents||(Ee("FirestoreClient","Using default OnlineComponentProvider"),await BB(t,
2748new $B)),t.onlineComponents}function zB(t){return XI(t).then(e=>e.syncEngine)}async function oC(t){const e=await XI(t),r=e.eventManager;return r.onListen=xB.bind(null,e.syncEngine),r.onUnlisten=EB.bind(null,e.syncEngine),r}const aC=new Map;/** 2749 * @license 2750 * Copyright 2017 Google LLC 2751 * 2752 * Licensed under the Apache License, Version 2.0 (the "License"); 2753 * you may not use this file except in compliance with the License. 2754 * You may obtain a copy of the License at 2755 * 2756 * http://www.apache.org/licenses/LICENSE-2.0 2757 * 2758 * Unless required by applicable law or agreed to in writing, software 2759 * distributed under the License is distributed on an "AS IS" BASIS, 2760 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2761 * See the License for the specific language governing permissions and 2762 * limitations under the License. 2763 */function QI(t,e,r){if(!r)throw new Ce(se.INVALID_ARGUMENT,`Function ${t}() cannot be called with an empty ${e}.`)}function VB(t,e,r,i){if(e===!0&&i===!0)throw new Ce(se.INVALID_ARGUMENT,`${t} and ${r} cannot be used together.`)}function lC(t){if(!ke.isDocumentKey(t))throw new Ce(se.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${t} has ${t.length}.`)}function uC(t){if(ke.isDocumentKey(t))throw new Ce(se.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${t} has ${t.length}.`)}function Gf(t){if(t===void 0)return"undefined";if(t===null)return"null";if(typeof t=="string")return t.length>20&&(t=`${t.substring(0,20)}...`),JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return""+t;if(typeof t=="object"){if(t instanceof Array)return"an array";{const e=function(r){return r.constructor?r.constructor.name:null}(t);return e?`a custom ${e} object`:"an object"}}return typeof t=="function"?"a function":$e()}function Fs(t,e){if("_delegate"in t&&(t=t._delegate),!(t instanceof e)){if(e.name===t.constructor.name)throw new Ce(se.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const r=Gf(t);throw new Ce(se.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${r}`)}}return t}/** 2764 * @license 2765 * Copyright 2020 Google LLC 2766 * 2767 * Licensed under the Apache License, Version 2.0 (the "License"); 2768 * you may not use this file except in compliance with the License. 2769 * You may obtain a copy of the License at 2770 * 2771 * http://www.apache.org/licenses/LICENSE-2.0 2772 * 2773 * Unless required by applicable law or agreed to in writing, software 2774 * distributed under the License is distributed on an "AS IS" BASIS, 2775 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2776 * See the License for the specific language governing permissions and 2777 * limitations under the License. 2778 */class cC{constructor(e){var r;if(e.host===void 0){if(e.ssl!==void 0)throw new Ce(se.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=(r=e.ssl)===null||r===void 0||r;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,e.cacheSizeBytes===void 0)this.cacheSizeBytes=41943040;else{if(e.cacheSizeBytes!==-1&&e.cacheSizeBytes<1048576)throw new Ce(se.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.useFetchStreams=!!e.useFetchStreams,VB("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling)}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}/** 2779 * @license 2780 * Copyright 2020 Google LLC 2781 * 2782 * Licensed under the Apache License, Version 2.0 (the "License");
2783 * you may not use this file except in compliance with the License. 2784 * You may obtain a copy of the License at 2785 * 2786 * http://www.apache.org/licenses/LICENSE-2.0 2787 * 2788 * Unless required by applicable law or agreed to in writing, software 2789 * distributed under the License is distributed on an "AS IS" BASIS, 2790 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2791 * See the License for the specific language governing permissions and 2792 * limitations under the License. 2793 */class r1{constructor(e,r,i,s){this._authCredentials=e,this._appCheckCredentials=r,this._databaseId=i,this._app=s,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new cC({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new Ce(se.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(e){if(this._settingsFrozen)throw new Ce(se.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 cC(e),e.credentials!==void 0&&(this._authCredentials=function(r){if(!r)return new d4;switch(r.type){case"gapi":const i=r.client;return new p4(i,r.sessionIndex||"0",r.iamToken||null,r.authTokenFactory||null);case"provider":return r.client;default:throw new Ce(se.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.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(e){const r=aC.get(e);r&&(Ee("ComponentProvider","Removing Datastore"),aC.delete(e),r.terminate())}(this),Promise.resolve()}}/** 2794 * @license 2795 * Copyright 2020 Google LLC 2796 * 2797 * Licensed under the Apache License, Version 2.0 (the "License"); 2798 * you may not use this file except in compliance with the License. 2799 * You may obtain a copy of the License at 2800 * 2801 * http://www.apache.org/licenses/LICENSE-2.0 2802 * 2803 * Unless required by applicable law or agreed to in writing, software 2804 * distributed under the License is distributed on an "AS IS" BASIS, 2805 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2806 * See the License for the specific language governing permissions and 2807 * limitations under the License. 2808 */class Fn{constructor(e,r,i){this.converter=r,this._key=i,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new zi(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new Fn(this.firestore,e,this._key)}}class Sc{constructor(e,r,i){this.converter=r,this._query=i,this.type="query",this.firestore=e}withConverter(e){return new Sc(this.firestore,e,this._query)}}class zi extends Sc{constructor(e,r,i){super(e,r,z0(i)),this._path=i,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new Fn(this.firestore,null,new ke(e))}withConverter(e){return new zi(this.firestore,e,this._path)}}function JI(t,e,...r){if(t=ot(t),QI("collection","path",e),t instanceof r1){const i=ct.fromString(e,...r);return uC(i),new zi(t,null,i)}{if(!(t instanceof Fn||t instanceof zi))throw new Ce(se.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const i=t._path.child(ct.fromString(e,...r));return uC(i),new zi(t.firestore,null,i)}}function cy(t,e,...r){if(t=ot(t),arguments.length===1&&(e=nI.R()),QI("doc","path",e),t instanceof r1){const i=ct.fromString(e,...r);return lC(i),new Fn(t,null,new ke(i))}{if(!(t instanceof Fn||t instanceof zi))throw new Ce(se.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const i=t._path.child(ct.fromString(e,...r));return lC(i),new Fn(t.firestore,t instanceof zi?t.converter:null,new ke(i))}}/** 2809 * @license 2810 * Copyright 2020 Google LLC 2811 * 2812 * Licensed under the Apache License, Version 2.0 (the "License");
2813 * you may not use this file except in compliance with the License. 2814 * You may obtain a copy of the License at 2815 * 2816 * http://www.apache.org/licenses/LICENSE-2.0 2817 * 2818 * Unless required by applicable law or agreed to in writing, software 2819 * distributed under the License is distributed on an "AS IS" BASIS, 2820 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2821 * See the License for the specific language governing permissions and 2822 * limitations under the License. 2823 */class WB{constructor(){this.$c=Promise.resolve(),this.Bc=[],this.Lc=!1,this.Uc=[],this.qc=null,this.Kc=!1,this.Gc=!1,this.Qc=[],this.xo=new NI(this,"async_queue_retry"),this.jc=()=>{const r=mg();r&&Ee("AsyncQueue","Visibility state changed to "+r.visibilityState),this.xo.bo()};const e=mg();e&&typeof e.addEventListener=="function"&&e.addEventListener("visibilitychange",this.jc)}get isShuttingDown(){return this.Lc}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.Wc(),this.zc(e)}enterRestrictedMode(e){if(!this.Lc){this.Lc=!0,this.Gc=e||!1;const r=mg();r&&typeof r.removeEventListener=="function"&&r.removeEventListener("visibilitychange",this.jc)}}enqueue(e){if(this.Wc(),this.Lc)return new Promise(()=>{});const r=new $s;return this.zc(()=>this.Lc&&this.Gc?Promise.resolve():(e().then(r.resolve,r.reject),r.promise)).then(()=>r.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.Bc.push(e),this.Hc()))}async Hc(){if(this.Bc.length!==0){try{await this.Bc[0](),this.Bc.shift(),this.xo.reset()}catch(e){if(!gc(e))throw e;Ee("AsyncQueue","Operation failed with retryable error: "+e)}this.Bc.length>0&&this.xo.Ao(()=>this.Hc())}}zc(e){const r=this.$c.then(()=>(this.Kc=!0,e().catch(i=>{this.qc=i,this.Kc=!1;const s=function(o){let a=o.message||"";return o.stack&&(a=o.stack.includes(o.message)?o.stack:o.message+` 2824`+o.stack),a}(i);throw si("INTERNAL UNHANDLED ERROR: ",s),i}).then(i=>(this.Kc=!1,i))));return this.$c=r,r}enqueueAfterDelay(e,r,i){this.Wc(),this.Qc.indexOf(e)>-1&&(r=0);const s=Z0.createAndSchedule(this,e,r,i,o=>this.Jc(o));return this.Uc.push(s),s}Wc(){this.qc&&$e()}verifyOperationInProgress(){}async Yc(){let e;do e=this.$c,await e;while(e!==this.$c)}Xc(e){for(const r of this.Uc)if(r.timerId===e)return!0;return!1}Zc(e){return this.Yc().then(()=>{this.Uc.sort((r,i)=>r.targetTimeMs-i.targetTimeMs);for(const r of this.Uc)if(r.skipDelay(),e!=="all"&&r.timerId===e)break;return this.Yc()})}ta(e){this.Qc.push(e)}Jc(e){const r=this.Uc.indexOf(e);this.Uc.splice(r,1)}}function dC(t){return function(e,r){if(typeof e!="object"||e===null)return!1;const i=e;for(const s of r)if(s in i&&typeof i[s]=="function")return!0;return!1}(t,["next","error","complete"])}class da extends r1{constructor(e,r,i,s){super(e,r,i,s),this.type="firestore",this._queue=new WB,this._persistenceKey=(s==null?void 0:s.name)||"[DEFAULT]"}_terminate(){return this._firestoreClient||eR(this),this._firestoreClient.terminate()}}function GB(t,e){const r=typeof t=="object"?t:i0(),i=typeof t=="string"?t:e||"(default)";return vf(r,"firestore").getImmediate({identifier:i})}function ZI(t){return t._firestoreClient||eR(t),t._firestoreClient.verifyNotTerminated(),t._firestoreClient}function eR(t){var e;const r=t._freezeSettings(),i=function(s,o,a,l){return new E4(s,o,a,l.host,l.ssl,l.experimentalForceLongPolling,l.experimentalAutoDetectLongPolling,l.useFetchStreams)}(t._databaseId,((e=t._app)===null||e===void 0?void 0:e.options.appId)||"",t._persistenceKey,r);t._firestoreClient=new FB(t._authCredentials,t._appCheckCredentials,t._queue,i)}/** 2825 * @license 2826 * Copyright 2020 Google LLC 2827 * 2828 * Licensed under the Apache License, Version 2.0 (the "License"); 2829 * you may not use this file except in compliance with the License. 2830 * You may obtain a copy of the License at 2831 * 2832 * http://www.apache.org/licenses/LICENSE-2.0 2833 * 2834 * Unless required by applicable law or agreed to in writing, software 2835 * distributed under the License is distributed on an "AS IS" BASIS, 2836 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2837 * See the License for the specific language governing permissions and 2838 * limitations under the License. 2839 *//** 2840 * @license 2841 * Copyright 2020 Google LLC 2842 * 2843 * Licensed under the Apache License, Version 2.0 (the "License");
2844 * you may not use this file except in compliance with the License. 2845 * You may obtain a copy of the License at 2846 * 2847 * http://www.apache.org/licenses/LICENSE-2.0 2848 * 2849 * Unless required by applicable law or agreed to in writing, software 2850 * distributed under the License is distributed on an "AS IS" BASIS, 2851 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2852 * See the License for the specific language governing permissions and 2853 * limitations under the License. 2854 */class Hf{constructor(...e){for(let r=0;r<e.length;++r)if(e[r].length===0)throw new Ce(se.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new dn(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}/** 2855 * @license 2856 * Copyright 2020 Google LLC 2857 * 2858 * Licensed under the Apache License, Version 2.0 (the "License"); 2859 * you may not use this file except in compliance with the License. 2860 * You may obtain a copy of the License at 2861 * 2862 * http://www.apache.org/licenses/LICENSE-2.0 2863 * 2864 * Unless required by applicable law or agreed to in writing, software 2865 * distributed under the License is distributed on an "AS IS" BASIS, 2866 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2867 * See the License for the specific language governing permissions and 2868 * limitations under the License. 2869 */class ha{constructor(e){this._byteString=e}static fromBase64String(e){try{return new ha(rn.fromBase64String(e))}catch(r){throw new Ce(se.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+r)}}static fromUint8Array(e){return new ha(rn.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}}/** 2870 * @license 2871 * Copyright 2020 Google LLC 2872 * 2873 * Licensed under the Apache License, Version 2.0 (the "License"); 2874 * you may not use this file except in compliance with the License. 2875 * You may obtain a copy of the License at 2876 * 2877 * http://www.apache.org/licenses/LICENSE-2.0 2878 * 2879 * Unless required by applicable law or agreed to in writing, software 2880 * distributed under the License is distributed on an "AS IS" BASIS, 2881 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2882 * See the License for the specific language governing permissions and 2883 * limitations under the License. 2884 */class qf{constructor(e){this._methodName=e}}/** 2885 * @license 2886 * Copyright 2017 Google LLC 2887 * 2888 * Licensed under the Apache License, Version 2.0 (the "License"); 2889 * you may not use this file except in compliance with the License. 2890 * You may obtain a copy of the License at 2891 * 2892 * http://www.apache.org/licenses/LICENSE-2.0 2893 * 2894 * Unless required by applicable law or agreed to in writing, software 2895 * distributed under the License is distributed on an "AS IS" BASIS, 2896 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2897 * See the License for the specific language governing permissions and 2898 * limitations under the License. 2899 */class i1{constructor(e,r){if(!isFinite(e)||e<-90||e>90)throw new Ce(se.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(r)||r<-180||r>180)throw new Ce(se.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+r);this._lat=e,this._long=r}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return Ze(this._lat,e._lat)||Ze(this._long,e._long)}}/** 2900 * @license 2901 * Copyright 2017 Google LLC 2902 * 2903 * Licensed under the Apache License, Version 2.0 (the "License"); 2904 * you may not use this file except in compliance with the License. 2905 * You may obtain a copy of the License at 2906 * 2907 * http://www.apache.org/licenses/LICENSE-2.0 2908 * 2909 * Unless required by applicable law or agreed to in writing, software 2910 * distributed under the License is distributed on an "AS IS" BASIS, 2911 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2912 * See the License for the specific language governing permissions and 2913 * limitations under the License. 2914 */const HB=/^__.*__$/;class qB{constructor(e,r,i){this.data=e,this.fieldMask=r,this.fieldTransforms=i}toMutation(e,r){return this.fieldMask!==null?new cs(e,this.data,this.fieldMask,r,this.fieldTransforms):new yc(e,this.data,r,this.fieldTransforms)}}class tR{constructor(e,r,i){this.data=e,this.fieldMask=r,this.fieldTransforms=i}toMutation(e,r){return new cs(e,this.data,this.fieldMask,r,this.fieldTransforms)}}function nR(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw $e()}}class s1{constructor(e,r,i,s,o,a){this.settings=e,this.databaseId=r,this.It=i,this.ignoreUndefinedProperties=s,o===void 0&&this.ea(),this.fieldTransforms=o||[],this.fieldMask=a||[]}get path(){return this.settings.path}get na(){return this.settings.na}sa(e){return new s1(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.It,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}ia(e){var r;const i=(r=this.path)===null||r===void 0?void 0:r.child(e),s=this.sa({path:i,ra:!1}
2914);return s.oa(e),s}ua(e){var r;const i=(r=this.path)===null||r===void 0?void 0:r.child(e),s=this.sa({path:i,ra:!1});return s.ea(),s}ca(e){return this.sa({path:void 0,ra:!0})}aa(e){return xh(e,this.settings.methodName,this.settings.ha||!1,this.path,this.settings.la)}contains(e){return this.fieldMask.find(r=>e.isPrefixOf(r))!==void 0||this.fieldTransforms.find(r=>e.isPrefixOf(r.field))!==void 0}ea(){if(this.path)for(let e=0;e<this.path.length;e++)this.oa(this.path.get(e))}oa(e){if(e.length===0)throw this.aa("Document fields must not be empty");if(nR(this.na)&&HB.test(e))throw this.aa('Document fields cannot begin and end with "__"')}}class KB{constructor(e,r,i){this.databaseId=e,this.ignoreUndefinedProperties=r,this.It=i||zf(e)}fa(e,r,i,s=!1){return new s1({na:e,methodName:r,la:i,path:dn.emptyPath(),ra:!1,ha:s},this.databaseId,this.It,this.ignoreUndefinedProperties)}}function o1(t){const e=t._freezeSettings(),r=zf(t._databaseId);return new KB(t._databaseId,!!e.ignoreUndefinedProperties,r)}function YB(t,e,r,i,s,o={}){const a=t.fa(o.merge||o.mergeFields?2:0,e,r,s);l1("Data must be an object, but it was:",a,i);const l=rR(i,a);let c,d;if(o.merge)c=new nr(a.fieldMask),d=a.fieldTransforms;else if(o.mergeFields){const f=[];for(const g of o.mergeFields){const v=dy(e,g,r);if(!a.contains(v))throw new Ce(se.INVALID_ARGUMENT,`Field '${v}' is specified in your field mask but missing from your input data.`);sR(f,v)||f.push(v)}c=new nr(f),d=a.fieldTransforms.filter(g=>c.covers(g.field))}else c=null,d=a.fieldTransforms;return new qB(new Dn(l),c,d)}class Kf extends qf{_toFieldTransform(e){if(e.na!==2)throw e.na===1?e.aa(`${this._methodName}() can only appear at the top level of your update data`):e.aa(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return e.fieldMask.push(e.path),null}isEqual(e){return e instanceof Kf}}class a1 extends qf{_toFieldTransform(e){return new W4(e.path,new Mu)}isEqual(e){return e instanceof a1}}function XB(t,e,r,i){const s=t.fa(1,e,r);l1("Data must be an object, but it was:",s,i);const o=[],a=Dn.empty();ao(i,(c,d)=>{const f=u1(e,c,r);d=ot(d);const g=s.ua(f);if(d instanceof Kf)o.push(f);else{const v=Cc(d,g);v!=null&&(o.push(f),a.set(f,v))}});const l=new nr(o);return new tR(a,l,s.fieldTransforms)}function QB(t,e,r,i,s,o){const a=t.fa(1,e,r),l=[dy(e,i,r)],c=[s];if(o.length%2!=0)throw new Ce(se.INVALID_ARGUMENT,`Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let v=0;v<o.length;v+=2)l.push(dy(e,o[v])),c.push(o[v+1]);const d=[],f=Dn.empty();for(let v=l.length-1;v>=0;--v)if(!sR(d,l[v])){const _=l[v];let w=c[v];w=ot(w);const k=a.ua(_);if(w instanceof Kf)d.push(_);else{const y=Cc(w,k);y!=null&&(d.push(_),f.set(_,y))}}const g=new nr(d);return new tR(f,g,a.fieldTransforms)}function JB(t,e,r,i=!1){return Cc(r,t.fa(i?4:3,e))}function Cc(t,e){if(iR(t=ot(t)))return l1("Unsupported field value:",e,t),rR(t,e);if(t instanceof qf)return function(r,i){if(!nR(i.na))throw i.aa(`${r._methodName}() can only be used with update() and set()`);if(!i.path)throw i.aa(`${r._methodName}() is not currently supported inside arrays`);const s=r._toFieldTransform(i);s&&i.fieldTransforms.push(s)}(t,e),null;if(t===void 0&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),t instanceof Array){if(e.settings.ra&&e.na!==4)throw e.aa("Nested arrays are not supported");return function(r,i){const s=[];let o=0;for(const a of r){let l=Cc(a,i.ca(o));l==null&&(l={nullValue:"NULL_VALUE"}),s.push(l),o++}return{arrayValue:{values:s}}}(t,e)}return function(r,i){if((r=ot(r))===null)return{nullValue:"NULL_VALUE"};if(typeof r=="number")return j4(i.It,r);if(typeof r=="boolean")return{booleanValue:r};if(typeof r=="string")return{stringValue:r};if(r instanceof Date){const s=$t.fromDate(r);return{timestampValue:Sh(i.It,s)}}if(r instanceof $t){const s=new $t(r.seconds,1e3*Math.floor(r.nanoseconds/1e3));return{timestampValue:Sh(i.It,s)}}if(r instanceof i1)return{geoPointValue:{latitude:r.latitude,longitude:r.longitude}};if(r instanceof ha)return{bytesValue:II(i.It,r._byteString)};if(r instanceof Fn){const s=i.databaseId,o=r.firestore._databaseId;if(!o.isEqual(s))throw i.aa(`Document reference is for database ${o.projectId}/${o.database} but should be for database ${s.projectId}/${s.database}`);return{referenceValue:G0(r.firestore._databaseId||i.databaseId,r._key.path)}}throw i.aa(`Unsupported field value: ${Gf(r)}`)}(t,e)}function rR(t,e){const r={};return rI(t)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):ao(t,(i,s)=>{const o=Cc(s,e.ia(i));o!=null&&(r[i]=o)}),{mapValue:{fields:r}}}function iR(t){return!(typeof t!="object"||t===null||t instanceof Array||t instanceof Date||t instanceof $t||t instanceof i1||t instanceof ha||t instanceof Fn||t instanceof qf)}function l1(t,e,r){if(!iR(r)||!function(i){return typeof i=="object"&&i!==null&&(Object.getPrototypeOf(i)===Object.prototype||Ob
2914ject.getPrototypeOf(i)===null)}(r)){const i=Gf(r);throw i==="an object"?e.aa(t+" a custom object"):e.aa(t+" "+i)}}function dy(t,e,r){if((e=ot(e))instanceof Hf)return e._internalPath;if(typeof e=="string")return u1(t,e);throw xh("Field path arguments must be of type string or ",t,!1,void 0,r)}const ZB=new RegExp("[~\\*/\\[\\]]");function u1(t,e,r){if(e.search(ZB)>=0)throw xh(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,t,!1,void 0,r);try{return new Hf(...e.split("."))._internalPath}catch{throw xh(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,t,!1,void 0,r)}}function xh(t,e,r,i,s){const o=i&&!i.isEmpty(),a=s!==void 0;let l=`Function ${e}() called with invalid data`;r&&(l+=" (via `toFirestore()`)"),l+=". ";let c="";return(o||a)&&(c+=" (found",o&&(c+=` in field ${i}`),a&&(c+=` in document ${s}`),c+=")"),new Ce(se.INVALID_ARGUMENT,l+t+c)}function sR(t,e){return t.some(r=>r.isEqual(e))}/** 2915 * @license 2916 * Copyright 2020 Google LLC 2917 * 2918 * Licensed under the Apache License, Version 2.0 (the "License"); 2919 * you may not use this file except in compliance with the License. 2920 * You may obtain a copy of the License at 2921 * 2922 * http://www.apache.org/licenses/LICENSE-2.0 2923 * 2924 * Unless required by applicable law or agreed to in writing, software 2925 * distributed under the License is distributed on an "AS IS" BASIS, 2926 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2927 * See the License for the specific language governing permissions and 2928 * limitations under the License. 2929 */class oR{constructor(e,r,i,s,o){this._firestore=e,this._userDataWriter=r,this._key=i,this._document=s,this._converter=o}get id(){return this._key.path.lastSegment()}get ref(){return new Fn(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const e=new e6(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){const r=this._document.data.field(c1("DocumentSnapshot.get",e));if(r!==null)return this._userDataWriter.convertValue(r)}}}class e6 extends oR{data(){return super.data()}}function c1(t,e){return typeof e=="string"?u1(t,e):e instanceof Hf?e._internalPath:e._delegate._internalPath}/** 2930 * @license 2931 * Copyright 2020 Google LLC 2932 * 2933 * Licensed under the Apache License, Version 2.0 (the "License"); 2934 * you may not use this file except in compliance with the License. 2935 * You may obtain a copy of the License at 2936 * 2937 * http://www.apache.org/licenses/LICENSE-2.0 2938 * 2939 * Unless required by applicable law or agreed to in writing, software 2940 * distributed under the License is distributed on an "AS IS" BASIS, 2941 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2942 * See the License for the specific language governing permissions and 2943 * limitations under the License. 2944 */class kl{constructor(e,r){this.hasPendingWrites=e,this.fromCache=r}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class aR extends oR{constructor(e,r,i,s,o,a){super(e,r,i,s,a),this._firestore=e,this._firestoreImpl=e,this.metadata=o}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const r=new Td(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(r,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,r={}){if(this._document){const i=this._document.data.field(c1("DocumentSnapshot.get",e));if(i!==null)return this._userDataWriter.convertValue(i,r.serverTimestamps)}}}class Td extends aR{data(e={}){return super.data(e)}}class t6{constructor(e,r,i,s){this._firestore=e,this._userDataWriter=r,this._snapshot=s,this.metadata=new kl(s.hasPendingWrites,s.fromCache),this.query=i}get docs(){const e=[];return this.forEach(r=>e.push(r)),e}get size(){return this._snapshot.docs.size}get empty(){return this.size===0}forEach(e,r){this._snapshot.docs.forEach(i=>
2944{e.call(r,new Td(this._firestore,this._userDataWriter,i.key,i,new kl(this._snapshot.mutatedKeys.has(i.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){const r=!!e.includeMetadataChanges;if(r&&this._snapshot.excludesMetadataChanges)throw new Ce(se.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===r||(this._cachedChanges=function(i,s){if(i._snapshot.oldDocs.isEmpty()){let o=0;return i._snapshot.docChanges.map(a=>({type:"added",doc:new Td(i._firestore,i._userDataWriter,a.doc.key,a.doc,new kl(i._snapshot.mutatedKeys.has(a.doc.key),i._snapshot.fromCache),i.query.converter),oldIndex:-1,newIndex:o++}))}{let o=i._snapshot.oldDocs;return i._snapshot.docChanges.filter(a=>s||a.type!==3).map(a=>{const l=new Td(i._firestore,i._userDataWriter,a.doc.key,a.doc,new kl(i._snapshot.mutatedKeys.has(a.doc.key),i._snapshot.fromCache),i.query.converter);let c=-1,d=-1;return a.type!==0&&(c=o.indexOf(a.doc.key),o=o.delete(a.doc.key)),a.type!==1&&(o=o.add(a.doc),d=o.indexOf(a.doc.key)),{type:n6(a.type),doc:l,oldIndex:c,newIndex:d}})}}(this,r),this._cachedChangesIncludeMetadataChanges=r),this._cachedChanges}}function n6(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return $e()}}/** 2945 * @license 2946 * Copyright 2020 Google LLC 2947 * 2948 * Licensed under the Apache License, Version 2.0 (the "License"); 2949 * you may not use this file except in compliance with the License. 2950 * You may obtain a copy of the License at 2951 * 2952 * http://www.apache.org/licenses/LICENSE-2.0 2953 * 2954 * Unless required by applicable law or agreed to in writing, software 2955 * distributed under the License is distributed on an "AS IS" BASIS, 2956 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2957 * See the License for the specific language governing permissions and 2958 * limitations under the License. 2959 */function r6(t){if(t.limitType==="L"&&t.explicitOrderBy.length===0)throw new Ce(se.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class i6{}function s6(t,...e){for(const r of e)t=r._apply(t);return t}class o6 extends i6{constructor(e,r,i){super(),this.wa=e,this.ma=r,this.ga=i,this.type="where"}_apply(e){const r=o1(e.firestore),i=function(s,o,a,l,c,d,f){let g;if(c.isKeyField()){if(d==="array-contains"||d==="array-contains-any")throw new Ce(se.INVALID_ARGUMENT,`Invalid Query. You can't perform '${d}' queries on documentId().`);if(d==="in"||d==="not-in"){fC(f,d);const _=[];for(const w of f)_.push(hC(l,s,w));g={arrayValue:{values:_}}}else g=hC(l,s,f)}else d!=="in"&&d!=="not-in"&&d!=="array-contains-any"||fC(f,d),g=JB(a,o,f,d==="in"||d==="not-in");const v=Cn.create(c,d,g);return function(_,w){if(w.dt()){const y=uI(_);if(y!==null&&!y.isEqual(w.field))throw new Ce(se.INVALID_ARGUMENT,`Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '${y.toString()}' and '${w.field.toString()}'`);const b=lI(_);b!==null&&l6(_,w.field,b)}const k=function(y,b){for(const x of y.filters)if(b.indexOf(x.op)>=0)return x.op;return null}(_,function(y){switch(y){case"!=":return["!=","not-in"];case"array-contains":return["array-contains","array-contains-any","not-in"];case"in":return["array-contains-any","in","not-in"];case"array-contains-any":return["array-contains","array-contains-any","in","not-in"];case"not-in":return["array-contains","array-contains-any","in","not-in","!="];default:return[]}}(w.op));if(k!==null)throw k===w.op?new Ce(se.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${w.op.toString()}' filter.`):new Ce(se.INVALID_ARGUMENT,`Invalid query. You cannot use '${w.op.toString()}' filters with '${k.toString()}' filters.`)}(s,v),v}(e._query,"where",r,e.firestore._databaseId,this.wa,this.ma,this.ga);return new Sc(e.firestore,e.converter,function(s,o){const a=s.filters.concat([o]);return new mc(s.path,s.collectionGroup,s.explicitOrderBy.slice(),a,s.limit,s.limitType,s.startAt,s.endAt)}(e._query,i))}}function a6(t,e,r){const i=e,s=c1("where",t);return new o6(s,i,r)}function hC(t,e,r){if(typeof(r=ot(r))=="string"){if(r==="")throw new Ce(se.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!cI(e)&&r.indexOf("/")!==-1)throw new Ce(se.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${r}' contains a '/' character.`);const i=e.path.child(ct.fromString(r));if(!ke.isDocumentKey(i))throw new Ce(se.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${i}' is not because it has an odd number of segments (${i.length}).`);return FS(t,new ke(i))}if(r instanceof Fn)return FS(t,r._key);throw new Ce(se.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${Gf(r)}.`)}function fC(t,e){if(!Array.isArray(t)||t.length===0)throw new Ce(se.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${e.toString()}' filters.`);if(t.length>10)throw new Ce(se.INVALID_ARGUMENT,`Invalid Query. '${e.toString()}' filters support a maximum of 10 elements in the value array.`)}function l6(t,e,r){if(!r.isEqual(e))throw new Ce(se.INVALID_ARGUMENT,`Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '${e.toString()}' and so you must also use '${e.toString()}' as your first argument to orderBy(), but your first orderBy() is on field '${r.toString()}' instead.`)}/** 2960 * @license 2961 * Copyright 2020 Google LLC 2962 * 2963 * Licensed under the Apache License, Version 2.0 (the "License");
2964 * you may not use this file except in compliance with the License. 2965 * You may obtain a copy of the License at 2966 * 2967 * http://www.apache.org/licenses/LICENSE-2.0 2968 * 2969 * Unless required by applicable law or agreed to in writing, software 2970 * distributed under the License is distributed on an "AS IS" BASIS, 2971 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2972 * See the License for the specific language governing permissions and 2973 * limitations under the License. 2974 */class u6{convertValue(e,r="none"){switch(Zs(e)){case 0:return null;case 1:return e.booleanValue;case 2:return At(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,r);case 5:return e.stringValue;case 6:return this.convertBytes(aa(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,r);case 10:return this.convertObject(e.mapValue,r);default:throw $e()}}convertObject(e,r){const i={};return ao(e.fields,(s,o)=>{i[s]=this.convertValue(o,r)}),i}convertGeoPoint(e){return new i1(At(e.latitude),At(e.longitude))}convertArray(e,r){return(e.values||[]).map(i=>this.convertValue(i,r))}convertServerTimestamp(e,r){switch(r){case"previous":const i=sI(e);return i==null?null:this.convertValue(i,r);case"estimate":return this.convertTimestamp(Pu(e));default:return null}}convertTimestamp(e){const r=Zi(e);return new $t(r.seconds,r.nanos)}convertDocumentKey(e,r){const i=ct.fromString(e);lt(OI(i));const s=new Au(i.get(1),i.get(3)),o=new ke(i.popFirst(5));return s.isEqual(r)||si(`Document ${o} contains a document reference within a different database (${s.projectId}/${s.database}) which is not supported. It will be treated as a reference in the current database (${r.projectId}/${r.database}) instead.`),o}}/** 2975 * @license 2976 * Copyright 2020 Google LLC 2977 * 2978 * Licensed under the Apache License, Version 2.0 (the "License"); 2979 * you may not use this file except in compliance with the License. 2980 * You may obtain a copy of the License at 2981 * 2982 * http://www.apache.org/licenses/LICENSE-2.0 2983 * 2984 * Unless required by applicable law or agreed to in writing, software 2985 * distributed under the License is distributed on an "AS IS" BASIS, 2986 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 2987 * See the License for the specific language governing permissions and 2988 * limitations under the License. 2989 */function c6(t,e,r){let i;return i=t?r&&(r.merge||r.mergeFields)?t.toFirestore(e,r):t.toFirestore(e):e,i}class lR extends u6{constructor(e){super(),this.firestore=e}convertBytes(e){return new ha(e)}convertReference(e){const r=this.convertDocumentKey(e,this.firestore._databaseId);return new Fn(this.firestore,null,r)}}function d6(t,e,r,...i){t=Fs(t,Fn);const s=Fs(t.firestore,da),o=o1(s);let a;return a=typeof(e=ot(e))=="string"||e instanceof Hf?QB(o,"updateDoc",t._key,e,r,i):XB(o,"updateDoc",t._key,e),d1(s,[a.toMutation(t._key,br.exists(!0))])}function h6(t){return d1(Fs(t.firestore,da),[new W0(t._key,br.none())])}function f6(t,e){const r=Fs(t.firestore,da),i=cy(t),s=c6(t.converter,e);return d1(r,[YB(o1(t.firestore),"addDoc",i._key,s,t.converter!==null,{}).toMutation(i._key,br.exists(!1))]).then(()=>i)}function p6(t,...e){var r,i,s;t=ot(t);let o={includeMetadataChanges:!1},a=0;typeof e[a]!="object"||dC(e[a])||(o=e[a],a++);const l={includeMetadataChanges:o.includeMetadataChanges};if(dC(e[a])){const g=e[a];e[a]=(r=g.next)===null||r===void 0?void 0:r.bind(g),e[a+1]=(i=g.error)===null||i===void 0?void 0:i.bind(g),e[a+2]=(s=g.complete)===null||s===void 0?void 0:s.bind(g)}let c,d,f;if(t instanceof Fn)d=Fs(t.firestore,da),f=z0(t._key.path),c={next:g=>{e[a]&&e[a](g6(d,t,g))},error:e[a+1],complete:e[a+2]};else{const g=Fs(t,Sc);d=Fs(g.firestore,da),f=g._query;const v=new lR(d);c={next:_=>{e[a]&&e[a](new t6(d,v,g,_))},error:e[a+1],complete:e[a+2]},r6(t._query)}return function(g,v,_,w){const k=new LB(w),y=new vB(v,k,_);return g.asyncQueue.enqueueAndForget(async()=>pB(await oC(g),y)),()=>{k.Rc(),g.asyncQueue.enqueueAndForget(async()=>gB(await oC(g),y))}}(ZI(d),f,l,c)}function d1(t,e){return function(r,i){const s=new $s;return r.asyncQueue.enqueueAndForget(async()=>kB(await zB(r),i,s)),s.promise}(ZI(t),e)}function g6(t,e,r){const i=r.docs.get(e._key),s=new lR(t);return new aR(t,s,e._key,i,new kl(r.hasPendingWrites,r.fromCache),e.converter)}function m6(){return new a1("serverTimestamp")}(function(t,e=!0){(function(r){Ra=r})(Ea),qs(new Qi("firestore",(r,{instanceIdentifier:i,options:s})=>{const o=r.getProvider("app").getImmediate(),a=new da(new h4(r.getProvider("auth-internal")),new m4(r.getProvider("app-check-internal")),function(l,c){if
2989(!Object.prototype.hasOwnProperty.apply(l.options,["projectId"]))throw new Ce(se.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Au(l.options.projectId,c)}(o,i),o);return s=Object.assign({useFetchStreams:e},s),a._setSettings(s),a},"PUBLIC").setMultipleInstances(!0)),Mr(OS,"3.5.0",t),Mr(OS,"3.5.0","esm2017")})();/** 2990 * @license 2991 * Copyright 2017 Google LLC 2992 * 2993 * Licensed under the Apache License, Version 2.0 (the "License"); 2994 * you may not use this file except in compliance with the License. 2995 * You may obtain a copy of the License at 2996 * 2997 * http://www.apache.org/licenses/LICENSE-2.0 2998 * 2999 * Unless required by applicable law or agreed to in writing, software 3000 * distributed under the License is distributed on an "AS IS" BASIS, 3001 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3002 * See the License for the specific language governing permissions and 3003 * limitations under the License. 3004 */const uR="firebasestorage.googleapis.com",cR="storageBucket",y6=2*60*1e3,v6=10*60*1e3;/** 3005 * @license 3006 * Copyright 2017 Google LLC 3007 * 3008 * Licensed under the Apache License, Version 2.0 (the "License"); 3009 * you may not use this file except in compliance with the License. 3010 * You may obtain a copy of the License at 3011 * 3012 * http://www.apache.org/licenses/LICENSE-2.0 3013 * 3014 * Unless required by applicable law or agreed to in writing, software 3015 * distributed under the License is distributed on an "AS IS" BASIS, 3016 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3017 * See the License for the specific language governing permissions and 3018 * limitations under the License. 3019 */class kt extends jr{constructor(e,r){super(yg(e),`Firebase Storage: ${r} (${yg(e)})`),this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,kt.prototype)}_codeEquals(e){return yg(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage} 3020${this.customData.serverResponse}`:this.message=this._baseMessage}}function yg(t){return"storage/"+t}function h1(){const t="An unknown error occurred, please check the error payload for server response.";return new kt("unknown",t)}function b6(t){return new kt("object-not-found","Object '"+t+"' does not exist.")}function w6(t){return new kt("quota-exceeded","Quota for bucket '"+t+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}function S6(){const t="User is not authenticated, please authenticate using Firebase Authentication and try again.";return new kt("unauthenticated",t)}function C6(){return new kt("unauthorized-app","This app does not have permission to access Firebase Storage on this project.")}function x6(t){return new kt("unauthorized","User does not have permission to access '"+t+"'.")}function _6(){return new kt("retry-limit-exceeded","Max retry time for operation exceeded, please try again.")}function E6(){return new kt("canceled","User canceled the upload/download.")}function k6(t){return new kt("invalid-url","Invalid URL '"+t+"'.")}function T6(t){return new kt("invalid-default-bucket","Invalid default bucket '"+t+"'.")}function I6(){return new kt("no-default-bucket","No default bucket found. Did you set the '"+cR+"' property when initializing the app?")}function R6(){return new kt("cannot-slice-blob","Cannot slice blob for upload. Please retry the upload.")}function P6(){return new kt("no-download-url","The given file does not have any download URLs.")}function hy(t){return new kt("invalid-argument",t)}function dR(){return new kt("app-deleted","The Firebase app was deleted.")}function A6(t){return new kt("invalid-root-operation","The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function Xl(t,e){return new kt("invalid-format","String does not match format '"+t+"': "+e)}function ll(t){throw new kt("internal-error","Internal error: "+t)}/** 3021 * @license 3022 * Copyright 2017 Google LLC 3023 * 3024 * Licensed under the Apache License, Version 2.0 (the "License");
3025 * you may not use this file except in compliance with the License. 3026 * You may obtain a copy of the License at 3027 * 3028 * http://www.apache.org/licenses/LICENSE-2.0 3029 * 3030 * Unless required by applicable law or agreed to in writing, software 3031 * distributed under the License is distributed on an "AS IS" BASIS, 3032 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3033 * See the License for the specific language governing permissions and 3034 * limitations under the License. 3035 */class Gn{constructor(e,r){this.bucket=e,this.path_=r}get path(){return this.path_}get isRoot(){return this.path.length===0}fullServerUrl(){const e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(e,r){let i;try{i=Gn.makeFromUrl(e,r)}catch{return new Gn(e,"")}if(i.path==="")return i;throw T6(e)}static makeFromUrl(e,r){let i=null;const s="([A-Za-z0-9.\\-_]+)";function o(E){E.path.charAt(E.path.length-1)==="/"&&(E.path_=E.path_.slice(0,-1))}const a="(/(.*))?$",l=new RegExp("^gs://"+s+a,"i"),c={bucket:1,path:3};function d(E){E.path_=decodeURIComponent(E.path)}const f="v[A-Za-z0-9_]+",g=r.replace(/[.]/g,"\\."),v="(/([^?#]*).*)?$",_=new RegExp(`^https?://${g}/${f}/b/${s}/o${v}`,"i"),w={bucket:1,path:3},k=r===uR?"(?:storage.googleapis.com|storage.cloud.google.com)":r,y="([^?#]*)",b=new RegExp(`^https?://${k}/${s}/${y}`,"i"),R=[{regex:l,indices:c,postModify:o},{regex:_,indices:w,postModify:d},{regex:b,indices:{bucket:1,path:2},postModify:d}];for(let E=0;E<R.length;E++){const C=R[E],D=C.regex.exec(e);if(D){const A=D[C.indices.bucket];let U=D[C.indices.path];U||(U=""),i=new Gn(A,U),C.postModify(i);break}}if(i==null)throw k6(e);return i}}class O6{constructor(e){this.promise_=Promise.reject(e)}getPromise(){return this.promise_}cancel(e=!1){}}/** 3036 * @license 3037 * Copyright 2017 Google LLC 3038 * 3039 * Licensed under the Apache License, Version 2.0 (the "License"); 3040 * you may not use this file except in compliance with the License. 3041 * You may obtain a copy of the License at 3042 * 3043 * http://www.apache.org/licenses/LICENSE-2.0 3044 * 3045 * Unless required by applicable law or agreed to in writing, software 3046 * distributed under the License is distributed on an "AS IS" BASIS, 3047 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3048 * See the License for the specific language governing permissions and 3049 * limitations under the License. 3050 */function D6(t,e,r){let i=1,s=null,o=null,a=!1,l=0;function c(){return l===2}let d=!1;function f(...y){d||(d=!0,e.apply(null,y))}function g(y){s=setTimeout(()=>{s=null,t(_,c())},y)}function v(){o&&clearTimeout(o)}function _(y,...b){if(d){v();return}if(y){v(),f.call(null,y,...b);return}if(c()||a){v(),f.call(null,y,...b);return}i<64&&(i*=2);let R;l===1?(l=2,R=0):R=(i+Math.random())*1e3,g(R)}let w=!1;function k(y){w||(w=!0,v(),!d&&(s!==null?(y||(l=2),clearTimeout(s),g(0)):y||(l=1)))}return g(0),o=setTimeout(()=>{a=!0,k(!0)},r),k}function M6(t){t(!1)}/** 3051 * @license 3052 * Copyright 2017 Google LLC 3053 * 3054 * Licensed under the Apache License, Version 2.0 (the "License"); 3055 * you may not use this file except in compliance with the License. 3056 * You may obtain a copy of the License at 3057 * 3058 * http://www.apache.org/licenses/LICENSE-2.0 3059 * 3060 * Unless required by applicable law or agreed to in writing, software 3061 * distributed under the License is distributed on an "AS IS" BASIS, 3062 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3063 * See the License for the specific language governing permissions and 3064 * limitations under the License. 3065 */function N6(t){return t!==void 0}function $6(t){return typeof t=="object"&&!Array.isArray(t)}function f1(t){return typeof t=="string"||t instanceof String}function pC(t){return p1()&&t instanceof Blob}function p1(){return typeof Blob<"u"}function gC(t,e,r,i){if(i<e)throw hy(`Invalid value for '${t}'. Expected ${e} or greater.`);if(i>r)throw hy(`Invalid value for '${t}'. Expected ${r} or less.`)}/** 3066 * @license 3067 * Copyright 2017 Google LLC 3068 * 3069 * Licensed under the Apache License, Version 2.0 (the "License");
3070 * you may not use this file except in compliance with the License. 3071 * You may obtain a copy of the License at 3072 * 3073 * http://www.apache.org/licenses/LICENSE-2.0 3074 * 3075 * Unless required by applicable law or agreed to in writing, software 3076 * distributed under the License is distributed on an "AS IS" BASIS, 3077 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3078 * See the License for the specific language governing permissions and 3079 * limitations under the License. 3080 */function g1(t,e,r){let i=e;return r==null&&(i=`https://${e}`),`${r}://${i}/v0${t}`}function hR(t){const e=encodeURIComponent;let r="?";for(const i in t)if(t.hasOwnProperty(i)){const s=e(i)+"="+e(t[i]);r=r+s+"&"}return r=r.slice(0,-1),r}/** 3081 * @license 3082 * Copyright 2017 Google LLC 3083 * 3084 * Licensed under the Apache License, Version 2.0 (the "License"); 3085 * you may not use this file except in compliance with the License. 3086 * You may obtain a copy of the License at 3087 * 3088 * http://www.apache.org/licenses/LICENSE-2.0 3089 * 3090 * Unless required by applicable law or agreed to in writing, software 3091 * distributed under the License is distributed on an "AS IS" BASIS, 3092 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3093 * See the License for the specific language governing permissions and 3094 * limitations under the License. 3095 */var Us;(function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"})(Us||(Us={}));/** 3096 * @license 3097 * Copyright 2017 Google LLC 3098 * 3099 * Licensed under the Apache License, Version 2.0 (the "License"); 3100 * you may not use this file except in compliance with the License. 3101 * You may obtain a copy of the License at 3102 * 3103 * http://www.apache.org/licenses/LICENSE-2.0 3104 * 3105 * Unless required by applicable law or agreed to in writing, software 3106 * distributed under the License is distributed on an "AS IS" BASIS, 3107 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3108 * See the License for the specific language governing permissions and 3109 * limitations under the License. 3110 */class L6{constructor(e,r,i,s,o,a,l,c,d,f,g){this.url_=e,this.method_=r,this.headers_=i,this.body_=s,this.successCodes_=o,this.additionalRetryCodes_=a,this.callback_=l,this.errorCallback_=c,this.timeout_=d,this.progressCallback_=f,this.connectionFactory_=g,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((v,_)=>{this.resolve_=v,this.reject_=_,this.start_()})}start_(){const e=(i,s)=>{if(s){i(!1,new Qc(!1,null,!0));return}const o=this.connectionFactory_();this.pendingConnection_=o;const a=l=>{const c=l.loaded,d=l.lengthComputable?l.total:-1;this.progressCallback_!==null&&this.progressCallback_(c,d)};this.progressCallback_!==null&&o.addUploadProgressListener(a),o.send(this.url_,this.method_,this.body_,this.headers_).then(()=>{this.progressCallback_!==null&&o.removeUploadProgressListener(a),this.pendingConnection_=null;const l=o.getErrorCode()===Us.NO_ERROR,c=o.getStatus();if(!l||this.isRetryStatusCode_(c)){const f=o.getErrorCode()===Us.ABORT;i(!1,new Qc(!1,null,f));return}const d=this.successCodes_.indexOf(c)!==-1;i(!0,new Qc(d,o))})},r=(i,s)=>{const o=this.resolve_,a=this.reject_,l=s.connection;if(s.wasSuccessCode)try{const c=this.callback_(l,l.getResponse());N6(c)?o(c):o()}catch(c){a(c)}else if(l!==null){const c=h1();c.serverResponse=l.getErrorText(),this.errorCallback_?a(this.errorCallback_(l,c)):a(c)}else if(s.canceled){const c=this.appDelete_?dR():E6();a(c)}else{const c=_6();a(c)}};this.canceled_?r(!1,new Qc(!1,null,!0)):this.backoffId_=D6(e,r,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,this.backoffId_!==null&&M6(this.backoffId_),this.pendingConnection_!==null&&this.pendingConnection_.abort()}isRetryStatusCode_(e){const r=e>=500&&e<600,s=[408,429].indexOf(e)!==-1,o=this.additionalRetryCodes_.indexOf(e)!==-1;return r||s||o}}class Qc{constructor(e,r,i){this.wasSuccessCode=e,this.connection=r,this.canceled=!!i}}function F6(t,e){e!==null&&e.length>0&&(t.Authorization="Firebase "+e)}function U6(t,e){t["X-Firebase-Storage-Version"]="webjs/"+(e??"AppManager")}function B6(t,e){e&&(t["X-Firebase-GMPID"]=e)}function j6(t,e){e!==null&&(t["X-Firebase-AppCheck"]=e)}
3110function z6(t,e,r,i,s,o){const a=hR(t.urlParams),l=t.url+a,c=Object.assign({},t.headers);return B6(c,e),F6(c,r),U6(c,o),j6(c,i),new L6(l,t.method,c,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,s)}/** 3111 * @license 3112 * Copyright 2017 Google LLC 3113 * 3114 * Licensed under the Apache License, Version 2.0 (the "License"); 3115 * you may not use this file except in compliance with the License. 3116 * You may obtain a copy of the License at 3117 * 3118 * http://www.apache.org/licenses/LICENSE-2.0 3119 * 3120 * Unless required by applicable law or agreed to in writing, software 3121 * distributed under the License is distributed on an "AS IS" BASIS, 3122 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3123 * See the License for the specific language governing permissions and 3124 * limitations under the License. 3125 */function V6(){return typeof BlobBuilder<"u"?BlobBuilder:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:void 0}function W6(...t){const e=V6();if(e!==void 0){const r=new e;for(let i=0;i<t.length;i++)r.append(t[i]);return r.getBlob()}else{if(p1())return new Blob(t);throw new kt("unsupported-environment","This browser doesn't seem to support creating Blobs")}}function G6(t,e,r){return t.webkitSlice?t.webkitSlice(e,r):t.mozSlice?t.mozSlice(e,r):t.slice?t.slice(e,r):null}/** 3126 * @license 3127 * Copyright 2021 Google LLC 3128 * 3129 * Licensed under the Apache License, Version 2.0 (the "License"); 3130 * you may not use this file except in compliance with the License. 3131 * You may obtain a copy of the License at 3132 * 3133 * http://www.apache.org/licenses/LICENSE-2.0 3134 * 3135 * Unless required by applicable law or agreed to in writing, software 3136 * distributed under the License is distributed on an "AS IS" BASIS, 3137 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3138 * See the License for the specific language governing permissions and 3139 * limitations under the License. 3140 */function H6(t){return atob(t)}/** 3141 * @license 3142 * Copyright 2017 Google LLC 3143 * 3144 * Licensed under the Apache License, Version 2.0 (the "License"); 3145 * you may not use this file except in compliance with the License. 3146 * You may obtain a copy of the License at 3147 * 3148 * http://www.apache.org/licenses/LICENSE-2.0 3149 * 3150 * Unless required by applicable law or agreed to in writing, software 3151 * distributed under the License is distributed on an "AS IS" BASIS, 3152 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3153 * See the License for the specific language governing permissions and 3154 * limitations under the License. 3155 */const Pr={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};class vg{constructor(e,r){this.data=e,this.contentType=r||null}}function q6(t,e){switch(t){case Pr.RAW:return new vg(fR(e));case Pr.BASE64:case Pr.BASE64URL:return new vg(pR(t,e));case Pr.DATA_URL:return new vg(Y6(e),X6(e))}throw h1()}function fR(t){const e=[];for(let r=0;r<t.length;r++){let i=t.charCodeAt(r);if(i<=127)e.push(i);else if(i<=2047)e.push(192|i>>6,128|i&63);else if((i&64512)===55296)if(!(r<t.length-1&&(t.charCodeAt(r+1)&64512)===56320))e.push(239,191,189);else{const o=i,a=t.charCodeAt(++r);i=65536|(o&1023)<<10|a&1023,e.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|i&63)}else(i&64512)===56320?e.push(239,191,189):e.push(224|i>>12,128|i>>6&63,128|i&63)}return new Uint8Array(e)}function K6(t){let e;try{e=decodeURIComponent(t)}catch{throw Xl(Pr.DATA_URL,"Malformed data URL.")}return fR(e)}function pR(t,e){switch(t){case Pr.BASE64:{const s=e.indexOf("-")!==-1,o=e.indexOf("_")!==-1;if(s||o)throw Xl(t,"Invalid character '"+(s?"-":"_")+"' found: is it base64url encoded?");break}case Pr.BASE64URL:{const s=e.indexOf("+")!==-1,o=e.indexOf("/")!==-1;if(s||o)throw Xl(t,"Invalid character '"+(s?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/");break}}let r;try{r=H6(e)}catch{throw Xl(t,"Invalid character found")}const i=new Uint8Array(r.length);for(let s=0;s<r.length;s++)i[s]=r.charCodeAt(s);return i}class gR{constructor(e){this.base64=!1,this.contentType=null;const r=e.match(/^data:([^,]+)?,/);if(r===null)throw Xl(Pr.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");const i=r[1]||null;i!=null&&(this.base64=Q6(i,";base64"),this.contentType=this.base64?i.substring(0,i.length-7):i),this.rest=e.substring(e.indexOf(",")+1)}}function Y6(t){const e=new gR(t);return e.base64?pR(Pr.BASE64,e.rest):K6(e.rest)}function X6(t){return new gR(t).contentType}function Q6(t,e){return t.length>=e.length?t.substring(t.length-e.length)===e:!1}/** 3156 * @license 3157 * Copyright 2017 Google LLC 3158 * 3159 * Licensed under the Apache License, Version 2.0 (the "License");
3160 * you may not use this file except in compliance with the License. 3161 * You may obtain a copy of the License at 3162 * 3163 * http://www.apache.org/licenses/LICENSE-2.0 3164 * 3165 * Unless required by applicable law or agreed to in writing, software 3166 * distributed under the License is distributed on an "AS IS" BASIS, 3167 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3168 * See the License for the specific language governing permissions and 3169 * limitations under the License. 3170 */class ki{constructor(e,r){let i=0,s="";pC(e)?(this.data_=e,i=e.size,s=e.type):e instanceof ArrayBuffer?(r?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),i=this.data_.length):e instanceof Uint8Array&&(r?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),i=e.length),this.size_=i,this.type_=s}size(){return this.size_}type(){return this.type_}slice(e,r){if(pC(this.data_)){const i=this.data_,s=G6(i,e,r);return s===null?null:new ki(s)}else{const i=new Uint8Array(this.data_.buffer,e,r-e);return new ki(i,!0)}}static getBlob(...e){if(p1()){const r=e.map(i=>i instanceof ki?i.data_:i);return new ki(W6.apply(null,r))}else{const r=e.map(a=>f1(a)?q6(Pr.RAW,a).data:a.data_);let i=0;r.forEach(a=>{i+=a.byteLength});const s=new Uint8Array(i);let o=0;return r.forEach(a=>{for(let l=0;l<a.length;l++)s[o++]=a[l]}),new ki(s,!0)}}uploadData(){return this.data_}}/** 3171 * @license 3172 * Copyright 2017 Google LLC 3173 * 3174 * Licensed under the Apache License, Version 2.0 (the "License"); 3175 * you may not use this file except in compliance with the License. 3176 * You may obtain a copy of the License at 3177 * 3178 * http://www.apache.org/licenses/LICENSE-2.0 3179 * 3180 * Unless required by applicable law or agreed to in writing, software 3181 * distributed under the License is distributed on an "AS IS" BASIS, 3182 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3183 * See the License for the specific language governing permissions and 3184 * limitations under the License. 3185 */function mR(t){let e;try{e=JSON.parse(t)}catch{return null}return $6(e)?e:null}/** 3186 * @license 3187 * Copyright 2017 Google LLC 3188 * 3189 * Licensed under the Apache License, Version 2.0 (the "License"); 3190 * you may not use this file except in compliance with the License. 3191 * You may obtain a copy of the License at 3192 * 3193 * http://www.apache.org/licenses/LICENSE-2.0 3194 * 3195 * Unless required by applicable law or agreed to in writing, software 3196 * distributed under the License is distributed on an "AS IS" BASIS, 3197 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3198 * See the License for the specific language governing permissions and 3199 * limitations under the License. 3200 */function J6(t){if(t.length===0)return null;const e=t.lastIndexOf("/");return e===-1?"":t.slice(0,e)}function Z6(t,e){const r=e.split("/").filter(i=>i.length>0).join("/");return t.length===0?r:t+"/"+r}function yR(t){const e=t.lastIndexOf("/",t.length-2);return e===-1?t:t.slice(e+1)}/** 3201 * @license 3202 * Copyright 2017 Google LLC 3203 * 3204 * Licensed under the Apache License, Version 2.0 (the "License"); 3205 * you may not use this file except in compliance with the License. 3206 * You may obtain a copy of the License at 3207 * 3208 * http://www.apache.org/licenses/LICENSE-2.0 3209 * 3210 * Unless required by applicable law or agreed to in writing, software 3211 * distributed under the License is distributed on an "AS IS" BASIS, 3212 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3213 * See the License for the specific language governing permissions and 3214 * limitations under the License. 3215 */function ej(t,e){return e}class wn{constructor(e,r,i,s){this.server=e,this.local=r||e,this.writable=!!i,this.xform=s||ej}}let Jc=null;function tj(t){return!f1(t)||t.length<2?t:yR(t)}function vR(){if(Jc)return Jc;const t=[];t.push(new wn("bucket")),t.push(new wn("generation")),t.push(new wn("metageneration")),t.push(new wn("name","fullPath",!0));function e(o,a){return tj(a)}const r=new wn("name");r.xform=e,t.push(r);function i(o,a){return a!==void 0?Number(a):a}const s=new wn("size");return s.xform=i,t.push(s),t.push(new wn("timeCreated")),t.push(new wn("updated")),t.push(new wn("md5Hash",null,!0)),t.push(new wn("cacheControl",null,!0)),t.push(new wn("contentDisposition",null,!0)),t.push(new wn("contentEncoding",null,!0)),t.push(new wn("contentLanguage",null,!0)),t.push(new wn("contentType",null,!0)),t.push(new wn("metadata","customMetadata",!0)),Jc=t,Jc}function nj(t,e){function r(){const i=t.bucket,s=t.fullPath,o=new Gn(i,s);return e._makeStorageReference(o)}Object.defineProperty(t,"ref",{get:r})}function rj(t,e,r){const i={};i.type="file";const s=r.length;for(let o=0;o<s;o++){const a=r[o];i[a.local]=a.xform(i,e[a.server])}return nj(i,t),i}function bR(t,e,r){const i=mR(e);return i===null?null:rj(t,i,r)}function ij(t,e,r,i){const s=mR(e);if(s===null||!f1(s.downloadTokens))return null;const o=s.downloadTokens;if(o.length===0)return null;const a=encodeURIComponent;return o.split(",").map(d=>
vendor: 1,825 bytes, lines 3215-3230
3215{const f=t.bucket,g=t.fullPath,v="/b/"+a(f)+"/o/"+a(g),_=g1(v,r,i),w=hR({alt:"media",token:d});return _+w})[0]}function sj(t,e){const r={},i=e.length;for(let s=0;s<i;s++){const o=e[s];o.writable&&(r[o.server]=t[o.local])}return JSON.stringify(r)}class wR{constructor(e,r,i,s){this.url=e,this.method=r,this.handler=i,this.timeout=s,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}}/** 3216 * @license 3217 * Copyright 2017 Google LLC 3218 * 3219 * Licensed under the Apache License, Version 2.0 (the "License"); 3220 * you may not use this file except in compliance with the License. 3221 * You may obtain a copy of the License at 3222 * 3223 * http://www.apache.org/licenses/LICENSE-2.0 3224 * 3225 * Unless required by applicable law or agreed to in writing, software 3226 * distributed under the License is distributed on an "AS IS" BASIS, 3227 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3228 * See the License for the specific language governing permissions and 3229 * limitations under the License. 3230 */function SR(t){if(!t)throw h1()}function oj(t,e){function r(i,s){const o=bR(t,s,e);return SR(o!==null),o}return r}function aj(t,e){function r(i,s){const o=bR(t,s,e);return SR(o!==null),ij(o,s,t.host,t._protocol)}return r}function CR(t){function e(r,i){let s;return r.getStatus()===401?r.getErrorText().includes("Firebase App Check token is invalid")?s=C6():s=S6():r.getStatus()===402?s=w6(t.bucket):r.getStatus()===403?s=x6(t.path):s=i,s.serverResponse=i.serverResponse,s}return e}function lj(t){const e=CR(t);function r(i,s){let o=e(i,s);return i.getStatus()===404&&(o=b6(t.path)),o.serverResponse=s.serverResponse,o}return r}function uj(t,e,r){const i=e.fullServerUrl(),s=g1(i,t.host,t._protocol),o="GET",a=t.maxOperationRetryTime,l=ne
3230w wR(s,o,aj(t,r),a);return l.errorHandler=lj(e),l}function cj(t,e){return t&&t.contentType||e&&e.type()||"application/octet-stream"}function dj(t,e,r){const i=Object.assign({},r);return i.fullPath=t.path,i.size=e.size(),i.contentType||(i.contentType=cj(null,e)),i}function hj(t,e,r,i,s){const o=e.bucketOnlyServerUrl(),a={"X-Goog-Upload-Protocol":"multipart"};function l(){let R="";for(let E=0;E<2;E++)R=R+Math.random().toString().slice(2);return R}const c=l();a["Content-Type"]="multipart/related; boundary="+c;const d=dj(e,i,s),f=sj(d,r),g="--"+c+`\r 3231Content-Type: application/json; charset=utf-8\r 3232\r 3233`+f+`\r 3234--`+c+`\r 3235Content-Type: `+d.contentType+`\r 3236\r 3237`,v=`\r 3238--`+c+"--",_=ki.getBlob(g,i,v);if(_===null)throw R6();const w={name:d.fullPath},k=g1(o,t.host,t._protocol),y="POST",b=t.maxUploadRetryTime,x=new wR(k,y,oj(t,r),b);return x.urlParams=w,x.headers=a,x.body=_.uploadData(),x.errorHandler=CR(e),x}class fj{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=Us.NO_ERROR,this.sendPromise_=new Promise(e=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=Us.ABORT,e()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=Us.NETWORK_ERROR,e()}),this.xhr_.addEventListener("load",()=>{e()})})}send(e,r,i,s){if(this.sent_)throw ll("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(r,e,!0),s!==void 0)for(const o in s)s.hasOwnProperty(o)&&this.xhr_.setRequestHeader(o,s[o].toString());return i!==void 0?this.xhr_.send(i):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw ll("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw ll("cannot .getStatus() before sending");try{return this.xhr_.status}catch{return-1}}getResponse(){if(!this.sent_)throw ll("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw ll("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.removeEventListener("progress",e)}}class pj extends fj{initXhr(){this.xhr_.responseType="text"}}function xR(){return new pj}/** 3239 * @license 3240 * Copyright 2019 Google LLC 3241 * 3242 * Licensed under the Apache License, Version 2.0 (the "License"); 3243 * you may not use this file except in compliance with the License. 3244 * You may obtain a copy of the License at 3245 * 3246 * http://www.apache.org/licenses/LICENSE-2.0 3247 * 3248 * Unless required by applicable law or agreed to in writing, software 3249 * distributed under the License is distributed on an "AS IS" BASIS, 3250 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3251 * See the License for the specific language governing permissions and 3252 * limitations under the License. 3253 */class eo{constructor(e,r){this._service=e,r instanceof Gn?this._location=r:this._location=Gn.makeFromUrl(r,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,r){return new eo(e,r)}get root(){const e=new Gn(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return yR(this._location.path)}get storage(){return this._service}get parent(){const e=J6(this._location.path);if(e===null)return null;const r=new Gn(this._location.bucket,e);return new eo(this._service,r)}_throwIfRoot(e){if(this._location.path==="")throw A6(e)}}function gj(t,e,r){t._throwIfRoot("uploadBytes");const i=hj(t.storage,t._location,vR(),new ki(e,!0),r);return t.storage.makeRequestWithTokens(i,xR).then(s=>({metadata:s,ref:t}))}function mj(t){t._throwIfRoot("getDownloadURL");const e=uj(t.storage,t._location,vR());return t.storage.makeRequestWithTokens(e,xR).then(r=>{if(r===null)throw P6();return r})}function yj(t,e){const r=Z6(t._location.path,e),i=new Gn(t._location.bucket,r);return new eo(t.storage,i)}/** 3254 * @license 3255 * Copyright 2017 Google LLC 3256 * 3257 * Licensed under the Apache License, Version 2.0 (the "License");
3258 * you may not use this file except in compliance with the License. 3259 * You may obtain a copy of the License at 3260 * 3261 * http://www.apache.org/licenses/LICENSE-2.0 3262 * 3263 * Unless required by applicable law or agreed to in writing, software 3264 * distributed under the License is distributed on an "AS IS" BASIS, 3265 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3266 * See the License for the specific language governing permissions and 3267 * limitations under the License. 3268 */function vj(t){return/^[A-Za-z]+:\/\//.test(t)}function bj(t,e){return new eo(t,e)}function _R(t,e){if(t instanceof m1){const r=t;if(r._bucket==null)throw I6();const i=new eo(r,r._bucket);return e!=null?_R(i,e):i}else return e!==void 0?yj(t,e):t}function wj(t,e){if(e&&vj(e)){if(t instanceof m1)return bj(t,e);throw hy("To use ref(service, url), the first argument must be a Storage instance.")}else return _R(t,e)}function mC(t,e){const r=e==null?void 0:e[cR];return r==null?null:Gn.makeFromBucketSpec(r,t)}class m1{constructor(e,r,i,s,o){this.app=e,this._authProvider=r,this._appCheckProvider=i,this._url=s,this._firebaseVersion=o,this._bucket=null,this._host=uR,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=y6,this._maxUploadRetryTime=v6,this._requests=new Set,s!=null?this._bucket=Gn.makeFromBucketSpec(s,this._host):this._bucket=mC(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,this._url!=null?this._bucket=Gn.makeFromBucketSpec(this._url,e):this._bucket=mC(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){gC("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){gC("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;const e=this._authProvider.getImmediate({optional:!0});if(e){const r=await e.getToken();if(r!==null)return r.accessToken}return null}async _getAppCheckToken(){const e=this._appCheckProvider.getImmediate({optional:!0});return e?(await e.getToken()).token:null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(e=>e.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new eo(this,e)}_makeRequest(e,r,i,s){if(this._deleted)return new O6(dR());{const o=z6(e,this._appId,i,s,r,this._firebaseVersion);return this._requests.add(o),o.getPromise().then(()=>this._requests.delete(o),()=>this._requests.delete(o)),o}}async makeRequestWithTokens(e,r){const[i,s]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(e,r,i,s).getPromise()}}const yC="@firebase/storage",vC="0.9.9";/** 3269 * @license 3270 * Copyright 2020 Google LLC 3271 * 3272 * Licensed under the Apache License, Version 2.0 (the "License"); 3273 * you may not use this file except in compliance with the License. 3274 * You may obtain a copy of the License at 3275 * 3276 * http://www.apache.org/licenses/LICENSE-2.0 3277 * 3278 * Unless required by applicable law or agreed to in writing, software 3279 * distributed under the License is distributed on an "AS IS" BASIS, 3280 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 3281 * See the License for the specific language governing permissions and 3282 * limitations under the License. 3283 */const ER="storage";function Sj(t,e,r){return t=ot(t),gj(t,e,r)}function kR(t){return t=ot(t),mj(t)}function fy(t,e){return t=ot(t),wj(t,e)}function Cj(t=i0(),e){return t=ot(t),vf(t,ER).getImmediate({identifier:e})}function xj(t,{instanceIdentifier:e}){const r=t.getProvider("app").getImmediate(),i=t.getProvider("auth-internal"),s=t.getProvider("app-check-internal");return new m1(r,i,s,e,Ea)}function _j(){qs(new Qi(ER,xj,"PUBLIC").setMultipleInstances(!0)),Mr(yC,vC,""),Mr(yC,vC,"esm2017")}_j();const Ej={apiKey:"AIzaSyBq-Ov5Kv5q8-qmNDGrG_rex2kErHPMryA",authDomain:"portfolio-826d0.firebaseapp.com",projectId:"portfolio-826d0",storageBucket:"portfolio-826d0.appspot.com",messagingSenderId:"664919029525",appId:"1:664919029525:web:6cbd1df8df20188234db1c"},y1=KL(Ej),Id=GB(y1),Zr=aF(y1),py=Cj(y1),TR=P.createContext(),kj=(t,e)=>{switch(e.type){case"LOGIN":return{...t,user:e.payload};case"LOGOUT":return{...t,user:null};case"AUTH_IS_READY":return{...t,user:e.payload,authIsReady:!0};default:return t}},Tj=({children:t})=>{const[e,r]=P.useReducer(kj,{user:null,authIsReady:!1});return P.useEffect(()=>{const i=Zr.onAuthStateChanged(s=>{r({type:"AUTH_IS_READY",payload:s}),i()})},[]),$(TR.Provider,{value:{...e,dispatch:r},children:t})},ci=()=>{const t=P.useContext(TR);if(!t)throw Error("useAuthContext must be inside an AuthContextProvider");return t},IR=()=>{const[t,e]=P.useState(!0);return{openLoading:t,setOpenLoading:e}};function _h(t){return typeof t=="string"}function Ij(t,e,r){return t===void 0||_h(t)?e:M({},e,{ownerState:M({},e.ownerState,r)})}function Rj(t,e=[]){if(t===void 0)return{};const r={};return Object.keys(t).filter(i=>i.match(/^on[A-Z]/)&&typeof t[i]=="function"&&!e.includes(i)).forEac
3283h(i=>{r[i]=t[i]}),r}function gy(t,e){return typeof t=="function"?t(e):t}function bC(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(r=>!(r.match(/^on[A-Z]/)&&typeof t[r]=="function")).forEach(r=>{e[r]=t[r]}),e}function Pj(t){const{getSlotProps:e,additionalProps:r,externalSlotProps:i,externalForwardedProps:s,className:o}=t;if(!e){const _=Se(s==null?void 0:s.className,i==null?void 0:i.className,o,r==null?void 0:r.className),w=M({},r==null?void 0:r.style,s==null?void 0:s.style,i==null?void 0:i.style),k=M({},r,s,i);return _.length>0&&(k.className=_),Object.keys(w).length>0&&(k.style=w),{props:k,internalRef:void 0}}const a=Rj(M({},s,i)),l=bC(i),c=bC(s),d=e(a),f=Se(d==null?void 0:d.className,r==null?void 0:r.className,o,s==null?void 0:s.className,i==null?void 0:i.className),g=M({},d==null?void 0:d.style,r==null?void 0:r.style,s==null?void 0:s.style,i==null?void 0:i.style),v=M({},d,r,c,l);return f.length>0&&(v.className=f),Object.keys(g).length>0&&(v.style=g),{props:v,internalRef:d.ref}}const Aj=["elementType","externalSlotProps","ownerState"];function wC(t){var e;const{elementType:r,externalSlotProps:i,ownerState:s}=t,o=pe(t,Aj),a=gy(i,s),{props:l,internalRef:c}=Pj(M({},o,{externalSlotProps:a})),d=nn(c,a==null?void 0:a.ref,(e=t.additionalProps)==null?void 0:e.ref);return Ij(r,M({},l,{ref:d}),s)}function SC(t){return t.substring(2).toLowerCase()}function Oj(t,e){return e.documentElement.clientWidth<t.clientX||e.documentElement.clientHeight<t.clientY}function Dj(t){const{children:e,disableReactTree:r=!1,mouseEvent:i="onClick",onClickAway:s,touchEvent:o="onTouchEnd"}=t,a=P.useRef(!1),l=P.useRef(null),c=P.useRef(!1),d=P.useRef(!1);P.useEffect(()=>(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);const f=nn(e.ref,l),g=Rr(w=>{const k=d.current;d.current=!1;const y=Jt(l.current);if(!c.current||!l.current||"clientX"in w&&Oj(w,y))return;if(a.current){a.current=!1;return}let b;w.composedPath?b=w.composedPath().indexOf(l.current)>-1:b=!y.documentElement.contains(w.target)||l.current.contains(w.target),!b&&(r||!k)&&s(w)}),v=w=>k=>{d.current=!0;const y=e.props[w];y&&y(k)},_={ref:f};return o!==!1&&(_[o]=v(o)),P.useEffect(()=>{if(o!==!1){const w=SC(o),k=Jt(l.current),y=()=>{a.current=!0};return k.addEventListener(w,g),k.addEventListener("touchmove",y),()=>{k.removeEventListener(w,g),k.removeEventListener("touchmove",y)}}},[g,o]),i!==!1&&(_[i]=v(i)),P.useEffect(()=>{if(i!==!1){const w=SC(i),k=Jt(l.current);return k.addEventListener(w,g),()=>{k.removeEventListener(w,g)}}},[g,i]),$(P.Fragment,{children:P.cloneElement(e,_)})}const Mj=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Nj(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function $j(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=i=>t.ownerDocument.querySelector(`input[type="radio"]${i}`);let r=e(`[name="${t.name}"]:checked`);return r||(r=e(`[name="${t.name}"]`)),r!==t}function Lj(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||$j(t))}function Fj(t){const e=[],r=[];return Array.from(t.querySelectorAll(Mj)).forEach((i,s)=>{const o=Nj(i);o===-1||!Lj(i)||(o===0?e.push(i):r.push({documentOrder:s,tabIndex:o,node:i}))}),r.sort((i,s)=>i.tabIndex===s.tabIndex?i.documentOrder-s.documentOrder:i.tabIndex-s.tabIndex).map(i=>i.node).concat(e)}function Uj(){return!0}function Bj(t){const{children:e,disableAutoFocus:r=!1,disableEnforceFocus:i=!1,disableRestoreFocus:s=!1,getTabbable:o=Fj,isEnabled:a=Uj,open:l}=t,c=P.useRef(!1),d=P.useRef(null),f=P.useRef(null),g=P.useRef(null),v=P.useRef(null),_=P.useRef(!1),w=P.useRef(null),k=nn(e.ref,w),y=P.useRef(null);P.useEffect(()=>{!l||!w.current||(_.current=!r)},[r,l]),P.useEffect(()=>{if(!l||!w.current)return;const R=Jt(w.current);return w.current.contains(R.activeElement)||(w.current.hasAttribute("tabIndex")||w.current.setAttribute("tabIndex","-1"),_.current&&w.current.focus()),()=>{s||(g.current&&g.current.focus&&(c.current=!0,g.current.focus()),g.current=null)}},[l]),P.useEffect(()=>{if(!l||!w.current)return;const R=Jt(w.current),E=A=>{const{current:U}=w;if(U!==null){if(!R.hasFocus()||i||!a()||c.current){c.current=!1;return}if(!U.contains(R.activeElement)){if(A&&v.current!==A.target||R.activeElement!==v.current)v.current=null;else if(v.current!==null)return;if(!_.current)return;let V=[];if((R.activeElement===d.current||R.activeElement===f.current)&&(V=o(w.current)),V.length>0){var B,z;const j=Boolean(((B=y.current)==null?void 0:B.shiftKey)&&((z=y.current)==null?void 0:z.key)==="Tab"),N=V[0],G=V[V.length-1];
3283typeof N!="string"&&typeof G!="string"&&(j?G.focus():N.focus())}else U.focus()}}},C=A=>{y.current=A,!(i||!a()||A.key!=="Tab")&&R.activeElement===w.current&&A.shiftKey&&(c.current=!0,f.current&&f.current.focus())};R.addEventListener("focusin",E),R.addEventListener("keydown",C,!0);const D=setInterval(()=>{R.activeElement&&R.activeElement.tagName==="BODY"&&E(null)},50);return()=>{clearInterval(D),R.removeEventListener("focusin",E),R.removeEventListener("keydown",C,!0)}},[r,i,s,a,l,o]);const b=R=>{g.current===null&&(g.current=R.relatedTarget),_.current=!0,v.current=R.target;const E=e.props.onFocus;E&&E(R)},x=R=>{g.current===null&&(g.current=R.relatedTarget),_.current=!0};return be(P.Fragment,{children:[$("div",{tabIndex:l?0:-1,onFocus:x,ref:d,"data-testid":"sentinelStart"}),P.cloneElement(e,{ref:k,onFocus:b}),$("div",{tabIndex:l?0:-1,onFocus:x,ref:f,"data-testid":"sentinelEnd"})]})}function jj(t){return typeof t=="function"?t():t}const zj=P.forwardRef(function(e,r){const{children:i,container:s,disablePortal:o=!1}=e,[a,l]=P.useState(null),c=nn(P.isValidElement(i)?i.ref:null,r);return Lr(()=>{o||l(jj(s)||document.body)},[s,o]),Lr(()=>{if(a&&!o)return th(r,a),()=>{th(r,null)}},[r,a,o]),o?P.isValidElement(i)?P.cloneElement(i,{ref:c}):i:$(P.Fragment,{children:a&&nu.createPortal(i,a)})}),Vj=zj;function Wj(t){const e=Jt(t);return e.body===t?Xi(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function Ql(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function CC(t){return parseInt(Xi(t).getComputedStyle(t).paddingRight,10)||0}function Gj(t){const r=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,i=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return r||i}function xC(t,e,r,i,s){const o=[e,r,...i];[].forEach.call(t.children,a=>{const l=o.indexOf(a)===-1,c=!Gj(a);l&&c&&Ql(a,s)})}function bg(t,e){let r=-1;return t.some((i,s)=>e(i)?(r=s,!0):!1),r}function Hj(t,e){const r=[],i=t.container;if(!e.disableScrollLock){if(Wj(i)){const a=ME(Jt(i));r.push({value:i.style.paddingRight,property:"padding-right",el:i}),i.style.paddingRight=`${CC(i)+a}px`;const l=Jt(i).querySelectorAll(".mui-fixed");[].forEach.call(l,c=>{r.push({value:c.style.paddingRight,property:"padding-right",el:c}),c.style.paddingRight=`${CC(c)+a}px`})}let o;if(i.parentNode instanceof DocumentFragment)o=Jt(i).body;else{const a=i.parentElement,l=Xi(i);o=(a==null?void 0:a.nodeName)==="HTML"&&l.getComputedStyle(a).overflowY==="scroll"?a:i}r.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{r.forEach(({value:o,el:a,property:l})=>{o?a.style.setProperty(l,o):a.style.removeProperty(l)})}}function qj(t){const e=[];return[].forEach.call(t.children,r=>{r.getAttribute("aria-hidden")==="true"&&e.push(r)}),e}class Kj{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,r){let i=this.modals.indexOf(e);if(i!==-1)return i;i=this.modals.length,this.modals.push(e),e.modalRef&&Ql(e.modalRef,!1);const s=qj(r);xC(r,e.mount,e.modalRef,s,!0);const o=bg(this.containers,a=>a.container===r);return o!==-1?(this.containers[o].modals.push(e),i):(this.containers.push({modals:[e],container:r,restore:null,hiddenSiblings:s}),i)}mount(e,r){const i=bg(this.containers,o=>o.modals.indexOf(e)!==-1),s=this.containers[i];s.restore||(s.restore=Hj(s,r))}remove(e,r=!0){const i=this.modals.indexOf(e);if(i===-1)return i;const s=bg(this.containers,a=>a.modals.indexOf(e)!==-1),o=this.containers[s];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(i,1),o.modals.length===0)o.restore&&o.restore(),e.modalRef&&Ql(e.modalRef,r),xC(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(s,1);else{const a=o.modals[o.modals.length-1];a.modalRef&&Ql(a.modalRef,!1)}return i}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}function Yj(t){return Ae("MuiModal",t)}Re("MuiModal",["root","hidden"]);const Xj=["children","classes","closeAfterTransition","component","container","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onKeyDown","open","onTransitionEnter","onTransitionExited","slotProps","
3283slots"],Qj=t=>{const{open:e,exited:r,classes:i}=t;return Me({root:["root",!e&&r&&"hidden"],backdrop:["backdrop"]},Yj,i)};function Jj(t){return typeof t=="function"?t():t}function Zj(t){return t?t.props.hasOwnProperty("in"):!1}const ez=new Kj,tz=P.forwardRef(function(e,r){var i,s;const{children:o,classes:a,closeAfterTransition:l=!1,component:c,container:d,disableAutoFocus:f=!1,disableEnforceFocus:g=!1,disableEscapeKeyDown:v=!1,disablePortal:_=!1,disableRestoreFocus:w=!1,disableScrollLock:k=!1,hideBackdrop:y=!1,keepMounted:b=!1,manager:x=ez,onBackdropClick:R,onClose:E,onKeyDown:C,open:D,onTransitionEnter:A,onTransitionExited:U,slotProps:B={},slots:z={}}=e,V=pe(e,Xj),[j,N]=P.useState(!D),G=P.useRef({}),W=P.useRef(null),q=P.useRef(null),X=nn(q,r),J=Zj(o),Z=(i=e["aria-hidden"])!=null?i:!0,re=()=>Jt(W.current),K=()=>(G.current.modalRef=q.current,G.current.mountNode=W.current,G.current),ne=()=>{x.mount(K(),{disableScrollLock:k}),q.current&&(q.current.scrollTop=0)},ee=Rr(()=>{const gt=Jj(d)||re().body;x.add(K(),gt),q.current&&ne()}),ce=P.useCallback(()=>x.isTopModal(K()),[x]),ye=Rr(gt=>{W.current=gt,!(!gt||!q.current)&&(D&&ce()?ne():Ql(q.current,Z))}),_e=P.useCallback(()=>{x.remove(K(),Z)},[x,Z]);P.useEffect(()=>()=>{_e()},[_e]),P.useEffect(()=>{D?ee():(!J||!l)&&_e()},[D,_e,J,l,ee]);const Oe=M({},e,{classes:a,closeAfterTransition:l,disableAutoFocus:f,disableEnforceFocus:g,disableEscapeKeyDown:v,disablePortal:_,disableRestoreFocus:w,disableScrollLock:k,exited:j,hideBackdrop:y,keepMounted:b}),He=Qj(Oe),we=()=>{N(!1),A&&A()},rt=()=>{N(!0),U&&U(),l&&_e()},Le=gt=>{gt.target===gt.currentTarget&&(R&&R(gt),E&&E(gt,"backdropClick"))},wt=gt=>{C&&C(gt),!(gt.key!=="Escape"||!ce())&&(v||(gt.stopPropagation(),E&&E(gt,"escapeKeyDown")))},Mt={};o.props.tabIndex===void 0&&(Mt.tabIndex="-1"),J&&(Mt.onEnter=Im(we,o.props.onEnter),Mt.onExited=Im(rt,o.props.onExited));const Bn=(s=c??z.root)!=null?s:"div",Tt=wC({elementType:Bn,externalSlotProps:B.root,externalForwardedProps:V,additionalProps:{ref:X,role:"presentation",onKeyDown:wt},className:He.root,ownerState:Oe}),jn=z.backdrop,Qn=wC({elementType:jn,externalSlotProps:B.backdrop,additionalProps:{"aria-hidden":!0,onClick:Le,open:D},className:He.backdrop,ownerState:Oe});return!b&&!D&&(!J||j)?null:$(Vj,{ref:ye,container:d,disablePortal:_,children:be(Bn,M({},Tt,{children:[!y&&jn?$(jn,M({},Qn)):null,$(Bj,{disableEnforceFocus:g,disableAutoFocus:f,disableRestoreFocus:w,isEnabled:ce,open:D,children:P.cloneElement(o,Mt)})]}))})}),nz=tz,rz=["onChange","maxRows","minRows","style","value"];function Zc(t,e){return parseInt(t[e],10)||0}const iz={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function _C(t){return t==null||Object.keys(t).length===0}const sz=P.forwardRef(function(e,r){const{onChange:i,maxRows:s,minRows:o=1,style:a,value:l}=e,c=pe(e,rz),{current:d}=P.useRef(l!=null),f=P.useRef(null),g=nn(r,f),v=P.useRef(null),_=P.useRef(0),[w,k]=P.useState({}),y=P.useCallback(()=>{const C=f.current,A=Xi(C).getComputedStyle(C);if(A.width==="0px")return{};const U=v.current;U.style.width=A.width,U.value=C.value||e.placeholder||"x",U.value.slice(-1)===` 3284`&&(U.value+=" ");const B=A["box-sizing"],z=Zc(A,"padding-bottom")+Zc(A,"padding-top"),V=Zc(A,"border-bottom-width")+Zc(A,"border-top-width"),j=U.scrollHeight;U.value="x";const N=U.scrollHeight;let G=j;o&&(G=Math.max(Number(o)*N,G)),s&&(G=Math.min(Number(s)*N,G)),G=Math.max(G,N);const W=G+(B==="border-box"?z+V:0),q=Math.abs(G-j)<=1;return{outerHeightStyle:W,overflow:q}},[s,o,e.placeholder]),b=(C,D)=>{const{outerHeightStyle:A,overflow:U}=D;return _.current<20&&(A>0&&Math.abs((C.outerHeightStyle||0)-A)>1||C.overflow!==U)?(_.current+=1,{overflow:U,outerHeightStyle:A}):C},x=P.useCallback(()=>{const C=y();_C(C)||k(D=>b(D,C))},[y]),R=()=>{const C=y();_C(C)||nu.flushSync(()=>{k(D=>b(D,C))})};P.useEffect(()=>{const C=Nv(()=>{_.current=0,f.current&&R()}),D=Xi(f.current);D.addEventListener("resize",C);let A;return typeof ResizeObserver<"u"&&(A=new ResizeObserver(C),A.observe(f.current)),()=>{C.clear(),D.removeEventListener("resize",C),A&&A.disconnect()}}),Lr(()=>{x()}),P.useEffect(()=>{_.current=0},[l]);const E=C=>{_.current=0,d||x(),i&&i(C)};
vendor: 4,243 bytes, line 3284
3284return be(P.Fragment,{children:[$("textarea",M({value:l,onChange:E,ref:g,rows:o,style:M({height:w.outerHeightStyle,overflow:w.overflow?"hidden":null},a)},c)),$("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:v,tabIndex:-1,style:M({},iz.shadow,a,{padding:0})})]})}),oz=sz;function my(t,e){return my=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,s){return i.__proto__=s,i},my(t,e)}function Yf(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,my(t,e)}const EC={disabled:!1},Eh=yr.createContext(null);var az=function(e){return e.scrollTop},Tl="unmounted",bs="exited",ws="entering",_o="entered",yy="exiting",di=function(t){Yf(e,t);function e(i,s){var o;o=t.call(this,i,s)||this;var a=s,l=a&&!a.isMounting?i.enter:i.appear,c;return o.appearStatus=null,i.in?l?(c=bs,o.appearStatus=ws):c=_o:i.unmountOnExit||i.mountOnEnter?c=Tl:c=bs,o.state={status:c},o.nextCallback=null,o}e.getDerivedStateFromProps=function(s,o){var a=s.in;return a&&o.status===Tl?{status:bs}:null};var r=e.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(s){var o=null;if(s!==this.props){var a=this.state.status;this.props.in?a!==ws&&a!==_o&&(o=ws):(a===ws||a===_o)&&(o=yy)}this.updateStatus(!1,o)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var s=this.props.timeout,o,a,l;return o=a=l=s,s!=null&&typeof s!="number"&&(o=s.exit,a=s.enter,l=s.appear!==void 0?s.appear:a),{exit:o,enter:a,appear:l}},r.updateStatus=function(s,o){if(s===void 0&&(s=!1),o!==null)if(this.cancelNextCallback(),o===ws){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:wl.findDOMNode(this);a&&az(a)}this.performEnter(s)}else this.performExit();else this.props.unmountOnExit&&this.state.status===bs&&this.setState({status:Tl})},r.performEnter=function(s){var o=this,a=this.props.enter,l=this.context?this.context.isMounting:s,c=this.props.nodeRef?[l]:[wl.findDOMNode(this),l],d=c[0],f=c[1],g=this.getTimeouts(),v=l?g.appear:g.enter;if(!s&&!a||EC.disabled){this.safeSetState({status:_o},function(){o.props.onEntered(d)});return}this.props.onEnter(d,f),this.safeSetState({status:ws},function(){o.props.onEntering(d,f),o.onTransitionEnd(v,function(){o.safeSetState({status:_o},function(){o.props.onEntered(d,f)})})})},r.performExit=function(){var s=this,o=this.props.exit,a=this.getTimeouts(),l=this.props.nodeRef?void 0:wl.findDOMNode(this);if(!o||EC.disabled){this.safeSetState({status:bs},function(){s.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:yy},function(){s.props.onExiting(l),s.onTransitionEnd(a.exit,function(){s.safeSetState({status:bs},function(){s.props.onExited(l)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(s,o){o=this.setNextCallback(o),this.setState(s,o)},r.setNextCallback=function(s){var o=this,a=!0;return this.nextCallback=function(l){a&&(a=!1,o.nextCallback=null,s(l))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},r.onTransitionEnd=function(s,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:wl.findDOMNode(this),l=s==null&&!this.props.addEndListener;if(!a||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],d=c[0],f=c[1];this.props.addEndListener(d,f)}s!=null&&setTimeout(this.nextCallback,s)},r.render=function(){var s=this.state.status;if(s===Tl)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var l=pe(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return yr.createElement(Eh.Provider,{value:null},typeof a=="function"?a(s,l):yr.cloneElement(yr.Children.only(a),l))},e}(yr.Component);di.contextType=Eh;di.propTypes={};function bo(){}di.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter
vendor: 5,634 bytes, lines 3284-3357
3284:!0,exit:!0,onEnter:bo,onEntering:bo,onEntered:bo,onExit:bo,onExiting:bo,onExited:bo};di.UNMOUNTED=Tl;di.EXITED=bs;di.ENTERING=ws;di.ENTERED=_o;di.EXITING=yy;const RR=di;function vy(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v1(t,e){var r=function(o){return e&&P.isValidElement(o)?e(o):o},i=Object.create(null);return t&&P.Children.map(t,function(s){return s}).forEach(function(s){i[s.key]=r(s)}),i}function lz(t,e){t=t||{},e=e||{};function r(f){return f in e?e[f]:t[f]}var i=Object.create(null),s=[];for(var o in t)o in e?s.length&&(i[o]=s,s=[]):s.push(o);var a,l={};for(var c in e){if(i[c])for(a=0;a<i[c].length;a++){var d=i[c][a];l[i[c][a]]=r(d)}l[c]=r(c)}for(a=0;a<s.length;a++)l[s[a]]=r(s[a]);return l}function Os(t,e,r){return r[e]!=null?r[e]:t.props[e]}function uz(t,e){return v1(t.children,function(r){return P.cloneElement(r,{onExited:e.bind(null,r),in:!0,appear:Os(r,"appear",t),enter:Os(r,"enter",t),exit:Os(r,"exit",t)})})}function cz(t,e,r){var i=v1(t.children),s=lz(e,i);return Object.keys(s).forEach(function(o){var a=s[o];if(P.isValidElement(a)){var l=o in e,c=o in i,d=e[o],f=P.isValidElement(d)&&!d.props.in;c&&(!l||f)?s[o]=P.cloneElement(a,{onExited:r.bind(null,a),in:!0,exit:Os(a,"exit",t),enter:Os(a,"enter",t)}):!c&&l&&!f?s[o]=P.cloneElement(a,{in:!1}):c&&l&&P.isValidElement(d)&&(s[o]=P.cloneElement(a,{onExited:r.bind(null,a),in:d.props.in,exit:Os(a,"exit",t),enter:Os(a,"enter",t)}))}}),s}var dz=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},hz={component:"div",childFactory:function(e){return e}},b1=function(t){Yf(e,t);function e(i,s){var o;o=t.call(this,i,s)||this;var a=o.handleExited.bind(vy(o));return o.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},o}var r=e.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(s,o){var a=o.children,l=o.handleExited,c=o.firstRender;return{children:c?uz(s,l):cz(s,a,l),firstRender:!1}},r.handleExited=function(s,o){var a=v1(this.props.children);s.key in a||(s.props.onExited&&s.props.onExited(o),this.mounted&&this.setState(function(l){var c=M({},l.children);return delete c[s.key],{children:c}}))},r.render=function(){var s=this.props,o=s.component,a=s.childFactory,l=pe(s,["component","childFactory"]),c=this.state.contextValue,d=dz(this.state.children).map(a);return delete l.appear,delete l.enter,delete l.exit,o===null?yr.createElement(Eh.Provider,{value:c},d):yr.createElement(Eh.Provider,{value:c},yr.createElement(o,l,d))},e}(yr.Component);b1.propTypes={};b1.defaultProps=hz;const fz=b1;function pz(t){const{className:e,classes:r,pulsate:i=!1,rippleX:s,rippleY:o,rippleSize:a,in:l,onExited:c,timeout:d}=t,[f,g]=P.useState(!1),v=Se(e,r.ripple,r.rippleVisible,i&&r.ripplePulsate),_={width:a,height:a,top:-(a/2)+o,left:-(a/2)+s},w=Se(r.child,f&&r.childLeaving,i&&r.childPulsate);return!l&&!f&&g(!0),P.useEffect(()=>{if(!l&&c!=null){const k=setTimeout(c,d);return()=>{clearTimeout(k)}}},[c,l,d]),$("span",{className:v,style:_,children:$("span",{className:w})})}const gz=Re("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Jn=gz,mz=["center","classes","className"];let Xf=t=>t,kC,TC,IC,RC;const by=550,yz=80,vz=os(kC||(kC=Xf` 3285 0% { 3286 transform: scale(0); 3287 opacity: 0.1; 3288 } 3289 3290 100% { 3291 transform: scale(1); 3292 opacity: 0.3; 3293 } 3294`)),bz=os(TC||(TC=Xf` 3295 0% { 3296 opacity: 1; 3297 } 3298 3299 100% { 3300 opacity: 0; 3301 } 3302`)),wz=os(IC||(IC=Xf` 3303 0% { 3304 transform: scale(1); 3305 } 3306 3307 50% { 3308 transform: scale(0.92); 3309 } 3310 3311 100% { 3312 transform: scale(1); 3313 } 3314`)),Sz=fe("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Cz=fe(pz,{name:"MuiTouchRipple",slot:"Ripple"})(RC||(RC=Xf` 3315 opacity: 0; 3316 position: absolute; 3317 3318 &.${0} { 3319 opacity: 0.3; 3320 transform: scale(1); 3321 animation-name: ${0}; 3322 animation-duration: ${0}ms; 3323 animation-timing-function: ${0}; 3324 } 3325 3326 &.${0} { 3327 animation-duration: ${0}ms; 3328 } 3329 3330 & .${0} { 3331 opacity: 1; 3332 display: block; 3333 width: 100%; 3334 height: 100%; 3335 border-radius: 50%; 3336 background-color: currentColor; 3337 } 3338 3339 & .${0} { 3340 opacity: 0; 3341 animation-name: ${0}; 3342 animation-duration: ${0}ms; 3343 animation-timing-function: ${0}; 3344 } 3345 3346 & .${0} { 3347 position: absolute; 3348 /* @noflip */ 3349 left: 0px; 3350 top: 0; 3351 animation-name: ${0}; 3352 animation-duration: 2500ms; 3353 animation-timing-function: ${0}; 3354 animation-iteration-count: infinite; 3355 animation-delay: 200ms; 3356 } 3357`),Jn.rippleVisible,vz,by,({theme:t})=>t.transitions.easing.easeInOut,Jn.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,Jn.child,Jn.childLeaving,bz,by,({theme:t})=>t.transitions.easing.easeInOut,Jn.childPulsate,wz,({theme:t})=>t.transitions.easing.easeInOut),xz=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiTouchRipple"}),{center:s=!1,classes:o={},className:a}=i,l=pe(i,mz),[c,d]=P.useState([]),f=P.useRef(0),g=P.useRef(null);P.useEffect(()=>{g.current&&(g.current(),g.current=null)},[c]);const v=P.useRef(!1),_=P.useRef(null),w=P.useRef(null),k=P.useRef(null);P.useEffect(()=>()=>{clearTimeout(_.current)},[]);const y=P.useCallback(E=>{const{pulsate:C,rippleX:D,rippleY:A,rippleSize:U,cb:B}=E;d(z=>[...z,$(Cz,{classes:{ripple:Se(o.ripple,Jn.ripple),rippleVisible:Se(o.rippleVisible,Jn.rippleVisible),ripplePulsate:Se(o.ripplePulsate,Jn.ripplePulsate),
3357child:Se(o.child,Jn.child),childLeaving:Se(o.childLeaving,Jn.childLeaving),childPulsate:Se(o.childPulsate,Jn.childPulsate)},timeout:by,pulsate:C,rippleX:D,rippleY:A,rippleSize:U},f.current)]),f.current+=1,g.current=B},[o]),b=P.useCallback((E={},C={},D=()=>{})=>{const{pulsate:A=!1,center:U=s||C.pulsate,fakeElement:B=!1}=C;if((E==null?void 0:E.type)==="mousedown"&&v.current){v.current=!1;return}(E==null?void 0:E.type)==="touchstart"&&(v.current=!0);const z=B?null:k.current,V=z?z.getBoundingClientRect():{width:0,height:0,left:0,top:0};let j,N,G;if(U||E===void 0||E.clientX===0&&E.clientY===0||!E.clientX&&!E.touches)j=Math.round(V.width/2),N=Math.round(V.height/2);else{const{clientX:W,clientY:q}=E.touches&&E.touches.length>0?E.touches[0]:E;j=Math.round(W-V.left),N=Math.round(q-V.top)}if(U)G=Math.sqrt((2*V.width**2+V.height**2)/3),G%2===0&&(G+=1);else{const W=Math.max(Math.abs((z?z.clientWidth:0)-j),j)*2+2,q=Math.max(Math.abs((z?z.clientHeight:0)-N),N)*2+2;G=Math.sqrt(W**2+q**2)}E!=null&&E.touches?w.current===null&&(w.current=()=>{y({pulsate:A,rippleX:j,rippleY:N,rippleSize:G,cb:D})},_.current=setTimeout(()=>{w.current&&(w.current(),w.current=null)},yz)):y({pulsate:A,rippleX:j,rippleY:N,rippleSize:G,cb:D})},[s,y]),x=P.useCallback(()=>{b({},{pulsate:!0})},[b]),R=P.useCallback((E,C)=>{if(clearTimeout(_.current),(E==null?void 0:E.type)==="touchend"&&w.current){w.current(),w.current=null,_.current=setTimeout(()=>{R(E,C)});return}w.current=null,d(D=>D.length>0?D.slice(1):D),g.current=C},[]);return P.useImperativeHandle(r,()=>({pulsate:x,start:b,stop:R}),[x,b,R]),$(Sz,M({className:Se(Jn.root,o.root,a),ref:k},l,{children:$(fz,{component:null,exit:!0,children:c})}))}),_z=xz;function Ez(t){return Ae("MuiButtonBase",t)}const kz=Re("MuiButtonBase",["root","disabled","focusVisible"]),Tz=kz,Iz=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Rz=t=>{const{disabled:e,focusVisible:r,focusVisibleClassName:i,classes:s}=t,a=Me({root:["root",e&&"disabled",r&&"focusVisible"]},Ez,s);return r&&i&&(a.root+=` ${i}`),a},Pz=fe("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Tz.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Az=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiButtonBase"}),{action:s,centerRipple:o=!1,children:a,className:l,component:c="button",disabled:d=!1,disableRipple:f=!1,disableTouchRipple:g=!1,focusRipple:v=!1,LinkComponent:_="a",onBlur:w,onClick:k,onContextMenu:y,onDragLeave:b,onFocus:x,onFocusVisible:R,onKeyDown:E,onKeyUp:C,onMouseDown:D,onMouseLeave:A,onMouseUp:U,onTouchEnd:B,onTouchMove:z,onTouchStart:V,tabIndex:j=0,TouchRippleProps:N,touchRippleRef:G,type:W}=i,q=pe(i,Iz),X=P.useRef(null),J=P.useRef(null),Z=nn(J,G),{isFocusVisibleRef:re,onFocus:K,onBlur:ne,ref:ee}=DE(),[ce,ye]=P.useState(!1);d&&ce&&ye(!1),P.useImperativeHandle(s,()=>({focusVisible:()=>{ye(!0),X.current.focus()}}),[]);const[_e,Oe]=P.useState(!1);P.useEffect(()=>{Oe(!0)},[]);const He=_e&&!f&&!d;P.useEffect(()=>{ce&&v&&!f&&_e&&J.current.pulsate()},[f,v,ce,_e]);function we(oe,st,St=g){return Rr(Gt=>(st&&st(Gt),!St&&J.current&&J.current[oe](Gt),!0))}const rt=we("start",D),Le=we("stop",y),wt=we("stop",b),Mt=we("stop",U),Bn=we("stop",oe=>{ce&&oe.preventDefault(),A&&A(oe)}),Tt=we("start",V),jn=we("stop",B),Qn=we("stop",z),gt=we("stop",oe=>{ne(oe),re.current===!1&&ye(!1),w&&w(oe)},!1),me=Rr(oe=>{X.current||(X.current=oe.currentTarget),K(oe),re.current===!0&&(ye(!0),R&&R(oe)),x&&x(oe)}),Be=()=>{const oe=X.current;return c&&c!=="button"&&!(oe.tagName==="A"&&oe.href)}
vendor: 4,932 bytes, line 3357
3357,Ye=P.useRef(!1),Tn=Rr(oe=>{v&&!Ye.current&&ce&&J.current&&oe.key===" "&&(Ye.current=!0,J.current.stop(oe,()=>{J.current.start(oe)})),oe.target===oe.currentTarget&&Be()&&oe.key===" "&&oe.preventDefault(),E&&E(oe),oe.target===oe.currentTarget&&Be()&&oe.key==="Enter"&&!d&&(oe.preventDefault(),k&&k(oe))}),cr=Rr(oe=>{v&&oe.key===" "&&J.current&&ce&&!oe.defaultPrevented&&(Ye.current=!1,J.current.stop(oe,()=>{J.current.pulsate(oe)})),C&&C(oe),k&&oe.target===oe.currentTarget&&Be()&&oe.key===" "&&!oe.defaultPrevented&&k(oe)});let In=c;In==="button"&&(q.href||q.to)&&(In=_);const on={};In==="button"?(on.type=W===void 0?"button":W,on.disabled=d):(!q.href&&!q.to&&(on.role="button"),d&&(on["aria-disabled"]=d));const dr=nn(r,ee,X),zn=M({},i,{centerRipple:o,component:c,disabled:d,disableRipple:f,disableTouchRipple:g,focusRipple:v,tabIndex:j,focusVisible:ce}),qe=Rz(zn);return be(Pz,M({as:In,className:Se(qe.root,l),ownerState:zn,onBlur:gt,onClick:k,onContextMenu:Le,onFocus:me,onKeyDown:Tn,onKeyUp:cr,onMouseDown:rt,onMouseLeave:Bn,onMouseUp:Mt,onDragLeave:wt,onTouchEnd:jn,onTouchMove:Qn,onTouchStart:Tt,ref:dr,tabIndex:d?-1:j,type:W},on,q,{children:[a,He?$(_z,M({ref:Z,center:o},N)):null]}))}),w1=Az;function Oz(t){return Ae("MuiButton",t)}const Dz=Re("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),ed=Dz,Mz=P.createContext({}),Nz=Mz,$z=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],Lz=t=>{const{color:e,disableElevation:r,fullWidth:i,size:s,variant:o,classes:a}=t,l={root:["root",o,`${o}${he(e)}`,`size${he(s)}`,`${o}Size${he(s)}`,e==="inherit"&&"colorInherit",r&&"disableElevation",i&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${he(s)}`],endIcon:["endIcon",`iconSize${he(s)}`]},c=Me(l,Oz,a);return M({},a,c)},PR=t=>M({},t.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},t.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},t.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),Fz=fe(w1,{shouldForwardProp:t=>Br(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],e[`${r.variant}${he(r.color)}`],e[`size${he(r.size)}`],e[`${r.variant}Size${he(r.size)}`],r.color==="inherit"&&e.colorInherit,r.disableElevation&&e.disableElevation,r.fullWidth&&e.fullWidth]}})(({theme:t,ownerState:e})=>{var r,i;return M({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":M({textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:fn(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="text"&&e.color!=="inherit"&&{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:fn(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="outlined"&&e.color!=="inherit"&&{border:`1px solid ${(t.vars||t).palette[e.color].main}`,backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:fn(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="contained"&&{backgroundColor:(t.vars||t).palette.grey.A100,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},e.variant==="contained"&&e.color!=="inherit"&&{backgroundColor:(t.vars||t).palette[e.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[e.color].main}}),"&:active":M({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[8]}),[`&.${ed.focusVisible}`]:M({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${ed.disabled}`]:M({color:(t.vars||t).palette.action.disabled},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.action.disabledBackgroun
3357d}`},e.variant==="outlined"&&e.color==="secondary"&&{border:`1px solid ${(t.vars||t).palette.action.disabled}`},e.variant==="contained"&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},e.variant==="text"&&{padding:"6px 8px"},e.variant==="text"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main},e.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},e.variant==="outlined"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main,border:t.vars?`1px solid rgba(${t.vars.palette[e.color].mainChannel} / 0.5)`:`1px solid ${fn(t.palette[e.color].main,.5)}`},e.variant==="contained"&&{color:t.vars?t.vars.palette.text.primary:(r=(i=t.palette).getContrastText)==null?void 0:r.call(i,t.palette.grey[300]),backgroundColor:(t.vars||t).palette.grey[300],boxShadow:(t.vars||t).shadows[2]},e.variant==="contained"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].contrastText,backgroundColor:(t.vars||t).palette[e.color].main},e.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},e.size==="small"&&e.variant==="text"&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="text"&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="outlined"&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="outlined"&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="contained"&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="contained"&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},e.fullWidth&&{width:"100%"})},({ownerState:t})=>t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${ed.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${ed.disabled}`]:{boxShadow:"none"}}),Uz=fe("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.startIcon,e[`iconSize${he(r.size)}`]]}})(({ownerState:t})=>M({display:"inherit",marginRight:8,marginLeft:-4},t.size==="small"&&{marginLeft:-2},PR(t))),Bz=fe("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.endIcon,e[`iconSize${he(r.size)}`]]}})(({ownerState:t})=>M({display:"inherit",marginRight:-4,marginLeft:8},t.size==="small"&&{marginRight:-2},PR(t))),jz=P.forwardRef(function(e,r){const i=P.useContext(Nz),s=Lv(i,e),o=Ne({props:s,name:"MuiButton"}),{children:a,color:l="primary",component:c="button",className:d,disabled:f=!1,disableElevation:g=!1,disableFocusRipple:v=!1,endIcon:_,focusVisibleClassName:w,fullWidth:k=!1,size:y="medium",startIcon:b,type:x,variant:R="text"}=o,E=pe(o,$z),C=M({},o,{color:l,component:c,disabled:f,disableElevation:g,disableFocusRipple:v,fullWidth:k,size:y,type:x,variant:R}),D=Lz(C),A=b&&$(Uz,{className:D.startIcon,ownerState:C,children:b}),U=_&&$(Bz,{className:D.endIcon,ownerState:C,children:_});return be(Fz,M({ownerState:C,className:Se(i.className,D.root,d),component:c,disabled:f,focusRipple:!v,focusVisibleClassName:Se(D.focusVisible,w),ref:r,type:x},E,{classes:D,children:[A,a,U]}))}),en=jz;function zz(t){return Ae("MuiPaper",t)}Re("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Vz=["className","component","elevation","square","variant"],Wz=t=>{const{square:e,elevation:r,variant:i,classes:s}=t,o={root:["root",i,!e&&"rounded",i==="elevation"&&`elevation${r}`]};return Me(o,zz,s)},Gz=fe("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],!r.square&&e.rounded,r.variant==="elevation"&&e[`elevation${r.elevation}`]]}})(({theme:t,ownerState:e})=>{var r;return M({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!e.square&&{borderRadius:t.shape.borderRadius},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.divider}`},e.variant==="elevation"&&M({boxShadow:(t.vars||t).shadows[e.elevation]},!t.vars&&t.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${fn("#fff",Yw(e.elevation))}, ${fn("#fff",Yw(e.elevation))})`},t.vars&&{backgroundImage:(r=t.vars.overlays)==null?void 0:r[e.elevation]}))}),Hz=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiPaper"}),{className:s,component:o="div",elevation:a=1,square:l=!1,variant:c="elevation"}=i,d=pe(i,Vz),f=M({},i,{component:o,elevation:a,square:l,variant:c}),g=Wz(f);return $(Gz,M({as:o,ownerState:f,className:Se(g.root,s),ref:r},d))}),hi=Hz;function qz(t){return Ae("MuiAppBar",t)}Re("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent"]);const Kz=["className","color","enableColorOnDark","position"],Yz=t=>{const{color:e,position:r,classes:i}=t,s={root:["root",`color${he(e)}`,`position${he(r)}`]};return Me(s,qz,i)},td=(t,e)=>`${t==null?void 0:t.replace(")","")}, ${e})`,Xz=fe(hi,{name:"MuiAppBar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`position${he(r.position)}`],e[`color${he(r.color)}`]]}})(({theme:t,ownerState:e})=>{const r=t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[900];return M({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},e.position==="fixed"&&{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},e.position==="absolute"&&{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},e.position==="sticky"&&{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},e.position==="static"&&{position:"static"},e.position==="relative"&&{position:"relative"},!t.vars&&M({},e.color==="default"&&{backgroundColor:r,color:t.palette.getContrastText(r)},e.color&&e.color!=="default"&&e.color!=="inherit"&&e.color!=="transparent"&&{backgroundColor:t.palette[e.color].main,color:t.palette[e.color].contrastText},e.color==="inherit"&&{color:"inherit"},t.palette.mode==="dark"&&!e.enableColorOnDark&&{backgroundColor:null,color:null},e.color==="transparent"&&M({backgroundColor:"transparent",color:"inherit"},t.palette.mode==="dark"&&{backgroundImage:"none"})),t.vars&&M({},e.color==="default"&&{"--AppBar-background":e.enableColorOnDark?t.vars.palette.AppBar.defaultBg:td(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":e.enableColorOnDark?t.vars.palette.text.primary:td(t.vars.palette.AppBar.darkColor,t.vars.palette.text.primary)},e.color&&!e.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":e.enableColorOnDark?t.vars.palette[e.color].main:td(t.vars.palette.AppBar.darkBg,t.vars.palette[e.color].main),"--AppBar-color":e.enableColorOnDark?t.vars.palette[e.color].contrastText:td(t.vars.palette.AppBar.darkColor,t.vars.palette[e.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:e.color==="inherit"?"inherit":"var(--AppBar-color)"},e.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),Qz=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiAppBar"}),{className:s,color:o="primary",enableColorOnDark:a=!1,position:l="fixed"}=i,c=pe(i,Kz),d=M({},i,{color:o,position:l,enableColorOnDark:a}),f=Yz(d);return $(Xz,M({square:!0,component:"header",ownerState:d,elevation:4,className:Se(f.root,s,l==="fixed"&&"mui-fixed"),ref:r},c))}),Jz=Qz;function Zz(t){return Ae("MuiToolbar",t)}Re("MuiToolbar",["root","gutters","regular","dense"]);const eV=["className","component","disableGutters","variant"],tV=t=>{const{classes:e,disableGutters:r,variant:i}=t;return Me({root:["root",!r&&"gutters",i]},Zz,e)},nV=fe("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,!r.disableGutters&&e.gutters,e[r.variant]]}})(({theme:t,ownerState:e})=>M({position:"relative",display:"flex",alignItems:"center"},!e.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},e.variant==="dense"&&{minHeight:48}),({theme:t,ownerState:e})=>e.variant==="regular"&&t.mixins.toolbar),rV=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiToolbar"}),{className:s,component:o="div",disableGutters:a=!1,variant:l="regular"}=i,c=pe(i,eV),d=M({},i,{component:o,disableGutters:a,variant:l}),f=tV(d);return $(nV,M({as:o,className:Se(f.root,s),ref:r,ownerState:d},c))}),iV=rV;function sV(t){return Ae("MuiTypography",t)}
3357Re("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const oV=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],aV=t=>{const{align:e,gutterBottom:r,noWrap:i,paragraph:s,variant:o,classes:a}=t,l={root:["root",o,t.align!=="inherit"&&`align${he(e)}`,r&&"gutterBottom",i&&"noWrap",s&&"paragraph"]};return Me(l,sV,a)},lV=fe("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.variant&&e[r.variant],r.align!=="inherit"&&e[`align${he(r.align)}`],r.noWrap&&e.noWrap,r.gutterBottom&&e.gutterBottom,r.paragraph&&e.paragraph]}})(({theme:t,ownerState:e})=>M({margin:0},e.variant&&t.typography[e.variant],e.align!=="inherit"&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),PC={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},uV={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},cV=t=>uV[t]||t,dV=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiTypography"}),s=cV(i.color),o=Qv(M({},i,{color:s})),{align:a="inherit",className:l,component:c,gutterBottom:d=!1,noWrap:f=!1,paragraph:g=!1,variant:v="body1",variantMapping:_=PC}=o,w=pe(o,oV),k=M({},o,{align:a,color:s,className:l,component:c,gutterBottom:d,noWrap:f,paragraph:g,variant:v,variantMapping:_}),y=c||(g?"p":_[v]||PC[v])||"span",b=aV(k);return $(lV,M({as:y,ref:r,ownerState:k,className:Se(b.root,l)},w))}),cn=dV;var S1={},ts={},hV={get exports(){return ts},set exports(t){ts=t}};(function(t){function e(r){return r&&r.__esModule?r:{default:r}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(hV);var wg={};function fV(t){return Ae("MuiSvgIcon",t)}Re("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const pV=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],gV=t=>{const{color:e,fontSize:r,classes:i}=t,s={root:["root",e!=="inherit"&&`color${he(e)}`,`fontSize${he(r)}`]};return Me(s,fV,i)},mV=fe("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.color!=="inherit"&&e[`color${he(r.color)}`],e[`fontSize${he(r.fontSize)}`]]}})(({theme:t,ownerState:e})=>{var r,i,s,o,a,l,c,d,f,g,v,_,w,k,y,b,x;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,transition:(r=t.transitions)==null||(i=r.create)==null?void 0:i.call(r,"fill",{duration:(s=t.transitions)==null||(o=s.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((a=t.typography)==null||(l=a.pxToRem)==null?void 0:l.call(a,20))||"1.25rem",medium:((c=t.typography)==null||(d=c.pxToRem)==null?void 0:d.call(c,24))||"1.5rem",large:((f=t.typography)==null||(g=f.pxToRem)==null?void 0:g.call(f,35))||"2.1875rem"}[e.fontSize],color:(v=(_=(t.vars||t).palette)==null||(w=_[e.color])==null?void 0:w.main)!=null?v:{action:(k=(t.vars||t).palette)==null||(y=k.action)==null?void 0:y.active,disabled:(b=(t.vars||t).palette)==null||(x=b.action)==null?void 0:x.disabled,inherit:void 0}[e.color]}}),AR=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiSvgIcon"}),{children:s,className:o,color:a="inherit",component:l="svg",fontSize:c="medium",htmlColor:d,inheritViewBox:f=!1,titleAccess:g,viewBox:v="0 0 24 24"}=i,_=pe(i,pV),w=M({},i,{color:a,component:l,fontSize:c,instanceFontSize:e.fontSize,inheritViewBox:f,viewBox:v}),k={};f||(k.viewBox=v);const y=gV(w);return be(mV,M({as:l,className:Se(y.root,o),focusable:"false",color:d,"aria-hidden":g?void 0:!0,role:g?"img":void 0,ref:r},k,_,{ownerState:w,children:[s,g?$("title",{children:g}):null]}))});AR.muiName="SvgIcon";const AC=AR;function ds(t,e){function r(i,s){return $(AC,M({"data-testid":`${e}Icon`,ref:s},i,{children:t}))}return r.muiName=AC.muiName,P.memo(P.forwardRef(r))}const yV={configure:t=>{Fv.configure(t)}},vV=Object.freeze(Object.defineProperty({__proto__:null,unstable_ClassNameGenerator:yV,capitalize:he,createChainedFunction:Im,createSvgIcon:ds,debounce:Nv,deprecatedPropType:nD,isMuiElement:md,ownerDocument:Jt,ownerWindow:Xi,requirePropFactory:rD,setRef:th,unstable_useEnhancedEffect:Lr,unstable_useId:$v,unsupportedProp:oD,useControlled:Rm,useEventCallback:Rr,useForkRef:nn,useIsF
vendor: 8,611 bytes, lines 3357-3365
3357ocusVisible:DE},Symbol.toStringTag,{value:"Module"})),bV=Ox(vV);var OC;function Oa(){return OC||(OC=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.createSvgIcon}});var e=bV}(wg)),wg}const Da=Ox(t2);var wV=ts;Object.defineProperty(S1,"__esModule",{value:!0});var wy=S1.default=void 0,SV=wV(Oa()),CV=Da,xV=(0,SV.default)((0,CV.jsx)("path",{d:"M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4H12.65zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"}),"VpnKey");wy=S1.default=xV;const _V=t0(),EV=CN({defaultTheme:_V,defaultClassName:"MuiBox-root",generateClassName:Fv.generate}),xn=EV;function kV(t){return Ae("MuiIconButton",t)}const TV=Re("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),IV=TV,RV=["edge","children","className","color","disabled","disableFocusRipple","size"],PV=t=>{const{classes:e,disabled:r,color:i,edge:s,size:o}=t,a={root:["root",r&&"disabled",i!=="default"&&`color${he(i)}`,s&&`edge${he(s)}`,`size${he(o)}`]};return Me(a,kV,e)},AV=fe(w1,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.color!=="default"&&e[`color${he(r.color)}`],r.edge&&e[`edge${he(r.edge)}`],e[`size${he(r.size)}`]]}})(({theme:t,ownerState:e})=>M({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:fn(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12}),({theme:t,ownerState:e})=>{var r;const i=(r=(t.vars||t).palette)==null?void 0:r[e.color];return M({},e.color==="inherit"&&{color:"inherit"},e.color!=="inherit"&&e.color!=="default"&&M({color:i==null?void 0:i.main},!e.disableRipple&&{"&:hover":M({},i&&{backgroundColor:t.vars?`rgba(${i.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:fn(i.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),e.size==="small"&&{padding:5,fontSize:t.typography.pxToRem(18)},e.size==="large"&&{padding:12,fontSize:t.typography.pxToRem(28)},{[`&.${IV.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})}),OV=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiIconButton"}),{edge:s=!1,children:o,className:a,color:l="default",disabled:c=!1,disableFocusRipple:d=!1,size:f="medium"}=i,g=pe(i,RV),v=M({},i,{edge:s,color:l,disabled:c,disableFocusRipple:d,size:f}),_=PV(v);return $(AV,M({className:Se(_.root,a),centerRipple:!0,focusRipple:!d,disabled:c,ref:r,ownerState:v},g,{children:o}))}),to=OV;var DC={},DV={get exports(){return DC},set exports(t){DC=t}},nt={};/** 3358 * @license React 3359 * react-is.production.min.js 3360 * 3361 * Copyright (c) Facebook, Inc. and its affiliates. 3362 * 3363 * This source code is licensed under the MIT license found in the 3364 * LICENSE file in the root directory of this source tree. 3365 */var C1=Symbol.for("react.element"),x1=Symbol.for("react.portal"),Qf=Symbol.for("react.fragment"),Jf=Symbol.for("react.strict_mode"),Zf=Symbol.for("react.profiler"),ep=Symbol.for("react.provider"),tp=Symbol.for("react.context"),MV=Symbol.for("react.server_context"),np=Symbol.for("react.forward_ref"),rp=Symbol.for("react.suspense"),ip=Symbol.for("react.suspense_list"),sp=Symbol.for("react.memo"),op=Symbol.for("react.lazy"),NV=Symbol.for("react.offscreen"),OR;OR=Symbol.for("react.module.reference");function ur(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case C1:switch(t=t.type,t){case Qf:case Zf:case Jf:case rp:case ip:return t;default:switch(t=t&&t.$$typeof,t){case MV:case tp:case np:case op:case sp:case ep:return t;default:return e}}case x1:return e}}}nt.ContextConsumer=tp;nt.ContextProvider=ep;nt.Element=C1;nt.ForwardRef=np;nt.Fragment=Qf;nt.Lazy=op;nt.Memo=sp;nt.Portal=x1;nt.Profiler=Zf;nt.StrictMode=Jf;nt.Suspense=rp;nt.SuspenseList=ip;nt.isAsyncMode=function(){return!1};nt.isConcurrentMode=function(){return!1};nt.isContextConsumer=function(t){return ur(t)===tp};nt.isContextProvider=function(t){return ur(t)===ep};nt.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===C1};nt.isForwardRef=function(t){return ur(t)===np};nt.isFragment=function(t){return ur(t)===Qf};nt.isLazy=function(t){return ur(t)===op};nt.isMemo=function(t){return ur(t)===sp};nt.isPortal=function(t){return ur(t)===x1};nt.isProfiler=function(t){return ur(t)===Zf};nt.isStrictMode=function(t){return ur(t)===Jf};nt.isSuspense=function(t){return ur(t)===rp};nt.isSuspenseList=function(t){return ur(t)===ip};nt.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===Qf||t===Zf||t===Jf||t===rp||t===ip||t===NV||typeof t=="object"&&t!==null&&(t.$$typeof===op||t.$$typeof===sp||t.$$typeof===ep||t.$$typeof===tp||t.$$typeof===np||t.$$typeof===OR||t.getModuleId!==void 0)};nt.typeOf=ur;(function(t){t.exports=nt})(DV);const $V=P.createContext({}),Sy=$V;function LV(t){return Ae("MuiList",t)}Re("MuiList",["root","padding","dense","subheader"]);const FV=["children","className","component","dense","disablePadding","subheader"],UV=t=>{const{classes:e,disablePadding:r,dense:i,subheader:s}=t;return Me({root:["root",!r&&"padding",i&&"dense",s&&"subheader"]},LV,e)},BV=fe("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,!r.disablePadding&&e.padding,r.dense&&e.dense,r.subheader&&e.subheader]}})(({ownerState:t})=>M({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),jV=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiList"}),{children:s,className:o,component:a="ul",dense:l=!1,disablePadding:c=!1,subheader:d}=i,f=pe(i,FV),g=P.useMemo(()=>({dense:l}),[l]),v=M({},i,{component:a,dense:l,disablePadding:c}),_=UV(v);return $(Sy.Provider,{value:g,children:be(BV,M({as:a,className:Se(_.root,o),ref:r,ownerState:v},f,{children:[d,s]}))})}),zV=jV,VV=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function Sg(t,e,r){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:r?null:t.firstChild}function MC(t,e,r){return t===e?r?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:r?null:t.lastChild}function DR(t,e){if(e===void 0)return!0;let r=t.innerText;return r===void 0&&(r=t.textContent),r=r.trim().toLowerCase(),r.length===0?!1:e.repeating?r[0]===e.keys[0]:r.indexOf(e.keys.join(""))===0}function ul(t,e,r,i,s,o){let a=!1,l=s(t,e,e?r:!1);for(;l;){if(l===t.firstChild){if(a)return!1;a=!0}const c=i?!1:l.disabled||l.getAttribute("aria-disabled")==="true";if(!l.hasAttribute("tabindex")||!DR(l,o)||c)l=s(t,l,r);else return l.focus(),!0}return!1}const WV=P.forwardRef(function(e,r){const{actions:i,autoFocus:s=!1,autoFocusItem:o=!1,children:a,className:l,disabledItemsFocusable:c=!1,disableListWrap:d=!1,onKeyDown:f,variant:g="selectedMenu"}=e,v=pe(e,VV),_=P.useRef(null),w=P.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Lr(()=>{s&&_.current.focus()},[s]),P.useImperativeHandle(i,()=>({adjustStyleForScrollbar:(R,E)=>{const C=!_.current.style.width;if(R.clientHeight<_.current.clientHeight&&C){const D=`${ME(Jt(R))}px`;_.current.style[E.direction==="rtl"?"paddingLeft":"paddingRight"]=D,_.current.style.width=`calc(100% + ${D})`}return _.current}}),[]);const k=R=>{const E=_.current,C=R.key,D=Jt(E).activeElement;if(C==="ArrowDown")R.preventDefault(),ul(E,D,d,c,Sg);else if(C==="ArrowUp")R.preventDefault(),ul(E,D,d,c,MC);else if(C==="Home")R.preventDefault(),ul(E,null,d,c,Sg);else if(C==="End")R.preventDefault(),ul(E,null,d,c,MC);else if(C.length===1){const A=w.current,U=C.toLowerCase(),B=performance.now();A.keys.length>0&&(B-A.lastTime>500?(A.keys=[],A.repeating=!0,A.previousKeyMatched=!0):A.repeating&&U!==A.keys[0]&&(A.repeating=!1)),A.lastTime=B,A.keys.push(U);const z=D&&!A.repeating&&DR(D,A);A.previousKeyMatched&&(z||ul(E,D,!1,c,Sg,A))?R.preventDefault():A.previousKeyMatched=!1}f&&f(R)},y=nn(_,r);let b=-1;
3365P.Children.forEach(a,(R,E)=>{P.isValidElement(R)&&(R.props.disabled||(g==="selectedMenu"&&R.props.selected||b===-1)&&(b=E))});const x=P.Children.map(a,(R,E)=>{if(E===b){const C={};return o&&(C.autoFocus=!0),R.props.tabIndex===void 0&&g==="selectedMenu"&&(C.tabIndex=0),P.cloneElement(R,C)}return R});return $(zV,M({role:"menu",ref:y,className:l,onKeyDown:k,tabIndex:s?0:-1},v,{children:x}))}),GV=WV,MR=t=>t.scrollTop;function kh(t,e){var r,i;const{timeout:s,easing:o,style:a={}}=t;return{duration:(r=a.transitionDuration)!=null?r:typeof s=="number"?s:s[e.mode]||0,easing:(i=a.transitionTimingFunction)!=null?i:typeof o=="object"?o[e.mode]:o,delay:a.transitionDelay}}const HV=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Cy(t){return`scale(${t}, ${t**2})`}const qV={entering:{opacity:1,transform:Cy(1)},entered:{opacity:1,transform:"none"}},Cg=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),NR=P.forwardRef(function(e,r){const{addEndListener:i,appear:s=!0,children:o,easing:a,in:l,onEnter:c,onEntered:d,onEntering:f,onExit:g,onExited:v,onExiting:_,style:w,timeout:k="auto",TransitionComponent:y=RR}=e,b=pe(e,HV),x=P.useRef(),R=P.useRef(),E=lr(),C=P.useRef(null),D=nn(C,o.ref,r),A=W=>q=>{if(W){const X=C.current;q===void 0?W(X):W(X,q)}},U=A(f),B=A((W,q)=>{MR(W);const{duration:X,delay:J,easing:Z}=kh({style:w,timeout:k,easing:a},{mode:"enter"});let re;k==="auto"?(re=E.transitions.getAutoHeightDuration(W.clientHeight),R.current=re):re=X,W.style.transition=[E.transitions.create("opacity",{duration:re,delay:J}),E.transitions.create("transform",{duration:Cg?re:re*.666,delay:J,easing:Z})].join(","),c&&c(W,q)}),z=A(d),V=A(_),j=A(W=>{const{duration:q,delay:X,easing:J}=kh({style:w,timeout:k,easing:a},{mode:"exit"});let Z;k==="auto"?(Z=E.transitions.getAutoHeightDuration(W.clientHeight),R.current=Z):Z=q,W.style.transition=[E.transitions.create("opacity",{duration:Z,delay:X}),E.transitions.create("transform",{duration:Cg?Z:Z*.666,delay:Cg?X:X||Z*.333,easing:J})].join(","),W.style.opacity=0,W.style.transform=Cy(.75),g&&g(W)}),N=A(v),G=W=>{k==="auto"&&(x.current=setTimeout(W,R.current||0)),i&&i(C.current,W)};return P.useEffect(()=>()=>{clearTimeout(x.current)},[]),$(y,M({appear:s,in:l,nodeRef:C,onEnter:B,onEntered:z,onEntering:U,onExit:j,onExited:N,onExiting:V,addEndListener:G,timeout:k==="auto"?null:k},b,{children:(W,q)=>P.cloneElement(o,M({style:M({opacity:0,transform:Cy(.75),visibility:W==="exited"&&!l?"hidden":void 0},qV[W],w,o.props.style),ref:D},q))}))});NR.muiSupportAuto=!0;const $R=NR,KV=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],YV={entering:{opacity:1},entered:{opacity:1}},XV=P.forwardRef(function(e,r){const i=lr(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:l,easing:c,in:d,onEnter:f,onEntered:g,onEntering:v,onExit:_,onExited:w,onExiting:k,style:y,timeout:b=s,TransitionComponent:x=RR}=e,R=pe(e,KV),E=P.useRef(null),C=nn(E,l.ref,r),D=G=>W=>{if(G){const q=E.current;W===void 0?G(q):G(q,W)}},A=D(v),U=D((G,W)=>{MR(G);const q=kh({style:y,timeout:b,easing:c},{mode:"enter"});G.style.webkitTransition=i.transitions.create("opacity",q),G.style.transition=i.transitions.create("opacity",q),f&&f(G,W)}),B=D(g),z=D(k),V=D(G=>{const W=kh({style:y,timeout:b,easing:c},{mode:"exit"});G.style.webkitTransition=i.transitions.create("opacity",W),G.style.transition=i.transitions.create("opacity",W),_&&_(G)}),j=D(w);return $(x,M({appear:a,in:d,nodeRef:E,onEnter:U,onEntered:B,onEntering:A,onExit:V,onExited:j,onExiting:z,addEndListener:G=>{o&&o(E.current,G)},timeout:b},R,{children:(G,W)=>P.cloneElement(l,M({style:M({opacity:0,visibility:G==="exited"&&!d?"hidden":void 0},YV[G],y,l.props.style),ref:C},W))}))}),LR=XV;function QV(t){return Ae("MuiBackdrop",t)}Re("MuiBackdrop",["root","invisible"]);const JV=["children","component","components","componentsProps","className","invisible","open","slotProps","
3365slots","transitionDuration","TransitionComponent"],ZV=t=>{const{classes:e,invisible:r}=t;return Me({root:["root",r&&"invisible"]},QV,e)},e8=fe("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.invisible&&e.invisible]}})(({ownerState:t})=>M({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})),t8=P.forwardRef(function(e,r){var i,s,o;const a=Ne({props:e,name:"MuiBackdrop"}),{children:l,component:c="div",components:d={},componentsProps:f={},className:g,invisible:v=!1,open:_,slotProps:w={},slots:k={},transitionDuration:y,TransitionComponent:b=LR}=a,x=pe(a,JV),R=M({},a,{component:c,invisible:v}),E=ZV(R),C=(i=w.root)!=null?i:f.root;return $(b,M({in:_,timeout:y},x,{children:$(e8,M({"aria-hidden":!0},C,{as:(s=(o=k.root)!=null?o:d.Root)!=null?s:c,className:Se(E.root,g,C==null?void 0:C.className),ownerState:M({},R,C==null?void 0:C.ownerState),classes:E,ref:r,children:l}))}))}),_1=t8,n8=["BackdropComponent","BackdropProps","closeAfterTransition","children","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","slotProps","slots","theme"],r8=t=>t.classes,i8=fe("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,!r.open&&r.exited&&e.hidden]}})(({theme:t,ownerState:e})=>M({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!e.open&&e.exited&&{visibility:"hidden"})),s8=fe(_1,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),o8=P.forwardRef(function(e,r){var i,s,o,a,l,c;const d=Ne({name:"MuiModal",props:e}),{BackdropComponent:f=s8,BackdropProps:g,closeAfterTransition:v=!1,children:_,component:w,components:k={},componentsProps:y={},disableAutoFocus:b=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:R=!1,disablePortal:E=!1,disableRestoreFocus:C=!1,disableScrollLock:D=!1,hideBackdrop:A=!1,keepMounted:U=!1,slotProps:B,slots:z,theme:V}=d,j=pe(d,n8),[N,G]=P.useState(!0),W={closeAfterTransition:v,disableAutoFocus:b,disableEnforceFocus:x,disableEscapeKeyDown:R,disablePortal:E,disableRestoreFocus:C,disableScrollLock:D,hideBackdrop:A,keepMounted:U},q=M({},d,W,{exited:N}),X=r8(q),J=(i=(s=z==null?void 0:z.root)!=null?s:k.Root)!=null?i:i8,Z=(o=(a=z==null?void 0:z.backdrop)!=null?a:k.Backdrop)!=null?o:f,re=(l=B==null?void 0:B.root)!=null?l:y.root,K=(c=B==null?void 0:B.backdrop)!=null?c:y.backdrop;return $(nz,M({slots:{root:J,backdrop:Z},slotProps:{root:()=>M({},gy(re,q),!_h(J)&&{as:w,theme:V}),backdrop:()=>M({},g,gy(K,q))},onTransitionEnter:()=>G(!1),onTransitionExited:()=>G(!0),ref:r},j,{classes:X},W,{children:_}))}),FR=o8;function a8(t){return Ae("MuiPopover",t)}Re("MuiPopover",["root","paper"]);const l8=["onEntering"],u8=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"];function NC(t,e){let r=0;return typeof e=="number"?r=e:e==="center"?r=t.height/2:e==="bottom"&&(r=t.height),r}function $C(t,e){let r=0;return typeof e=="number"?r=e:e==="center"?r=t.width/2:e==="right"&&(r=t.width),r}function LC(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function xg(t){return typeof t=="function"?t():t}const c8=t=>{const{classes:e}=t;return Me({root:["root"],paper:["paper"]},a8,e)},d8=fe(FR,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),h8=fe(hi,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),f8=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiPopover"}),{action:s,anchorEl:o,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:l,anchorReference:c="anchorEl",children:d,className:f,container:g,elevation:v=8,marginThreshold:_=16,open:w,PaperProps:k={},transformOrigin:y={vertical:"top",horizontal:"left"},TransitionComponent:b=$R,transitionDuration:x="auto",TransitionProps:{onEntering:R}={}}=i,E=pe(i.TransitionProps,l8),C=pe(i,u8),D=P.useRef(),A=nn(D,k.ref),U=M({},i,{anchorOrigin:a,anchorReference:c,elevation:v,marginThreshold:_,PaperProps:k,transformOrigin:y,TransitionComponent:b,transitionDuration:x,TransitionProps:E}),B=c8(U),z=P.useCallback(()=>
3365{if(c==="anchorPosition")return l;const re=xg(o),ne=(re&&re.nodeType===1?re:Jt(D.current).body).getBoundingClientRect();return{top:ne.top+NC(ne,a.vertical),left:ne.left+$C(ne,a.horizontal)}},[o,a.horizontal,a.vertical,l,c]),V=P.useCallback(re=>({vertical:NC(re,y.vertical),horizontal:$C(re,y.horizontal)}),[y.horizontal,y.vertical]),j=P.useCallback(re=>{const K={width:re.offsetWidth,height:re.offsetHeight},ne=V(K);if(c==="none")return{top:null,left:null,transformOrigin:LC(ne)};const ee=z();let ce=ee.top-ne.vertical,ye=ee.left-ne.horizontal;const _e=ce+K.height,Oe=ye+K.width,He=Xi(xg(o)),we=He.innerHeight-_,rt=He.innerWidth-_;if(ce<_){const Le=ce-_;ce-=Le,ne.vertical+=Le}else if(_e>we){const Le=_e-we;ce-=Le,ne.vertical+=Le}if(ye<_){const Le=ye-_;ye-=Le,ne.horizontal+=Le}else if(Oe>rt){const Le=Oe-rt;ye-=Le,ne.horizontal+=Le}return{top:`${Math.round(ce)}px`,left:`${Math.round(ye)}px`,transformOrigin:LC(ne)}},[o,c,z,V,_]),[N,G]=P.useState(w),W=P.useCallback(()=>{const re=D.current;if(!re)return;const K=j(re);K.top!==null&&(re.style.top=K.top),K.left!==null&&(re.style.left=K.left),re.style.transformOrigin=K.transformOrigin,G(!0)},[j]),q=(re,K)=>{R&&R(re,K),W()},X=()=>{G(!1)};P.useEffect(()=>{w&&W()}),P.useImperativeHandle(s,()=>w?{updatePosition:()=>{W()}}:null,[w,W]),P.useEffect(()=>{if(!w)return;const re=Nv(()=>{W()}),K=Xi(o);return K.addEventListener("resize",re),()=>{re.clear(),K.removeEventListener("resize",re)}},[o,w,W]);let J=x;x==="auto"&&!b.muiSupportAuto&&(J=void 0);const Z=g||(o?Jt(xg(o)).body:void 0);return $(d8,M({BackdropProps:{invisible:!0},className:Se(B.root,f),container:Z,open:w,ref:r,ownerState:U},C,{children:$(b,M({appear:!0,in:w,onEntering:q,onExited:X,timeout:J},E,{children:$(h8,M({elevation:v},k,{ref:A,className:Se(B.paper,k.className)},N?void 0:{style:M({},k.style,{opacity:0})},{ownerState:U,children:d}))}))}))}),p8=f8;function g8(t){return Ae("MuiMenu",t)}Re("MuiMenu",["root","paper","list"]);const m8=["onEntering"],y8=["autoFocus","children","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"],v8={vertical:"top",horizontal:"right"},b8={vertical:"top",horizontal:"left"},w8=t=>{const{classes:e}=t;return Me({root:["root"],paper:["paper"],list:["list"]},g8,e)},S8=fe(p8,{shouldForwardProp:t=>Br(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),C8=fe(hi,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),x8=fe(GV,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),_8=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiMenu"}),{autoFocus:s=!0,children:o,disableAutoFocusItem:a=!1,MenuListProps:l={},onClose:c,open:d,PaperProps:f={},PopoverClasses:g,transitionDuration:v="auto",TransitionProps:{onEntering:_}={},variant:w="selectedMenu"}=i,k=pe(i.TransitionProps,m8),y=pe(i,y8),b=lr(),x=b.direction==="rtl",R=M({},i,{autoFocus:s,disableAutoFocusItem:a,MenuListProps:l,onEntering:_,PaperProps:f,transitionDuration:v,TransitionProps:k,variant:w}),E=w8(R),C=s&&!a&&d,D=P.useRef(null),A=(z,V)=>{D.current&&D.current.adjustStyleForScrollbar(z,b),_&&_(z,V)},U=z=>{z.key==="Tab"&&(z.preventDefault(),c&&c(z,"tabKeyDown"))};let B=-1;return P.Children.map(o,(z,V)=>{P.isValidElement(z)&&(z.props.disabled||(w==="selectedMenu"&&z.props.selected||B===-1)&&(B=V))}),$(S8,M({onClose:c,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?v8:b8,PaperProps:M({component:C8},f,{classes:M({},f.classes,{root:E.paper})}),className:E.root,open:d,ref:r,transitionDuration:v,TransitionProps:M({onEntering:A},k),ownerState:R},y,{classes:g,children:$(x8,M({onKeyDown:U,actions:D,autoFocus:s&&(B===-1||a),autoFocusItem:C,variant:w},l,{className:Se(E.list,l.className),children:o}))}))}),xy=_8,E8=ds($("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function k8(t){return Ae("MuiAvatar",t)}Re("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);
3365const T8=["alt","children","className","component","imgProps","sizes","src","srcSet","variant"],I8=t=>{const{classes:e,variant:r,colorDefault:i}=t;return Me({root:["root",r,i&&"colorDefault"],img:["img"],fallback:["fallback"]},k8,e)},R8=fe("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],r.colorDefault&&e.colorDefault]}})(({theme:t,ownerState:e})=>M({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},e.variant==="rounded"&&{borderRadius:(t.vars||t).shape.borderRadius},e.variant==="square"&&{borderRadius:0},e.colorDefault&&M({color:(t.vars||t).palette.background.default},t.vars?{backgroundColor:t.vars.palette.Avatar.defaultBg}:{backgroundColor:t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[600]}))),P8=fe("img",{name:"MuiAvatar",slot:"Img",overri
3365desResolver:(t,e)=>e.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),A8=fe(E8,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(t,e)=>e.fallback})({width:"75%",height:"75%"});function O8({crossOrigin:t,referrerPolicy:e,src:r,srcSet:i}){const[s,o]=P.useState(!1);return P.useEffect(()=>{if(!r&&!i)return;o(!1);let a=!0;const l=new Image;return l.onload=()=>{a&&o("loaded")},l.onerror=()=>{a&&o("error")},l.crossOrigin=t,l.referrerPolicy=e,l.src=r,i&&(l.srcset=i),()=>{a=!1}},[t,e,r,i]),s}const D8=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiAvatar"}),{alt:s,children:o,className:a,component:l="div",imgProps:c,sizes:d,src:f,srcSet:g,variant:v="circular"}=i,_=pe(i,T8);let w=null;const k=O8(M({},c,{src:f,srcSet:g})),y=f||g,b=y&&k!=="error",x=M({},i,{colorDefault:!b,component:l,variant:v}),R=I8(x);return b?w=$(P8,M({alt:s,src:f,srcSet:g,sizes:d,ownerState:x,className:R.img},c)):o!=null?w=o:y&&s?w=s[0]:w=$(A8,{className:R.fallback}),$(R8,M({as:l,ownerState:x,className:Se(R.root,a),ref:r},_,{children:w}))}),M8=D8,N8=Re("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),FC=N8,$8=Re("MuiListItemIcon",["root","alignItemsFlexStart"]),UC=$8,L8=Re("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),BC=L8;function F8(t){return Ae("MuiMenuItem",t)}const U8=Re("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),cl=U8,B8=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],j8=(t,e)=>{const{ownerState:r}=t;return[e.root,r.dense&&e.dense,r.divider&&e.divider,!r.disableGutters&&e.gutters]},z8=t=>{const{disabled:e,dense:r,divider:i,disableGutters:s,selected:o,classes:a}=t,c=Me({root:["root",r&&"dense",e&&"disabled",!s&&"gutters",i&&"divider",o&&"selected"]},F8,a);return M({},a,c)},V8=fe(w1,{shouldForwardProp:t=>Br(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:j8})(({theme:t,ownerState:e})=>M({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${cl.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:fn(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${cl.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:fn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${cl.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:fn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:fn(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${cl.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${cl.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${FC.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${FC.inset}`]:{marginLeft:52},[`& .${BC.root}`]:{marginTop:0,marginBottom:0},[`& .${BC.inset}`]:{paddingLeft:36},[`& .${UC.root}`]:{minWidth:36}},!e.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},e.dense&&M({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${UC.root} svg`]:{fontSize:"1.25rem"}}))),W8=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiMenuItem"}),{autoFocus:s=!1,component:o="li",dense:a=!1,divider:l=!1,disableGutters:c=!1,focusVisibleClassName:d,role:f="menuitem",tabIndex:g,className:v}=i,_=pe(i,B8),w=P.useContext(Sy),k=P.useMemo(()=>({dense:a||w.dense||!1,disableGutters:c}),[w.dense,a,c]),y=P.useRef(null);Lr(()=>{s&&y.current&&y.current.focus()},[s]);const b=M({},i,{dense:k.dense,divider:l,disableGutters:c}),x=z8(i),R=nn(y,r);let E;return i.disabled||(E=g!==void 0?g:-1),$(Sy.Provider,{value:k,children:$(V8,M({ref:R,role:f,tabIndex:E,component:o,focusVisibleClassName:Se(x.focusVisible,d),className:Se(x.root,v)},_,{ownerState:b,classes:x}))})}),jC=W8;var E1={},G8=ts;Object.defineProperty(E1,"__esModule",{value:!0});var UR=E1.default=void 0,H8=G8(Oa()),q8=Da,K8=(0,H8.default)((0,q8.jsx)("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");UR=E1.default=K8;function Y8(t){return Ae("MuiAlert",t)}const X8=Re("MuiAlert",["root","action","icon","message","filled","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),zC=X8,Q8=ds($("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}
3365),"SuccessOutlined"),J8=ds($("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),Z8=ds($("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),eW=ds($("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),tW=ds($("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),nW=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],rW=t=>{const{variant:e,color:r,severity:i,classes:s}=t,o={root:["root",`${e}${he(r||i)}`,`${e}`],icon:["icon"],message:["message"],action:["action"]};return Me(o,Y8,s)},iW=fe(hi,{name:"MuiAlert",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],e[`${r.variant}${he(r.color||r.severity)}`]]}})(({theme:t,ownerState:e})=>{const r=t.palette.mode==="light"?ra:ia,i=t.palette.mode==="light"?ia:ra,s=e.color||e.severity;return M({},t.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px"},s&&e.variant==="standard"&&{color:t.vars?t.vars.palette.Alert[`${s}Color`]:r(t.palette[s].light,.6),backgroundColor:t.vars?t.vars.palette.Alert[`${s}StandardBg`]:i(t.palette[s].light,.9),[`& .${zC.icon}`]:t.vars?{color:t.vars.palette.Alert[`${s}IconColor`]}:{color:t.palette[s].main}},s&&e.variant==="outlined"&&{color:t.vars?t.vars.palette.Alert[`${s}Color`]:r(t.palette[s].light,.6),border:`1px solid ${(t.vars||t).palette[s].light}`,[`& .${zC.icon}`]:t.vars?{color:t.vars.palette.Alert[`${s}IconColor`]}:{color:t.palette[s].main}},s&&e.variant==="filled"&&M({fontWeight:t.typography.fontWeightMedium},t.vars?{color:t.vars.palette.Alert[`${s}FilledColor`],backgroundColor:t.vars.palette.Alert[`${s}FilledBg`]}:{backgroundColor:t.palette.mode==="dark"?t.palette[s].dark:t.palette[s].main,color:t.palette.getContrastText(t.palette[s].main)}))}),sW=fe("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(t,e)=>e.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),oW=fe("div",{name:"MuiAlert",slot:"Message",overridesResolver:(t,e)=>e.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),VC=fe("div",{name:"MuiAlert",slot:"Action",overridesResolver:(t,e)=>e.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),WC={success:$(Q8,{fontSize:"inherit"}),warning:$(J8,{fontSize:"inherit"}),error:$(Z8,{fontSize:"inherit"}),info:$(eW,{fontSize:"inherit"})},aW=P.forwardRef(function(e,r){var i,s,o,a,l,c;const d=Ne({props:e,name:"MuiAlert"}),{action:f,children:g,className:v,closeText:_="Close",color:w,components:k={},componentsProps:y={},icon:b,iconMapping:x=WC,onClose:R,role:E="alert",severity:C="success",slotProps:D={},slots:A={},variant:U="standard"}=d,B=pe(d,nW),z=M({},d,{color:w,severity:C,variant:U}),V=rW(z),j=(i=(s=A.closeButton)!=null?s:k.CloseButton)!=null?i:to,N=(o=(a=A.closeIcon)!=null?a:k.CloseIcon)!=null?o:tW,G=(l=D.closeButton)!=null?l:y.closeButton,W=(c=D.closeIcon)!=null?c:y.closeIcon;return be(iW,M({role:E,elevation:0,ownerState:z,className:Se(V.root,v),ref:r},B,{children:[b!==!1?$(sW,{ownerState:z,className:V.icon,children:b||x[C]||WC[C]}):null,$(oW,{ownerState:z,className:V.message,children:g}),f!=null?$(VC,{ownerState:z,className:V.action,children:f}):null,f==null&&R?$(VC,{ownerState:z,className:V.action,children:$(j,M({size:"small","aria-label":_,title:_,color:"inherit",onClick:R},G,{children:$(N,M({fontSize:"small"},W))}))}):null]}))}),lW=aW;function Ma({props:t,states:e,muiFormControl:r}){return e.reduce((i,s)=>(i[s]=t[s],r&&typeof t[s]>"u"&&(i[s]=r[s]),i),{})}const uW=P.createContext(void 0),k1=uW;function Na(){return P.useContext(k1)}function GC(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function T1(t,e=!1){return t&&(GC(t.value)&&t.value!==""||e&&GC(t.defaultValue)&&t.defaultValue!=="")}function cW(t){return t.startAdornment}function dW(t){return Ae("MuiInputBase",t)}const hW=Re("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),fa=hW,fW=["aria-describedby","autoComplete","autoF
3365ocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],ap=(t,e)=>{const{ownerState:r}=t;return[e.root,r.formControl&&e.formControl,r.startAdornment&&e.adornedStart,r.endAdornment&&e.adornedEnd,r.error&&e.error,r.size==="small"&&e.sizeSmall,r.multiline&&e.multiline,r.color&&e[`color${he(r.color)}`],r.fullWidth&&e.fullWidth,r.hiddenLabel&&e.hiddenLabel]},lp=(t,e)=>{const{ownerState:r}=t;return[e.input,r.size==="small"&&e.inputSizeSmall,r.multiline&&e.inputMultiline,r.type==="search"&&e.inputTypeSearch,r.startAdornment&&e.inputAdornedStart,r.endAdornment&&e.inputAdornedEnd,r.hiddenLabel&&e.inputHiddenLabel]},pW=t=>{const{classes:e,color:r,disabled:i,error:s,endAdornment:o,focused:a,formControl:l,fullWidth:c,hiddenLabel:d,multiline:f,readOnly:g,size:v,startAdornment:_,type:w}=t,k={root:["root",`color${he(r)}`,i&&"disabled",s&&"error",c&&"fullWidth",a&&"focused",l&&"formControl",v==="small"&&"sizeSmall",f&&"multiline",_&&"adornedStart",o&&"adornedEnd",d&&"hiddenLabel",g&&"readOnly"],input:["input",i&&"disabled",w==="search"&&"inputTypeSearch",f&&"inputMultiline",v==="small"&&"inputSizeSmall",d&&"inputHiddenLabel",_&&"inputAdornedStart",o&&"inputAdornedEnd",g&&"readOnly"]};return Me(k,dW,e)},up=fe("div",{name:"MuiInputBase",slot:"Root",overridesResolver:ap})(({theme:t,ownerState:e})=>M({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${fa.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},e.multiline&&M({padding:"4px 0 5px"},e.size==="small"&&{paddingTop:1}),e.fullWidth&&{width:"100%"})),cp=fe("input",{name:"MuiInputBase",slot:"Input",overridesResolver:lp})(({theme:t,ownerState:e})=>{const r=t.palette.mode==="light",i=M({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),s={opacity:"0 !important"},o=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5};return M({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${fa.formControl} &`]:{"&::-webkit-input-placeholder":s,"&::-moz-placeholder":s,"&:-ms-input-placeholder":s,"&::-ms-input-placeholder":s,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${fa.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},e.size==="small"&&{paddingTop:1},e.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},e.type==="search"&&{MozAppearance:"textfield"})}),gW=$(uk,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),mW=P.forwardRef(function(e,r){var i;const s=Ne({props:e,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:a,autoFocus:l,className:c,components:d={},componentsProps:f={},defaultValue:g,disabled:v,disableInjectingGlobalStyles:_,endAdornment:w,fullWidth:k=!1,id:y,inputComponent:b="input",inputProps:x={},inputRef:R,maxRows:E,minRows:C,multiline:D=!1,name:A,onBlur:U,onChange:B,onClick:z,onFocus:V,onKeyDown:j,onKeyUp:N,placeholder:G,readOnly:W,render
3365Suffix:q,rows:X,slotProps:J={},slots:Z={},startAdornment:re,type:K="text",value:ne}=s,ee=pe(s,fW),ce=x.value!=null?x.value:ne,{current:ye}=P.useRef(ce!=null),_e=P.useRef(),Oe=P.useCallback(qe=>{},[]),He=nn(_e,R,x.ref,Oe),[we,rt]=P.useState(!1),Le=Na(),wt=Ma({props:s,muiFormControl:Le,states:["color","disabled","error","hiddenLabel","size","required","filled"]});wt.focused=Le?Le.focused:we,P.useEffect(()=>{!Le&&v&&we&&(rt(!1),U&&U())},[Le,v,we,U]);const Mt=Le&&Le.onFilled,Bn=Le&&Le.onEmpty,Tt=P.useCallback(qe=>{T1(qe)?Mt&&Mt():Bn&&Bn()},[Mt,Bn]);Lr(()=>{ye&&Tt({value:ce})},[ce,Tt,ye]);const jn=qe=>{if(wt.disabled){qe.stopPropagation();return}V&&V(qe),x.onFocus&&x.onFocus(qe),Le&&Le.onFocus?Le.onFocus(qe):rt(!0)},Qn=qe=>{U&&U(qe),x.onBlur&&x.onBlur(qe),Le&&Le.onBlur?Le.onBlur(qe):rt(!1)},gt=(qe,...oe)=>{if(!ye){const st=qe.target||_e.current;if(st==null)throw new Error(Yi(1));Tt({value:st.value})}x.onChange&&x.onChange(qe,...oe),B&&B(qe,...oe)};P.useEffect(()=>{Tt(_e.current)},[]);const me=qe=>{_e.current&&qe.currentTarget===qe.target&&_e.current.focus(),z&&z(qe)};let Be=b,Ye=x;D&&Be==="input"&&(X?Ye=M({type:void 0,minRows:X,maxRows:X},Ye):Ye=M({type:void 0,maxRows:E,minRows:C},Ye),Be=oz);const Tn=qe=>{Tt(qe.animationName==="mui-auto-fill-cancel"?_e.current:{value:"x"})};P.useEffect(()=>{Le&&Le.setAdornedStart(Boolean(re))},[Le,re]);const cr=M({},s,{color:wt.color||"primary",disabled:wt.disabled,endAdornment:w,error:wt.error,focused:wt.focused,formControl:Le,fullWidth:k,hiddenLabel:wt.hiddenLabel,multiline:D,size:wt.size,startAdornment:re,type:K}),In=pW(cr),on=Z.root||d.Root||up,dr=J.root||f.root||{},zn=Z.input||d.Input||cp;return Ye=M({},Ye,(i=J.input)!=null?i:f.input),be(P.Fragment,{children:[!_&&gW,be(on,M({},dr,!_h(on)&&{ownerState:M({},cr,dr.ownerState)},{ref:r,onClick:me},ee,{className:Se(In.root,dr.className,c),children:[re,$(k1.Provider,{value:null,children:$(zn,M({ownerState:cr,"aria-invalid":wt.error,"aria-describedby":o,autoComplete:a,autoFocus:l,defaultValue:g,disabled:wt.disabled,id:y,onAnimationStart:Tn,name:A,placeholder:G,readOnly:W,required:wt.required,rows:X,value:ce,onKeyDown:j,onKeyUp:N,type:K},Ye,!_h(zn)&&{as:Be,ownerState:M({},cr,Ye.ownerState)},{ref:He,className:Se(In.input,Ye.className),onBlur:Qn,onChange:gt,onFocus:jn}))}),w,q?q(M({},wt,{startAdornment:re})):null]}))]})}),I1=mW;function yW(t){return Ae("MuiInput",t)}const vW=M({},fa,Re("MuiInput",["root","underline","input"])),dl=vW;function bW(t){return Ae("MuiOutlinedInput",t)}const wW=M({},fa,Re("MuiOutlinedInput",["root","notchedOutline","input"])),yi=wW;function SW(t){return Ae("MuiFilledInput",t)}const CW=M({},fa,Re("MuiFilledInput",["root","underline","input"])),ms=CW,xW=ds($("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function _W(t){return Ae("MuiCard",t)}Re("MuiCard",["root"]);const EW=["className","raised"],kW=t=>{const{classes:e}=t;return Me({root:["root"]},_W,e)},TW=fe(hi,{name:"MuiCard",slot:"Root",overridesResolver:(t,e)=>e.root})(()=>({overflow:"hidden"})),IW=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiCard"}),{className:s,raised:o=!1}=i,a=pe(i,EW),l=M({},i,{raised:o}),c=kW(l);return $(TW,M({className:Se(c.root,s),elevation:o?8:void 0,ref:r,ownerState:l},a))}),BR=IW;function RW(t){return Ae("MuiCircularProgress",t)}Re("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const PW=["className","color","disableShrink","size","style","thickness","value","variant"];let dp=t=>t,HC,qC,KC,YC;const vi=44,AW=os(HC||(HC=dp` 3366 0% { 3367 transform: rotate(0deg); 3368 } 3369 3370 100% { 3371 transform: rotate(360deg); 3372 } 3373`)),OW=os(qC||(qC=dp` 3374 0% { 3375 stroke-dasharray: 1px, 200px; 3376 stroke-dashoffset: 0; 3377 } 3378 3379 50% { 3380 stroke-dasharray: 100px, 200px; 3381 stroke-dashoffset: -15px; 3382 } 3383 3384 100% { 3385 stroke-dasharray: 100px, 200px; 3386 stroke-dashoffset: -125px; 3387 } 3388`)),DW=t=>{const{classes:e,variant:r,color:i,disableShrink:s}=t,o={root:["root",r,`color${he(i)}`],svg:["svg"],circle:["circle",`circle${he(r)}`,s&&"circleDisableShrink"]};return Me(o,RW,e)},MW=fe("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],e[`color${he(r.color)}`]]}})(({ownerState:t,theme:e})=>M({display:"inline-block"},t.variant==="determinate"&&{transition:e.transitions.create("transform")},t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main}),({ownerState:t})=>t.variant==="indeterminate"&&_a(KC||(KC=dp` 3389 animation: ${0} 1.4s linear infinite; 3390 `),AW)),NW=fe("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),$W=fe("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:r}=t;
vendor: 5,049 bytes, lines 3390-3392
3390return[e.circle,e[`circle${he(r.variant)}`],r.disableShrink&&e.circleDisableShrink]}})(({ownerState:t,theme:e})=>M({stroke:"currentColor"},t.variant==="determinate"&&{transition:e.transitions.create("stroke-dashoffset")},t.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink&&_a(YC||(YC=dp` 3391 animation: ${0} 1.4s ease-in-out infinite; 3392 `),OW)),LW=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiCircularProgress"}),{className:s,color:o="primary",disableShrink:a=!1,size:l=40,style:c,thickness:d=3.6,value:f=0,variant:g="indeterminate"}=i,v=pe(i,PW),_=M({},i,{color:o,disableShrink:a,size:l,thickness:d,value:f,variant:g}),w=DW(_),k={},y={},b={};if(g==="determinate"){const x=2*Math.PI*((vi-d)/2);k.strokeDasharray=x.toFixed(3),b["aria-valuenow"]=Math.round(f),k.strokeDashoffset=`${((100-f)/100*x).toFixed(3)}px`,y.transform="rotate(-90deg)"}return $(MW,M({className:Se(w.root,s),style:M({width:l,height:l},y,c),ownerState:_,ref:r,role:"progressbar"},b,v,{children:$(NW,{className:w.svg,ownerState:_,viewBox:`${vi/2} ${vi/2} ${vi} ${vi}`,children:$($W,{className:w.circle,style:k,ownerState:_,cx:vi,cy:vi,r:(vi-d)/2,fill:"none",strokeWidth:d})})}))}),$a=LW,FW=HN({createStyledComponent:fe("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`maxWidth${he(String(r.maxWidth))}`],r.fixed&&e.fixed,r.disableGutters&&e.disableGutters]}}),useThemeProps:t=>Ne({props:t,name:"MuiContainer"})}),ns=FW;function UW(t){return Ae("MuiDialog",t)}const BW=Re("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),_g=BW,jW=P.createContext({}),jR=jW,zW=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],VW=fe(_1,{name:"MuiDialog",slot:"Backdrop",overrides:(t,e)=>e.backdrop})({zIndex:-1}),WW=t=>{const{classes:e,scroll:r,maxWidth:i,fullWidth:s,fullScreen:o}=t,a={root:["root"],container:["container",`scroll${he(r)}`],paper:["paper",`paperScroll${he(r)}`,`paperWidth${he(String(i))}`,s&&"paperFullWidth",o&&"paperFullScreen"]};return Me(a,UW,e)},GW=fe(FR,{name:"MuiDialog",slot:"Root",overridesResolver:(t,e)=>e.root})({"@media print":{position:"absolute !important"}}),HW=fe("div",{name:"MuiDialog",slot:"Container",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.container,e[`scroll${he(r.scroll)}`]]}})(({ownerState:t})=>M({height:"100%","@media print":{height:"auto"},outline:0},t.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},t.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),qW=fe(hi,{name:"MuiDialog",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.paper,e[`scrollPaper${he(r.scroll)}`],e[`paperWidth${he(String(r.maxWidth))}`],r.fullWidth&&e.paperFullWidth,r.fullScreen&&e.paperFullScreen]}})(({theme:t,ownerState:e})=>M({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},e.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},e.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!e.maxWidth&&{maxWidth:"calc(100% - 64px)"},e.maxWidth==="xs"&&{maxWidth:t.breakpoints.unit==="px"?Math.max(t.breakpoints.values.xs,444):`${t.breakpoints.values.xs}${t.breakpoints.unit}`,[`&.${_g.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},e.maxWidth&&e.maxWidth!=="xs"&&{maxWidth:`${t.breakpoints.values[e.maxWidth]}${t.breakpoints.unit}`,[`&.${_g.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[e.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},e.fullWidth&&{width:"calc(100% - 64px)"},e.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${_g.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),KW=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiDialog"}),s=lr(),o={enter:s.transitions.duration.enteringScreen,exit:s.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":l,BackdropComponent:c,BackdropProps:d,children:f,className:g,disableEscapeKeyDown:v=!1,fullScreen:_=!1,fullWidth:w=!1,maxWidth:k="sm",onBackdropClick:y,onClose:b,open:x,PaperComponent:R=hi,PaperProps:E={},scroll:C="paper",TransitionComponent:D=LR,transitionDuration:A=o,TransitionProps:U}=i,B=pe(i,zW),z=M({},i,{disableEscapeKeyDown:v,fullScreen:_,fullWidth:w,maxWidth:k,scroll:C}),V=WW(z),j=P.useRef(),N=X=>{j.current=X.target===X.currentTarget},G=X=>
3392{j.current&&(j.current=null,y&&y(X),b&&b(X,"backdropClick"))},W=$v(l),q=P.useMemo(()=>({titleId:W}),[W]);return $(GW,M({className:Se(V.root,g),closeAfterTransition:!0,components:{Backdrop:VW},componentsProps:{backdrop:M({transitionDuration:A,as:c},d)},disableEscapeKeyDown:v,onClose:b,open:x,ref:r,onClick:G,ownerState:z},B,{children:$(D,M({appear:!0,in:x,timeout:A,role:"presentation"},U,{children:$(HW,{className:Se(V.container),onMouseDown:N,ownerState:z,children:$(qW,M({as:R,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":W},E,{className:Se(V.paper,E.className),ownerState:z,children:$(jR.Provider,{value:q,children:f})}))})}))}))}),zR=KW;function YW(t){return Ae("MuiDialogActions",t)}Re("MuiDialogActions",["root","spacing"]);const XW=["className","disableSpacing"],QW=t=>{const{classes:e,disableSpacing:r}=t;return Me({root:["root",!r&&"spacing"]},YW,e)},JW=fe("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,!r.disableSpacing&&e.spacing]}})(({ownerState:t})=>M({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(:first-of-type)":{marginLeft:8}})),ZW=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiDialogActions"}),{className:s,disableSpacing:o=!1}=i,a=pe(i,XW),l=M({},i,{disableSpacing:o}),c=QW(l);return $(JW,M({className:Se(c.root,s),ownerState:l,ref:r},a))}),VR=ZW;function eG(t){return Ae("MuiDialogContent",t)}Re("MuiDialogContent",["root","dividers"]);function tG(t){return Ae("MuiDialogTitle",t)}const nG=Re("MuiDialogTitle",["root"]),rG=nG,iG=["className","dividers"],sG=t=>{const{classes:e,dividers:r}=t;return Me({root:["root",r&&"dividers"]},eG,e)},oG=fe("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.dividers&&e.dividers]}})(({theme:t,ownerState:e})=>M({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},e.dividers?{padding:"16px 24px",borderTop:`1px solid ${(t.vars||t).palette.divider}`,borderBottom:`1px solid ${(t.vars||t).palette.divider}`}:{[`.${rG.root} + &`]:{paddingTop:0}})),aG=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiDialogContent"}),{className:s,dividers:o=!1}=i,a=pe(i,iG),l=M({},i,{dividers:o}),c=sG(l);return $(oG,M({className:Se(c.root,s),ownerState:l,ref:r},a))}),WR=aG,lG=["className","id"],uG=t=>{const{classes:e}=t;return Me({root:["root"]},tG,e)},cG=fe(cn,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(t,e)=>e.root})({padding:"16px 24px",flex:"0 0 auto"}),dG=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiDialogTitle"}),{className:s,id:o}=i,a=pe(i,lG),l=i,c=uG(l),{titleId:d=o}=P.useContext(jR);return $(cG,M({component:"h2",className:Se(c.root,s),ownerState:l,ref:r,variant:"h6",id:d},a))}),GR=dG,hG=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],fG=t=>{const{classes:e,disableUnderline:r}=t,s=Me({root:["root",!r&&"underline"],input:["input"]},SW,e);return M({},e,s)},pG=fe(up,{shouldForwardProp:t=>Br(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[...ap(t,e),!r.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{var r;const i=t.palette.mode==="light",s=i?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=i?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=i?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=i?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return M({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:a,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o}},[`&.${ms.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o},[`&.${ms.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:l}},!e.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(r=(t.vars||t).palette[e.color||"primary"])==null?void 0:r.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ms.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ms.error}`]:{"&:before, &:after":{borderBottomColor:(t.vars||t).palette.error.main},"&:focus-within:after":{transform:"scaleX(1)"}},"&:before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroun
vendor: 7,560 bytes, line 3392
3392dChannel} / ${t.vars.opacity.inputUnderline})`:s}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ms.disabled}, .${ms.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${ms.disabled}:before`]:{borderBottomStyle:"dotted"}},e.startAdornment&&{paddingLeft:12},e.endAdornment&&{paddingRight:12},e.multiline&&M({padding:"25px 12px 8px"},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17}))}),gG=fe(cp,{name:"MuiFilledInput",slot:"Input",overridesResolver:lp})(({theme:t,ownerState:e})=>M({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9})),HR=P.forwardRef(function(e,r){var i,s,o,a;const l=Ne({props:e,name:"MuiFilledInput"}),{components:c={},componentsProps:d,fullWidth:f=!1,inputComponent:g="input",multiline:v=!1,slotProps:_,slots:w={},type:k="text"}=l,y=pe(l,hG),b=M({},l,{fullWidth:f,inputComponent:g,multiline:v,type:k}),x=fG(l),R={root:{ownerState:b},input:{ownerState:b}},E=_??d?Ln(_??d,R):R,C=(i=(s=w.root)!=null?s:c.Root)!=null?i:pG,D=(o=(a=w.input)!=null?a:c.Input)!=null?o:gG;return $(I1,M({slots:{root:C,input:D},componentsProps:E,fullWidth:f,inputComponent:g,multiline:v,ref:r,type:k},y,{classes:x}))});HR.muiName="Input";const qR=HR;function mG(t){return Ae("MuiFormControl",t)}Re("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const yG=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],vG=t=>{const{classes:e,margin:r,fullWidth:i}=t,s={root:["root",r!=="none"&&`margin${he(r)}`,i&&"fullWidth"]};return Me(s,mG,e)},bG=fe("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:t},e)=>M({},e.root,e[`margin${he(t.margin)}`],t.fullWidth&&e.fullWidth)})(({ownerState:t})=>M({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},t.margin==="normal"&&{marginTop:16,marginBottom:8},t.margin==="dense"&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})),wG=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiFormControl"}),{children:s,className:o,color:a="primary",component:l="div",disabled:c=!1,error:d=!1,focused:f,fullWidth:g=!1,hiddenLabel:v=!1,margin:_="none",required:w=!1,size:k="medium",variant:y="outlined"}=i,b=pe(i,yG),x=M({},i,{color:a,component:l,disabled:c,error:d,fullWidth:g,hiddenLabel:v,margin:_,required:w,size:k,variant:y}),R=vG(x),[E,C]=P.useState(()=>{let N=!1;return s&&P.Children.forEach(s,G=>{if(!md(G,["Input","Select"]))return;const W=md(G,["Select"])?G.props.input:G;W&&cW(W.props)&&(N=!0)}),N}),[D,A]=P.useState(()=>{let N=!1;return s&&P.Children.forEach(s,G=>{md(G,["Input","Select"])&&T1(G.props,!0)&&(N=!0)}),N}),[U,B]=P.useState(!1);c&&U&&B(!1);const z=f!==void 0&&!c?f:U;let V;const j=P.useMemo(()=>({adornedStart:E,setAdornedStart:C,color:a,disabled:c,error:d,filled:D,focused:z,fullWidth:g,hiddenLabel:v,size:k,onBlur:()=>{B(!1)},onEmpty:()=>{A(!1)},onFilled:()=>{A(!0)},onFocus:()=>{B(!0)},registerEffect:V,required:w,variant:y}),[E,a,c,d,D,z,g,v,V,w,k,y]);return $(k1.Provider,{value:j,children:$(bG,M({as:l,ownerState:x,className:Se(R.root,o),ref:r},b,{children:s}))})}),SG=wG;function CG(t){return Ae("MuiFormHelperText",t)}const xG=Re("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),XC=xG;var QC;const _G=["children","className","component","disabled","error","filled","focused","margin","required","variant"],EG=t=>{const{classes:e,contained:r,size:i,disabled:s,error:o,filled:a,focused:l,required:c}=t,d={root:["root",s&&"disabled",o&&"error",i&&`size${he(i)}`,r&&"contained",l&&"focused",a&&"filled",c&&"required"]};return Me(d,CG,e)},kG=fe("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.size&&e[`size${he(r.size)}`],r.contained&&e.contained,r.filled&&e.filled]}})(({theme:t,ownerState:e})=>M({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${XC.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${XC.error}`]:{color:(t.vars||t).palette.error.main}},e.size==="small"&&{marginTop:4},e.contained&&{marginLeft:14,marginRight:14})),TG=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiFormHelperText"}),{children:s,className:o,component:a="p"}=i,l=pe(i,_G),c=Na(),d=Ma({props:i,muiFormControl:c,states:["variant","size","disabled","error","filled","focused","required"]}),f=M({},i,{component:a,contained:d.variant==="filled"||d.variant==="outlined",variant:d.variant,size:d.size,disabled:d.disabled,error:d.error,filled:d.filled,focused:d.focused,required:d.required}),g=EG(f);return $(kG,M({as:a,ownerState:f,className:Se(g.root,o),ref:r},l,{children:s===" "?QC||(QC=$("span",{className:"notranslate",children:"​"})):s}))}),IG=TG;function RG(t){return Ae("MuiFormLabel",t)}const PG=Re("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Jl=PG,AG=["children","className","color","component","disabled","error","filled","focused","required"],OG=t=>{const{classes:e,color:r,focused:i,disabled:s,error:o,filled:a,required:l}=t,c={root:["root",`color${he(r)}`,s&&"disabled",o&&"error",a&&"filled",i&&"focused",l&&"required"],asterisk:["asterisk",o&&"error"]};return Me(c,RG,e)},DG=fe("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:t},e)=>M({},e.root,t.color==="secondary"&&e.colorSecondary,t.filled&&e.filled)})(({theme:t,ownerState:e})=>M({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${Jl.focused}`]:{color:(t.vars||t).palette[e.color].main},[`&.${Jl.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Jl.error}`]:{color:(t.vars||t).palette.error.main}})),MG=fe("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${Jl.error}`]:{color:(t.vars||t).palette.error.main}})),NG=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiFormLabel"}),{children:s,className:o,component:a="label"}=i,l=pe(i,AG),c=Na(),d=Ma({props:i,muiFormControl:c,states:["color","required","focused","disabled","error","filled"]}),f=M({},i,{color:d.color||"primary",component:a,disabled:d.disabled,error:d.error,filled:d.filled,focused:d.focused,required:d.required}),g=OG(f);return be(DG,M({as:a,ownerState:f,className:Se(g.root,o),ref:r},l,{children:[s,d.required&&be(MG,{ownerState:f,"aria-hidden":!0,
3392className:g.asterisk,children:[" ","*"]})]}))}),$G=NG,LG=P.createContext(),JC=LG;function FG(t){return Ae("MuiGrid",t)}const UG=[0,1,2,3,4,5,6,7,8,9,10],BG=["column-reverse","column","row-reverse","row"],jG=["nowrap","wrap-reverse","wrap"],hl=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],zG=Re("MuiGrid",["root","container","item","zeroMinWidth",...UG.map(t=>`spacing-xs-${t}`),...BG.map(t=>`direction-xs-${t}`),...jG.map(t=>`wrap-xs-${t}`),...hl.map(t=>`grid-xs-${t}`),...hl.map(t=>`grid-sm-${t}`),...hl.map(t=>`grid-md-${t}`),...hl.map(t=>`grid-lg-${t}`),...hl.map(t=>`grid-xl-${t}`)]),Lu=zG,VG=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function Qo(t){const e=parseFloat(t);return`${e}${String(t).replace(String(e),"")||"px"}`}function WG({theme:t,ownerState:e}){let r;return t.breakpoints.keys.reduce((i,s)=>{let o={};if(e[s]&&(r=e[s]),!r)return i;if(r===!0)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(r==="auto")o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=sf({values:e.columns,breakpoints:t.breakpoints.values}),l=typeof a=="object"?a[s]:a;if(l==null)return i;const c=`${Math.round(r/l*1e8)/1e6}%`;let d={};if(e.container&&e.item&&e.columnSpacing!==0){const f=t.spacing(e.columnSpacing);if(f!=="0px"){const g=`calc(${c} + ${Qo(f)})`;d={flexBasis:g,maxWidth:g}}}o=M({flexBasis:c,flexGrow:0,maxWidth:c},d)}return t.breakpoints.values[s]===0?Object.assign(i,o):i[t.breakpoints.up(s)]=o,i},{})}function GG({theme:t,ownerState:e}){const r=sf({values:e.direction,breakpoints:t.breakpoints.values});return sr({theme:t},r,i=>{const s={flexDirection:i};return i.indexOf("column")===0&&(s[`& > .${Lu.item}`]={maxWidth:"none"}),s})}function KR({breakpoints:t,values:e}){let r="";Object.keys(e).forEach(s=>{r===""&&e[s]!==0&&(r=s)});const i=Object.keys(t).sort((s,o)=>t[s]-t[o]);return i.slice(0,i.indexOf(r))}function HG({theme:t,ownerState:e}){const{container:r,rowSpacing:i}=e;let s={};if(r&&i!==0){const o=sf({values:i,breakpoints:t.breakpoints.values});let a;typeof o=="object"&&(a=KR({breakpoints:t.breakpoints.values,values:o})),s=sr({theme:t},o,(l,c)=>{var d;const f=t.spacing(l);return f!=="0px"?{marginTop:`-${Qo(f)}`,[`& > .${Lu.item}`]:{paddingTop:Qo(f)}}:(d=a)!=null&&d.includes(c)?{}:{marginTop:0,[`& > .${Lu.item}`]:{paddingTop:0}}})}return s}function qG({theme:t,ownerState:e}){const{container:r,columnSpacing:i}=e;let s={};if(r&&i!==0){const o=sf({values:i,breakpoints:t.breakpoints.values});let a;typeof o=="object"&&(a=KR({breakpoints:t.breakpoints.values,values:o})),s=sr({theme:t},o,(l,c)=>{var d;const f=t.spacing(l);return f!=="0px"?{width:`calc(100% + ${Qo(f)})`,marginLeft:`-${Qo(f)}`,[`& > .${Lu.item}`]:{paddingLeft:Qo(f)}}:(d=a)!=null&&d.includes(c)?{}:{width:"100%",marginLeft:0,[`& > .${Lu.item}`]:{paddingLeft:0}}})}return s}function KG(t,e,r={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[r[`spacing-xs-${String(t)}`]];const i=[];return e.forEach(s=>{const o=t[s];Number(o)>0&&i.push(r[`spacing-${s}-${String(o)}`])}),i}const YG=fe("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t,{container:i,direction:s,item:o,spacing:a,wrap:l,zeroMinWidth:c,breakpoints:d}=r;let f=[];i&&(f=KG(a,d,e));const g=[];return d.forEach(v=>{const _=r[v];_&&g.push(e[`grid-${v}-${String(_)}`])}),[e.root,i&&e.container,o&&e.item,c&&e.zeroMinWidth,...f,s!=="row"&&e[`direction-xs-${String(s)}`],l!=="wrap"&&e[`wrap-xs-${String(l)}`],...g]}})(({ownerState:t})=>M({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},t.wrap!=="wrap"&&{flexWrap:t.wrap}),GG,HG,qG,WG);function XG(t,e){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const r=[];return e.forEach(i=>{const s=t[i];if(Number(s)>0){const o=`spacing-${i}-${String(s)}`;r.push(o)}}),r}const QG=t=>{const{classes:e,container:r,direction:i,item:s,spacing:o,wrap:a,zeroMinWidth:l,breakpoints:c}=t;let d=[];r&&(d=XG(o,c));const f=[];
3392c.forEach(v=>{const _=t[v];_&&f.push(`grid-${v}-${String(_)}`)});const g={root:["root",r&&"container",s&&"item",l&&"zeroMinWidth",...d,i!=="row"&&`direction-xs-${String(i)}`,a!=="wrap"&&`wrap-xs-${String(a)}`,...f]};return Me(g,FG,e)},JG=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiGrid"}),{breakpoints:s}=lr(),o=Qv(i),{className:a,columns:l,columnSpacing:c,component:d="div",container:f=!1,direction:g="row",item:v=!1,rowSpacing:_,spacing:w=0,wrap:k="wrap",zeroMinWidth:y=!1}=o,b=pe(o,VG),x=_||w,R=c||w,E=P.useContext(JC),C=f?l||12:E,D={},A=M({},b);s.keys.forEach(z=>{b[z]!=null&&(D[z]=b[z],delete A[z])});const U=M({},o,{columns:C,container:f,direction:g,item:v,rowSpacing:x,columnSpacing:R,wrap:k,zeroMinWidth:y,spacing:w},D,{breakpoints:s.keys}),B=QG(U);return $(JC.Provider,{value:C,children:$(YG,M({ownerState:U,className:Se(B.root,a),as:d,ref:r},A))})}),Yt=JG;function ZG(t,e,r,i,s){const o=typeof window<"u"&&typeof window.matchMedia<"u",[a,l]=P.useState(()=>s&&o?r(t).matches:i?i(t).matches:e);return Lr(()=>{let c=!0;if(!o)return;const d=r(t),f=()=>{c&&l(d.matches)};return f(),d.addListener(f),()=>{c=!1,d.removeListener(f)}},[t,r,o]),a}const YR=js["useSyncExternalStore"];function e9(t,e,r,i){const s=P.useCallback(()=>e,[e]),o=P.useMemo(()=>{if(i!==null){const{matches:d}=i(t);return()=>d}return s},[s,t,i]),[a,l]=P.useMemo(()=>{if(r===null)return[s,()=>()=>{}];const d=r(t);return[()=>d.matches,f=>(d.addListener(f),()=>{d.removeListener(f)})]},[s,r,t]);return YR(l,a,o)}function t9(t,e={}){const r=sk(),i=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:s=!1,matchMedia:o=i?window.matchMedia:null,ssrMatchMedia:a=null,noSsr:l}=Zv({name:"MuiUseMediaQuery",props:e,theme:r});let c=typeof t=="function"?t(r):t;return c=c.replace(/^@media( ?)/m,""),(YR!==void 0?e9:ZG)(c,s,o,a,l)}const n9=["initialWidth","width"],Ai=["xs","sm","md","lg","xl"],r9=(t,e,r=!0)=>r?Ai.indexOf(t)<=Ai.indexOf(e):Ai.indexOf(t)<Ai.indexOf(e),i9=(t,e,r=!1)=>r?Ai.indexOf(e)<=Ai.indexOf(t):Ai.indexOf(e)<Ai.indexOf(t),s9=(t={})=>e=>{const{withTheme:r=!1,noSSR:i=!1,initialWidth:s}=t;function o(a){const l=lr(),c=a.theme||l,d=Zv({theme:c,name:"MuiWithWidth",props:a}),{initialWidth:f,width:g}=d,v=pe(d,n9),[_,w]=P.useState(!1);Lr(()=>{w(!0)},[]);const y=c.breakpoints.keys.slice().reverse().reduce((x,R)=>{const E=t9(c.breakpoints.up(R));return!x&&E?R:x},null),b=M({width:g||(_||i?y:void 0)||f||s},r?{theme:c}:{},v);return b.width===void 0?null:$(e,M({},b))}return o},o9=s9;function a9(t){const{children:e,only:r,width:i}=t,s=lr();let o=!0;if(r)if(Array.isArray(r))for(let a=0;a<r.length;a+=1){const l=r[a];if(i===l){o=!1;break}}else r&&i===r&&(o=!1);if(o)for(let a=0;a<s.breakpoints.keys.length;a+=1){const l=s.breakpoints.keys[a],c=t[`${l}Up`],d=t[`${l}Down`];if(c&&r9(l,i)||d&&i9(l,i)){o=!1;break}}return o?$(P.Fragment,{children:e}):null}const l9=o9()(a9);function u9(t){return Ae("PrivateHiddenCss",t)}Re("PrivateHiddenCss",["root","xlDown","xlUp","onlyXl","lgDown","lgUp","onlyLg","mdDown","mdUp","onlyMd","smDown","smUp","onlySm","xsDown","xsUp","onlyXs"]);const c9=["children","className","only"],d9=t=>{const{classes:e,breakpoints:r}=t,i={root:["root",...r.map(({breakpoint:s,dir:o})=>o==="only"?`${o}${he(s)}`:`${s}${he(o)}`)]};return Me(i,u9,e)},h9=fe("div",{name:"PrivateHiddenCss",slot:"Root"})(({theme:t,ownerState:e})=>{const r={display:"none"};return M({},e.breakpoints.map(({breakpoint:i,dir:s})=>s==="only"?{[t.breakpoints.only(i)]:r}:s==="up"?{[t.breakpoints.up(i)]:r}:{[t.breakpoints.down(i)]:r}).reduce((i,s)=>(Object.keys(s).forEach(o=>{i[o]=s[o]}),i),{}))});function f9(t){const{children:e,className:r,only:i}=t,s=pe(t,c9),o=lr(),a=[];for(let d=0;d<o.breakpoints.keys.length;d+=1){const f=o.breakpoints.keys[d],g=s[`${f}Up`],v=s[`${f}Down`];g&&a.push({breakpoint:f,dir:"up"}),v&&a.push({breakpoint:f,dir:"down"})}i&&(Array.isArray(i)?i:[i]).forEach(f=>{a.push({breakpoint:f,dir:"only"})});const l=M({},t,{breakpoints:a}),c=d9(l);return $(h9,{className:Se(c.root,r),ownerState:l,children:e})}const p9=["implementation","lgDown","lgUp","mdDown","mdUp","smDown","smUp","xlDown","xlUp","xsDown","xsUp"];function ZC(t){const{implementation:e="js",lgDown:r=!1,lgUp:i=!1,mdDown:s=!1,mdUp:o=!1,smDown:a=!1,smUp:l=!1,xlDown:c=!1,xlUp:d=!1,xsDown:f=!1,xsUp:g=!1}=t,v=pe(t,p9);return e==="js"?$(l9,M({lgDown:r,lgUp:i,mdDown:s,mdUp:o,smDown:a,smUp:l,xlDown:c,xlUp:d,xsDown:f,xsUp:g},v)):$(f9,M({lgDown:r,lgUp:i,mdDown:s,mdUp:o,smDown:a,smUp:l,xlDown:c,xlUp:d,xsDown:f,xsUp:g},v))}const g9=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","
3392slots","type"],m9=t=>{const{classes:e,disableUnderline:r}=t,s=Me({root:["root",!r&&"underline"],input:["input"]},yW,e);return M({},e,s)},y9=fe(up,{shouldForwardProp:t=>Br(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[...ap(t,e),!r.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{let i=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(i=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),M({position:"relative"},e.formControl&&{"label + &":{marginTop:16}},!e.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(t.vars||t).palette[e.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${dl.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${dl.error}`]:{"&:before, &:after":{borderBottomColor:(t.vars||t).palette.error.main},"&:focus-within:after":{transform:"scaleX(1)"}},"&:before":{borderBottom:`1px solid ${i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${dl.disabled}, .${dl.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${i}`}},[`&.${dl.disabled}:before`]:{borderBottomStyle:"dotted"}})}),v9=fe(cp,{name:"MuiInput",slot:"Input",overridesResolver:lp})({}),XR=P.forwardRef(function(e,r){var i,s,o,a;const l=Ne({props:e,name:"MuiInput"}),{disableUnderline:c,components:d={},componentsProps:f,fullWidth:g=!1,inputComponent:v="input",multiline:_=!1,slotProps:w,slots:k={},type:y="text"}=l,b=pe(l,g9),x=m9(l),E={root:{ownerState:{disableUnderline:c}}},C=w??f?Ln(w??f,E):E,D=(i=(s=k.root)!=null?s:d.Root)!=null?i:y9,A=(o=(a=k.input)!=null?a:d.Input)!=null?o:v9;return $(I1,M({slots:{root:D,input:A},slotProps:C,fullWidth:g,inputComponent:v,multiline:_,ref:r,type:y},b,{classes:x}))});XR.muiName="Input";const QR=XR;function b9(t){return Ae("MuiInputLabel",t)}Re("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const w9=["disableAnimation","margin","shrink","variant","className"],S9=t=>{const{classes:e,formControl:r,size:i,shrink:s,disableAnimation:o,variant:a,required:l}=t,d=Me({root:["root",r&&"formControl",!o&&"animated",s&&"shrink",i==="small"&&"sizeSmall",a],asterisk:[l&&"asterisk"]},b9,e);return M({},e,d)},C9=fe($G,{shouldForwardProp:t=>Br(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${Jl.asterisk}`]:e.asterisk},e.root,r.formControl&&e.formControl,r.size==="small"&&e.sizeSmall,r.shrink&&e.shrink,!r.disableAnimation&&e.animated,e[r.variant]]}})(({theme:t,ownerState:e})=>M({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},e.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},e.size==="small"&&{transform:"translate(0, 17px) scale(1)"},e.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!e.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},e.variant==="filled"&&M({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},e.shrink&&M({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},e.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),e.variant==="outlined"&&M({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},e.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 24px)",transform:"translate(14px, -9px) scale(0.75)"}))),x9=P.forwardRef(function(e,r){const i=Ne({name:"MuiInputLabel",props:e}),{disableAnimation:s=!1,shrink:o,className:a}=i,l=pe(i,w9),c=Na();let d=o;typeof d>"u"&&c&&(d=c.filled||c.focused||c.adornedStart);const f=Ma({props:i,muiFormControl:c,states:["size","variant","required"]}),g=M({},i,{disableAnimation:s,formControl:c,shrink:d,size:f.size,variant:f.variant,required:f.required}),v=S9(g);return $(C9,M({"data-shrink":d,ownerState:g,ref:r,className:Se(v.root,a)},l,{classes:v}))}),_9=x9;function E9(t){return Ae("MuiLinearProgress",t)}Re("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const k9=["className","color","value","valueBuffer","variant"];let La=t=>t,ex,tx,nx,rx,ix,sx;const _y=4,T9=os(ex||(ex=La` 3393 0% { 3394 left: -35%; 3395 right: 100%; 3396 } 3397 3398 60% { 3399 left: 100%; 3400 right: -90%; 3401 } 3402 3403 100% { 3404 left: 100%; 3405 right: -90%; 3406 } 3407`)),I9=os(tx||(tx=La` 3408 0% { 3409 left: -200%; 3410 right: 100%; 3411 } 3412 3413 60% { 3414 left: 107%; 3415 right: -8%; 3416 } 3417 3418 100% { 3419 left: 107%; 3420 right: -8%; 3421 } 3422`)),R9=os(nx||(nx=La` 3423 0% { 3424 opacity: 1; 3425 background-position: 0 -23px; 3426 } 3427 3428 60% { 3429 opacity: 0; 3430 background-position: 0 -23px; 3431 } 3432 3433 100% { 3434 opacity: 1; 3435 background-position: -200px -23px; 3436 } 3437`)),P9=t=>{const{classes:e,variant:r,color:i}=t,s={root:["root",`color${he(i)}`,r],dashed:["dashed",`dashedColor${he(i)}`],bar1:["bar",`barColor${he(i)}`,(r==="indeterminate"||r==="query")&&"bar1Indeterminate",r==="determinate"&&"bar1Determinate",r==="buffer"&&"bar1Buffer"],bar2:["bar",r!=="buffer"&&`barColor${he(i)}`,r==="buffer"&&`color${he(i)}`,(r==="indeterminate"||r==="query")&&"bar2Indeterminate",r==="buffer"&&"bar2Buffer"]};return Me(s,E9,e)},R1=(t,e)=>e==="inherit"?"currentColor":t.vars?t.vars.palette.LinearProgress[`${e}Bg`]:t.palette.mode==="light"?ia(t.palette[e].main,.62):ra(t.palette[e].main,.5),A9=fe("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`color${he(r.color)}`],e[r.variant]]}})(({ownerState:t,theme:e})=>M({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:R1(e,t.color)},t.color==="inherit"&&t.variant!=="buffer"&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},t.variant==="buffer"&&{backgroundColor:"transparent"},t.variant==="query"&&{transform:"rotate(180deg)"})),O9=fe("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.dashed,e[`dashedColor${he(r.color)}`]]}})(({ownerState:t,theme:e})=>{const r=R1(e,t.color);return M({position:"absolute",marginTop:0,height:"100%",width:"100%"},t.color==="inherit"&&{opacity:.3},{backgroundImage:`radial-gradient(${r} 0%, ${r} 16%, transparent 42%)`,backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})},_a(rx||(rx=La` 3438 animation: ${0} 3s infinite linear; 3439 `),R9)),D9=fe("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.bar,e[`barColor${he(r.color)}`],(r.variant==="indeterminate"||r.variant==="query")&&e.bar1Indeterminate,r.variant==="determinate"&&e.bar1Determinate,r.variant==="buffer"&&e.bar1Buffer]}})(({ownerState:t,theme:e})=>M({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:t.color==="inherit"?"currentColor":(e.vars||e).palette[t.color].main},t.variant==="determinate"&&{transition:`transform .${_y}s linear`},t.variant==="buffer"&&{zIndex:1,transition:`transform .${_y}s linear`}),({ownerState:t})=>(t.variant==="indeterminate"||t.variant==="query")&&_a(ix||(ix=La` 3440 width: auto; 3441 animation: ${0} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; 3442 `),T9)),M9=fe("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.bar,e[`barColor${he(r.color)}`],(r.variant==="indeterminate"||r.variant==="query")&&e.bar2Indeterminate,r.variant==="buffer"&&e.bar2Buffer]}})(({ownerState:t,theme:e})=>M({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},t.variant!=="buffer"&&{backgroundColor:t.color==="inherit"?"currentColor":(e.vars||e).palette[t.color].main},t.color==="inherit"&&{opacity:.3},t.variant==="buffer"&&{backgroundColor:R1(e,t.color),transition:`transform .${_y}s linear`}),({ownerState:t})=>(t.variant==="indeterminate"||t.variant==="query")&&_a(sx||(sx=La` 3443 width: auto; 3444 animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; 3445 `),I9)),N9=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiLinearProgress"}),{className:s,color:o="primary",value:a,valueBuffer:l,variant:c="indeterminate"}=i,d=pe(i,k9),f=M({},i,{color:o,variant:c}),g=P9(f),v=lr(),_={},w={bar1:{},bar2:{}};if((c==="determinate"||c==="buffer")&&a!==void 0){_["aria-valuenow"]=Math.round(a),_["aria-valuemin"]=0,_["aria-valuemax"]=100;let k=a-100;v.direction==="rtl"&&(k=-k),w.bar1.transform=`translateX(${k}%)`}if(c==="buffer"&&l!==void 0){let k=(l||0)-100;v.direction==="rtl"&&(k=-k),w.bar2.transform=`translateX(${k}%)`}return be(A9,M({className:Se(g.root,s),ownerState:f,role:"progressbar"},_,{ref:r},d,{children:[c==="buffer"?$(O9,{className:g.dashed,ownerState:f}):null,$(D9,{className:g.bar1,ownerState:f,style:w.bar1}),c==="determinate"?null:$(M9,{className:g.bar2,ownerState:f,style:w.bar2})]}))}),$9=N9;function L9(t){return Ae("MuiNativeSelect",t)}const F9=Re("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]),P1=F9,U9=["className","disabled","IconComponent","inputRef","variant"],B9=t=>{const{classes:e,variant:r,disabled:i,multiple:s,open:o}=t,a={select:["select",r,i&&"disabled",s&&"multiple"],icon:["icon",`icon${he(r)}`,o&&"iconOpen",i&&"disabled"]};return Me(a,L9,e)},JR=({ownerState:t,theme:e})=>M({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":M({},e.vars?{backgroundColor:`rgba(${e.vars.palette.common.onBackgroun
3445dChannel} / 0.05)`}:{backgroundColor:e.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${P1.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},t.variant==="filled"&&{"&&&":{paddingRight:32}},t.variant==="outlined"&&{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}),j9=fe("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Br,overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.select,e[r.variant],{[`&.${P1.multiple}`]:e.multiple}]}})(JR),ZR=({ownerState:t,theme:e})=>M({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${P1.disabled}`]:{color:(e.vars||e).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},t.variant==="filled"&&{right:7},t.variant==="outlined"&&{right:7}),z9=fe("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.icon,r.variant&&e[`icon${he(r.variant)}`],r.open&&e.iconOpen]}})(ZR),V9=P.forwardRef(function(e,r){const{className:i,disabled:s,IconComponent:o,inputRef:a,variant:l="standard"}=e,c=pe(e,U9),d=M({},e,{disabled:s,variant:l}),f=B9(d);return be(P.Fragment,{children:[$(j9,M({ownerState:d,className:Se(f.select,i),disabled:s,ref:a||r},c)),e.multiple?null:$(z9,{as:o,ownerState:d,className:f.icon})]})}),W9=V9;var ox;const G9=["children","classes","className","label","notched"],H9=fe("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),q9=fe("legend")(({ownerState:t,theme:e})=>M({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},t.withLabel&&M({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})})));function K9(t){const{className:e,label:r,notched:i}=t,s=pe(t,G9),o=r!=null&&r!=="",a=M({},t,{notched:i,withLabel:o});return $(H9,M({"aria-hidden":!0,className:e,ownerState:a},s,{children:$(q9,{ownerState:a,children:o?$("span",{children:r}):ox||(ox=$("span",{className:"notranslate",children:"​"}))})}))}const Y9=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],X9=t=>{const{classes:e}=t,i=Me({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},bW,e);return M({},e,i)},Q9=fe(up,{shouldForwardProp:t=>Br(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:ap})(({theme:t,ownerState:e})=>{const r=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return M({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${yi.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${yi.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:r}},[`&.${yi.focused} .${yi.notchedOutline}`]:{borderColor:(t.vars||t).palette[e.color].main,borderWidth:2},[`&.${yi.error} .${yi.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${yi.disabled} .${yi.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}},e.startAdornment&&{paddingLeft:14},e.endAdornment&&{paddingRight:14},e.multiline&&M({padding:"16.5px 14px"},e.size==="small"&&{padding:"8.5px 14px"}))}),J9=fe(K9,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroun
3445dChannel} / 0.23)`:e}}),Z9=fe(cp,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:lp})(({theme:t,ownerState:e})=>M({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{padding:"8.5px 14px"},e.multiline&&{padding:0},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0})),eP=P.forwardRef(function(e,r){var i,s,o,a,l;const c=Ne({props:e,name:"MuiOutlinedInput"}),{components:d={},fullWidth:f=!1,inputComponent:g="input",label:v,multiline:_=!1,notched:w,slots:k={},type:y="text"}=c,b=pe(c,Y9),x=X9(c),R=Na(),E=Ma({props:c,muiFormControl:R,states:["required"]}),C=M({},c,{color:E.color||"primary",disabled:E.disabled,error:E.error,focused:E.focused,formControl:R,fullWidth:f,hiddenLabel:E.hiddenLabel,multiline:_,size:E.size,type:y}),D=(i=(s=k.root)!=null?s:d.Root)!=null?i:Q9,A=(o=(a=k.input)!=null?a:d.Input)!=null?o:Z9;return $(I1,M({slots:{root:D,input:A},renderSuffix:U=>$(J9,{ownerState:C,className:x.notchedOutline,label:v!=null&&v!==""&&E.required?l||(l=be(P.Fragment,{children:[v," ","*"]})):v,notched:typeof w<"u"?w:Boolean(U.startAdornment||U.filled||U.focused)}),fullWidth:f,inputComponent:g,multiline:_,ref:r,type:y},b,{classes:M({},x,{notchedOutline:null})}))});eP.muiName="Input";const tP=eP;function eH(t){return Ae("MuiSelect",t)}const tH=Re("MuiSelect",["select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]),nd=tH;var ax;const nH=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],rH=fe("div",{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`&.${nd.select}`]:e.select},{[`&.${nd.select}`]:e[r.variant]},{[`&.${nd.multiple}`]:e.multiple}]}})(JR,{[`&.${nd.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),iH=fe("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.icon,r.variant&&e[`icon${he(r.variant)}`],r.open&&e.iconOpen]}})(ZR),sH=fe("input",{shouldForwardProp:t=>I$(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,e)=>e.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function lx(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function oH(t){return t==null||typeof t=="string"&&!t.trim()}const aH=t=>{const{classes:e,variant:r,disabled:i,multiple:s,open:o}=t,a={select:["select",r,i&&"disabled",s&&"multiple"],icon:["icon",`icon${he(r)}`,o&&"iconOpen",i&&"disabled"],nativeInput:["nativeInput"]};return Me(a,eH,e)},lH=P.forwardRef(function(e,r){const{"aria-describedby":i,"aria-label":s,autoFocus:o,autoWidth:a,children:l,className:c,defaultOpen:d,defaultValue:f,disabled:g,displayEmpty:v,IconComponent:_,inputRef:w,labelId:k,MenuProps:y={},multiple:b,name:x,onBlur:R,onChange:E,onClose:C,onFocus:D,onOpen:A,open:U,readOnly:B,renderValue:z,SelectDisplayProps:V={},tabIndex:j,value:N,variant:G="standard"}=e,W=pe(e,nH),[q,X]=Rm({controlled:N,default:f,name:"Select"}),[J,Z]=Rm({controlled:U,default:d,name:"Select"}),re=P.useRef(null),K=P.useRef(null),[ne,ee]=P.useState(null),{current:ce}=P.useRef(U!=null),[ye,_e]=P.useState(),Oe=nn(r,w),He=P.useCallback(oe=>{K.current=oe,oe&&ee(oe)},[]),we=ne==null?void 0:ne.parentNode;P.useImperativeHandle(Oe,()=>({focus:()=>{K.current.focus()},node:re.current,value:q}),[q]),P.useEffect(()=>{d&&J&&ne&&!ce&&(_e(a?null:we.clientWidth),K.current.focus())},[ne,a]),P.useEffect(()=>{o&&K.current.focus()},[o]),P.useEffect(()=>{if(!k)return;const oe=Jt(K.current).getElementById(k);if(oe){const st=()=>{getSelection().isCollapsed&&K.current.focus()};
3445return oe.addEventListener("click",st),()=>{oe.removeEventListener("click",st)}}},[k]);const rt=(oe,st)=>{oe?A&&A(st):C&&C(st),ce||(_e(a?null:we.clientWidth),Z(oe))},Le=oe=>{oe.button===0&&(oe.preventDefault(),K.current.focus(),rt(!0,oe))},wt=oe=>{rt(!1,oe)},Mt=P.Children.toArray(l),Bn=oe=>{const st=Mt.map(Gt=>Gt.props.value).indexOf(oe.target.value);if(st===-1)return;const St=Mt[st];X(St.props.value),E&&E(oe,St)},Tt=oe=>st=>{let St;if(st.currentTarget.hasAttribute("tabindex")){if(b){St=Array.isArray(q)?q.slice():[];const Gt=q.indexOf(oe.props.value);Gt===-1?St.push(oe.props.value):St.splice(Gt,1)}else St=oe.props.value;if(oe.props.onClick&&oe.props.onClick(st),q!==St&&(X(St),E)){const Gt=st.nativeEvent||st,zr=new Gt.constructor(Gt.type,Gt);Object.defineProperty(zr,"target",{writable:!0,value:{value:St,name:x}}),E(zr,oe)}b||rt(!1,st)}},jn=oe=>{B||[" ","ArrowUp","ArrowDown","Enter"].indexOf(oe.key)!==-1&&(oe.preventDefault(),rt(!0,oe))},Qn=ne!==null&&J,gt=oe=>{!Qn&&R&&(Object.defineProperty(oe,"target",{writable:!0,value:{value:q,name:x}}),R(oe))};delete W["aria-invalid"];let me,Be;const Ye=[];let Tn=!1;(T1({value:q})||v)&&(z?me=z(q):Tn=!0);const cr=Mt.map((oe,st,St)=>{var Gt,zr,Ba,fi;if(!P.isValidElement(oe))return null;let Rn;if(b){if(!Array.isArray(q))throw new Error(Yi(2));Rn=q.some(Vn=>lx(Vn,oe.props.value)),Rn&&Tn&&Ye.push(oe.props.children)}else Rn=lx(q,oe.props.value),Rn&&Tn&&(Be=oe.props.children);if(oe.props.value===void 0)return P.cloneElement(oe,{"aria-readonly":!0,role:"option"});const pi=()=>{if(q)return Rn;const Vn=St.find(gi=>{var hs;return(gi==null||(hs=gi.props)==null?void 0:hs.value)!==void 0&&gi.props.disabled!==!0});return oe===Vn?!0:Rn};return P.cloneElement(oe,{"aria-selected":Rn?"true":"false",onClick:Tt(oe),onKeyUp:Vn=>{Vn.key===" "&&Vn.preventDefault(),oe.props.onKeyUp&&oe.props.onKeyUp(Vn)},role:"option",selected:((Gt=St[0])==null||(zr=Gt.props)==null?void 0:zr.value)===void 0||((Ba=St[0])==null||(fi=Ba.props)==null?void 0:fi.disabled)===!0?pi():Rn,value:void 0,"data-value":oe.props.value})});Tn&&(b?Ye.length===0?me=null:me=Ye.reduce((oe,st,St)=>(oe.push(st),St<Ye.length-1&&oe.push(", "),oe),[]):me=Be);let In=ye;!a&&ce&&ne&&(In=we.clientWidth);let on;typeof j<"u"?on=j:on=g?null:0;const dr=V.id||(x?`mui-component-select-${x}`:void 0),zn=M({},e,{variant:G,value:q,open:Qn}),qe=aH(zn);return be(P.Fragment,{children:[$(rH,M({ref:He,tabIndex:on,role:"button","aria-disabled":g?"true":void 0,"aria-expanded":Qn?"true":"false","aria-haspopup":"listbox","aria-label":s,"aria-labelledby":[k,dr].filter(Boolean).join(" ")||void 0,"aria-describedby":i,onKeyDown:jn,onMouseDown:g||B?null:Le,onBlur:gt,onFocus:D},V,{ownerState:zn,className:Se(V.className,qe.select,c),id:dr,children:oH(me)?ax||(ax=$("span",{className:"notranslate",children:"​"})):me})),$(sH,M({value:Array.isArray(q)?q.join(","):q,name:x,ref:re,"aria-hidden":!0,onChange:Bn,tabIndex:-1,disabled:g,className:qe.nativeInput,autoFocus:o,ownerState:zn},W)),$(iH,{as:_,className:qe.icon,ownerState:zn}),$(xy,M({id:`menu-${x||""}`,anchorEl:we,open:Qn,onClose:wt,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},y,{MenuListProps:M({"aria-labelledby":k,role:"listbox",disableListWrap:!0},y.MenuListProps),PaperProps:M({},y.PaperProps,{style:M({minWidth:In},y.PaperProps!=null?y.PaperProps.style:null)}),children:cr}))]})}),uH=lH;var ux,cx;const cH=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],dH=t=>{const{classes:e}=t;return e},A1={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>Br(t)&&t!=="variant",slot:"Root"},hH=fe(QR,A1)(""),fH=fe(tP,A1)(""),pH=fe(qR,A1)(""),nP=P.forwardRef(function(e,r){const i=Ne({name:"MuiSelect",props:e}),{autoWidth:s=!1,children:o,classes:a={},className:l,defaultOpen:c=!1,displayEmpty:d=!1,IconComponent:f=xW,id:g,input:v,inputProps:_,label:w,labelId:k,MenuProps:y,multiple:b=!1,native:x=!1,onClose:R,onOpen:E,open:C,renderValue:D,SelectDisplayProps:A,variant:U="outlined"}=i,B=pe(i,cH),z=x?W9:uH,V=Na(),N=Ma({props:i,muiFormControl:V,states:["variant"]}).variant||U,G=v||{standard:ux||(ux=$(hH,{})),outlined:$(fH,{label:w}),filled:cx||(cx=$(pH,{}))}[N],W=M({},i,{variant:N,classes:a}),q=dH(W),X=nn(r,G.ref);return $(P.Fragment,{children:P.cloneElement(G,M({inputComponent:z,inputProps:M({children:o,IconComponent:f,variant:N,t
3445ype:void 0,multiple:b},x?{id:g}:{autoWidth:s,defaultOpen:c,displayEmpty:d,labelId:k,MenuProps:y,onClose:R,onOpen:E,open:C,renderValue:D,SelectDisplayProps:M({id:g},A)},_,{classes:_?Ln(q,_.classes):q},v?v.props.inputProps:{})},b&&x&&N==="outlined"?{notched:!0}:{},{ref:X,className:Se(G.props.className,l)},!v&&{variant:N},B))})});nP.muiName="Select";const gH=nP;function mH(t){return Ae("MuiSnackbarContent",t)}Re("MuiSnackbarContent",["root","message","action"]);const yH=["action","className","message","role"],vH=t=>{const{classes:e}=t;return Me({root:["root"],action:["action"],message:["message"]},mH,e)},bH=fe(hi,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>{const e=t.palette.mode==="light"?.8:.98,r=LN(t.palette.background.default,e);return M({},t.typography.body2,{color:t.vars?t.vars.palette.SnackbarContent.color:t.palette.getContrastText(r),backgroundColor:t.vars?t.vars.palette.SnackbarContent.bg:r,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,flexGrow:1,[t.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),wH=fe("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(t,e)=>e.message})({padding:"8px 0"}),SH=fe("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(t,e)=>e.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),CH=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiSnackbarContent"}),{action:s,className:o,message:a,role:l="alert"}=i,c=pe(i,yH),d=i,f=vH(d);return be(bH,M({role:l,square:!0,elevation:6,className:Se(f.root,o),ownerState:d,ref:r},c,{children:[$(wH,{className:f.message,ownerState:d,children:a}),s?$(SH,{className:f.action,ownerState:d,children:s}):null]}))}),xH=CH;function _H(t){return Ae("MuiSnackbar",t)}Re("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const EH=["onEnter","onExited"],kH=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],TH=t=>{const{classes:e,anchorOrigin:r}=t,i={root:["root",`anchorOrigin${he(r.vertical)}${he(r.horizontal)}`]};return Me(i,_H,e)},IH=fe("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`anchorOrigin${he(r.anchorOrigin.vertical)}${he(r.anchorOrigin.horizontal)}`]]}})(({theme:t,ownerState:e})=>{const r={left:"50%",right:"auto",transform:"translateX(-50%)"};return M({zIndex:(t.vars||t).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},e.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},e.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},e.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[t.breakpoints.up("sm")]:M({},e.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},e.anchorOrigin.horizontal==="center"&&r,e.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},e.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),RH=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiSnackbar"}),s=lr(),o={enter:s.transitions.duration.enteringScreen,exit:s.transitions.duration.leavingScreen},{action:a,anchorOrigin:{vertical:l,horizontal:c}={vertical:"bottom",horizontal:"left"},autoHideDuration:d=null,children:f,className:g,ClickAwayListenerProps:v,ContentProps:_,disableWindowBlurListener:w=!1,message:k,onBlur:y,onClose:b,onFocus:x,onMouseEnter:R,onMouseLeave:E,open:C,resumeHideDuration:D,TransitionComponent:A=$R,transitionDuration:U=o,TransitionProps:{onEnter:B,onExited:z}={}}=i,V=pe(i.TransitionProps,EH),j=pe(i,kH),N=M({},i,{anchorOrigin:{vertical:l,horizontal:c}}),G=TH(N),W=P.useRef(),[q,X]=P.useState(!0),J=Rr((...we)=>{b&&b(...we)}),Z=Rr(we=>{!b||we==null||(clearTimeout(W.current),W.current=setTimeout(()=>{J(null,"timeout")},we))});P.useEffect(()=>(C&&Z(d),()=>{clearTimeout(W.current)}),[C,d,Z]);const re=()=>{clearTimeout(W.current)},K=P.useCallback(()=>{d!=null&&Z(D??d*.5)},[d,D,Z]),ne=we=>{x&&x(we),re()},ee=we=>{R&&R(we),re()},ce=we=>{y&&y(we),K()},ye=we=>{E&&E(we),K()},_e=we=>{b&&b(we,"clickaway")},Oe=we=>{X(!0),z&&z(we)},He=(we,rt)=>{X(!1),B&&B(we,rt)};return P.useEffect(()=>{if(!w&&C)return window.addEventListener("focus",K),window.addEventListener("blur",re),()=>{window.removeEventListener("focus",K),window.removeEventListener("blur",re)}
3445},[w,K,C]),P.useEffect(()=>{if(!C)return;function we(rt){rt.defaultPrevented||(rt.key==="Escape"||rt.key==="Esc")&&b&&b(rt,"escapeKeyDown")}return document.addEventListener("keydown",we),()=>{document.removeEventListener("keydown",we)}},[q,C,b]),!C&&q?null:$(Dj,M({onClickAway:_e},v,{children:$(IH,M({className:Se(G.root,g),onBlur:ce,onFocus:ne,onMouseEnter:ee,onMouseLeave:ye,ownerState:N,ref:r,role:"presentation"},j,{children:$(A,M({appear:!0,in:C,timeout:U,direction:l==="top"?"down":"up",onEnter:He,onExited:Oe},V,{children:f||$(xH,M({message:k,action:a},_))}))}))}))}),PH=RH,AH=P.createContext(),rP=AH;function OH(t){return Ae("MuiTable",t)}Re("MuiTable",["root","stickyHeader"]);const DH=["className","component","padding","size","stickyHeader"],MH=t=>{const{classes:e,stickyHeader:r}=t;return Me({root:["root",r&&"stickyHeader"]},OH,e)},NH=fe("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.stickyHeader&&e.stickyHeader]}})(({theme:t,ownerState:e})=>M({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":M({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},e.stickyHeader&&{borderCollapse:"separate"})),dx="table",$H=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiTable"}),{className:s,component:o=dx,padding:a="normal",size:l="medium",stickyHeader:c=!1}=i,d=pe(i,DH),f=M({},i,{component:o,padding:a,size:l,stickyHeader:c}),g=MH(f),v=P.useMemo(()=>({padding:a,size:l,stickyHeader:c}),[a,l,c]);return $(rP.Provider,{value:v,children:$(NH,M({as:o,role:o===dx?null:"table",ref:r,className:Se(g.root,s),ownerState:f},d))})}),LH=$H,FH=P.createContext(),hp=FH;function UH(t){return Ae("MuiTableBody",t)}Re("MuiTableBody",["root"]);const BH=["className","component"],jH=t=>{const{classes:e}=t;return Me({root:["root"]},UH,e)},zH=fe("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-row-group"}),VH={variant:"body"},hx="tbody",WH=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiTableBody"}),{className:s,component:o=hx}=i,a=pe(i,BH),l=M({},i,{component:o}),c=jH(l);return $(hp.Provider,{value:VH,children:$(zH,M({className:Se(c.root,s),as:o,ref:r,role:o===hx?null:"rowgroup",ownerState:l},a))})}),GH=WH;function HH(t){return Ae("MuiTableCell",t)}const qH=Re("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),KH=qH,YH=["align","className","component","padding","scope","size","sortDirection","variant"],XH=t=>{const{classes:e,variant:r,align:i,padding:s,size:o,stickyHeader:a}=t,l={root:["root",r,a&&"stickyHeader",i!=="inherit"&&`align${he(i)}`,s!=="normal"&&`padding${he(s)}`,`size${he(o)}`]};return Me(l,HH,e)},QH=fe("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],e[`size${he(r.size)}`],r.padding!=="normal"&&e[`padding${he(r.padding)}`],r.align!=="inherit"&&e[`align${he(r.align)}`],r.stickyHeader&&e.stickyHeader]}})(({theme:t,ownerState:e})=>M({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid 3446 ${t.palette.mode==="light"?ia(fn(t.palette.divider,1),.88):ra(fn(t.palette.divider,1),.68)}`,textAlign:"left",padding:16},e.variant==="head"&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},e.variant==="body"&&{color:(t.vars||t).palette.text.primary},e.variant==="footer"&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},e.size==="small"&&{padding:"6px 16px",[`&.${KH.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},e.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},e.padding==="none"&&{padding:0},e.align==="left"&&{textAlign:"left"},e.align==="center"&&{textAlign:"center"},e.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},e.align==="justify"&&{textAlign:"justify"},e.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})),JH=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiTableCell"}),{align:s="inherit",className:o,component:a,padding:l,scope:c,size:d,sortDirection:f,variant:g}=i,v=pe(i,YH),_=P.useContext(rP),w=P.useContext(hp),k=w&&w.variant==="head";let y;a?y=a:y=k?"th":"td";let b=c;y==="td"?b=void 0:!b&&k&&(b="col");const x=g||w&&w.variant,R=M({},i,{align:s,component:y,padding:l||(_&&_.padding?_.padding:"normal"),size:d||
3446(_&&_.size?_.size:"medium"),sortDirection:f,stickyHeader:x==="head"&&_&&_.stickyHeader,variant:x}),E=XH(R);let C=null;return f&&(C=f==="asc"?"ascending":"descending"),$(QH,M({as:y,ref:r,className:Se(E.root,o),"aria-sort":C,scope:b,ownerState:R},v))}),fl=JH;function ZH(t){return Ae("MuiTableContainer",t)}Re("MuiTableContainer",["root"]);const e7=["className","component"],t7=t=>{const{classes:e}=t;return Me({root:["root"]},ZH,e)},n7=fe("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(t,e)=>e.root})({width:"100%",overflowX:"auto"}),r7=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiTableContainer"}),{className:s,component:o="div"}=i,a=pe(i,e7),l=M({},i,{component:o}),c=t7(l);return $(n7,M({ref:r,as:o,className:Se(c.root,s),ownerState:l},a))}),i7=r7;function s7(t){return Ae("MuiTableHead",t)}Re("MuiTableHead",["root"]);const o7=["className","component"],a7=t=>{const{classes:e}=t;return Me({root:["root"]},s7,e)},l7=fe("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-header-group"}),u7={variant:"head"},fx="thead",c7=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiTableHead"}),{className:s,component:o=fx}=i,a=pe(i,o7),l=M({},i,{component:o}),c=a7(l);return $(hp.Provider,{value:u7,children:$(l7,M({as:o,className:Se(c.root,s),ref:r,role:o===fx?null:"rowgroup",ownerState:l},a))})}),d7=c7;function h7(t){return Ae("MuiTableRow",t)}const f7=Re("MuiTableRow",["root","selected","hover","head","footer"]),px=f7,p7=["className","component","hover","selected"],g7=t=>{const{classes:e,selected:r,hover:i,head:s,footer:o}=t;return Me({root:["root",r&&"selected",i&&"hover",s&&"head",o&&"footer"]},h7,e)},m7=fe("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.head&&e.head,r.footer&&e.footer]}})(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${px.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${px.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:fn(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:fn(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}})),gx="tr",y7=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiTableRow"}),{className:s,component:o=gx,hover:a=!1,selected:l=!1}=i,c=pe(i,p7),d=P.useContext(hp),f=M({},i,{component:o,hover:a,selected:l,head:d&&d.variant==="head",footer:d&&d.variant==="footer"}),g=g7(f);return $(m7,M({as:o,ref:r,className:Se(g.root,s),role:o===gx?null:"row",ownerState:f},c))}),rd=y7;function v7(t){return Ae("MuiTextField",t)}Re("MuiTextField",["root"]);const b7=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],w7={standard:QR,filled:qR,outlined:tP},S7=t=>{const{classes:e}=t;return Me({root:["root"]},v7,e)},C7=fe(SG,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),x7=P.forwardRef(function(e,r){const i=Ne({props:e,name:"MuiTextField"}),{autoComplete:s,autoFocus:o=!1,children:a,className:l,color:c="primary",defaultValue:d,disabled:f=!1,error:g=!1,FormHelperTextProps:v,fullWidth:_=!1,helperText:w,id:k,InputLabelProps:y,inputProps:b,InputProps:x,inputRef:R,label:E,maxRows:C,minRows:D,multiline:A=!1,name:U,onBlur:B,onChange:z,onFocus:V,placeholder:j,required:N=!1,rows:G,select:W=!1,SelectProps:q,type:X,value:J,variant:Z="outlined"}=i,re=pe(i,b7),K=M({},i,{autoFocus:o,color:c,disabled:f,error:g,fullWidth:_,multiline:A,required:N,select:W,variant:Z}),ne=S7(K),ee={};Z==="outlined"&&(y&&typeof y.shrink<"u"&&(ee.notched=y.shrink),ee.label=E),W&&((!q||!q.native)&&(ee.id=void 0),ee["aria-describedby"]=void 0);const ce=$v(k),ye=w&&ce?`${ce}
3446-helper-text`:void 0,_e=E&&ce?`${ce}-label`:void 0,Oe=w7[Z],He=$(Oe,M({"aria-describedby":ye,autoComplete:s,autoFocus:o,defaultValue:d,fullWidth:_,multiline:A,name:U,rows:G,maxRows:C,minRows:D,type:X,value:J,id:ce,inputRef:R,onBlur:B,onChange:z,onFocus:V,placeholder:j,inputProps:b},ee,x));return be(C7,M({className:Se(ne.root,l),disabled:f,error:g,fullWidth:_,ref:r,required:N,color:c,variant:Z,ownerState:K},re,{children:[E!=null&&E!==""&&$(_9,M({htmlFor:ce,id:_e},y,{children:E})),W?$(gH,M({"aria-describedby":ye,id:ce,labelId:_e,value:J,input:He},q,{children:a})):He,w&&$(IG,M({id:ye},v,{children:w}))]}))}),Mn=x7,_7=()=>{const[t,e]=P.useState(null),[r,i]=P.useState(null),{dispatch:s}=ci();return{logout:async()=>{e(null),i(!0);try{await Zr.signOut(),s({type:"LOGOUT"}),i(!1),e(null)}catch(a){i(!1),e([a.message,"error"])}},message:t,isPending:r}},E7=()=>{const{user:t}=ci(),e=Ku(),{logout:r}=_7(),i=lr(),s=["dashboard"],o=["profile","account","logout"],[a,l]=P.useState(null),[c,d]=P.useState(null),[f,g]=P.useState();t&&t.photoURL&&kR(fy(py,t.photoURL)).then(y=>{g(y)}).catch(()=>{});const v=y=>{l(y.currentTarget)},_=y=>{d(y.currentTarget)},w=y=>{l(null),y&&e(`/${y}`)},k=async y=>{d(null),y==="logout"?(await r(),e("/login")):y&&e(`/${y}`)};return $(Jz,{position:"static",sx:{boxShadow:"none",borderBottom:"1px solid black",backgroundColor:"unset",color:"black",marginBottom:4},children:be(iV,{disableGutters:!0,style:{justifyContent:"space-between"},children:[$(ZC,{only:["xs","sm"],children:be(xn,{sx:{display:"flex",alignItems:"center"},children:[$(wy,{sx:{display:{xs:"none",md:"flex"},mr:1}}),$(cn,{variant:"h6",noWrap:!0,sx:{display:{xs:"none",md:"flex"},fontWeight:600,color:"inherit",textDecoration:"none",marginBottom:0},children:"FIREBASE AUTH APP"})]})}),be(xn,{sx:{display:{xs:"flex",md:"none"}},children:[$(to,{size:"large",onClick:v,color:"inherit",edge:"start",style:{paddingRight:0},children:$(UR,{})}),$(xy,{id:"menu-appbar",anchorEl:a,anchorOrigin:{vertical:"bottom",horizontal:"left"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"left"},open:Boolean(a),onClose:()=>w(),sx:{display:{xs:"block",md:"none"}},children:s.map(y=>$(jC,{onClick:()=>w(y),sx:{textTransform:"capitalize"},children:y.replaceAll("-"," ")},y))})]}),$(ZC,{only:["md","lg","xl"],children:be("div",{style:{display:"flex"},children:[$(wy,{sx:{display:{xs:"flex",md:"none"},mr:1}}),$(cn,{variant:"h5",noWrap:!0,sx:{display:{xs:"flex",md:"none"},flexGrow:1,fontWeight:600,fontSize:14,color:"inherit",textDecoration:"none",marginTop:"3px",marginBottom:"3px"},children:"FIREBASE AUTH APP"})]})}),t&&t.emailVerified&&$(xn,{sx:{display:{xs:"none",md:"flex"}},children:s.map(y=>$(en,{onClick:()=>w(y),sx:{my:2,padding:"5px 10px",display:"block",margin:"0 10px","&:hover":{backgroundColor:i.palette.secondary.main,color:i.palette.primary.main}},children:y.replaceAll("-"," ")},y))}),t&&t.emailVerified&&be(xn,{sx:{flexGrow:0},children:[$(to,{onClick:_,sx:{p:0},children:$(M8,{alt:t.displayName,sx:{bgcolor:!f&&i.palette.primary.main},src:f})}),$(xy,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:c,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(c),onClose:()=>k(),children:o.map(y=>$(jC,{onClick:()=>k(y),sx:{textTransform:"capitalize"},children:y},y))})]})]})})},iP=()=>{const{openLoading:t}=IR();return $(_1,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:t,children:$($a,{color:"inherit"})})};var O1={},k7=ts;Object.defineProperty(O1,"__esModule",{value:!0});var sP=O1.default=void 0,T7=k7(Oa()),I7=Da,R7=(0,T7.default)((0,I7.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit");sP=O1.default=R7;var D1={},P7=ts;Object.defineProperty(D1,"__esModule",{value:!0});var oP=D1.default=void 0,A7=P7(Oa()),O7=Da,D7=(0,A7.default)((0,O7.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");oP=D1.default=D7;const fp=()=>{const[t,e]=P.useState(null),[r,i]=P.useState(null),{dispatch:s}=ci();return{login:async(a,l)=>{e(null),i(!0);try{const c=await q5(Zr,a,l);s({type:"LOGIN",payload:c.user}),i(!1),e(null)}catch(c){i(!1),c.message.includes("auth/user-not-found")?e(["There's no user with this email.","error"]):c.message.includes("auth/invalid-email")?e(["Email is invali
3446d.","error"]):c.message.includes("auth/internal-error")?e(["Error. Could not login.","error"]):c.message.includes("auth/wrong-password)")?e(["Wrong password.","error"]):e([c.message,"error"])}},message:t,setMessage:e,isPending:r}},M7=P.forwardRef(function(e,r){return $(lW,{elevation:6,ref:r,variant:"filled",...e})}),Fa=({message:t,openAlert:e,setOpenAlert:r})=>{const i=(s,o)=>{o!=="clickaway"&&r(!1)};return $(PH,{open:e,anchorOrigin:{vertical:"top",horizontal:"center"},autoHideDuration:5e3,onClose:i,children:t&&t.length>0&&$(M7,{onClose:i,severity:t[1]||"success",sx:{width:"100%"},children:t[0].replace("Firebase: ","")})})},N7={document:null,isPending:!1,error:null,success:null,function:null},$7=(t,e)=>{switch(e.type){case"IS_PENDING":return{isPending:e.payload||!0,document:null,success:!1,error:null,function:e.function};case"ADDED_DOCUMENT":return{isPending:!1,document:e.payload,success:!0,error:null,function:null};case"DELETED_DOCUMENT":return{isPending:!1,document:e.payload,success:!0,error:null,function:null};case"ERROR":return{isPending:!1,document:null,success:!1,error:e.payload,function:null};default:return t}},L7=t=>{const[e,r]=P.useReducer($7,N7),[i,s]=P.useState(!1),{user:o}=ci(),a=JI(Id,t),l=g=>{i||r(g)},c=async g=>{r({type:"IS_PENDING"});try{const v=await f6(a,{...g,createdAt:m6(),uid:o.uid});l({type:"ADDED_DOCUMENT",payload:v})}catch(v){l({type:"ERROR",payload:v.message})}},d=async g=>{r({type:"IS_PENDING",payload:g,function:"delete"});try{const v=await h6(cy(Id,t,g));l({type:"DELETED_DOCUMENT",payload:v})}catch(v){l({type:"ERROR",payload:v.message})}},f=async(g,v)=>{r({type:"IS_PENDING",payload:g,function:"delete"});try{const _=await d6(cy(Id,t,g),{...v});l({type:"DELETED_DOCUMENT",payload:_})}catch(_){l({type:"ERROR",payload:_.message})}};return P.useEffect(()=>()=>{s(!0)},[]),{addDocument:c,deleteDocument:d,updateDocument:f,response:e}},F7=(t,e)=>{const[r,i]=P.useState(null),s=P.useRef(e).current;return P.useEffect(()=>{let o=JI(Id,t);s&&(o=s6(o,a6(...e)));const a=p6(o,l=>{const c=[];l.docs.forEach(d=>{c.push({id:d.id,...d.data()})}),i(c.sort((d,f)=>d.name.localeCompare(f.name)))});return()=>a()},[t,s]),{documents:r}};var M1={},U7=ts;Object.defineProperty(M1,"__esModule",{value:!0});var aP=M1.default=void 0,B7=U7(Oa()),j7=Da,z7=(0,B7.default)((0,j7.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");aP=M1.default=z7;const V7=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function W7(t={}){const{disableGlobal:e=!1,productionPrefix:r="jss",seed:i=""}=t,s=i===""?"":`${i}-`;let o=0;const a=()=>(o+=1,o);return(l,c)=>{const d=c.options.name;if(d&&d.indexOf("Mui")===0&&!c.options.link&&!e){if(V7.indexOf(l.key)!==-1)return`Mui-${l.key}`;const f=`${s}${d}-${l.key}`;return!c.options.theme[ik]||i!==""?f:`${f}-${a()}`}return`${s}${r}${a()}`}}var mx=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},xc=(typeof window>"u"?"undefined":mx(window))==="object"&&(typeof document>"u"?"undefined":mx(document))==="object"&&document.nodeType===9;function Fu(t){return Fu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fu(t)}function G7(t,e){if(Fu(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(Fu(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function H7(t){var e=G7(t,"string");return Fu(e)==="symbol"?e:String(e)}function yx(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,H7(i.key),i)}}function lP(t,e,r){return e&&yx(t.prototype,e),r&&yx(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var q7={}.constructor;function Ey(t){if(t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(Ey);if(t.constructor!==q7)return t;var e={};for(var r in t)e[r]=Ey(t[r]);return e}function N1(t,e,r){t===void 0&&(t="unnamed");var i=r.jss,s=Ey(e),o=i.plugins.onCreateRule(t,s,r);return o||(t[0],null)}var vx=function(e,r){for(var i="",s=0;s<e.length&&e[s]!=="!important";s++)i&&(i+=r),i+=e[s];return i},Bs=function(e){if(!Array.isArray(e))return e;var r="";if(Array.isArray(e[0]))for(var i=0;i<e.length&&e[i]!=="!important";i++)r&&(r+=", "),r+=vx(e[i]," ");else r=vx(e,", ");return e[e.length-1]==="!important"&&(r+=" !important"),r};function Ua(t){return t&&t.format===!1?{linebreak:"",space:""}:{linebreak:` 3447`,space:" "}}function pl(t,e){for(var r="",i=0;i<e;i++)r+=" ";return r+t}function Uu(t,e,r){r===void 0&&(r={});var i="";if(!e)return i;var s=r,o=s.indent,a=o===void 0?0:o,l=e.fallbacks;r.format===!1&&(a=-1/0);var c=Ua(r),d=c.linebreak,f=c.space;if(t&&a++,l)if(Array.isArray(l))for(var g=0;g<l.length;g++){var v=l[g];for(var _ in v){var w=v[_];w!=null&&(i&&(i+=d),i+=pl(_+":"+f+Bs(w)+";",a))}}else for(var k in l){var y=l[k];y!=null&&(i&&(i+=d),i+=pl(k+":"+f+Bs(y)+";",a))}for(var b in e){var x=e[b];x!=null&&b!=="fallbacks"&&(i&&(i+=d),i+=pl(b+":"+f+Bs(x)+";",a))}return!i&&!r.allowEmpty||!t?i:(a--,i&&(i=""+d+i+d),pl(""+t+f+"{"+i,a)+pl("}",a))}var K7=/([[\].#*$><+~=|^:(),"'`\s])/g,bx=typeof CSS<"u"&&CSS.escape,$1=function(t){return bx?bx(t):t.replace(K7,"\\$1")},uP=function(){function t(r,i,s){this.type="style",this.isProcessed=!1;var o=s.sheet,a=s.Renderer;this.key=r,this.options=s,this.style=i,o?this.renderer=o.renderer:a&&(this.renderer=new a)}var e=t.prototype;return e.prop=function(i,s,o){if(s===void 0)return this.style[i];var a=o?o.force:!1;
3447if(!a&&this.style[i]===s)return this;var l=s;(!o||o.process!==!1)&&(l=this.options.jss.plugins.onChangeValue(s,i,this));var c=l==null||l===!1,d=i in this.style;if(c&&!d&&!a)return this;var f=c&&d;if(f?delete this.style[i]:this.style[i]=l,this.renderable&&this.renderer)return f?this.renderer.removeProperty(this.renderable,i):this.renderer.setProperty(this.renderable,i,l),this;var g=this.options.sheet;return g&&g.attached,this},t}(),ky=function(t){Yf(e,t);function e(i,s,o){var a;a=t.call(this,i,s,o)||this;var l=o.selector,c=o.scoped,d=o.sheet,f=o.generateId;return l?a.selectorText=l:c!==!1&&(a.id=f(vy(vy(a)),d),a.selectorText="."+$1(a.id)),a}var r=e.prototype;return r.applyTo=function(s){var o=this.renderer;if(o){var a=this.toJSON();for(var l in a)o.setProperty(s,l,a[l])}return this},r.toJSON=function(){var s={};for(var o in this.style){var a=this.style[o];typeof a!="object"?s[o]=a:Array.isArray(a)&&(s[o]=Bs(a))}return s},r.toString=function(s){var o=this.options.sheet,a=o?o.options.link:!1,l=a?M({},s,{allowEmpty:!0}):s;return Uu(this.selectorText,this.style,l)},lP(e,[{key:"selector",set:function(s){if(s!==this.selectorText){this.selectorText=s;var o=this.renderer,a=this.renderable;if(!(!a||!o)){var l=o.setSelector(a,s);l||o.replaceRule(a,this)}}},get:function(){return this.selectorText}}]),e}(uP),Y7={onCreateRule:function(e,r,i){return e[0]==="@"||i.parent&&i.parent.type==="keyframes"?null:new ky(e,r,i)}},Eg={indent:1,children:!0},X7=/@([\w-]+)/,Q7=function(){function t(r,i,s){this.type="conditional",this.isProcessed=!1,this.key=r;var o=r.match(X7);this.at=o?o[1]:"unknown",this.query=s.name||"@"+this.at,this.options=s,this.rules=new pp(M({},s,{parent:this}));for(var a in i)this.rules.add(a,i[a]);this.rules.process()}var e=t.prototype;return e.getRule=function(i){return this.rules.get(i)},e.indexOf=function(i){return this.rules.indexOf(i)},e.addRule=function(i,s,o){var a=this.rules.add(i,s,o);return a?(this.options.jss.plugins.onProcessRule(a),a):null},e.replaceRule=function(i,s,o){var a=this.rules.replace(i,s,o);return a&&this.options.jss.plugins.onProcessRule(a),a},e.toString=function(i){i===void 0&&(i=Eg);var s=Ua(i),o=s.linebreak;if(i.indent==null&&(i.indent=Eg.indent),i.children==null&&(i.children=Eg.children),i.children===!1)return this.query+" {}";var a=this.rules.toString(i);return a?this.query+" {"+o+a+o+"}":""},t}(),J7=/@media|@supports\s+/,Z7={onCreateRule:function(e,r,i){return J7.test(e)?new Q7(e,r,i):null}},kg={indent:1,children:!0},eq=/@keyframes\s+([\w-]+)/,Ty=function(){function t(r,i,s){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var o=r.match(eq);o&&o[1]?this.name=o[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=s;var a=s.scoped,l=s.sheet,c=s.generateId;this.id=a===!1?this.name:$1(c(this,l)),this.rules=new pp(M({},s,{parent:this}));for(var d in i)this.rules.add(d,i[d],M({},s,{parent:this}));this.rules.process()}var e=t.prototype;return e.toString=function(i){i===void 0&&(i=kg);var s=Ua(i),o=s.linebreak;if(i.indent==null&&(i.indent=kg.indent),i.children==null&&(i.children=kg.children),i.children===!1)return this.at+" "+this.id+" {}";var a=this.rules.toString(i);return a&&(a=""+o+a+o),this.at+" "+this.id+" {"+a+"}"},t}(),tq=/@keyframes\s+/,nq=/\$([\w-]+)/g,Iy=function(e,r){return typeof e=="string"?e.replace(nq,function(i,s){return s in r?r[s]:i}):e},wx=function(e,r,i){var s=e[r],o=Iy(s,i);o!==s&&(e[r]=o)},rq={onCreateRule:function(e,r,i){return typeof e=="string"&&tq.test(e)?new Ty(e,r,i):null},onProcessStyle:function(e,r,i){return r.type!=="style"||!i||("animation-name"in e&&wx(e,"animation-name",i.keyframes),"animation"in e&&wx(e,"animation",i.keyframes)),e},onChangeValue:function(e,r,i){var s=i.options.sheet;if(!s)return e;switch(r){case"animation":return Iy(e,s.keyframes);case"animation-name":return Iy(e,s.keyframes);default:return e}}},iq=function(t){Yf(e,t);function e(){return t.apply(this,arguments)||this}var r=e.prototype;return r.toString=function(s){var o=this.options.sheet,a=o?o.options.link:!1,l=a?M({},s,{allowEmpty:!0}):s;return Uu(this.key,this.style,l)},e}(uP),sq={onCreateRule:function(e,r,i){return i.parent&&i.parent.type==="
3447keyframes"?new iq(e,r,i):null}},oq=function(){function t(r,i,s){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=r,this.style=i,this.options=s}var e=t.prototype;return e.toString=function(i){var s=Ua(i),o=s.linebreak;if(Array.isArray(this.style)){for(var a="",l=0;l<this.style.length;l++)a+=Uu(this.at,this.style[l]),this.style[l+1]&&(a+=o);return a}return Uu(this.at,this.style,i)},t}(),aq=/@font-face/,lq={onCreateRule:function(e,r,i){return aq.test(e)?new oq(e,r,i):null}},uq=function(){function t(r,i,s){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=r,this.style=i,this.options=s}var e=t.prototype;return e.toString=function(i){return Uu(this.key,this.style,i)},t}(),cq={onCreateRule:function(e,r,i){return e==="@viewport"||e==="@-ms-viewport"?new uq(e,r,i):null}},dq=function(){function t(r,i,s){this.type="simple",this.isProcessed=!1,this.key=r,this.value=i,this.options=s}var e=t.prototype;return e.toString=function(i){if(Array.isArray(this.value)){for(var s="",o=0;o<this.value.length;o++)s+=this.key+" "+this.value[o]+";",this.value[o+1]&&(s+=` 3448`);return s}return this.key+" "+this.value+";"},t}(),hq={"@charset":!0,"@import":!0,"@namespace":!0},fq={onCreateRule:function(e,r,i){return e in hq?new dq(e,r,i):null}},Sx=[Y7,Z7,rq,sq,lq,cq,fq],pq={process:!0},Cx={force:!0,process:!0},pp=function(){function t(r){this.map={},this.raw={},this.index=[],this.counter=0,this.options=r,this.classes=r.classes,this.keyframes=r.keyframes}var e=t.prototype;return e.add=function(i,s,o){var a=this.options,l=a.parent,c=a.sheet,d=a.jss,f=a.Renderer,g=a.generateId,v=a.scoped,_=M({classes:this.classes,parent:l,sheet:c,jss:d,Renderer:f,generateId:g,scoped:v,name:i,keyframes:this.keyframes,selector:void 0},o),w=i;i in this.raw&&(w=i+"-d"+this.counter++),this.raw[w]=s,w in this.classes&&(_.selector="."+$1(this.classes[w]));var k=N1(w,s,_);if(!k)return null;this.register(k);var y=_.index===void 0?this.index.length:_.index;return this.index.splice(y,0,k),k},e.replace=function(i,s,o){var a=this.get(i),l=this.index.indexOf(a);a&&this.remove(a);var c=o;return l!==-1&&(c=M({},o,{index:l})),this.add(i,s,c)},e.get=function(i){return this.map[i]},e.remove=function(i){this.unregister(i),delete this.raw[i.key],this.index.splice(this.index.indexOf(i),1)},e.indexOf=function(i){return this.index.indexOf(i)},e.process=function(){var i=this.options.jss.plugins;this.index.slice(0).forEach(i.onProcessRule,i)},e.register=function(i){this.map[i.key]=i,i instanceof ky?(this.map[i.selector]=i,i.id&&(this.classes[i.key]=i.id)):i instanceof Ty&&this.keyframes&&(this.keyframes[i.name]=i.id)},e.unregister=function(i){delete this.map[i.key],i instanceof ky?(delete this.map[i.selector],delete this.classes[i.key]):i instanceof Ty&&delete this.keyframes[i.name]},e.update=function(){var i,s,o;if(typeof(arguments.length<=0?void 0:arguments[0])=="string"?(i=arguments.length<=0?void 0:arguments[0],s=arguments.length<=1?void 0:arguments[1],o=arguments.length<=2?void 0:arguments[2]):(s=arguments.length<=0?void 0:arguments[0],o=arguments.length<=1?void 0:arguments[1],i=null),i)this.updateOne(this.get(i),s,o);else for(var a=0;a<this.index.length;a++)this.updateOne(this.index[a],s,o)},e.updateOne=function(i,s,o){o===void 0&&(o=pq);var a=this.options,l=a.jss.plugins,c=a.sheet;if(i.rules instanceof t){i.rules.update(s,o);return}var d=i.style;if(l.onUpdate(s,i,c,o),o.process&&d&&d!==i.style){l.onProcessStyle(i.style,i,c);for(var f in i.style){var g=i.style[f],v=d[f];g!==v&&i.prop(f,g,Cx)}for(var _ in d){var w=i.style[_],k=d[_];w==null&&w!==k&&i.prop(_,null,Cx)}}},e.toString=function(i){for(var s="",o=this.options.sheet,a=o?o.options.link:!1,l=Ua(i),c=l.linebreak,d=0;d<this.index.length;d++){var f=this.index[d],g=f.toString(i);!g&&!a||(s&&(s+=c),s+=g)}return s},t}(),cP=function(){function t(r,i){this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=M({},i,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),i.Renderer&&(this.renderer=new i.Renderer(this)),this.rules=new pp(this.options);for(var s in r)this.rules.add(s,r[s]);this.rules.process()}var e=t.prototype;return e.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},e.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},e.addRule=function(i,s,o){var a=this.queue;this.attached&&!a&&(this.queue=[]);var l=this.rules.add(i,s,o);return l?(this.options.jss.plugins.onProcessRule(l),this.attached?(this.deployed&&(a?a.push(l):(this.insertRule(l),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))),l):(this.deployed=!1,l)):null},e.replaceRule=function(i,s,o){var a=this.rules.get(i);if(!a)return this.addRule(i,s,o);var l=this.rules.replace(i,s,o);return l&&this.options.jss.plugins.onProcessRule(l),this.attached?(this.deployed&&this.renderer&&(l?a.renderable&&this.renderer.replaceRule(a.renderable,l):this.renderer.deleteRule(a)),l):(this.deployed=!1,l)},e.insertRule=function(i){this.renderer&&this.renderer.insertRule(i)},e.addRules=function(i,s){var o=[];for(var a in i){var l=this.addRule(a,i[a],s);l&&o.push(l)}return o},e.getRule=function(i){return this.rules.get(i)},e.deleteRule=function(i){var s=typeof i=="object"?i:this.rules.get(i);return!s||this.attached&&!s.renderable?!1:(this.rules.remove(s),this.attached&&s.renderable&&this.renderer?this.renderer.deleteRule(s.renderable):!0)},e.indexOf=function(i){return this.rules.indexOf(i)},e.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},e.update=function(){var i;return(i=this.rules).update.apply(i,arguments),this},e.updateOne=function(i,s,o){return this.rules.updateOne(i,s,o),this},e.toString=function(i){return this.rules.toString(i)},t}(),gq=function(){function t(){this.plugins={internal:[],external:[]},this.registry={}}var e=t.prototype;return e.onCreateRule=function(i,s,o){for(var a=0;a<this.registry.onCreateRule.length;a++){var l=this.registry.onCreateRule[a](i,s,o);if(l)return l}return null},e.onProcessRule=function(i){if(!i.isProcessed){for(var s=i.options.sheet,o=0;o<this.registry.onProcessRule.length;o++)this.registry.onProcessRule[o](i,s);i.style&&this.onProcessStyle(i.style,i,s),i.isProcessed=!0}},e.onProcessStyle=function(i,s,o){for(var a=0;a<this.registry.onProcessStyle.length;a++)s.style=this.registry.onProcessStyle[a](s.style,s,o)},e.onProcessSheet=function(i){for(var s=0;s<this.registry.onProcessSheet.length;s++)this.registry.onProcessSheet[s](i)},e.onUpdate=function(i,s,o,a){for(var l=0;l<this.registry.onUpdate.length;l++)this.registry.onUpdate[l](i,s,o,a)},e.onChangeValue=function(i,s,o){for(var a=i,l=0;l<this.registry.onChangeValue.length;l++)a=this.registry.onChangeValue[l](a,s,o);return a},e.use=function(i,s){s===void 0&&(s={queue:"external"});var o=this.plugins[s.queue];o.indexOf(i)===-1&&(o.push(i),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(a,l){for(var c in l)c in a&&a[c].push(l[c]);return a},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},t}(),mq=function(){function t(){this.registry=[]}var e=t.prototype;return e.add=function(i){var s=this.registry,o=i.options.index;if(s.indexOf(i)===-1){if(s.length===0||o>=this.index){s.push(i);return}for(var a=0;a<s.length;a++)if(s[a].options.index>
3448o){s.splice(a,0,i);return}}},e.reset=function(){this.registry=[]},e.remove=function(i){var s=this.registry.indexOf(i);this.registry.splice(s,1)},e.toString=function(i){for(var s=i===void 0?{}:i,o=s.attached,a=pe(s,["attached"]),l=Ua(a),c=l.linebreak,d="",f=0;f<this.registry.length;f++){var g=this.registry[f];o!=null&&g.attached!==o||(d&&(d+=c),d+=g.toString(a))}return d},lP(t,[{key:"index",get:function(){return this.registry.length===0?0:this.registry[this.registry.length-1].options.index}}]),t}(),Zl=new mq,Ry=typeof globalThis<"u"?globalThis:typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")(),Py="2f1acc6c3a606b082e5eef5e54414ffb";Ry[Py]==null&&(Ry[Py]=0);var xx=Ry[Py]++,_x=function(e){e===void 0&&(e={});var r=0,i=function(o,a){r+=1;var l="",c="";return a&&(a.options.classNamePrefix&&(c=a.options.classNamePrefix),a.options.jss.id!=null&&(l=String(a.options.jss.id))),e.minify?""+(c||"c")+xx+l+r:c+o.key+"-"+xx+(l?"-"+l:"")+"-"+r};return i},dP=function(e){var r;return function(){return r||(r=e()),r}},yq=function(e,r){try{return e.attributeStyleMap?e.attributeStyleMap.get(r):e.style.getPropertyValue(r)}catch{return""}},vq=function(e,r,i){try{var s=i;if(Array.isArray(i)&&(s=Bs(i)),e.attributeStyleMap)e.attributeStyleMap.set(r,s);else{var o=s?s.indexOf("!important"):-1,a=o>-1?s.substr(0,o-1):s;e.style.setProperty(r,a,o>-1?"important":"")}}catch{return!1}return!0},bq=function(e,r){try{e.attributeStyleMap?e.attributeStyleMap.delete(r):e.style.removeProperty(r)}catch{}},wq=function(e,r){return e.selectorText=r,e.selectorText===r},hP=dP(function(){return document.querySelector("head")});function Sq(t,e){for(var r=0;r<t.length;r++){var i=t[r];if(i.attached&&i.options.index>e.index&&i.options.insertionPoint===e.insertionPoint)return i}return null}function Cq(t,e){for(var r=t.length-1;r>=0;r--){var i=t[r];if(i.attached&&i.options.insertionPoint===e.insertionPoint)return i}return null}function xq(t){for(var e=hP(),r=0;r<e.childNodes.length;r++){var i=e.childNodes[r];if(i.nodeType===8&&i.nodeValue.trim()===t)return i}return null}function _q(t){var e=Zl.registry;if(e.length>0){var r=Sq(e,t);if(r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element};if(r=Cq(e,t),r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element.nextSibling}}var i=t.insertionPoint;if(i&&typeof i=="string"){var s=xq(i);if(s)return{parent:s.parentNode,node:s.nextSibling}}return!1}function Eq(t,e){var r=e.insertionPoint,i=_q(e);if(i!==!1&&i.parent){i.parent.insertBefore(t,i.node);return}if(r&&typeof r.nodeType=="number"){var s=r,o=s.parentNode;o&&o.insertBefore(t,s.nextSibling);return}hP().appendChild(t)}var kq=dP(function(){var t=document.querySelector('meta[property="csp-nonce"]');return t?t.getAttribute("content"):null}),Ex=function(e,r,i){try{"insertRule"in e?e.insertRule(r,i):"appendRule"in e&&e.appendRule(r)}catch{return!1}return e.cssRules[i]},kx=function(e,r){var i=e.cssRules.length;return r===void 0||r>i?i:r},Tq=function(){var e=document.createElement("style");return e.textContent=` 3449`,e},Iq=function(){function t(r){this.getPropertyValue=yq,this.setProperty=vq,this.removeProperty=bq,this.setSelector=wq,this.hasInsertedRules=!1,this.cssRules=[],r&&Zl.add(r),this.sheet=r;var i=this.sheet?this.sheet.options:{},s=i.media,o=i.meta,a=i.element;this.element=a||Tq(),this.element.setAttribute("data-jss",""),s&&this.element.setAttribute("media",s),o&&this.element.setAttribute("data-meta",o);var l=kq();l&&this.element.setAttribute("nonce",l)}var e=t.prototype;return e.attach=function(){if(!(this.element.parentNode||!this.sheet)){Eq(this.element,this.sheet.options);var i=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&i&&(this.hasInsertedRules=!1,this.deploy())}},e.detach=function(){if(this.sheet){var i=this.element.parentNode;i&&i.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=` 3450`)}},e.deploy=function(){var i=this.sheet;if(i){if(i.options.link){this.insertRules(i.rules);return}this.element.textContent=` 3451`+i.toString()+` 3452`}},e.insertRules=function(i,s){for(var o=0;o<i.index.length;o++)this.insertRule(i.index[o],o,s)},e.insertRule=function(i,s,o){if(o===void 0&&(o=this.element.sheet),i.rules){var a=i,l=o;
3452if(i.type==="conditional"||i.type==="keyframes"){var c=kx(o,s);if(l=Ex(o,a.toString({children:!1}),c),l===!1)return!1;this.refCssRule(i,c,l)}return this.insertRules(a.rules,l),l}var d=i.toString();if(!d)return!1;var f=kx(o,s),g=Ex(o,d,f);return g===!1?!1:(this.hasInsertedRules=!0,this.refCssRule(i,f,g),g)},e.refCssRule=function(i,s,o){i.renderable=o,i.options.parent instanceof cP&&this.cssRules.splice(s,0,o)},e.deleteRule=function(i){var s=this.element.sheet,o=this.indexOf(i);return o===-1?!1:(s.deleteRule(o),this.cssRules.splice(o,1),!0)},e.indexOf=function(i){return this.cssRules.indexOf(i)},e.replaceRule=function(i,s){var o=this.indexOf(i);return o===-1?!1:(this.element.sheet.deleteRule(o),this.cssRules.splice(o,1),this.insertRule(s,o))},e.getRules=function(){return this.element.sheet.cssRules},t}(),Rq=0,Pq=function(){function t(r){this.id=Rq++,this.version="10.9.2",this.plugins=new gq,this.options={id:{minify:!1},createGenerateId:_x,Renderer:xc?Iq:null,plugins:[]},this.generateId=_x({minify:!1});for(var i=0;i<Sx.length;i++)this.plugins.use(Sx[i],{queue:"internal"});this.setup(r)}var e=t.prototype;return e.setup=function(i){return i===void 0&&(i={}),i.createGenerateId&&(this.options.createGenerateId=i.createGenerateId),i.id&&(this.options.id=M({},this.options.id,i.id)),(i.createGenerateId||i.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),i.insertionPoint!=null&&(this.options.insertionPoint=i.insertionPoint),"Renderer"in i&&(this.options.Renderer=i.Renderer),i.plugins&&this.use.apply(this,i.plugins),this},e.createStyleSheet=function(i,s){s===void 0&&(s={});var o=s,a=o.index;typeof a!="number"&&(a=Zl.index===0?0:Zl.index+1);var l=new cP(i,M({},s,{jss:this,generateId:s.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:a}));return this.plugins.onProcessSheet(l),l},e.removeStyleSheet=function(i){return i.detach(),Zl.remove(i),this},e.createRule=function(i,s,o){if(s===void 0&&(s={}),o===void 0&&(o={}),typeof i=="object")return this.createRule(void 0,i,s);var a=M({},o,{name:i,jss:this,Renderer:this.options.Renderer});a.generateId||(a.generateId=this.generateId),a.classes||(a.classes={}),a.keyframes||(a.keyframes={});var l=N1(i,s,a);return l&&this.plugins.onProcessRule(l),l},e.use=function(){for(var i=this,s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];return o.forEach(function(l){i.plugins.use(l)}),this},t}(),fP=function(e){return new Pq(e)},L1=typeof CSS=="object"&&CSS!=null&&"number"in CSS;function pP(t){var e=null;for(var r in t){var i=t[r],s=typeof i;if(s==="function")e||(e={}),e[r]=i;else if(s==="object"&&i!==null&&!Array.isArray(i)){var o=pP(i);o&&(e||(e={}),e[r]=o)}}return e}/** 3453 * A better abstraction over CSS. 3454 * 3455 * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present 3456 * @website https://github.com/cssinjs/jss 3457 * @license MIT 3458 */fP();var gP=Date.now(),Tg="fnValues"+gP,Ig="fnStyle"+ ++gP,Aq=function(){return{onCreateRule:function(r,i,s){if(typeof i!="function")return null;var o=N1(r,{},s);return o[Ig]=i,o},onProcessStyle:function(r,i){if(Tg in i||Ig in i)return r;var s={};for(var o in r){var a=r[o];typeof a=="function"&&(delete r[o],s[o]=a)}return i[Tg]=s,r},onUpdate:function(r,i,s,o){var a=i,l=a[Ig];l&&(a.style=l(r)||{});var c=a[Tg];if(c)for(var d in c)a.prop(d,c[d](r),o)}}};const Oq=Aq;var Vi="@global",Ay="@global ",Dq=function(){function t(r,i,s){this.type="global",this.at=Vi,this.isProcessed=!1,this.key=r,this.options=s,this.rules=new pp(M({},s,{parent:this}));for(var o in i)this.rules.add(o,i[o]);this.rules.process()}var e=t.prototype;return e.getRule=function(i){return this.rules.get(i)},e.addRule=function(i,s,o){var a=this.rules.add(i,s,o);return a&&this.options.jss.plugins.onProcessRule(a),a},e.replaceRule=function(i,s,o){var a=this.rules.replace(i,s,o);return a&&this.options.jss.plugins.onProcessRule(a),a},e.indexOf=function(i){return this.rules.indexOf(i)},e.toString=function(i){return this.rules.toString(i)},t}(),Mq=function(){function t(r,i,s){this.type="global",this.at=Vi,this.isProcessed=!1,this.key=r,this.options=s;var o=r.substr(Ay.length);this.rule=s.jss.createRule(o,i,M({},s,{parent:this}))}var e=t.prototype;return e.toString=function(i){return this.rule?this.rule.toString(i):""},t}(),Nq=/\s*,\s*/g;function mP(t,e){for(var r=t.split(Nq),i="",s=0;s<r.length;s++)i+=e+" "+r[s].trim(),r[s+1]&&(i+=", ");return i}function $q(t,e){var r=t.options,i=t.style,s=i?i[Vi]:null;if(s){for(var o in s)e.addRule(o,s[o],M({},r,{selector:mP(o,t.selector)}));delete i[Vi]}}function Lq(t,e){var r=t.options,i=t.style;for(var s in i)if(!(s[0]!=="@"||s.substr(0,Vi.length)!==Vi)){var o=mP(s.substr(Vi.length),t.selector);e.addRule(o,i[s],M({},r,{selector:o})),delete i[s]}}function Fq(){function t(r,i,s){if(!r)return null;if(r===Vi)return new Dq(r,i,s);if(r[0]==="@"&&r.substr(0,Ay.length)===Ay)return new Mq(r,i,s);var o=s.parent;return o&&(o.type==="global"||o.options.parent&&o.options.parent.type==="global")&&(s.scoped=!1),!s.selector&&s.scoped===!1&&(s.selector=r),null}function e(r,i){r.type!=="style"||!i||($q(r,i),Lq(r,i))}return{onCreateRule:t,onProcessRule:e}}var Tx=/\s*,\s*/g,Uq=/&/g,Bq=/\$([\w-]+)/g;function jq(){function t(s,o){return function(a,l){var c=s.getRule(l)||o&&o.getRule(l);return c?c.selector:l}}function e(s,o){for(var a=o.split(Tx),l=s.split(Tx),c="",d=0;d<a.length;d++)for(var f=a[d],g=0;g<l.length;g++){var v=l[g];c&&(c+=", "),c+=v.indexOf("&")!==-1?v.replace(Uq,f):f+" "+v}return c}function r(s,o,a){if(a)return M({},a,{index:a.index+1});var l=s.options.nestingLevel;l=l===void 0?1:l+1;var c=M({},s.options,{nestingLevel:l,index:o.indexOf(s)+1});return delete c.name,c}function i(s,o,a){if(o.type!=="style")return s;var l=o,c=l.options.parent,d,f;for(var g in s){var v=g.indexOf("&")!==-1,_=g[0]==="@";if(!(!v&&!_)){if(d=r(l,c,d),v){var w=e(g,l.selector);f||(f=t(c,a)),w=w.replace(Bq,f);var k=l.key+"-"+g;"replaceRule"in c?c.replaceRule(k,s[g],M({},d,{selector:w})):c.addRule(k,s[g],M({},d,{selector:w}))}else _&&c.addRule(g,{},d).addRule(l.key,s[g],{selector:l.selector});delete s[g]}}return s}return{onProcessStyle:i}}var zq=/[A-Z]/g,Vq=/^ms-/,Rg={};function Wq(t){return"-"+t.toLowerCase()}function yP(t){if(Rg.hasOwnProperty(t))return Rg[t];var e=t.replace(zq,Wq);return Rg[t]=Vq.test(e)?"-"+e:e}function Th(t){var e={};for(var r in t){var i=r.indexOf("--")===0?r:yP(r);e[i]=t[r]}return t.fallbacks&&(Array.isArray(t.fallbacks)?e.fallbacks=t.fallbacks.map(Th):e.fallbacks=Th(t.fallbacks)),e}function Gq(){function t(r){if(Array.isArray(r)){for(var i=0;i<r.length;i++)r[i]=Th(r[i]);return r}return Th(r)}function e(r,i,s){if(i.indexOf("--")===0)return r;var o=yP(i);return i===o?r:(s.prop(o,r),null)}return{onProcessStyle:t,onChangeValue:e}}var te=L1&&CSS?CSS.px:"px",id=L1&&CSS?CSS.ms:"ms",wo=L1&&CSS?CSS.percent:"%",Hq={"animation-delay":id,"animation-duration":id,"background-position":te,"background-position-x":te,"background-position-y":te,"background-size":te,border:te,"border-bottom":te,"border-bottom-left-radius":te,"border-bottom-right-radius":te,"border-bottom-width":te,"border-left":te,"border-left-width":te,"border-radius":te,"border-right":te,"border-right-width":te,"border-top":te,"border-top-left-radius":te,"border-top-right-radius":te,"border-top-width":te,"border-width":te,"border-block":te,"border-block-end":te,"border-block-end-width":te,"border-block-start":te,"border-block-start-width":te,"border-block-width":te,"border-inline":te,"border-inline-end":te,"border-inline-end-width":te,"border-inline-start":te,"border-inline-start-width":te,"border-inline-width":te,"border-start-start-radius":te,"border-start-end-radius":te,"border-end-start-radius":te,"border-end-end-radius":te,margin:te,"margin-bottom":te,"margin-left":te,"margin-right":te,"margin-top":te,"margin-block":te,"margin-block-end":te,"margin-block-start":te,"margin-inline":te,"margin-inline-end":te,"margin-inline-start":te,padding:te,"padding-bottom":te,"padding-left":te,"padding-right":te,"padding-top":te,"padding-block":te,"padding-block-end":te,"padding-block-start":te,"padding-inline":te,"padding-inline-end":te,"padding-inline-start":te,"mask-position-x":te,"mask-position-y":te,"mask-size":te,height:te,width:te,"min-height":te,"max-height":te,"min-width":te,"max-width":te,bottom:te,left:te,top:te,right:te,inset:te,"inset-block":te,"inset-block-end":te,"inset-block-start":te,"inset-inline":te,"inset-inline-end":te,"inset-inline-start":te,"box-shadow":te,"text-shadow":te,"column-gap":te,"column-rule":te,"column-rule-width":te,"column-width":te,"font-size":te,"font-size-delta":te,"letter-spacing":te,"text-decoration-thickness":te,"text-indent":te,"text-stroke":te,"text-stroke-width":te,"word-spacing":te,motion:te,"motion-offset":te,outline:te,"outline-offset":te,"outline-width":te,perspective:te,"perspective-origin-x":wo,"perspective-origin-y":wo,"transform-origin":wo,"transform-origin-x":wo,"transform-origin-y":wo,"transform-origin-z":wo,"transition-delay":id,"transition-duration":id,"vertical-align":te,"flex-basis":te,"shape-margin":te,
3458size:te,gap:te,grid:te,"grid-gap":te,"row-gap":te,"grid-row-gap":te,"grid-column-gap":te,"grid-template-rows":te,"grid-template-columns":te,"grid-auto-rows":te,"grid-auto-columns":te,"box-shadow-x":te,"box-shadow-y":te,"box-shadow-blur":te,"box-shadow-spread":te,"font-line-height":te,"text-shadow-x":te,"text-shadow-y":te,"text-shadow-blur":te};function vP(t){var e=/(-[a-z])/g,r=function(a){return a[1].toUpperCase()},i={};for(var s in t)i[s]=t[s],i[s.replace(e,r)]=t[s];return i}var qq=vP(Hq);function eu(t,e,r){if(e==null)return e;if(Array.isArray(e))for(var i=0;i<e.length;i++)e[i]=eu(t,e[i],r);else if(typeof e=="object")if(t==="fallbacks")for(var s in e)e[s]=eu(s,e[s],r);else for(var o in e)e[o]=eu(t+"-"+o,e[o],r);else if(typeof e=="number"&&isNaN(e)===!1){var a=r[t]||qq[t];return a&&!(e===0&&a===te)?typeof a=="function"?a(e).toString():""+e+a:e.toString()}return e}function Kq(t){t===void 0&&(t={});var e=vP(t);function r(s,o){if(o.type!=="style")return s;for(var a in s)s[a]=eu(a,s[a],e);return s}function i(s,o){return eu(o,s,e)}return{onProcessStyle:r,onChangeValue:i}}function Oy(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function Yq(t){if(Array.isArray(t))return Oy(t)}function Xq(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Qq(t,e){if(t){if(typeof t=="string")return Oy(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Oy(t,e)}}function Jq(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 3459In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zq(t){return Yq(t)||Xq(t)||Qq(t)||Jq()}var Il="",Dy="",bP="",wP="",eK=xc&&"ontouchstart"in document.documentElement;if(xc){var Pg={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},tK=document.createElement("p"),Ag=tK.style,nK="Transform";for(var Og in Pg)if(Og+nK in Ag){Il=Og,Dy=Pg[Og];break}Il==="Webkit"&&"msHyphens"in Ag&&(Il="ms",Dy=Pg.ms,wP="edge"),Il==="Webkit"&&"-apple-trailing-word"in Ag&&(bP="apple")}var Fe={js:Il,css:Dy,vendor:bP,browser:wP,isTouch:eK};function rK(t){return t[1]==="-"||Fe.js==="ms"?t:"@"+Fe.css+"keyframes"+t.substr(10)}var iK={noPrefill:["appearance"],supportedProperty:function(e){return e!=="appearance"?!1:Fe.js==="ms"?"-webkit-"+e:Fe.css+e}},sK={noPrefill:["color-adjust"],supportedProperty:function(e){return e!=="color-adjust"?!1:Fe.js==="Webkit"?Fe.css+"print-"+e:e}},oK=/[-\s]+(.)?/g;function aK(t,e){return e?e.toUpperCase():""}function F1(t){return t.replace(oK,aK)}function rs(t){return F1("-"+t)}var lK={noPrefill:["mask"],supportedProperty:function(e,r){if(!/^mask/.test(e))return!1;if(Fe.js==="Webkit"){var i="mask-image";if(F1(i)in r)return e;if(Fe.js+rs(i)in r)return Fe.css+e}return e}},uK={noPrefill:["text-orientation"],supportedProperty:function(e){return e!=="text-orientation"?!1:Fe.vendor==="apple"&&!Fe.isTouch?Fe.css+e:e}},cK={noPrefill:["transform"],supportedProperty:function(e,r,i){return e!=="transform"?!1:i.transform?e:Fe.css+e}},dK={noPrefill:["transition"],supportedProperty:function(e,r,i){return e!=="transition"?!1:i.transition?e:Fe.css+e}},hK={noPrefill:["writing-mode"],supportedProperty:function(e){return e!=="writing-mode"?!1:Fe.js==="Webkit"||Fe.js==="ms"&&Fe.browser!=="edge"?Fe.css+e:e}},fK={noPrefill:["user-select"],supportedProperty:function(e){return e!=="user-select"?!1:Fe.js==="Moz"||Fe.js==="ms"||Fe.vendor==="apple"?Fe.css+e:e}},pK={supportedProperty:function(e,r){if(!/^break-/.test(e))return!1;if(Fe.js==="Webkit"){var i="WebkitColumn"+rs(e);return i in r?Fe.css+"column-"+e:!1}if(Fe.js==="Moz"){var s="page"+rs(e);return s in r?"page-"+e:!1}return!1}},gK={supportedProperty:function(e,r){if(!/^(border|margin|padding)-inline/.test(e))return!1;if(Fe.js==="Moz")return e;var i=e.replace("-inline","");return Fe.js+rs(i)in r?Fe.css+i:!1}},mK={supportedProperty:function(e,r){return F1(e)in r?e:!1}},yK={supportedProperty:function(e,r){var i=rs(e);return e[0]==="-"||e[0]==="-"&&e[1]==="-"?e:Fe.js+i in r?Fe.css+e:Fe.js!=="Webkit"&&"Webkit"+i in r?"-webkit-"+e:!1}},vK={supportedProperty:function(e){return e.substring(0,11)!=="scroll-snap"?!1:Fe.js==="ms"?""+Fe.css+e:e}},bK={supportedProperty:function(e){return e!=="overscroll-behavior"?!1:Fe.js==="ms"?Fe.css+"scroll-chaining":e}}
3459,wK={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},SK={supportedProperty:function(e,r){var i=wK[e];return i&&Fe.js+rs(i)in r?Fe.css+i:!1}},SP={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},CK=Object.keys(SP),xK=function(e){return Fe.css+e},_K={supportedProperty:function(e,r,i){var s=i.multiple;if(CK.indexOf(e)>-1){var o=SP[e];if(!Array.isArray(o))return Fe.js+rs(o)in r?Fe.css+o:!1;if(!s)return!1;for(var a=0;a<o.length;a++)if(!(Fe.js+rs(o[0])in r))return!1;return o.map(xK)}return!1}},CP=[iK,sK,lK,uK,cK,dK,hK,fK,pK,gK,mK,yK,vK,bK,SK,_K],Ix=CP.filter(function(t){return t.supportedProperty}).map(function(t){return t.supportedProperty}),EK=CP.filter(function(t){return t.noPrefill}).reduce(function(t,e){return t.push.apply(t,Zq(e.noPrefill)),t},[]),Rl,Cs={};if(xc){Rl=document.createElement("p");var Dg=window.getComputedStyle(document.documentElement,"");for(var Mg in Dg)isNaN(Mg)||(Cs[Dg[Mg]]=Dg[Mg]);EK.forEach(function(t){return delete Cs[t]})}function My(t,e){if(e===void 0&&(e={}),!Rl)return t;if(Cs[t]!=null)return Cs[t];(t==="transition"||t==="transform")&&(e[t]=t in Rl.style);for(var r=0;r<Ix.length&&(Cs[t]=Ix[r](t,Rl.style,e),!Cs[t]);r++);try{Rl.style[t]=""}catch{return!1}return Cs[t]}var So={},kK={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},TK=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g,bi;function IK(t,e,r){if(e==="var")return"var";if(e==="all")return"all";if(r==="all")return", all";var i=e?My(e):", "+My(r);return i||e||r}xc&&(bi=document.createElement("p"));function Rx(t,e){var r=e;if(!bi||t==="content")return e;if(typeof r!="string"||!isNaN(parseInt(r,10)))return r;var i=t+r;if(So[i]!=null)return So[i];try{bi.style[t]=r}catch{return So[i]=!1,!1}if(kK[t])r=r.replace(TK,IK);else if(bi.style[t]===""&&(r=Fe.css+r,r==="-ms-flex"&&(bi.style[t]="-ms-flexbox"),bi.style[t]=r,bi.style[t]===""))return So[i]=!1,!1;return bi.style[t]="",So[i]=r,So[i]}function RK(){function t(s){if(s.type==="keyframes"){var o=s;o.at=rK(o.at)}}function e(s){for(var o in s){var a=s[o];if(o==="fallbacks"&&Array.isArray(a)){s[o]=a.map(e);continue}var l=!1,c=My(o);c&&c!==o&&(l=!0);var d=!1,f=Rx(c,Bs(a));f&&f!==a&&(d=!0),(l||d)&&(l&&delete s[o],s[c||o]=f||a)}return s}function r(s,o){return o.type!=="style"?s:e(s)}function i(s,o){return Rx(o,Bs(s))||s}return{onProcessRule:t,onProcessStyle:r,onChangeValue:i}}function PK(){var t=function(r,i){return r.length===i.length?r>i?1:-1:r.length-i.length};return{onProcessStyle:function(r,i){if(i.type!=="style")return r;for(var s={},o=Object.keys(r).sort(t),a=0;a<o.length;a++)s[o[a]]=r[o[a]];return s}}}function AK(){return{plugins:[Oq(),Fq(),jq(),Gq(),Kq(),typeof window>"u"?null:RK(),PK()]}}function xP(t={}){const{baseClasses:e,newClasses:r,Component:i}=t;if(!r)return e;const s=M({},e);return Object.keys(r).forEach(o=>{r[o]&&(s[o]=`${e[o]} ${r[o]}`)}),s}const OK={set:(t,e,r,i)=>{let s=t.get(e);s||(s=new Map,t.set(e,s)),s.set(r,i)},get:(t,e,r)=>{const i=t.get(e);return i?i.get(r):void 0},delete:(t,e,r)=>{t.get(e).delete(r)}},Mo=OK,DK=fP(AK()),MK=W7(),NK=new Map,$K={disableGeneration:!1,generateClassName:MK,jss:DK,sheetsCache:null,sheetsManager:NK,sheetsRegistry:null},LK=P.createContext($K);let Px=-1e9;function FK(){return Px+=1,Px}const UK=["variant"];function Ax(t){return t.length===0}function BK(t){const{variant:e}=t,r=pe(t,UK);let i=e||"";return Object.keys(r).sort().forEach(s=>{s==="color"?i+=Ax(i)?t[s]:he(t[s]):i+=`${Ax(i)?s:he(s)}${he(t[s].toString())}`}),i}const jK={},zK=jK;function VK(t){const e=typeof t=="function";return{create:(r,i)=>{let s;try{s=e?t(r):t}catch(c){throw c}if(!i||!r.components||!r.components[i]||!r.components[i].styleOverrides&&!r.components[i].variants)return s;const o=r.components[i].styleOverrides||{},a=r.components[i].variants||[],l=M({},s);
3459return Object.keys(o).forEach(c=>{l[c]=Ln(l[c]||{},o[c])}),a.forEach(c=>{const d=BK(c.props);l[d]=Ln(l[d]||{},c.style)}),l},options:{}}}const WK=["name","classNamePrefix","Component","defaultTheme"];function GK({state:t,stylesOptions:e},r,i){if(e.disableGeneration)return r||{};t.cacheClasses||(t.cacheClasses={value:null,lastProp:null,lastJSS:{}});let s=!1;return t.classes!==t.cacheClasses.lastJSS&&(t.cacheClasses.lastJSS=t.classes,s=!0),r!==t.cacheClasses.lastProp&&(t.cacheClasses.lastProp=r,s=!0),s&&(t.cacheClasses.value=xP({baseClasses:t.cacheClasses.lastJSS,newClasses:r,Component:i})),t.cacheClasses.value}function HK({state:t,theme:e,stylesOptions:r,stylesCreator:i,name:s},o){if(r.disableGeneration)return;let a=Mo.get(r.sheetsManager,i,e);a||(a={refs:0,staticSheet:null,dynamicStyles:null},Mo.set(r.sheetsManager,i,e,a));const l=M({},i.options,r,{theme:e,flip:typeof r.flip=="boolean"?r.flip:e.direction==="rtl"});l.generateId=l.serverGenerateClassName||l.generateClassName;const c=r.sheetsRegistry;if(a.refs===0){let d;r.sheetsCache&&(d=Mo.get(r.sheetsCache,i,e));const f=i.create(e,s);d||(d=r.jss.createStyleSheet(f,M({link:!1},l)),d.attach(),r.sheetsCache&&Mo.set(r.sheetsCache,i,e,d)),c&&c.add(d),a.staticSheet=d,a.dynamicStyles=pP(f)}if(a.dynamicStyles){const d=r.jss.createStyleSheet(a.dynamicStyles,M({link:!0},l));d.update(o),d.attach(),t.dynamicSheet=d,t.classes=xP({baseClasses:a.staticSheet.classes,newClasses:d.classes}),c&&c.add(d)}else t.classes=a.staticSheet.classes;a.refs+=1}function qK({state:t},e){t.dynamicSheet&&t.dynamicSheet.update(e)}function KK({state:t,theme:e,stylesOptions:r,stylesCreator:i}){if(r.disableGeneration)return;const s=Mo.get(r.sheetsManager,i,e);s.refs-=1;const o=r.sheetsRegistry;s.refs===0&&(Mo.delete(r.sheetsManager,i,e),r.jss.removeStyleSheet(s.staticSheet),o&&o.remove(s.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),o&&o.remove(t.dynamicSheet))}function YK(t,e){const r=P.useRef([]);let i;const s=P.useMemo(()=>({}),e);r.current!==s&&(r.current=s,i=t()),P.useEffect(()=>()=>{i&&i()},[s])}function XK(t,e={}){const{name:r,classNamePrefix:i,Component:s,defaultTheme:o=zK}=e,a=pe(e,WK),l=VK(t),c=r||i||"makeStyles";return l.options={index:FK(),name:r,meta:c,classNamePrefix:c},(f={})=>{const g=Jv()||o,v=M({},P.useContext(LK),a),_=P.useRef(),w=P.useRef();return YK(()=>{const y={name:r,state:{},stylesCreator:l,stylesOptions:v,theme:g};return HK(y,f),w.current=!1,_.current=y,()=>{KK(y)}},[g,l]),P.useEffect(()=>{w.current&&qK(_.current,f),w.current=!0}),GK(_.current,f.classes,s)}}const QK="#1223E6",JK="#09ebaf",ZK="#EDEDED",eY=XK({dialogCloseIconButton:{position:"absolute",top:16,right:16,color:"black"}}),tY=t0({typography:{htmlFontSize:10,fontFamily:["Poppins","sans-serif"].join(","),fontSize:14,fontWeight:400,button:{letterSpacing:"0.025rem",lineHeight:"1rem",padding:"10px 20px",fontWeight:400},h1:{margin:"20px 0",fontWeight:500,fontSize:28},h2:{margin:"20px 0",fontWeight:500,fontSize:24},h3:{margin:"20px 0",fontWeight:500,fontSize:20}},palette:{primary:{main:QK},secondary:{main:JK},background:{default:ZK,paper:"#fff"}},components:{MuiCssBaseline:{styleOverrides:{body:{margin:"20px 30px 30px"}}},MuiCard:{styleOverrides:{root:{padding:"20px 40px 40px"}}},MuiTypography:{styleOverrides:{root:{lineHeight:"2rem",marginBottom:20}}},MuiFormLabel:{styleOverrides:{root:{color:"black"}}},MuiInputBase:{styleOverrides:{root:{}}},MuiOutlinedInput:{styleOverrides:{notchedOutline:{border:"1px solid black",borderRadius:0}}},MuiButton:{styleOverrides:{root:{lineHeight:"1.5rem",marginTop:5,padding:"0 25px",minHeight:50,boxShadow:"none",borderRadius:0,"&:hover":{boxShadow:"none"}}}},MuiDialogTitle:{styleOverrides:{root:{borderBottom:"1px solid #e0e0e0",padding:26}}},MuiDialogContent:{styleOverrides:{root:{paddingTop:"10px !important"}}}}}),_P=({openDialog:t,setOpenDialog:e,dialogProps:r,setDialogProps:i})=>{const s=eY();_P.propTypes={openDialog:Is.bool,setOpenDialog:Is.func,dialogProps:Is.object,setDialogProps:Is.func};const{handleConfirm:o,handleClose:a,dialogTitle:l,dialogContent:c,confirmText:d,cancelText:f}=r;return t&&be(zR,{maxWidth:"xs",onClose:(g,v)=>{v!=="backdropClick"&&v!=="escapeKeyDown"&&(e(!1),i({}),a&&a())},open:t,children:[$(to,{className:s.dialogCloseIconButton,onClick:()=>{e(!1),i({}),a&&a()},children:$(aP,{})}),$(GR,{children:l}),$(WR,{children:c}),be(VR,{children:[$(en,{color:"primary",variant:"outlined",onClick:()=>{e(!1),i({}),a&&a()},children:f||"Cancel"}),$(en,{color:"primary",variant:"contained",onClick:async()=>{await o()&&e(!1)},children:d||"Confirm"})]})]})},nY=()=>{const{message:t,setMessage:e}=fp(),r=P.useRef(),[i,s]=P.useState(),[o,a]=P.useState(!1),[l,c]=P.useState({}),{user:d}=ci(),{addDocument:f,deleteDocument:g,updateDocument:v}=L7("projects"),{documents:_}=F7("projects",["uid","==",d.uid]),w=async E=>E?_.filter(D=>D.name===E).length<=0?(await f({name:E}),e(["Project created successfully."]),r.current=void 0,!0):(e([`Project '${E}' already exists.`,"error"]),!1):(e(["Something went wrong.","error"]),!1),k=async(E,C)=>C?_.filter(A=>A.name===C).length<=0?(await v(E,{name:C}),e(["Project updated successfully."]),r.current=void 0,!0):(e([`Project '${C}' already exists.`,"error"]),!1):(e(["Something went wrong.","error"]),!1),y=async(E,C,D)=>D===C?(await g(E),e(["Project removed successfully."]),r.current=void 0,!0):!1,b=({rowData:E})=>(b.propTypes={rowData:Is.object},be("div",{style:{display:"flex",flexWrap:"nowrap"},id:E.id,children:[$(to,{"aria-label":"edit-project",title:"Edit Project",onClick:()=>{a(!0),c({handleConfirm:async()=>k(E.id,r.current),dialogTitle:"Edit Project Name",dialogContent:$(Mn,{autoFocus:!0,defaultValue:E.name,value:r.current,label:"Project Name",InputLabelProps:{shrink:!0},onChange:C=>{r.current=C.target.value},fullWidth:!0}),confirmText:"Edit",cancelText:"Cancel"})},children:$(sP,{})}),$(to,{"aria-label":"delete-project",title:"Delete Project",onClick:async()=>{a(!0),c({dialogTitle:"Delete Project",dialogContent:be(Rd,{children:[be(cn,{children:["Are you sure you want to delete project ",$("strong",{children:E.name}),"?"]}),$(cn,{children:"All data in this project will be permanently removed and this action can't be reversed."}
3459),$(cn,{children:"To confirm deletion, type the project's name in the field below."}),$(Mn,{autoFocus:!0,value:r.current,label:"Project Name",InputLabelProps:{shrink:!0},onChange:C=>{r.current=C.target.value},fullWidth:!0,style:{marginTop:10}})]}),confirmText:"Delete",cancelText:"Cancel",handleConfirm:()=>y(E.id,E.name,r.current)})},children:$(oP,{})})]})),x=[{title:"Project",field:"name"},{title:"Actions",field:"actions",width:30}];P.useEffect(()=>{t&&s(!0)},[t]);const R=async()=>{try{await f0(d),e(["Email sent successfully"])}catch(E){e([E.message,"error"])}};return be(Rd,{children:[d&&!d.emailVerified?$(ns,{component:"main",maxWidth:"md",sx:{minHeight:"calc(100vh - 130px)",display:"flex",justifyContent:"center",alignItems:"center",flexWrap:"wrap"},children:be(BR,{variant:"outlined",children:[$("h2",{children:"Please verify your email"}),$(cn,{children:"Check your email for instructions."}),$(cn,{children:"If you didn't receive a verification email, click the button below to resend it."}),$(en,{variant:"contained",onClick:R,children:"Resend Email Verification"})]})}):be(ns,{maxWidth:"md",children:[be(cn,{component:"h3",variant:"h3",children:["Hello, ",d.displayName," 👋"]}),$(Yt,{container:!0,spacing:2,children:be(Yt,{item:!0,xs:12,children:[$(i7,{component:hi,children:be(LH,{"aria-label":"simple table",children:[$(d7,{children:$(rd,{children:x.map(E=>$(fl,{style:{width:E.width},children:E.title},E.field))})}),$(GH,{children:(()=>_?_.length>0?_.map(E=>be(rd,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[$(fl,{children:E.name}),$(fl,{children:$(b,{rowData:E})})]},E.name)):$(rd,{children:$(fl,{colSpan:2,children:"No records to display"})}):$(rd,{children:$(fl,{colSpan:2,children:$($a,{})})}))()})]})}),$("div",{style:{display:"flex",justifyContent:"flex-end"},children:$(en,{color:"primary",variant:"contained",size:"medium",onClick:()=>{a(!0),c({handleConfirm:()=>w(r.current),dialogTitle:"Add a Project",dialogContent:$(Mn,{autoFocus:!0,value:r.current,label:"Project Name",InputLabelProps:{shrink:!0},onChange:E=>{r.current=E.target.value},fullWidth:!0}),confirmText:"Confirm",cancelText:"Cancel"})},children:"Add Project"})})]})})]}),o&&$(_P,{setOpenDialog:a,openDialog:o,dialogProps:l,setDialogProps:c}),t&&$(Fa,{message:t,setMessage:e,openAlert:i,setOpenAlert:s})]})},rY=()=>{const{login:t,message:e,setMessage:r,isPending:i}=fp(),[s,o]=P.useState();return P.useEffect(()=>{e&&o(!0)},[e]),be(ns,{component:"main",maxWidth:"xs",sx:{minHeight:"calc(100vh - 130px)",display:"flex",justifyContent:"center",alignItems:"center",flexWrap:"wrap"},children:[be(xn,{sx:{marginTop:8,display:"flex",flexDirection:"column",alignItems:"center"},children:[$(cn,{component:"h1",variant:"h5",children:"Sign in"}),be(xn,{component:"form",onSubmit:l=>{l.preventDefault();const c=new FormData(l.currentTarget);if(!c.get("email")||!c.get("password")){r(["Please fill out all required fields.","error"]);return}t(c.get("email"),c.get("password"))},noValidate:!0,sx:{mt:1},children:[be(Yt,{container:!0,spacing:2,children:[$(Yt,{item:!0,xs:12,children:$(Mn,{required:!0,fullWidth:!0,id:"email",label:"Email Address",name:"email",autoComplete:"email",autoFocus:!0,InputLabelProps:{shrink:!0}})}),$(Yt,{item:!0,xs:12,children:$(Mn,{required:!0,fullWidth:!0,name:"password",label:"Password",type:"password",id:"password",autoComplete:"current-password",InputLabelProps:{shrink:!0}})})]}),$(en,{type:"submit",fullWidth:!0,variant:"contained",sx:{mt:1.8,mb:2},disabled:i,children:i?$($9,{}):"Sign In"}),$(en,{color:"primary",to:"/forgot-password",component:eh,style:{padding:10},children:"Forgot password?"}),$(en,{color:"primary",to:"/sign-up",component:eh,style:{padding:10},children:"Don't have an account? Sign Up"})]})]}),e&&$(Fa,{message:e,setMessage:r,openAlert:s,setOpenAlert:o})]})},iY=()=>{const[t,e]=P.useState(null),[r,i]=P.useState(null),{dispatch:s}=ci();return{signUp:async(a,l,c)=>{e(null),i(!0);try{const{user:d}=await H5(Zr,a,l);if(!d)throw new Error("Could not complete sign up");await jm(d,{displayName:c}),await f0(d),s({type:"LOGIN",payload:d}),i(!1),e(null)}catch(d){d.code==="auth/email-already-in-use"?e(["The email address is already in use","error"]):d.code==="auth/invalid-email"?e(["The email address is not val
3459id.","error"]):d.code==="auth/operation-not-allowed"?e(["Operation not allowed.","error"]):d.code==="auth/weak-password"?e(["The password is too weak.","error"]):e(["Something went wrong.","error"]),i(!1)}},message:t,setMessage:e,isPending:r}},sY=()=>{const{signUp:t,message:e,setMessage:r,isPending:i}=iY(),[s,o]=P.useState();return P.useEffect(()=>{e&&o(!0)},[e]),be(ns,{component:"main",maxWidth:"xs",sx:{minHeight:"calc(100vh - 130px)",display:"flex",justifyContent:"center",alignItems:"center",flexWrap:"wrap"},children:[be(xn,{sx:{marginTop:8,display:"flex",flexDirection:"column",alignItems:"center"},children:[$(cn,{component:"h1",variant:"h5",children:"Sign up"}),be(xn,{component:"form",noValidate:!0,onSubmit:l=>{l.preventDefault();const c=new FormData(l.currentTarget);if(!c.get("firstName")||!c.get("lastName")||!c.get("email")||!c.get("password")){r(["Please fill out all required fields.","error"]);return}const d=`${c.get("firstName")} ${c.get("lastName")}`;t(c.get("email"),c.get("password"),d)},sx:{mt:3},children:[be(Yt,{container:!0,spacing:2,children:[$(Yt,{item:!0,xs:12,sm:6,children:$(Mn,{required:!0,fullWidth:!0,id:"firstName",label:"First Name",name:"firstName",disabled:!!i,InputLabelProps:{shrink:!0},autoFocus:!0})}),$(Yt,{item:!0,xs:12,sm:6,children:$(Mn,{required:!0,fullWidth:!0,id:"lastName",label:"Last Name",name:"lastName",disabled:!!i,InputLabelProps:{shrink:!0}})}),$(Yt,{item:!0,xs:12,children:$(Mn,{required:!0,fullWidth:!0,id:"email",label:"Email Address",name:"email",disabled:!!i,InputLabelProps:{shrink:!0}})}),$(Yt,{item:!0,xs:12,children:$(Mn,{required:!0,fullWidth:!0,name:"password",label:"Password",type:"password",id:"password",disabled:!!i,InputLabelProps:{shrink:!0}})})]}),$(en,{type:"submit",fullWidth:!0,variant:"contained",sx:{mt:1.8,mb:2},disabled:i,children:i?$($a,{size:24}):"Sign Up"}),$(Yt,{container:!0,justifyContent:"flex-end",children:$(Yt,{item:!0,children:$(en,{color:"primary",to:"/login",component:eh,style:{padding:10},children:"Already have an account? Sign in"})})})]})]}),e&&$(Fa,{message:e,setMessage:r,openAlert:s,setOpenAlert:o})]})},oY=()=>{const{message:t,setMessage:e,isPending:r}=fp(),[i,s]=P.useState();return P.useEffect(()=>{t&&s(!0)},[t]),be(ns,{component:"main",maxWidth:"xs",sx:{minHeight:"calc(100vh - 130px)",display:"flex",justifyContent:"center",alignItems:"center",flexWrap:"wrap"},children:[be(xn,{sx:{marginTop:8,display:"flex",flexDirection:"column",alignItems:"center"},children:[$(cn,{component:"h1",variant:"h5",children:"Reset password"}),be(xn,{component:"form",onSubmit:a=>{a.preventDefault();const l=new FormData(a.currentTarget);if(!l.get("email")){e(["Please fill out all required fields.","error"]);return}jk(Zr,l.get("email")).then(()=>{e(["Password reset required successfully. Check your email inbox.","success"])}).catch(c=>{c.message.includes("auth/user-not-found")?e(["There's no user with this email.","error"]):e([c.message,"error"])})},noValidate:!0,sx:{mt:1},children:[$(Mn,{margin:"normal",required:!0,fullWidth:!0,id:"email",label:"Email Address",name:"email",autoComplete:"email",InputLabelProps:{shrink:!0},autoFocus:!0}),$(en,{type:"submit",fullWidth:!0,variant:"contained",sx:{mt:.8,mb:2},disabled:r,children:r?$($a,{size:24}):"Reset"}),$(Yt,{container:!0,justifyContent:"flex-end",children:$(Yt,{item:!0,children:$(en,{color:"primary",to:"/login",component:eh,style:{padding:10},children:"Go back"})})})]})]}),t&&$(Fa,{message:t,setMessage:e,openAlert:i,setOpenAlert:s})]})};var Ny={},aY={get exports(){return Ny},set exports(t){Ny=t}};(function(t,e){(function(r,i){t.exports=i(P)})(self,function(r){return(()=>{var i={303:(l,c,d)=>{l.exports=d(302),d(200),d(630),d(16),d(677),d(635),d(166),d(140),d(922)},635:(l,c,d)=>{var f,g,v;(function(_){g=[d(302),d(677)],(v=typeof(f=function(w){var k=w.ExifMap.prototype;k.tags={256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",3
345906:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright",34665:{36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",42240:"Gamma",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"PhotographicSensitivity",34856:"OECF",34864:"SensitivityType",34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"E
3459xposureMode",41987:"WhiteBalance",41988:"DigitalZoomRatio",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:"LensSpecification",42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber"},34853:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential",31:"GPSHPositioningError"},40965:{1:"InteroperabilityIndex"}},k.tags.ifd1=k.tags,k.stringValues={ExposureProgram:{0:"Undefined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Undefined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},ComponentsConfiguration:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"},Orientation:{1:"Original",2:"Horizontal flip",3:"Rotate 180° CCW",4:"Vertical flip",5:"Vertical flip + Rotate 90° CW",6:"Rotate 90° CW",7:"Horizontal flip + Rotate 90° CW",8:"Rotate 90° CCW"}},k.getText=function(y){var b=this.get(y);switch(y){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":case"Orientation":return this.stringValues[y][b];case"ExifVersion":case"FlashpixVersion":return b?String.fromCharCode(b[0],b[1],b[2],b[3]):void 0;case"ComponentsConfiguration":return b?this.stringValues[y][b[0]]+this.stringValues[y][b[1]]+this.stringValues[y][b[2]]+this.stringValues[y][b[3]]:void 0;case"GPSVersionID":return b?b[0]+"."+b[1]+"."+b[2]+"."+b[3]:void 0}return String(b)},k.getAll=function(){var y,b,x,R={};for(y in this)Object.prototype.hasOwnProperty.call(this,y)&&((b=this[y])&&b.getAll?R[this.ifds[y].name]=b.getAll():(x=this.tags[y])&&(R[x]=this.getText(x)));return R},k.getName=function(y){var b=this.tags[y];return typeof b=="object"?this.ifds[y].name:b},function(){var y,b,x,R=k.tags;for(y in R)if(Object.prototype.hasOwnProperty.call(R,y))if(b=k.ifds[y])for(y in x=R[y])Object.prototype.hasOwnProperty.call(x,y)&&(b.map[x[y]]=Number(y));else k.map[R[y]]=Number(y)}()})=="function"?f.apply(c,g):f)===void 0||(l.exports=v)})()},677:(l,c,d)=>{var f,g,v;(function(_){g=[d(302),d(630)],(v=typeof(f=function(w){function k(E){E&&(Object.defineProperty(this,"map",{value:this.ifds[E].map}),Object.defineProperty(this,"tags",{value:this.tags&&this.tags[E]||{}}))}k.prototype.map={Orientation:274,Thumbnail:"ifd1",Blob:513,Exif:34665,GPSInfo:34853,Interoperability:40965}
3459,k.prototype.ifds={ifd1:{name:"Thumbnail",map:k.prototype.map},34665:{name:"Exif",map:{}},34853:{name:"GPSInfo",map:{}},40965:{name:"Interoperability",map:{}}},k.prototype.get=function(E){return this[E]||this[this.map[E]]};var y={1:{getValue:function(E,C){return E.getUint8(C)},size:1},2:{getValue:function(E,C){return String.fromCharCode(E.getUint8(C))},size:1,ascii:!0},3:{getValue:function(E,C,D){return E.getUint16(C,D)},size:2},4:{getValue:function(E,C,D){return E.getUint32(C,D)},size:4},5:{getValue:function(E,C,D){return E.getUint32(C,D)/E.getUint32(C+4,D)},size:8},9:{getValue:function(E,C,D){return E.getInt32(C,D)},size:4},10:{getValue:function(E,C,D){return E.getInt32(C,D)/E.getInt32(C+4,D)},size:8}};function b(E,C,D,A,U,B){var z,V,j,N,G,W,q=y[A];if(q){if(!((V=(z=q.size*U)>4?C+E.getUint32(D+8,B):D+8)+z>E.byteLength)){if(U===1)return q.getValue(E,V,B);for(j=[],N=0;N<U;N+=1)j[N]=q.getValue(E,V+N*q.size,B);if(q.ascii){for(G="",N=0;N<j.length&&(W=j[N])!=="\0";N+=1)G+=W;return G}return j}console.log("Invalid Exif data: Invalid data offset.")}else console.log("Invalid Exif data: Invalid tag type.")}function x(E,C,D){return(!E||E[D])&&(!C||C[D]!==!0)}function R(E,C,D,A,U,B,z,V){var j,N,G,W,q,X;if(D+6>E.byteLength)console.log("Invalid Exif data: Invalid directory offset.");else{if(!((N=D+2+12*(j=E.getUint16(D,A)))+4>E.byteLength)){for(G=0;G<j;G+=1)W=D+2+12*G,x(z,V,q=E.getUint16(W,A))&&(X=b(E,C,W,E.getUint16(W+2,A),E.getUint32(W+4,A),A),U[q]=X,B&&(B[q]=W));return E.getUint32(N,A)}console.log("Invalid Exif data: Invalid directory size.")}}y[7]=y[1],w.parseExifData=function(E,C,D,A,U){if(!U.disableExif){var B,z,V,j=U.includeExifTags,N=U.excludeExifTags||{34665:{37500:!0}},G=C+10;if(E.getUint32(C+4)===1165519206)if(G+8>E.byteLength)console.log("Invalid Exif data: Invalid segment size.");else if(E.getUint16(C+8)===0){switch(E.getUint16(G)){case 18761:B=!0;break;case 19789:B=!1;break;default:return void console.log("Invalid Exif data: Invalid byte alignment marker.")}E.getUint16(G+2,B)===42?(z=E.getUint32(G+4,B),A.exif=new k,U.disableExifOffsets||(A.exifOffsets=new k,A.exifTiffOffset=G,A.exifLittleEndian=B),(z=R(E,G,G+z,B,A.exif,A.exifOffsets,j,N))&&x(j,N,"ifd1")&&(A.exif.ifd1=z,A.exifOffsets&&(A.exifOffsets.ifd1=G+z)),Object.keys(A.exif.ifds).forEach(function(W){(function(q,X,J,Z,re,K,ne){var ee=q.exif[X];ee&&(q.exif[X]=new k(X),q.exifOffsets&&(q.exifOffsets[X]=new k(X)),R(J,Z,Z+ee,re,q.exif[X],q.exifOffsets&&q.exifOffsets[X],K&&K[X],ne&&ne[X]))})(A,W,E,G,B,j,N)}),(V=A.exif.ifd1)&&V[513]&&(V[513]=function(W,q,X){if(X){if(!(q+X>W.byteLength))return new Blob([w.bufferSlice.call(W.buffer,q,q+X)],{type:"image/jpeg"});console.log("Invalid Exif data: Invalid thumbnail data.")}}(E,G+V[513],V[514]))):console.log("Invalid Exif data: Missing TIFF marker.")}else console.log("Invalid Exif data: Missing byte alignment offset.")}},w.metaDataParsers.jpeg[65505].push(w.parseExifData),w.exifWriters={274:function(E,C,D){var A=C.exifOffsets[274];return A&&new DataView(E,A+8,2).setUint16(0,D,C.exifLittleEndian),E}},w.writeExifData=function(E,C,D,A){return w.exifWriters[C.exif.map[D]](E,C,A)},w.ExifMap=k})=="function"?f.apply(c,g):f)===void 0||(l.exports=v)})()},16:(l,c,d)=>{var f,g,v;(function(_){g=[d(302)],(v=typeof(f=function(w){var k=w.global;k.fetch&&k.Request&&k.Response&&k.Response.prototype.blob?w.fetchBlob=function(y,b,x){function R(E){return E.blob()}if(k.Promise&&typeof b!="function")return fetch(new Request(y,b)).then(R);fetch(new Request(y,x)).then(R).then(b).catch(function(E){b(null,E)})}:k.XMLHttpRequest&&new XMLHttpRequest().responseType===""&&(w.fetchBlob=function(y,b,x){function R(E,C){x=x||{};var D=new XMLHttpRequest;D.open(x.method||"GET",y),x.headers&&Object.keys(x.headers).forEach(function(A){D.setRequestHeader(A,x.headers[A])}),D.withCredentials=x.credentials==="include",D.responseType="blob",D.onload=function(){E(D.response)},D.onerror=D.onabort=D.ontimeout=function(A){E===C?C(null,A):C(A)},D.send(x.body)}return k.Promise&&typeof b!="function"?(x=b,new Promise(R)):R(b,b)})})=="function"?f.apply(c,g):f)===void 0||(l.exports=v)})()},140:(l,c,d)=>{var f,g,v;(function(_){g=[d(302),d(166)],(v=typeof(f=function(w){var k=w.IptcMap.prototype;k
vendor: 1,397 bytes, line 3459
3459.tags={0:"ApplicationRecordVersion",3:"ObjectTypeReference",4:"ObjectAttributeReference",5:"ObjectName",7:"EditStatus",8:"EditorialUpdate",10:"Urgency",12:"SubjectReference",15:"Category",20:"SupplementalCategories",22:"FixtureIdentifier",25:"Keywords",26:"ContentLocationCode",27:"ContentLocationName",30:"ReleaseDate",35:"ReleaseTime",37:"ExpirationDate",38:"ExpirationTime",40:"SpecialInstructions",42:"ActionAdvised",45:"ReferenceService",47:"ReferenceDate",50:"ReferenceNumber",55:"DateCreated",60:"TimeCreated",62:"DigitalCreationDate",63:"DigitalCreationTime",65:"OriginatingProgram",70:"ProgramVersion",75:"ObjectCycle",80:"Byline",85:"BylineTitle",90:"City",92:"Sublocation",95:"State",100:"CountryCode",101:"Country",103:"OriginalTransmissionReference",105:"Headline",110:"Credit",115:"Source",116:"CopyrightNotice",118:"Contact",120:"Caption",121:"LocalCaption",122:"Writer",125:"RasterizedCaption",130:"ImageType",131:"ImageOrientation",135:"LanguageIdentifier",150:"AudioType",151:"AudioSamplingRate",152:"AudioSamplingResolution",153:"AudioDuration",154:"AudioOutcue",184:"JobID",185:"MasterDocumentID",186:"ShortDocumentID",187:"UniqueDocumentID",188:"OwnerID",200:"ObjectPreviewFileFormat",201:"ObjectPreviewFileVersion",202:"ObjectPreviewData",221:"Prefs",225:"ClassifyState",228:"SimilarityIndex",230:"DocumentNotes",231:"DocumentHistory",232:"ExifCameraInfo",255:"CatalogSets"},
3459k.stringValues={10:{0:"0 (reserved)",1:"1 (most urgent)",2:"2",3:"3",4:"4",5:"5 (normal urgency)",6:"6",7:"7",8:"8 (least urgent)",9:"9 (user-defined priority)"},75:{a:"Morning",b:"Both Morning and Evening",p:"Evening"},131:{L:"Landscape",P:"Portrait",S:"Square"}},k.getText=function(y){var b=this.get(y),x=this.map[y],R=this.stringValues[x];return R?R[b]:String(b)},k.getAll=function(){var y,b,x={};for(y in this)Object.prototype.hasOwnProperty.call(this,y)&&(b=this.tags[y])&&(x[b]=this.getText(b));return x},k.getName=function(y){return this.tags[y]},function(){var y,b=k.tags,x=k.map||{};for(y in b)Object.prototype.hasOwnProperty.call(b,y)&&(x[b[y]]=Number(y))}()})=="function"?f.apply(c,g):f)===void 0||(l.exports=v)})()},166:(l,c,d)=>{var f,g,v;(function(_){g=[d(302),d(630)],(v=typeof(f=function(w){function k(){}function y(C,D,A,U,B){return D.types[C]==="binary"?new Blob([A.buffer.slice(U,U+B)]):D.types[C]==="Uint16"?A.getUint16(U):function(z,V,j){for(var N="",G=V+j,W=V;W<G;W+=1)N+=String.fromCharCode(z.getUint8(W));return N}(A,U,B)}function b(C,D){return C===void 0?D:C instanceof Array?(C.push(D),C):[C,D]}function x(C,D,A,U,B,z){for(var V,j,N,G=D+A,W=D;W<G;)C.getUint8(W)===28&&C.getUint8(W+1)===2&&(N=C.getUint8(W+2),B&&!B[N]||z&&z[N]||(j=C.getInt16(W+3),V=y(N,U.iptc,C,W+5,j),U.iptc[N]=b(U.iptc[N],V),U.iptcOffsets&&(U.iptcOffsets[N]=W))),W+=1}function R(C,D){return C.getUint32(D)===943868237&&C.getUint16(D+4)===1028}function E(C,D){var A=C.getUint8(D+7);return A%2!=0&&(A+=1),A===0&&(A=4),A}k.prototype.map={ObjectName:5},k.prototype.types={0:"Uint16",200:"Uint16",201:"Uint16",202:"binary"},k.prototype.get=function(C){return this[C]||this[this.map[C]]},w.parseIptcData=function(C,D,A,U,B){if(!B.disableIptc)for(var z=D+A;D+8<z;){if(R(C,D)){var V=E(C,D),j=D+8+V;if(j>z){console.log("Invalid IPTC data: Invalid segment offset.");break}var N=C.getUint16(D+6+V);if(D+N>z){console.log("Invalid IPTC data: Invalid segment size.");break}return U.iptc=new k,B.disableIptcOffsets||(U.iptcOffsets=new k),void x(C,j,N,U,B.includeIptcTags,B.excludeIptcTags||{202:!0})}D+=1}},w.metaDataParsers.jpeg[65517].push(w.parseIptcData),w.IptcMap=k})=="function"?f.apply(c,g):f)===void 0||(l.exports=v)})()},630:(l,c,d)=>{var f,g,v;(function(_){g=[d(302)],(v=typeof(f=function(w){var k=w.global,y=w.transform,b=k.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),x=k.ArrayBuffer&&ArrayBuffer.prototype.slice||function(D,A){A=A||this.byteLength-D;var U=new Uint8Array(this,D,A),B=new Uint8Array(A);return B.set(U),B.buffer},R={jpeg:{65505:[],65517:[]}};function E(D,A,U,B){var z=this;function V(j,N){if(!(k.DataView&&b&&D&&D.size>=12&&D.type==="image/jpeg"))return j(B);var G=U.maxMetaDataSize||262144;w.readFile(b.call(D,0,G),function(W){var q=new DataView(W);if(q.getUint16(0)!==65496)return N(new Error("Invalid JPEG file: Missing JPEG marker."));for(var X,J,Z,re,K=2,ne=q.byteLength-4,ee=K;K<ne&&((X=q.getUint16(K))>=65504&&X<=65519||X===65534);){if(K+(J=q.getUint16(K+2)+2)>q.byteLength){console.log("Invalid JPEG metadata: Invalid segment size.");break}if((Z=R.jpeg[X])&&!U.disableMetaDataParsers)for(re=0;re<Z.length;re+=1)Z[re].call(z,q,K,J,B,U);ee=K+=J}!U.disableImageHead&&ee>6&&(B.imageHead=x.call(W,0,ee)),j(B)},N,"readAsArrayBuffer")||j(B)}return U=U||{},k.Promise&&typeof A!="function"?(B=U=A||{},new Promise(V)):(B=B||{},V(A,A))}function C(D,A,U){return D&&A&&U?new Blob([U,b.call(D,A.byteLength)],{type:"image/jpeg"}):null}w.transform=function(D,A,U,B,z){w.requiresMetaData(A)?E(B,function(V){V!==z&&(k.console&&console.log(V),V=z),y.call(w,D,A,U,B,V)},A,z=z||{}):y.apply(w,arguments)},w.blobSlice=b,w.bufferSlice=x,w.replaceHead=function(D,A,U){var B={maxMetaDataSize:256,disableMetaDataParsers:!0};if(!U&&k.Promise)return E(D,B).then(function(z){return C(D,z.imageHead,A)});E(D,function(z){U(C(D,z.imageHead,A))},B)},w.parseMetaData=E,w.metaDataParsers=R})=="function"?f.apply(c,g):f)===void 0||(l.exports=v)})()},922:(l,c,d)=>{var f,g,v;(function(_){g=[d(302),d(200),d(630)],(v=typeof(f=function(w){var k=w.transform,y=w.requiresCanvas,b=w.requiresMetaData,x=w.transformCoordinates,R=w.getTransformedOptions;function E(A,U){var B=A&&A.orientation;return B===!0&&!w.orientation||B===1&&w.orientation||(!U||w.orientation)&&B>1&&B<9}function C(A,U){return A!==U&&(A===1&&U>1&&U<9||A>1&&A<9)}function D(A,U){if(U>1&&U<9)switch(A){case 2:case 4:return U>4;case 5:case 7:return U%2==0;case 6:case 8:return U===2||U===4||U===5||U===7}return!1}(function(A){if(A.global.document){var U=document.createElement("img");U.onload=function(){if(A.orientation=U.width===2&&U.height===3,A.orientation){var B=A.createCanvas(1,1,!0).getContext("2d");B.drawImage(U,1,1,1,1,0,0,1,1),A.orientationCropBug=B.getImageData(0,0,1,1).data.toString()!=="255,255,255,255"}},U.src="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAIAAwMBEQACEQEDEQH/xABRAAEAAAAAAAAAAAAAAAAAAAAKEAEBAQADAQEAAAAAAAAAAAAGBQQDCAkCBwEBAAAAAAAAAAAAAAAAAAAAABEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AG8T9NfSMEVMhQvoP3fFiRZ+MTHDifa/95OFSZU5OzRzxkyejv8ciEfhSceSXGjS8eSdLnZc2HDm4M3BxcXwH
3459/9k="}})(w),w.requiresCanvas=function(A){return E(A)||y.call(w,A)},w.requiresMetaData=function(A){return E(A,!0)||b.call(w,A)},w.transform=function(A,U,B,z,V){k.call(w,A,U,function(j,N){if(N){var G=w.orientation&&N.exif&&N.exif.get("Orientation");if(G>4&&G<9){var W=N.originalWidth,q=N.originalHeight;N.originalWidth=q,N.originalHeight=W}}B(j,N)},z,V)},w.getTransformedOptions=function(A,U,B){var z=R.call(w,A,U),V=B.exif&&B.exif.get("Orientation"),j=z.orientation,N=w.orientation&&V;if(j===!0&&(j=V),!C(j,N))return z;var G=z.top,W=z.right,q=z.bottom,X=z.left,J={};for(var Z in z)Object.prototype.hasOwnProperty.call(z,Z)&&(J[Z]=z[Z]);if(J.orientation=j,(j>4&&!(N>4)||j<5&&N>4)&&(J.maxWidth=z.maxHeight,J.maxHeight=z.maxWidth,J.minWidth=z.minHeight,J.minHeight=z.minWidth,J.sourceWidth=z.sourceHeight,J.sourceHeight=z.sourceWidth),N>1){switch(N){case 2:W=z.left,X=z.right;break;case 3:G=z.bottom,W=z.left,q=z.top,X=z.right;break;case 4:G=z.bottom,q=z.top;break;case 5:G=z.left,W=z.bottom,q=z.right,X=z.top;break;case 6:G=z.left,W=z.top,q=z.right,X=z.bottom;break;case 7:G=z.right,W=z.top,q=z.left,X=z.bottom;break;case 8:G=z.right,W=z.bottom,q=z.left,X=z.top}if(D(j,N)){var re=G,K=W;G=q,W=X,q=re,X=K}}switch(J.top=G,J.right=W,J.bottom=q,J.left=X,j){case 2:J.right=X,J.left=W;break;case 3:J.top=q,J.right=X,J.bottom=G,J.left=W;break;case 4:J.top=q,J.bottom=G;break;case 5:J.top=X,J.right=q,J.bottom=W,J.left=G;break;case 6:J.top=W,J.right=q,J.bottom=X,J.left=G;break;case 7:J.top=W,J.right=G,J.bottom=X,J.left=q;break;case 8:J.top=X,J.right=G,J.bottom=W,J.left=q}return J},w.transformCoordinates=function(A,U,B){x.call(w,A,U,B);var z=U.orientation,V=w.orientation&&B.exif&&B.exif.get("Orientation");if(C(z,V)){var j=A.getContext("2d"),N=A.width,G=A.height,W=N,q=G;switch((z>4&&!(V>4)||z<5&&V>4)&&(A.width=G,A.height=N),z>4&&(W=G,q=N),V){case 2:j.translate(W,0),j.scale(-1,1);break;case 3:j.translate(W,q),j.rotate(Math.PI);break;case 4:j.translate(0,q),j.scale(1,-1);break;case 5:j.rotate(-.5*Math.PI),j.scale(-1,1);break;case 6:j.rotate(-.5*Math.PI),j.translate(-W,0);break;case 7:j.rotate(-.5*Math.PI),j.translate(-W,q),j.scale(1,-1);break;case 8:j.rotate(.5*Math.PI),j.translate(0,-q)}switch(D(z,V)&&(j.translate(W,q),j.rotate(Math.PI)),z){case 2:j.translate(N,0),j.scale(-1,1);break;case 3:j.translate(N,G),j.rotate(Math.PI);break;case 4:j.translate(0,G),j.scale(1,-1);break;case 5:j.rotate(.5*Math.PI),j.scale(1,-1);break;case 6:j.rotate(.5*Math.PI),j.translate(0,-G);break;case 7:j.rotate(.5*Math.PI),j.translate(N,-G),j.scale(-1,1);break;case 8:j.rotate(-.5*Math.PI),j.translate(-N,0)}}}})=="function"?f.apply(c,g):f)===void 0||(l.exports=v)})()},200:(l,c,d)=>{var f,g,v;(function(_){g=[d(302)],(v=typeof(f=function(w){var k=w.transform;w.createCanvas=function(y,b,x){if(x&&w.global.OffscreenCanvas)return new OffscreenCanvas(y,b);var R=document.createElement("canvas");return R.width=y,R.height=b,R},w.transform=function(y,b,x,R,E){k.call(w,w.scale(y,b,E),b,x,R,E)},w.transformCoordinates=function(){},w.getTransformedOptions=function(y,b){var x,R,E,C,D=b.aspectRatio;if(!D)return b;for(R in x={},b)Object.prototype.hasOwnProperty.call(b,R)&&(x[R]=b[R]);return x.crop=!0,(E=y.naturalWidth||y.width)/(C=y.naturalHeight||y.height)>D?(x.maxWidth=C*D,x.maxHeight=C):(x.maxWidth=E,x.maxHeight=E/D),x},w.drawImage=function(y,b,x,R,E,C,D,A,U){var B=b.getContext("2d");return U.imageSmoothingEnabled===!1?(B.msImageSmoothingEnabled=!1,B.imageSmoothingEnabled=!1):U.imageSmoothingQuality&&(B.imageSmoothingQuality=U.imageSmoothingQuality),B.drawImage(y,x,R,E,C,0,0,D,A),B},w.requiresCanvas=function(y){return y.canvas||y.crop||!!y.aspectRatio},w.scale=function(y,b,x){b=b||{},x=x||{};var R,E,C,D,A,U,B,z,V,j,N,G,W=y.getContext||w.requiresCanvas(b)&&!!w.global.HTMLCanvasElement,q=y.naturalWidth||y.width,X=y.naturalHeight||y.height,J=q,Z=X;function re(){var ne=Math.max((C||J)/J,(D||Z)/Z);ne>1&&(J*=ne,Z*=ne)}function K(){var ne=Math.min((R||J)/J,(E||Z)/Z);ne<1&&(J*=ne,Z*=ne)}if(W&&(B=(b=w.getTransformedOptions(y,b,x)).left||0,z=b.top||0,b.sourceWidth?(A=b.sourceWidth,b.right!==void 0&&b.left===void 0&&(B=q-A-b.right)):A=q-B-(b.right||0),b.sourceHeight?(U=b.sourceHeight,b.bottom!==void 0&&b.top===void 0&&(z=X-U-b.bottom)):U=X-z-(b.bottom||0),J=A,Z=U),R=b.maxWidth,E=b.maxHeight,C=b.minWidth,D=b.minHeight,W&&R&&E&&b.crop?(J=R,Z=E,(N=A/U-R/E)<0?(U=E*A/R,b.top===void 0&&b.bottom===void 0&&(z=(X-U)/2)):N>0&&(A=R*U/E,b.left===void 0&&b.right===void 0&&(B=(q-A)/2))):((b.contain||b.cover)&&(C=R=R||C,D=E=E||D),b.cover?(K(),re()):(re(),K())),W){if((V=b.pixelRatio)>1&&(!y.style.width||Math.floor(parseFloat(y.style.width,10))!==Math.floor(q/V))&&(J*=V,Z*=V),w.orientationCropBug&&!y.getContext&&(B||z||A!==q||U!==X)&&(N=y,y=w.
3459createCanvas(q,X,!0),w.drawImage(N,y,0,0,q,X,q,X,b)),(j=b.downsamplingRatio)>0&&j<1&&J<A&&Z<U)for(;A*j>J;)G=w.createCanvas(A*j,U*j,!0),w.drawImage(y,G,B,z,A,U,G.width,G.height,b),B=0,z=0,A=G.width,U=G.height,y=G;return G=w.createCanvas(J,Z),w.transformCoordinates(G,b,x),V>1&&(G.style.width=G.width/V+"px"),w.drawImage(y,G,B,z,A,U,J,Z,b).setTransform(1,0,0,1,0,0),G}return y.width=J,y.height=Z,y}})=="function"?f.apply(c,g):f)===void 0||(l.exports=v)})()},302:function(l,c,d){var f;(function(g){var v=g.URL||g.webkitURL;function _(R){return!!v&&v.createObjectURL(R)}function w(R){return!!v&&v.revokeObjectURL(R)}function k(R,E){!R||R.slice(0,5)!=="blob:"||E&&E.noRevoke||w(R)}function y(R,E,C,D){if(!g.FileReader)return!1;var A=new FileReader;A.onload=function(){E.call(A,this.result)},C&&(A.onabort=A.onerror=function(){C.call(A,this.error)});var U=A[D||"readAsDataURL"];return U?(U.call(A,R),A):void 0}function b(R,E){return Object.prototype.toString.call(E)==="[object "+R+"]"}function x(R,E,C){function D(A,U){var B,z=document.createElement("img");function V(N,G){A!==U?N instanceof Error?U(N):((G=G||{}).image=N,A(G)):A&&A(N,G)}function j(N,G){G&&g.console&&console.log(G),N&&b("Blob",N)?B=_(R=N):(B=R,C&&C.crossOrigin&&(z.crossOrigin=C.crossOrigin)),z.src=B}return z.onerror=function(N){k(B,C),U&&U.call(z,N)},z.onload=function(){k(B,C);var N={originalWidth:z.naturalWidth||z.width,originalHeight:z.naturalHeight||z.height};try{x.transform(z,C,V,R,N)}catch(G){U&&U(G)}},typeof R=="string"?(x.requiresMetaData(C)?x.fetchBlob(R,j,C):j(),z):b("Blob",R)||b("File",R)?(B=_(R))?(z.src=B,z):y(R,function(N){z.src=N},U):void 0}return g.Promise&&typeof E!="function"?(C=E,new Promise(D)):D(E,E)}x.requiresMetaData=function(R){return R&&R.meta},x.fetchBlob=function(R,E){E()},x.transform=function(R,E,C,D,A){C(R,A)},x.global=g,x.readFile=y,x.isInstanceOf=b,x.createObjectURL=_,x.revokeObjectURL=w,(f=function(){return x}.call(c,d,c,l))===void 0||(l.exports=f)})(typeof window<"u"&&window||this)},918:function(l,c){var d;(function(){var f=function(V){return V instanceof f?V:this instanceof f?void(this.EXIFwrapped=V):new f(V)};l.exports&&(c=l.exports=f),c.EXIF=f;var g=f.Tags={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"E
3459xposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},v=f.TiffTags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},_=f.GPSTags={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},w=f.IFD1Tags={256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",273:"StripOffsets",274:"Orientation",277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",296:"ResolutionUnit",513:"JpegIFOffset",514:"JpegIFByteCount",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:"YCbCrPositioning",532:"ReferenceBlackWhite"},k=f.StringValues={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}};function y(V){return!!V.exifdata}function b(V,j){function N(q){var X=x(q);V.exifdata=X||{};var J=function(re){var K=new DataView(re);if(K.getUint8(0)!=255||K.getUint8(1)!=216)return!1;for(var ne=2,ee=re.byteLength,ce=function(_e,Oe){return _e.getUint8(Oe)===56&&_e.getUint8(Oe+1)===66&&_e.getUint8(Oe+2)===73&&_e.getUint8(Oe+3)===
345977&&_e.getUint8(Oe+4)===4&&_e.getUint8(Oe+5)===4};ne<ee;){if(ce(K,ne)){var ye=K.getUint8(ne+7);return ye%2!=0&&(ye+=1),ye===0&&(ye=4),E(re,ne+8+ye,K.getUint16(ne+6+ye))}ne++}}(q);if(V.iptcdata=J||{},f.isXmpEnabled){var Z=function(re){if("DOMParser"in self){var K=new DataView(re);if(K.getUint8(0)!=255||K.getUint8(1)!=216)return!1;for(var ne=2,ee=re.byteLength,ce=new DOMParser;ne<ee-4;){if(A(K,ne,4)=="http"){var ye=ne-1,_e=K.getUint16(ne-2)-1,Oe=A(K,ye,_e),He=Oe.indexOf("xmpmeta>")+8,we=(Oe=Oe.substring(Oe.indexOf("<x:xmpmeta"),He)).indexOf("x:xmpmeta")+10;return Oe=Oe.slice(0,we)+'xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tiff="http://ns.adobe.com/tiff/1.0/" xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus" xmlns:ext="http://www.gettyimages.com/xsltExtension/1.0" xmlns:exif="http://ns.adobe.com/exif/1.0/" xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/" xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/" xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/" '+Oe.slice(we),z(ce.parseFromString(Oe,"text/xml"))}ne++}}}(q);V.xmpdata=Z||{}}j&&j.call(V)}if(V.src)if(/^data\:/i.test(V.src))N(function(q,X){X=X||q.match(/^data\:([^\;]+)\;base64,/im)[1]||"",q=q.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var J=atob(q),Z=J.length,re=new ArrayBuffer(Z),K=new Uint8Array(re),ne=0;ne<Z;ne++)K[ne]=J.charCodeAt(ne);return re}(V.src));else if(/^blob\:/i.test(V.src))(W=new FileReader).onload=function(q){N(q.target.result)},function(q,X){var J=new XMLHttpRequest;J.open("GET",q,!0),J.responseType="blob",J.onload=function(Z){var re;this.status!=200&&this.status!==0||(re=this.response,W.readAsArrayBuffer(re))},J.send()}(V.src);else{var G=new XMLHttpRequest;G.onload=function(){if(this.status!=200&&this.status!==0)throw"Could not load image";N(G.response),G=null},G.open("GET",V.src,!0),G.responseType="arraybuffer",G.send(null)}else if(self.FileReader&&(V instanceof self.Blob||V instanceof self.File)){var W;(W=new FileReader).onload=function(q){N(q.target.result)},W.readAsArrayBuffer(V)}}function x(V){var j=new DataView(V);if(j.getUint8(0)!=255||j.getUint8(1)!=216)return!1;for(var N=2,G=V.byteLength;N<G;){if(j.getUint8(N)!=255)return!1;if(j.getUint8(N+1)==225)return U(j,N+4,j.getUint16(N+2));N+=2+j.getUint16(N+2)}}var R={120:"caption",110:"credit",25:"keywords",55:"dateCreated",80:"byline",85:"bylineTitle",122:"captionWriter",105:"headline",116:"copyright",15:"category"};function E(V,j,N){for(var G,W,q,X,J=new DataView(V),Z={},re=j;re<j+N;)J.getUint8(re)===28&&J.getUint8(re+1)===2&&(X=J.getUint8(re+2))in R&&(q=J.getInt16(re+3),W=R[X],G=A(J,re+5,q),Z.hasOwnProperty(W)?Z[W]instanceof Array?Z[W].push(G):Z[W]=[Z[W],G]:Z[W]=G),re++;return Z}function C(V,j,N,G,W){var q,X,J=V.getUint16(N,!W),Z={};for(X=0;X<J;X++)q=N+12*X+2,Z[G[V.getUint16(q,!W)]]=D(V,q,j,0,W);return Z}function D(V,j,N,G,W){var q,X,J,Z,re,K,ne=V.getUint16(j+2,!W),ee=V.getUint32(j+4,!W),ce=V.getUint32(j+8,!W)+N;switch(ne){case 1:case 7:if(ee==1)return V.getUint8(j+8,!W);for(q=ee>4?ce:j+8,X=[],Z=0;Z<ee;Z++)X[Z]=V.getUint8(q+Z);return X;case 2:return A(V,q=ee>4?ce:j+8,ee-1);case 3:if(ee==1)return V.getUint16(j+8,!W);for(q=ee>2?ce:j+8,X=[],Z=0;Z<ee;Z++)X[Z]=V.getUint16(q+2*Z,!W);return X;case 4:if(ee==1)return V.getUint32(j+8,!W);for(X=[],Z=0;Z<ee;Z++)X[Z]=V.getUint32(ce+4*Z,!W);return X;case 5:if(ee==1)return re=V.getUint32(ce,!W),K=V.getUint32(ce+4,!W),(J=new Number(re/K)).numerator=re,J.denominator=K,J;for(X=[],Z=0;Z<ee;Z++)re=V.getUint32(ce+8*Z,!W),K=V.getUint32(ce+4+8*Z,!W),X[Z]=new Number(re/K),X[Z].numerator=re,X[Z].denominator=K;return X;case 9:if(ee==1)return V.getInt32(j+8,!W);for(X=[],Z=0;Z<ee;Z++)X[Z]=V.getInt32(ce+4*Z,!W);return X;case 10:if(ee==1)return V.getInt32(ce,!W)/V.getInt32(ce+4,!W);for(X=[],Z=0;Z<ee;Z++)X[Z]=V.getInt32(ce+8*Z,!W)/V.getInt32(ce+4+8*Z,!W);return X}}function A(V,j,N){var G="";for(n=j;n<j+N;n++)G+=String.fromCharCode(V.getUint8(n));return G}
3459function U(V,j){if(A(V,j,4)!="Exif")return!1;var N,G,W,q,X,J=j+6;if(V.getUint16(J)==18761)N=!1;else{if(V.getUint16(J)!=19789)return!1;N=!0}if(V.getUint16(J+2,!N)!=42)return!1;var Z=V.getUint32(J+4,!N);if(Z<8)return!1;if((G=C(V,J,J+Z,v,N)).ExifIFDPointer)for(W in q=C(V,J,J+G.ExifIFDPointer,g,N)){switch(W){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":q[W]=k[W][q[W]];break;case"ExifVersion":case"FlashpixVersion":q[W]=String.fromCharCode(q[W][0],q[W][1],q[W][2],q[W][3]);break;case"ComponentsConfiguration":q[W]=k.Components[q[W][0]]+k.Components[q[W][1]]+k.Components[q[W][2]]+k.Components[q[W][3]]}G[W]=q[W]}if(G.GPSInfoIFDPointer)for(W in X=C(V,J,J+G.GPSInfoIFDPointer,_,N)){switch(W){case"GPSVersionID":X[W]=X[W][0]+"."+X[W][1]+"."+X[W][2]+"."+X[W][3]}G[W]=X[W]}return G.thumbnail=function(re,K,ne,ee){var ce=function(He,we,rt){var Le=He.getUint16(we,!rt);return He.getUint32(we+2+12*Le,!rt)}(re,K+ne,ee);if(!ce)return{};if(ce>re.byteLength)return{};var ye=C(re,K,K+ce,w,ee);if(ye.Compression)switch(ye.Compression){case 6:if(ye.JpegIFOffset&&ye.JpegIFByteCount){var _e=K+ye.JpegIFOffset,Oe=ye.JpegIFByteCount;ye.blob=new Blob([new Uint8Array(re.buffer,_e,Oe)],{type:"image/jpeg"})}break;case 1:console.log("Thumbnail image format is TIFF, which is not implemented.");break;default:console.log("Unknown thumbnail image format '%s'",ye.Compression)}else ye.PhotometricInterpretation==2&&console.log("Thumbnail image format is RGB, which is not implemented.");return ye}(V,J,Z,N),G}function B(V){var j={};if(V.nodeType==1){if(V.attributes.length>0){j["@attributes"]={};for(var N=0;N<V.attributes.length;N++){var G=V.attributes.item(N);j["@attributes"][G.nodeName]=G.nodeValue}}}else if(V.nodeType==3)return V.nodeValue;if(V.hasChildNodes())for(var W=0;W<V.childNodes.length;W++){var q=V.childNodes.item(W),X=q.nodeName;if(j[X]==null)j[X]=B(q);else{if(j[X].push==null){var J=j[X];j[X]=[],j[X].push(J)}j[X].push(B(q))}}return j}function z(V){try{var j={};if(V.children.length>0)for(var N=0;N<V.children.length;N++){var G=V.children.item(N),W=G.attributes;for(var q in W){var X=W[q],J=X.nodeName,Z=X.nodeValue;J!==void 0&&(j[J]=Z)}var re=G.nodeName;if(j[re]===void 0)j[re]=B(G);else{if(j[re].push===void 0){var K=j[re];j[re]=[],j[re].push(K)}j[re].push(B(G))}}else j=V.textContent;return j}catch(ne){console.log(ne.message)}}f.enableXmp=function(){f.isXmpEnabled=!0},f.disableXmp=function(){f.isXmpEnabled=!1},f.getData=function(V,j){return!((self.Image&&V instanceof self.Image||self.HTMLImageElement&&V instanceof self.HTMLImageElement)&&!V.complete||(y(V)?j&&j.call(V):b(V,j),0))},f.getTag=function(V,j){if(y(V))return V.exifdata[j]},f.getIptcTag=function(V,j){if(y(V))return V.iptcdata[j]},f.getAllTags=function(V){if(!y(V))return{};var j,N=V.exifdata,G={};for(j in N)N.hasOwnProperty(j)&&(G[j]=N[j]);return G},f.getAllIptcTags=function(V){if(!y(V))return{};var j,N=V.iptcdata,G={};for(j in N)N.hasOwnProperty(j)&&(G[j]=N[j]);return G},f.pretty=function(V){if(!y(V))return"";var j,N=V.exifdata,G="";for(j in N)N.hasOwnProperty(j)&&(typeof N[j]=="object"?N[j]instanceof Number?G+=j+" : "+N[j]+" ["+N[j].numerator+"/"+N[j].denominator+`]\r 3460`:G+=j+" : ["+N[j].length+` values]\r 3461`:G+=j+" : "+N[j]+`\r 3462`);return G},f.readFromBinaryFile=function(V){return x(V)},(d=function(){return f}.apply(c,[]))===void 0||(l.exports=d)}).call(this)},297:l=>{l.exports=r}},s={};function o(l){if(s[l])return s[l].exports;var c=s[l]={exports:{}};return i[l].call(c.exports,c,c.exports,o),c.exports}o.n=l=>{var c=l&&l.__esModule?()=>l.default:()=>l;return o.d(c,{a:c}),c},o.d=(l,c)=>{for(var d in c)o.o(c,d)&&!o.o(l,d)&&Object.defineProperty(l,d,{enumerable:!0,get:c[d]})},o.o=(l,c)=>Object.prototype.hasOwnProperty.call(l,c),o.r=l=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})};var a={};return(()=>{o.r(a),o.d(a,{default:()=>LP});var l=o(297),c=o.n(l),d=Math.PI/180;const f=typeof ib<"u"?ib:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},g={_global:f,version:"8.3.5",isBrowser:typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]"),isUnminified:/param/.test(function(S){}.toString()),dblClickWindow:400,getAngle:S=>g.angleDeg?S*d:S,enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging:()=>g.DD.isDragging,isDragReady:()=>!!g.DD.node,document:f.document,_injectGlobal(S){f.Konva=S}},v=S=>{g[S.prototype.getClassName()]=S};g._injectGlobal(g);class _{constructor(u=[1,0,0,1,0,0]){this.dirty=!1,this.m=u&&u.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new _(this.m)}copyInto(u){u.m[0]=this.m[0],u.m[1]=this.m[1],u.m[2]=this.m[2],u.m[3]=this.m[3],u.m[4]=this.m[4],u.m[5]=this.m[5]}point(u){var h=this.m;return{x:h[0]*u.x+h[2]*u.y+h[4],y:h[1]*u.x+h[3]*u.y+h[5]}}translate(u,h){return this.m[4]+=this.m[0]*u+this.m[2]*h,this.m[5]+=this.m[1]*u+this.m[3]*h,this}scale(u,h){return this.m[0]*=u,this.m[1]*=u,this.m[2]*=h,this.m[3]*=h,this}rotate(u){var h=Math.cos(u),p=Math.sin(u),m=this.m[0]*h+this.m[2]*p,I=this.m[1]*h+this.m[3]*p,T=this.m[0]*-p+this.m[2]*h,O=this.m[1]*-p+this.m[3]*h;return this.m[0]=m,this.m[1]=I,this.m[2]=T,this.m[3]=O,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(u,h){var p=this.m[0]+this.m[2]*h,m=this.m[1]+this.m[3]*h,I=this.m[2]+this.m[0]*u,T=this.m[3]+this.m[1]*u;return this.m[0]=p,this.m[1]=m,this.m[2]=I,this.m[3]=T,this}multiply(u){var h=this.m[0]*u.m[0]+this.m[2]*u.m[1],p=this.m[1]*u.m[0]+this.m[3]*u.m[1],m=this.m[0]*u.m[2]+this.m[2]*u.m[3],I=this.m[1]*u.m[2]+this.m[3]*u.m[3],T=this.m[0]*u.m[4]+this.m[2]*u.m[5]+this.m[4],O=this.m[1]*u.m[4]+this.m[3]*u.m[5]+this.m[5];return this.m[0]=h,this.m[1]=p,this.m[2]=m,this.m[3]=I,this.m[4]=T,this.m[5]=O,this}invert(){var u=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),h=this.m[3]*u,p=-this.m[1]*u,m=-this.m[2]*u,I=this.m[0]*u,T=u*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),O=u*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=h,this.m[1]=p,this.m[2]=m,this.m[3]=I,this.m[4]=T,this.m[5]=O,this}getMatrix(){return this.m}setAbsolutePosition(u,h){var p=this.m[0],m=this.m[1],I=this.m[2],T=this.m[3],O=this.m[4],L=(p*(h-this.m[5])-m*(u-O))/(p*T-m*I),F=(u-O-I*L)/p;return this.translate(F,L)}decompose(){var u=this.m[0],h=this.m[1],p=this.m[2],m=this.m[3],I=u*m-h*p;let T={x:this.m[4],y:this.m[5],rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(u!=0||h!=0){var O=Math.sqrt(u*u+h*h);T.rotation=h>0?Math.acos(u/O):-Math.acos(u/O),T.scaleX=O,T.scaleY=I/O,T.skewX=(u*p+h*m)/I,T.skewY=0}else if(p!=0||m!=0){var L=Math.sqrt(p*p+m*m);T.rotation=Math.PI/2-(m>0?Math.acos(-p/L):-Math.acos(p/L)),T.scaleX=I/L,T.scaleY=L,T.skewX=0,T.skewY=(u*p+h*m)/I}return T.rotation=C._getRotation(T.rotation),T}}var w=Math.PI/180,k=180/Math.PI,y="Konva error: ",b={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],ol
3462ive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},x=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,R=[];const E=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(S){setTimeout(S,60)},C={_isElement:S=>!(!S||S.nodeType!=1),_isFunction:S=>!!(S&&S.constructor&&S.call&&S.apply),_isPlainObject:S=>!!S&&S.constructor===Object,_isArray:S=>Object.prototype.toString.call(S)==="[object Array]",_isNumber:S=>Object.prototype.toString.call(S)==="[object Number]"&&!isNaN(S)&&isFinite(S),_isString:S=>Object.prototype.toString.call(S)==="[object String]",_isBoolean:S=>Object.prototype.toString.call(S)==="[object Boolean]",isObject:S=>S instanceof Object,isValidSelector(S){if(typeof S!="string")return!1;var u=S[0];return u==="#"||u==="."||u===u.toUpperCase()},_sign:S=>S===0||S>0?1:-1,requestAnimFrame(S){R.push(S),R.length===1&&E(function(){const u=R;R=[],u.forEach(function(h){h()})})},createCanvasElement(){var S=document.createElement("canvas");try{S.style=S.style||{}}catch{}return S},createImageElement:()=>document.createElement("img"),_isInDocument(S){for(;S=S.parentNode;)if(S==document)return!0;return!1},_urlToImage(S,u){var h=C.createImageElement();h.onload=function(){u(h)},h.src=S},_rgbToHex:(S,u,h)=>((1<<24)+(S<<16)+(u<<8)+h).toString(16).slice(1),_hexToRgb(S){S=S.replace("#","");var u=parseInt(S,16);return{r:u>>16&255,g:u>>8&255,b:255&u}},getRandomColor(){for(var S=(16777215*Math.random()<<0).toString(16);S.length<6;)S="0"+S;return"#"+S},getRGB(S){var u;return S in b?{r:(u=b[S])[0],g:u[1],b:u[2]}:S[0]==="#"?this._hexToRgb(S.substring(1)):S.substr(0,4)==="rgb("?(u=x.exec(S.replace(/ /g,"")),{r:parseInt(u[1],10),g:parseInt(u[2],10),b:parseInt(u[3],10)}):{r:0,g:0,b:0}},colorToRGBA:S=>(S=S||"black",C._namedColorToRBA(S)||C._hex3ColorToRGBA(S)||C._hex6ColorToRGBA(S)||C._rgbColorToRGBA(S)||C._rgbaColorToRGBA(S)||C._hslColorToRGBA(S)),_namedColorToRBA(S){var u=b[S.toLowerCase()];return u?{r:u[0],g:u[1],b:u[2],a:1}:null},_rgbColorToRGBA(S){if(S.indexOf("rgb(")===0){var u=(S=S.match(/rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number);return{r:u[0],g:u[1],b:u[2],a:1}}},_rgbaColorToRGBA(S){if(S.indexOf("rgba(")===0){var u=(S=S.match(/rgba\(([^)]+)\)/)[1]).split(/ *, */).map((h,p)=>h.slice(-1)==="%"?p===3?parseInt(h)/100:parseInt(h)/100*255:Number(h));return{r:u[0],g:u[1],b:u[2],a:u[3]}}},_hex6ColorToRGBA(S){if(S[0]==="#"&&S.length===7)return{r:parseInt(S.slice(1,3),16),g:parseInt(S.slice(3,5),16),b:parseInt(S.slice(5,7),16),a:1}},_hex3ColorToRGBA(S){if(S[0]==="#"&&S.length===4)return{r:parseInt(S[1]+S[1],16),g:parseInt(S[2]+S[2],16),b:parseInt(S[3]+S[3],16),a:1}},_hslColorToRGBA(S){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(S)){const[u,...h]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(S),p=Number(h[0])/360,m=Number(h[1])/100,I=Number(h[2])/100;let T,O,L;if(m===0)return L=255*I,{r:Math.round(L),g:Math.round(L),b:Math.round(L),a:1};T=I<.5?I*(1+m):I+m-I*m;const F=2*I-T,H=[0,0,0];for(let Y=0;Y<3;Y++)O=p+1/3*-(Y-1),O<0&&O++,O>1&&O--,L=6*O<1?F+6*(T-F)*O:2*O<1?T:3*O<2?F+(T-F)*(2/3-O)*6:F,H[Y]=255*L;return{r:Math.round(H[0]),g:Math.round(H[1]),b:Math.round(H[2]),a:1}}},haveIntersection:(S,u)=>!(u.x>S.x+S.width||u.x+u.width<S.x||u.y>
3462S.y+S.height||u.y+u.height<S.y),cloneObject(S){var u={};for(var h in S)this._isPlainObject(S[h])?u[h]=this.cloneObject(S[h]):this._isArray(S[h])?u[h]=this.cloneArray(S[h]):u[h]=S[h];return u},cloneArray:S=>S.slice(0),degToRad:S=>S*w,radToDeg:S=>S*k,_degToRad:S=>(C.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),C.degToRad(S)),_radToDeg:S=>(C.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),C.radToDeg(S)),_getRotation:S=>g.angleDeg?C.radToDeg(S):S,_capitalize:S=>S.charAt(0).toUpperCase()+S.slice(1),throw(S){throw new Error(y+S)},error(S){console.error(y+S)},warn(S){g.showWarnings&&console.warn("Konva warning: "+S)},each(S,u){for(var h in S)u(h,S[h])},_inRange:(S,u,h)=>u<=S&&S<h,_getProjectionToSegment(S,u,h,p,m,I){var T,O,L,F=(S-h)*(S-h)+(u-p)*(u-p);if(F==0)T=S,O=u,L=(m-h)*(m-h)+(I-p)*(I-p);else{var H=((m-S)*(h-S)+(I-u)*(p-u))/F;H<0?(T=S,O=u,L=(S-m)*(S-m)+(u-I)*(u-I)):H>1?(T=h,O=p,L=(h-m)*(h-m)+(p-I)*(p-I)):L=((T=S+H*(h-S))-m)*(T-m)+((O=u+H*(p-u))-I)*(O-I)}return[T,O,L]},_getProjectionToLine(S,u,h){var p=C.cloneObject(S),m=Number.MAX_VALUE;return u.forEach(function(I,T){if(h||T!==u.length-1){var O=u[(T+1)%u.length],L=C._getProjectionToSegment(I.x,I.y,O.x,O.y,S.x,S.y),F=L[0],H=L[1],Y=L[2];Y<m&&(p.x=F,p.y=H,m=Y)}}),p},_prepareArrayForTween(S,u,h){var p,m=[],I=[];if(S.length>u.length){var T=u;u=S,S=T}for(p=0;p<S.length;p+=2)m.push({x:S[p],y:S[p+1]});for(p=0;p<u.length;p+=2)I.push({x:u[p],y:u[p+1]});var O=[];return I.forEach(function(L){var F=C._getProjectionToLine(L,m,h);O.push(F.x),O.push(F.y)}),O},_prepareToStringify(S){var u;for(var h in S.visitedByCircularReferenceRemoval=!0,S)if(S.hasOwnProperty(h)&&S[h]&&typeof S[h]=="object"){if(u=Object.getOwnPropertyDescriptor(S,h),S[h].visitedByCircularReferenceRemoval||C._isElement(S[h])){if(!u.configurable)return null;delete S[h]}else if(C._prepareToStringify(S[h])===null){if(!u.configurable)return null;delete S[h]}}return delete S.visitedByCircularReferenceRemoval,S},_assign(S,u){for(var h in u)S[h]=u[h];return S},_getFirstPointerId:S=>S.touches?S.changedTouches[0].identifier:S.pointerId||999};function D(S){return C._isString(S)?'"'+S+'"':Object.prototype.toString.call(S)==="[object Number]"||C._isBoolean(S)?S:Object.prototype.toString.call(S)}function A(){if(g.isUnminified)return function(S,u){return C._isNumber(S)||C.warn(D(S)+' is a not val
3462id value for "'+u+'" attribute. The value should be a number.'),S}}function U(){if(g.isUnminified)return function(S,u){return C._isString(S)||C.warn(D(S)+' is a not valid value for "'+u+'" attribute. The value should be a string.'),S}}function B(){if(g.isUnminified)return function(S,u){const h=C._isString(S),p=Object.prototype.toString.call(S)==="[object CanvasGradient]"||S&&S.addColorStop;return h||p||C.warn(D(S)+' is a not valid value for "'+u+'" attribute. The value should be a string or a native gradient.'),S}}function z(){if(g.isUnminified)return function(S,u){return S===!0||S===!1||C.warn(D(S)+' is a not valid value for "'+u+'" attribute. The value should be a boolean.'),S}}var V="get",j="set";const N={addGetterSetter(S,u,h,p,m){N.addGetter(S,u,h),N.addSetter(S,u,p,m),N.addOverloadedGetterSetter(S,u)},addGetter(S,u,h){var p=V+C._capitalize(u);S.prototype[p]=S.prototype[p]||function(){var m=this.attrs[u];return m===void 0?h:m}},addSetter(S,u,h,p){var m=j+C._capitalize(u);S.prototype[m]||N.overWriteSetter(S,u,h,p)},overWriteSetter(S,u,h,p){var m=j+C._capitalize(u);S.prototype[m]=function(I){return h&&I!=null&&(I=h.call(this,I,u)),this._setAttr(u,I),p&&p.call(this),this}},addComponentsGetterSetter(S,u,h,p,m){var I,T,O=h.length,L=C._capitalize,F=V+L(u),H=j+L(u);S.prototype[F]=function(){var ie={};for(I=0;I<O;I++)ie[T=h[I]]=this.getAttr(u+L(T));return ie};var Y=function(ie){if(g.isUnminified)return function(ae,Q){return C.isObject(ae)||C.warn(D(ae)+' is a not val
3462id value for "'+Q+'" attribute. The value should be an object with properties '+ie),ae}}(h);S.prototype[H]=function(ie){var ae,Q=this.attrs[u];for(ae in p&&(ie=p.call(this,ie)),Y&&Y.call(this,ie,u),ie)ie.hasOwnProperty(ae)&&this._setAttr(u+L(ae),ie[ae]);return this._fireChangeEvent(u,Q,ie),m&&m.call(this),this},N.addOverloadedGetterSetter(S,u)},addOverloadedGetterSetter(S,u){var h=C._capitalize(u),p=j+h,m=V+h;S.prototype[u]=function(){return arguments.length?(this[p](arguments[0]),this):this[m]()}},addDeprecatedGetterSetter(S,u,h,p){C.error("Adding deprecated "+u);var m=V+C._capitalize(u),I=u+" property is deprecated and will be removed soon. Look at Konva change log for more information.";S.prototype[m]=function(){C.error(I);var T=this.attrs[u];return T===void 0?h:T},N.addSetter(S,u,p,function(){C.error(I)}),N.addOverloadedGetterSetter(S,u)},backCompat(S,u){C.each(u,function(h,p){var m=S.prototype[p],I=V+C._capitalize(h),T=j+C._capitalize(h);function O(){m.apply(this,arguments),C.error('"'+h+'" method is deprecated and will be removed soon. Use ""'+p+'" instead.')}S.prototype[h]=O,S.prototype[I]=O,S.prototype[T]=O})},afterSetFilter(){this._filterUpToDate=!1}};function G(S){var u,h,p=[],m=S.length,I=C;for(u=0;u<m;u++)h=S[u],I._isNumber(h)?h=Math.round(1e3*h)/1e3:I._isString(h)||(h+=""),p.push(h);return p}var W,q=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"];class X{constructor(u){this.canvas=u,this._context=u._canvas.getContext("2d"),g.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(u){u.fillEnabled()&&this._fill(u)}_fill(u){}strokeShape(u){u.hasStroke()&&this._stroke(u)}_stroke(u){}fillStrokeShape(u){u.attrs.fillAfterStrokeEnabled?(this.strokeShape(u),this.fillShape(u)):(this.fillShape(u),this.strokeShape(u))}getTrace(u,h){var p,m,I,T,O=this.traceArr,L=O.length,F="";for(p=0;p<L;p++)(I=(m=O[p]).method)?(T=m.args,F+=I,u?F+="()":C._isArray(T[0])?F+="(["+T.join(",")+"])":(h&&(T=T.map(H=>typeof H=="number"?Math.floor(H):H)),F+="("+T.join(",")+")")):(F+=m.property,u||(F+="="+m.val)),F+=";";return F}clearTrace(){this.traceArr=[]}_trace(u){var h=this.traceArr;h.push(u),h.length>=100&&h.shift()}reset(){var u=this.getCanvas().getPixelRatio();this.setTransform(1*u,0,0,1*u,0,0)}getCanvas(){return this.canvas}clear(u){var h=this.getCanvas();u?this.clearRect(u.x||0,u.y||0,u.width||0,u.height||0):this.clearRect(0,0,h.getWidth()/h.pixelRatio,h.getHeight()/h.pixelRatio)}_applyLineCap(u){var h=u.getLineCap();h&&this.setAttr("lineCap",h)}_applyOpacity(u){var h=u.getAbsoluteOpacity();h!==1&&this.setAttr("globalAlpha",h)}_applyLineJoin(u){var h=u.attrs.lineJoin;h&&this.setAttr("lineJoin",h)}setAttr(u,h){this._context[u]=h}arc(u,h,p,m,I,T){this._context.arc(u,h,p,m,I,T)}arcTo(u,h,p,m,I){this._context.arcTo(u,h,p,m,I)}beginPath(){this._context.beginPath()}bezierCurveTo(u,h,p,m,I,T){this._context.bezierCurveTo(u,h,p,m,I,T)}clearRect(u,h,p,m){this._context.clearRect(u,h,p,m)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(u,h){var p=arguments;return p.length===2?this._context.createImageData(u,h):p.length===1?this._context.createImageData(u):void 0}createLinearGradient(u,h,p,m){return this._context.createLinearGradient(u,h,p,m)}createPattern(u,h){return this._context.createPattern(u,h)}createRadialGradient(u,h,p,m,I,T){return this._context.createRadialGradient(u,h,p,m,I,T)}drawImage(u,h,p,m,I,T,O,L,F){var H=arguments,Y=this._context;H.length===3?Y.drawImage(u,h,p):H.length===5?Y.drawImage(u,h,p,m,I):H.length===9&&Y.drawImage(u,h,p,m,I,T,O,L,F)}ellipse(u,h,p,m,I,T,O,L){this._context.ellipse(u,h,p,m,I,T,O,L)}isPointInPath(u,h){return this._context.isPointInPath(u,h)}fill(u){u?this._context.fill(u):this._context.fill()}fillRect(u,h,p,m){this._context.fillRect(u,h,p,m)}strokeRect(u,h,p,m){this._context.strokeRect(u,h,p,m)}fillText(u,h,p,m){m?this._context.fillText(u,h,p,m):this._context.fillText(u,h,p)}measureText(u){return this._context.measureText(u)}getImageData(u,h,p,m){return this._context.getImageData(u,h,p,m)}lineTo(u,h){this._context.lineTo(u,h)}moveTo(u,h){this._context.moveTo(u,h)}rect(u,h,p,m){this._context.rect(u,h,p,m)}putImageData(u,h,p){this._context.putImageData(u,h,p)}quadraticCurveTo(u,h,p,m){this._context.quadraticCurveTo(u,h,p,m)}
3462restore(){this._context.restore()}rotate(u){this._context.rotate(u)}save(){this._context.save()}scale(u,h){this._context.scale(u,h)}setLineDash(u){this._context.setLineDash?this._context.setLineDash(u):"mozDash"in this._context?this._context.mozDash=u:"webkitLineDash"in this._context&&(this._context.webkitLineDash=u)}getLineDash(){return this._context.getLineDash()}setTransform(u,h,p,m,I,T){this._context.setTransform(u,h,p,m,I,T)}stroke(u){u?this._context.stroke(u):this._context.stroke()}strokeText(u,h,p,m){this._context.strokeText(u,h,p,m)}transform(u,h,p,m,I,T){this._context.transform(u,h,p,m,I,T)}translate(u,h){this._context.translate(u,h)}_enableTrace(){var u,h,p=this,m=q.length,I=this.setAttr,T=function(O){var L,F=p[O];p[O]=function(){return h=G(Array.prototype.slice.call(arguments,0)),L=F.apply(p,arguments),p._trace({method:O,args:h}),L}};for(u=0;u<m;u++)T(q[u]);p.setAttr=function(){I.apply(p,arguments);var O=arguments[0],L=arguments[1];O!=="shadowOffsetX"&&O!=="shadowOffsetY"&&O!=="shadowBlur"||(L/=this.canvas.getPixelRatio()),p._trace({property:O,val:L})}}_applyGlobalCompositeOperation(u){const h=u.attrs.globalCompositeOperation;!h||h==="source-over"||this.setAttr("globalCompositeOperation",h)}}["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"].forEach(function(S){Object.defineProperty(X.prototype,S,{get(){return this._context[S]},set(u){this._context[S]=u}})});class J extends X{_fillColor(u){var h=u.fill();this.setAttr("fillStyle",h),u._fillFunc(this)}_fillPattern(u){this.setAttr("fillStyle",u._getFillPattern()),u._fillFunc(this)}_fillLinearGradient(u){var h=u._getLinearGradient();h&&(this.setAttr("fillStyle",h),u._fillFunc(this))}_fillRadialGradient(u){var h=u._getRadialGradient();h&&(this.setAttr("fillStyle",h),u._fillFunc(this))}_fill(u){var h=u.fill(),p=u.getFillPriority();if(h&&p==="color")this._fillColor(u);else{var m=u.getFillPatternImage();if(m&&p==="pattern")this._fillPattern(u);else{var I=u.getFillLinearGradientColorStops();if(I&&p==="linear-gradient")this._fillLinearGradient(u);else{var T=u.getFillRadialGradientColorStops();T&&p==="radial-gradient"?this._fillRadialGradient(u):h?this._fillColor(u):m?this._fillPattern(u):I?this._fillLinearGradient(u):T&&this._fillRadialGradient(u)}}}}_strokeLinearGradient(u){var h=u.getStrokeLinearGradientStartPoint(),p=u.getStrokeLinearGradientEndPoint(),m=u.getStrokeLinearGradientColorStops(),I=this.createLinearGradient(h.x,h.y,p.x,p.y);if(m){for(var T=0;T<m.length;T+=2)I.addColorStop(m[T],m[T+1]);this.setAttr("strokeStyle",I)}}_stroke(u){var h=u.dash(),p=u.getStrokeScaleEnabled();if(u.hasStroke()){if(!p){this.save();var m=this.getCanvas().getPixelRatio();this.setTransform(m,0,0,m,0,0)}this._applyLineCap(u),h&&u.dashEnabled()&&(this.setLineDash(h),this.setAttr("lineDashOffset",u.dashOffset())),this.setAttr("lineWidth",u.strokeWidth()),u.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),u.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(u):this.setAttr("strokeStyle",u.stroke()),u._strokeFunc(this),p||this.restore()}}_applyShadow(u){var h,p,m,I=(h=u.getShadowRGBA())!==null&&h!==void 0?h:"black",T=(p=u.getShadowBlur())!==null&&p!==void 0?p:5,O=(m=u.getShadowOffset())!==null&&m!==void 0?m:{x:0,y:0},L=u.getAbsoluteScale(),F=this.canvas.getPixelRatio(),H=L.x*F,Y=L.y*F;this.setAttr("shadowColor",I),this.setAttr("shadowBlur",T*Math.min(Math.abs(H),Math.abs(Y))),this.setAttr("shadowOffsetX",O.x*H),this.setAttr("shadowOffsetY",O.y*Y)}}class Z extends X{_fill(u){this.save(),this.setAttr("fillStyle",u.colorKey),u._fillFuncHit(this),this.restore()}strokeShape(u){u.hasHitStroke()&&this._stroke(u)}_stroke(u){if(u.hasHitStroke()){var h=u.getStrokeScaleEnabled();if(!h){this.save();var p=this.getCanvas().getPixelRatio();this.setTransform(p,0,0,p,0,0)}this._applyLineCap(u);var m=u.hitStrokeWidth(),I=m==="auto"?u.strokeWidth():m;this.setAttr("lineWidth",I),this.setAttr("strokeStyle",u.colorKey),u._strokeFuncHit(this),h||this.restore(
3462)}}}class re{constructor(u){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var h=(u||{}).pixelRatio||g.pixelRatio||function(){if(W)return W;var p=C.createCanvasElement().getContext("2d");return W=(g._global.devicePixelRatio||1)/(p.webkitBackingStorePixelRatio||p.mozBackingStorePixelRatio||p.msBackingStorePixelRatio||p.oBackingStorePixelRatio||p.backingStorePixelRatio||1)}();this.pixelRatio=h,this._canvas=C.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(u){var h=this.pixelRatio;this.pixelRatio=u,this.setSize(this.getWidth()/h,this.getHeight()/h)}setWidth(u){this.width=this._canvas.width=u*this.pixelRatio,this._canvas.style.width=u+"px";var h=this.pixelRatio;this.getContext()._context.scale(h,h)}setHeight(u){this.height=this._canvas.height=u*this.pixelRatio,this._canvas.style.height=u+"px";var h=this.pixelRatio;this.getContext()._context.scale(h,h)}getWidth(){return this.width}getHeight(){return this.height}setSize(u,h){this.setWidth(u||0),this.setHeight(h||0)}toDataURL(u,h){try{return this._canvas.toDataURL(u,h)}catch{try{return this._canvas.toDataURL()}catch(m){return C.error("Unable to get data URL. "+m.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}N.addGetterSetter(re,"pixelRatio",void 0,A());class K extends re{constructor(u={width:0,height:0}){super(u),this.context=new J(this),this.setSize(u.width,u.height)}}class ne extends re{constructor(u={width:0,height:0}){super(u),this.hitCanvas=!0,this.context=new Z(this),this.setSize(u.width,u.height)}}const ee={get isDragging(){var S=!1;return ee._dragElements.forEach(u=>{u.dragStatus==="dragging"&&(S=!0)}),S},justDragged:!1,get node(){var S;return ee._dragElements.forEach(u=>{S=u.node}),S},_dragElements:new Map,_drag(S){const u=[];ee._dragElements.forEach((h,p)=>{const{node:m}=h,I=m.getStage();I.setPointersPositions(S),h.pointerId===void 0&&(h.pointerId=C._getFirstPointerId(S));const T=I._changedPointerPositions.find(L=>L.id===h.pointerId);if(T){if(h.dragStatus!=="dragging"){var O=m.dragDistance();if(Math.max(Math.abs(T.x-h.startPointerPos.x),Math.abs(T.y-h.startPointerPos.y))<O||(m.startDrag({evt:S}),!m.isDragging()))return}m._setDragPosition(S,h),u.push(m)}}),u.forEach(h=>{h.fire("dragmove",{type:"dragmove",target:h,evt:S},!0)})},_endDragBefore(S){ee._dragElements.forEach(u=>{const{node:h}=u,p=h.getStage();if(S&&p.setPointersPositions(S),!p._changedPointerPositions.find(I=>I.id===u.pointerId))return;u.dragStatus!=="dragging"&&u.dragStatus!=="stopped"||(ee.justDragged=!0,g._mouseListenClick=!1,g._touchListenClick=!1,g._pointerListenClick=!1,u.dragStatus="stopped");const m=u.node.getLayer()||u.node instanceof g.Stage&&u.node;m&&m.batchDraw()})},_endDragAfter(S){ee._dragElements.forEach((u,h)=>{u.dragStatus==="stopped"&&u.node.fire("dragend",{type:"dragend",target:u.node,evt:S},!0),u.dragStatus!=="dragging"&&ee._dragElements.delete(h)})}};g.isBrowser&&(window.addEventListener("mouseup",ee._endDragBefore,!0),window.addEventListener("touchend",ee._endDragBefore,!0),window.addEventListener("mousemove",ee._drag),window.addEventListener("touchmove",ee._drag),window.addEventListener("mouseup",ee._endDragAfter,!1),window.addEventListener("touchend",ee._endDragAfter,!1));var ce="absoluteOpacity",ye="allEventListeners",_e="absoluteTransform",Oe="absoluteScale",He="canvas",we="listening",rt="mouseenter",Le="mouseleave",wt="Shape",Mt=" ",Bn="stage",Tt="transform",jn="visible",Qn=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Mt);let gt=1;class me{constructor(u){this._id=gt++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(u),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(u){u!==Tt&&u!==_e||!this._cache.get(u)?u?this._cache.delete(u):this._cache.clear():this._cache.get(u).dirty=!0}_getCache(u,h){var p=this._cache.get(u);return(p===void 0||(u===Tt||u===_e)&&p.dirty===!0)&&(p=h.call(this),this._cache.set(u,p)),p}_calculate(u,h,p){if(!this._attachedDepsListeners.get(u)){const m=h.map(I=>I+"Change.konva").join(Mt);this.on(m,()=>{this._clearCache(u)}
3462),this._attachedDepsListeners.set(u,!0)}return this._getCache(u,p)}_getCanvasCache(){return this._cache.get(He)}_clearSelfAndDescendantCache(u){this._clearCache(u),u===_e&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(He),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(u){var h=u||{},p={};h.x!==void 0&&h.y!==void 0&&h.width!==void 0&&h.height!==void 0||(p=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var m=Math.ceil(h.width||p.width),I=Math.ceil(h.height||p.height),T=h.pixelRatio,O=h.x===void 0?Math.floor(p.x):h.x,L=h.y===void 0?Math.floor(p.y):h.y,F=h.offset||0,H=h.drawBorder||!1,Y=h.hitCanvasPixelRatio||1;if(m&&I){O-=F,L-=F;var ie=new K({pixelRatio:T,width:m+=2*F+1,height:I+=2*F+1}),ae=new K({pixelRatio:T,width:0,height:0}),Q=new ne({pixelRatio:Y,width:m,height:I}),ge=ie.getContext(),it=Q.getContext();return Q.isCache=!0,ie.isCache=!0,this._cache.delete(He),this._filterUpToDate=!1,h.imageSmoothingEnabled===!1&&(ie.getContext()._context.imageSmoothingEnabled=!1,ae.getContext()._context.imageSmoothingEnabled=!1),ge.save(),it.save(),ge.translate(-O,-L),it.translate(-O,-L),this._isUnderCache=!0,this._clearSelfAndDescendantCache(ce),this._clearSelfAndDescendantCache(Oe),this.drawScene(ie,this),this.drawHit(Q,this),this._isUnderCache=!1,ge.restore(),it.restore(),H&&(ge.save(),ge.beginPath(),ge.rect(0,0,m,I),ge.closePath(),ge.setAttr("strokeStyle","red"),ge.setAttr("lineWidth",5),ge.stroke(),ge.restore()),this._cache.set(He,{scene:ie,filter:ae,hit:Q,x:O,y:L}),this._requestDraw(),this}C.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.")}isCached(){return this._cache.has(He)}getClientRect(u){throw new Error('abstract "getClientRect" method call')}_transformedRect(u,h){var p,m,I,T,O=[{x:u.x,y:u.y},{x:u.x+u.width,y:u.y},{x:u.x+u.width,y:u.y+u.height},{x:u.x,y:u.y+u.height}],L=this.getAbsoluteTransform(h);return O.forEach(function(F){var H=L.point(F);p===void 0&&(p=I=H.x,m=T=H.y),p=Math.min(p,H.x),m=Math.min(m,H.y),I=Math.max(I,H.x),T=Math.max(T,H.y)}),{x:p,y:m,width:I-p,height:T-m}}_drawCachedSceneCanvas(u){u.save(),u._applyOpacity(this),u._applyGlobalCompositeOperation(this);const h=this._getCanvasCache();u.translate(h.x,h.y);var p=this._getCachedSceneCanvas(),m=p.pixelRatio;u.drawImage(p._canvas,0,0,p.width/m,p.height/m),u.restore()}_drawCachedHitCanvas(u){var h=this._getCanvasCache(),p=h.hit;u.save(),u.translate(h.x,h.y),u.drawImage(p._canvas,0,0,p.width/p.pixelRatio,p.height/p.pixelRatio),u.restore()}_getCachedSceneCanvas(){var u,h,p,m,I=this.filters(),T=this._getCanvasCache(),O=T.scene,L=T.filter,F=L.getContext();if(I){if(!this._filterUpToDate){var H=O.pixelRatio;L.setSize(O.width/O.pixelRatio,O.height/O.pixelRatio);try{for(u=I.length,F.clear(),F.drawImage(O._canvas,0,0,O.getWidth()/H,O.getHeight()/H),h=F.getImageData(0,0,L.getWidth(),L.getHeight()),p=0;p<u;p++)typeof(m=I[p])=="function"?(m.call(this,h),F.putImageData(h,0,0)):C.error("Filter should be type of function, but got "+typeof m+" instead. Please check correct filters")}catch(Y){C.error("Unable to apply filter. "+Y.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return L}return O}on(u,h){if(this._cache&&this._cache.delete(ye),arguments.length===3)return this._delegate.apply(this,arguments);var p,m,I,T,O=u.split(Mt),L=O.length;for(p=0;p<L;p++)I=(m=O[p].split("."))[0],T=m[1]||"",this.eventListeners[I]||(this.eventListeners[I]=[]),this.eventListeners[I].push({name:T,handler:h});return this}off(u,h){var p,m,I,T,O,L=(u||"").split(Mt),F=L.length;if(this._cache&&this._cache.delete(ye),!u)for(m in this.eventListeners)this._off(m);for(p=0;p<F;p++)if(T=(I=L[p].split("."))[0],O=I[1],T)this.eventListeners[T]&&this._off(T,O,h);else for(m in this.eventListeners)this._off(m,O,h);return this}dispatchEvent(u){var h={target:this,type:u.type,evt:u};return this.fire(u.type,h),this}addEventListener(u,h){return this.on(u,function(p){h.call(this,p.evt)}),this}removeEventListener(u){return this.off(u),this}_delegate(u,h,p){var m=this;
3462this.on(u,function(I){for(var T=I.target.findAncestors(h,!0,m),O=0;O<T.length;O++)(I=C.cloneObject(I)).currentTarget=T[O],p.call(T[O],I)})}remove(){return this.isDragging()&&this.stopDrag(),ee._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(_e),this._clearSelfAndDescendantCache(ce),this._clearSelfAndDescendantCache(Oe),this._clearSelfAndDescendantCache(Bn),this._clearSelfAndDescendantCache(jn),this._clearSelfAndDescendantCache(we)}_remove(){this._clearCaches();var u=this.getParent();u&&u.children&&(u.children.splice(this.index,1),u._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this}getAttr(u){var h="get"+C._capitalize(u);return C._isFunction(this[h])?this[h]():this.attrs[u]}getAncestors(){for(var u=this.getParent(),h=[];u;)h.push(u),u=u.getParent();return h}getAttrs(){return this.attrs||{}}setAttrs(u){return this._batchTransformChanges(()=>{var h,p;if(!u)return this;for(h in u)h!=="children"&&(p="set"+C._capitalize(h),C._isFunction(this[p])?this[p](u[h]):this._setAttr(h,u[h]))}),this}isListening(){return this._getCache(we,this._isListening)}_isListening(u){if(!this.listening())return!1;const h=this.getParent();return!h||h===u||this===u||h._isListening(u)}isVisible(){return this._getCache(jn,this._isVisible)}_isVisible(u){if(!this.visible())return!1;const h=this.getParent();return!h||h===u||this===u||h._isVisible(u)}shouldDrawHit(u,h=!1){if(u)return this._isVisible(u)&&this._isListening(u);var p=this.getLayer(),m=!1;ee._dragElements.forEach(T=>{T.dragStatus==="dragging"&&(T.node.nodeType==="Stage"||T.node.getLayer()===p)&&(m=!0)});var I=!h&&!g.hitOnDragEnabled&&m;return this.isListening()&&this.isVisible()&&!I}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var u,h,p,m,I=this.getDepth(),T=this,O=0;return T.nodeType!=="Stage"&&function L(F){for(u=[],h=F.length,p=0;p<h;p++)m=F[p],O++,m.nodeType!==wt&&(u=u.concat(m.getChildren().slice())),m._id===T._id&&(p=h);u.length>0&&u[0].getDepth()<=I&&L(u)}(T.getStage().getChildren()),O}getDepth(){for(var u=0,h=this.parent;h;)u++,h=h.parent;return u}_batchTransformChanges(u){this._batchingTransformChange=!0,u(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Tt),this._clearSelfAndDescendantCache(_e)),this._needClearTransformCache=!1}setPosition(u){return this._batchTransformChanges(()=>{this.x(u.x),this.y(u.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var u=this.getStage().getPointerPosition();if(!u)return null;var h=this.getAbsoluteTransform().copy();return h.invert(),h.point(u)}getAbsolutePosition(u){let h=!1,p=this.parent;for(;p;){if(p.isCached()){h=!0;break}p=p.parent}h&&!u&&(u=!0);var m=this.getAbsoluteTransform(u).getMatrix(),I=new _,T=this.offset();return I.m=m.slice(),I.translate(T.x,T.y),I.getTranslation()}setAbsolutePosition(u){var h=this._clearTransform();this.attrs.x=h.x,this.attrs.y=h.y,delete h.x,delete h.y,this._clearCache(Tt);var p=this._getAbsoluteTransform().copy();return p.invert(),p.translate(u.x,u.y),u={x:this.attrs.x+p.getTranslation().x,y:this.attrs.y+p.getTranslation().y},this._setTransform(h),this.setPosition({x:u.x,y:u.y}),this._clearCache(Tt),this._clearSelfAndDescendantCache(_e),this}_setTransform(u){var h;for(h in u)this.attrs[h]=u[h]}_clearTransform(){var u={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,u}move(u){var h=u.x,p=u.y,m=this.x(),I=this.y();return h!==void 0&&(m+=h),p!==void 0&&(I+=p),this.setPosition({x:m,y:I}),this}_eachAncestorReverse(u,h){var p,m,I=[],T=this.getParent();if(!h||h._id!==this._id){for(I.unshift(this);T&&(!h||T._id!==h._id);)I.unshift(T),T=T.parent;for(p=I.length,m=0;m<p;m++)u(I[m])}}rotate(u){return this.rotation(this.rotation()+u),this}moveToTop(){if(!this.parent)return C.warn("Node has no parent. moveToTop function is ignored."),!1;var u=this.index;return u<this.parent.getChildren().length-1&&(this.parent.children.splice(u,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0)}moveUp(){if(!this.parent)return C.warn("Node has no parent. moveUp function is ignored."),!1;var u=this.index;return u<this.parent.getChildren().length-1&&(this.parent.children.splice(u,1),this.parent.children.splice(u+1,0,this),this.parent._setChildrenIndices(),!0)}moveDown(){if(!this.parent)return C.warn("Node has no parent. moveDown function is ignored."),!1;var u=this.index;return u>0&&(this.parent.children.splice(u,1),this.parent.children.splice(u-1,0,this),this.parent._setChildrenIndices(),!0)}moveToBottom(){if(!this.parent)return C.warn("Node has no parent. moveToBottom function is ignored."),!1;var u=this.index;return u>0&&(this.parent.children.splice(u,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0)}setZIndex(u){if(!this.parent)return C.warn("Node has no parent. zIndex parameter is ignored."),this;(u<0||u>=this.parent.children.length)&&C.warn("Unexpected value "+u+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var h=this.index;return this.parent.children.splice(h,1),this.parent.children.splice(u,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(ce,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var u=this.opacity(),h=this.getParent();return h&&!h._isUnderCache&&(u*=h.getAbsoluteOpacity()),u}moveTo(u){return this.getParent()!==u&&(this._remove(),u.add(this)),this}toObject(){var u,h,p,m,I={},T=this.getAttrs();for(u in I.attrs={},T)h=T[u],C.isObject(h)&&!C._isPlainObject(h)&&!C._isArray(h)||(p=typeof this[u]=="function"&&this[u],delete T[u],m=p?p.call(this):null,T[u]=h,m!==h&&(I.attrs[u]=h));return I.className=this.getClassName(),C._prepareToStringify(I)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(u,h,p){var m=[];h&&this._isMatch(u)&&m.push(this);for(var I=this.parent;I;){if(I===p)return m;I._isMatch(u)&&m.push(I),I=I.parent}return m}isAncestorOf(u){return!1}
3462findAncestor(u,h,p){return this.findAncestors(u,h,p)[0]}_isMatch(u){if(!u)return!1;if(typeof u=="function")return u(this);var h,p,m=u.replace(/ /g,"").split(","),I=m.length;for(h=0;h<I;h++)if(p=m[h],C.isValidSelector(p)||(C.warn('Selector "'+p+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),C.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),C.warn("Konva is awesome, right?")),p.charAt(0)==="#"){if(this.id()===p.slice(1))return!0}else if(p.charAt(0)==="."){if(this.hasName(p.slice(1)))return!0}else if(this.className===p||this.nodeType===p)return!0;return!1}getLayer(){var u=this.getParent();return u?u.getLayer():null}getStage(){return this._getCache(Bn,this._getStage)}_getStage(){var u=this.getParent();return u?u.getStage():void 0}fire(u,h={},p){return h.target=h.target||this,p?this._fireAndBubble(u,h):this._fire(u,h),this}getAbsoluteTransform(u){return u?this._getAbsoluteTransform(u):this._getCache(_e,this._getAbsoluteTransform)}_getAbsoluteTransform(u){var h;if(u)return h=new _,this._eachAncestorReverse(function(m){var I=m.transformsEnabled();I==="all"?h.multiply(m.getTransform()):I==="position"&&h.translate(m.x()-m.offsetX(),m.y()-m.offsetY())},u),h;h=this._cache.get(_e)||new _,this.parent?this.parent.getAbsoluteTransform().copyInto(h):h.reset();var p=this.transformsEnabled();if(p==="all")h.multiply(this.getTransform());else if(p==="position"){const m=this.attrs.x||0,I=this.attrs.y||0,T=this.attrs.offsetX||0,O=this.attrs.offsetY||0;h.translate(m-T,I-O)}return h.dirty=!1,h}getAbsoluteScale(u){for(var h=this;h;)h._isUnderCache&&(u=h),h=h.getParent();const p=this.getAbsoluteTransform(u).decompose();return{x:p.scaleX,y:p.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(Tt,this._getTransform)}_getTransform(){var u,h,p=this._cache.get(Tt)||new _;p.reset();var m=this.x(),I=this.y(),T=g.getAngle(this.rotation()),O=(u=this.attrs.scaleX)!==null&&u!==void 0?u:1,L=(h=this.attrs.scaleY)!==null&&h!==void 0?h:1,F=this.attrs.skewX||0,H=this.attrs.skewY||0,Y=this.attrs.offsetX||0,ie=this.attrs.offsetY||0;return m===0&&I===0||p.translate(m,I),T!==0&&p.rotate(T),F===0&&H===0||p.skew(F,H),O===1&&L===1||p.scale(O,L),Y===0&&ie===0||p.translate(-1*Y,-1*ie),p.dirty=!1,p}clone(u){var h,p,m,I,T,O=C.cloneObject(this.attrs);for(h in u)O[h]=u[h];var L=new this.constructor(O);for(h in this.eventListeners)for(m=(p=this.eventListeners[h]).length,I=0;I<m;I++)(T=p[I]).name.indexOf("konva")<0&&(L.eventListeners[h]||(L.eventListeners[h]=[]),L.eventListeners[h].push(T));return L}_toKonvaCanvas(u){u=u||{};var h=this.getClientRect(),p=this.getStage(),m=u.x!==void 0?u.x:Math.floor(h.x),I=u.y!==void 0?u.y:Math.floor(h.y),T=u.pixelRatio||1,O=new K({width:u.width||Math.ceil(h.width)||(p?p.width():0),height:u.height||Math.ceil(h.height)||(p?p.height():0),pixelRatio:T}),L=O.getContext();return L.save(),(m||I)&&L.translate(-1*m,-1*I),this.drawScene(O),L.restore(),O}toCanvas(u){return this._toKonvaCanvas(u)._canvas}toDataURL(u){var h=(u=u||{}).mimeType||null,p=u.quality||null,m=this._toKonvaCanvas(u).toDataURL(h,p);return u.callback&&u.callback(m),m}toImage(u){if(!u||!u.callback)throw"callback required for toImage method config argument";var h=u.callback;delete u.callback,C._urlToImage(this.toDataURL(u),function(p){h(p)})}setSize(u){return this.width(u.width),this.height(u.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():g.dragDistance}_off(u,h,p){var m,I,T,O=this.eventListeners[u];for(m=0;m<O.length;m++)if(I=O[m].name,T=O[m].handler,!(I==="konva"&&h!=="konva"||h&&I!==h||p&&p!==T)){if(O.splice(m,1),O.length===0){delete this.eventListeners[u];break}m--}}_fireChangeEvent(u,h,p){this._fire(u+"Change",{oldVal:h,newVal:p})}addName(u){if(!this.hasName(u)){var h=this.name(),p=h?h+" "+u:u;this.name(p)}return this}hasName(u){if(!u)return!1;const h=this.name();return!!h&&(h||"").split(/\s/g).indexOf(u)!==-1}removeName(u){var h=(this.name()||"").split(/\s/g),p=h.indexOf(u);return p!==-1&&(h.splice(p,1),this.name(h.join(" "))),this}setAttr(u,h){var p=this["set"+C._capitalize(u)];return C._isFunction(p)?p.call(this,h):this._setAttr(u,h),this}_requestDraw(){if(g.autoDrawEnabled){const u=this.getLayer()||this.get
3462Stage();u==null||u.batchDraw()}}_setAttr(u,h){var p=this.attrs[u];(p!==h||C.isObject(h))&&(h==null?delete this.attrs[u]:this.attrs[u]=h,this._shouldFireChangeEvents&&this._fireChangeEvent(u,p,h),this._requestDraw())}_setComponentAttr(u,h,p){var m;p!==void 0&&((m=this.attrs[u])||(this.attrs[u]=this.getAttr(u)),this.attrs[u][h]=p,this._fireChangeEvent(u,m,p))}_fireAndBubble(u,h,p){if(h&&this.nodeType===wt&&(h.target=this),u!==rt&&u!==Le||!(p&&(this===p||this.isAncestorOf&&this.isAncestorOf(p))||this.nodeType==="Stage"&&!p)){this._fire(u,h);var m=(u===rt||u===Le)&&p&&p.isAncestorOf&&p.isAncestorOf(this)&&!p.isAncestorOf(this.parent);(h&&!h.cancelBubble||!h)&&this.parent&&this.parent.isListening()&&!m&&(p&&p.parent?this._fireAndBubble.call(this.parent,u,h,p):this._fireAndBubble.call(this.parent,u,h))}}_getProtoListeners(u){let h=this._cache.get(ye);if(!h){h={};let m=Object.getPrototypeOf(this);for(;m;)if(m.eventListeners){for(var p in m.eventListeners){const I=m.eventListeners[p],T=h[p]||[];h[p]=I.concat(T)}m=Object.getPrototypeOf(m)}else m=Object.getPrototypeOf(m);this._cache.set(ye,h)}return h[u]}_fire(u,h){(h=h||{}).currentTarget=this,h.type=u;const p=this._getProtoListeners(u);if(p)for(var m=0;m<p.length;m++)p[m].handler.call(this,h);const I=this.eventListeners[u];if(I)for(m=0;m<I.length;m++)I[m].handler.call(this,h)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(u){var h=u?u.pointerId:void 0,p=this.getStage(),m=this.getAbsolutePosition(),I=p._getPointerById(h)||p._changedPointerPositions[0]||m;ee._dragElements.set(this._id,{node:this,startPointerPos:I,offset:{x:I.x-m.x,y:I.y-m.y},dragStatus:"ready",pointerId:h})}startDrag(u,h=!0){ee._dragElements.has(this._id)||this._createDragElement(u),ee._dragElements.get(this._id).dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:u&&u.evt},h)}_setDragPosition(u,h){const p=this.getStage()._getPointerById(h.pointerId);if(p){var m={x:p.x-h.offset.x,y:p.y-h.offset.y},I=this.dragBoundFunc();if(I!==void 0){const T=I.call(this,m,u);T?m=T:C.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}this._lastPos&&this._lastPos.x===m.x&&this._lastPos.y===m.y||(this.setAbsolutePosition(m),this._requestDraw()),this._lastPos=m}}stopDrag(u){const h=ee._dragElements.get(this._id);h&&(h.dragStatus="stopped"),ee._endDragBefore(u),ee._endDragAfter(u)}setDraggable(u){this._setAttr("draggable",u),this._dragChange()}isDragging(){const u=ee._dragElements.get(this._id);return!!u&&u.dragStatus==="dragging"}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(u){if((u.evt.button===void 0||g.dragButtons.indexOf(u.evt.button)>=0)&&!this.isDragging()){var h=!1;ee._dragElements.forEach(p=>{this.isAncestorOf(p.node)&&(h=!0)}),h||this._createDragElement(u)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const u=ee._dragElements.get(this._id),h=u&&u.dragStatus==="dragging",p=u&&u.dragStatus==="ready";
3462h?this.stopDrag():p&&ee._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(u={x:0,y:0}){const h=this.getStage();if(!h)return!1;const p={x:-u.x,y:-u.y,width:h.width()+2*u.x,height:h.height()+2*u.y};return C.haveIntersection(p,this.getClientRect())}static create(u,h){return C._isString(u)&&(u=JSON.parse(u)),this._createNode(u,h)}static _createNode(u,h){var p,m,I,T=me.prototype.getClassName.call(u),O=u.children;if(h&&(u.attrs.container=h),g[T]||(C.warn('Can not find a node with class name "'+T+'". Fallback to "Shape".'),T="Shape"),p=new g[T](u.attrs),O)for(m=O.length,I=0;I<m;I++)p.add(me._createNode(O[I]));return p}}me.prototype.nodeType="Node",me.prototype._attrsAffectingSize=[],me.prototype.eventListeners={},me.prototype.on.call(me.prototype,Qn,function(){this._batchingTransformChange?this._needClearTransformCache=!0:(this._clearCache(Tt),this._clearSelfAndDescendantCache(_e))}),me.prototype.on.call(me.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(jn)}),me.prototype.on.call(me.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(we)}),me.prototype.on.call(me.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(ce)});const Be=N.addGetterSetter;Be(me,"zIndex"),Be(me,"absolutePosition"),Be(me,"position"),Be(me,"x",0,A()),Be(me,"y",0,A()),Be(me,"globalCompositeOperation","source-over",U()),Be(me,"opacity",1,A()),Be(me,"name","",U()),Be(me,"id","",U()),Be(me,"rotation",0,A()),N.addComponentsGetterSetter(me,"scale",["x","y"]),Be(me,"scaleX",1,A()),Be(me,"scaleY",1,A()),N.addComponentsGetterSetter(me,"skew",["x","y"]),Be(me,"skewX",0,A()),Be(me,"skewY",0,A()),N.addComponentsGetterSetter(me,"offset",["x","y"]),Be(me,"offsetX",0,A()),Be(me,"offsetY",0,A()),Be(me,"dragDistance",null,A()),Be(me,"width",0,A()),Be(me,"height",0,A()),Be(me,"listening",!0,z()),Be(me,"preventDefault",!0,z()),Be(me,"filters",null,function(S){return this._filterUpToDate=!1,S}),Be(me,"visible",!0,z()),Be(me,"transformsEnabled","all",U()),Be(me,"size"),Be(me,"dragBoundFunc"),Be(me,"draggable",!1,z()),N.backCompat(me,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});class Ye extends me{constructor(){super(...arguments),this.children=[]}getChildren(u){if(!u)return this.children||[];const h=this.children||[];var p=[];return h.forEach(function(m){u(m)&&p.push(m)}),p}hasChildren(){return this.getChildren().length>0}
3462removeChildren(){return this.getChildren().forEach(u=>{u.parent=null,u.index=0,u.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(u=>{u.parent=null,u.index=0,u.destroy()}),this.children=[],this._requestDraw(),this}add(...u){if(arguments.length>1){for(var h=0;h<arguments.length;h++)this.add(arguments[h]);return this}var p=u[0];return p.getParent()?(p.moveTo(this),this):(this._validateAdd(p),p.index=this.getChildren().length,p.parent=this,p._clearCaches(),this.getChildren().push(p),this._fire("add",{child:p}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(u){return this._generalFind(u,!1)}findOne(u){var h=this._generalFind(u,!0);return h.length>0?h[0]:void 0}_generalFind(u,h){var p=[];return this._descendants(m=>{const I=m._isMatch(u);return I&&p.push(m),!(!I||!h)}),p}_descendants(u){let h=!1;const p=this.getChildren();for(const m of p)if(h=u(m),h||m.hasChildren()&&(h=m._descendants(u),h))return!0;return!1}toObject(){var u=me.prototype.toObject.call(this);
3462return u.children=[],this.getChildren().forEach(h=>{u.children.push(h.toObject())}),u}isAncestorOf(u){for(var h=u.getParent();h;){if(h._id===this._id)return!0;h=h.getParent()}return!1}clone(u){var h=me.prototype.clone.call(this,u);return this.getChildren().forEach(function(p){h.add(p.clone())}),h}getAllIntersections(u){var h=[];return this.find("Shape").forEach(function(p){p.isVisible()&&p.intersects(u)&&h.push(p)}),h}_clearSelfAndDescendantCache(u){var h;super._clearSelfAndDescendantCache(u),this.isCached()||(h=this.children)===null||h===void 0||h.forEach(function(p){p._clearSelfAndDescendantCache(u)})}_setChildrenIndices(){var u;(u=this.children)===null||u===void 0||u.forEach(function(h,p){h.index=p}),this._requestDraw()}drawScene(u,h){var p=this.getLayer(),m=u||p&&p.getCanvas(),I=m&&m.getContext(),T=this._getCanvasCache(),O=T&&T.scene,L=m&&m.isCache;if(!this.isVisible()&&!L)return this;if(O){I.save();var F=this.getAbsoluteTransform(h).getMatrix();I.transform(F[0],F[1],F[2],F[3],F[4],F[5]),this._drawCachedSceneCanvas(I),I.restore()}else this._drawChildren("drawScene",m,h);return this}drawHit(u,h){if(!this.shouldDrawHit(h))return this;var p=this.getLayer(),m=u||p&&p.hitCanvas,I=m&&m.getContext(),T=this._getCanvasCache();if(T&&T.hit){I.save();var O=this.getAbsoluteTransform(h).getMatrix();I.transform(O[0],O[1],O[2],O[3],O[4],O[5]),this._drawCachedHitCanvas(I),I.restore()}else this._drawChildren("drawHit",m,h);return this}_drawChildren(u,h,p){var m,I=h&&h.getContext(),T=this.clipWidth(),O=this.clipHeight(),L=this.clipFunc(),F=T&&O||L;const H=p===this;if(F){I.save();var Y=this.getAbsoluteTransform(p),ie=Y.getMatrix();if(I.transform(ie[0],ie[1],ie[2],ie[3],ie[4],ie[5]),I.beginPath(),L)L.call(this,I,this);else{var ae=this.clipX(),Q=this.clipY();I.rect(ae,Q,T,O)}I.clip(),ie=Y.copy().invert().getMatrix(),I.transform(ie[0],ie[1],ie[2],ie[3],ie[4],ie[5])}var ge=!H&&this.globalCompositeOperation()!=="source-over"&&u==="drawScene";ge&&(I.save(),I._applyGlobalCompositeOperation(this)),(m=this.children)===null||m===void 0||m.forEach(function(it){it[u](h,p)}),ge&&I.restore(),F&&I.restore()}getClientRect(u){var h,p,m,I,T,O,L=(u=u||{}).skipTransform,F=u.relativeTo,H=this;(h=this.children)===null||h===void 0||h.forEach(function(Q){if(Q.visible()){var ge=Q.getClientRect({relativeTo:H,skipShadow:u.skipShadow,skipStroke:u.skipStroke});ge.width===0&&ge.height===0||(p===void 0?(p=ge.x,m=ge.y,I=ge.x+ge.width,T=ge.y+ge.height):(p=Math.min(p,ge.x),m=Math.min(m,ge.y),I=Math.max(I,ge.x+ge.width),T=Math.max(T,ge.y+ge.height)))}});for(var Y=this.find("Shape"),ie=!1,ae=0;ae<Y.length;ae++)if(Y[ae]._isVisible(this)){ie=!0;break}return O=ie&&p!==void 0?{x:p,y:m,width:I-p,height:T-m}:{x:0,y:0,width:0,height:0},L?O:this._transformedRect(O,F)}}N.addComponentsGetterSetter(Ye,"clip",["x","y","width","height"]),N.addGetterSetter(Ye,"clipX",void 0,A()),N.addGetterSetter(Ye,"clipY",void 0,A()),N.addGetterSetter(Ye,"clipWidth",void 0,A()),N.addGetterSetter(Ye,"clipHeight",void 0,A()),N.addGetterSetter(Ye,"clipFunc");const Tn=new Map,cr=g._global.PointerEvent!==void 0;function In(S){return Tn.get(S)}function on(S){return{evt:S,pointerId:S.pointerId}}function dr(S,u){return Tn.get(S)===u}function zn(S,u){qe(S),u.getStage()&&(Tn.set(S,u),cr&&u._fire("gotpointercapture",on(new PointerEvent("gotpointercapture"))))}function qe(S,u){const h=Tn.get(S);if(!h)return;const p=h.getStage();p&&p.content,Tn.delete(S),cr&&h._fire("lostpointercapture",on(new PointerEvent("lostpointercapture")))}var oe="mouseleave",st="mouseover",St="mouseenter",Gt="mousemove",zr="mousedown",Ba="mouseup",fi="pointermove",Rn="pointerdown",pi="pointerup",Vn="pointercancel",gi="pointerout",hs="pointerleave",_c="pointerover",Ec="pointerenter",gp="contextmenu",B1="touchstart",j1="touchend",z1="touchmove",V1="touchcancel",mp="wheel",TP=[[St,"_pointerenter"],[zr,"_pointerdown"],[Gt,"_pointermove"],[Ba,"_pointerup"],[oe,"_pointerleave"],[B1,"_pointerdown"],[z1,"_pointermove"],[j1,"_pointerup"],[V1,"_pointercancel"],[st,"_pointerover"],[mp,"_wheel"],[gp,"_contextmenu"],[Rn,"_pointerdown"],[fi,"_pointermove"],[pi,"_pointerup"],[Vn,"_pointercancel"],["lostpointercapture","_lostpointercapture"]];const yp={mouse:{[gi]:"mouseout",[hs]:oe,[_c]:st,[Ec]:St,[fi]:Gt,[Rn]:zr,[pi]:Ba,[Vn]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[gi]:"touchout",[hs]:"touchleave",[_c]:"touchover",[Ec]:"touchenter",[fi]:z1,[Rn]:B1,[pi]:j1,[Vn]:V1,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[gi]:gi,[hs]:hs,[_c]:_c,[Ec]:Ec,[fi]:fi,[Rn]:Rn,[pi]:pi,[Vn]:Vn,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},ja=S=>S.indexOf("pointer")>=0?"pointer":S.indexOf("touch")>=0?"touch":"mouse",uo=S=>{const u=ja(S);return u==="pointer"?g.pointerEventsEnabled&&yp.pointer:u==="touch"?yp.touch:u==="mouse"?yp.mouse:void 0};function W1(S={}
3462){return(S.clipFunc||S.clipWidth||S.clipHeight)&&C.warn("Stage does not support clipping. Please use clip for Layers or Groups."),S}const kc=[];class Tc extends Ye{constructor(u){super(W1(u)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),kc.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{W1(this.attrs)}),this._checkVisibility()}_validateAdd(u){const h=u.getType()==="Layer",p=u.getType()==="FastLayer";h||p||C.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const u=this.visible()?"":"none";this.content.style.display=u}setContainer(u){if(typeof u=="string"){if(u.charAt(0)==="."){var h=u.slice(1);u=document.getElementsByClassName(h)[0]}else{var p;p=u.charAt(0)!=="#"?u:u.slice(1),u=document.getElementById(p)}if(!u)throw"Can not find container in document with id "+p}return this._setAttr("container",u),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),u.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var u,h=this.children,p=h.length;for(u=0;u<p;u++)h[u].clear();return this}clone(u){return u||(u={}),u.container=typeof document<"u"&&document.createElement("div"),Ye.prototype.clone.call(this,u)}destroy(){super.destroy();var u=this.content;u&&C._isInDocument(u)&&this.container().removeChild(u);var h=kc.indexOf(this);return h>-1&&kc.splice(h,1),this}getPointerPosition(){const u=this._pointerPositions[0]||this._changedPointerPositions[0];return u?{x:u.x,y:u.y}:(C.warn("Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);"),null)}_getPointerById(u){return this._pointerPositions.find(h=>h.id===u)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(u){(u=u||{}).x=u.x||0,u.y=u.y||0,u.width=u.width||this.width(),u.height=u.height||this.height();var h=new K({width:u.width,height:u.height,pixelRatio:u.pixelRatio||1}),p=h.getContext()._context,m=this.children;return(u.x||u.y)&&p.translate(-1*u.x,-1*u.y),m.forEach(function(I){if(I.isVisible()){var T=I._toKonvaCanvas(u);p.drawImage(T._canvas,u.x,u.y,T.getWidth()/T.getPixelRatio(),T.getHeight()/T.getPixelRatio())}}),h}getIntersection(u){if(!u)return null;var h,p=this.children;for(h=p.length-1;h>=0;h--){const m=p[h].getIntersection(u);if(m)return m}return null}_resizeDOM(){var u=this.width(),h=this.height();this.content&&(this.content.style.width=u+"px",this.content.style.height=h+"px"),this.bufferCanvas.setSize(u,h),this.bufferHitCanvas.setSize(u,h),this.children.forEach(p=>{p.setSize({width:u,height:h}),p.draw()})}add(u,...h){if(arguments.length>1){for(var p=0;p<arguments.length;p++)this.add(arguments[p]);return this}super.add(u);var m=this.children.length;return m>5&&C.warn("The stage has "+m+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),u.setSize({width:this.width(),height:this.height()}),u.draw(),g.isBrowser&&this.content.appendChild(u.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(u){return dr(u,this)}setPointerCapture(u){zn(u,this)}releaseCapture(u){qe(u)}getLayers(){return this.children}_bindContentEvents(){g.isBrowser&&TP.forEach(([u,h])=>{this.content.addEventListener(u,p=>{this[h](p)})})}_pointerenter(u){this.setPointersPositions(u);const h=uo(u.type);this._fire(h.pointerenter,{evt:u,target:this,currentTarget:this})}_pointerover(u){this.setPointersPositions(u);const h=uo(u.type);this._fire(h.pointerover,{evt:u,target:this,currentTarget:this})}_getTargetShape(u){let h=this[u+"targetShape"];return h&&!h.getStage()&&(h=null),h}_pointerleave(u){const h=uo(u.type),p=ja(u.type);if(h){this.setPointersPositions(u);var m=this._getTargetShape(p),I=!ee.isDragging||g.hitOnDragEnabled;m&&I?(m._fireAndBubble(h.pointerout,{evt:u}),m._fireAndBubble(h.pointerleave,{evt:u}),this._fire(h.pointerleave,{evt:u,target:this,currentTarget:this}),this[p+"targetShape"]=null):I&&(this._fire(h.pointerleave,{evt:u,target:this,currentTarget:this}),this._fire(h.pointerout,{evt:u,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(u){const h=uo(u.type),p=ja(u.type);if(h){this.setPointersPositions(u);var m=!1;this._changedPointerPositions.forEach(I=>{var T=this.getIntersection(I);if(ee.justDragged=!1,g["_"+p+"ListenClick"]=!0,!T||!T.isListening())return;g.capturePointerEventsEnabled&&T.setPointerCapture(I.id),this[p+"ClickStartShape"]=T,T._fireAndBubble(h.pointerdown,{evt:u,pointerId:I.id}),m=!0;const O=u.type.indexOf("touch")>=0;T.preventDefault()&&u.cancelable&&O&&u.preventDefault()}),m||this._fire(h.pointerdown,{evt:u,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(u){const h=uo(u.type),p=ja(u.type);if(!h||(ee.isDragging&&ee.node.preventDefault()&&u.cancelable&&u.preventDefault(),this.setPointersPositions(u),ee.isDragging&&!g.hitOnDragEnabled))return;var m={};let I=!1;var T=this._getTargetShape(p);this._changedPointerPositions.forEach(O=>{const L=In(O.id)||this.getIntersection(O),F=O.id,H={evt:u,pointerId:F};var Y=T!==L;if(Y&&T&&(T._fireAndBubble(h.pointerout,Object.assign({},H),L),T._fireAndBubble(h.pointerleave,Object.assign({}
3462,H),L)),L){if(m[L._id])return;m[L._id]=!0}L&&L.isListening()?(I=!0,Y&&(L._fireAndBubble(h.pointerover,Object.assign({},H),T),L._fireAndBubble(h.pointerenter,Object.assign({},H),T),this[p+"targetShape"]=L),L._fireAndBubble(h.pointermove,Object.assign({},H))):T&&(this._fire(h.pointerover,{evt:u,target:this,currentTarget:this,pointerId:F}),this[p+"targetShape"]=null)}),I||this._fire(h.pointermove,{evt:u,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(u){const h=uo(u.type),p=ja(u.type);if(!h)return;this.setPointersPositions(u);const m=this[p+"ClickStartShape"],I=this[p+"ClickEndShape"];var T={};let O=!1;this._changedPointerPositions.forEach(L=>{const F=In(L.id)||this.getIntersection(L);if(F){if(F.releaseCapture(L.id),T[F._id])return;T[F._id]=!0}const H=L.id,Y={evt:u,pointerId:H};let ie=!1;g["_"+p+"InDblClickWindow"]?(ie=!0,clearTimeout(this[p+"DblTimeout"])):ee.justDragged||(g["_"+p+"InDblClickWindow"]=!0,clearTimeout(this[p+"DblTimeout"])),this[p+"DblTimeout"]=setTimeout(function(){g["_"+p+"InDblClickWindow"]=!1},g.dblClickWindow),F&&F.isListening()?(O=!0,this[p+"ClickEndShape"]=F,F._fireAndBubble(h.pointerup,Object.assign({},Y)),g["_"+p+"ListenClick"]&&m&&m===F&&(F._fireAndBubble(h.pointerclick,Object.assign({},Y)),ie&&I&&I===F&&F._fireAndBubble(h.pointerdblclick,Object.assign({},Y)))):(this[p+"ClickEndShape"]=null,g["_"+p+"ListenClick"]&&this._fire(h.pointerclick,{evt:u,target:this,currentTarget:this,pointerId:H}),ie&&this._fire(h.pointerdblclick,{evt:u,target:this,currentTarget:this,pointerId:H}))}),O||this._fire(h.pointerup,{evt:u,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),g["_"+p+"ListenClick"]=!1,u.cancelable&&u.preventDefault()}_contextmenu(u){this.setPointersPositions(u);var h=this.getIntersection(this.getPointerPosition());h&&h.isListening()?h._fireAndBubble(gp,{evt:u}):this._fire(gp,{evt:u,target:this,currentTarget:this})}_wheel(u){this.setPointersPositions(u);var h=this.getIntersection(this.getPointerPosition());h&&h.isListening()?h._fireAndBubble(mp,{evt:u}):this._fire(mp,{evt:u,target:this,currentTarget:this})}_pointercancel(u){this.setPointersPositions(u);const h=In(u.pointerId)||this.getIntersection(this.getPointerPosition());h&&h._fireAndBubble(pi,on(u)),qe(u.pointerId)}_lostpointercapture(u){qe(u.pointerId)}setPointersPositions(u){var h=this._getContentPosition(),p=null,m=null;(u=u||window.event).touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(u.touches,I=>{this._pointerPositions.push({id:I.identifier,x:(I.clientX-h.left)/h.scaleX,y:(I.clientY-h.top)/h.scaleY})}),Array.prototype.forEach.call(u.changedTouches||u.touches,I=>{this._changedPointerPositions.push({id:I.identifier,x:(I.clientX-h.left)/h.scaleX,y:(I.clientY-h.top)/h.scaleY})})):(p=(u.clientX-h.left)/h.scaleX,m=(u.clientY-h.top)/h.scaleY,this.pointerPos={x:p,y:m},this._pointerPositions=[{x:p,y:m,id:C._getFirstPointerId(u)}],this._changedPointerPositions=[{x:p,y:m,id:C._getFirstPointerId(u)}])}_setPointerPosition(u){C.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(u)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var u=this.content.getBoundingClientRect();return{top:u.top,left:u.left,scaleX:u.width/this.content.clientWidth||1,scaleY:u.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new K({width:this.width(),height:this.height()}),this.bufferHitCanvas=new ne({pixelRatio:1,width:this.width(),height:this.height()}),g.isBrowser){var u=this.container();if(!u)throw"Stage has no container. A container is required.";u.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),u.appendChild(this.content),this._resizeDOM()}}cache(){return C.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}
3462batchDraw(){return this.getChildren().forEach(function(u){u.batchDraw()}),this}}Tc.prototype.nodeType="Stage",v(Tc),N.addGetterSetter(Tc,"container");var G1="hasShadow",H1="shadowRGBA",q1="patternImage",K1="linearGradient",Y1="radialGradient";let vp;function bp(){return vp||(vp=C.createCanvasElement().getContext("2d"),vp)}const za={};class de extends me{constructor(u){let h;for(super(u);h=C.getRandomColor(),!h||h in za;);this.colorKey=h,za[h]=this}getContext(){return C.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return C.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(G1,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(q1,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const u=bp().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(u&&u.setTransform){const h=new _;h.translate(this.fillPatternX(),this.fillPatternY()),h.rotate(g.getAngle(this.fillPatternRotation())),h.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),h.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const p=h.getMatrix(),m=typeof DOMMatrix>"u"?{a:p[0],b:p[1],c:p[2],d:p[3],e:p[4],f:p[5]}:new DOMMatrix(p);u.setTransform(m)}return u}}_getLinearGradient(){return this._getCache(K1,this.__getLinearGradient)}__getLinearGradient(){var u=this.fillLinearGradientColorStops();if(u){for(var h=bp(),p=this.fillLinearGradientStartPoint(),m=this.fillLinearGradientEndPoint(),I=h.createLinearGradient(p.x,p.y,m.x,m.y),T=0;T<u.length;T+=2)I.addColorStop(u[T],u[T+1]);return I}}_getRadialGradient(){return this._getCache(Y1,this.__getRadialGradient)}__getRadialGradient(){var u=this.fillRadialGradientColorStops();if(u){for(var h=bp(),p=this.fillRadialGradientStartPoint(),m=this.fillRadialGradientEndPoint(),I=h.createRadialGradient(p.x,p.y,this.fillRadialGradientStartRadius(),m.x,m.y,this.fillRadialGradientEndRadius()),T=0;T<u.length;T+=2)I.addColorStop(u[T],u[T+1]);return I}}getShadowRGBA(){return this._getCache(H1,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var u=C.colorToRGBA(this.shadowColor());return"rgba("+u.r+","+u.g+","+u.b+","+u.a*(this.shadowOpacity()||1)+")"}}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!(!this.stroke()&&!this.strokeLinearGradientColorStops()))}hasHitStroke(){const u=this.hitStrokeWidth();return u==="auto"?this.hasStroke():this.strokeEnabled()&&!!u}intersects(u){var h=this.getStage().bufferHitCanvas;return h.getContext().clear(),this.drawHit(h,null,!0),h.context.getImageData(Math.round(u.x),Math.round(u.y),1,1).data[3]>0}destroy(){return me.prototype.destroy.call(this),delete za[this.colorKey],delete this.colorKey,this}_useBufferCanvas(u){var h;if(!this.getStage()||(h=this.attrs.perfectDrawEnabled)!==null&&h!==void 0&&!h)return!1;const p=u||this.hasFill(),m=this.hasStroke(),I=this.getAbsoluteOpacity()!==1;if(p&&m&&I)return!0;const T=this.hasShadow(),O=this.shadowForStrokeEnabled();return!!(p&&m&&T&&O)}setStrokeHitEnabled(u){C.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),u?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var u=this.size();return{x:this._centroid?-u.width/2:0,y:this._centroid?-u.height/2:0,width:u.width,height:u.height}}getClientRect(u={}
3462){const h=u.skipTransform,p=u.relativeTo,m=this.getSelfRect(),I=!u.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,T=m.width+I,O=m.height+I,L=!u.skipShadow&&this.hasShadow(),F=L?this.shadowOffsetX():0,H=L?this.shadowOffsetY():0,Y=T+Math.abs(F),ie=O+Math.abs(H),ae=L&&this.shadowBlur()||0,Q={width:Y+2*ae,height:ie+2*ae,x:-(I/2+ae)+Math.min(F,0)+m.x,y:-(I/2+ae)+Math.min(H,0)+m.y};return h?Q:this._transformedRect(Q,p)}drawScene(u,h){var p,m,I=this.getLayer(),T=u||I.getCanvas(),O=T.getContext(),L=this._getCanvasCache(),F=this.getSceneFunc(),H=this.hasShadow(),Y=T.isCache,ie=h===this;if(!this.isVisible()&&!ie)return this;if(L){O.save();var ae=this.getAbsoluteTransform(h).getMatrix();return O.transform(ae[0],ae[1],ae[2],ae[3],ae[4],ae[5]),this._drawCachedSceneCanvas(O),O.restore(),this}if(!F)return this;if(O.save(),this._useBufferCanvas()&&!Y){(m=(p=this.getStage().bufferCanvas).getContext()).clear(),m.save(),m._applyLineJoin(this);var Q=this.getAbsoluteTransform(h).getMatrix();m.transform(Q[0],Q[1],Q[2],Q[3],Q[4],Q[5]),F.call(this,m,this),m.restore();var ge=p.pixelRatio;H&&O._applyShadow(this),O._applyOpacity(this),O._applyGlobalCompositeOperation(this),O.drawImage(p._canvas,0,0,p.width/ge,p.height/ge)}else O._applyLineJoin(this),ie||(Q=this.getAbsoluteTransform(h).getMatrix(),O.transform(Q[0],Q[1],Q[2],Q[3],Q[4],Q[5]),O._applyOpacity(this),O._applyGlobalCompositeOperation(this)),H&&O._applyShadow(this),F.call(this,O,this);return O.restore(),this}drawHit(u,h,p=!1){if(!this.shouldDrawHit(h,p))return this;var m=this.getLayer(),I=u||m.hitCanvas,T=I&&I.getContext(),O=this.hitFunc()||this.sceneFunc(),L=this._getCanvasCache(),F=L&&L.hit;if(this.colorKey||C.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),F){T.save();var H=this.getAbsoluteTransform(h).getMatrix();return T.transform(H[0],H[1],H[2],H[3],H[4],H[5]),this._drawCachedHitCanvas(T),T.restore(),this}if(!O)return this;if(T.save(),T._applyLineJoin(this),this!==h){var Y=this.getAbsoluteTransform(h).getMatrix();T.transform(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5])}return O.call(this,T,this),T.restore(),this}drawHitFromCache(u=0){var h,p,m,I,T,O=this._getCanvasCache(),L=this._getCachedSceneCanvas(),F=O.hit,H=F.getContext(),Y=F.getWidth(),ie=F.getHeight();H.clear(),H.drawImage(L._canvas,0,0,Y,ie);try{for(m=(p=(h=H.getImageData(0,0,Y,ie)).data).length,I=C._hexToRgb(this.colorKey),T=0;T<m;T+=4)p[T+3]>u?(p[T]=I.r,p[T+1]=I.g,p[T+2]=I.b,p[T+3]=255):p[T+3]=0;H.putImageData(h,0,0)}catch(ae){C.error("Unable to draw hit graph from cached scene canvas. "+ae.message)}return this}hasPointerCapture(u){return dr(u,this)}setPointerCapture(u){zn(u,this)}releaseCapture(u){qe(u)}}de.prototype._fillFunc=function(S){S.fill()},de.prototype._strokeFunc=function(S){S.stroke()},de.prototype._fillFuncHit=function(S){S.fill()},de.prototype._strokeFuncHit=function(S){S.stroke()},de.prototype._centroid=!1,de.prototype.nodeType="Shape",v(de),de.prototype.eventListeners={},de.prototype.on.call(de.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",function(){this._clearCache(G1)}),de.prototype.on.call(de.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",function(){this._clearCache(H1)}),de.prototype.on.call(de.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",function(){this._clearCache(q1)}),de.prototype.on.call(de.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",function(){this._clearCache(K1)}),de.prototype.on.call(de.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",function(){this._clearCache(Y1)}),N.addGetterSetter(de,"stroke",void 0,B()),N.addGetterSetter(de,"strokeWidth",2,A()),N.addGetterSetter(de,"fillAfterStrokeEnabled",!1),N.addGetterSetter(de,"hitStrokeWidth","auto",function(){if(g.isUnminified)return function(S,u){return C._isNumber(S)||S==="auto"||C.warn(D(S)+' is a not val
3462id value for "'+u+'" attribute. The value should be a number or "auto".'),S}}()),N.addGetterSetter(de,"strokeHitEnabled",!0,z()),N.addGetterSetter(de,"perfectDrawEnabled",!0,z()),N.addGetterSetter(de,"shadowForStrokeEnabled",!0,z()),N.addGetterSetter(de,"lineJoin"),N.addGetterSetter(de,"lineCap"),N.addGetterSetter(de,"sceneFunc"),N.addGetterSetter(de,"hitFunc"),N.addGetterSetter(de,"dash"),N.addGetterSetter(de,"dashOffset",0,A()),N.addGetterSetter(de,"shadowColor",void 0,U()),N.addGetterSetter(de,"shadowBlur",0,A()),N.addGetterSetter(de,"shadowOpacity",1,A()),N.addComponentsGetterSetter(de,"shadowOffset",["x","y"]),N.addGetterSetter(de,"shadowOffsetX",0,A()),N.addGetterSetter(de,"shadowOffsetY",0,A()),N.addGetterSetter(de,"fillPatternImage"),N.addGetterSetter(de,"fill",void 0,B()),N.addGetterSetter(de,"fillPatternX",0,A()),N.addGetterSetter(de,"fillPatternY",0,A()),N.addGetterSetter(de,"fillLinearGradientColorStops"),N.addGetterSetter(de,"strokeLinearGradientColorStops"),N.addGetterSetter(de,"fillRadialGradientStartRadius",0),N.addGetterSetter(de,"fillRadialGradientEndRadius",0),N.addGetterSetter(de,"fillRadialGradientColorStops"),N.addGetterSetter(de,"fillPatternRepeat","repeat"),N.addGetterSetter(de,"fillEnabled",!0),N.addGetterSetter(de,"strokeEnabled",!0),N.addGetterSetter(de,"shadowEnabled",!0),N.addGetterSetter(de,"dashEnabled",!0),N.addGetterSetter(de,"strokeScaleEnabled",!0),N.addGetterSetter(de,"fillPriority","color"),N.addComponentsGetterSetter(de,"fillPatternOffset",["x","y"]),N.addGetterSetter(de,"fillPatternOffsetX",0,A()),N.addGetterSetter(de,"fillPatternOffsetY",0,A()),N.addComponentsGetterSetter(de,"fillPatternScale",["x","y"]),N.addGetterSetter(de,"fillPatternScaleX",1,A()),N.addGetterSetter(de,"fillPatternScaleY",1,A()),N.addComponentsGetterSetter(de,"fillLinearGradientStartPoint",["x","y"]),N.addComponentsGetterSetter(de,"strokeLinearGradientStartPoint",["x","y"]),N.addGetterSetter(de,"fillLinearGradientStartPointX",0),N.addGetterSetter(de,"strokeLinearGradientStartPointX",0),N.addGetterSetter(de,"fillLinearGradientStartPointY",0),N.addGetterSetter(de,"strokeLinearGradientStartPointY",0),N.addComponentsGetterSetter(de,"fillLinearGradientEndPoint",["x","y"]),N.addComponentsGetterSetter(de,"strokeLinearGradientEndPoint",["x","y"]),N.addGetterSetter(de,"fillLinearGradientEndPointX",0),N.addGetterSetter(de,"strokeLinearGradientEndPointX",0),N.addGetterSetter(de,"fillLinearGradientEndPointY",0),N.addGetterSetter(de,"strokeLinearGradientEndPointY",0),N.addComponentsGetterSetter(de,"fillRadialGradientStartPoint",["x","y"]),N.addGetterSetter(de,"fillRadialGradientStartPointX",0),N.addGetterSetter(de,"fillRadialGradientStartPointY",0),N.addComponentsGetterSetter(de,"fillRadialGradientEndPoint",["x","y"]),N.addGetterSetter(de,"fillRadialGradientEndPointX",0),N.addGetterSetter(de,"fillRadialGradientEndPointY",0),N.addGetterSetter(de,"fillPatternRotation",0),N.backCompat(de,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var X1=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],IP=X1.length;class fs extends Ye{constructor(u){super(u),this.canvas=new K,this.hitCanvas=new ne({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(u){return this.getContext().clear(u),this.getHitCanvas().getContext().clear(u),this}setZIndex(u){super.setZIndex(u);var h=this.getStage();return h&&h.content&&(h.content.removeChild(this.getNativeCanvasElement()),u<h.children.length-1?h.content.insertBefore(this.getNativeCanvasElement(),h.children[u+1].getCanvas()._canvas):h.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){me.prototype.moveToTop.call(this);var u=this.getStage();return u&&u.content&&(u.content.removeChild(this.getNativeCanvasElement()),u.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!me.prototype.moveUp.call(this))return!1;var u=this.getStage();return!(!u||!u.content||(u.content.removeChild(this.getNativeCanvasElement()),this.index<u.children.length-1?u.content.insertBefore(this.getNativeCanvasElement(),u.children[this.index+1].getCanvas()._canvas):u.content.appendChild(this.getNativeCanvasElement()),0))}moveDown(){if(me.prototype.moveDown.call(this)){var u=this.getStage();if(u){var h=u.children;u.content&&(u.content.removeChild(this.getNativeCanvasElement()),u.content.insertBefore(this.getNativeCanvasElement(),h[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(me.prototype.moveToBottom.call(this)){var u=this.getStage();if(u){var h=u.children;u.content&&(u.content.removeChild(this.getNativeCanvasElement()),u.content.insertBefore(this.getNativeCanvasElement(),h[1].getCanvas()._canvas))}return!0}return!1}
3462getLayer(){return this}remove(){var u=this.getNativeCanvasElement();return me.prototype.remove.call(this),u&&u.parentNode&&C._isInDocument(u)&&u.parentNode.removeChild(u),this}getStage(){return this.parent}setSize({width:u,height:h}){return this.canvas.setSize(u,h),this.hitCanvas.setSize(u,h),this._setSmoothEnabled(),this}_validateAdd(u){var h=u.getType();h!=="Group"&&h!=="Shape"&&C.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(u){return(u=u||{}).width=u.width||this.getWidth(),u.height=u.height||this.getHeight(),u.x=u.x!==void 0?u.x:this.x(),u.y=u.y!==void 0?u.y:this.y(),me.prototype._toKonvaCanvas.call(this,u)}_checkVisibility(){const u=this.visible();this.canvas._canvas.style.display=u?"block":"none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){C.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){C.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,C.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(u){if(!this.isListening()||!this.isVisible())return null;for(var h=1,p=!1;;){for(let m=0;m<IP;m++){const I=X1[m],T=this._getIntersection({x:u.x+I.x*h,y:u.y+I.y*h}),O=T.shape;if(O)return O;if(p=!!T.antialiased,!T.antialiased)break}if(!p)return null;h+=1}}_getIntersection(u){const h=this.hitCanvas.pixelRatio,p=this.hitCanvas.context.getImageData(Math.round(u.x*h),Math.round(u.y*h),1,1).data,m=p[3];if(m===255){const I=C._rgbToHex(p[0],p[1],p[2]),T=za["#"+I];return T?{shape:T}:{antialiased:!0}}return m>0?{antialiased:!0}:{}}drawScene(u,h){var p=this.getLayer(),m=u||p&&p.getCanvas();return this._fire("beforeDraw",{node:this}),this.clearBeforeDraw()&&m.getContext().clear(),Ye.prototype.drawScene.call(this,m,h),this._fire("draw",{node:this}),this}drawHit(u,h){var p=this.getLayer(),m=u||p&&p.hitCanvas;return p&&p.clearBeforeDraw()&&p.getHitCanvas().getContext().clear(),Ye.prototype.drawHit.call(this,m,h),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(u){C.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(u)}getHitGraphEnabled(u){return C.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(this.parent&&this.parent.content){var u=this.parent;this.hitCanvas._canvas.parentNode?u.content.removeChild(this.hitCanvas._canvas):u.content.appendChild(this.hitCanvas._canvas)}}}fs.prototype.nodeType="Layer",v(fs),N.addGetterSetter(fs,"imageSmoothingEnabled",!0),N.addGetterSetter(fs,"clearBeforeDraw",!0),N.addGetterSetter(fs,"hitGraphEnabled",!0,z());class wp extends fs{constructor(u){super(u),this.listening(!1),C.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}wp.prototype.nodeType="FastLayer",v(wp);class Sp extends Ye{_validateAdd(u){var h=u.getType();h!=="Group"&&h!=="Shape"&&C.throw("You may only add groups and shapes to groups.")}}Sp.prototype.nodeType="Group",v(Sp);var Cp=f.performance&&f.performance.now?function(){return f.performance.now()}:function(){return new Date().getTime()};class hr{constructor(u,h){this.id=hr.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Cp(),frameRate:0},this.func=u,this.setLayers(h)}setLayers(u){var h;return h=u?u.length>0?u:[u]:[],this.layers=h,this}getLayers(){return this.layers}addLayer(u){var h,p=this.layers,m=p.length;for(h=0;h<m;h++)if(p[h]._id===u._id)return!1;return this.layers.push(u),!0}isRunning(){var u,h=hr.animations,p=h.length;for(u=0;u<p;u++)if(h[u].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=Cp(),hr._addAnimation(this),this}stop(){return hr._removeAnimation(this),this}_updateFrameObject(u){this.frame.timeDiff=u-this.frame.lastTime,this.frame.lastTime=u,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(u){this.animations.push(u),this._handleAnimation()}static _removeAnimation(u){var h,p=u.id,m=this.animations,I=m.length;for(h=0;h<I;h++)if(m[h].id===p){this.animations.splice(h,1);break}}static _runFrames(){var u,h,p,m,I,T,O,L,F={},H=this.animations;for(m=0;m<H.length;m++)if(h=(u=H[m]).layers,p=u.func,u._updateFrameObject(Cp()),T=h.length,!p||p.call(u,u.frame)!==!1)for(I=0;I<T;I++)(O=h[I])._id!==void 0&&(F[O._id]=O);for(L in F)F.hasOwnProperty(L)&&F[L].batchDraw()}static _animationLoop(){var u=hr;
3462u.animations.length?(u._runFrames(),C.requestAnimFrame(u._animationLoop)):u.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,C.requestAnimFrame(this._animationLoop))}}hr.animations=[],hr.animIdCounter=0,hr.animRunning=!1;var RP={node:1,duration:1,easing:1,onFinish:1,yoyo:1},PP=0,Q1=["fill","stroke","shadowColor"];class AP{constructor(u,h,p,m,I,T,O){this.prop=u,this.propFunc=h,this.begin=m,this._pos=m,this.duration=T,this._change=0,this.prevPos=0,this.yoyo=O,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=p,this._change=I-this.begin,this.pause()}fire(u){var h=this[u];h&&h()}setTime(u){u>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():u<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=u,this.update())}getTime(){return this._time}setPosition(u){this.prevPos=this._pos,this.propFunc(u),this._pos=u}getPosition(u){return u===void 0&&(u=this._time),this.func(u,this.begin,this._change,this.duration)}play(){this.state=2,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=3,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(u){this.pause(),this._time=u,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var u=this.getTimer()-this._startTime;this.state===2?this.setTime(u):this.state===3&&this.setTime(this.duration-u)}pause(){this.state=1,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Ct{constructor(u){var h,p,m=this,I=u.node,T=I._id,O=u.easing||Va.Linear,L=!!u.yoyo;h=u.duration===void 0?.3:u.duration===0?.001:u.duration,this.node=I,this._id=PP++;var F=I.getLayer()||(I instanceof g.Stage?I.getLayers():null);for(p in F||C.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new hr(function(){m.tween.onEnterFrame()},F),this.tween=new AP(p,function(H){m._tweenFunc(H)},O,0,1,1e3*h,L),this._addListeners(),Ct.attrs[T]||(Ct.attrs[T]={}),Ct.attrs[T][this._id]||(Ct.attrs[T][this._id]={}),Ct.tweens[T]||(Ct.tweens[T]={}),u)RP[p]===void 0&&this._addAttr(p,u[p]);this.reset(),this.onFinish=u.onFinish,this.onReset=u.onReset,this.onUpdate=u.onUpdate}_addAttr(u,h){var p,m,I,T,O,L,F,H,Y=this.node,ie=Y._id;if((I=Ct.tweens[ie][u])&&delete Ct.attrs[ie][I][u],p=Y.getAttr(u),C._isArray(h))if(m=[],O=Math.max(h.length,p.length),u==="points"&&h.length!==p.length&&(h.length>p.length?(F=p,p=C._prepareArrayForTween(p,h,Y.closed())):(L=h,h=C._prepareArrayForTween(h,p,Y.closed()))),u.indexOf("fill")===0)for(T=0;T<O;T++)if(T%2==0)m.push(h[T]-p[T]);else{var ae=C.colorToRGBA(p[T]);H=C.colorToRGBA(h[T]),p[T]=ae,m.push({r:H.r-ae.r,g:H.g-ae.g,b:H.b-ae.b,a:H.a-ae.a})}else for(T=0;T<O;T++)m.push(h[T]-p[T]);else Q1.indexOf(u)!==-1?(p=C.colorToRGBA(p),m={r:(H=C.colorToRGBA(h)).r-p.r,g:H.g-p.g,b:H.b-p.b,a:H.a-p.a}):m=h-p;Ct.attrs[ie][this._id][u]={start:p,diff:m,end:h,trueEnd:L,trueStart:F},Ct.tweens[ie][u]=this._id}_tweenFunc(u){var h,p,m,I,T,O,L,F,H=this.node,Y=Ct.attrs[H._id][this._id];for(h in Y){if(m=(p=Y[h]).start,I=p.diff,F=p.end,C._isArray(m))if(T=[],L=Math.max(m.length,F.length),h.indexOf("fill")===0)for(O=0;O<L;O++)O%2==0?T.push((m[O]||0)+I[O]*u):T.push("rgba("+Math.round(m[O].r+I[O].r*u)+","+Math.round(m[O].g+I[O].g*u)+","+Math.round(m[O].b+I[O].b*u)+","+(m[O].a+I[O].a*u)+")");else for(O=0;O<L;O++)T.push((m[O]||0)+I[O]*u);else T=Q1.indexOf(h)!==-1?"rgba("+Math.round(m.r+I.r*u)+","+Math.round(m.g+I.g*u)+","+Math.round(m.b+I.b*u)+","+(m.a+I.a*u)+")":m+I*u;H.setAttr(h,T)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var u=this.node,h=Ct.attrs[u._id][this._id];h.points&&h.points.trueEnd&&u.setAttr("points",h.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var u=this.node,h=Ct.attrs[u._id][this._id];h.points&&h.points.trueStart&&u.points(h.points.trueStart),this.onReset&&this.onReset()}
3462,this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(u){return this.tween.seek(1e3*u),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var u,h=this.node._id,p=this._id,m=Ct.tweens[h];for(u in this.pause(),m)delete Ct.tweens[h][u];delete Ct.attrs[h][p]}}Ct.attrs={},Ct.tweens={},me.prototype.to=function(S){var u=S.onFinish;S.node=this,S.onFinish=function(){this.destroy(),u&&u()},new Ct(S).play()};const Va={BackEaseIn(S,u,h,p){var m=1.70158;return h*(S/=p)*S*((m+1)*S-m)+u},BackEaseOut(S,u,h,p){var m=1.70158;return h*((S=S/p-1)*S*((m+1)*S+m)+1)+u},BackEaseInOut(S,u,h,p){var m=1.70158;return(S/=p/2)<1?h/2*(S*S*((1+(m*=1.525))*S-m))+u:h/2*((S-=2)*S*((1+(m*=1.525))*S+m)+2)+u},ElasticEaseIn(S,u,h,p,m,I){var T=0;return S===0?u:(S/=p)==1?u+h:(I||(I=.3*p),!m||m<Math.abs(h)?(m=h,T=I/4):T=I/(2*Math.PI)*Math.asin(h/m),-m*Math.pow(2,10*(S-=1))*Math.sin((S*p-T)*(2*Math.PI)/I)+u)},ElasticEaseOut(S,u,h,p,m,I){var T=0;return S===0?u:(S/=p)==1?u+h:(I||(I=.3*p),!m||m<Math.abs(h)?(m=h,T=I/4):T=I/(2*Math.PI)*Math.asin(h/m),m*Math.pow(2,-10*S)*Math.sin((S*p-T)*(2*Math.PI)/I)+h+u)},ElasticEaseInOut(S,u,h,p,m,I){var T=0;return S===0?u:(S/=p/2)==2?u+h:(I||(I=p*(.3*1.5)),!m||m<Math.abs(h)?(m=h,T=I/4):T=I/(2*Math.PI)*Math.asin(h/m),S<1?m*Math.pow(2,10*(S-=1))*Math.sin((S*p-T)*(2*Math.PI)/I)*-.5+u:m*Math.pow(2,-10*(S-=1))*Math.sin((S*p-T)*(2*Math.PI)/I)*.5+h+u)},BounceEaseOut:(S,u,h,p)=>(S/=p)<1/2.75?h*(7.5625*S*S)+u:S<2/2.75?h*(7.5625*(S-=1.5/2.75)*S+.75)+u:S<2.5/2.75?h*(7.5625*(S-=2.25/2.75)*S+.9375)+u:h*(7.5625*(S-=2.625/2.75)*S+.984375)+u,BounceEaseIn:(S,u,h,p)=>h-Va.BounceEaseOut(p-S,0,h,p)+u,BounceEaseInOut:(S,u,h,p)=>S<p/2?.5*Va.BounceEaseIn(2*S,0,h,p)+u:.5*Va.BounceEaseOut(2*S-p,0,h,p)+.5*h+u,EaseIn:(S,u,h,p)=>h*(S/=p)*S+u,EaseOut:(S,u,h,p)=>-h*(S/=p)*(S-2)+u,EaseInOut:(S,u,h,p)=>(S/=p/2)<1?h/2*S*S+u:-h/2*(--S*(S-2)-1)+u,StrongEaseIn:(S,u,h,p)=>h*(S/=p)*S*S*S*S+u,StrongEaseOut:(S,u,h,p)=>h*((S=S/p-1)*S*S*S*S+1)+u,StrongEaseInOut:(S,u,h,p)=>(S/=p/2)<1?h/2*S*S*S*S*S+u:h/2*((S-=2)*S*S*S*S+2)+u,Linear:(S,u,h,p)=>h*S/p+u},Vr=C._assign(g,{Util:C,Transform:_,Node:me,Container:Ye,Stage:Tc,stages:kc,Layer:fs,FastLayer:wp,Group:Sp,DD:ee,Shape:de,shapes:za,Animation:hr,Tween:Ct,Easings:Va,Context:X,Canvas:re});var OP=o(918),J1=o.n(OP),DP=o(303),MP=o.n(DP);class wr extends de{constructor(u){super(u),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const u=this.image();u&&u.complete||u&&u.readyState===4||u&&u.addEventListener&&u.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(u){const h=this.getWidth(),p=this.getHeight(),m=this.attrs.image;let I;if(m){const T=this.attrs.cropWidth,O=this.attrs.cropHeight;I=T&&O?[m,this.cropX(),this.cropY(),T,O,0,0,h,p]:[m,0,0,h,p]}(this.hasFill()||this.hasStroke())&&(u.beginPath(),u.rect(0,0,h,p),u.closePath(),u.fillStrokeShape(this)),m&&u.drawImage.apply(u,I)}_hitFunc(u){var h=this.width(),p=this.height();u.beginPath(),u.rect(0,0,h,p),u.closePath(),u.fillStrokeShape(this)}getWidth(){var u,h;return(u=this.attrs.width)!==null&&u!==void 0?u:(h=this.image())===null||h===void 0?void 0:h.width}getHeight(){var u,h;return(u=this.attrs.height)!==null&&u!==void 0?u:(h=this.image())===null||h===void 0?void 0:h.height}static fromURL(u,h,p=null){var m=C.createImageElement();m.onload=function(){var I=new wr({image:m});h(I)},m.onerror=p,m.crossOrigin="Anonymous",m.src=u}}wr.prototype.className="Image",v(wr),N.addGetterSetter(wr,"image"),N.addComponentsGetterSetter(wr,"crop",["x","y","width","height"]),N.addGetterSetter(wr,"cropX",0,A()),N.addGetterSetter(wr,"cropY",0,A()),N.addGetterSetter(wr,"cropWidth",0,A()),N.addGetterSetter(wr,"cropHeight",0,A());class Wa extends de{_sceneFunc(u){u.beginPath(),u.arc(0,0,this.attrs.radius||0,0,2*Math.PI,!1),u.closePath(),u.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(u){this.radius()!==u/2&&this.radius(u/2)}setHeight(u){this.radius()!==u/2&&this.radius(u/2)}}Wa.prototype._centroid=!0,Wa.prototype.className="Circle",Wa.prototype._attrsAffectingSize=["radiu
3462s"],v(Wa),N.addGetterSetter(Wa,"radius",0,A());class xp extends de{_sceneFunc(u){var h=this.cornerRadius(),p=this.width(),m=this.height();if(u.beginPath(),h){let I=0,T=0,O=0,L=0;typeof h=="number"?I=T=O=L=Math.min(h,p/2,m/2):(I=Math.min(h[0]||0,p/2,m/2),T=Math.min(h[1]||0,p/2,m/2),L=Math.min(h[2]||0,p/2,m/2),O=Math.min(h[3]||0,p/2,m/2)),u.moveTo(I,0),u.lineTo(p-T,0),u.arc(p-T,T,T,3*Math.PI/2,0,!1),u.lineTo(p,m-L),u.arc(p-L,m-L,L,0,Math.PI/2,!1),u.lineTo(O,m),u.arc(O,m-O,O,Math.PI/2,Math.PI,!1),u.lineTo(0,I),u.arc(I,I,I,Math.PI,3*Math.PI/2,!1)}else u.rect(0,0,p,m);u.closePath(),u.fillStrokeShape(this)}}xp.prototype.className="Rect",v(xp),N.addGetterSetter(xp,"cornerRadius",0,function(S){if(g.isUnminified)return function(u,h){let p=C._isNumber(u),m=C._isArray(u)&&u.length==4;return p||m||C.warn(D(u)+' is a not valid value for "'+h+'" attribute. The value should be a number or Array<number>(4)'),u}}());class bn extends de{constructor(u){super(u),this.dataArray=[],this.pathLength=0,this.dataArray=bn.parsePathData(this.data()),this.pathLength=0;for(var h=0;h<this.dataArray.length;++h)this.pathLength+=this.dataArray[h].pathLength;this.on("dataChange.konva",function(){this.dataArray=bn.parsePathData(this.data()),this.pathLength=0;for(var p=0;p<this.dataArray.length;++p)this.pathLength+=this.dataArray[p].pathLength})}_sceneFunc(u){var h=this.dataArray;u.beginPath();for(var p=!1,m=0;m<h.length;m++){var I=h[m].command,T=h[m].points;switch(I){case"L":u.lineTo(T[0],T[1]);break;case"M":u.moveTo(T[0],T[1]);break;case"C":u.bezierCurveTo(T[0],T[1],T[2],T[3],T[4],T[5]);break;case"Q":u.quadraticCurveTo(T[0],T[1],T[2],T[3]);break;case"A":var O=T[0],L=T[1],F=T[2],H=T[3],Y=T[4],ie=T[5],ae=T[6],Q=T[7],ge=F>H?F:H,it=F>H?1:F/H,Ut=F>H?H/F:1;u.translate(O,L),u.rotate(ae),u.scale(it,Ut),u.arc(0,0,ge,Y,Y+ie,1-Q),u.scale(1/it,1/Ut),u.rotate(-ae),u.translate(-O,-L);break;case"z":p=!0,u.closePath()}}p||this.hasFill()?u.fillStrokeShape(this):u.strokeShape(this)}getSelfRect(){var u=[];this.dataArray.forEach(function(F){if(F.command==="A"){var H=F.points[4],Y=F.points[5],ie=F.points[4]+Y,ae=Math.PI/180;if(Math.abs(H-ie)<ae&&(ae=Math.abs(H-ie)),Y<0)for(let Q=H-ae;Q>ie;Q-=ae){const ge=bn.getPointOnEllipticalArc(F.points[0],F.points[1],F.points[2],F.points[3],Q,0);u.push(ge.x,ge.y)}else for(let Q=H+ae;Q<ie;Q+=ae){const ge=bn.getPointOnEllipticalArc(F.points[0],F.points[1],F.points[2],F.points[3],Q,0);u.push(ge.x,ge.y)}}else if(F.command==="C")for(let Q=0;Q<=1;Q+=.01){const ge=bn.getPointOnCubicBezier(Q,F.start.x,F.start.y,F.points[0],F.points[1],F.points[2],F.points[3],F.points[4],F.points[5]);u.push(ge.x,ge.y)}else u=u.concat(F.points)});for(var h,p,m=u[0],I=u[0],T=u[1],O=u[1],L=0;L<u.length/2;L++)h=u[2*L],p=u[2*L+1],isNaN(h)||(m=Math.min(m,h),I=Math.max(I,h)),isNaN(p)||(T=Math.min(T,p),O=Math.max(O,p));return{x:m,y:T,width:I-m,height:O-T}}getLength(){return this.pathLength}getPointAtLength(u){var h,p=0,m=this.dataArray.length;if(!m)return null;for(;p<m&&u>this.dataArray[p].pathLength;)u-=this.dataArray[p].pathLength,++p;if(p===m)return{x:(h=this.dataArray[p-1].points.slice(-2))[0],y:h[1]};if(u<.01)return{x:(h=this.dataArray[p].points.slice(0,2))[0],y:h[1]};var I=this.dataArray[p],T=I.points;switch(I.command){case"L":return bn.getPointOnLine(u,I.start.x,I.start.y,T[0],T[1]);case"C":return bn.getPointOnCubicBezier(u/I.pathLength,I.start.x,I.start.y,T[0],T[1],T[2],T[3],T[4],T[5]);case"Q":return bn.getPointOnQuadraticBezier(u/I.pathLength,I.start.x,I.start.y,T[0],T[1],T[2],T[3]);case"A":var O=T[0],L=T[1],F=T[2],H=T[3],Y=T[4],ie=T[5],ae=T[6];return Y+=ie*u/I.pathLength,bn.getPointOnEllipticalArc(O,L,F,H,Y,ae)}return null}static getLineLength(u,h,p,m){return Math.sqrt((p-u)*(p-u)+(m-h)*(m-h))}static getPointOnLine(u,h,p,m,I,T,O){T===void 0&&(T=h),O===void 0&&(O=p);var L=(I-p)/(m-h+1e-8),F=Math.sqrt(u*u/(1+L*L));m<h&&(F*=-1);var H,Y=L*F;if(m===h)H={x:T,y:O+Y};else if((O-p)/(T-h+1e-8)===L)H={x:T+F,y:O+Y};else{var ie,ae,Q=this.getLineLength(h,p,m,I),ge=(T-h)*(m-h)+(O-p)*(I-p);ie=h+(ge/=Q*Q)*(m-h),ae=p+ge*(I-p);var it=this.getLineLength(T,O,ie,ae),Ut=Math.sqrt(u*u-it*it);F=Math.sqrt(Ut*Ut/(1+L*L)),m<h&&(F*=-1),H={x:ie+F,y:ae+(Y=L*F)}}return H}static getPointOnCubicBezier(u,h,p,m,I,T,O,L,F){function H(Q){return Q*Q*Q}function Y(Q){return 3*Q*Q*(1-Q)}function ie(Q){return 3*Q*(1-Q)*(1-Q)}function ae(Q){return(1-Q)*(1-Q)*(1-Q)}return{x:L*H(u)+T*Y(u)+m*ie(u)+h*ae(u),y:F*H(u)+O*Y(u)+I*ie(u)+p*ae(u)}}static getPointOnQuadraticBezier(u,h,p,m,I,T,O){function L(Y){return Y*Y}function F(Y){return 2*Y*(1-Y)}function H(Y){return(1-Y)*(1-Y)}return{x:T*L(u)+m*F(u)+h*H(u),y:O*L(u)+I*F(u)+p*H(u)}}static getPointOnEllipticalArc(u,h,p,m,I,T){var O=Math.cos(T),L=Math.sin(T),F=
3462p*Math.cos(I),H=m*Math.sin(I);return{x:u+(F*O-H*L),y:h+(F*L+H*O)}}static parsePathData(u){if(!u)return[];var h=u,p=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];h=h.replace(new RegExp(" ","g"),",");for(var m=0;m<p.length;m++)h=h.replace(new RegExp(p[m],"g"),"|"+p[m]);var I,T=h.split("|"),O=[],L=[],F=0,H=0,Y=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;for(m=1;m<T.length;m++){var ie=T[m],ae=ie.charAt(0);for(ie=ie.slice(1),L.length=0;I=Y.exec(ie);)L.push(I[0]);for(var Q=[],ge=0,it=L.length;ge<it;ge++)if(L[ge]!=="00"){var Ut=parseFloat(L[ge]);isNaN(Ut)?Q.push(0):Q.push(Ut)}else Q.push(0,0);for(;Q.length>0&&!isNaN(Q[0]);){var xt,It,_t,Sr,Wr,fr,pr,an,Rt,Te,je=null,ze=[],ps=F,Rc=H;switch(ae){case"l":F+=Q.shift(),H+=Q.shift(),je="L",ze.push(F,H);break;case"L":F=Q.shift(),H=Q.shift(),ze.push(F,H);break;case"m":var Pc=Q.shift(),Ga=Q.shift();if(F+=Pc,H+=Ga,je="M",O.length>2&&O[O.length-1].command==="z"){for(var gs=O.length-2;gs>=0;gs--)if(O[gs].command==="M"){F=O[gs].points[0]+Pc,H=O[gs].points[1]+Ga;break}}ze.push(F,H),ae="l";break;case"M":F=Q.shift(),H=Q.shift(),je="M",ze.push(F,H),ae="L";break;case"h":F+=Q.shift(),je="L",ze.push(F,H);break;case"H":F=Q.shift(),je="L",ze.push(F,H);break;case"v":H+=Q.shift(),je="L",ze.push(F,H);break;case"V":H=Q.shift(),je="L",ze.push(F,H);break;case"C":ze.push(Q.shift(),Q.shift(),Q.shift(),Q.shift()),F=Q.shift(),H=Q.shift(),ze.push(F,H);break;case"c":ze.push(F+Q.shift(),H+Q.shift(),F+Q.shift(),H+Q.shift()),F+=Q.shift(),H+=Q.shift(),je="C",ze.push(F,H);break;case"S":It=F,_t=H,(xt=O[O.length-1]).command==="C"&&(It=F+(F-xt.points[2]),_t=H+(H-xt.points[3])),ze.push(It,_t,Q.shift(),Q.shift()),F=Q.shift(),H=Q.shift(),je="C",ze.push(F,H);break;case"s":It=F,_t=H,(xt=O[O.length-1]).command==="C"&&(It=F+(F-xt.points[2]),_t=H+(H-xt.points[3])),ze.push(It,_t,F+Q.shift(),H+Q.shift()),F+=Q.shift(),H+=Q.shift(),je="C",ze.push(F,H);break;case"Q":ze.push(Q.shift(),Q.shift()),F=Q.shift(),H=Q.shift(),ze.push(F,H);break;case"q":ze.push(F+Q.shift(),H+Q.shift()),F+=Q.shift(),H+=Q.shift(),je="Q",ze.push(F,H);break;case"T":It=F,_t=H,(xt=O[O.length-1]).command==="Q"&&(It=F+(F-xt.points[0]),_t=H+(H-xt.points[1])),F=Q.shift(),H=Q.shift(),je="Q",ze.push(It,_t,F,H);break;case"t":It=F,_t=H,(xt=O[O.length-1]).command==="Q"&&(It=F+(F-xt.points[0]),_t=H+(H-xt.points[1])),F+=Q.shift(),H+=Q.shift(),je="Q",ze.push(It,_t,F,H);break;case"A":Sr=Q.shift(),Wr=Q.shift(),fr=Q.shift(),pr=Q.shift(),an=Q.shift(),Rt=F,Te=H,F=Q.shift(),H=Q.shift(),je="A",ze=this.convertEndpointToCenterParameterization(Rt,Te,F,H,pr,an,Sr,Wr,fr);break;case"a":Sr=Q.shift(),Wr=Q.shift(),fr=Q.shift(),pr=Q.shift(),an=Q.shift(),Rt=F,Te=H,F+=Q.shift(),H+=Q.shift(),je="A",ze=this.convertEndpointToCenterParameterization(Rt,Te,F,H,pr,an,Sr,Wr,fr)}O.push({command:je||ae,points:ze,start:{x:ps,y:Rc},pathLength:this.calcLength(ps,Rc,je||ae,ze)})}ae!=="z"&&ae!=="Z"||O.push({command:"z",points:[],start:void 0,pathLength:0})}return O}static calcLength(u,h,p,m){var I,T,O,L,F=bn;switch(p){case"L":return F.getLineLength(u,h,m[0],m[1]);case"C":for(I=0,T=F.getPointOnCubicBezier(0,u,h,m[0],m[1],m[2],m[3],m[4],m[5]),L=.01;L<=1;L+=.01)O=F.getPointOnCubicBezier(L,u,h,m[0],m[1],m[2],m[3],m[4],m[5]),I+=F.getLineLength(T.x,T.y,O.x,O.y),T=O;return I;case"Q":for(I=0,T=F.getPointOnQuadraticBezier(0,u,h,m[0],m[1],m[2],m[3]),L=.01;L<=1;L+=.01)O=F.getPointOnQuadraticBezier(L,u,h,m[0],m[1],m[2],m[3]),I+=F.getLineLength(T.x,T.y,O.x,O.y),T=O;return I;case"A":I=0;var H=m[4],Y=m[5],ie=m[4]+Y,ae=Math.PI/180;if(Math.abs(H-ie)<ae&&(ae=Math.abs(H-ie)),T=F.getPointOnEllipticalArc(m[0],m[1],m[2],m[3],H,0),Y<0)for(L=H-ae;L>ie;L-=ae)O=F.getPointOnEllipticalArc(m[0],m[1],m[2],m[3],L,0),I+=F.getLineLength(T.x,T.y,O.x,O.y),T=O;else for(L=H+ae;L<ie;L+=ae)O=F.getPointOnEllipticalArc(m[0],m[1],m[2],m[3],L,0),I+=F.getLineLength(T.x,T.y,O.x,O.y),T=O;return O=F.getPointOnEllipticalArc(m[0],m[1],m[2],m[3],ie,0),I+F.getLineLength(T.x,T.y,O.x,O.y)}return 0}static convertEndpointToCenterParameterization(u,h,p,m,I,T,O,L,F){var H=F*(Math.PI/180),Y=Math.cos(H)*(u-p)/2+Math.sin(H)*(h-m)/2,ie=-1*Math.sin(H)*(u-p)/2+Math.cos(H)*(h-m)/2,ae=Y*Y/(O*O)+ie*ie/(L*L);ae>1&&(O*=Math.sqrt(ae),L*=Math.sqrt(ae));var Q=Math.sqrt((O*O*(L*L)-O*O*(ie*ie)-L*L*(Y*Y))/(O*O*(ie*ie)+L*L*(Y*Y)));I===T&&(Q*=-1),isNaN(Q)&&(Q=0);var ge=Q*O*ie/L,it=Q*-L*Y/O,Ut=(u+p)/2+Math.cos(H)*ge-Math.sin(H)*it,xt=(h+m)/2+Math.sin(H)*ge+Math.cos(H)*it,It=function(Rt){return Math.sqrt(Rt[0]*Rt[0]+Rt[1]*Rt[1])},_t=function(Rt,Te){return(Rt[0]*Te[0]+Rt[1]*Te[1])/(It(Rt)*It(Te))},Sr=function(Rt,Te){return(Rt[0]*Te[1]<Rt[1]*Te[0]?-1:1)*Math.acos(_t(Rt,Te))},Wr=Sr([1,0],[(Y-ge)/O,(ie-it)/L]),fr=[(Y-ge)/O,(ie-it)/L],pr=[(-1*Y-ge)/O,(-1*ie-it)/L],an=Sr(fr,pr);return _t(fr,pr)<=-1&&(an=Math.PI),_t(fr,pr)>=1&&(an=0),T===0&&an>0&&(an-=2*Math.PI),T===1&&an<0&&(an+=2*Math.PI),[Ut,xt,O,L,Wr,an,H,T]}}function Z1(S){return(Z1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(S)}function eb(S,u){var h=Object.keys(S);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(S);u&&(p=p.filter(function(m){return Object.getOwnPropertyDescriptor(S,m).enumerable})),h.push.apply(h,p)}return h}function Ic(S){for(var u=1;u<arguments.length;u++){var h=arguments[u]!=null?arguments[u]:{};
3462u%2?eb(Object(h),!0).forEach(function(p){nb(S,p,h[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(S,Object.getOwnPropertyDescriptors(h)):eb(Object(h)).forEach(function(p){Object.defineProperty(S,p,Object.getOwnPropertyDescriptor(h,p))})}return S}function NP(S,u){for(var h=0;h<u.length;h++){var p=u[h];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(S,p.key,p)}}function tb(S,u){return(tb=Object.setPrototypeOf||function(h,p){return h.__proto__=p,h})(S,u)}function $P(S,u){return!u||Z1(u)!=="object"&&typeof u!="function"?_p(S):u}function _p(S){if(S===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S}function Ep(S){return(Ep=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)})(S)}function nb(S,u,h){return u in S?Object.defineProperty(S,u,{value:h,enumerable:!0,configurable:!0,writable:!0}):S[u]=h,S}bn.prototype.className="Path",bn.prototype._attrsAffectingSize=["data"],v(bn),N.addGetterSetter(bn,"data");var rb=function(S){(function(O,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(L&&L.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),L&&tb(O,L)})(T,S);var u,h,p,m,I=(p=T,m=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}(),function(){var O,L=Ep(p);if(m){var F=Ep(this).constructor;O=Reflect.construct(L,arguments,F)}else O=L.apply(this,arguments);return $P(this,O)});function T(O){var L;(function(Y,ie){if(!(Y instanceof ie))throw new TypeError("Cannot call a class as a function")})(this,T);var F=(L=I.call(this,O)).generateHash("avatar_container"),H=L.generateHash("avatar_loader");return L.onFileLoad=L.onFileLoad.bind(_p(L)),L.onCloseClick=L.onCloseClick.bind(_p(L)),L.state={imgWidth:0,imgHeight:0,scale:1,containerId:F,loaderId:H,lastMouseY:0,showLoader:!(L.props.src||L.props.img)},L}return u=T,(h=[{key:"generateHash",value:function(O){var L=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return O+"-"+L()+"-"+L()+"-"+L()}},{key:"onCloseCallback",value:function(){this.props.onClose()}},{key:"onCropCallback",value:function(O){this.props.onCrop(O)}},{key:"onFileLoadCallback",value:function(O){this.props.onFileLoad(O)}},{key:"onBeforeFileLoadCallback",value:function(O){this.props.onBeforeFileLoad(O)}},{key:"onImageLoadCallback",value:function(O){this.props.onImageLoad(O)}},{key:"componentDidMount",value:function(){var O=this;if(!this.state.showLoader){var L=this.props.img||new Image;L.crossOrigin="Anonymous",!this.props.img&&this.props.src&&(L.src=this.props.src),this.setState({image:L},function(){if(O.image.complete)return O.init();O.image.onload=function(){O.onImageLoadCallback(O.image),O.init()}})}}},{key:"componentDidUpdate",value:function(O,L){O.src!==this.props.src&&(this.image.src=this.props.src)}},{key:"onFileLoad",value:function(O){if(O.preventDefault(),this.onBeforeFileLoadCallback(O),O.target.value){var L=O.target.files[0];this.onFileLoadCallback(L);var F=this;J1().getData(L,function(){var H=J1().getTag(this,"Orientation");MP()(L,function(Y,ie){F.setState({image:Y,file:L,showLoader:!1},function(){F.init()})},{orientation:H,meta:!0})})}}},{key:"onCloseClick",value:function(){var O=this;this.setState({showLoader:!0},function(){return O.onCloseCallback()})}},{key:"init",value:function(){var O,L,F=this.props,H=F.height,Y=F.minCropRadius,ie=F.cropRadius,ae=this.image.width,Q=this.image.height,ge=Q/ae,it=this.props,Ut=it.imageWidth,xt=it.imageHeight;xt&&Ut&&console.warn("The imageWidth and imageHeight properties can not be set together, using only imageWidth."),xt&&!Ut?L=(O=xt||Q)/ge:Ut?O=(L=Ut)*ge||Q:L=(O=H||Q)/ge;var It=O/Q,_t=Math.max(Y,ie||Math.min(L,O)/3);this.setState({imgWidth:L,imgHeight:O,scale:It,cropRadius:_t},this.initCanvas)}},{key:"initCanvas",value:function(){var O=this,L=this.initStage(),F=this.initBackgroun
3462d(),H=this.initShading(),Y=this.initCrop(),ie=this.initCropStroke(),ae=this.initResize(),Q=this.initResizeIcon(),ge=new Vr.Layer;ge.add(F),ge.add(H),ge.add(ie),ge.add(Y),ge.add(ae),ge.add(Q),L.add(ge);var it=function(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return Y.radius()-Te},Ut=function(Te){return Y.x()-it(Te)<0},xt=function(Te){return Y.y()-it(Te)<0},It=function(Te){return Y.x()+it(Te)>L.width()},_t=function(Te){return Y.y()+it(Te)>L.height()},Sr=function(Te){return it(Te)>=O.minCropRadius?Te:Y.radius()-O.minCropRadius},Wr=function(Te){return Te+.86*Y.radius()},fr=function(Te){return Te-.5*Y.radius()},pr=function(Te,je){ae.x(Wr(Te)-8),ae.y(fr(je)-8),Q.x(Wr(Te)-8),Q.y(fr(je)-10)},an=function(){if(O.props.exportAsSquare){var Te=new Vr.Image({image:O.image}),je=Te.width()/F.width(),ze=Te.height()/F.height(),ps=2*Y.radius()*je,Rc=2*Y.radius()*ze,Pc=O.props.exportSize?O.props.exportSize/ps:void 0;return Te.toDataURL({x:(Y.x()-Y.radius())*je,y:(Y.y()-Y.radius())*ze,width:ps,height:Rc,pixelRatio:Pc,mimeType:O.props.exportMimeType,quality:O.props.exportQuality})}var Ga=2*Y.radius(),gs=2*Y.radius(),FP=O.props.exportSize?O.props.exportSize/Ga:void 0;return Y.toDataURL({x:Y.x()-Y.radius(),y:Y.y()-Y.radius(),width:Ga,height:gs,pixelRatio:FP,mimeType:O.props.exportMimeType,quality:O.props.exportQuality})},Rt=function(Te){var je=Te>0||function(ze){return!(Ut(ze)||It(ze)||_t(ze)||xt(ze))}(Te)?Te:0;ie.radius(ie.radius()-Sr(je)),Y.radius(Y.radius()-Sr(je)),ae.fire("resize")};this.onCropCallback(an()),Y.on("dragmove",function(){return Y.fire("resize")}),Y.on("dragend",function(){return O.onCropCallback(an())}),Y.on("resize",function(){var Te=Ut()?Y.radius()+1:It()?L.width()-Y.radius()-1:Y.x(),je=xt()?Y.radius()+1:_t()?L.height()-Y.radius()-1:Y.y();pr(Te,je),Y.setFillPatternOffset({x:Te/O.scale,y:je/O.scale}),Y.x(Te),ie.x(Te),Y.y(je),ie.y(je)}),Y.on("mouseenter",function(){return L.container().style.cursor="move"}),Y.on("mouseleave",function(){return L.container().style.cursor="default"}),Y.on("dragstart",function(){return L.container().style.cursor="move"}),Y.on("dragend",function(){return L.container().style.cursor="default"}),ae.on("touchstart",function(Te){ae.on("dragmove",function(je){if(je.evt.type==="touchmove"){var ze=je.evt.changedTouches[0].pageY-Te.evt.changedTouches[0].pageY||0;Rt(ze*O.mobileScaleSpeed)}})}),ae.on("dragmove",function(Te){if(Te.evt.type!=="touchmove"){var je=Te.evt.y,ze=je?je-O.state.lastMouseY:void 0,ps=Te.evt.movementY||ze||0;O.setState({lastMouseY:je}),Rt(ps)}}),ae.on("dragend",function(){return O.onCropCallback(an())}),ae.on("resize",function(){return pr(Y.x(),Y.y())}),ae.on("mouseenter",function(){return L.container().style.cursor="nesw-resize"}),ae.on("mouseleave",function(){return L.container().style.cursor="default"}),ae.on("dragstart",function(Te){O.setState({lastMouseY:Te.evt.y}),L.container().style.cursor="nesw-resize"}),ae.on("dragend",function(){return L.container().style.cursor="default"})}},{key:"initStage",value:function(){return new Vr.Stage({container:this.containerId,width:this.width,height:this.height})}}
3462,{key:"initBackground",value:function(){return new Vr.Image({x:0,y:0,width:this.width,height:this.height,image:this.image})}},{key:"initShading",value:function(){return new Vr.Rect({x:0,y:0,width:this.width,height:this.height,fill:this.shadingColor,strokeWidth:4,opacity:this.shadingOpacity})}},{key:"initCrop",value:function(){return new Vr.Circle({x:this.halfWidth,y:this.halfHeight,radius:this.cropRadius,fillPatternImage:this.image,fillPatternOffset:{x:this.halfWidth/this.scale,y:this.halfHeight/this.scale},fillPatternScale:{x:this.scale,y:this.scale},opacity:1,draggable:!0,dashEnabled:!0,dash:[10,5]})}},{key:"initCropStroke",value:function(){return new Vr.Circle({x:this.halfWidth,y:this.halfHeight,radius:this.cropRadius,stroke:this.cropColor,strokeWidth:this.lineWidth,strokeScaleEnabled:!0,dashEnabled:!0,dash:[10,5]})}},{key:"initResize",value:function(){return new Vr.Rect({x:this.halfWidth+.86*this.cropRadius-8,y:this.halfHeight+-.5*this.cropRadius-8,width:16,height:16,draggable:!0,dragBoundFunc:function(O){return{x:this.getAbsolutePosition().x,y:O.y}}})}},{key:"initResizeIcon",value:function(){return new Vr.Path({x:this.halfWidth+.86*this.cropRadius-8,y:this.halfHeight+-.5*this.cropRadius-10,data:"M47.624,0.124l12.021,9.73L44.5,24.5l10,10l14.661-15.161l9.963,12.285v-31.5H47.624z M24.5,44.5 L9.847,59.653L0,47.5V79h31.5l-12.153-9.847L34.5,54.5L24.5,44.5z",fill:this.cropColor,scale:{x:.2,y:.2}})}},{key:"render",value:function(){var O=this,L=this.props,F=L.width,H=L.height,Y={display:"flex",justifyContent:"center",backgroundColor:this.backgroundColor,width:F||this.width,position:"relative"},ie=this.props.label,ae=Ic(Ic({},this.props.labelStyle),{lineHeight:(H||200)+"px"}),Q=Ic(Ic({},this.props.borderStyle),{width:F||200,height:H||200});return c().createElement("div",null,this.state.showLoader?c().createElement("div",{style:Q},c().createElement("input",{onChange:function(ge){return O.onFileLoad(ge)},name:this.loaderId,type:"file",id:this.loaderId,style:{width:.1,height:.1,opacity:0,overflow:"hidden",position:"absolute",zIndex:-1},accept:this.mimeTypes}),c().createElement("label",{htmlFor:this.loaderId,style:ae},ie)):c().createElement("div",{style:Y},c().createElement("svg",{onClick:this.onCloseClick,style:{position:"absolute",zIndex:999,cursor:"pointer",left:"10px",top:"10px"},viewBox:"0 0 475.2 475.2",width:"20px",height:"20px"},c().createElement("g",null,c().createElement("path",{d:"M405.6,69.6C360.7,24.7,301.1,0,237.6,0s-123.1,24.7-168,69.6S0,174.1,0,237.6s24.7,123.1,69.6,168s104.5,69.6,168,69.6 s123.1-24.7,168-69.6s69.6-104.5,69.6-168S450.5,114.5,405.6,69.6z M386.5,386.5c-39.8,39.8-92.7,61.7-148.9,61.7 s-109.1-21.9-148.9-61.7c-82.1-82.1-82.1-215.7,0-297.8C128.5,48.9,181.4,27,237.6,27s109.1,21.9,148.9,61.7 C468.6,170.8,468.6,304.4,386.5,386.5z",fill:this.closeIconColor}),c().createElement("path",{d:"M342.3,132.9c-5.3-5.3-13.8-5.3-19.1,0l-85.6,85.6L152,132.9c-5.3-5.3-13.8-5.3-19.1,0c-5.3,5.3-5.3,13.8,0,19.1 l85.6,85.6l-85.6,85.6c-5.3,5.3-5.3,13.8,0,19.1c2.6,2.6,6.1,4,9.5,4s6.9-1.3,9.5-4l85.6-85.6l85.6,85.6c2.6,2.6,6.1,4,9.5,4 c3.5,0,6.9-1.3,9.5-4c5.3-5.3,5.3-13.8,0-19.1l-85.4-85.6l85.6-85.6C347.6,146.7,347.6,138.2,342.3,132.9z",fill:this.closeIconColor}))),c().createElement("div",{id:this.containerId})))}},{key:"lineWidth",get:function(){return this.props.lineWidth}},{key:"containerId",get:function(){return this.state.containerId}},{key:"closeIconColor",get:function(){return this.props.closeIconColor}},{key:"cropColor",get:function(){return this.props.cropColor}},{key:"loaderId",get:function(){return this.state.loaderId}},{key:"mimeTypes",get:function(){return this.props.mimeTypes}},{key:"backgroundColor",get:function(){return this.props.backgroundColor}},{key:"shadingColor",get:function(){return this.props.shadingColor}},{key:"shadingOpacity",get:function(){return this.props.shadingOpacity}},{key:"mobileScaleSpeed",get:function(){return this.props.mobileScaleSpeed}},{key:"cropRadius",get:function(){return this.state.cropRadius}},{key:"minCropRadius",get:function(){return this.props.minCropRadius}},{key:"scale",get:function(){return this.state.scale}},{key:"width",get:function(){return this.state.imgWidth}},{key:"halfWidth",get:function(){return this.state.imgWidth/2}},{key:"height",get:function(){return this.state.imgHeight}},{key:"halfHeight",get:function(){return this.state.imgHeight/2}},{key:"image",get:function(){return this.state.image}}])&&NP(u.prototype,h),T}(c().Component);
3462nb(rb,"defaultProps",{shadingColor:"grey",shadingOpacity:.6,cropColor:"white",closeIconColor:"white",lineWidth:4,minCropRadius:30,backgroundColor:"grey",mimeTypes:"image/jpeg,image/png",exportAsSquare:!1,exportSize:void 0,exportMimeType:"image/png",exportQuality:1,mobileScaleSpeed:.5,onClose:function(){},onCrop:function(){},onFileLoad:function(){},onImageLoad:function(){},onBeforeFileLoad:function(){},label:"Choose a file",labelStyle:{fontSize:"1.25em",fontWeight:"700",color:"black",display:"inline-block",fontFamily:"sans-serif",cursor:"pointer"},borderStyle:{border:"2px solid #979797",borderStyle:"dashed",borderRadius:"8px",textAlign:"center"}});const LP=rb})(),a})()})})(aY);const lY=$y(Ny),EP=()=>{const[t,e]=P.useState(null),[r,i]=P.useState(!1);return{message:t,setMessage:e,openAlert:r,setOpenAlert:i}},uY=()=>{const t=Ku(),{message:e,setMessage:r}=EP(),{user:i}=ci(),s=lr(),[o,a]=P.useState(),[l,c]=P.useState(),[d,f]=P.useState("/user-placeholder.png"),[g,v]=P.useState("/user-placeholder.png"),[_,w]=P.useState(!1);i&&i.photoURL&&kR(fy(py,i.photoURL)).then(x=>{v(x)}).catch(()=>{}),P.useEffect(()=>{e&&a(!0)},[e]);const k=async(x,R,E)=>fetch(x).then(C=>C.arrayBuffer()).then(C=>new File([C],R,{type:E})),y=()=>{d&&k(d,"image.jpg","image/jpeg").then(x=>{Sj(fy(py,`/avatars/${i.uid}.jpg`),x)}),jm(i,{photoURL:d&&`avatars/${i.uid}.jpg`}).then(()=>{r(["Profile picture updated successfully.","success"])})},b=x=>{x.preventDefault(),c(!0);const R=new FormData(x.currentTarget),E=R.get("displayName"),C=R.get("email");if(!E||!C){r(["Please fill out all required fields.","error"]),c(!1);return}jm(i,{displayName:E}).then(()=>{r(["Profile updated successfully.","success"]),i.email!==C&&Y5(i,C).then(async()=>{await f0(i),c(!1),t("/dashboard")}).catch(D=>{D.message.includes("auth/requires-recent-login")?r(["Please logout and login again before updating your email address.","error"]):r([D.message,"error"]),c(!1)}),c(!1)}).catch(D=>{r([D.message,"error"]),c(!1)})};return be(Rd,{children:[$(ns,{component:"main",maxWidth:"xs",sx:{minHeight:"calc(100vh - 130px)",display:"flex",justifyContent:"center",alignItems:"center",flexWrap:"wrap"},children:be(xn,{sx:{marginTop:8,display:"flex",flexDirection:"column",alignItems:"center"},children:[$(cn,{component:"h1",variant:"h1",children:"Update Profile"}),$(to,{color:"primary",component:"label",title:"Upload profile picture",onClick:()=>w(!0),children:$("img",{id:"avatar",alt:i.displayName,style:{bgcolor:s.palette.primary.main,width:80,height:80,borderRadius:80},src:g})}),be(xn,{component:"form",noValidate:!0,onSubmit:b,sx:{mt:3},children:[be(Yt,{container:!0,spacing:2,children:[$(Yt,{item:!0,xs:12,children:$(Mn,{name:"displayName",required:!0,fullWidth:!0,label:"Name",id:"displayName",disabled:!!l,defaultValue:i.displayName,InputLabelProps:{shrink:!0}})}),$(Yt,{item:!0,xs:12,children:$(Mn,{required:!0,fullWidth:!0,id:"email",label:"Email Address",name:"email",disabled:!!l,defaultValue:i.email,InputLabelProps:{shrink:!0}})})]}),$(en,{type:"submit",fullWidth:!0,variant:"contained",sx:{mt:2,mb:2},disabled:l,children:l?$($a,{size:24}):"Update"})]})]})}),e&&$(Fa,{message:e,setMessage:r,openAlert:o,setOpenAlert:a}),_&&be(zR,{onClose:()=>w(!1),open:_,children:[$(GR,{style:{borderBottom:"1px solid #eee"},children:"Crop your new profile picture"}),be(WR,{style:{display:"flex",alignItems:"center",flexDirection:"column"},children:[$("img",{src:d,alt:"Preview",width:80,height:80,style:{marginBottom:10}}),$(lY,{width:400,height:400,onCrop:x=>{f(x)},onClose:()=>{f(null)}})]}),be(VR,{children:[$(en,{autoFocus:!0,variant:"outlined",onClick:()=>{f(null),w(!1)},children:"Cancel"}),$(en,{variant:"contained",onClick:()=>{y(),w(!1)},children:"Save"})]})]})]})},cY=(t,e,r,i)=>{G5(t,e).then(s=>{i(s)}).catch(s=>{r(s.message)})},dY=(t,e,r,i)=>{let s=null;Vk(t,e).then(o=>(s=o.data.email,zk(t,e))).then(()=>{jk(t,s).then(()=>{i(`Your email was reverted to ${s}. Check your inbox to reset the password.`)}).catch(o=>{i(o.message)})}).catch(o=>{i("Invalid code")})},hY=async(t,e,r,i,s,o)=>(s(),o(),zk(t,e).then(()=>{o("Your email address has been verified.")}).catch(a=>{a.message.includes("auth/invalid-action-code")?s("This link has expired."):s(a.message)})),fY=()=>{const{user:t}=ci(),e=Ku(),{login:r}=fp(),{message:i,setMessage:s,openAlert:o,setOpenAlert:a}=EP(),l=new URLSearchParams(window.location.search),c=l.get("mode"),d=l.get("oobCode"),f=l.get("continueUrl"),g=l.get("lang")||"en",[v,_]=P.useState(),[w,k]=P.useState(),[y,b]=P.useState(),[x,R]=P.useState(!1);return P.useEffect(()=>{switch(c){case"resetPassword":cY(Zr,d,k,b);break;
3462case"recoverEmail":dY(Zr,d,g,k);break;case"verifyEmail":hY(Zr,d,f,g,k,_);break}},[c,d,f,g,k,_]),P.useEffect(()=>{i&&a(!0)},[i,a]),be(ns,{component:"main",maxWidth:"xs",sx:{minHeight:"calc(100vh - 130px)",display:"flex",justifyContent:"center",alignItems:"center",flexWrap:"wrap"},children:[!v&&!w&&!y?$(iP,{}):!v&&!w&&y?be(xn,{sx:{marginTop:8,display:"flex",flexDirection:"column",alignItems:"center"},children:[$(cn,{component:"h1",variant:"h5",children:"Update Password"}),be(xn,{component:"form",onSubmit:C=>{C.preventDefault();const D=new FormData(C.currentTarget);if(!D.get("password")||!D.get("confirm-password")){s(["Please fill out all required fields.","error"]);return}if(D.get("password")!==D.get("confirm-password")){s(["Passwords don't match.","error"]);return}R(!0),W5(Zr,d,D.get("password")).then(()=>{R(!1),_("Your password has been updated."),r(y,D.get("password"))}).catch(A=>{R(!1),k(A.message)})},noValidate:!0,sx:{mt:1},children:[$(Mn,{margin:"normal",required:!0,fullWidth:!0,name:"password",label:"Password",type:"password",id:"password"}),$(Mn,{margin:"normal",required:!0,fullWidth:!0,name:"confirm-password",label:"Confirm Password",type:"password",id:"confirm-password"}),$(en,{type:"submit",fullWidth:!0,variant:"contained",sx:{mt:2,mb:2},disabled:x,children:x?$($a,{size:34}):"Update Password"})]})]}):be(BR,{variant:"outlined",sx:{minWidth:{xs:"100%",md:"30%"}},children:[$("h2",{children:"User Account"}),$(cn,{children:v||w.replace("Firebase: ","")}),v&&$("div",{children:$(en,{variant:"contained",onClick:async()=>{t&&await t.reload(),e("/dashboard")},children:"Go to the Dashboard"})})]}),i&&$(Fa,{message:i,setMessage:s,openAlert:o,setOpenAlert:a})]})};var U1={},pY=ts;Object.defineProperty(U1,"__esModule",{value:!0});var kP=U1.default=void 0,gY=pY(Oa()),mY=Da,yY=(0,gY.default)((0,mY.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}),"Error");kP=U1.default=yY;const vY=()=>$(ns,{component:"main",maxWidth:"xs",sx:{minHeight:"calc(100vh - 130px)",display:"flex",justifyContent:"center",alignItems:"center",flexWrap:"wrap"},children:be(xn,{sx:{marginTop:0,display:"flex",flexDirection:"column",alignItems:"center"},children:[$(kP,{fontSize:"large",color:"primary",style:{marginBottom:25,transform:"scale(1.3)"}}),$(cn,{component:"h1",variant:"h5",children:"Page Not Found"})]})}),bY=()=>{const{authIsReady:t,user:e}=ci(),{setOpenLoading:r}=IR();return P.useEffect(()=>{t&&r(!1)},[t,r]),be(BN,{theme:tY,children:[$(M$,{}),be(YO,{children:[$(E7,{}),t?be(WO,{children:[$(Gr,{path:"/",element:e?$(ho,{to:"/dashboard"}):$(ho,{to:"/login"})}),$(Gr,{path:"/dashboard",element:e?$(nY,{}):$(ho,{to:"/login"})}),$(Gr,{path:"/sign-up",element:e?$(ho,{to:"/dashboard"}):$(sY,{})}),$(Gr,{path:"/login",element:e?$(ho,{to:"/dashboard"}):$(rY,{})}),$(Gr,{path:"/forgot-password",element:e?$(ho,{to:"/dashboard"}):$(oY,{})}),$(Gr,{path:"/profile",element:$(uY,{})}),$(Gr,{path:"/auth",element:$(fY,{})}),$(Gr,{path:"*",element:$(vY,{})})]}):$(iP,{})]})]})};wl.render($(yr.StrictMode,{children:$(Tj,{children:$(bY,{})})}),document.getElementById("root"));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.