3 lines
No EOL
1.1 MiB
3 lines
No EOL
1.1 MiB
/*! For license information please see bundle.js.LICENSE.txt */
|
||
(()=>{var e={9712:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(7294)),l=o(n(2043)),u=a(n(6010)),c=n(5828),d=a(n(2067)),h=a(n(6377)),f=a(n(573)),p=a(n(9875)),m=a(n(6735)),g=a(n(3636)),v=a(n(9643)),y=a(n(2972)),b=a(n(3240)),w=a(n(4968)),E=a(n(7183)),_=a(n(2865)),C=a(n(8884)),S=a(n(6500)),x=a(n(1890)),T=a(n(5432)),I=a(n(9969)),k=a(n(9069)),O=a(n(400)),P=n(4007),N=a(n(4259)),A=n(1802),D=o(n(2980)),R=n(6050),M=a(n(2974)),L=a(n(5827)),j=n(1802),F=a(n(2482)),W=a(n(2910)),B=o(n(5096)),z=a(n(3814)),U=n(4031),V=a(n(9834)),Z=c.makeStyles((e=>({appBarShift:{width:`calc(100% - ${A.DRAWER_WIDTH}px)`,marginLeft:A.DRAWER_WIDTH,transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})},container:{paddingLeft:"5px",paddingRight:"5px"},drawer:{width:A.DRAWER_WIDTH,flexShrink:0},drawerClose:{color:"white"},drawerPaper:{backgroundColor:P.PANEL_BACKGROUND_COLOR,width:A.DRAWER_WIDTH},drawerHeader:Object.assign(Object.assign({display:"flex",alignItems:"center",padding:e.spacing(0,1)},e.mixins.toolbar),{justifyContent:"flex-start"}),grow:{flexGrow:1},hide:{display:"none"},icons:{display:"flex"},listItem:{"&:hover":{backgroundColor:"white"}},menuButton:{marginRight:e.spacing(2)},tagTitle:{color:"white",marginLeft:"40%"}})));t.default=function(e){const t=Z(),n=P.globalStyles(),r=c.useTheme(),i=B.default.getDefaultSearchState(),o=e.appContext,a=o.getEventBus(),A=o.getCollectionStore(),[$,q]=s.useState(i),H=o.getMessagingService(),[K,G]=s.default.useState({accountDialog:!1,drawerOpen:!1,licenseDialog:!o.getSettingsStore().isLicenseAccepted(),loggedIn:!1,paymentDialog:!1,settingsDialog:!1,menuTags:A.getMenuTags()}),[Q,Y]=s.useState({messages:[]}),[X,J]=s.useState(!1),[ee,te]=s.default.useState(D.getNoErrorState()),[ne,re]=s.default.useState("");function ie(e){G(Object.assign(Object.assign({},K),{loggedIn:!0})),H.addListener(e.login,(e=>{Y({messages:e})}),(e=>{}))}function oe(e){const t=o.getSettingsStore().getLogin();H.deleteMessage(t,e),ue(!0)}function ae(){a.sendMessage({messageType:j.MessageType.HideDrawer}),G(Object.assign(Object.assign({},K),{drawerOpen:!1}))}function se(){G(Object.assign(Object.assign({},K),{paymentDialog:!1}))}function le(){G(Object.assign(Object.assign({},K),{loggedIn:!1})),H.removeListener(),Y({messages:[]})}function ue(e){const t=o.getSettingsStore().getLogin();H.getMessages(t).then((e=>{let t=e.error?[]:e.messages;Y({messages:t})})),J(e)}window.onerror=function(e,t,n,r,i){return te({column:r,error:!0,line:n,message:i.message,stackTrace:i.stack?i.stack:""}),!1},s.useEffect((()=>{function e(){const e=A.getMenuTags();0==A.getMenuTags().length&&K.drawerOpen?(G(Object.assign(Object.assign({},K),{settingsDialog:!1,menuTags:e})),ae()):G(Object.assign(Object.assign({},K),{menuTags:e}))}return a.addEventListener(j.MessageType.CollectionUpdate,e),a.addEventListener(j.MessageType.Login,ie),a.addEventListener(j.MessageType.Logout,le),()=>{a.removeEventListener(j.MessageType.CollectionUpdate,e),a.removeEventListener(j.MessageType.Login,ie),a.removeEventListener(j.MessageType.Logout,le)}}),[K]),l.setLevel(l.levels.INFO),l.debug("Application started"),$.search&&$.term.length;const ce={appContext:o,handleClose:function(){G(Object.assign(Object.assign({},K),{settingsDialog:!1}))},handleMenuTabTagChange:e=>{o.getSettingsStore().setMenuTabTags(e),o.getCollectionStore().buildTags()},handleResetLayout:()=>{o.getSettingsStore().setDefaultLayout()}};return s.default.createElement("div",{className:t.grow,id:"appBar"},s.default.createElement(h.default,{position:"sticky",className:u.default(n.appBarBgColor,{[t.appBarShift]:K.drawerOpen})},s.default.createElement(S.default,null,K.menuTags.length>0&&s.default.createElement(x.default,{color:"inherit","aria-label":"open drawer",onClick:function(){G(Object.assign(Object.assign({},K),{drawerOpen:!0})),setTimeout((()=>{a.sendMessage({messageType:j.MessageType.ShowDrawer})}),100)},edge:"start",className:t.menuButton},s.default.createElement(C.default,null)),s.default.createElement(W.default,{appContext:e.appContext,search:function(e){l.debug("Search "+e.term),a.sendMessage(new B.SearchMessage(e)),q(e)},term:$.term}),s.default.createElement("div",{className:t.grow}),s.default.createElement("div",{className:t.icons},s.default.createElement(k.default,{title:"Messages"},s.default.createElement(x.default,{color:"inherit",onClick:e=>{0==Q.messages.length?re("No messages"):J(!0),e.stopPropagation()}},s.default.createElement(f.default,{badgeContent:Q.messages.length,color:"primary"},s.default.createElement(_.default,null)))),s.default.createElement(k.default,{title:"Help"},s.default.createElement(x.default,{color:"inherit",onClick:t=>{e.appContext.getAccountService().getSystemSettings(!0).then((e=>{e.error||window.open(e.systemSettings.websiteURL+"/forgetmenot.html")})),t.stopPropagation()}},s.default.createElement(T.default,null))),s.default.createElement(k.default,{title:"Settings"},s.default.createElement(x.default,{color:"inherit",onClick:e=>{K.loggedIn&&G(Object.assign(Object.assign({},K),{settingsDialog:!0})),e.stopPropagation()}},s.default.createElement(I.default,null))),s.default.createElement(k.default,{title:"Account"},s.default.createElement(x.default,{color:"inherit",id:"accountButton",onClick:e=>{K.loggedIn&&G(Object.assign(Object.assign({},K),{accountDialog:!0})),e.stopPropagation()}},s.default.createElement(d.default,null))),s.default.createElement(k.default,{title:"Logout"},s.default.createElement(x.default,{color:"inherit",onClick:t=>{e.appContext.getEventBus().sendMessage({messageType:j.MessageType.Logout}),t.stopPropagation()}},s.default.createElement(y.default,null)))))),s.default.createElement(v.default,{className:t.drawer,variant:"persistent",anchor:"left",open:K.drawerOpen,classes:{paper:t.drawerPaper}},s.default.createElement("div",{className:u.default(n.appBarBgColor,t.drawerHeader)},s.default.createElement(O.default,{className:t.tagTitle,variant:"h6",noWrap:!0},"Tags"),s.default.createElement("div",{className:t.grow}),s.default.createElement(x.default,{onClick:ae},"ltr"===r.direction?s.default.createElement(p.default,{className:t.drawerClose}):s.default.createElement(m.default,null))),s.default.createElement(g.default,null),s.default.createElement(b.default,null,K.menuTags.map(((e,n)=>s.default.createElement(w.default,{className:t.listItem,button:!0,key:e.tag,onClick:t=>{!function(e){q(Object.assign(Object.assign({},$),{term:e.tag})),ae()}(e),t.stopPropagation()}},s.default.createElement(E.default,{primary:e.tag+" ("+e.count+")"})))))),ee.error&&s.default.createElement(D.default,Object.assign({},ee,{appContext:o,handleClose:()=>te(D.getNoErrorState())})),K.accountDialog&&s.default.createElement(N.default,{appContext:o,handleClose:function(){G(Object.assign(Object.assign({},K),{accountDialog:!1}))},handleUpgrade:function(){G(Object.assign(Object.assign({},K),{paymentDialog:!0,accountDialog:!1}))}}),K.settingsDialog&&s.default.createElement(z.default,Object.assign({},ce)),X&&s.default.createElement(L.default,{handleClose:function(){ue(!1)},handleDeleteMessage:oe,handleSaveMessage:function(e,t){o.getCollectionStore().restoreWindows([t]),oe(e)},messages:Q.messages}),K.paymentDialog&&s.default.createElement(F.default,Object.assign({},R.paymentProps,{appContext:o,handleCancel:se,handleClose:se})),""!=ne&&s.default.createElement(U.Toast,{duration:3e3,handleClose:function(){re("")},message:ne,open:!0,severity:"success",title:"Message"}),K.licenseDialog&&s.default.createElement(V.default,{appContext:o,handleAccept:function(){o.getSettingsStore().setLicenseAccepted(),G(Object.assign(Object.assign({},K),{licenseDialog:!1}))}}),!K.licenseDialog&&s.default.createElement(M.default,{appContext:o}))}},1802:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.SYSTEM_SETTINGS_COLLECTION_ID=t.SYSTEM_SETTINGS_COLLECTION=t.LIBRARY=t.FIREBASE_ERROR=t.COLLECTION_LIBRARY=t.COLLECTION_SUMMARY=t.CHROME_EXTENSION=t.ACCOUNTS_COLLECTION=t.MessageType=t.Screen=t.ONE_DAY_MS=t.DRAWER_WIDTH=t.SAVED=t.LIVE=void 0,t.LIVE="live",t.SAVED="saved",t.DRAWER_WIDTH=200,t.ONE_DAY_MS=864e5,(r=t.Screen||(t.Screen={})).Container="container",r.Header="header",(n=t.MessageType||(t.MessageType={})).CollectionUpdate="COLLECTION_UPDATE",n.HideDrawer="HIDE_DRAWER",n.ShowDrawer="SHOW_DRAWER",n.LiveWindowUpdate="WINDOW_UPDATE",n.Login="LOGIN",n.Logout="LOGOUT",n.ResetSearch="RESET_SEARCH",n.Resize="RESIZE",n.Search="SEARCH",t.ACCOUNTS_COLLECTION="Accounts",t.CHROME_EXTENSION="chrome-extension:",t.COLLECTION_SUMMARY="CollectionSummary",t.COLLECTION_LIBRARY="CollectionLibrary",t.FIREBASE_ERROR="Firebase fatal error: ",t.LIBRARY="Library",t.SYSTEM_SETTINGS_COLLECTION="SystemSettings",t.SYSTEM_SETTINGS_COLLECTION_ID="0"},1816:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(2043)),l=a(n(6729));class u{constructor(){this.eventEmitter=new l.default,u.instance=this,s.debug("EventBus started up ")}addEventListener(e,t,n){this.eventEmitter.addListener(e,t,n)}addEventListeners(e,t,n){for(var r=0;r<e.length;r++)this.eventEmitter.addListener(e[r],t,n)}removeEventListener(e,t){this.eventEmitter.removeListener(e,t)}sendEvent(e,t){this.eventEmitter.emit(e,t)}sendMessage(e){this.eventEmitter.emit(e.messageType,e)}static getInstance(){return null==u.instance&&(u.instance=new u),u.instance}}t.default=u},9544:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MESSAGING_COLLECTION=void 0,t.MESSAGING_COLLECTION="Messaging"},3286:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7212);class i{constructor(e){this.firestore=r.getFirestore(e.getApp()),e.isEmulated()&&r.useFirestoreEmulator(this.firestore,"localhost",8090)}getFirebaseFirestore(){return this.firestore}static getInstance(e){return null==i.instance&&(i.instance=new i(e)),i.instance}}t.default=i},4024:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FirebaseClientApplication=void 0;const r=n(5503);t.FirebaseClientApplication=class{constructor(e,t){this.app=r.initializeApp(e),this.emulated=t}getApp(){return this.app}isEmulated(){return this.emulated}}},8788:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FirebaseClientAuthenticationService=void 0;const r=n(3887),i=n(598);t.FirebaseClientAuthenticationService=class{constructor(e){this.auth=r.getAuth(e.getApp()),e.isEmulated()&&r.useAuthEmulator(this.auth,"http://localhost:9099")}isAlreadyRegistered(e){return new Promise(((t,n)=>{r.fetchSignInMethodsForEmail(this.auth,e).then((e=>{t(e.length>0)})).catch((e=>{n(new Error(e.message))}))}))}login(e,t,n){let o={email:e,error:!1,message:"",password:t,registered:!0,verified:!0};this.isAlreadyRegistered(e).then((a=>{a?r.signInWithEmailAndPassword(this.auth,e,t).then((e=>{o.verified=e.user.emailVerified,o.verified||(o.error=!0,o.message=i.EmailNotVerified),n(o)})).catch((e=>{o.error=!0,o.message=i.InvalidUser,n(o)})):(o.error=!0,o.message=i.NotRegistered,o.registered=!1,n(o))}))}register(e,t,n){let o={email:e,error:!1,message:"",password:t,registered:!0,verified:!0};this.isAlreadyRegistered(e).then((a=>{a?(o.error=!0,o.message=i.AlreadyRegistered,o.registered=!0,n(o)):r.createUserWithEmailAndPassword(this.auth,e,t).then((e=>{o.verified=e.user.emailVerified,n(o)})).catch((e=>{o.error=!0,o.message=e.message,n(o)}))}))}sendEmailVerification(e,t){let n=this.auth.currentUser,i={email:e,error:!1,message:"",password:"",registered:!0,verified:!0};null!=n?r.sendEmailVerification(n).then((()=>{t(i)})).catch((e=>{i.error=!0,i.message=e.message,t(i)})):(i.error=!0,i.message="Not logged in",t(i))}sendPasswordReset(e,t){let n={email:e,error:!1,message:"",password:"",registered:!0,verified:!0};r.sendPasswordResetEmail(this.auth,e).then((()=>{t(n)})).catch((e=>{n.error=!0,n.message=e.message,t(n)}))}signOut(e,t){let n={email:e,error:!1,message:"",password:"",registered:!0,verified:!0};r.signOut(this.auth).then((()=>{t(n)})).catch((e=>{n.error=!0,n.message=e.message,t(n)}))}updatePassword(e,t,n){let i=this.auth.currentUser,o={email:e,error:!1,message:"",password:t,registered:!0,verified:!0};null!=i?r.updatePassword(i,t).then((()=>{n(o)})).catch((e=>{o.error=!0,o.message=e.message,n(o)})):(o.error=!0,o.message="Not logged in",n(o))}}},3467:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(8788),o=r(n(2114)),a=r(n(5264)),s=r(n(3286));t.default=class{constructor(e){this.firebaseClientApplication=this.createFirebaseClientApplication(e),this.FirebaseClientFunctions=this.createFirebaseClientFunctions(),this.fireStore=this.createClientFirestore(),this.authenticationService=this.createAuthenticationService(),this.messagingService=this.createMessagingService()}getAuthenticationService(){return this.authenticationService}getFirebaseClientFunctions(){return this.FirebaseClientFunctions}getClientFirestore(){return this.fireStore}getMessagingService(){return this.messagingService}createAuthenticationService(){return new i.FirebaseClientAuthenticationService(this.firebaseClientApplication)}createClientFirestore(){return s.default.getInstance(this.firebaseClientApplication)}createFirebaseClientFunctions(){return new o.default(this.firebaseClientApplication)}createMessagingService(){return new a.default(this.firebaseClientApplication)}}},2114:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3495);t.default=class{constructor(e){this.functions=r.getFunctions(e.getApp()),e.isEmulated()&&r.useFunctionsEmulator(this.functions,"localhost",5001)}getFunctions(){return this.functions}}},5264:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_MESSAGES=void 0;const i=n(7212),o=r(n(3286)),a=n(9544),s=n(228);t.MAX_MESSAGES=10,t.default=class{constructor(e,n,r){this.firestore=o.default.getInstance(e).getFirebaseFirestore(),this.maxMessages=null==n?t.MAX_MESSAGES:n,this.collection=null==r?a.MESSAGING_COLLECTION:r,this.unsubscribes=[]}addListener(e,t,n){let r=e.getEmail();this.removeListener();const o=i.collection(this.firestore,this.collection),a=i.doc(o,r);let l=i.onSnapshot(a,(e=>{if(e.exists){const n=e.data();if(n&&n.messages&&n.messages.length>0){let e=[];n.messages.map((t=>{e.push(new s.Message(t))})),t(e)}}}));this.unsubscribes=[l]}deleteMessage(e,t){return new Promise((n=>{let r=e.getEmail();this.getMessageCollection(r).then((e=>{let o=e.messages.filter((e=>e.id!=t.getId()));const a=i.collection(this.firestore,this.collection),s=i.doc(a,r);i.setDoc(s,{messages:o}).then((()=>{n({error:!1,errorMessage:"",message:t})})).catch((e=>{n({error:!0,errorMessage:e.message,message:t})}))})).catch((e=>{n({error:!0,errorMessage:e.message,message:t})}))}))}getMessages(e){return new Promise((t=>{let n=e.getEmail();this.getMessageCollection(n).then((e=>{let n=e.messages,r=[];n.map((e=>{r.push(new s.Message(e))})),t({error:!1,errorMessage:"",messages:r})})).catch((e=>{t({error:!0,errorMessage:e.message,messages:[]})}))}))}removeListener(){this.unsubscribes.map((e=>{e()})),this.unsubscribes=[]}sendMessage(e){return new Promise((t=>{let n=e.getToEmail();this.getMessageCollection(n).then((r=>{let o=e.toProps(),a=r.messages;if(a.length>this.maxMessages){let n="Maximum number of unread messages is: "+this.maxMessages;t({error:!0,errorMessage:n,message:e})}else{const s=i.collection(this.firestore,this.collection),l=i.doc(s,n);a.push(o),i.setDoc(l,r).then((()=>{t({error:!1,errorMessage:"",message:e})})).catch((n=>{t({error:!0,errorMessage:n.message,message:e})}))}})).catch((n=>{t({error:!0,errorMessage:n.message,message:e})}))}))}setMaxMessages(e){this.maxMessages=e}getMessageCollection(e){return new Promise(((t,n)=>{const r=i.collection(this.firestore,this.collection),o=i.doc(r,e);i.getDoc(o).then((e=>{if(e.exists()){let n=e.data();t(n)}else t({messages:[]})})).catch((e=>{n(new Error(e.message))}))}))}}},8280:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Login=void 0;class n{constructor(e,t){this.email=e,this.password=t}getEmail(){return this.email}getPassword(){return this.password}toLoginProps(){return{email:this.email,password:this.password}}static create(e){return new n(e.email,e.password)}}t.Login=n},228:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=void 0,t.Message=class{constructor(e){this.body=e.body,this.from=e.from,this.id=e.id,this.text=e.text,this.to=e.to}getBody(){return this.body}getFromEmail(){return this.from}getId(){return this.id}getText(){return this.text}getToEmail(){return this.to}toProps(){return{body:this.body,from:this.from,id:this.id,text:this.text,to:this.to}}}},598:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotRegistered=t.InvalidUser=t.EmailNotVerified=t.AlreadyRegistered=void 0,t.AlreadyRegistered="Already Registered",t.EmailNotVerified="Email has not been verified;",t.InvalidUser="Invalid user or password",t.NotRegistered="User is not registered"},871:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.CheckoutStatus=t.PaymentStatus=void 0,(r=t.PaymentStatus||(t.PaymentStatus={}))[r.CANCELLED=0]="CANCELLED",r[r.FAILED=1]="FAILED",r[r.INCOMPLETE=2]="INCOMPLETE",r[r.SUCCEEDED=3]="SUCCEEDED",(n=t.CheckoutStatus||(t.CheckoutStatus={})).CANCELLED="cancelled",n.ERROR="error",n.PENDING="pending",n.SUCCEEDED="succeeded"},772:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatDate=t.formatCurrency=void 0,t.formatCurrency=function(e){return e>0?(e/100).toFixed(2):"0"},t.formatDate=function(e){return e.getDate()+"/"+(e.getMonth()+1)+"/"+e.getFullYear()}},3824:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const a=o(n(7593));t.default=function(){return a.v1()}},5479:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.AlertConfirmButtonId=t.AlertCancelButtonId=void 0;const i=r(n(7294)),o=r(n(3912)),a=r(n(2411)),s=r(n(6248)),l=r(n(814)),u=r(n(8101)),c=r(n(6222));t.AlertCancelButtonId="alertCancelButton",t.AlertConfirmButtonId="alertConfirmButton",t.default=function(e){let n=e.cancelTitle?e.cancelTitle:"Cancel",r=e.okTitle?e.okTitle:"OK";return i.default.createElement("div",null,i.default.createElement(a.default,{open:!0,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},i.default.createElement(c.default,{id:"alert-dialog-title"},e.title),i.default.createElement(l.default,null,i.default.createElement(u.default,{id:"alert-dialog-description"},e.text)),i.default.createElement(s.default,null,null!=e.handleCancel&&i.default.createElement(o.default,{id:t.AlertCancelButtonId,onClick:()=>{e.handleCancel()},color:"primary"},n),null!=e.handleConfirm&&i.default.createElement(o.default,{id:t.AlertConfirmButtonId,onClick:()=>{e.handleConfirm()},color:"primary",autoFocus:!0},r))))}},7849:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoginDialog=void 0;const s=o(n(7294)),l=a(n(4709)),u=a(n(3912)),c=a(n(2411)),d=a(n(6248)),h=a(n(814)),f=a(n(6222)),p=a(n(6366)),m=n(598);t.LoginDialog=function(e){const t=e.authService,[n,r]=s.useState(o()),i=s.useRef(null);function o(){const t=e.login;return{authError:e.loginError,email:t.getEmail(),emailError:!1,emailErrorMessage:"",password:t.getPassword(),passwordError:!1,passwordErrorMessage:"",verified:e.verified}}function a(){let e=n.email;return!(""==e||!i.current.checkValidity()||e.indexOf("+")>=0)||(r(Object.assign(Object.assign({},n),{emailError:!0,emailErrorMessage:"Invalid email"})),!1)}s.useEffect((()=>{r(o())}),[e.open,e.loginError]);let g=e.register?"Register":"Login";return s.default.createElement("div",null,e.open&&s.default.createElement(c.default,{fullWidth:!1,maxWidth:"md",open:e.open,"aria-labelledby":"save-dialog-title","aria-describedby":"save-dialog-description"},s.default.createElement(f.default,{id:"save-dialog-title"},g),s.default.createElement(h.default,{dividers:!0},s.default.createElement(p.default,{id:"email",autoFocus:!0,error:n.emailError,helperText:n.emailErrorMessage,inputRef:i,onChange:function(e){r(Object.assign(Object.assign({},n),{emailError:!1,emailErrorMessage:"",email:e.target.value}))},margin:"dense",label:"Enter email",type:"email",fullWidth:!0,variant:"outlined",value:n.email}),s.default.createElement(p.default,{id:"password",autoFocus:!0,error:n.passwordError,helperText:n.passwordErrorMessage,onChange:function(e){r(Object.assign(Object.assign({},n),{passwordError:!1,passwordErrorMessage:"",password:e.target.value}))},margin:"dense",label:"Enter password",type:"password",fullWidth:!0,variant:"outlined",value:n.password}),""!=n.authError&&s.default.createElement(l.default,{severity:"error"},n.authError)),s.default.createElement(d.default,null,!n.verified&&s.default.createElement(u.default,{id:"resendVerificationButton",color:"primary",onClick:()=>{t.sendEmailVerification(n.email,(t=>{t.error?r(Object.assign(Object.assign({},n),{authError:t.message})):e.handleResendEmailVerification(t)}))}},"Send Email Verification"),!e.register&&n.verified&&s.default.createElement(u.default,{id:"resetPasswordButton",color:"primary",onClick:()=>{!function(){if(a()){let i=n.email;t.sendPasswordReset(i,(t=>{t.error?r(Object.assign(Object.assign({},n),{authError:t.message})):e.handleResetPassword(t)}))}}()}},"Reset Password"),e.allowCancel&&n.verified&&s.default.createElement(u.default,{id:"cancelButton",color:"primary",onClick:()=>{e.handleCancel()}},"Cancel"),s.default.createElement(u.default,{id:"loginButton",color:"primary",autoFocus:!0,onClick:()=>{!function(){if(a()&&(""!=n.password||(r(Object.assign(Object.assign({},n),{passwordError:!0,passwordErrorMessage:"Invalid password"})),0))){let i=n.email,o=n.password;e.register?t.isAlreadyRegistered(i).then((t=>{if(t){let t={email:i,error:!0,message:m.AlreadyRegistered,password:o,registered:!0,verified:!0};e.handleRegistration(t)}else!function(t,i){e.authService.register(t,i,(t=>{t.error?r(Object.assign(Object.assign({},n),{authError:t.message})):function(t){let i=t.email;e.authService.sendEmailVerification(i,(i=>{i.error?r(Object.assign(Object.assign({},n),{authError:i.message})):e.handleRegistration(t)}))}(t)}))}(i,o)})):function(n,r){t.login(n,r,(t=>{t.error?e.handleLoginError(t):e.handleLogin(t)}))}(i,o)}}()}},g))))}},5882:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StripePaymentForm=void 0;const l=o(n(7294)),u=n(6664),c=n(6664),d=n(4465),h=n(5828),f=s(n(4709)),p=s(n(3912)),m=s(n(2411)),g=s(n(6248)),v=s(n(814)),y=s(n(6222)),b=s(n(5249)),w=s(n(202)),E=s(n(4023)),_=s(n(6366)),C=s(n(5479)),S=n(772),x=n(871),T=s(n(3824)),I=h.makeStyles((e=>({field:{width:150},formControl:{margin:e.spacing(1),minWidth:100}}))),k=e=>{var{component:t,inputRef:n}=e,r=a(e,["component","inputRef"]);const i=l.useRef(null);return l.useImperativeHandle(n,(()=>({focus:()=>i.current.focus}))),l.default.createElement(t,Object.assign({onReady:e=>i.current=e},r))};function O(e){const t=I(),n=u.useStripe(),r=u.useElements(),[i,o]=l.useState({disablePay:!1,errorMessage:"",name:"",nameError:""}),a=e.login.getEmail();return l.default.createElement("div",null,l.default.createElement(m.default,{open:!0,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},l.default.createElement(y.default,{id:"alert-dialog-title"},"Stripe Payment"),l.default.createElement(v.default,{dividers:!0,style:{minHeight:e.height,minWidth:e.width}},l.default.createElement(b.default,null,l.default.createElement(w.default,{variant:"outlined",className:t.formControl},l.default.createElement(_.default,{id:"total",className:t.field,disabled:!0,label:"Amount",value:S.formatCurrency(e.amount),variant:"outlined",InputProps:{startAdornment:l.default.createElement(E.default,{position:"start"},e.currencySymbol)}})),l.default.createElement(w.default,{variant:"outlined",className:t.formControl},l.default.createElement(_.default,{autoFocus:!0,disabled:!0,margin:"dense",id:"email",label:"Email",type:"text",fullWidth:!0,variant:"outlined",value:a})),l.default.createElement(w.default,{variant:"outlined",className:t.formControl},l.default.createElement(_.default,{autoFocus:!0,error:""!=i.nameError,helperText:i.nameError,id:"name",onChange:function(e){o(Object.assign(Object.assign({},i),{nameError:"",name:e.target.value}))},margin:"dense",label:"Name",type:"text",fullWidth:!0,variant:"outlined",value:i.name})),l.default.createElement(w.default,{variant:"outlined",className:t.formControl},l.default.createElement(_.default,{label:"Credit Card Number",variant:"outlined",fullWidth:!0,margin:"dense",InputProps:{inputComponent:k,inputProps:{component:u.CardElement,id:"stripeCard"}},InputLabelProps:{shrink:!0}})),""!=i.errorMessage&&l.default.createElement(f.default,{severity:"error"},i.errorMessage))),l.default.createElement(g.default,null,null!=e.handleCancel&&l.default.createElement(p.default,{id:"cancelButton",onClick:()=>{e.handleCancel()},color:"primary",autoFocus:!0},"Cancel"),l.default.createElement(p.default,{id:"stripePayButton",disabled:i.disablePay,onClick:t=>{!function(t){if(t.preventDefault(),!n)return void o(Object.assign(Object.assign({},i),{errorMessage:"Stripe not initialised"}));if(!r)return void o(Object.assign(Object.assign({},i),{errorMessage:"Stripe Elements not initialised"}));if(""==i.name)return o(Object.assign(Object.assign({},i),{nameError:"Missing name"})),!1;const s={type:"card",card:r.getElement(u.CardElement)};n.createPaymentMethod(s).then((t=>{if(t.error)o(Object.assign(Object.assign({},i),{disablePay:!1,errorMessage:t.error.message}));else{o(Object.assign(Object.assign({},i),{disablePay:!0}));const r={amount:e.amount,currency:e.currency,description:e.description,email:a,metadata:e.metadata,name:i.name,paymentKey:T.default(),paymentMethodId:t.paymentMethod.id};e.collectPayment(r,(t=>{switch(t.status){case x.PaymentStatus.CANCELLED:o(Object.assign(Object.assign({},i),{disablePay:!1,errorMessage:"Payment cancelled"}));break;case x.PaymentStatus.FAILED:o(Object.assign(Object.assign({},i),{disablePay:!1,errorMessage:t.errorMessage}));break;case x.PaymentStatus.INCOMPLETE:!function(t,r){const a=r.result;n.confirmCardPayment(a.client_secret).then((t=>{if(null!=t.error){const e=t.error.message||"Cannot confirm payment";o(Object.assign(Object.assign({},i),{disablePay:!1,errorMessage:e}))}else"succeeded"==t.paymentIntent.status&&e.completePayment(r,!0)})).catch((e=>{o(Object.assign(Object.assign({},i),{disablePay:!1,errorMessage:e.message}))}))}(0,t);break;case x.PaymentStatus.SUCCEEDED:e.completePayment(t,!0)}}))}}))}(t)},color:"primary",autoFocus:!0},"Pay"))))}t.StripePaymentForm=O;let P=null;t.default=function(e){const[t,n]=l.useState({loaded:null!=P,error:""});return t.loaded?l.default.createElement(c.Elements,{stripe:P},l.default.createElement(O,Object.assign({},e))):(""==t.error&&d.loadStripe(e.stripeKey).then((e=>{P=e,n(Object.assign(Object.assign({},t),{loaded:!0}))})).catch((e=>{n(Object.assign(Object.assign({},t),{error:"Cannot load Stripe: "+e.message}))})),l.default.createElement(l.default.Fragment,null,""!=t.error&&l.default.createElement(C.default,{title:"Fatal Error",text:t.error})))}},4031:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Toast=void 0;const s=o(n(7294)),l=a(n(4709)),u=a(n(7237)),c=a(n(366)),d=a(n(2411)),h=a(n(814)),f=a(n(6222)),p=a(n(1890));t.Toast=function(e){let t=null;function n(){null!=t&&(clearTimeout(t),t=null)}function r(){n(),e.handleClose()}s.useEffect((()=>{if(e.open)return t=setTimeout((()=>r()),e.duration),()=>{n()}}),[e.open]);let i=null==e.fullWidth||e.fullWidth,o=null!=e.maxWidth?e.maxWidth:"sm";return s.default.createElement("div",null,e.open&&s.default.createElement(d.default,{fullWidth:i,maxWidth:o,open:e.open,"aria-labelledby":"save-dialog-title","aria-describedby":"save-dialog-description"},s.default.createElement(f.default,{id:"save-dialog-title"},s.default.createElement(u.default,{display:"flex",alignItems:"center"},s.default.createElement(u.default,{flexGrow:1},e.title),s.default.createElement(u.default,null,s.default.createElement(p.default,{onClick:r},s.default.createElement(c.default,null))))),s.default.createElement(h.default,{dividers:!0},s.default.createElement(l.default,{severity:e.severity},e.message))))}},3743:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(1685)),o=r(n(1816)),a=r(n(9263)),s=n(4024),l=r(n(3467)),u=r(n(7742)),c=n(8554);class d extends l.default{constructor(e){if(null!=d.instance)throw Error("AppContext already instantiated");super(e),this.clipBoard=this.createClipBoard(),this.eventBus=this.createEventBus(),this.settingsStore=this.createSettingsStore(),this.collectionStore=this.createCollectionStore(this),this.accountService=this.createAccountService(),this.liveWindowStore=this.createLiveWindowStore(this),this.liveWindowStore.setCollectionStore(this.collectionStore),this.collectionStore.setLiveWindowStore(this.liveWindowStore),this.listener=this.createListener(this.liveWindowStore),this.createPersistence(this.settingsStore,(e=>{this.persistence=e}))}initialise(e){this.settingsStore.initialise((()=>{this.collectionStore.initialise((()=>{this.liveWindowStore.initialise((()=>{this.listener.initialise(),e()}))}))}))}getAccountService(){return this.accountService}getClipBoard(){return this.clipBoard}getEventBus(){return this.eventBus}getListener(){return this.listener}getLiveWindowStore(){return this.liveWindowStore}getCollectionStore(){return this.collectionStore}getPersistence(){return this.persistence}getSettingsStore(){return this.settingsStore}createAccountService(){return new a.default(this.firebaseClientApplication,this)}createClipBoard(){return new i.default}createEventBus(){return o.default.getInstance()}createFirebaseClientApplication(e){return new s.FirebaseClientApplication(c.getFirebaseOptions(),e)}createPersistence(e,t){this.accountService.getSystemSettings().then((e=>{t(new u.default(this.firebaseClientApplication,this))}))}}t.default=d},3099:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.context=t.appContext=void 0;const i=r(n(7294)),o=r(n(3743)),a=r(n(115)),s=r(n(6362)),l=r(n(5849)),u=r(n(6889));class c extends o.default{constructor(e){super(e)}createListener(e){return new l.default(e)}createLiveWindowStore(e){return new s.default(e)}createCollectionStore(e){return new a.default(e)}createSettingsStore(){return new u.default}static getInstance(){if(null==o.default.instance){const e=window.location.search.indexOf("emulator")>=0;o.default.instance=new c(e)}return o.default.instance}}t.default=c,t.appContext=c.getInstance(),t.context=i.default.createContext(t.appContext)},8554:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFirebaseOptions=void 0,t.getFirebaseOptions=function(){return{apiKey:"AIzaSyB09u1Ebi0MXevhXQ1l9n8w5ty54gtj3Zk",authDomain:"forgetmenot-b02c0.firebaseapp.com",projectId:"forgetmenot-b02c0",storageBucket:"forgetmenot-b02c0.appspot.com",messagingSenderId:"841951463409",appId:"1:841951463409:web:1381701e2bac1ff18fa650",measurementId:"G-0BVBPQ8LDW"}}},2143:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(7294)),o=r(n(3935)),a=r(n(9712)),s=r(n(6372)),l=n(3099);document.addEventListener("DOMContentLoaded",(function(){l.appContext.initialise((()=>{o.default.render(i.default.createElement(a.default,{appContext:l.appContext}),document.getElementById("header")),setTimeout((()=>{s.default(l.appContext,{initialised:()=>{},hideSearchBar:()=>{},showSearchBar:()=>{}})}),50)}))}))},4269:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(7294)),o=r(n(3195)),a=n(3099),s=r(n(7575)),l=r(n(9329));class u extends s.default{constructor(e){super(e)}render(){return i.default.createElement(o.default,{style:{paddingLeft:"0px",paddingRight:"0px"},maxWidth:!1},i.default.createElement(l.default,{appContext:a.appContext,searchState:this.searchState}))}}t.default=u},6372:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(7294)),o=r(n(3935)),a=r(n(4070)),s=r(n(4147)),l=r(n(4269)),u=n(1802),c=n(1802),d=r(n(1166)),h=n(6889),f=r(n(201));t.default=function(e,t){let n=e.getEventBus(),r=e.getSettingsStore(),p=r.getLayout(),m=p.content[0].content[0].height,g=p.content[0].content[1].height;window.React=i.default,window.ReactDOM=o.default;let v=new s.default(p,document.getElementById(u.Screen.Container));function y(){let e=v.root.contentItems[0];e.contentItems[0].config.height=0,e.contentItems[1].config.height=100,e.contentItems[0].element.hide(),v.updateSize()}v.registerComponent(h.LayoutComponent.CollectionContainer,l.default),v.registerComponent(h.LayoutComponent.WindowContainer,f.default),v.registerComponent(h.LayoutComponent.SearchContainer,d.default),a.default(window).resize((function(){v.updateSize()})),v.on("initialised",(()=>{y(),t.initialised(v)})),v.on("componentCreated",(e=>{e.element[0].id=e.config.component})),n.addEventListener(c.MessageType.HideDrawer,(()=>{let e=document.getElementById(u.Screen.Container);e.style.marginLeft="0px",e.style.width="100%",v.updateSize()})),n.addEventListener(c.MessageType.ShowDrawer,(()=>{let e=document.getElementById(u.Screen.Container);e.style.marginLeft=u.DRAWER_WIDTH+"px",e.style.width="calc(100% - "+u.DRAWER_WIDTH+"px)",v.updateSize()})),n.addEventListener(c.MessageType.ResetSearch,(()=>{y(),t.hideSearchBar(v)})),n.addEventListener(c.MessageType.Search,(e=>{let n=e.getSearchState();n.search&&n.term.length>0?(function(){let e=v.root.contentItems[0];0==m?e.contentItems[0].config.height=50:(e.contentItems[0].config.height=m,e.contentItems[1].config.height=g),e.contentItems[0].element.show(),v.updateSize()}(),t.showSearchBar(v)):0!=v.root.contentItems[0].contentItems[0].config.height&&y()})),v.init();let b=null;return v.on("stateChanged",(()=>{let e=v.toConfig();0!=e.content[0].content[0].height&&(m=e.content[0].content[0].height,g=e.content[0].content[1].height),r.saveLayout(e),null==b&&(b=setTimeout((()=>{n.sendMessage({messageType:c.MessageType.Resize}),b=null}),500))})),v}},7575:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(7294)),o=n(3099),a=n(1802),s=r(n(5096));class l extends i.default.Component{constructor(e){super(e),this.state=this.searchState=s.default.getDefaultSearchState()}componentDidMount(){o.appContext.getEventBus().addEventListener(a.MessageType.Search,this.listen,this)}componentWillUnmount(){o.appContext.getEventBus().removeEventListener(a.MessageType.Search,this.listen)}listen(e){this.searchState=e.getSearchState(),this.setState(this.searchState)}}t.default=l},1166:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(7294)),o=r(n(3195)),a=n(3099),s=r(n(7575)),l=r(n(7124));class u extends s.default{constructor(e){super(e)}render(){let e=this.searchState.search&&this.searchState.term.length>0;return i.default.createElement(o.default,{style:{paddingLeft:"0px",paddingRight:"0px"},maxWidth:!1},e&&i.default.createElement(l.default,{appContext:a.appContext,searchState:this.searchState}))}}t.default=u},201:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(7294)),o=r(n(3195)),a=n(3099),s=r(n(7575)),l=r(n(1259));class u extends s.default{constructor(e){super(e)}render(){return i.default.createElement(o.default,{style:{paddingLeft:"0px",paddingRight:"0px"},maxWidth:!1},i.default.createElement(l.default,{appContext:a.appContext,searchState:this.searchState}))}}t.default=u},5849:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const a=o(n(2043));t.default=class{constructor(e){this.liveWindowStore=e}initialise(){setTimeout((()=>{this.listen()}),500)}listen(){let e=chrome.windows.onBoundsChanged;null!=e&&e.addListener((e=>{a.debug("Window updated: "+e.id),this.liveWindowStore.handleWindowMoved(e)})),chrome.windows.onCreated.addListener((e=>{a.debug("Window created: "+e.id),this.liveWindowStore.handleWindowCreate(e)})),chrome.windows.onFocusChanged.addListener((e=>{a.debug("Window focus update"),this.liveWindowStore.handleWindowFocus(e)})),chrome.windows.onRemoved.addListener((e=>{a.debug("Window closed: "+e),this.liveWindowStore.handleWindowClose(e)})),chrome.tabs.onAttached.addListener(((e,t)=>{a.debug("Tab attached: "+e),this.liveWindowStore.handleTabAttached(e,t)})),chrome.tabs.onCreated.addListener((e=>{a.debug("Tab created: "+e.title),this.liveWindowStore.handleTabCreate(e)})),chrome.tabs.onRemoved.addListener(((e,t)=>{a.debug("Tab removed: "+e+" Window "+t.windowId+" closing: "+t.isWindowClosing),t.isWindowClosing||this.liveWindowStore.handleTabRemove(e,t.windowId)})),chrome.tabs.onUpdated.addListener(((e,t,n)=>{"complete"==t.status&&(this.liveWindowStore.handleTabChange(n),a.debug("Tab updated: "+e+" url: "+t.url))})),chrome.tabs.onMoved.addListener(((e,t)=>{this.liveWindowStore.handleTabMoved(e,t),a.debug("Tab moved: "+e+" window: "+t.windowId)}))}}},983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1802);t.default=class{constructor(e){this.messageType=r.MessageType.Login,this.login=e}}},1042:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Account=void 0,t.Account=class{constructor(e,t){this.login=e,this.admin=t.admin,this.backupPurchased=t.backupPurchased,this.enterprise=t.enterprise,this.lastLoginDate=new Date,this.paymentDueDate=t.paymentDueDate,this.registrationDate=t.registrationDate}getBackupPurchased(){return this.backupPurchased}getLastLoginDate(){return this.lastLoginDate}getLogin(){return this.login}getPaymentDueDate(){return this.paymentDueDate}getRegistrationDate(){return this.registrationDate}hasLoggedInToday(){const e=new Date,t=this.lastLoginDate;return t.getDate()==e.getDate()&&t.getMonth()==e.getMonth()&&t.getFullYear()==e.getFullYear()}hasEnterprise(){return this.enterprise}isAdmin(){return this.admin}isPaymentDue(){return(new Date).getTime()>=this.paymentDueDate.getTime()}setBackupPurchased(e){this.backupPurchased=e}toProps(){return{admin:this.admin,backupPurchased:this.backupPurchased,enterprise:this.enterprise,paymentDueDate:this.paymentDueDate,registrationDate:this.registrationDate}}updateLastLogin(){this.lastLoginDate=new Date}}},1955:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(5958));class o extends i.default{constructor(e,t,n,r,i,o,a){super(e,t,n,r,i,a),this.parent=o}getParent(){return this.parent}isLive(){return!0}setParent(e){this.parent=e}}t.default=o},5096:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchMessage=void 0;const r=n(1802);t.SearchMessage=class{constructor(e){this.messageType=r.MessageType.Search,this.searchState=e}getSearchState(){return this.searchState}};class i{constructor(e,t,n,r){this.term=e,this.liveWindowMap=t,this.collectionMap=n,this.tabs=r}getCollectionMap(){return this.collectionMap}getLiveWindowMap(){return this.liveWindowMap}getTabs(){return this.tabs}getTerm(){return this.term}static getDefault(){return new i("",{},{},[])}static getDefaultSearchState(){return{filter:!1,loading:!1,search:!1,term:"",result:i.getDefault()}}}t.default=i},8158:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TabFieldType=void 0;const i=r(n(3824));var o;!function(e){e.FavIconUrl="favIconUrl",e.Title="title",e.Url="url"}(o=t.TabFieldType||(t.TabFieldType={}));const a=[o.FavIconUrl,o.Title,o.Url];t.default=class{constructor(e,t,n,r,i,o){if(this.id=t,this.name=n,this.description=r,this.tags=o,e)this.chromeTab=i;else{let e={};a.map((t=>{null!=i[t]&&(e[t]=i[t])})),this.chromeTab=e}}getChromeTab(){return this.chromeTab}getDescription(){return this.description}getId(){return this.id}getName(){return this.name}getTags(){return this.tags}isChromeEqual(e){return this.chromeTab.url==e.url}isEqual(e){if(this.name!=e.name||this.description!=e.description)return!1;for(let t=0;t<a.length;t++){let n=a[t];if(this.chromeTab[n]!=e.chromeTab[n])return!1}return!0}setChromeTab(e){this.chromeTab=e}setDescription(e){this.description=e}setName(e){this.name=e}setTags(e){this.tags=e}static generateId(){return i.default()}static toTabProps(e){return{chromeTab:e.getChromeTab(),description:e.getDescription(),id:e.getId(),name:e.getName(),tags:e.getTags()}}}},5958:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WindowFieldType=void 0;const i=r(n(8158)),o=r(n(3824));var a;!function(e){e.Height="height",e.Left="left",e.Top="top",e.Width="width"}(a=t.WindowFieldType||(t.WindowFieldType={}));const s=[a.Height,a.Left,a.Top,a.Width];t.default=class{constructor(e,t,n,r,i,o){this.id=e,this.name=t,this.description=n,this.tabs=i,this.tags=o,this.isLive()?this.chromeWindow=r:this.setChromeWindow(r)}findTab(e){const t=e.getChromeTab();for(let e=0;e<this.tabs.length;e++){let n=this.tabs[e];if(n.isChromeEqual(t))return n}return null}findTabById(e){for(let t=0;t<this.tabs.length;t++){let n=this.tabs[t];if(n.getId()===e)return n}return null}findTabByUrl(e){for(let t=0;t<this.tabs.length;t++){let n=this.tabs[t];if(n.getChromeTab().url===e)return n}return null}getDescription(){return this.description}getId(){return this.id}getName(){return this.name}getParent(){return null}getTabs(){return this.tabs}getChromeWindow(){return this.chromeWindow}getTags(){return this.tags}hasPositionChanged(e){let t=!1,n=this.chromeWindow;return s.map((r=>{e[r]!=n[r]&&(t=!0)})),t}isLive(){return!1}setChromeWindow(e){let t={};s.map((n=>{t[n]=e[n]})),this.chromeWindow=t}setDescription(e){this.description=e}setName(e){this.name=e}setTabs(e){this.tabs=e}setTags(e){this.tags=e}updateChromeWindow(e){s.map((t=>{this.chromeWindow[t]=e[t]}))}static generateId(){return o.default()}static toWindowProps(e){let t=[];return e.getTabs().map((e=>{t.push(i.default.toTabProps(e))})),{chromeWindow:e.getChromeWindow(),description:e.getDescription(),id:e.getId(),name:e.getName(),tabs:t,tags:e.getTags()}}}},9263:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(7212),i=n(3495),o=n(1802),a=n(1042);t.default=class{constructor(e,t){this.firestore=t.getClientFirestore().getFirebaseFirestore(),this.appContext=t,this.messageService=t.getMessagingService()}collectPayment(e){return new Promise(((t,n)=>{i.httpsCallable(i.getFunctions(),"stripePay")(e).then((e=>{let n=e.data;t(n)})).catch((e=>{n(new Error(e.message))}))}))}completePayment(e){return new Promise(((t,n)=>{i.httpsCallable(i.getFunctions(),"stripeCompletePayment")(e).then((e=>{let n=e.data;t(n)})).catch((e=>{n(new Error(e.message))}))}))}findAccount(e){return new Promise((t=>{const n=r.collection(this.firestore,o.ACCOUNTS_COLLECTION),i=r.doc(n,e.getEmail());r.getDoc(i).then((n=>{if(n.exists()){let r=n.data(),i={admin:r.admin,backupPurchased:r.backupPurchased,enterprise:r.enterprise,paymentDueDate:new Date(1e3*r.paymentDueDate.seconds),registrationDate:new Date(1e3*r.registrationDate.seconds)},o=new a.Account(e,i);t({account:o,error:null})}else t({account:null,error:null})})).catch((e=>{t({account:null,error:e})}))}))}getAccount(e,t){return new Promise((n=>{this.getSystemSettings().then((r=>{null!=r.error?n({account:null,error:r.error}):t||null==this.account||this.account.getLogin().getEmail()!=e.getEmail()?this.findAccount(e).then((e=>{this.account=e.account,n({account:this.account,error:null})})).catch((e=>{n({account:null,error:e})})):n({account:this.account,error:null})}))}))}getAccountData(){return{account:this.account,systemSettings:this.systemSettings}}getSystemSettings(e){return null==this.systemSettings||e?new Promise(((e,t)=>{this.loadSystemSettings().then((t=>{this.systemSettings=t,this.messageService.setMaxMessages(t.maxMessages),e({systemSettings:t,error:null})})).catch((t=>{e({systemSettings:null,error:t})}))})):new Promise((e=>{e({systemSettings:this.systemSettings,error:null})}))}isPaymentDue(e){return!!e.isPaymentDue()&&(e.getBackupPurchased()>0||null==this.systemSettings||!this.systemSettings.annualSubscription||0!=this.systemSettings.annualSubscriptionPrice)}logout(){this.account=null}loadSystemSettings(){return new Promise(((e,t)=>{const n=r.collection(this.firestore,o.SYSTEM_SETTINGS_COLLECTION),i=r.doc(n,o.SYSTEM_SETTINGS_COLLECTION_ID);r.getDoc(i).then((n=>{if(n.exists()){let t=n.data();e(t)}else t(new Error(o.FIREBASE_ERROR+o.SYSTEM_SETTINGS_COLLECTION+" are missing"))})).catch((e=>{t(new Error(o.FIREBASE_ERROR+e.message))}))}))}}},6050:(e,t)=>{"use strict";function n(e,t){return e.collectPayment(t)}function r(e,t){return e.completePayment(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.paymentProps=t.completePayment=t.collectPayment=void 0,t.collectPayment=n,t.completePayment=r,t.paymentProps={collectPayment:n,completePayment:r}},1685:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{getTab(){return this.tab}saveTab(e){this.tab=e}}},115:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(2043)),l=n(3374),u=n(1802),c=a(n(8158)),d=a(n(5958)),h=a(n(1175));class f extends h.default{constructor(e){super(e),this.menuTags=[],this.tags=[],this.tagMap={},this.windowNameMap={},this.eventBus=e.getEventBus()}addTabAtPosition(e,t,n){e.getTabs().splice(n,0,new c.default(!1,c.default.generateId(),this.getTabName(t),t.getDescription(),t.getChromeTab(),t.getTags())),this.updateAndNotify()}addTabAtEnd(e,t){e.getTabs().push(new c.default(!1,c.default.generateId(),this.getTabName(t),t.getDescription(),t.getChromeTab(),t.getTags())),this.updateAndNotify()}buildTags(){this.createTags(this.getWindows()),this.updateAndNotify()}compareParentWindow(e){let t={},n=e.getParent(),r={changed:!1,changedPosition:!1,newTabs:[],deletedTabs:[]};return r.changedPosition=n.hasPositionChanged(e.getChromeWindow()),e.getTabs().map((e=>{let i=n.findTab(e);t[e.getChromeTab().url]=e,null==i&&(r.newTabs.push(e),r.changed=!0)})),n.getTabs().map((e=>{null==t[e.getChromeTab().url]&&(r.deletedTabs.push(e),r.changed=!0)})),r}compareWindows(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],i=this.findWindow(r);null!=i?t.push(this.compareWindow(i,r)):t.push(f.getNewWindowCompareResult(r))}return t}copyTab(e,t,n){let r=this.findWindowById(t);null!=r&&this.addTabAtPosition(r,e,n)}deleteAll(){this.getWindows().map((e=>{this.deleteWindow(e,!1)})),this.updateAndNotify()}deleteTab(e,t){let n=e.getTabs().filter((e=>e!=t));e.setTabs(n),this.updateAndNotify()}initialise(e){chrome.storage.local.get(u.SAVED,(t=>{if(null!=t[u.SAVED]){s.debug("CollectionState: "+JSON.stringify(t[u.SAVED]));let e=t[u.SAVED].windows,n=this.createWindows(e);this.createTags(n),this.addWindows(n),this.setWindowState(t[u.SAVED])}e()}))}findTag(e){let t=e.toUpperCase(),n=this.tags.filter((e=>e.tagUpper==t));return n.length>0?n[0]:null}findWindowByName(e){return this.windowNameMap[e]}findWindowsByName(e){let t=e.toLowerCase();return this.getWindows().filter((e=>e.getName().toLowerCase()==t))}getMenuTags(){return this.menuTags}getTags(){return this.tags}moveTab(e,t,n,r){let i=this.findWindowById(e),o=this.findWindowById(n);if(null!=i&&null!=o){let e=i.getTabs()[t];this.deleteTab(i,e),this.addTabAtPosition(o,e,r),this.updateAndNotify()}}removeWindow(e){this.deleteWindow(e,!0)}restoreWindows(e){this.createWindows(e).map((e=>{let t=this.findWindowById(e.getId());null!=t&&this.deleteWindow(t,!1),this.addWindow(e)})),this.createTags(this.getWindows()),this.updateAndNotify()}setLiveWindowStore(e){this.liveWindowStore=e}saveWindow(e,t,n,r){const i=r.getTabs(),o=this.findWindowsByName(e);if(this.updateTags(r.getTags(),n),r.setTags(n),0==o.length){let o=Object.assign(r),a=[];i.map((e=>{let t=Object.assign(e.getChromeTab());a.push(new c.default(!1,c.default.generateId(),this.getTabName(e),e.getDescription(),t,[]))}));let s=new d.default(d.default.generateId(),e,t,o.getChromeWindow(),a,n);return this.liveWindowStore.setParent(r,s),this.addWindow(s),this.createTags(this.getWindows()),this.updateAndNotify(),{duplicate:!1,window:s}}return{duplicate:!0,window:o[0]}}updateParentWindow(e){e.getParent().setChromeWindow(e.getChromeWindow())}updateTab(e,t,n,r){e.setName(t),e.setDescription(n),this.updateTags(e.getTags(),r),e.setTags(r),this.createTags(this.getWindows()),this.updateAndNotify()}updateWindow(e,t,n,r){let i=this.isWindowExpanded(e);t!=e.getName()&&(delete this.windowNameMap[e.getName()],this.windowNameMap[t]=e),e.setName(t),e.setDescription(n),this.updateTags(e.getTags(),r),e.setTags(r),this.setWindowExpanded(e,i),this.createTags(this.getWindows()),this.updateAndNotify(),this.eventBus.sendMessage({messageType:u.MessageType.LiveWindowUpdate})}static getNewWindowCompareResult(e){return{compareState:l.CompareWindowState.NewWindow,window:e,windowChanges:{changedPosition:!1,changedTabs:[],deletedTabs:[],deletedTags:[],descriptionChange:!1,nameChange:!1,newTabs:[],newTags:[],updatedTags:[]}}}addWindow(e){super.addWindow(e),this.windowNameMap[e.getName()]=e}addWindows(e){e.map((e=>{this.addWindow(e)}))}updateStorage(){let e={};this.clean();let t=this.getWindowState(),n=[];this.getWindows().map((e=>{let t=[];e.getTabs().map((e=>{t.push({id:e.getId(),name:e.getName(),description:e.getDescription(),chromeTab:e.getChromeTab(),tags:e.getTags()})})),n.push({id:e.getId(),name:e.getName(),description:e.getDescription(),chromeWindow:e.getChromeWindow(),tabs:t,tags:e.getTags()})})),t.windows=n,e[u.SAVED]=t,chrome.storage.local.set(e)}addTag(e){let t=e.toUpperCase(),n=e.toUpperCase().charAt(0),r=this.tagMap[n];if(null==r)this.tagMap[n]=[{tag:e,tagUpper:t,count:1}];else{for(let e=0;e<r.length;e++){let n=r[e];if(n.tagUpper==t)return void(n.count+=1)}r.push({tag:e,tagUpper:t,count:1})}}compareWindow(e,t){let n={changedPosition:!1,changedTabs:[],deletedTabs:[],deletedTags:[],descriptionChange:!1,nameChange:!1,newTabs:[],newTags:[],updatedTags:[]},r=this.findTagChanges(e.getTags(),t.tags),i=l.CompareWindowState.IdenticalWindow;e.hasPositionChanged(t.chromeWindow)&&(i=l.CompareWindowState.ChangedWindow,n.changedPosition=!0),e.getName()!=t.name&&(i=l.CompareWindowState.ChangedWindow,n.nameChange=!0),e.getDescription()!=t.description&&(i=l.CompareWindowState.ChangedWindow,n.descriptionChange=!0),r.deletedTags.length>0&&(i=l.CompareWindowState.ChangedWindow,n.deletedTags=r.deletedTags),r.newTags.length>0&&(i=l.CompareWindowState.ChangedWindow,n.newTags=r.newTags),r.updatedTags.length>0&&(i=l.CompareWindowState.ChangedWindow,n.updatedTags=r.updatedTags);let o={};return t.tabs.map((t=>{let r=t.chromeTab.url,a=e.findTabByUrl(r);if(o[r]=t,null==a)n.newTabs.push(t),i=l.CompareWindowState.ChangedWindow;else{let e=this.findTagChanges(a.getTags(),t.tags);a.isEqual(t)&&!this.hasTagChanges(e)||(n.changedTabs.push(Object.assign(Object.assign({},e),{tab:a})),i=l.CompareWindowState.ChangedWindow)}})),e.getTabs().map((e=>{let t=e.getChromeTab().url;null==o[t]&&(n.deletedTabs.push(e),i=l.CompareWindowState.ChangedWindow)})),{compareState:i,window:t,windowChanges:n}}createTags(e){let t={},n={},r=this.appContext.getSettingsStore().getMenuTabTags();e.map((e=>{e.getTags().map((e=>{this.saveTag(t,e),this.saveTag(n,e)})),e.getTabs().map((e=>{e.getTags().map((e=>{this.saveTag(t,e),r&&this.saveTag(n,e)}))}))})),this.sortTagMap(n),this.sortTagMap(t),this.tagMap=t,this.tags=this.sortTags(t),this.menuTags=this.sortTags(n)}createTagMap(e){let t={};return e.map((e=>{let n=e.toUpperCase();t[n]=e})),t}createWindows(e){let t=[];return e.map((e=>{let n=[];e.tabs.map((e=>{let t=null!=e.tags?e.tags:[],r=null==e.id?c.default.generateId():e.id;n.push(new c.default(!1,r,e.name,e.description,e.chromeTab,t))}));let r=null!=e.tags?e.tags:[];t.push(new d.default(e.id,e.name,e.description,e.chromeWindow,n,r))})),t}deleteTag(e){let t=e.toUpperCase(),n=e.toUpperCase().charAt(0),r=this.tagMap[n];if(null!=r)for(let e=0;e<r.length;e++){let i=r[e];if(i.tagUpper==t)return i.count-=1,void(i.count<=0&&(r.splice(e,1),this.tagMap[n]=r))}}deleteWindow(e,t){this.updateTags(e.getTags(),[]),e.getTabs().map((e=>{this.updateTags(e.getTags(),[])})),super.removeWindow(e),this.liveWindowStore.removeParent(e),this.createTags(this.getWindows()),null!=this.windowNameMap[e.getName()]&&delete this.windowNameMap[e.getName()],t&&this.updateAndNotify()}findTagChanges(e,t){let n=this.createTagMap(e),r=this.createTagMap(t),i=[],o=[],a=[];return e.map((e=>{let t=e.toUpperCase();null==r[t]&&i.push(e)})),t.map((e=>{let t=n[e.toUpperCase()];null==t?o.push(e):t!=e&&a.push(e)})),{deletedTags:i,newTags:o,updatedTags:a}}findWindow(e){let t=this.findWindowById(e.id);return null!=t?t:this.findWindowByName(e.name)}getTabName(e){if(""!=e.getName())return e.getName();let t=e.getChromeTab().title;return null==t?"":t}hasTagChanges(e){return e.deletedTags.length>0||e.newTags.length>0||e.updatedTags.length>0}saveTag(e,t){let n=t.toUpperCase(),r=n.charAt(0),i=e[r];if(null==i)e[r]=[{tag:t,tagUpper:n,count:1}];else{for(let e=0;e<i.length;e++){let t=i[e];if(t.tagUpper==n)return void(t.count+=1)}i.push({tag:t,tagUpper:n,count:1})}}sortTags(e){let t=[];return Object.keys(e).sort().map((n=>{let r=e[n];t.push(...r)})),t}sortTagMap(e){for(let t in e)e[t].sort(((e,t)=>e.tagUpper.localeCompare(t.tagUpper)))}updateTag(e){let t=this.findTag(e);null!=t&&(t.tag=e)}updateTags(e,t){let n=this.findTagChanges(e,t);n.deletedTags.map((e=>{this.deleteTag(e)})),n.newTags.map((e=>{this.addTag(e)})),n.updatedTags.map((e=>{this.updateTag(e)})),(n.deletedTags.length>0||n.newTags.length>0)&&(this.sortTagMap(this.tagMap),this.tags=this.sortTags(this.tagMap))}updateAndNotify(){this.updateStorage(),this.eventBus.sendMessage({messageType:u.MessageType.CollectionUpdate})}}t.default=f},7742:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(7212),o=n(1802),a=r(n(5958));t.default=class{constructor(e,t){this.maxBackupsPerDay=100,this.maxTabsPerCollection=20,this.firestore=t.getClientFirestore().getFirebaseFirestore(),this.appContext=t,this.appContext.getAccountService().getSystemSettings().then((e=>{const t=e.systemSettings;null!=t&&(this.maxBackupsPerDay=t.maxBackupsPerDay,this.maxTabsPerCollection=t.maxTabsPerCollection)}))}authorize(e,t){e()}deleteCollection(e,t,n){const r=this.appContext.getSettingsStore().getLogin(),a=this.getLibrary(r),s=i.doc(a,e);i.deleteDoc(s).then((()=>{this.getCollectionSummary(r).then((a=>{let s=a.collectionData.filter((t=>t.name!=e));const l=i.collection(this.firestore,o.COLLECTION_SUMMARY),u=i.doc(l,r.getEmail()),c={collectionData:s};i.setDoc(u,c).then((()=>t())).catch((e=>{n(o.FIREBASE_ERROR+e.message)}))})).catch((e=>{n(e.message)}))})).catch((e=>{n(e.message)}))}getCollections(e,t,n,r){let i=this.isCloudAccessExceeded();if(i.error)r(i.message);else{const t=this.appContext.getSettingsStore().getLogin(),i=[];e.map((e=>{i.push(this.getCollection(e,t))})),Promise.all(i).then((e=>{n(e)})).catch((e=>{r(e.message)}))}}getCollectionNames(e,t){let n=this.isCloudAccessExceeded();if(n.error)t(n.message);else{const n=this.appContext.getSettingsStore().getLogin();this.getCollectionSummary(n).then((t=>{let n=t.collectionData.map((e=>e.name)).sort((function(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}));e(n)})).catch((e=>{t(e.message)}))}}saveWindows(e,t,n){let r=this.isCloudAccessExceeded();r.error?n(r.message):this.isAllowanceExceeded().then((r=>{if(r.exceeded)n(r.message);else{let r=!1;const s=this.appContext.getSettingsStore().getLogin(),l=i.collection(this.firestore,o.COLLECTION_LIBRARY),u=i.doc(l,s.getEmail());i.setDoc(u,{lastWrite:new Date}).then((()=>{if(e.map((e=>{const t=this.getLibrary(s),l=i.doc(t,e.getName());i.setDoc(l,a.default.toWindowProps(e)).catch((e=>{r||n(o.FIREBASE_ERROR+e.message),r=!0}))})),!r){const r=this.appContext.getSettingsStore().getLogin();this.saveWindowSummary(r,e,t,n)}}))}})).catch((e=>{n(e.message)}))}getLibrary(e){const t=i.collection(this.firestore,o.COLLECTION_LIBRARY),n=i.doc(t,e.getEmail());return i.collection(n,o.LIBRARY)}getAllCollections(e){return new Promise(((t,n)=>{let r=[];const a=this.getLibrary(e);i.getDocs(a).then((function(e){e.forEach((function(e){let t=e.data();r.push(t)})),t(r)})).catch((e=>{n(new Error(o.FIREBASE_ERROR+e.message))}))}))}getCollection(e,t){return new Promise(((n,r)=>{const a=this.getLibrary(t),s=i.doc(a,e);i.getDoc(s).then((e=>{if(e.exists()){let t=e.data();n(t)}else n(null)})).catch((e=>{r(new Error(o.FIREBASE_ERROR+e.message))}))}))}getCollectionSummary(e){return new Promise(((t,n)=>{const r=i.collection(this.firestore,o.COLLECTION_SUMMARY),a=i.doc(r,e.getEmail());i.getDoc(a).then((r=>{if(r.exists()){let e=r.data();t(e)}else this.getAllCollections(e).then((r=>{let i=[];r.map((e=>{i.push({name:e.name,tabCount:e.tabs.length})}));let o={collectionData:i};this.saveCollectionSummary(e,o,(()=>{t({collectionData:i})}),(e=>{n(new Error(e))}))})).catch((e=>{n(e)}))})).catch((e=>{n(new Error(o.FIREBASE_ERROR+e.message))}))}))}isAllowanceExceeded(){const e=this.appContext.getSettingsStore().getLogin();return new Promise(((t,n)=>{this.getCollectionSummary(e).then((r=>{let i=0,o=0;r.collectionData.map((e=>{i++,o+=e.tabCount})),this.appContext.getAccountService().getAccount(e).then((e=>{if(null==e.error)if(null!=e.account){let n=e.account.getBackupPurchased(),r=n*this.maxTabsPerCollection;i>n&&t({exceeded:!0,message:"You have exceeded your backup allowance of "+n+" collections"}),o>r&&t({exceeded:!0,message:"You have exceeded your backup allowance of "+r+" tabs"}),t({exceeded:!1,message:""})}else n(new Error("Cannot find account"));else n(e.error)}))})).catch((e=>{n(e.message)}))}))}isCloudAccessExceeded(){let e=this.appContext.getSettingsStore(),t=e.getCloudAccess();return e.updateCloudAccess(),t.count>this.maxBackupsPerDay?{error:!0,message:"Cloud access count "+t.count+" has exceeded maximum "+this.maxBackupsPerDay}:{error:!1,message:""}}saveCollectionSummary(e,t,n,r){const a=i.collection(this.firestore,o.COLLECTION_SUMMARY),s=i.doc(a,e.getEmail());i.setDoc(s,t).catch((e=>{r(o.FIREBASE_ERROR+e.message)})),n()}saveWindowSummary(e,t,n,r){this.getCollectionSummary(e).then((i=>{let o={};i.collectionData.map((e=>{o[e.name]=e})),t.map((e=>{let t=e.getName(),n={name:t,tabCount:e.getTabs().length};null==o[t]?i.collectionData.push(n):o[t]=n})),this.saveCollectionSummary(e,i,n,r)})).catch((e=>{r(o.FIREBASE_ERROR+e.message)}))}}},3374:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CompareWindowState=void 0,(n=t.CompareWindowState||(t.CompareWindowState={}))[n.NewWindow=1]="NewWindow",n[n.IdenticalWindow=2]="IdenticalWindow",n[n.ChangedWindow=3]="ChangedWindow"},6362:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(2043)),l=n(1802),u=n(1802),c=a(n(1955)),d=a(n(8158)),h=a(n(1175));class f extends h.default{constructor(e){super(e),this.chromeWindows=[],this.chromeWindowMap={},this.windowParentMap={},this.windowTabMap={},this.eventBus=e.getEventBus()}addTab(e){chrome.tabs.create({active:!1,windowId:e.getChromeWindow().id})}addTabAtPosition(e,t,n){chrome.tabs.create({active:!1,windowId:e.getChromeWindow().id,index:n,url:t.getChromeTab().url})}addTabAtEnd(e,t){chrome.tabs.create({active:!1,windowId:e.getChromeWindow().id,url:t.getChromeTab().url})}close(e,t){chrome.windows.remove(e.getChromeWindow().id,t)}closeAllWindows(){this.getWindows().map((e=>{e.getTabs().map((t=>{const n=t.getChromeTab().title;n&&!n.startsWith(l.CHROME_EXTENSION)&&this.deleteTab(e,t)}))}))}cloneCollection(e){this.launch(e,!0)}copyTab(e,t,n){chrome.tabs.create({windowId:t,index:n,url:e.getChromeTab().url},(()=>{this.notify()}))}deleteTab(e,t){chrome.tabs.remove(t.getChromeTab().id)}duplicateLiveWindow(e){this.launch(e,!1)}focusTab(e){chrome.tabs.update(e.getChromeTab().id,{active:!0})}focusWindow(e){chrome.windows.update(e.getChromeWindow().id,{focused:!0})}handleTabAttached(e,t){this.findTab(e);let n=this.findTabWindow(e);if(null!=n){let r=n.getChromeWindow().id,i=this.findWindowTab(e,r);this.removeTab(i,r);let o=t.newWindowId,a=this.windowTabMap[o];null!=a&&(a.splice(t.newPosition,0,i),this.notify())}}handleTabChange(e){let t=e.windowId,n=this.findWindowTab(e.id,t);null!=n&&(n.setChromeTab(e),this.notify())}handleTabCreate(e){const t=e.id.toString(),n=e.windowId,r=this.findWindowById(n.toString());if(null!=r&&null==r.findTabById(t)){let r=this.windowTabMap[n],i=new d.default(!0,t,"","",e,[]);null!=r&&(r.splice(e.index,0,i),this.notify())}}handleTabMoved(e,t){let n=t.windowId,r=this.windowTabMap[n];if(null!=r){let e=t.fromIndex,n=r[e];r.splice(e,1),r.splice(t.toIndex,0,n),this.notify()}}handleTabRemove(e,t){let n=this.findWindowTab(e,t);this.findWindowById(t.toString()),null!=n&&(this.removeTab(n,t),this.notify())}handleWindowClose(e){let t=this.chromeWindows.filter((t=>t.id!=e));this.chromeWindows=t,null!=this.windowParentMap[e]&&(delete this.windowParentMap[e],this.updateStorage()),this.removeWindow(this.findWindowById(e.toString())),this.notify()}handleWindowCreate(e){const t=e.id;this.chromeWindows.push(e),this.chromeWindowMap[t]=e,this.windowTabMap[t]=[];let n=this.findWindowById[e.id];return null==n?(n=new c.default(t.toString(),"","",e,this.getTabs(e),null,[]),this.addWindow(n)):n.setTabs(this.getTabs(e)),this.notify(),n}handleWindowFocus(e){let t=!1;this.getWindows().map((n=>{let r=n.getChromeWindow();r.id==e?(t=!r.focused,r.focused=!0):r.focused=!1})),t&&this.notify()}handleWindowMoved(e){let t=this.findWindowById(e.id.toString());null!=t&&t.updateChromeWindow(e)}initialise(e){chrome.storage.local.get(u.LIVE,(t=>{null!=t[u.LIVE]&&(s.debug("LiveWindowState: "+JSON.stringify(t[u.LIVE])),null!=t[u.LIVE].windowParentMap&&(this.windowParentMap=t[u.LIVE].windowParentMap),this.setWindowState(t[u.LIVE])),this.getChromeWindows((()=>{e()}))}))}minimize(e){let t=e.getChromeWindow();chrome.windows.update(t.id,{state:"minimized"},(()=>{t.state="minimized",this.notify()}))}moveTab(e,t,n){chrome.tabs.move(e,{windowId:t,index:n},(()=>{this.notify()}))}newWindow(){chrome.windows.create({focused:!0},(()=>{this.notify()}))}removeParent(e){let t=this.getWindows(),n=!1;t.map((t=>{const r=t.getParent();null!=r&&r.getName()==e.getName()&&(t.setParent(null),n=!0)})),n&&this.notify()}restore(e){let t=e.getChromeWindow();chrome.windows.update(t.id,{state:"normal"},(()=>{t.state="normal",this.notify()}))}setCollectionStore(e){this.collectionStore=e}setParent(e,t){e.setParent(t),this.windowParentMap[e.getId()]=t.getId(),this.updateStorage()}getChromeWindows(e){chrome.windows.getAll({},(t=>{let n={};s.debug("Number of windows update"+t.length),t.map((e=>{n[e.id]=e})),this.getChromeTabs((r=>{this.chromeWindows=t,this.chromeWindowMap=n,this.windowTabMap=r,this.chromeWindows.map((e=>{let t=this.windowParentMap[e.id],n=null!=t?this.collectionStore.findWindowById(t):null,r=null!=n?n.getTags():[];this.addWindow(new c.default(e.id.toString(),"","",e,this.getTabs(e),n,r))})),e()}))}))}updateStorage(){let e={};this.clean();let t=this.getWindowState(),n={expandedPanel:t.expandedPanel,expandedWindowMap:t.expandedWindowMap,windowParentMap:this.windowParentMap};e[u.LIVE]=n,chrome.storage.local.set(e)}findTab(e){for(let t=0;t<this.chromeWindows.length;t++){let n=this.findWindowTab(e,this.chromeWindows[t].id);if(null!=n)return n}return null}findTabWindow(e){let t=this.getWindows();for(let n=0;n<t.length;n++){let r=t[n],i=r.getTabs();for(let t=0;t<i.length;t++)if(i[t].getChromeTab().id==e)return r}return null}findWindowTab(e,t){let n=this.windowTabMap[t];if(null!=n)for(let t=0;t<n.length;t++){let r=n[t];if(r.getChromeTab().id==e)return r}return null}getChromeTabs(e){chrome.tabs.query({},(t=>{let n={};for(let e=0;e<t.length;e++){const r=t[e];let i=n[r.windowId];null==i&&(i=[],n[r.windowId]=i),i.push(new d.default(!0,r.id.toString(),"","",r,[])),s.debug("Tab Window: "+r.windowId+" Tab title: "+r.title+" url: "+r.url+" icon: "+r.favIconUrl)}e(n)}))}getTabs(e){let t=e.id;return null!=this.windowTabMap[t]?this.windowTabMap[t]:[]}launch(e,t){let n=e.getChromeWindow(),r=e.getTabs(),i=[];r.map((e=>{i.push(e.getChromeTab().url)}));let o={focused:!0,height:n.height,left:n.left,top:n.top,url:i,width:n.width};chrome.windows.create(o,(n=>{const r=n.id,i=t?e:e.getParent(),o=this.findWindowById(r.toString());null!=i&&(this.windowParentMap[r]=i.getId(),this.updateStorage(),null!=o&&o.setParent(i),this.notify())}))}notify(){this.eventBus.sendMessage({messageType:u.MessageType.LiveWindowUpdate})}removeTab(e,t){let n=this.findWindowById(t.toString());if(null!=n){let r=n.getTabs().filter((t=>t!=e));this.windowTabMap[t]=r,n.setTabs(r)}}}t.default=f},6889:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultLayout=t.BACKUP_DIRECTORY=t.SETTINGS=t.LayoutComponent=void 0;const a=o(n(2043)),s=n(8280);var l;function u(){return{settings:{showCloseIcon:!1,showPopoutIcon:!1},content:[{type:"column",content:[{type:"row",height:0,content:[{title:"A react component",type:"react-component",component:l.SearchContainer}]},{type:"row",height:100,content:[{title:"A react component",type:"react-component",component:l.WindowContainer},{title:"Another react component",type:"react-component",component:l.CollectionContainer}]}]}]}}!function(e){e.CollectionContainer="collectionContainer",e.SearchContainer="searchContainer",e.WindowContainer="windowContainer"}(l=t.LayoutComponent||(t.LayoutComponent={})),t.SETTINGS="settings",t.BACKUP_DIRECTORY="ForgetMeNot",t.getDefaultLayout=u,t.default=class{constructor(){this.state={}}getBackupDirectory(){return this.state.backupDirectory}getCloudAccess(){return this.state.cloudAccess}getDefaultLayout(){return u()}getLayout(){return this.state.layoutConfig}getLogin(){return s.Login.create(this.state.login)}getMenuTabTags(){return this.state.menuTabTags}initialise(e){const n={date:(new Date).getTime(),count:0};chrome.storage.local.get(t.SETTINGS,(r=>{null!=r[t.SETTINGS]?(a.debug("SettingsState: "+JSON.stringify(r[t.SETTINGS])),this.state=r[t.SETTINGS],null==this.state.backupDirectory&&(this.state.backupDirectory=t.BACKUP_DIRECTORY),null==this.state.cloudAccess&&(this.state.cloudAccess=n),null==this.state.licenseAccepted&&(this.state.licenseAccepted=!1),null==this.state.login&&(this.state.login={email:"",password:""}),null==this.state.menuTabTags&&(this.state.menuTabTags=!0)):this.state={backupDirectory:t.BACKUP_DIRECTORY,cloudAccess:n,layoutConfig:this.getDefaultLayout(),licenseAccepted:!1,login:{email:"",password:""},menuTabTags:!0},e()}))}isLicenseAccepted(){return this.state.licenseAccepted}saveLayout(e){this.state.layoutConfig=e,this.updateStorage()}setBackupDirectory(e){this.state.backupDirectory=e,this.updateStorage()}setDefaultLayout(){this.saveLayout(this.getDefaultLayout())}setLicenseAccepted(){this.state.licenseAccepted=!0,this.updateStorage()}setLogin(e){this.state.login=e.toLoginProps(),this.updateStorage()}setMenuTabTags(e){this.state.menuTabTags=e,this.updateStorage()}updateCloudAccess(){this.state.cloudAccess.count++,this.isToday(new Date(this.state.cloudAccess.date))||(this.state.cloudAccess.date=(new Date).getTime(),this.state.cloudAccess.count=0),this.updateStorage()}updateStorage(){let e={};e[t.SETTINGS]=this.state,chrome.storage.local.set(e)}isToday(e){const t=new Date;return e.getDate()==t.getDate()&&e.getMonth()==t.getMonth()&&e.getFullYear()==t.getFullYear()}}},1175:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e){this.windowState={expandedPanel:!1,expandedWindowMap:{}},this.windows=[],this.windowIdMap={},this.appContext=e}clean(){let e=this.getWindows(),t={};e.map((e=>{t[e.getId()]=e}));let n=[];return Object.keys(this.windowState.expandedWindowMap).map((e=>{null==t[e]&&n.push(e)})),n.map((e=>{delete this.windowState.expandedWindowMap[e]})),n.length}findTabByIndex(e,t){let n=this.findWindowById(e);return null!=n?n.getTabs()[t]:null}findWindowById(e){return this.windowIdMap[e]}getWindows(){return this.windows}isPanelExpanded(){return this.windowState.expandedPanel}isWindowExpanded(e){let t=this.windowState.expandedWindowMap[e.getId()];return null!=t&&t}removeWindow(e){let t=this.windows.filter((t=>t.getId()!=e.getId()));this.windows=t,null!=this.windowIdMap[e.getId()]&&delete this.windowIdMap[e.getId()]}search(e){let t=this.getWindows(),n=[],r={},i=e.toLowerCase();for(let o=0;o<t.length;o++){let a=t[o],s=!1,l=a.getTabs();(a.getName().toLowerCase().search(i)>=0||a.getDescription().toLowerCase().search(i)>=0)&&(s=!0),this.searchTags(a.getTags(),e)&&(s=!0);let u=[];for(let e=0;e<l.length;e++){let t=l[e],r=t.getChromeTab();(t.getName().toLowerCase().search(i)>=0||t.getDescription().toLowerCase().search(i)>=0||null!=r.title&&r.title.toLowerCase().search(i)>=0||null!=r.url&&r.url.toLowerCase().search(i)>=0||this.searchTags(t.getTags(),i))&&(u.push(t),n.push(t))}if(u.length>0||s){let e={tabMap:{}};r[a.getId()]=e,u.map((t=>{e.tabMap[t.getId()]=t}))}}return{tabs:n,windowMap:r}}setPanelExpanded(e){this.windowState.expandedPanel=e,this.updateStorage()}setWindowExpanded(e,t){this.windowState.expandedWindowMap[e.getId()]=t,this.updateStorage()}setWindowsExpanded(e,t){e.map((e=>{this.windowState.expandedWindowMap[e.getId()]=t})),this.updateStorage()}addWindow(e){this.windows.push(e),this.windowIdMap[e.getId()]=e}getWindowState(){return this.windowState}setWindowState(e){this.windowState=e}searchTags(e,t){for(let n=0;n<e.length;n++)if(e[n].toLowerCase().search(t)>=0)return!0;return!1}}},4259:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(7294)),o=r(n(3912)),a=r(n(2411)),s=r(n(6248)),l=r(n(814)),u=r(n(6222)),c=r(n(5249)),d=r(n(6366)),h=n(772),f=n(4007);t.default=function(e){const t=f.globalStyles(),n=e.appContext.getAccountService().getAccountData().account;let r=n.isPaymentDue()?"Subscription is due on "+h.formatDate(n.getPaymentDueDate()):"Subscription is paid until "+h.formatDate(n.getPaymentDueDate()),p="Number of purchased cloud collections: "+n.getBackupPurchased();return i.default.createElement("div",null,i.default.createElement(a.default,{fullWidth:!1,maxWidth:"md",open:!0,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},i.default.createElement(u.default,{id:"alert-dialog-title"},"Account"),i.default.createElement(l.default,{style:{minWidth:"350px"},dividers:!0},i.default.createElement(c.default,null,i.default.createElement(d.default,{id:"user",disabled:!0,value:n.getLogin().getEmail(),variant:"outlined",InputProps:{className:t.boldText}}),i.default.createElement(d.default,{id:"user",disabled:!0,value:r,variant:"outlined",InputProps:{className:t.boldText}}),i.default.createElement(d.default,{id:"user",disabled:!0,value:p,variant:"outlined",InputProps:{className:t.boldText}}))),i.default.createElement(s.default,null,i.default.createElement(o.default,{id:"buyButton",onClick:()=>{e.handleUpgrade()},color:"primary",autoFocus:!0},"Upgrade"),i.default.createElement(o.default,{id:"closeButton",onClick:()=>{e.handleClose()},color:"primary",autoFocus:!0},"Close"))))}},4684:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.hasPaidBackup=t.purchaseCloudStorageMessage=void 0;const s=o(n(7294)),l=n(5828),u=a(n(3912)),c=a(n(2411)),d=a(n(6248)),h=a(n(814)),f=a(n(8101)),p=a(n(6222)),m=a(n(115)),g=o(n(8797)),v=n(3374),y=l.makeStyles((e=>({inputFile:{visibility:"hidden"}})));t.default=function(e){y();const t={changes:[],error:!1,loading:!1,message:"",needsOverwrite:!1,overWriteAll:!0},n=e.appContext.getPersistence(),[r,i]=s.useState(t);function o(e,t){return{collectionName:e,compareWindowResult:t,expanded:!1,overWrite:!0}}function a(e){i(Object.assign(Object.assign({},r),{error:!0,loading:!1,message:e}))}function l(e){const t=e.filter((e=>e.compareWindowResult.compareState!=v.CompareWindowState.IdenticalWindow)).length>0;i(Object.assign(Object.assign({},r),{changes:e,loading:!1,message:"",needsOverwrite:t}))}return s.useEffect((()=>{e.open?(i(Object.assign(Object.assign({},r),{error:!1,loading:!0,message:"Accessing Cloud Storage"})),n.authorize((()=>{n.getCollectionNames((t=>{!function(t){let r=e.appContext.getCollectionStore(),i=[],s=e.windows;t.length>0?n.getCollections(t,!1,(e=>{let t={};e.map((e=>{t[e.name]=e})),s.map((e=>{let n=e.getName(),a=t[n];if(null==a)i.push(o(n,m.default.getNewWindowCompareResult(null)));else{let t=r.compareWindows([a]);i.push(o(e.getName(),t[0]))}})),l(i)}),(e=>{a(e)})):(s.map((e=>{i.push(o(e.getName(),m.default.getNewWindowCompareResult(null)))})),l(i))}(t)}),(e=>{a(e)}))}),(e=>{a(e)}))):i(t)}),[e.open]),s.default.createElement("div",null,e.open&&s.default.createElement(c.default,{fullWidth:!1,maxWidth:"md",open:e.open,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},s.default.createElement(p.default,{id:"alert-dialog-title"},"Backup"),s.default.createElement(h.default,{style:{minWidth:"300px",overflowY:"hidden"}},(r.error||r.loading)&&s.default.createElement(f.default,{id:"alert-dialog-description"},r.message),!r.error&&!r.loading&&s.default.createElement(g.default,{backup:!0,changes:r.changes,needsOverwrite:r.needsOverwrite,overWriteAll:r.overWriteAll,overWriteAllLabel:"Save All",setOverWriteAll:function(){const e=!r.overWriteAll;g.setPersistenceOverWriteAll(r.changes,e),i(Object.assign(Object.assign({},r),{overWriteAll:e}))},setOverWriteWindow:function(e,t){let n=t.target.checked,o=g.setPersistenceOverWriteWindow(r.changes,e,n);i(Object.assign(Object.assign({},r),{overWriteAll:o}))},toggleExpanded:function(e){g.togglePanelExpansion(r.changes,e),i(Object.assign({},r))}})),!r.loading&&s.default.createElement(d.default,null,s.default.createElement(u.default,{id:"cancelButton",onClick:()=>{e.handleClose()},color:"primary"},"Cancel"),s.default.createElement(u.default,{id:"saveCloudButton",onClick:()=>{!function(){if(r.error)i(t),e.handleClose();else{let o=[];r.changes.forEach(((t,n,r)=>{t.overWrite&&t.compareWindowResult.compareState!=v.CompareWindowState.IdenticalWindow&&o.push(e.windows[n])})),i(Object.assign(Object.assign({},r),{error:!1,loading:!0,message:"Writing files"})),n.saveWindows(o,(()=>{i(t),e.handleClose()}),(e=>{i(Object.assign(Object.assign({},r),{error:!0,loading:!1,message:e}))}))}}()},color:"primary",autoFocus:!0},"OK"))))},t.purchaseCloudStorageMessage="Cloud storage needs to be purchased",t.hasPaidBackup=function(e,t,n){e.getAuthenticationService(),""!=t.getEmail()?e.getAccountService().findAccount(t).then((e=>{const t=e.account;if(null==t)return!1;n(!t.isPaymentDue()&&t.getBackupPurchased()>0)})):n(!1)}},3739:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(7294)),l=a(n(4731)),u=a(n(3592)),c=a(n(3912)),d=a(n(5851)),h=a(n(2411)),f=a(n(6248)),p=a(n(814)),m=a(n(6222)),g=a(n(6366));t.default=function(e){const[t,n]=s.useState(Object.assign(Object.assign({},e.data),{error:!1,message:""}));function r(e){return e.replace(/[^\x20-\x7E]/g,"")}return s.default.createElement("div",null,s.default.createElement(h.default,{fullWidth:!1,maxWidth:"md",open:!0,"aria-labelledby":"save-dialog-title","aria-describedby":"save-dialog-description"},s.default.createElement(m.default,{id:"save-dialog-title"},e.title),s.default.createElement(p.default,{dividers:!0},s.default.createElement(g.default,{autoFocus:!0,error:t.error,helperText:t.message,onChange:function(e){n(Object.assign(Object.assign({},t),{error:!1,message:"",name:e.target.value}))},margin:"dense",id:"name",label:"Name",type:"text",fullWidth:!0,variant:"outlined",value:t.name}),s.default.createElement(g.default,{autoFocus:!0,onChange:function(e){n(Object.assign(Object.assign({},t),{description:e.target.value}))},margin:"dense",id:"description",label:"Enter description",multiline:!0,rows:10,fullWidth:!0,variant:"outlined",value:t.description}),s.default.createElement("div",{style:{width:"100%"}},s.default.createElement(u.default,{multiple:!0,onChange:(e,i,o)=>{let a=r(i.toString());if(""!=a){let e=a.split(",");n(Object.assign(Object.assign({},t),{tags:e}))}else n(Object.assign(Object.assign({},t),{tags:[]}))},options:e.collectionStore.getTags().map((e=>e.tag)),value:t.tags,freeSolo:!0,renderTags:(e,t)=>e.map(((e,n)=>""!=r(e.toString())?s.default.createElement(d.default,Object.assign({variant:"outlined",label:e},t({index:n}))):null)),style:{width:500},renderInput:e=>s.default.createElement(g.default,Object.assign({},e,{margin:"dense",multiline:!0,variant:"outlined",label:"Tags",placeholder:"Tags"}))}))),s.default.createElement(f.default,null,s.default.createElement(c.default,{id:"closeButton",color:"primary",onClick:()=>{e.handleClose()}},"Cancel"),s.default.createElement(c.default,{id:"saveCollectionButton",color:"primary",autoFocus:!0,onClick:()=>{!function(){let r=t.name;""!=r?r.indexOf(".")>=0?n(Object.assign(Object.assign({},t),{error:!0,message:"Must not contain ."})):l.default(r)?e.isValidWindowName(t.name)?(e.save(t),n(Object.assign(Object.assign({},t),{name:"",description:""})),e.handleClose()):n(Object.assign(Object.assign({},t),{error:!0,message:"Duplicate name"})):n(Object.assign(Object.assign({},t),{error:!0,message:"Must be valid filename"})):n(Object.assign(Object.assign({},t),{error:!0,message:"Invalid name"}))}()}},"Save"))))}},8203:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(7294)),l=a(n(3957)),u=a(n(7237)),c=a(n(3912)),d=a(n(2719)),h=a(n(2411)),f=a(n(6248)),p=a(n(814)),m=a(n(8101)),g=a(n(6222)),v=a(n(5249)),y=a(n(5190)),b=a(n(64)),w=a(n(9069)),E=a(n(400)),_=n(4007);t.default=function(e){const t=_.globalStyles(),n=e.window,r=e.appContext.getCollectionStore(),[i,o]=s.useState(a());function a(){let t={changed:!1,changedPosition:!1,deletedTabState:[],newTabState:[],selectAll:!1};if(e.open&&null!=n.getParent()){let e=r.compareParentWindow(n);(e.changed||e.changedPosition)&&(t.changed=e.changed,t.changedPosition=e.changedPosition,e.deletedTabs.map((e=>{t.deletedTabState.push({select:!1,tab:e})})),e.newTabs.map((e=>{t.newTabState.push({select:!1,tab:e})})))}return t}function C(e,n,r){return s.default.createElement(s.default.Fragment,{key:r},s.default.createElement(u.default,{display:"flex",flexDirection:"row",width:"100%"},s.default.createElement(u.default,{width:"40px"},s.default.createElement(w.default,{title:"Select"},s.default.createElement(d.default,{color:"primary",id:"select"+r,checked:n.select,onClick:e=>e.stopPropagation(),onChange:e=>function(e,t){const n=!e.select,r=i.deletedTabState.length+i.newTabState.length;let a=!1,s=0;e.select=n,n&&(i.deletedTabState.map((e=>{e.select&&s++})),i.newTabState.map((e=>{e.select&&s++})),s==r&&(a=!0)),o(Object.assign(Object.assign({},i),{selectAll:a}))}(n)}))),s.default.createElement(u.default,{width:"5px"}),s.default.createElement(u.default,{style:{paddingTop:"10px"}},e&&s.default.createElement(l.default,null),!e&&s.default.createElement(b.default,null)),s.default.createElement(u.default,{width:"10px"}),s.default.createElement(u.default,{style:{paddingTop:"10px"}},s.default.createElement(E.default,{className:t.tabTitle},n.tab.getChromeTab().title))))}return s.useEffect((()=>{o(a())}),[e.open]),s.default.createElement("div",null,e.open&&s.default.createElement(h.default,{fullWidth:!1,maxWidth:"md",open:e.open,"aria-labelledby":"save-dialog-title","aria-describedby":"save-dialog-description"},s.default.createElement(g.default,{id:"save-dialog-title"},"Update Window"),i.changed&&s.default.createElement(p.default,{style:{minWidth:"300px",overflowY:"hidden"}},s.default.createElement(v.default,null,s.default.createElement(y.default,{control:s.default.createElement(d.default,{id:"selectAll",checked:i.selectAll,onChange:()=>function(){const e=!i.selectAll;i.deletedTabState.map((t=>{t.select=e})),i.newTabState.map((t=>{t.select=e})),o(Object.assign(Object.assign({},i),{selectAll:e}))}(),color:"primary"}),label:"Select all"}),s.default.createElement("br",null)),i.changed&&s.default.createElement(v.default,null,s.default.createElement("div",{className:t.panelContainer,style:{border:"1px solid",height:"400px",overflow:"scroll"}},i.newTabState.map(((e,t)=>C(!0,e,t))),i.deletedTabState.map(((e,t)=>C(!1,e,t)))))),!i.changed&&i.changedPosition&&s.default.createElement(p.default,{style:{minWidth:"300px"}},s.default.createElement(m.default,{id:"alert-dialog-description"},"Position Changes")),!(i.changed||i.changedPosition)&&s.default.createElement(p.default,{style:{minWidth:"300px"}},s.default.createElement(m.default,{id:"alert-dialog-description"},"No Changes")),s.default.createElement(f.default,null,s.default.createElement(c.default,{id:"closeButton",color:"primary",onClick:()=>{e.handleClose()}},"Cancel"),(i.changed||i.changedPosition)&&s.default.createElement(c.default,{id:"saveButton",color:"primary",autoFocus:!0,onClick:()=>{!function(){const e=n.getParent();r.updateParentWindow(n),i.deletedTabState.map((t=>{t.select&&r.deleteTab(e,t.tab)})),i.newTabState.map((t=>{t.select&&r.addTabAtEnd(e,t.tab)}))}(),e.handleClose()}},"Save"))))}},6118:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(7294)),l=o(n(2043)),u=a(n(7237)),c=a(n(8428)),d=a(n(9067)),h=a(n(4566)),f=a(n(9487)),p=a(n(2527)),m=a(n(6692)),g=a(n(9152)),v=a(n(1890)),y=a(n(7133)),b=a(n(6572)),w=a(n(3375)),E=a(n(3093)),_=a(n(9069)),C=a(n(400)),S=n(7623),x=n(4007),T=a(n(5479)),I=o(n(4684)),k=a(n(3739)),O=n(8939),P=a(n(873)),N=n(6050),A=a(n(2482)),D=a(n(9512)),R=n(4031);t.default=function(e){const[t,n]=s.useState(!1),[r,i]=s.useState(!1),[o,a]=s.useState(!1),[M,L]=s.useState(!1),[j,F]=s.useState({show:!1,window:null}),[W,B]=s.useState({name:"",description:"",open:!1,tab:null,tags:[]}),[z,U]=s.useState({message:"",severity:"success"}),V=e.window,[Z,$]=s.useState({name:"",description:"",open:!1,tags:[]}),q=x.globalStyles(),H=e.appContext,K=e.searchState,G=K.result.getCollectionMap(),Q=K.filter,Y=Q?G[V.getId()].tabMap:{},X=H.getClipBoard(),J=H.getLiveWindowStore(),ee=H.getCollectionStore(),te=V.getTabs(),ne=Q?function(e){return Object.keys(e).length}(Y):te.length;let re=ee.isWindowExpanded(V),[ie,oe]=s.useState(re),ae=ie?"Collapse":"Expand";function se(){L(!1)}function le(e){ee.setWindowExpanded(e,!ie),oe(!ie)}l.debug("Collection window id: "+V.getId()+" name "+V.getName()+" expandedWindow "+re+" expanded "+ie),re!=ie&&oe(re);const ue="Are you sure you want to delete the "+V.getName()+" Collection?",ce=Q?ne+" of "+te.length+" Tabs":ne+" Tabs";return s.default.createElement("div",{draggable:!0,className:q.panelContainer},t&&s.default.createElement(T.default,{handleCancel:function(){n(!1)},handleConfirm:function(){ee.removeWindow(V),n(!1)},title:"Delete Collection",text:ue}),r&&s.default.createElement(I.default,{appContext:H,open:r,handleClose:function(){i(!1)},windows:[V]}),W&&s.default.createElement(P.default,{data:W,collectionStore:ee,open:W.open,handleClose:function(){B({name:"",description:"",open:!1,tab:null,tags:[]})},save:function(e){ee.updateTab(e.tab,e.name,e.description,e.tags)},title:"Tab data"}),Z.open&&s.default.createElement(k.default,{data:Z,collectionStore:ee,handleClose:function(){$({name:"",description:"",open:!1,tags:[]})},isValidWindowName:function(e){return ee.findWindowsByName(e).length<=1},save:function(e){ee.updateWindow(V,e.name,e.description,e.tags)},title:"Collection data"}),o&&s.default.createElement(T.default,{handleCancel:()=>a(!1),handleConfirm:function(){a(!1)},okTitle:"Buy",title:"Buy Cloud Storage",text:I.purchaseCloudStorageMessage}),M&&s.default.createElement(A.default,Object.assign({},N.paymentProps,{appContext:H,handleCancel:se,handleClose:se})),j.show&&s.default.createElement(D.default,{appContext:H,open:!0,handleClose:function(){F({show:!1,window:null})},handleSend:function(e,t){H.getMessagingService().sendMessage(e).then((e=>{let n=e.message,r=t.getName()+" Collection has been shared with "+n.getToEmail(),i=e.error;i&&(r="Cannot share: "+e.errorMessage),F({show:!1,window:null}),U({message:r,severity:i?"error":"success"})}))},login:H.getSettingsStore().getLogin(),window:j.window}),""!=z.message&&s.default.createElement(R.Toast,{duration:3e3,handleClose:function(){U(Object.assign(Object.assign({},z),{message:""}))},message:z.message,open:!0,severity:z.severity,title:"Message"}),s.default.createElement(f.default,{expanded:ie,style:{margin:"0px"},className:q.panel},s.default.createElement(p.default,{className:q.panelSummary,onClick:e=>le(V),expandIcon:s.default.createElement(_.default,{title:ae},s.default.createElement(h.default,{id:"expandButton",onClick:e=>{le(V)}}))},s.default.createElement(u.default,{display:"flex",flexDirection:"row"},s.default.createElement(u.default,null,s.default.createElement(_.default,{title:"Delete"},s.default.createElement(v.default,{id:"deleteButton",className:q.iconButton,onClick:e=>{n(!0),e.stopPropagation()}},s.default.createElement(c.default,null)))),s.default.createElement(u.default,{width:"5px"}),s.default.createElement(u.default,null,s.default.createElement(_.default,{title:"Cloud Backup"},s.default.createElement(v.default,{id:"backupButton",className:q.iconButton,onClick:e=>{const t=H.getSettingsStore().getLogin();I.hasPaidBackup(H,t,(e=>{e?i(!0):a(!0)})),e.stopPropagation()}},s.default.createElement(w.default,null)))),s.default.createElement(u.default,{width:"5px"}),s.default.createElement(u.default,null,s.default.createElement(_.default,{title:"Share"},s.default.createElement(v.default,{id:"shareButton",className:q.iconButton,onClick:e=>{const t=H.getSettingsStore().getLogin();I.hasPaidBackup(H,t,(e=>{e?F({show:!0,window:V}):a(!0)})),e.stopPropagation()}},s.default.createElement(E.default,null)))),s.default.createElement(u.default,{width:"5px"}),s.default.createElement(u.default,null,s.default.createElement(_.default,{title:"Launch"},s.default.createElement(v.default,{id:"launchButton",className:q.iconButton,onClick:e=>{J.cloneCollection(V),e.stopPropagation()}},s.default.createElement(y.default,null)))),s.default.createElement(u.default,{width:"5px"}),s.default.createElement(u.default,null,s.default.createElement(_.default,{title:"Paste Tab"},s.default.createElement(v.default,{id:"pasteTabAtEndButton",className:q.iconButton,onClick:e=>{e.stopPropagation();const t=X.getTab();null!=t&&ee.addTabAtEnd(V,t)}},s.default.createElement(O.PasteIcon,null)))),s.default.createElement(u.default,{width:"5px"}),s.default.createElement(u.default,null,s.default.createElement(_.default,{title:"Edit"},s.default.createElement(v.default,{id:"editButton",className:q.iconButton,onClick:e=>{const t=V.getTags();e.stopPropagation(),$({name:V.getName(),description:V.getDescription(),open:!0,tags:Array.from(t)})}},s.default.createElement(d.default,null)))),s.default.createElement(u.default,{width:"15px"}),s.default.createElement(u.default,null,s.default.createElement(C.default,{className:q.windowHeading},s.default.createElement(b.default,{href:"#",color:"inherit",underline:"none",onClick:()=>le(V)},V.getName()," (",ce,")"))))),s.default.createElement(m.default,{className:q.panelDetail},s.default.createElement("div",{className:q.panelContainer},te.map(((e,t)=>{let n=e.getChromeTab(),r=S.createTabId(V,n,t);const i=Q&&function(e,t){return null==t[e.getId()]}(e,Y)?{style:{display:"none"}}:{};return s.default.createElement(s.default.Fragment,{key:t},s.default.createElement(u.default,Object.assign({display:"flex",id:r,flexDirection:"row",draggable:!0,onDragStart:e=>function(e){e.dataTransfer.setData("source",e.target.id)}(e),onDrop:e=>function(e){e.preventDefault();let t=e.dataTransfer.getData("source");null!=t&&S.dropTab(t,e.currentTarget.id,J,ee,(e=>{}))}(e),onDragOver:e=>e.preventDefault(),onMouseOver:()=>{return e=r,void(document.getElementById(e).style.backgroundColor="white");var e},onMouseOut:()=>{return e=r,void(document.getElementById(e).style.backgroundColor=x.PANEL_BACKGROUND_COLOR);var e}},i),s.default.createElement(u.default,{width:"15px",className:q.noshrink}),s.default.createElement(u.default,{className:q.noshrink},s.default.createElement(_.default,{title:"Delete"},s.default.createElement(v.default,{id:"deleteTabButton",className:q.iconButton,onClick:t=>{ee.deleteTab(V,e),t.stopPropagation()}},s.default.createElement(c.default,null)))),s.default.createElement(u.default,{width:"5px",className:q.noshrink}),s.default.createElement(u.default,{className:q.noshrink},s.default.createElement(_.default,{title:"Copy"},s.default.createElement(v.default,{id:"copyTabButton",className:q.iconButton,onClick:t=>{t.stopPropagation(),X.saveTab(e)}},s.default.createElement(O.CopyIcon,null)))),s.default.createElement(u.default,{width:"5px",className:q.noshrink}),s.default.createElement(u.default,{className:q.noshrink},s.default.createElement(_.default,{title:"Paste"},s.default.createElement(v.default,{id:"pasteTabButton",className:q.iconButton,onClick:e=>{e.stopPropagation();const n=X.getTab();null!=n&&ee.addTabAtPosition(V,n,t+1)}},s.default.createElement(O.PasteIcon,null)))),s.default.createElement(u.default,{width:"5px",className:q.noshrink}),s.default.createElement(u.default,{className:q.noshrink},s.default.createElement(_.default,{title:"Edit"},s.default.createElement(v.default,{id:"editTabButton",className:q.iconButton,onClick:t=>{t.stopPropagation(),B({name:e.getName(),description:e.getDescription(),open:!0,tab:e,tags:Array.from(e.getTags())})}},s.default.createElement(d.default,null)))),s.default.createElement(u.default,{width:"10px",className:q.noshrink}),s.default.createElement(u.default,{className:q.noshrink},null!=n.favIconUrl&&s.default.createElement(g.default,{classes:{root:q.iconRoot}},s.default.createElement("img",{className:q.imageIcon,src:n.favIconUrl})),null==n.favIconUrl&&s.default.createElement(g.default,null)),s.default.createElement(u.default,{width:"10px",className:q.noshrink}),s.default.createElement(u.default,null,null!=n.url&&s.default.createElement(b.default,{href:n.url,target:"_blank",className:q.url},s.default.createElement(C.default,{className:q.tabTitle},e.getName())),null==n.url&&s.default.createElement(C.default,{className:q.tabTitle},n.title))))}))))))}},9329:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(7294)),l=o(n(2043)),u=a(n(1673)),c=a(n(9594)),d=a(n(7237)),h=a(n(2215)),f=a(n(8428)),p=a(n(5025)),m=a(n(4566)),g=a(n(9487)),v=a(n(2527)),y=a(n(6692)),b=a(n(4545)),w=a(n(1890)),E=a(n(6572)),_=a(n(3375)),C=a(n(9069)),S=a(n(400)),x=n(4007),T=a(n(5479)),I=o(n(4684)),k=a(n(6118)),O=o(n(2980)),P=n(8939),N=n(6050),A=a(n(8392)),D=n(6889),R=n(1802),M=a(n(2482)),L=a(n(9056)),j=a(n(6375));t.default=function(e){const t=x.globalStyles(),[n,r]=s.useState(!1),[i,o]=s.useState(!1),[a,F]=s.useState(!1),[W,B]=s.useState(!1),[z,U]=s.useState(!1),[V,Z]=s.useState(!1),[$,q]=s.useState(!1),[H,K]=s.default.useState(O.getNoErrorState()),[G,Q]=s.useState(!1),Y=e.appContext,X=Y.getEventBus(),J=Y.getCollectionStore(),ee=e.searchState,te=ee.result.getCollectionMap(),ne=ee.filter,re=!!ne||J.isPanelExpanded(),[ie,oe]=s.useState(re),[ae,se]=s.useState(!1),le=J.getWindows().sort(((e,t)=>{let n=e.getName().toLowerCase(),r=t.getName().toLowerCase();return n<r?-1:n>r?1:0}));let ue=ie?"Collapse all":"Expand all",ce=ie?"Collapse":"Expand",de=ne?Object.keys(te).length:le.length,he=ne?"("+de+" of "+le.length+" contain your search term)":"("+de+")";function fe(){const e=Y.getSettingsStore().getLogin();Y.getAccountService().getAccount(e).then((e=>{null!=e.account&&e.account.isAdmin()&&se(!0)}))}function pe(){F(!1)}function me(){J.setPanelExpanded(!ie),oe(!ie)}l.debug("CollectionPanel expanded: "+ie),s.useEffect((()=>{function e(){l.debug("Saved Window update "+G),Q(!G)}return X.addEventListener(R.MessageType.CollectionUpdate,e),X.addEventListener(R.MessageType.Resize,e),X.addEventListener(R.MessageType.Login,fe),()=>{X.removeEventListener(R.MessageType.CollectionUpdate,e),X.removeEventListener(R.MessageType.Resize,e),X.removeEventListener(R.MessageType.Login,fe)}}),[G]);const ge={maxHeight:document.getElementById(D.LayoutComponent.CollectionContainer).getBoundingClientRect().height-64+"px"};return s.default.createElement("div",{className:t.panelContainer},n&&s.default.createElement(T.default,{handleCancel:function(){r(!1)},handleConfirm:function(){J.deleteAll(),r(!1)},title:"Delete Collections",text:"Are you sure you want to delete all Collections?"}),i&&s.default.createElement(I.default,{appContext:Y,open:i,handleClose:function(){o(!1)},windows:le}),W&&s.default.createElement(L.default,{appContext:Y,open:W,handleClose:()=>B(!1)}),z&&s.default.createElement(j.default,{appContext:Y,open:z,handleClose:()=>U(!1)}),V&&s.default.createElement(A.default,{appContext:Y,handleClose:()=>Z(!1)}),$&&s.default.createElement(T.default,{handleCancel:()=>q(!1),handleConfirm:function(){q(!1),F(!0)},okTitle:"Buy",title:"Buy Cloud Storage",text:I.purchaseCloudStorageMessage}),a&&s.default.createElement(M.default,Object.assign({},N.paymentProps,{appContext:Y,handleCancel:pe,handleClose:pe})),H.error&&s.default.createElement(O.default,Object.assign({},H,{appContext:Y,handleClose:null})),s.default.createElement(g.default,{expanded:ie,style:{margin:"0px"},className:t.panel},s.default.createElement(v.default,{className:t.windowSummary,onClick:e=>me(),"aria-controls":"panel1a-content",id:"panel1a-header"},s.default.createElement(d.default,{display:"flex",flexDirection:"row",width:"100%"},s.default.createElement(d.default,null,s.default.createElement(C.default,{title:"Delete"},s.default.createElement(w.default,{id:"deleteButton",className:t.iconButton,onClick:e=>{r(!0),e.stopPropagation()}},s.default.createElement(f.default,null)))),s.default.createElement(d.default,{width:"5px"}),s.default.createElement(d.default,null,s.default.createElement(C.default,{title:"Cloud Backup"},s.default.createElement(w.default,{className:t.iconButton,onClick:e=>{const t=Y.getSettingsStore().getLogin();I.hasPaidBackup(Y,t,(e=>{e?o(!0):q(!0)})),e.stopPropagation()}},s.default.createElement(_.default,null)))),s.default.createElement(d.default,{width:"5px"}),s.default.createElement(d.default,null,s.default.createElement(C.default,{title:"Cloud Restore"},s.default.createElement(w.default,{className:t.iconButton,onClick:e=>{const t=Y.getSettingsStore().getLogin();I.hasPaidBackup(Y,t,(e=>{e?B(!0):q(!0)})),e.stopPropagation()}},s.default.createElement(P.FileRestoreIcon,null)))),s.default.createElement(d.default,{width:"5px"}),s.default.createElement(d.default,null,s.default.createElement(C.default,{title:"View Cloud Collections"},s.default.createElement(w.default,{id:"viewCloudButton",className:t.iconButton,onClick:e=>{const t=Y.getSettingsStore().getLogin();I.hasPaidBackup(Y,t,(e=>{e?U(!0):q(!0)})),e.stopPropagation()}},s.default.createElement(h.default,null)))),ae&&s.default.createElement(d.default,null,s.default.createElement(C.default,{title:"Import"},s.default.createElement(w.default,{className:t.iconButton,onClick:e=>{Z(!0),e.stopPropagation()}},s.default.createElement(b.default,null)))),s.default.createElement(d.default,{width:"10px"}),s.default.createElement(d.default,null,s.default.createElement(S.default,{className:t.panelHeading},s.default.createElement(E.default,{href:"#",color:"inherit",underline:"none",onClick:()=>me()},"Collections ",he))),s.default.createElement(d.default,{flexGrow:"1"}),s.default.createElement(d.default,null,s.default.createElement(C.default,{title:ue},s.default.createElement(w.default,{id:"expandAllCollectionButton",className:t.iconButton,onClick:e=>{!function(){let e=!ie;J.setWindowsExpanded(le,e),J.setPanelExpanded(e),oe(e)}(),e.stopPropagation()}},ie&&s.default.createElement(c.default,null),!ie&&s.default.createElement(u.default,null)))),s.default.createElement(d.default,{width:"5px"}),s.default.createElement(d.default,null,s.default.createElement(C.default,{title:ce},s.default.createElement(w.default,{id:"expandCollectionButton",className:t.iconButton,onClick:e=>{me(),e.stopPropagation()}},ie&&s.default.createElement(p.default,null),!ie&&s.default.createElement(m.default,null)))))),s.default.createElement(y.default,{className:t.windowDetail,style:ge},le.map(((e,t)=>{let n=!0;return ne&&(n=null!=te[e.getId()]),s.default.createElement(s.default.Fragment,{key:t},n&&s.default.createElement(k.default,{appContext:Y,searchState:ee,window:e}))})))))}},7623:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dropTab=t.createTabId=void 0;const r=n(1802),i=String.fromCharCode(6);t.createTabId=function(e,t,n){return(e.isLive()?r.LIVE:r.SAVED)+i+e.getId()+i+t.id+i+n},t.dropTab=function(e,t,n,o,a){let s=t.split(i),l=e.split(i);if(s.length==l.length)if(l[0]==s[0])l[0]==r.LIVE?n.moveTab(+l[2],+s[1],+s[3]):o.moveTab(l[1],+l[3],s[1],+s[3]);else if(l[0]==r.LIVE){let e=n.findTabByIndex(l[1],+l[3]);null!=e&&o.copyTab(e,s[1],+s[3])}else{let e=o.findTabByIndex(l[1],+l[3]);null!=e&&n.copyTab(e,+s[1],+s[3])}}},2980:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getNoErrorState=void 0;const s=o(n(7294)),l=a(n(3912)),u=a(n(2411)),c=a(n(6248)),d=a(n(814)),h=a(n(8101)),f=a(n(6222)),p=a(n(2466)),m=a(n(6366));t.getNoErrorState=function(){return{column:0,error:!1,line:0,message:"",stackTrace:""}},t.default=function(e){const[t,n]=s.useState(window.navigator.onLine?{email:"",message:e.error?"A Runtime error has occurred.":"",trace:e.error?e.stackTrace:""}:{email:"",message:"No network connection",trace:""});return s.useEffect((()=>{e.appContext.getAccountService().getSystemSettings().then((e=>{if(!e.error){const r="%0D%0A%0D%0A",i="mailto:"+e.systemSettings.email+"?subject=ForgetMeNot Error&body="+t.message+r+"Trace:"+r+t.trace;n(Object.assign(Object.assign({},t),{email:i}))}}))}),[]),s.default.createElement("div",null,e.error&&s.default.createElement(u.default,{open:e.error,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},s.default.createElement(f.default,{id:"alert-dialog-title"},"Error"),s.default.createElement(d.default,null,s.default.createElement(h.default,{id:"alert-dialog-description"},t.message),""!=t.trace&&s.default.createElement(m.default,{autoFocus:!0,margin:"dense",multiline:!0,rows:5,fullWidth:!0,variant:"outlined",value:t.trace}),s.default.createElement("br",null),s.default.createElement("br",null),""!=t.email&&s.default.createElement(l.default,{variant:"contained",color:"primary",href:t.email,size:"medium",startIcon:s.default.createElement(p.default,null)},"Please email error")),s.default.createElement(c.default,null,null!=e.handleClose&&s.default.createElement(l.default,{id:"closeButton",onClick:()=>{e.handleClose()},color:"primary",autoFocus:!0},"OK"))))}},4007:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.globalStyles=t.PANEL_BACKGROUND_COLOR=void 0;const r=n(5828);t.PANEL_BACKGROUND_COLOR="#e6e6e6",t.globalStyles=r.makeStyles((e=>({appBarBgColor:{backgroundColor:"#6b5b95"},boldText:{color:"black !important",fontWeight:"bold"},expanded:{minHeight:0},imageIcon:{height:"100%"},iconRoot:{textAlign:"center"},iconButton:{padding:"0px"},noshrink:{flexShrink:0},panel:{width:"100%"},panelSummary:{backgroundColor:"#a2b9bc",margin:"0px",minHeight:"0px","&$expanded":{minHeight:0}},panelHeading:{color:"white",fontSize:e.typography.pxToRem(15),fontWeight:e.typography.fontWeightRegular},panelDetail:{backgroundColor:t.PANEL_BACKGROUND_COLOR,flexWrap:"wrap",padding:"10px 16px 10px"},panelContainer:{width:"100%","& .MuiExpansionPanelSummary-root:hover":{cursor:"default"}},searchSummary:{backgroundColor:"#5c8a71",minHeight:"0px","&$expanded":{minHeight:0}},tabTitle:{color:"black",fontSize:e.typography.pxToRem(14),fontWeight:e.typography.fontWeightRegular},windowDetail:{backgroundColor:"#e1e1e1",flexWrap:"wrap",overflowY:"auto",padding:"0px 0px 0px"},windowHeading:{fontSize:e.typography.pxToRem(14),fontWeight:e.typography.fontWeightRegular},windowSummary:{backgroundColor:"#b2ad7f",minHeight:"0px","&$expanded":{minHeight:0}},url:{textDecoration:"none"}})))},8939:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PasteIcon=t.NotEqualIcon=t.FilterIcon=t.FileRestoreIcon=t.EqualIcon=t.CopyIcon=void 0;const i=r(n(7294)),o=r(n(2015));t.CopyIcon=function(e){return i.default.createElement(o.default,Object.assign({},e),i.default.createElement("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"}))},t.EqualIcon=function(e){return i.default.createElement(o.default,Object.assign({},e),i.default.createElement("path",{d:"M19,10H5V8H19V10M19,16H5V14H19V16Z"}))},t.FileRestoreIcon=function(e){return i.default.createElement(o.default,Object.assign({},e),i.default.createElement("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M12,18C9.95,18 8.19,16.76 7.42,15H9.13C9.76,15.9 10.81,16.5 12,16.5A3.5,3.5 0 0,0 15.5,13A3.5,3.5 0 0,0 12,9.5C10.65,9.5 9.5,10.28 8.9,11.4L10.5,13H6.5V9L7.8,10.3C8.69,8.92 10.23,8 12,8A5,5 0 0,1 17,13A5,5 0 0,1 12,18Z"}))},t.FilterIcon=function(e){return i.default.createElement(o.default,Object.assign({},e),i.default.createElement("path",{d:"M14,12V19.88C14.04,20.18 13.94,20.5 13.71,20.71C13.32,21.1 12.69,21.1 12.3,20.71L10.29,18.7C10.06,18.47 9.96,18.16 10,17.87V12H9.97L4.21,4.62C3.87,4.19 3.95,3.56 4.38,3.22C4.57,3.08 4.78,3 5,3V3H19V3C19.22,3 19.43,3.08 19.62,3.22C20.05,3.56 20.13,4.19 19.79,4.62L14.03,12H14Z"}))},t.NotEqualIcon=function(e){return i.default.createElement(o.default,Object.assign({},e),i.default.createElement("path",{d:"M14.08,4.61L15.92,5.4L14.8,8H19V10H13.95L12.23,14H19V16H11.38L9.92,19.4L8.08,18.61L9.2,16H5V14H10.06L11.77,10H5V8H12.63L14.08,4.61Z"}))},t.PasteIcon=function(e){return i.default.createElement(o.default,Object.assign({},e),i.default.createElement("path",{d:"M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm7 18H5V4h2v3h10V4h2v16z"}))}},8193:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(7294)),o=r(n(3957)),a=r(n(3912)),s=r(n(7237)),l=r(n(2719)),u=r(n(2411)),c=r(n(6248)),d=r(n(814)),h=r(n(6222)),f=r(n(4566)),p=r(n(9487)),m=r(n(2527)),g=r(n(6692)),v=r(n(5249)),y=r(n(5190)),b=r(n(64)),w=r(n(9069)),E=r(n(400)),_=n(4007),C=n(8939),S=n(3374);t.default=function(e){const t=_.globalStyles(),n=e.appContext.getCollectionStore(),[r,x]=i.default.useState(function(){const t={needsOverwrite:!1,overWriteAll:!1,confirmWindowStates:[]};return n.compareWindows(e.windows).map((e=>{e.compareState==S.CompareWindowState.ChangedWindow&&(t.needsOverwrite=!0),t.confirmWindowStates.push({expanded:!1,overWrite:!1,compareWindowResult:e})})),t}()),T=n.compareWindows(e.windows).filter((e=>e.compareState==S.CompareWindowState.ChangedWindow)).length>0;function I(e,n,r,a){return i.default.createElement(i.default.Fragment,{key:a},i.default.createElement(s.default,{display:"flex",flexDirection:"row",width:"100%"},i.default.createElement(s.default,null,n&&i.default.createElement(o.default,null),!n&&i.default.createElement(b.default,null)),i.default.createElement(s.default,{width:"5px"}),i.default.createElement(s.default,{fontStyle:"italic"},i.default.createElement(E.default,{className:t.tabTitle},e)),i.default.createElement(s.default,{width:"10px"}),i.default.createElement(s.default,null,i.default.createElement(E.default,{className:t.tabTitle},r))))}function k(e,t,n){return I("Tab:",e,t,n)}function O(e,t,n){return I("Tab Tag:",e,t,n)}function P(e,t,n){return I(e,!0,t,n)}function N(e,t,n){return I("Window Tag:",e,t,n)}let A=0;return i.default.createElement(u.default,{fullWidth:!1,maxWidth:"md",open:!0,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},i.default.createElement(h.default,{id:"alert-dialog-title"},"Restore"),i.default.createElement(d.default,{style:{minWidth:"300px"}},T&&i.default.createElement(v.default,null,i.default.createElement(y.default,{control:i.default.createElement(l.default,{id:"overWriteAll",checked:r.overWriteAll,onChange:()=>function(){const e=!r.overWriteAll;r.confirmWindowStates.map((t=>{t.compareWindowResult.compareState==S.CompareWindowState.ChangedWindow&&(t.overWrite=e)})),x(Object.assign(Object.assign({},r),{overWriteAll:e}))}(),color:"primary"}),label:"Overwrite all"}),i.default.createElement("br",null)),i.default.createElement(v.default,null,i.default.createElement("div",{className:t.panelContainer,style:{border:"1px solid",height:"400px",overflow:"scroll"}},r.confirmWindowStates.map(((e,n)=>{const a=e.compareWindowResult.windowChanges,u=e.compareWindowResult.window,c="overWrite"+n;return i.default.createElement(i.default.Fragment,{key:n},e.compareWindowResult.compareState==S.CompareWindowState.ChangedWindow&&i.default.createElement(p.default,{expanded:e.expanded,style:{margin:"0px"},className:t.panel,onClick:e=>e.stopPropagation()},i.default.createElement(m.default,{className:t.panelSummary,expandIcon:i.default.createElement(f.default,null),onClick:t=>{return n=e,r.confirmWindowStates.map((e=>{e.compareWindowResult.window.id==n.compareWindowResult.window.id&&(e.expanded=!n.expanded)})),void x(Object.assign({},r));var n}},i.default.createElement(s.default,{display:"flex",flexDirection:"row",width:"100%"},i.default.createElement(s.default,{width:"40px"},i.default.createElement(w.default,{title:"Overwrite"},i.default.createElement(l.default,{color:"primary",id:c,checked:e.overWrite,onClick:e=>e.stopPropagation(),onChange:t=>function(e,t){let n=t.target.checked,i=0,o=0;r.confirmWindowStates.map((t=>{t.compareWindowResult.window.id==e.compareWindowResult.window.id&&(t.overWrite=n),t.compareWindowResult.compareState==S.CompareWindowState.ChangedWindow&&(i+=1,t.overWrite&&(o+=1))}));let a=r.overWriteAll;a=0!=o&&o==i,x(Object.assign(Object.assign({},r),{overWriteAll:a}))}(e,t)}))),i.default.createElement(s.default,{style:{paddingTop:"10px"}},i.default.createElement(C.NotEqualIcon,null)),i.default.createElement(s.default,{width:"5px"}),i.default.createElement(s.default,{style:{paddingTop:"10px"}},i.default.createElement(E.default,{className:t.panelHeading},e.compareWindowResult.window.name)),i.default.createElement(s.default,{flexGrow:"1"}))),i.default.createElement(g.default,{className:t.panelDetail},i.default.createElement("div",{className:t.panelContainer},a.nameChange&&P("Window name:",u.name,A++),a.descriptionChange&&P("Window description:",u.description,A++),a.newTabs.map((e=>k(!0,e.name,A++))),a.deletedTabs.map((e=>k(!1,e.getName(),A++))),a.newTags.map((e=>N(!0,e,A++))),a.updatedTags.map((e=>N(!0,e,A++))),a.deletedTags.map((e=>N(!1,e,A++))),a.changedTabs.map((e=>e.newTags.map((e=>O(!0,e,A++))))),a.changedTabs.map((e=>e.updatedTags.map((e=>O(!0,e,A++))))),a.changedTabs.map((e=>e.deletedTags.map((e=>O(!1,e,A++)))))))),e.compareWindowResult.compareState!=S.CompareWindowState.ChangedWindow&&i.default.createElement(p.default,{expanded:!1,style:{margin:"0px"},className:t.panel,onClick:e=>e.stopPropagation()},i.default.createElement(m.default,{className:t.panelSummary,onClick:e=>e.stopPropagation()},i.default.createElement(s.default,{display:"flex",flexDirection:"row",width:"100%"},i.default.createElement(s.default,null,e.compareWindowResult.compareState==S.CompareWindowState.IdenticalWindow&&i.default.createElement(C.EqualIcon,null),e.compareWindowResult.compareState==S.CompareWindowState.NewWindow&&i.default.createElement(o.default,null)),i.default.createElement(s.default,{width:"40px"}),i.default.createElement(s.default,{width:"5px"}),i.default.createElement(s.default,null,i.default.createElement(E.default,{className:t.panelHeading},e.compareWindowResult.window.name))))))}))))),i.default.createElement(c.default,null,i.default.createElement(a.default,{id:"closeButton",onClick:()=>{e.handleClose()},color:"primary",autoFocus:!0},"Cancel"),i.default.createElement(a.default,{id:"saveButton",onClick:()=>{!function(){let t=[];r.confirmWindowStates.map((e=>{let n=e.compareWindowResult;switch(n.compareState){case S.CompareWindowState.ChangedWindow:e.overWrite&&t.push(n.window);break;case S.CompareWindowState.NewWindow:t.push(n.window)}})),n.restoreWindows(t),e.handleClose()}()},color:"primary",autoFocus:!0},"Save")))}},8392:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(7294)),o=r(n(3912)),a=r(n(2411)),s=r(n(6248)),l=r(n(814)),u=r(n(6222)),c=r(n(5249)),d=r(n(6366)),h=r(n(8193));t.default=function(e){const[t,n]=i.default.useState({error:"",windows:[]});return i.default.createElement("div",null,0==t.windows.length&&i.default.createElement(a.default,{fullWidth:!1,maxWidth:"md",open:!0,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},i.default.createElement(u.default,{id:"alert-dialog-title"},"Import"),i.default.createElement(l.default,{style:{minWidth:"300px"}},i.default.createElement(c.default,null,i.default.createElement("input",{style:{display:"none"},id:"fileUpload",type:"file",ref:e=>{},onChange:e=>function(e){let r=e.files,i=new FileReader;i.onload=function(r){let i=r.target.result.toString();e.value="";try{let e=JSON.parse(i);if(null==e.name)return void n(Object.assign(Object.assign({},t),{error:"Invalid file"}));n(Object.assign(Object.assign({},t),{windows:[e]}))}catch(e){n(Object.assign(Object.assign({},t),{error:e.message}))}},i.readAsText(r[0])}(e.target)}),i.default.createElement("label",{htmlFor:"fileUpload"},i.default.createElement(o.default,{variant:"contained",id:"selectFile",color:"primary",component:"span"},"Select file"))),i.default.createElement("br",null),i.default.createElement(c.default,null,""!=t.error&&i.default.createElement(d.default,{error:!0,disabled:!0,fullWidth:!0,type:"text",value:t.error}))),i.default.createElement(s.default,null,i.default.createElement(o.default,{id:"cancelButton",onClick:()=>{n(Object.assign(Object.assign({},t),{windows:[]})),e.handleClose()},color:"primary",autoFocus:!0},"Cancel"))),t.windows.length>0&&i.default.createElement(h.default,{appContext:e.appContext,handleClose:close,windows:t.windows}))}},9834:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(7294)),l=a(n(3912)),u=a(n(2411)),c=a(n(6248)),d=a(n(814)),h=a(n(8101)),f=a(n(6222)),p=a(n(5249)),m=n(4007),g=a(n(4709));t.default=function(e){const t=m.globalStyles(),[n,r]=s.useState({error:!1,license:"",message:""});return s.useEffect((()=>{fetch("./eula.html").then((e=>e.text())).then((e=>{r(Object.assign(Object.assign({},n),{license:e}))})).catch((e=>{r(Object.assign(Object.assign({},n),{error:!0,message:e.message}))}))}),[]),s.default.createElement("div",null,s.default.createElement(u.default,{fullWidth:!1,maxWidth:"md",open:!0,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},s.default.createElement(f.default,{id:"alert-dialog-title"},"License Agreement"),s.default.createElement(d.default,{style:{minWidth:"400px",maxWidth:"600px"}},n.error&&s.default.createElement(h.default,{id:"alert-dialog-description"},s.default.createElement(g.default,{severity:"error"},n.message)),!n.error&&s.default.createElement(p.default,{className:t.panelSummary},s.default.createElement("div",{className:t.panelContainer,style:{border:"1px solid",height:"400px",overflow:"scroll"}},""!=n.license&&s.default.createElement("div",{dangerouslySetInnerHTML:(i=n.license,{__html:i})})))),s.default.createElement(c.default,null,s.default.createElement(l.default,{id:"acceptLicenseButton",onClick:()=>{e.handleAccept()},color:"primary",autoFocus:!0},"Agree"))));var i}},8119:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(7294)),l=o(n(2043)),u=a(n(3957)),c=a(n(7237)),d=a(n(366)),h=a(n(4566)),f=a(n(9487)),p=a(n(2527)),m=a(n(6692)),g=a(n(5612)),v=a(n(9152)),y=a(n(1890)),b=a(n(7133)),w=a(n(6572)),E=a(n(9579)),_=a(n(3246)),C=a(n(3375)),S=a(n(9069)),x=a(n(400)),T=n(7623),I=n(4007),k=a(n(5479)),O=a(n(3739)),P=a(n(8203)),N=n(8939);t.default=function(e){const[t,n]=s.useState(!1),[r,i]=s.useState(!1),[o,a]=s.useState(!1),A=I.globalStyles(),D=e.window,R=e.appContext,M=e.searchState,L=M.result.getLiveWindowMap(),j=M.filter,F=j?L[D.getId()].tabMap:{},W=R.getClipBoard(),B=R.getLiveWindowStore(),z=R.getCollectionStore(),U=D.getChromeWindow(),V=D.getTabs(),Z=j?function(e){return Object.keys(e).length}(F):V.length;let $=B.isWindowExpanded(D),[q,H]=s.useState($),K=q?"Collapse":"Expand";function G(e){B.setWindowExpanded(e,!q),H(!q)}l.debug("Live window "+U.id+" expandedWindow "+$+" expanded "+q),$!=q&&H($);const Q="Minimise",Y="normal"==U.state?Q:"Restore",X=j?Z+" of "+V.length+" Tabs":Z+" Tabs",J=null==D.getParent()?"":" (Linked with "+function e(t){return null==t.getParent()?t.getName():e(t.getParent())}(D)+")";return s.default.createElement("div",{draggable:!0,className:A.panelContainer},t&&s.default.createElement(k.default,{handleCancel:function(){n(!1)},handleConfirm:function(){B.close(D,(()=>n(!1)))},title:"Close Window",text:"Are you sure you want to close the window?"}),r&&s.default.createElement(O.default,{data:{name:"",description:"",tags:[]},collectionStore:z,handleClose:function(){i(!1)},isValidWindowName:function(e){return 0==z.findWindowsByName(e).length},save:function(e){z.saveWindow(e.name,e.description,e.tags,D)},title:"Collection data"}),o&&s.default.createElement(P.default,{appContext:R,open:o,handleClose:function(){a(!1)},window:D}),s.default.createElement(f.default,{expanded:q,style:{margin:"0px"},className:A.panel},s.default.createElement(p.default,{className:A.panelSummary,onClick:e=>G(D),expandIcon:s.default.createElement(S.default,{title:K},s.default.createElement(h.default,{id:"expandButton",onClick:e=>{G(D)}}))},s.default.createElement(c.default,{display:"flex",flexDirection:"row"},s.default.createElement(c.default,null,s.default.createElement(S.default,{title:"Close"},s.default.createElement(y.default,{id:"closeButton",className:A.iconButton,onClick:e=>{n(!0),e.stopPropagation()}},s.default.createElement(d.default,null)))),s.default.createElement(c.default,{width:"5px"}),s.default.createElement(c.default,null,s.default.createElement(S.default,{title:"Save"},s.default.createElement(y.default,{id:"saveButton",className:A.iconButton,onClick:e=>{""!=J?a(!0):i(!0),e.stopPropagation()}},s.default.createElement(C.default,null)))),s.default.createElement(c.default,{width:"5px"}),s.default.createElement(c.default,null,s.default.createElement(S.default,{title:"Duplicate"},s.default.createElement(y.default,{id:"duplicateButton",className:A.iconButton,onClick:e=>{B.duplicateLiveWindow(D),e.stopPropagation()}},s.default.createElement(b.default,null)))),s.default.createElement(c.default,{width:"5px"}),s.default.createElement(c.default,null,s.default.createElement(S.default,{title:"Focus"},s.default.createElement(y.default,{id:"focusButton",className:A.iconButton,onClick:e=>{B.focusWindow(D),e.stopPropagation()}},s.default.createElement(g.default,null)))),s.default.createElement(c.default,{width:"5px"}),s.default.createElement(c.default,null,s.default.createElement(S.default,{title:"New Tab"},s.default.createElement(y.default,{id:"newTabButton",className:A.iconButton,onClick:e=>{B.addTab(D),e.stopPropagation()}},s.default.createElement(u.default,null)))),s.default.createElement(c.default,{width:"5px"}),s.default.createElement(c.default,null,s.default.createElement(S.default,{title:"Paste Tab"},s.default.createElement(y.default,{id:"pasteTabAtEndButton",className:A.iconButton,onClick:e=>{e.stopPropagation();const t=W.getTab();null!=t&&B.addTabAtEnd(D,t)}},s.default.createElement(N.PasteIcon,null)))),s.default.createElement(c.default,{width:"5px"}),s.default.createElement(c.default,null,s.default.createElement(S.default,{title:Y},s.default.createElement(y.default,{id:"minimizeButton",className:A.iconButton,onClick:e=>{Y===Q?B.minimize(D):B.restore(D),e.stopPropagation()}},Y===Q&&s.default.createElement(E.default,null),Y!=Q&&s.default.createElement(_.default,null)))),s.default.createElement(c.default,{width:"15px"}),s.default.createElement(c.default,null,s.default.createElement(x.default,{className:A.windowHeading},s.default.createElement(w.default,{href:"#",color:"inherit",underline:"none",onClick:()=>G(D)},U.focused&&s.default.createElement("span",null,"Current")," Window (",X,") ",J))))),s.default.createElement(m.default,{className:A.panelDetail},s.default.createElement("div",{className:A.panelContainer},V.map(((e,t)=>{const n=e.getChromeTab(),r=T.createTabId(D,n,t),i=j&&function(e,t){return null==t[e.getId()]}(e,F)?{style:{display:"none"}}:{};return s.default.createElement(s.default.Fragment,{key:t},s.default.createElement(c.default,Object.assign({display:"flex",id:r,flexDirection:"row",draggable:!0,onDragStart:e=>function(e){e.dataTransfer.setData("source",e.target.id)}(e),onDrop:e=>function(e){e.preventDefault();let t=e.dataTransfer.getData("source");null!=t&&T.dropTab(t,e.currentTarget.id,B,z,(e=>{}))}(e),onDragOver:e=>e.preventDefault(),onMouseOver:()=>{return e=r,void(document.getElementById(e).style.backgroundColor="white");var e},onMouseOut:()=>{return e=r,void(document.getElementById(e).style.backgroundColor=I.PANEL_BACKGROUND_COLOR);var e}},i),s.default.createElement(c.default,{width:"15px",className:A.noshrink}),s.default.createElement(c.default,null,s.default.createElement(S.default,{title:"Close"},s.default.createElement(y.default,{id:"closeTabButton",className:A.iconButton,onClick:t=>{B.deleteTab(D,e),t.stopPropagation()}},s.default.createElement(d.default,null)))),s.default.createElement(c.default,{width:"5px",className:A.noshrink}),s.default.createElement(c.default,{className:A.noshrink},s.default.createElement(S.default,{title:"Copy"},s.default.createElement(y.default,{id:"copyTabButton",className:A.iconButton,onClick:t=>{t.stopPropagation(),W.saveTab(e)}},s.default.createElement(N.CopyIcon,null)))),s.default.createElement(c.default,{width:"5px",className:A.noshrink}),s.default.createElement(c.default,{className:A.noshrink},s.default.createElement(S.default,{title:"Paste"},s.default.createElement(y.default,{id:"pasteTabButton",className:A.iconButton,onClick:e=>{e.stopPropagation();const t=W.getTab();null!=t&&B.addTabAtPosition(D,t,n.index+1)}},s.default.createElement(N.PasteIcon,null)))),s.default.createElement(c.default,{width:"5px",className:A.noshrink}),s.default.createElement(c.default,null,s.default.createElement(S.default,{title:"Focus"},s.default.createElement(y.default,{id:"focusTabButton",className:A.iconButton,onClick:t=>{B.restore(D),B.focusTab(e),t.stopPropagation()}},s.default.createElement(g.default,null)))),s.default.createElement(c.default,{width:"10px",className:A.noshrink}),s.default.createElement(c.default,null,null!=n.favIconUrl&&s.default.createElement(v.default,{classes:{root:A.iconRoot}},s.default.createElement("img",{className:A.imageIcon,src:n.favIconUrl})),null==n.favIconUrl&&s.default.createElement(v.default,null)),s.default.createElement(c.default,{width:"10px",className:A.noshrink}),s.default.createElement(c.default,null,null!=n.url&&s.default.createElement(w.default,{href:n.url,target:"_blank",className:A.url},s.default.createElement(x.default,{className:A.tabTitle},n.title)),null==n.url&&s.default.createElement(x.default,{className:A.tabTitle},n.title))))}))))))}},1259:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(7294)),l=o(n(2043)),u=a(n(1673)),c=a(n(9594)),d=a(n(7237)),h=a(n(366)),f=a(n(5025)),p=a(n(4566)),m=a(n(9487)),g=a(n(2527)),v=a(n(6692)),y=a(n(1890)),b=a(n(7133)),w=a(n(6572)),E=a(n(9069)),_=a(n(400)),C=n(4007),S=a(n(5479)),x=o(n(2980)),T=n(6050),I=a(n(8119)),k=n(6889),O=n(1802),P=a(n(2482));t.default=function(e){const t=C.globalStyles(),[n,r]=s.useState(!1),i=e.appContext,o=i.getAccountService(),a=i.getEventBus(),N=i.getLiveWindowStore(),A=e.searchState,D=A.result.getLiveWindowMap(),R=A.filter,M=!!R||N.isPanelExpanded(),[L,j]=s.useState(M),[F,W]=s.useState(!1),B=N.getWindows(),[z,U]=s.useState(!1),[V,Z]=s.default.useState(x.getNoErrorState());let $=L?"Collapse all":"Expand all",q=L?"Collapse":"Expand",H=R?Object.keys(D).length:B.length,K=R?"("+H+" of "+B.length+" contain your search term)":"("+H+")";function G(){const e=i.getSettingsStore().getLogin();""==e.getEmail()||F||o.getAccount(e).then((e=>{if(null==e.error){let t=e.account;null!=t&&o.isPaymentDue(t)&&W(!0)}else t=e.error,Z({column:0,error:!0,line:0,message:t.message,stackTrace:t.stack?t.stack:""});var t}))}function Q(){U(!1)}function Y(){N.setPanelExpanded(!L),j(!L)}l.debug("LiveWindowPanel expanded: "+L),s.useEffect((()=>{function e(){l.debug("Live Window update "+n),G(),r(!n)}return a.addEventListener(O.MessageType.LiveWindowUpdate,e),a.addEventListener(O.MessageType.Resize,e),a.addEventListener(O.MessageType.Login,G),()=>{a.removeEventListener(O.MessageType.LiveWindowUpdate,e),a.removeEventListener(O.MessageType.Resize,e),a.removeEventListener(O.MessageType.Login,G)}}),[n]);let X={maxHeight:document.getElementById(k.LayoutComponent.WindowContainer).getBoundingClientRect().height-64+"px"};return s.default.createElement("div",{className:t.panelContainer},V.error&&s.default.createElement(x.default,Object.assign({},V,{appContext:i,handleClose:null})),z&&s.default.createElement(S.default,{handleCancel:Q,handleConfirm:function(){N.closeAllWindows(),Q()},title:"Close All Windows",text:"Are you sure you want to close all windows?"}),F&&s.default.createElement(P.default,Object.assign({},T.paymentProps,{appContext:i,handleClose:function(){W(!1)}})),s.default.createElement(m.default,{expanded:L,style:{margin:"0px"},className:t.panel},s.default.createElement(g.default,{className:t.windowSummary,onClick:e=>Y(),"aria-controls":"panel1a-content",id:"panel1a-header"},s.default.createElement(d.default,{display:"flex",flexDirection:"row",width:"100%"},s.default.createElement(d.default,null,s.default.createElement(E.default,{title:"New Window"},s.default.createElement(y.default,{id:"newWindowButton",className:t.iconButton,onClick:e=>{N.newWindow(),e.stopPropagation()}},s.default.createElement(b.default,null)))),s.default.createElement(d.default,{width:"5px"}),s.default.createElement(d.default,null,s.default.createElement(E.default,{title:"Close All Windows"},s.default.createElement(y.default,{id:"closeButton",className:t.iconButton,onClick:e=>{U(!0),e.stopPropagation()}},s.default.createElement(h.default,null)))),s.default.createElement(d.default,{width:"10px"}),s.default.createElement(d.default,null,s.default.createElement(_.default,{className:t.panelHeading},s.default.createElement(w.default,{href:"#",color:"inherit",underline:"none",onClick:()=>Y()},"Windows ",K))),s.default.createElement(d.default,{flexGrow:"1"}),s.default.createElement(d.default,null,s.default.createElement(E.default,{title:$},s.default.createElement(y.default,{id:"expandAllWindowButton",className:t.iconButton,onClick:e=>{!function(){let e=!L;N.setWindowsExpanded(B,e),N.setPanelExpanded(e),j(e)}(),e.stopPropagation()}},L&&s.default.createElement(c.default,null),!L&&s.default.createElement(u.default,null)))),s.default.createElement(d.default,{width:"5px"}),s.default.createElement(d.default,null,s.default.createElement(E.default,{title:q},s.default.createElement(y.default,{id:"expandWindowButton",className:t.iconButton,onClick:e=>{Y(),e.stopPropagation()}},L&&s.default.createElement(f.default,null),!L&&s.default.createElement(p.default,null)))))),s.default.createElement(v.default,{className:t.windowDetail,style:X},B.map(((e,t)=>{let n=!0;return R&&(n=null!=D[e.getId()]),s.default.createElement(s.default.Fragment,{key:t},n&&s.default.createElement(I.default,{appContext:i,searchState:A,window:e}))})))))}},2974:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(7294)),l=a(n(5479)),u=o(n(2980)),c=n(772),d=n(8280),h=n(7849),f=a(n(983)),p=n(1802),m=n(4031);t.default=function(e){const t=e.appContext,n=t.getAuthenticationService(),r=t.getAccountService(),i=t.getSettingsStore(),[o,a]=s.useState(""),[g,v]=s.default.useState(!0),[y,b]=s.default.useState(u.getNoErrorState()),[w,E]=s.useState(function(){let e=i.getLogin(),t=e.getEmail(),r=(e.getPassword(),""==e.getEmail()),a=!1;return r||""==t?a=!0:!y.error&&g&&""==o&&function(e){let t=e.getEmail(),r=e.getPassword();n.isAlreadyRegistered(t).then((t=>{v(!1),t?n.login(e.getEmail(),r,(t=>{t.error&&""==w.loginError?E(Object.assign(Object.assign({},w),{loginError:t.message,showLogin:!0,verified:t.verified})):I(e)})):E(Object.assign(Object.assign({},w),{loginError:"Not registered",register:!0,showLogin:!0}))})).catch((e=>{T(e)}))}(e),{allowCancel:!1,login:e,loginError:"",register:r,showLogin:a,toast:"",verified:!0}}()),[_,C]=s.useState(!1),S=t.getEventBus();function x(e){const t=e?new d.Login("",""):w.login;C(!1),E(Object.assign(Object.assign({},w),{login:t,register:e,showLogin:!0}))}function T(e){b({column:0,error:!0,line:0,message:e.message,stackTrace:e.stack?e.stack:""})}function I(e){r.getAccount(e).then((t=>{null!=t.error?T(t.error):(null!=t.account&&t.account.updateLastLogin(),S.sendMessage(new f.default(e)),E(Object.assign(Object.assign({},w),{login:e,loginError:"",showLogin:!1})))}))}s.useEffect((()=>{function e(){let e=new d.Login(w.login.getEmail(),"");i.setLogin(e),r.logout(),C(!0),E(Object.assign(Object.assign({},w),{login:e,showLogin:!1}))}return S.addEventListener(p.MessageType.Logout,e),()=>{S.removeEventListener(p.MessageType.Logout,e)}}),[w]);const k={allowCancel:w.allowCancel,authService:n,loginError:w.loginError,open:w.showLogin,handleCancel:function(){},handleLogin:function(e){const t=new d.Login(e.email,e.password);i.setLogin(t),I(t)},handleLoginError:function(e){const t=new d.Login(e.email,e.password);E(Object.assign(Object.assign({},w),{login:t,loginError:e.message,register:!e.registered,showLogin:!0}))},handleRegistration:function(e){const t=e.email,n=(e.password,new d.Login(e.email,e.password));e.error?E(Object.assign(Object.assign({},w),{login:n,loginError:e.message,register:!e.registered,showLogin:!0})):(i.setLogin(n),v(!1),E(Object.assign(Object.assign({},w),{login:n,loginError:"",register:!1,showLogin:!1})),r.getSystemSettings().then((e=>{let n="An email has been sent to "+t+". Please verify your email";if(!e.error){const t=e.systemSettings,r=t.trialPeriodDays,i=t.annualSubscriptionPrice,o=t.annualSubscription;if(r>0&&(n+=" to start your "+r+" day trial. "),i>0){const e=o?"year":"month";n+="The subscription price is £"+c.formatCurrency(i)+" per "+e+"."}a(n)}})))},handleResendEmailVerification:function(e){E(Object.assign(Object.assign({},w),{toast:"Email verification has been resent to "+e.email}))},handleResetPassword:function(e){E(Object.assign(Object.assign({},w),{toast:"Password reset email sent to "+e.email}))},login:w.login,register:w.register,verified:w.verified};return s.default.createElement(s.default.Fragment,null,_&&s.default.createElement(l.default,{cancelTitle:"Register",okTitle:"Login",handleCancel:()=>x(!0),handleConfirm:()=>x(!1),title:"You have logged out",text:"Please Login or Register a new user"}),y.error&&s.default.createElement(u.default,Object.assign({},y,{appContext:t,handleClose:null})),w.showLogin&&s.default.createElement(h.LoginDialog,Object.assign({},k)),""!=w.toast&&s.default.createElement(m.Toast,{duration:3e3,handleClose:function(){E(Object.assign(Object.assign({},w),{toast:""}))},message:w.toast,open:!0,severity:"success",title:"Login"}),""!=o&&s.default.createElement(l.default,{handleConfirm:function(){a(""),E(Object.assign(Object.assign({},w),{register:!1,showLogin:!0}))},text:o,title:"Welcome"}))}},5827:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(7294)),l=a(n(7237)),u=a(n(3912)),c=a(n(8428)),d=a(n(2411)),h=a(n(6248)),f=a(n(814)),p=a(n(6222)),m=a(n(4566)),g=a(n(9487)),v=a(n(2527)),y=a(n(6692)),b=a(n(5249)),w=a(n(1890)),E=a(n(3375)),_=a(n(6366)),C=a(n(9069)),S=a(n(400)),x=n(4007);t.default=function(e){const t=x.globalStyles(),[n,r]=s.useState(function(){let t=[];return e.messages.map(((e,n)=>{let r={expanded:!1,key:n,message:e,save:!0,title:"",windowProps:null};try{let t=JSON.parse(e.getBody());null!=t.name&&(r.title=t.name,r.windowProps=t)}catch(e){}t.push(r)})),{messageStates:t}}());function i(t){let i=n.messageStates.filter((e=>e.message.getId()!=t.message.getId()));0==i.length?e.handleClose():r({messageStates:i})}return s.default.createElement("div",null,s.default.createElement(d.default,{fullWidth:!1,maxWidth:"md",open:!0,"aria-labelledby":"message-dialog-title","aria-describedby":"message-dialog-description"},s.default.createElement(p.default,{id:"message-dialog-title"},"Shared Collections"),s.default.createElement(f.default,{dividers:!0},s.default.createElement(b.default,{className:t.panelSummary},s.default.createElement("div",{className:t.panelContainer,style:{border:"1px solid",height:"400px",overflow:"scroll"}},n.messageStates.map(((o,a)=>{let u=o.title+" shared by "+o.message.getFromEmail();return s.default.createElement(s.default.Fragment,{key:a},s.default.createElement(g.default,{expanded:o.expanded,style:{margin:"0px"},className:t.panel,onClick:e=>e.stopPropagation()},s.default.createElement(v.default,{className:t.panelSummary,onClick:e=>function(e){e.expanded=!e.expanded,r(Object.assign({},n))}(o),expandIcon:s.default.createElement(m.default,{id:"expandButton"})},s.default.createElement(l.default,{display:"flex",flexDirection:"row",width:"100%"},s.default.createElement(l.default,null,s.default.createElement(C.default,{title:"Delete"},s.default.createElement(w.default,{id:"deleteButton",className:t.iconButton,onClick:t=>{!function(t){e.handleDeleteMessage(t.message),i(t)}(o),t.stopPropagation()}},s.default.createElement(c.default,null)))),s.default.createElement(l.default,{width:"5px"}),s.default.createElement(l.default,null,s.default.createElement(C.default,{title:"Save"},s.default.createElement(w.default,{id:"saveButton",className:t.iconButton,onClick:t=>{!function(t){e.handleSaveMessage(t.message,t.windowProps),i(t)}(o),t.stopPropagation()}},s.default.createElement(E.default,null)))),s.default.createElement(l.default,{width:"10px"}),s.default.createElement(l.default,{style:{paddingTop:"0px"}},s.default.createElement(S.default,{className:t.panelHeading},u)))),s.default.createElement(y.default,{className:t.panelDetail},s.default.createElement("div",{className:t.panelContainer},s.default.createElement(_.default,{autoFocus:!0,disabled:!0,margin:"dense",multiline:!0,rows:10,fullWidth:!0,variant:"outlined",value:o.message.getText()})))))}))))),s.default.createElement(h.default,null,s.default.createElement(u.default,{id:"closeButton",color:"primary",onClick:()=>{e.handleClose()}},"Close"))))}},2482:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(7294)),l=n(5828),u=a(n(4709)),c=a(n(3912)),d=a(n(2411)),h=a(n(6248)),f=a(n(814)),p=a(n(6222)),m=a(n(202)),g=a(n(4023)),v=a(n(9169)),y=a(n(4781)),b=a(n(3141)),w=a(n(6366)),E=n(772),_=n(4007),C=n(1802),S=a(n(5882)),x=l.makeStyles((e=>({field:{width:150},formControl:{margin:e.spacing(1),minWidth:100}})));t.default=function(e){const t=x(),n="£",r=_.globalStyles(),i=e.appContext.getAccountService(),o=i.getAccountData(),a=o.account;let l=o.systemSettings;const T=l.annualCollectionMultiple,I=l.annualCollectionMultipleCost,k=new Date,O=new Date(k.getTime()+365*C.ONE_DAY_MS),[P,N]=s.useState(function(){let e="",t=0,r=O,i=0,o=[],s=0;if(null==a)e="Cannot retrieve account";else if(null==l)e="Cannot retrieve account settings";else{t=a.isPaymentDue()?l.annualSubscriptionPrice:0,i=a.getBackupPurchased(),s=a.isPaymentDue()?L(i):0,a.isPaymentDue()||(r=a.getPaymentDueDate());for(let e=0;e<=l.maxCloudCollections;e+=T){const t=0==e?0:e/T*I,r=0==e?e:e+" ("+n+E.formatCurrency(t)+")";o.push({total:e,option:r.toString()})}}return l.retired&&(e="ForgetMeNot is no longer available for purchase"),{annualCloudStoragePayment:s,annualSubscriptionPayment:t,cloudStorageCollections:i,cloudStorageOptions:o,errorMessage:e,nextPaymentDate:r,paid:!1,pay:!1,paymentMessage:""}}()),A=e.appContext.getSettingsStore().getLogin(),D="340px",R="400px";function M(e){return e/T*I}function L(e){if(!a.isPaymentDue()){if(e<=a.getBackupPurchased()||0==e)return 0;const t=(O.getTime()-a.getPaymentDueDate().getTime())/C.ONE_DAY_MS,n=M(a.getBackupPurchased())/365*t;return M(e-a.getBackupPurchased())+n}return e>0?e/T*I:0}function j(e){setTimeout((()=>{N(Object.assign(Object.assign({},P),{pay:e}))}),500)}s.useEffect((()=>{i.getSystemSettings(!0).then((e=>{e.error||(l=e.systemSettings)}))}),[]);const F=l.annualSubscription?"Annual ":" Monthly ",W=P.paid?"Paid":a.isPaymentDue()?F+"Payment is due":F+"Payment",B=Math.round(P.annualSubscriptionPayment+P.annualCloudStoragePayment),z=a.isPaymentDue()?"Annual subscription due since "+E.formatDate(P.nextPaymentDate):"Annual subscription is paid until "+E.formatDate(P.nextPaymentDate),U="Number of collections currently bought: "+a.getBackupPurchased();if(P.pay){const t={};t.backupPurchased=P.cloudStorageCollections,t.nextPaymentDate=P.nextPaymentDate.toString();const r={amount:B,collectPayment:function(t,n){e.collectPayment(i,t).then((e=>{n(e)})).catch((e=>{N(Object.assign(Object.assign({},P),{pay:!1,errorMessage:"Error calling Stripe: "+e.message}))}))},completePayment:function(t,n){if(n){const n={backupPurchased:P.cloudStorageCollections,email:t.payment.email,paymentDueDate:P.nextPaymentDate.getTime(),paymentResult:t};e.completePayment(i,n).then((e=>{""==e.errorMessage?N(Object.assign(Object.assign({},P),{paid:!0,pay:!1,paymentMessage:"Thank Your for your payment"})):N(Object.assign(Object.assign({},P),{pay:!1,errorMessage:e.errorMessage}))})).catch((e=>{N(Object.assign(Object.assign({},P),{pay:!1,errorMessage:"Error completing payment: "+e.message}))}))}else N(Object.assign(Object.assign({},P),{pay:!1,errorMessage:"Cannot make payment"}))},currency:"GBP",currencySymbol:n,description:"ForgetMeNot subscription",handleCancel:function(){j(!1)},height:D,login:A,metadata:t,stripeKey:l.stripeKey,width:R};return s.default.createElement(S.default,Object.assign({},r))}if(P.paid)return i.getAccount(A,!0),s.default.createElement(d.default,{open:!0,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},s.default.createElement(p.default,{id:"alert-dialog-title"},W),s.default.createElement(f.default,null,s.default.createElement(u.default,{severity:"success"},P.paymentMessage)),s.default.createElement(h.default,null,s.default.createElement(c.default,{id:"closePayButton",onClick:()=>{e.handleClose()},color:"primary",autoFocus:!0},"Close")));const V=0==B||l.retired,Z=0==B&&0==P.cloudStorageCollections&&o.account.getBackupPurchased()>0;return s.default.createElement("div",null,s.default.createElement(d.default,{open:!0,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},s.default.createElement(p.default,{id:"alert-dialog-title"},W),s.default.createElement(f.default,{dividers:!0,style:{height:D,width:R}},0==P.annualSubscriptionPayment&&s.default.createElement(m.default,{fullWidth:!0,variant:"outlined"},s.default.createElement(w.default,{id:"subscription",disabled:!0,value:z,variant:"outlined",InputProps:{className:r.boldText}})),0!=P.annualSubscriptionPayment&&s.default.createElement(m.default,{variant:"outlined",className:t.formControl},s.default.createElement(v.default,{htmlFor:"annual-sub"},"Subscription"),s.default.createElement(y.default,{id:"annual-sub",className:t.field,disabled:!0,value:E.formatCurrency(P.annualSubscriptionPayment),startAdornment:s.default.createElement(g.default,{position:"start"},n),labelWidth:60})),s.default.createElement("br",null),s.default.createElement("br",null),s.default.createElement(m.default,{fullWidth:!0,variant:"outlined"},s.default.createElement(w.default,{id:"purchased-collections",disabled:!0,value:U,variant:"outlined",InputProps:{className:r.boldText}})),s.default.createElement("br",null),s.default.createElement("br",null),s.default.createElement("div",{style:{display:"inline-block"}},s.default.createElement(m.default,{variant:"outlined",className:t.formControl},s.default.createElement(v.default,{htmlFor:"collections"},"Collections"),s.default.createElement(b.default,{native:!0,className:t.field,value:P.cloudStorageCollections,onChange:function(e){let t=parseInt(e.target.value),n=L(t);if(!a.isPaymentDue())if(t<=a.getBackupPurchased())P.nextPaymentDate=a.getPaymentDueDate(),P.annualSubscriptionPayment=0;else{let e=(O.getTime()-a.getPaymentDueDate().getTime())/C.ONE_DAY_MS,t=l.annualSubscriptionPrice/365*e;P.nextPaymentDate=O,P.annualSubscriptionPayment=t}N(Object.assign(Object.assign({},P),{cloudStorageCollections:t,annualCloudStoragePayment:n}))},inputProps:{name:"collections",id:"collections"}},P.cloudStorageOptions.map(((e,t)=>s.default.createElement("option",{value:e.total,key:t},e.option))))),s.default.createElement(m.default,{variant:"outlined",className:t.formControl},s.default.createElement(v.default,{htmlFor:"cloud-cost"},"Cloud storage cost"),s.default.createElement(y.default,{id:"cloud-cost",className:t.field,disabled:!0,value:E.formatCurrency(P.annualCloudStoragePayment),startAdornment:s.default.createElement(g.default,{position:"start"},n),labelWidth:60}))),s.default.createElement("div",null),s.default.createElement("div",{style:{display:"inline-block"}},s.default.createElement(m.default,{variant:"outlined",className:t.formControl},s.default.createElement(w.default,{disabled:!0,value:"Total",variant:"outlined",className:t.field,InputProps:{className:r.boldText}})),s.default.createElement(m.default,{variant:"outlined",className:t.formControl},s.default.createElement(w.default,{id:"total",className:t.field,disabled:!0,value:E.formatCurrency(B),variant:"outlined",InputProps:{startAdornment:s.default.createElement(g.default,{position:"start"},n)}}))),""!=P.errorMessage&&s.default.createElement("div",null,s.default.createElement(m.default,{fullWidth:!0,variant:"outlined"},s.default.createElement(u.default,{severity:"error"},P.errorMessage)))),s.default.createElement(h.default,null,e.handleCancel&&s.default.createElement(c.default,{id:"cancelButton",onClick:()=>{e.handleCancel()},color:"primary",autoFocus:!0},"cancel"),!Z&&s.default.createElement(c.default,{id:"payButton",disabled:V,onClick:()=>{j(!0)},color:"primary",autoFocus:!0},"Pay"),Z&&s.default.createElement(c.default,{onClick:()=>{!function(){const t={backupPurchased:0,email:A.getEmail(),paymentDueDate:P.nextPaymentDate.getTime(),paymentResult:null};e.completePayment(i,t).then((e=>{""==e.errorMessage?N(Object.assign(Object.assign({},P),{paid:!0,pay:!1,paymentMessage:"Your collections have been deleted"})):N(Object.assign(Object.assign({},P),{pay:!1,errorMessage:e.errorMessage}))})).catch((e=>{N(Object.assign(Object.assign({},P),{pay:!1,errorMessage:"Error completing payment: "+e.message}))}))}()},color:"primary",autoFocus:!0},"Delete Collections"))))}},8797:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.togglePanelExpansion=t.setPersistenceOverWriteWindow=t.setPersistenceOverWriteAll=void 0;const i=r(n(7294)),o=r(n(3957)),a=r(n(7237)),s=r(n(2719)),l=r(n(4566)),u=r(n(9487)),c=r(n(2527)),d=r(n(6692)),h=r(n(5249)),f=r(n(5190)),p=r(n(64)),m=r(n(9069)),g=r(n(400)),v=n(4007),y=n(8939),b=n(3374);t.setPersistenceOverWriteAll=function(e,t){e.map((e=>{e.compareWindowResult.compareState!=b.CompareWindowState.IdenticalWindow&&(e.overWrite=t)}))},t.setPersistenceOverWriteWindow=function(e,t,n){let r=0,i=0;return e.map((e=>{e.collectionName==t.collectionName&&(e.overWrite=n),e.compareWindowResult.compareState!=b.CompareWindowState.IdenticalWindow&&(r+=1,e.overWrite&&(i+=1))})),0!=i&&i==r},t.togglePanelExpansion=function(e,t){e.map((e=>{e.collectionName==t.collectionName&&(e.expanded=!t.expanded)}))},t.default=function(e){const t=v.globalStyles();function n(e,n,r,s){return i.default.createElement(i.default.Fragment,{key:s},i.default.createElement(a.default,{display:"flex",flexDirection:"row",width:"100%"},i.default.createElement(a.default,null,n&&i.default.createElement(o.default,null),!n&&i.default.createElement(p.default,null)),i.default.createElement(a.default,{width:"5px"}),i.default.createElement(a.default,{fontStyle:"italic"},i.default.createElement(g.default,{className:t.tabTitle},e)),i.default.createElement(a.default,{width:"10px"}),i.default.createElement(a.default,null,i.default.createElement(g.default,{className:t.tabTitle},r))))}function r(e,t,r){return n("Tab:",e,t,r)}function w(e,t,r){return n("Tab Tag:",e,t,r)}function E(t,r){return n(t,e.backup,"changed",r)}function _(e,t,r){return n("Window Tag:",e,t,r)}let C=0;return i.default.createElement(i.default.Fragment,null,e.needsOverwrite&&i.default.createElement(h.default,null,i.default.createElement(f.default,{control:i.default.createElement(s.default,{id:"overWriteAll",checked:e.overWriteAll,onChange:()=>e.setOverWriteAll(),color:"primary"}),label:e.overWriteAllLabel}),i.default.createElement("br",null)),i.default.createElement(h.default,null,i.default.createElement("div",{className:t.panelContainer,style:{border:"1px solid",height:"380px",overflow:"scroll"}},e.changes.map(((n,h)=>{const f=n.compareWindowResult.windowChanges,p=(n.compareWindowResult.window,"overWrite"+h);return i.default.createElement(i.default.Fragment,{key:h},n.compareWindowResult.compareState==b.CompareWindowState.ChangedWindow&&i.default.createElement(u.default,{expanded:n.expanded,style:{margin:"0px"},className:t.panel,onClick:e=>e.stopPropagation()},i.default.createElement(c.default,{className:t.panelSummary,expandIcon:i.default.createElement(l.default,null),onClick:t=>e.toggleExpanded(n)},i.default.createElement(a.default,{display:"flex",flexDirection:"row",width:"100%"},i.default.createElement(a.default,{width:"40px"},i.default.createElement(m.default,{title:"Overwrite"},i.default.createElement(s.default,{color:"primary",id:p,checked:n.overWrite,onClick:e=>e.stopPropagation(),onChange:t=>e.setOverWriteWindow(n,t)}))),i.default.createElement(a.default,{style:{paddingTop:"10px"}},i.default.createElement(y.NotEqualIcon,null)),i.default.createElement(a.default,{width:"5px"}),i.default.createElement(a.default,{style:{paddingTop:"10px"}},i.default.createElement(g.default,{className:t.panelHeading},n.collectionName)),i.default.createElement(a.default,{flexGrow:"1"}))),i.default.createElement(d.default,{className:t.panelDetail},i.default.createElement("div",{className:t.panelContainer},f.nameChange&&E("Window name",C++),f.changedPosition&&E("Window position",C++),f.descriptionChange&&E("Window description",C++),f.newTabs.map((t=>r(!e.backup,t.name,C++))),f.changedTabs.map((t=>{if(0==t.deletedTags.length&&0==t.newTags.length&&0==t.updatedTags.length)return r(e.backup,t.tab.getName(),C++)})),f.deletedTabs.map((t=>r(e.backup,t.getName(),C++))),f.newTags.map((t=>_(!e.backup,t,C++))),f.updatedTags.map((t=>_(!e.backup,t,C++))),f.deletedTags.map((t=>_(e.backup,t,C++))),f.changedTabs.map((t=>t.newTags.map((t=>w(!e.backup,t,C++))))),f.changedTabs.map((t=>t.updatedTags.map((t=>w(!e.backup,t,C++))))),f.changedTabs.map((t=>t.deletedTags.map((t=>w(e.backup,t,C++)))))))),n.compareWindowResult.compareState!=b.CompareWindowState.ChangedWindow&&i.default.createElement(u.default,{expanded:!1,style:{margin:"0px"},className:t.panel,onClick:e=>e.stopPropagation()},i.default.createElement(c.default,{className:t.panelSummary,onClick:e=>e.stopPropagation()},i.default.createElement(a.default,{display:"flex",flexDirection:"row",width:"100%"},n.compareWindowResult.compareState==b.CompareWindowState.NewWindow&&i.default.createElement(a.default,{width:"40px"},i.default.createElement(m.default,{title:"Overwrite"},i.default.createElement(s.default,{color:"primary",id:p,checked:n.overWrite,onClick:e=>e.stopPropagation(),onChange:t=>e.setOverWriteWindow(n,t)}))),n.compareWindowResult.compareState==b.CompareWindowState.IdenticalWindow&&i.default.createElement(a.default,{width:"40px"}),i.default.createElement(a.default,{style:{paddingTop:"10px"}},n.compareWindowResult.compareState==b.CompareWindowState.IdenticalWindow&&i.default.createElement(y.EqualIcon,null),n.compareWindowResult.compareState==b.CompareWindowState.NewWindow&&i.default.createElement(o.default,null)),i.default.createElement(a.default,{width:"5px"}),i.default.createElement(a.default,{style:{paddingTop:"10px"}},i.default.createElement(g.default,{className:t.panelHeading},n.collectionName))))))})))))}},9056:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(7294)),l=n(5828),u=a(n(3912)),c=a(n(2411)),d=a(n(6248)),h=a(n(814)),f=a(n(8101)),p=a(n(6222)),m=a(n(115)),g=o(n(8797)),v=n(3374),y=l.makeStyles((e=>({inputFile:{visibility:"hidden"}})));t.default=function(e){y();const t={changes:[],error:!1,loading:!1,message:"",needsOverwrite:!1,overWriteAll:!0},n=e.appContext.getPersistence(),[r,i]=s.useState(t);function o(e,t){return{collectionName:e,compareWindowResult:t,expanded:!1,overWrite:!0}}function a(e){i(Object.assign(Object.assign({},r),{error:!0,loading:!1,message:e}))}function l(e){e.sort(((e,t)=>e.collectionName.toUpperCase().localeCompare(t.collectionName.toUpperCase())))}return s.useEffect((()=>{e.open?(i(Object.assign(Object.assign({},r),{error:!1,loading:!0,message:"Accessing Cloud Storage"})),n.authorize((()=>{n.getCollectionNames((t=>{t.length>0?function(t){let s=e.appContext.getCollectionStore(),u=[],c=[];if(t.sort(((e,t)=>e.toUpperCase().localeCompare(t.toUpperCase()))),t.map((e=>{null!=s.findWindowByName(e)?u.push(e):c.push(o(e,m.default.getNewWindowCompareResult(null)))})),u.length>0)n.getCollections(u,!0,(e=>{for(let t=0;t<e.length;t++){let n=e[t],r=s.compareWindows([n]);c.push(o(n.name,r[0]))}const t=c.filter((e=>e.compareWindowResult.compareState!=v.CompareWindowState.IdenticalWindow)).length>0;l(c),i(Object.assign(Object.assign({},r),{changes:c,loading:!1,message:"",needsOverwrite:t}))}),(e=>{a(e)}));else{const e=c.filter((e=>e.compareWindowResult.compareState!=v.CompareWindowState.IdenticalWindow)).length>0;l(c),i(Object.assign(Object.assign({},r),{changes:c,loading:!1,message:"",needsOverwrite:e}))}}(t):a("No collections found")}),(e=>{a(e)}))}),(e=>{a(e)}))):i(t)}),[e.open]),s.default.createElement("div",null,e.open&&s.default.createElement(c.default,{fullWidth:!1,maxWidth:"md",open:e.open,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},s.default.createElement(p.default,{id:"alert-dialog-title"},"Restore"),s.default.createElement(h.default,{style:{minWidth:"300px",overflowY:"hidden"}},(r.error||r.loading)&&s.default.createElement(f.default,{id:"alert-dialog-description"},r.message),!r.error&&!r.loading&&s.default.createElement(g.default,{backup:!1,changes:r.changes,needsOverwrite:r.needsOverwrite,overWriteAll:r.overWriteAll,overWriteAllLabel:"Restore All",setOverWriteAll:function(){const e=!r.overWriteAll;g.setPersistenceOverWriteAll(r.changes,e),i(Object.assign(Object.assign({},r),{overWriteAll:e}))},setOverWriteWindow:function(e,t){let n=t.target.checked,o=g.setPersistenceOverWriteWindow(r.changes,e,n);i(Object.assign(Object.assign({},r),{overWriteAll:o}))},toggleExpanded:function(e){g.togglePanelExpansion(r.changes,e),i(Object.assign({},r))}})),!r.loading&&s.default.createElement(d.default,null,s.default.createElement(u.default,{id:"cancelButton",onClick:()=>{e.handleClose()},color:"primary"},"Cancel"),s.default.createElement(u.default,{id:"saveButton",onClick:()=>{!function(){if(!r.error){let o=e.appContext.getCollectionStore(),s=[];if(r.changes.map((e=>{e.overWrite&&e.compareWindowResult.compareState!=v.CompareWindowState.IdenticalWindow&&(null!=e.compareWindowResult.window?o.restoreWindows([e.compareWindowResult.window]):s.push(e.collectionName))})),s.length>0)return i(Object.assign(Object.assign({},r),{error:!1,loading:!0,message:"Reading files"})),void n.getCollections(s,!0,(n=>{o.restoreWindows(n),i(t),e.handleClose()}),(e=>{a(e)}))}i(t),e.handleClose()}()},color:"primary",autoFocus:!0},"OK"))))}},2910:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(7294)),l=n(5828),u=a(n(1890)),c=a(n(8995)),d=a(n(6366)),h=a(n(9069)),f=n(1802),p=a(n(5096)),m=a(n(892)),g=l.makeStyles((e=>({iconButton:{padding:"1px"},input:{color:"white"},search:{backgroundColor:l.fade(e.palette.common.white,.15),"&:hover":{backgroundColor:l.fade(e.palette.common.white,.25)},borderRadius:e.shape.borderRadius,marginLeft:"15px",paddingLeft:"5px",paddingRight:"5px"},searchIcons:{color:"white",display:"flex",marginRight:"5px"},textfield:{width:"40ch"}})));t.default=function(e){const t=g(),n=e.appContext,r=p.default.getDefaultSearchState(),i=n.getLiveWindowStore(),o=n.getCollectionStore(),a=n.getEventBus(),[l,v]=s.useState(r),y=l.term,b=y.length<1;function w(e){let t=i.search(e),n=o.search(e),r=t.tabs.concat(n.tabs);return new p.default(e,t.windowMap,n.windowMap,r)}function E(){v(r),e.search(r)}function _(e){let t=Object.assign(Object.assign({},l),{filter:!0,loading:!0,search:!0,term:e});v(t)}return s.useEffect((()=>(a.addEventListener(f.MessageType.ResetSearch,E),()=>{a.removeEventListener(f.MessageType.ResetSearch,E)})),[y]),s.useEffect((()=>{""!=e.term&&_(e.term)}),[e.term]),s.useEffect((()=>{function t(){if(l.filter||l.search){let t=Object.assign(Object.assign({},l),{result:w(y)});v(t),e.search(t)}}return a.addEventListener(f.MessageType.LiveWindowUpdate,t),a.addEventListener(f.MessageType.CollectionUpdate,t),()=>{a.removeEventListener(f.MessageType.LiveWindowUpdate,t),a.removeEventListener(f.MessageType.CollectionUpdate,t)}}),[l]),l.loading&&setTimeout((()=>{let t=w(l.term),n=Object.assign(Object.assign({},l),{filter:!0,loading:!1,search:!0,result:t});v(n),e.search(n)}),500),s.default.createElement("div",{className:t.search},l.loading&&s.default.createElement(m.default,null),s.default.createElement(d.default,{id:"searchInput",onChange:function(e){""==e.target.value?E():v(Object.assign(Object.assign({},l),{term:e.target.value}))},onKeyPress:function(e){"Enter"===e.key&&(b||_(l.term),e.preventDefault())},className:t.textfield,type:"search",variant:"standard",margin:"none",value:y,InputProps:{className:t.input,disableUnderline:!0,startAdornment:s.default.createElement("div",{className:t.searchIcons},s.default.createElement(h.default,{title:"Search"},s.default.createElement("div",null,s.default.createElement(u.default,{id:"searchButton",disabled:b,className:t.iconButton,color:"inherit",onClick:e=>{_(l.term),e.stopPropagation()}},s.default.createElement(c.default,null)))))}}))}},7124:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(7294)),l=o(n(2043)),u=a(n(7237)),c=a(n(366)),d=a(n(5025)),h=a(n(4566)),f=a(n(9487)),p=a(n(2527)),m=a(n(6692)),g=a(n(9152)),v=a(n(1890)),y=a(n(6572)),b=a(n(9069)),w=a(n(400)),E=n(4007),_=n(8939),C=n(6889),S=n(1802);t.default=function(e){const t=E.globalStyles(),[n,r]=s.useState(!1),i=e.appContext,o=i.getClipBoard(),a=i.getEventBus(),x=e.searchState.result,T=x.getTabs();let[I,k]=s.useState(!0);const O=I?"Collapse":"Expand";l.debug("SearchResultPanel : "+I),s.useEffect((()=>{function e(){l.debug("Search Panel update "+n),r(!n)}return a.addEventListener(S.MessageType.Resize,e),()=>{a.removeEventListener(S.MessageType.Resize,e)}}),[n]);let P={maxHeight:document.getElementById(C.LayoutComponent.SearchContainer).getBoundingClientRect().height-64+"px"};return s.default.createElement("div",{className:t.panelContainer},s.default.createElement(f.default,{expanded:I,style:{margin:"0px"},className:t.panel},s.default.createElement(p.default,{className:t.searchSummary,onClick:e=>k(!I),"aria-controls":"panel1a-content",id:"panel1a-header"},s.default.createElement(u.default,{display:"flex",flexDirection:"row",width:"100%"},s.default.createElement(u.default,null,s.default.createElement(w.default,{className:t.panelHeading},"Found ",T.length,' tabs containing "',x.getTerm(),'"')),s.default.createElement(u.default,{flexGrow:"1"}),s.default.createElement(u.default,null,s.default.createElement(b.default,{title:"Close"},s.default.createElement(v.default,{id:"closeButton",className:t.iconButton,onClick:e=>{a.sendMessage({messageType:S.MessageType.ResetSearch}),e.stopPropagation()}},s.default.createElement(c.default,null)))),s.default.createElement(u.default,{width:"5px"}),s.default.createElement(u.default,null,s.default.createElement(b.default,{title:O},s.default.createElement(v.default,{id:"expandButton",className:t.iconButton,onClick:e=>{k(!I),e.stopPropagation()}},I&&s.default.createElement(d.default,null),!I&&s.default.createElement(h.default,null)))))),s.default.createElement(m.default,{className:t.windowDetail,style:P},s.default.createElement("div",{className:t.panelContainer},T.map(((e,n)=>{let r=e.getChromeTab();return s.default.createElement(s.default.Fragment,{key:n},s.default.createElement(u.default,{display:"flex",flexDirection:"row"},s.default.createElement(u.default,{width:"15px"}),s.default.createElement(u.default,null,s.default.createElement(b.default,{title:"Copy"},s.default.createElement(v.default,{className:t.iconButton,onClick:t=>{t.stopPropagation(),o.saveTab(e)}},s.default.createElement(_.CopyIcon,null)))),s.default.createElement(u.default,{width:"15px"}),s.default.createElement(u.default,null,null!=r.favIconUrl&&s.default.createElement(g.default,{classes:{root:t.iconRoot}},s.default.createElement("img",{className:t.imageIcon,src:r.favIconUrl})),null==r.favIconUrl&&s.default.createElement(g.default,null)),s.default.createElement(u.default,{width:"10px"}),s.default.createElement(u.default,null,null!=r.url&&s.default.createElement(y.default,{href:r.url,target:"_blank",className:t.url},s.default.createElement(w.default,{className:t.tabTitle},r.title)),null==r.url&&s.default.createElement(w.default,{className:t.tabTitle},r.title))))}))))))}},3814:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(7294)),l=n(5828),u=a(n(4709)),c=a(n(7237)),d=a(n(3912)),h=a(n(2411)),f=a(n(6248)),p=a(n(814)),m=a(n(6222)),g=a(n(5190)),v=a(n(5249)),y=a(n(5574)),b=l.makeStyles((e=>({divider:{padding:"10px"}})));t.default=function(e){const t=b(),[n,r]=s.useState({menuTabTags:e.appContext.getSettingsStore().getMenuTabTags(),message:""}),i=e.appContext.getSettingsStore().getMenuTabTags();return s.default.createElement("div",null,s.default.createElement(h.default,{fullWidth:!1,maxWidth:"md",open:!0,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},s.default.createElement(m.default,{id:"alert-dialog-title"},"Settings"),s.default.createElement(p.default,{dividers:!0},s.default.createElement(v.default,null,s.default.createElement(c.default,{flexDirection:"column"},s.default.createElement(c.default,{border:1,className:t.divider},s.default.createElement(g.default,{control:s.default.createElement(y.default,{checked:i,id:"menuTabTagsButton",onChange:function(t){const i=t.target.checked;r(Object.assign(Object.assign({},n),{menuTabTags:i})),e.handleMenuTabTagChange(i)},name:"menuTabTags"}),label:"Include Tab Tags in Side Menu"})),s.default.createElement(c.default,{border:1,className:t.divider},s.default.createElement(d.default,{id:"resetLayoutButton",variant:"contained",onClick:()=>{r(Object.assign(Object.assign({},n),{message:"Reload to return to default layout"})),e.handleResetLayout()},color:"primary",autoFocus:!0},"Reset Layout")),""!=n.message&&s.default.createElement(s.default.Fragment,null,s.default.createElement(c.default,{border:1,className:t.divider},s.default.createElement(u.default,{severity:"success"},n.message)))))),s.default.createElement(f.default,null,s.default.createElement(d.default,{id:"closeButton",onClick:()=>{e.handleClose()},color:"primary",autoFocus:!0},"Close"))))}},9512:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(7294)),l=a(n(3912)),u=a(n(2411)),c=a(n(6248)),d=a(n(814)),h=a(n(6222)),f=a(n(6366)),p=n(228),m=n(8280),g=a(n(3824));t.default=function(e){const[t,n]=s.useState({email:"",emailError:!1,emailErrorMessage:"",message:""}),r=s.useRef(null);s.useEffect((()=>{n({email:"",emailError:!1,emailErrorMessage:"",message:""})}),[e.open]);let i="Share Collection "+e.window.getName();return s.default.createElement("div",null,e.open&&s.default.createElement(u.default,{fullWidth:!1,maxWidth:"md",open:e.open,"aria-labelledby":"save-dialog-title","aria-describedby":"save-dialog-description"},s.default.createElement(h.default,{id:"save-dialog-title"},i),s.default.createElement(d.default,{dividers:!0},s.default.createElement(f.default,{id:"from",autoFocus:!0,disabled:!0,margin:"dense",label:"Enter from",type:"email",fullWidth:!0,variant:"outlined",value:e.login.getEmail()}),s.default.createElement(f.default,{id:"to",autoFocus:!0,error:t.emailError,helperText:t.emailErrorMessage,inputRef:r,onChange:function(e){n(Object.assign(Object.assign({},t),{emailError:!1,emailErrorMessage:"",email:e.target.value}))},margin:"dense",label:"Enter to",type:"email",fullWidth:!0,variant:"outlined",value:t.email}),s.default.createElement(f.default,{id:"message",autoFocus:!0,onChange:function(e){n(Object.assign(Object.assign({},t),{message:e.target.value}))},margin:"dense",label:"Enter message",multiline:!0,rows:10,fullWidth:!0,variant:"outlined",value:t.message})),s.default.createElement(c.default,null,s.default.createElement(l.default,{id:"cancelButton",color:"primary",onClick:()=>{e.handleClose()}},"Cancel"),s.default.createElement(l.default,{id:"sendButton",disabled:!(""!=t.email&&""!=t.message),color:"primary",autoFocus:!0,onClick:()=>{!function(){if(function(){let e=t.email;return!(""==e||!r.current.checkValidity()||e.indexOf("+")>=0)||(n(Object.assign(Object.assign({},t),{emailError:!0,emailErrorMessage:"Invalid email"})),!1)}()){let r=new m.Login(t.email,"");e.appContext.getAccountService().findAccount(r).then((r=>{const i=r.account;if(null!=i)if(0==i.getBackupPurchased())n(Object.assign(Object.assign({},t),{emailError:!0,emailErrorMessage:"User has not bought cloud storage"}));else{let n={body:JSON.stringify(e.window,null,2),from:e.login.getEmail(),id:g.default(),text:t.message,to:t.email},r=new p.Message(n);e.handleSend(r,e.window)}else n(Object.assign(Object.assign({},t),{emailError:!0,emailErrorMessage:"Unknown user"}))}))}}()}},"Send"))))}},892:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(525)),o=r(n(7294)),a=n(5828).makeStyles((e=>({visible:{display:"block",left:"45%",position:"fixed",top:"45%"}})));t.default=function(){const e=a();return o.default.createElement("div",{className:e.visible},o.default.createElement(i.default,{radius:80,color:"#333",stroke:5,visible:!0}))}},873:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(7294)),l=a(n(3592)),u=a(n(3912)),c=a(n(5851)),d=a(n(2411)),h=a(n(6248)),f=a(n(814)),p=a(n(6222)),m=a(n(6366));t.default=function(e){const[t,n]=s.useState(Object.assign(Object.assign({},e.data),{toggle:!1,message:""}));function r(e){return e.replace(/[^\x20-\x7E]/g,"")}return s.useEffect((()=>{n(Object.assign(Object.assign({},t),e.data))}),[e.data]),s.default.createElement("div",null,e.open&&s.default.createElement(d.default,{fullWidth:!1,maxWidth:"md",open:e.open,"aria-labelledby":"save-dialog-title","aria-describedby":"save-dialog-description"},s.default.createElement(p.default,{id:"save-dialog-title"},e.title),s.default.createElement(f.default,{dividers:!0},s.default.createElement(m.default,{autoFocus:!0,error:t.toggle,helperText:t.message,onChange:function(e){n(Object.assign(Object.assign({},t),{toggle:!1,message:"",name:e.target.value}))},margin:"dense",id:"name",label:"Name",type:"text",fullWidth:!0,variant:"outlined",value:t.name}),s.default.createElement(m.default,{autoFocus:!0,onChange:function(e){n(Object.assign(Object.assign({},t),{description:e.target.value}))},margin:"dense",id:"description",label:"Enter description",multiline:!0,rows:10,fullWidth:!0,variant:"outlined",value:t.description}),s.default.createElement("div",{style:{width:"100%"}},s.default.createElement(l.default,{id:"tags",multiple:!0,onChange:(e,i,o)=>{let a=r(i.toString());if(""!=a){let e=a.split(",");n(Object.assign(Object.assign({},t),{tags:e}))}else n(Object.assign(Object.assign({},t),{tags:[]}))},options:e.collectionStore.getTags().map((e=>e.tag)),value:t.tags,freeSolo:!0,renderTags:(e,t)=>e.map(((e,n)=>""!=r(e.toString())?s.default.createElement(c.default,Object.assign({variant:"outlined",label:e},t({index:n}))):null)),style:{width:500},renderInput:e=>s.default.createElement(m.default,Object.assign({},e,{margin:"dense",multiline:!0,variant:"outlined",label:"Tags",placeholder:"Tags"}))}))),s.default.createElement(h.default,null,s.default.createElement(u.default,{color:"primary",onClick:()=>{e.handleClose()}},"Cancel"),s.default.createElement(u.default,{id:"closeButton",color:"primary",autoFocus:!0,onClick:()=>{e.save(t),n(Object.assign(Object.assign({},t),{name:"",description:""})),e.handleClose()}},"Save"))))}},6375:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteCollectionMessage=t.LoadingCollectionsMessage=void 0;const s=o(n(7294)),l=a(n(3912)),u=a(n(8428)),c=a(n(2411)),d=a(n(6248)),h=a(n(814)),f=a(n(8101)),p=a(n(6222)),m=a(n(5249)),g=a(n(1890)),v=a(n(3240)),y=a(n(4968)),b=a(n(7311)),w=a(n(7183)),E=n(4007),_=a(n(5479));t.LoadingCollectionsMessage="Accessing Cloud Storage",t.DeleteCollectionMessage="Are you sure you want to delete ",t.default=function(e){const n=E.globalStyles(),r={collectionNames:[],error:!1,loading:!1,message:""},i=e.appContext.getPersistence(),[o,a]=s.useState({collectionName:"",message:"",showDeleteDialog:!1}),[C,S]=s.useState(r);function x(){i.getCollectionNames((e=>{e.length>0?S(Object.assign(Object.assign({},C),{collectionNames:e,loading:!1})):T("No collections found")}),(e=>{T(e)}))}function T(e){S(Object.assign(Object.assign({},C),{error:!0,loading:!1,message:e}))}return s.useEffect((()=>{e.open?(S(Object.assign(Object.assign({},C),{error:!1,loading:!0,message:t.LoadingCollectionsMessage})),i.authorize((()=>{x()}),(e=>{T(e)}))):S(r)}),[e.open]),s.default.createElement("div",null,o.showDeleteDialog&&s.default.createElement(_.default,{handleCancel:function(){a({collectionName:"",message:"",showDeleteDialog:!1})},handleConfirm:function(){i.deleteCollection(o.collectionName,(()=>{x()}),(e=>{T(e)})),a({collectionName:"",message:"",showDeleteDialog:!1})},title:"Delete Collection",text:o.message}),e.open&&s.default.createElement(c.default,{fullWidth:!1,maxWidth:"md",open:e.open,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},s.default.createElement(p.default,{id:"alert-dialog-title"},"Cloud Collections"),s.default.createElement(h.default,{style:{minWidth:"300px"}},(C.error||C.loading)&&s.default.createElement(f.default,{id:"alert-dialog-description"},C.message),!C.error&&!C.loading&&s.default.createElement(m.default,{className:n.panelSummary},s.default.createElement("div",{className:n.panelContainer,style:{border:"1px solid",height:"400px",overflow:"scroll"}},s.default.createElement(v.default,{component:"nav"},C.collectionNames.map(((e,n)=>s.default.createElement(y.default,{button:!0,key:n},s.default.createElement(b.default,null,s.default.createElement(g.default,{id:"deleteCloudButton",onClick:n=>{let r=t.DeleteCollectionMessage+e+"?";a({collectionName:e,message:r,showDeleteDialog:!0}),n.stopPropagation()}},s.default.createElement(u.default,null))),s.default.createElement(w.default,{primary:e})))))))),!C.loading&&s.default.createElement(d.default,null,s.default.createElement(l.default,{id:"closeViewCloudButton",onClick:()=>{e.handleClose()},color:"primary",autoFocus:!0},"Close"))))}},9968:(e,t,n)=>{"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{Z:()=>r})},3349:(e,t,n)=>{"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:()=>r})},6610:(e,t,n)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:()=>r})},5991:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,{Z:()=>i})},6156:(e,t,n)=>{"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:()=>r})},2122:(e,t,n)=>{"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,{Z:()=>r})},1788:(e,t,n)=>{"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.d(t,{Z:()=>r})},6410:(e,t,n)=>{"use strict";function r(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}n.d(t,{Z:()=>r})},8970:(e,t,n)=>{"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}n.d(t,{Z:()=>r})},1253:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(9756);function i(e,t){if(null==e)return{};var n,i,o=(0,r.Z)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},9756:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}n.d(t,{Z:()=>r})},8481:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9968),i=n(8970);function o(e,t){return(0,r.Z)(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||(0,i.Z)()}},5061:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(6410);function i(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||(0,r.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}},484:(e,t,n)=>{"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,{Z:()=>r})},7154:e=>{function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}e.exports=t},5318:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}}},3198:(e,t,n)=>{"use strict";n.d(t,{Jn:()=>k,l4:()=>g,H9:()=>w,Vr:()=>E,Af:()=>y,Z8:()=>x,lz:()=>b,qX:()=>C,Xd:()=>_,wN:()=>S,P2:()=>A,Mq:()=>P,C6:()=>N,ZF:()=>O,TP:()=>R,KN:()=>D,Ub:()=>M});var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function i(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function a(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}Object.create,Object.create;var s=n(8448),l=function(){function e(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}return e.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},e.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},e.prototype.setServiceProps=function(e){return this.serviceProps=e,this},e.prototype.setInstanceCreatedCallback=function(e){return this.onInstanceCreated=e,this},e}(),u="[DEFAULT]",c=function(){function e(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.onInitCallbacks=new Set}return e.prototype.get=function(e){void 0===e&&(e=u);var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new s.BH;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{var r=this.getOrInitializeService({instanceIdentifier:t});r&&n.resolve(r)}catch(e){}}return this.instancesDeferred.get(t).promise},e.prototype.getImmediate=function(e){var t=r({identifier:u,optional:!1},e),n=t.identifier,i=t.optional,o=this.normalizeInstanceIdentifier(n);if(!this.isInitialized(o)&&!this.shouldAutoInitialize()){if(i)return null;throw Error("Service "+this.name+" is not available")}try{return this.getOrInitializeService({instanceIdentifier:o})}catch(e){if(i)return null;throw e}},e.prototype.getComponent=function(){return this.component},e.prototype.setComponent=function(e){var t,n;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(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:u})}catch(e){}try{for(var r=i(this.instancesDeferred.entries()),a=r.next();!a.done;a=r.next()){var s=o(a.value,2),l=s[0],c=s[1],d=this.normalizeInstanceIdentifier(l);try{var h=this.getOrInitializeService({instanceIdentifier:d});c.resolve(h)}catch(e){}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}}},e.prototype.clearInstance=function(e){void 0===e&&(e=u),this.instancesDeferred.delete(e),this.instances.delete(e)},e.prototype.delete=function(){return e=this,t=void 0,r=function(){var e;return function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,(function(t){switch(t.label){case 0:return e=Array.from(this.instances.values()),[4,Promise.all(a(a([],o(e.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()})))),o(e.filter((function(e){return"_delete"in e})).map((function(e){return e._delete()})))))];case 1:return t.sent(),[2]}}))},new((n=void 0)||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}));var e,t,n,r},e.prototype.isComponentSet=function(){return null!=this.component},e.prototype.isInitialized=function(e){return void 0===e&&(e=u),this.instances.has(e)},e.prototype.initialize=function(e){var t,n;void 0===e&&(e={});var r=e.instanceIdentifier,a=void 0===r?u:r,s=e.options,l=void 0===s?{}:s,c=this.normalizeInstanceIdentifier(a);if(this.isInitialized(c))throw Error(this.name+"("+c+") has already been initialized");if(!this.isComponentSet())throw Error("Component "+this.name+" has not been registered yet");var d=this.getOrInitializeService({instanceIdentifier:c,options:l});try{for(var h=i(this.instancesDeferred.entries()),f=h.next();!f.done;f=h.next()){var p=o(f.value,2),m=p[0],g=p[1];c===this.normalizeInstanceIdentifier(m)&&g.resolve(d)}}catch(e){t={error:e}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}finally{if(t)throw t.error}}return this.invokeOnInitCallbacks(d,c),d},e.prototype.onInit=function(e){var t=this;return this.onInitCallbacks.add(e),function(){t.onInitCallbacks.delete(e)}},e.prototype.invokeOnInitCallbacks=function(e,t){var n,r;try{for(var o=i(this.onInitCallbacks),a=o.next();!a.done;a=o.next()){var s=a.value;try{s(e,t)}catch(e){}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.getOrInitializeService=function(e){var t,n=e.instanceIdentifier,r=e.options,i=void 0===r?{}:r,o=this.instances.get(n);if(!o&&this.component&&(o=this.component.instanceFactory(this.container,{instanceIdentifier:(t=n,t===u?void 0:t),options:i}),this.instances.set(n,o),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,n,o)}catch(e){}return o||null},e.prototype.normalizeInstanceIdentifier=function(e){return this.component?this.component.multipleInstances?e:u:e},e.prototype.shouldAutoInitialize=function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode},e}(),d=function(){function e(e){this.name=e,this.providers=new Map}return e.prototype.addComponent=function(e){var t=this.getProvider(e.name);if(t.isComponentSet())throw new Error("Component "+e.name+" has already been registered with "+this.name);t.setComponent(e)},e.prototype.addOrOverwriteComponent=function(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)},e.prototype.getProvider=function(e){if(this.providers.has(e))return this.providers.get(e);var t=new c(e,this);return this.providers.set(e,t),t},e.prototype.getProviders=function(){return Array.from(this.providers.values())},e}(),h=n(4594);class f{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const t=e.getComponent();return"VERSION"===(null==t?void 0:t.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const p="@firebase/app-exp",m=new h.Yd("@firebase/app"),g="[DEFAULT]",v={[p]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics-exp":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/auth-exp":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions-exp":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations-exp":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging-exp":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance-exp":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config-exp":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js","firebase-exp":"fire-js-all"},y=new Map,b=new Map;function w(e,t){try{e.container.addComponent(t)}catch(n){m.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function E(e,t){e.container.addOrOverwriteComponent(t)}function _(e){const t=e.name;if(b.has(t))return m.debug(`There were multiple attempts to register component ${t}.`),!1;b.set(t,e);for(const t of y.values())w(t,e);return!0}function C(e,t){return e.container.getProvider(t)}function S(e,t,n=g){C(e,t).clearInstance(n)}function x(){b.clear()}const T=new s.LL("app","Firebase",{"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","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."});class I{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new l("app-exp",(()=>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 container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw T.create("app-deleted",{appName:this._name})}}const k="9.0.0-beta.2";function O(e,t={}){"object"!=typeof t&&(t={name:t});const n=Object.assign({name:g,automaticDataCollectionEnabled:!1},t),r=n.name;if("string"!=typeof r||!r)throw T.create("bad-app-name",{appName:String(r)});if(y.has(r))throw T.create("duplicate-app",{appName:r});const i=new d(r);for(const e of b.values())i.addComponent(e);const o=new I(e,n,i);return y.set(r,o),o}function P(e=g){const t=y.get(e);if(!t)throw T.create("no-app",{appName:e});return t}function N(){return Array.from(y.values())}async function A(e){const t=e.name;y.has(t)&&(y.delete(t),await Promise.all(e.container.getProviders().map((e=>e.delete()))),e.isDeleted=!0)}function D(e,t,n){var r;let i=null!==(r=v[e])&&void 0!==r?r:e;n&&(i+=`-${n}`);const o=i.match(/\s|\//),a=t.match(/\s|\//);if(o||a){const e=[`Unable to register library "${i}" with version "${t}":`];return o&&e.push(`library name "${i}" contains illegal characters (whitespace or "/")`),o&&a&&e.push("and"),a&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void m.warn(e.join(" "))}_(new l(`${i}-version`,(()=>({library:i,version:t})),"VERSION"))}function R(e,t){if(null!==e&&"function"!=typeof e)throw T.create("invalid-log-argument");(0,h.Am)(e,t)}function M(e){(0,h.Ub)(e)}_(new l("platform-logger",(e=>new f(e)),"PRIVATE")),D(p,"0.0.900-exp.d92a36260",undefined),D("fire-js","")},4594:(e,t,n)=>{"use strict";function r(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}var i;n.d(t,{in:()=>o,Yd:()=>d,Ub:()=>h,Am:()=>f});var o,a=[];!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(o||(o={}));var s={debug:o.DEBUG,verbose:o.VERBOSE,info:o.INFO,warn:o.WARN,error:o.ERROR,silent:o.SILENT},l=o.INFO,u=((i={})[o.DEBUG]="log",i[o.VERBOSE]="log",i[o.INFO]="info",i[o.WARN]="warn",i[o.ERROR]="error",i),c=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];if(!(t<e.logLevel)){var o=(new Date).toISOString(),a=u[t];if(!a)throw new Error("Attempted to log a message with an invalid logType (value: "+t+")");console[a].apply(console,r(["["+o+"] "+e.name+":"],n))}},d=function(){function e(e){this.name=e,this._logLevel=l,this._logHandler=c,this._userLogHandler=null,a.push(this)}return Object.defineProperty(e.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){if(!(e in o))throw new TypeError('Invalid value "'+e+'" assigned to `logLevel`');this._logLevel=e},enumerable:!1,configurable:!0}),e.prototype.setLogLevel=function(e){this._logLevel="string"==typeof e?s[e]:e},Object.defineProperty(e.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(e){this._userLogHandler=e},enumerable:!1,configurable:!0}),e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.DEBUG],e)),this._logHandler.apply(this,r([this,o.DEBUG],e))},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.VERBOSE],e)),this._logHandler.apply(this,r([this,o.VERBOSE],e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.INFO],e)),this._logHandler.apply(this,r([this,o.INFO],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.WARN],e)),this._logHandler.apply(this,r([this,o.WARN],e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.ERROR],e)),this._logHandler.apply(this,r([this,o.ERROR],e))},e}();function h(e){a.forEach((function(t){t.setLogLevel(e)}))}function f(e,t){for(var n=function(n){var r=null;t&&t.level&&(r=s[t.level]),n.userLogHandler=null===e?null:function(t,n){for(var i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var s=i.map((function(e){if(null==e)return null;if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(e){return null}})).filter((function(e){return e})).join(" ");n>=(null!=r?r:t.logLevel)&&e({level:o[n].toLowerCase(),message:s,args:i,type:t.name})}},r=0,i=a;r<i.length;r++)n(i[r])}},8448:(e,t,n)=>{"use strict";n.d(t,{BH:()=>s,LL:()=>v,ZR:()=>g,tV:()=>a,Sg:()=>l,ne:()=>S,pd:()=>C,m9:()=>I,z$:()=>u,ru:()=>d,d:()=>f,xb:()=>w,w1:()=>p,uI:()=>c,b$:()=>h,Mn:()=>m,xO:()=>E,zd:()=>_});var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.create,Object.create;var o={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:"function"==typeof atob,encodeByteArray:function(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i<e.length;i+=3){var o=e[i],a=i+1<e.length,s=a?e[i+1]:0,l=i+2<e.length,u=l?e[i+2]:0,c=o>>2,d=(3&o)<<4|s>>4,h=(15&s)<<2|u>>6,f=63&u;l||(f=64,a||(h=64)),r.push(n[c],n[d],n[h],n[f])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296==(64512&i)&&r+1<e.length&&56320==(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t}(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){for(var t=[],n=0,r=0;n<e.length;){var i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){var o=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){var a=((7&i)<<18|(63&(o=e[n++]))<<12|(63&(s=e[n++]))<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(a>>10)),t[r++]=String.fromCharCode(56320+(1023&a))}else{o=e[n++];var s=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<e.length;){var o=n[e.charAt(i++)],a=i<e.length?n[e.charAt(i)]:0,s=++i<e.length?n[e.charAt(i)]:64,l=++i<e.length?n[e.charAt(i)]:64;if(++i,null==o||null==a||null==s||null==l)throw Error();var u=o<<2|a>>4;if(r.push(u),64!==s){var c=a<<4&240|s>>2;if(r.push(c),64!==l){var d=s<<6&192|l;r.push(d)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},a=function(e){try{return o.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null},s=function(){function e(){var e=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))}return e.prototype.wrapCallback=function(e){var t=this;return function(n,r){n?t.reject(n):t.resolve(r),"function"==typeof e&&(t.promise.catch((function(){})),1===e.length?e(n):e(n,r))}},e}();function l(e,t){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');var n=t||"demo-project",r=e.iat||0,a=e.sub||e.user_id;if(!a)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");var s=i({iss:"https://securetoken.google.com/"+n,aud:n,iat:r,exp:r+3600,auth_time:r,sub:a,user_id:a,firebase:{sign_in_provider:"custom",identities:{}}},e);return[o.encodeString(JSON.stringify({alg:"none",type:"JWT"}),!1),o.encodeString(JSON.stringify(s),!1),""].join(".")}function u(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function c(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(u())}function d(){var e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}function h(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function f(){return u().indexOf("Electron/")>=0}function p(){var e=u();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function m(){return u().indexOf("MSAppHost/")>=0}var g=function(e){function t(n,r,i){var o=e.call(this,r)||this;return o.code=n,o.customData=i,o.name="FirebaseError",Object.setPrototypeOf(o,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(o,v.prototype.create),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Error),v=function(){function e(e,t,n){this.service=e,this.serviceName=t,this.errors=n}return e.prototype.create=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t[0]||{},i=this.service+"/"+e,o=this.errors[e],a=o?y(o,r):"Error",s=this.serviceName+": "+a+" ("+i+").",l=new g(i,s,r);return l},e}();function y(e,t){return e.replace(b,(function(e,n){var r=t[n];return null!=r?String(r):"<"+n+"?>"}))}var b=/\{\$([^}]+)}/g;function w(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function E(e){for(var t=[],n=function(e,n){Array.isArray(n)?n.forEach((function(n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))})):t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))},r=0,i=Object.entries(e);r<i.length;r++){var o=i[r];n(o[0],o[1])}return t.length?"&"+t.join("&"):""}function _(e){var t={};return e.replace(/^\?/,"").split("&").forEach((function(e){if(e){var n=e.split("="),r=n[0],i=n[1];t[decodeURIComponent(r)]=decodeURIComponent(i)}})),t}function C(e){var t=e.indexOf("?");if(!t)return"";var n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}function S(e,t){var n=new x(e,t);return n.subscribe.bind(n)}!function(){function e(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(var e=1;e<this.blockSize;++e)this.pad_[e]=0;this.reset()}e.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},e.prototype.compress_=function(e,t){t||(t=0);var n=this.W_;if("string"==typeof e)for(var r=0;r<16;r++)n[r]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3),t+=4;else for(r=0;r<16;r++)n[r]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],t+=4;for(r=16;r<80;r++){var i=n[r-3]^n[r-8]^n[r-14]^n[r-16];n[r]=4294967295&(i<<1|i>>>31)}var o,a,s=this.chain_[0],l=this.chain_[1],u=this.chain_[2],c=this.chain_[3],d=this.chain_[4];for(r=0;r<80;r++)r<40?r<20?(o=c^l&(u^c),a=1518500249):(o=l^u^c,a=1859775393):r<60?(o=l&u|c&(l|u),a=2400959708):(o=l^u^c,a=3395469782),i=(s<<5|s>>>27)+o+d+a+n[r]&4294967295,d=c,c=u,u=4294967295&(l<<30|l>>>2),l=s,s=i;this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+l&4294967295,this.chain_[2]=this.chain_[2]+u&4294967295,this.chain_[3]=this.chain_[3]+c&4294967295,this.chain_[4]=this.chain_[4]+d&4294967295},e.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var n=t-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;r<t;){if(0===o)for(;r<=n;)this.compress_(e,r),r+=this.blockSize;if("string"==typeof e){for(;r<t;)if(i[o]=e.charCodeAt(r),++r,++o===this.blockSize){this.compress_(i),o=0;break}}else for(;r<t;)if(i[o]=e[r],++r,++o===this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=t}},e.prototype.digest=function(){var e=[],t=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var n=this.blockSize-1;n>=56;n--)this.buf_[n]=255&t,t/=256;this.compress_(this.buf_);var r=0;for(n=0;n<5;n++)for(var i=24;i>=0;i-=8)e[r]=this.chain_[n]>>i&255,++r;return e}}();var x=function(){function e(e,t){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then((function(){e(n)})).catch((function(e){n.error(e)}))}return e.prototype.next=function(e){this.forEachObserver((function(t){t.next(e)}))},e.prototype.error=function(e){this.forEachObserver((function(t){t.error(e)})),this.close(e)},e.prototype.complete=function(){this.forEachObserver((function(e){e.complete()})),this.close()},e.prototype.subscribe=function(e,t,n){var r,i=this;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(e,t){if("object"!=typeof e||null===e)return!1;for(var n=0,r=["next","error","complete"];n<r.length;n++){var i=r[n];if(i in e&&"function"==typeof e[i])return!0}return!1}(e)?e:{next:e,error:t,complete:n}).next&&(r.next=T),void 0===r.error&&(r.error=T),void 0===r.complete&&(r.complete=T);var o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((function(){try{i.finalError?r.error(i.finalError):r.complete()}catch(e){}})),this.observers.push(r),o},e.prototype.unsubscribeOne=function(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},e.prototype.forEachObserver=function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)},e.prototype.sendOne=function(e,t){var n=this;this.task.then((function(){if(void 0!==n.observers&&void 0!==n.observers[e])try{t(n.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}}))},e.prototype.close=function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((function(){t.observers=void 0,t.onNoObservers=void 0})))},e}();function T(){}function I(e){return e&&e._delegate?e._delegate:e}},6377:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(3871),u=n(9895),c=o.forwardRef((function(e,t){var n=e.classes,s=e.className,c=e.color,d=void 0===c?"primary":c,h=e.position,f=void 0===h?"fixed":h,p=(0,i.Z)(e,["classes","className","color","position"]);return o.createElement(u.Z,(0,r.Z)({square:!0,component:"header",elevation:4,className:(0,a.default)(n.root,n["position".concat((0,l.Z)(f))],n["color".concat((0,l.Z)(d))],s,"fixed"===f&&"mui-fixed"),ref:t},p))}));const d=(0,s.Z)((function(e){var t="light"===e.palette.type?e.palette.grey[100]:e.palette.grey[900];return{root:{display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",zIndex:e.zIndex.appBar,flexShrink:0},positionFixed:{position:"fixed",top:0,left:"auto",right:0,"@media print":{position:"absolute"}},positionAbsolute:{position:"absolute",top:0,left:"auto",right:0},positionSticky:{position:"sticky",top:0,left:"auto",right:0},positionStatic:{position:"static",transform:"translateZ(0)"},positionRelative:{position:"relative"},colorDefault:{backgroundColor:t,color:e.palette.getContrastText(t)},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},colorInherit:{color:"inherit"},colorTransparent:{backgroundColor:"transparent",color:"inherit"}}}),{name:"MuiAppBar"})(c)},2692:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(3637),u=o.forwardRef((function(e,t){var n=e.children,s=e.classes,u=e.className,c=e.invisible,d=void 0!==c&&c,h=e.open,f=e.transitionDuration,p=(0,i.Z)(e,["children","classes","className","invisible","open","transitionDuration"]);return o.createElement(l.Z,(0,r.Z)({in:h,timeout:f},p),o.createElement("div",{className:(0,a.default)(s.root,u,d&&s.invisible),"aria-hidden":!0,ref:t},n))}));const c=(0,s.Z)({root:{zIndex:-1,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"},invisible:{backgroundColor:"transparent"}},{name:"MuiBackdrop"})(u)},573:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(3871),u=o.forwardRef((function(e,t){var n=e.anchorOrigin,s=void 0===n?{vertical:"top",horizontal:"right"}:n,u=e.badgeContent,c=e.children,d=e.classes,h=e.className,f=e.color,p=void 0===f?"default":f,m=e.component,g=void 0===m?"span":m,v=e.invisible,y=e.max,b=void 0===y?99:y,w=e.overlap,E=void 0===w?"rectangle":w,_=e.showZero,C=void 0!==_&&_,S=e.variant,x=void 0===S?"standard":S,T=(0,i.Z)(e,["anchorOrigin","badgeContent","children","classes","className","color","component","invisible","max","overlap","showZero","variant"]),I=v;null==v&&(0===u&&!C||null==u&&"dot"!==x)&&(I=!0);var k="";return"dot"!==x&&(k=u>b?"".concat(b,"+"):u),o.createElement(g,(0,r.Z)({className:(0,a.default)(d.root,h),ref:t},T),c,o.createElement("span",{className:(0,a.default)(d.badge,d["".concat(s.horizontal).concat((0,l.Z)(s.vertical),"}")],d["anchorOrigin".concat((0,l.Z)(s.vertical)).concat((0,l.Z)(s.horizontal)).concat((0,l.Z)(E))],"default"!==p&&d["color".concat((0,l.Z)(p))],I&&d.invisible,"dot"===x&&d.dot)},k))}));const c=(0,s.Z)((function(e){return{root:{position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0},badge:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen})},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},colorError:{backgroundColor:e.palette.error.main,color:e.palette.error.contrastText},dot:{borderRadius:4,height:8,minWidth:8,padding:0},anchorOriginTopRightRectangle:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginBottomRightRectangle:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginTopLeftRectangle:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginBottomLeftRectangle:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},anchorOriginTopRightCircle:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginBottomRightCircle:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginTopLeftCircle:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginBottomLeftCircle:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},invisible:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}}),{name:"MuiBadge"})(u)},7237:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>N,styleFunction:()=>P});var r=n(5061),i=n(2122),o=(n(5697),n(9668));const a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=function(e){return t.reduce((function(t,n){var r=n(e);return r?(0,o.Z)(t,r):t}),{})};return r.propTypes={},r.filterProps=t.reduce((function(e,t){return e.concat(t.filterProps)}),[]),r};var s=n(6156),l=n(1410);function u(e,t){return t&&"string"==typeof t?t.split(".").reduce((function(e,t){return e&&e[t]?e[t]:null}),e):null}const c=function(e){var t=e.prop,n=e.cssProperty,r=void 0===n?e.prop:n,i=e.themeKey,o=e.transform,a=function(e){if(null==e[t])return null;var n=e[t],a=u(e.theme,i)||{};return(0,l.k)(e,n,(function(e){var t;return"function"==typeof a?t=a(e):Array.isArray(a)?t=a[e]||e:(t=u(a,e)||e,o&&(t=o(t))),!1===r?t:(0,s.Z)({},r,t)}))};return a.propTypes={},a.filterProps=[t],a};function d(e){return"number"!=typeof e?e:"".concat(e,"px solid")}const h=a(c({prop:"border",themeKey:"borders",transform:d}),c({prop:"borderTop",themeKey:"borders",transform:d}),c({prop:"borderRight",themeKey:"borders",transform:d}),c({prop:"borderBottom",themeKey:"borders",transform:d}),c({prop:"borderLeft",themeKey:"borders",transform:d}),c({prop:"borderColor",themeKey:"palette"}),c({prop:"borderRadius",themeKey:"shape"})),f=a(c({prop:"displayPrint",cssProperty:!1,transform:function(e){return{"@media print":{display:e}}}}),c({prop:"display"}),c({prop:"overflow"}),c({prop:"textOverflow"}),c({prop:"visibility"}),c({prop:"whiteSpace"})),p=a(c({prop:"flexBasis"}),c({prop:"flexDirection"}),c({prop:"flexWrap"}),c({prop:"justifyContent"}),c({prop:"alignItems"}),c({prop:"alignContent"}),c({prop:"order"}),c({prop:"flex"}),c({prop:"flexGrow"}),c({prop:"flexShrink"}),c({prop:"alignSelf"}),c({prop:"justifyItems"}),c({prop:"justifySelf"})),m=a(c({prop:"gridGap"}),c({prop:"gridColumnGap"}),c({prop:"gridRowGap"}),c({prop:"gridColumn"}),c({prop:"gridRow"}),c({prop:"gridAutoFlow"}),c({prop:"gridAutoColumns"}),c({prop:"gridAutoRows"}),c({prop:"gridTemplateColumns"}),c({prop:"gridTemplateRows"}),c({prop:"gridTemplateAreas"}),c({prop:"gridArea"})),g=a(c({prop:"position"}),c({prop:"zIndex",themeKey:"zIndex"}),c({prop:"top"}),c({prop:"right"}),c({prop:"bottom"}),c({prop:"left"})),v=a(c({prop:"color",themeKey:"palette"}),c({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"})),y=c({prop:"boxShadow",themeKey:"shadows"});function b(e){return e<=1?"".concat(100*e,"%"):e}var w=c({prop:"width",transform:b}),E=c({prop:"maxWidth",transform:b}),_=c({prop:"minWidth",transform:b}),C=c({prop:"height",transform:b}),S=c({prop:"maxHeight",transform:b}),x=c({prop:"minHeight",transform:b});c({prop:"size",cssProperty:"width",transform:b}),c({prop:"size",cssProperty:"height",transform:b});const T=a(w,E,_,C,S,x,c({prop:"boxSizing"}));var I=n(8681);const k=a(c({prop:"fontFamily",themeKey:"typography"}),c({prop:"fontSize",themeKey:"typography"}),c({prop:"fontStyle",themeKey:"typography"}),c({prop:"fontWeight",themeKey:"typography"}),c({prop:"letterSpacing"}),c({prop:"lineHeight"}),c({prop:"textAlign"}));var O=n(1911),P=function(e){var t=function(t){var n=e(t);return t.css?(0,i.Z)({},(0,o.Z)(n,e((0,i.Z)({theme:t.theme},t.css))),{},function(e,t){var n={};return Object.keys(e).forEach((function(r){-1===t.indexOf(r)&&(n[r]=e[r])})),n}(t.css,[e.filterProps])):n};return t.propTypes={},t.filterProps=["css"].concat((0,r.Z)(e.filterProps)),t}(a(h,f,p,m,g,v,y,T,I.Z,k));const N=(0,O.Z)("div")(P,{name:"MuiBox"})},3912:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(1253),i=n(2122),o=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(9693),u=n(4720),c=n(3871),d=o.forwardRef((function(e,t){var n=e.children,s=e.classes,l=e.className,d=e.color,h=void 0===d?"default":d,f=e.component,p=void 0===f?"button":f,m=e.disabled,g=void 0!==m&&m,v=e.disableElevation,y=void 0!==v&&v,b=e.disableFocusRipple,w=void 0!==b&&b,E=e.endIcon,_=e.focusVisibleClassName,C=e.fullWidth,S=void 0!==C&&C,x=e.size,T=void 0===x?"medium":x,I=e.startIcon,k=e.type,O=void 0===k?"button":k,P=e.variant,N=void 0===P?"text":P,A=(0,r.Z)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),D=I&&o.createElement("span",{className:(0,a.default)(s.startIcon,s["iconSize".concat((0,c.Z)(T))])},I),R=E&&o.createElement("span",{className:(0,a.default)(s.endIcon,s["iconSize".concat((0,c.Z)(T))])},E);return o.createElement(u.Z,(0,i.Z)({className:(0,a.default)(s.root,s[N],l,"inherit"===h?s.colorInherit:"default"!==h&&s["".concat(N).concat((0,c.Z)(h))],"medium"!==T&&[s["".concat(N,"Size").concat((0,c.Z)(T))],s["size".concat((0,c.Z)(T))]],y&&s.disableElevation,g&&s.disabled,S&&s.fullWidth),component:p,disabled:g,focusRipple:!w,focusVisibleClassName:(0,a.default)(s.focusVisible,_),ref:t,type:O},A),o.createElement("span",{className:s.label},D,n,R))}));const h=(0,s.Z)((function(e){return{root:(0,i.Z)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:(0,l.U1)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,l.U1)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,l.U1)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat((0,l.U1)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:(0,l.U1)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat((0,l.U1)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:(0,l.U1)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(d)},4720:(e,t,n)=>{"use strict";n.d(t,{Z:()=>k});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(3935)),s=n(6010),l=n(3834),u=n(5192),c=n(4670),d=n(4896),h=n(5061),f=n(9756),p=n(1788),m=n(3349),g=n(220);function v(e,t){var n=Object.create(null);return e&&o.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,o.isValidElement)(e)?t(e):e}(e)})),n}function y(e,t,n){return null!=n[t]?n[t]:e.props[t]}function b(e,t,n){var r=v(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var u=i[l][r];s[i[l][r]]=n(u)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);return Object.keys(i).forEach((function(a){var s=i[a];if((0,o.isValidElement)(s)){var l=a in t,u=a in r,c=t[a],d=(0,o.isValidElement)(c)&&!c.props.in;!u||l&&!d?u||!l||d?u&&l&&(0,o.isValidElement)(c)&&(i[a]=(0,o.cloneElement)(s,{onExited:n.bind(null,s),in:c.props.in,exit:y(s,"exit",e),enter:y(s,"enter",e)})):i[a]=(0,o.cloneElement)(s,{in:!1}):i[a]=(0,o.cloneElement)(s,{onExited:n.bind(null,s),in:!0,exit:y(s,"exit",e),enter:y(s,"enter",e)})}})),i}var w=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},E=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind((0,m.Z)((0,m.Z)(r)));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}(0,p.Z)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,a=t.handleExited;return{children:t.firstRender?(n=e,r=a,v(n.children,(function(e){return(0,o.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:y(e,"appear",n),enter:y(e,"enter",n),exit:y(e,"exit",n)})}))):b(e,i,a),firstRender:!1}},n.handleExited=function(e,t){var n=v(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=(0,r.Z)({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=(0,f.Z)(e,["component","childFactory"]),i=this.state.contextValue,a=w(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?o.createElement(g.Z.Provider,{value:i},a):o.createElement(g.Z.Provider,{value:i},o.createElement(t,r,a))},t}(o.Component);E.propTypes={},E.defaultProps={component:"div",childFactory:function(e){return e}};const _=E;var C="undefined"==typeof window?o.useEffect:o.useLayoutEffect;const S=function(e){var t=e.classes,n=e.pulsate,r=void 0!==n&&n,i=e.rippleX,a=e.rippleY,l=e.rippleSize,c=e.in,d=e.onExited,h=void 0===d?function(){}:d,f=e.timeout,p=o.useState(!1),m=p[0],g=p[1],v=(0,s.default)(t.ripple,t.rippleVisible,r&&t.ripplePulsate),y={width:l,height:l,top:-l/2+a,left:-l/2+i},b=(0,s.default)(t.child,m&&t.childLeaving,r&&t.childPulsate),w=(0,u.Z)(h);return C((function(){if(!c){g(!0);var e=setTimeout(w,f);return function(){clearTimeout(e)}}}),[w,c,f]),o.createElement("span",{className:v,style:y},o.createElement("span",{className:b}))};var x=o.forwardRef((function(e,t){var n=e.center,a=void 0!==n&&n,l=e.classes,u=e.className,c=(0,i.Z)(e,["center","classes","className"]),d=o.useState([]),f=d[0],p=d[1],m=o.useRef(0),g=o.useRef(null);o.useEffect((function(){g.current&&(g.current(),g.current=null)}),[f]);var v=o.useRef(!1),y=o.useRef(null),b=o.useRef(null),w=o.useRef(null);o.useEffect((function(){return function(){clearTimeout(y.current)}}),[]);var E=o.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,i=e.rippleSize,a=e.cb;p((function(e){return[].concat((0,h.Z)(e),[o.createElement(S,{key:m.current,classes:l,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i})])})),m.current+=1,g.current=a}),[l]),C=o.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,i=void 0!==r&&r,o=t.center,s=void 0===o?a||t.pulsate:o,l=t.fakeElement,u=void 0!==l&&l;if("mousedown"===e.type&&v.current)v.current=!1;else{"touchstart"===e.type&&(v.current=!0);var c,d,h,f=u?null:w.current,p=f?f.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(p.width/2),d=Math.round(p.height/2);else{var m=e.clientX?e.clientX:e.touches[0].clientX,g=e.clientY?e.clientY:e.touches[0].clientY;c=Math.round(m-p.left),d=Math.round(g-p.top)}if(s)(h=Math.sqrt((2*Math.pow(p.width,2)+Math.pow(p.height,2))/3))%2==0&&(h+=1);else{var _=2*Math.max(Math.abs((f?f.clientWidth:0)-c),c)+2,C=2*Math.max(Math.abs((f?f.clientHeight:0)-d),d)+2;h=Math.sqrt(Math.pow(_,2)+Math.pow(C,2))}e.touches?null===b.current&&(b.current=function(){E({pulsate:i,rippleX:c,rippleY:d,rippleSize:h,cb:n})},y.current=setTimeout((function(){b.current&&(b.current(),b.current=null)}),80)):E({pulsate:i,rippleX:c,rippleY:d,rippleSize:h,cb:n})}}),[a,E]),x=o.useCallback((function(){C({},{pulsate:!0})}),[C]),T=o.useCallback((function(e,t){if(clearTimeout(y.current),"touchend"===e.type&&b.current)return e.persist(),b.current(),b.current=null,void(y.current=setTimeout((function(){T(e,t)})));b.current=null,p((function(e){return e.length>0?e.slice(1):e})),g.current=t}),[]);return o.useImperativeHandle(t,(function(){return{pulsate:x,start:C,stop:T}}),[x,C,T]),o.createElement("span",(0,r.Z)({className:(0,s.default)(l.root,u),ref:w},c),o.createElement(_,{component:null,exit:!0},f))}));const T=(0,c.Z)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(o.memo(x));var I=o.forwardRef((function(e,t){var n=e.action,c=e.buttonRef,h=e.centerRipple,f=void 0!==h&&h,p=e.children,m=e.classes,g=e.className,v=e.component,y=void 0===v?"button":v,b=e.disabled,w=void 0!==b&&b,E=e.disableRipple,_=void 0!==E&&E,C=e.disableTouchRipple,S=void 0!==C&&C,x=e.focusRipple,I=void 0!==x&&x,k=e.focusVisibleClassName,O=e.onBlur,P=e.onClick,N=e.onFocus,A=e.onFocusVisible,D=e.onKeyDown,R=e.onKeyUp,M=e.onMouseDown,L=e.onMouseLeave,j=e.onMouseUp,F=e.onTouchEnd,W=e.onTouchMove,B=e.onTouchStart,z=e.onDragLeave,U=e.tabIndex,V=void 0===U?0:U,Z=e.TouchRippleProps,$=e.type,q=void 0===$?"button":$,H=(0,i.Z)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),K=o.useRef(null),G=o.useRef(null),Q=o.useState(!1),Y=Q[0],X=Q[1];w&&Y&&X(!1);var J=(0,d.Z)(),ee=J.isFocusVisible,te=J.onBlurVisible,ne=J.ref;function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:S;return(0,u.Z)((function(r){return t&&t(r),!n&&G.current&&G.current[e](r),!0}))}o.useImperativeHandle(n,(function(){return{focusVisible:function(){X(!0),K.current.focus()}}}),[]),o.useEffect((function(){Y&&I&&!_&&G.current.pulsate()}),[_,I,Y]);var ie=re("start",M),oe=re("stop",z),ae=re("stop",j),se=re("stop",(function(e){Y&&e.preventDefault(),L&&L(e)})),le=re("start",B),ue=re("stop",F),ce=re("stop",W),de=re("stop",(function(e){Y&&(te(e),X(!1)),O&&O(e)}),!1),he=(0,u.Z)((function(e){K.current||(K.current=e.currentTarget),ee(e)&&(X(!0),A&&A(e)),N&&N(e)})),fe=function(){var e=a.findDOMNode(K.current);return y&&"button"!==y&&!("A"===e.tagName&&e.href)},pe=o.useRef(!1),me=(0,u.Z)((function(e){I&&!pe.current&&Y&&G.current&&" "===e.key&&(pe.current=!0,e.persist(),G.current.stop(e,(function(){G.current.start(e)}))),e.target===e.currentTarget&&fe()&&" "===e.key&&e.preventDefault(),D&&D(e),e.target===e.currentTarget&&fe()&&"Enter"===e.key&&!w&&(e.preventDefault(),P&&P(e))})),ge=(0,u.Z)((function(e){I&&" "===e.key&&G.current&&Y&&!e.defaultPrevented&&(pe.current=!1,e.persist(),G.current.stop(e,(function(){G.current.pulsate(e)}))),R&&R(e),P&&e.target===e.currentTarget&&fe()&&" "===e.key&&!e.defaultPrevented&&P(e)})),ve=y;"button"===ve&&H.href&&(ve="a");var ye={};"button"===ve?(ye.type=q,ye.disabled=w):("a"===ve&&H.href||(ye.role="button"),ye["aria-disabled"]=w);var be=(0,l.Z)(c,t),we=(0,l.Z)(ne,K),Ee=(0,l.Z)(be,we),_e=o.useState(!1),Ce=_e[0],Se=_e[1];o.useEffect((function(){Se(!0)}),[]);var xe=Ce&&!_&&!w;return o.createElement(ve,(0,r.Z)({className:(0,s.default)(m.root,g,Y&&[m.focusVisible,k],w&&m.disabled),onBlur:de,onClick:P,onFocus:he,onKeyDown:me,onKeyUp:ge,onMouseDown:ie,onMouseLeave:se,onMouseUp:ae,onDragLeave:oe,onTouchEnd:ue,onTouchMove:ce,onTouchStart:le,ref:Ee,tabIndex:w?-1:V},ye,H),p,xe?o.createElement(T,(0,r.Z)({ref:G,center:f},Z)):null)}));const k=(0,c.Z)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(I)},2719:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>b});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(6608),l=n(3786);const u=(0,l.Z)(o.createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),c=(0,l.Z)(o.createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox");var d=n(9693);const h=(0,l.Z)(o.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");var f=n(3871),p=n(4670),m=o.createElement(c,null),g=o.createElement(u,null),v=o.createElement(h,null),y=o.forwardRef((function(e,t){var n=e.checkedIcon,l=void 0===n?m:n,u=e.classes,c=e.color,d=void 0===c?"secondary":c,h=e.icon,p=void 0===h?g:h,y=e.indeterminate,b=void 0!==y&&y,w=e.indeterminateIcon,E=void 0===w?v:w,_=e.inputProps,C=e.size,S=void 0===C?"medium":C,x=(0,i.Z)(e,["checkedIcon","classes","color","icon","indeterminate","indeterminateIcon","inputProps","size"]);return o.createElement(s.Z,(0,r.Z)({type:"checkbox",classes:{root:(0,a.default)(u.root,u["color".concat((0,f.Z)(d))],b&&u.indeterminate),checked:u.checked,disabled:u.disabled},color:d,inputProps:(0,r.Z)({"data-indeterminate":b},_),icon:o.cloneElement(b?E:p,{fontSize:"small"===S?"small":"default"}),checkedIcon:o.cloneElement(b?E:l,{fontSize:"small"===S?"small":"default"}),ref:t},x))}));const b=(0,p.Z)((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},indeterminate:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,d.U1)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,d.U1)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiCheckbox"})(y)},1267:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010));const s=(0,n(3786).Z)(o.createElement("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");var l=n(4670),u=n(9693),c=n(3834),d=n(3871),h=n(4720);function f(e){return"Backspace"===e.key||"Delete"===e.key}var p=o.forwardRef((function(e,t){var n=e.avatar,l=e.classes,u=e.className,p=e.clickable,m=e.color,g=void 0===m?"default":m,v=e.component,y=e.deleteIcon,b=e.disabled,w=void 0!==b&&b,E=e.icon,_=e.label,C=e.onClick,S=e.onDelete,x=e.onKeyDown,T=e.onKeyUp,I=e.size,k=void 0===I?"medium":I,O=e.variant,P=void 0===O?"default":O,N=(0,i.Z)(e,["avatar","classes","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant"]),A=o.useRef(null),D=(0,c.Z)(A,t),R=function(e){e.stopPropagation(),S&&S(e)},M=!(!1===p||!C)||p,L="small"===k,j=v||(M?h.Z:"div"),F=j===h.Z?{component:"div"}:{},W=null;if(S){var B=(0,a.default)("default"!==g&&("default"===P?l["deleteIconColor".concat((0,d.Z)(g))]:l["deleteIconOutlinedColor".concat((0,d.Z)(g))]),L&&l.deleteIconSmall);W=y&&o.isValidElement(y)?o.cloneElement(y,{className:(0,a.default)(y.props.className,l.deleteIcon,B),onClick:R}):o.createElement(s,{className:(0,a.default)(l.deleteIcon,B),onClick:R})}var z=null;n&&o.isValidElement(n)&&(z=o.cloneElement(n,{className:(0,a.default)(l.avatar,n.props.className,L&&l.avatarSmall,"default"!==g&&l["avatarColor".concat((0,d.Z)(g))])}));var U=null;return E&&o.isValidElement(E)&&(U=o.cloneElement(E,{className:(0,a.default)(l.icon,E.props.className,L&&l.iconSmall,"default"!==g&&l["iconColor".concat((0,d.Z)(g))])})),o.createElement(j,(0,r.Z)({role:M||S?"button":void 0,className:(0,a.default)(l.root,u,"default"!==g&&[l["color".concat((0,d.Z)(g))],M&&l["clickableColor".concat((0,d.Z)(g))],S&&l["deletableColor".concat((0,d.Z)(g))]],"default"!==P&&[l.outlined,{primary:l.outlinedPrimary,secondary:l.outlinedSecondary}[g]],w&&l.disabled,L&&l.sizeSmall,M&&l.clickable,S&&l.deletable),"aria-disabled":!!w||void 0,tabIndex:M||S?0:void 0,onClick:C,onKeyDown:function(e){e.currentTarget===e.target&&f(e)&&e.preventDefault(),x&&x(e)},onKeyUp:function(e){e.currentTarget===e.target&&(S&&f(e)?S(e):"Escape"===e.key&&A.current&&A.current.blur()),T&&T(e)},ref:D},F,N),z||U,o.createElement("span",{className:(0,a.default)(l.label,L&&l.labelSmall)},_),W)}));const m=(0,l.Z)((function(e){var t="light"===e.palette.type?e.palette.grey[300]:e.palette.grey[700],n=(0,u.U1)(e.palette.text.primary,.26);return{root:{fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:e.palette.getContrastText(t),backgroundColor:t,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"default",outline:0,textDecoration:"none",border:"none",padding:0,verticalAlign:"middle",boxSizing:"border-box","&$disabled":{opacity:.5,pointerEvents:"none"},"& $avatar":{marginLeft:5,marginRight:-6,width:24,height:24,color:"light"===e.palette.type?e.palette.grey[700]:e.palette.grey[300],fontSize:e.typography.pxToRem(12)},"& $avatarColorPrimary":{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.dark},"& $avatarColorSecondary":{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.dark},"& $avatarSmall":{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)}},sizeSmall:{height:24},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},disabled:{},clickable:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover, &:focus":{backgroundColor:(0,u._4)(t,.08)},"&:active":{boxShadow:e.shadows[1]}},clickableColorPrimary:{"&:hover, &:focus":{backgroundColor:(0,u._4)(e.palette.primary.main,.08)}},clickableColorSecondary:{"&:hover, &:focus":{backgroundColor:(0,u._4)(e.palette.secondary.main,.08)}},deletable:{"&:focus":{backgroundColor:(0,u._4)(t,.08)}},deletableColorPrimary:{"&:focus":{backgroundColor:(0,u._4)(e.palette.primary.main,.2)}},deletableColorSecondary:{"&:focus":{backgroundColor:(0,u._4)(e.palette.secondary.main,.2)}},outlined:{backgroundColor:"transparent",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:(0,u.U1)(e.palette.text.primary,e.palette.action.hoverOpacity)},"& $avatar":{marginLeft:4},"& $avatarSmall":{marginLeft:2},"& $icon":{marginLeft:4},"& $iconSmall":{marginLeft:2},"& $deleteIcon":{marginRight:5},"& $deleteIconSmall":{marginRight:3}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(e.palette.primary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:(0,u.U1)(e.palette.primary.main,e.palette.action.hoverOpacity)}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(e.palette.secondary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:(0,u.U1)(e.palette.secondary.main,e.palette.action.hoverOpacity)}},avatar:{},avatarSmall:{},avatarColorPrimary:{},avatarColorSecondary:{},icon:{color:"light"===e.palette.type?e.palette.grey[700]:e.palette.grey[300],marginLeft:5,marginRight:-6},iconSmall:{width:18,height:18,marginLeft:4,marginRight:-4},iconColorPrimary:{color:"inherit"},iconColorSecondary:{color:"inherit"},label:{overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},labelSmall:{paddingLeft:8,paddingRight:8},deleteIcon:{WebkitTapHighlightColor:"transparent",color:n,height:22,width:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:(0,u.U1)(n,.4)}},deleteIconSmall:{height:16,width:16,marginRight:4,marginLeft:-4},deleteIconColorPrimary:{color:(0,u.U1)(e.palette.primary.contrastText,.7),"&:hover, &:active":{color:e.palette.primary.contrastText}},deleteIconColorSecondary:{color:(0,u.U1)(e.palette.secondary.contrastText,.7),"&:hover, &:active":{color:e.palette.secondary.contrastText}},deleteIconOutlinedColorPrimary:{color:(0,u.U1)(e.palette.primary.main,.7),"&:hover, &:active":{color:e.palette.primary.main}},deleteIconOutlinedColorSecondary:{color:(0,u.U1)(e.palette.secondary.main,.7),"&:hover, &:active":{color:e.palette.secondary.main}}}}),{name:"MuiChip"})(p)},5851:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.Z});var r=n(1267)},3195:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(2122),i=n(1253),o=n(6156),a=n(7294),s=(n(5697),n(6010)),l=n(4670),u=n(3871),c=a.forwardRef((function(e,t){var n=e.classes,o=e.className,l=e.component,c=void 0===l?"div":l,d=e.disableGutters,h=void 0!==d&&d,f=e.fixed,p=void 0!==f&&f,m=e.maxWidth,g=void 0===m?"lg":m,v=(0,i.Z)(e,["classes","className","component","disableGutters","fixed","maxWidth"]);return a.createElement(c,(0,r.Z)({className:(0,s.default)(n.root,o,p&&n.fixed,h&&n.disableGutters,!1!==g&&n["maxWidth".concat((0,u.Z)(String(g)))]),ref:t},v))}));const d=(0,l.Z)((function(e){return{root:(0,o.Z)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",paddingLeft:e.spacing(2),paddingRight:e.spacing(2),display:"block"},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),disableGutters:{paddingLeft:0,paddingRight:0},fixed:Object.keys(e.breakpoints.values).reduce((function(t,n){var r=e.breakpoints.values[n];return 0!==r&&(t[e.breakpoints.up(n)]={maxWidth:r}),t}),{}),maxWidthXs:(0,o.Z)({},e.breakpoints.up("xs"),{maxWidth:Math.max(e.breakpoints.values.xs,444)}),maxWidthSm:(0,o.Z)({},e.breakpoints.up("sm"),{maxWidth:e.breakpoints.values.sm}),maxWidthMd:(0,o.Z)({},e.breakpoints.up("md"),{maxWidth:e.breakpoints.values.md}),maxWidthLg:(0,o.Z)({},e.breakpoints.up("lg"),{maxWidth:e.breakpoints.values.lg}),maxWidthXl:(0,o.Z)({},e.breakpoints.up("xl"),{maxWidth:e.breakpoints.values.xl})}}),{name:"MuiContainer"})(c)},2411:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>v});var r=n(2122),i=n(1253),o=n(6156),a=n(7294),s=(n(5697),n(6010)),l=n(4670),u=n(3871),c=n(6423),d=n(2692),h=n(3637),f=n(3366),p=n(9895),m={enter:f.x9.enteringScreen,exit:f.x9.leavingScreen},g=a.forwardRef((function(e,t){var n=e.BackdropProps,o=e.children,l=e.classes,f=e.className,g=e.disableBackdropClick,v=void 0!==g&&g,y=e.disableEscapeKeyDown,b=void 0!==y&&y,w=e.fullScreen,E=void 0!==w&&w,_=e.fullWidth,C=void 0!==_&&_,S=e.maxWidth,x=void 0===S?"sm":S,T=e.onBackdropClick,I=e.onClose,k=e.onEnter,O=e.onEntered,P=e.onEntering,N=e.onEscapeKeyDown,A=e.onExit,D=e.onExited,R=e.onExiting,M=e.open,L=e.PaperComponent,j=void 0===L?p.Z:L,F=e.PaperProps,W=void 0===F?{}:F,B=e.scroll,z=void 0===B?"paper":B,U=e.TransitionComponent,V=void 0===U?h.Z:U,Z=e.transitionDuration,$=void 0===Z?m:Z,q=e.TransitionProps,H=e["aria-describedby"],K=e["aria-labelledby"],G=(0,i.Z)(e,["BackdropProps","children","classes","className","disableBackdropClick","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","onEnter","onEntered","onEntering","onEscapeKeyDown","onExit","onExited","onExiting","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps","aria-describedby","aria-labelledby"]),Q=a.useRef();return a.createElement(c.Z,(0,r.Z)({className:(0,s.default)(l.root,f),BackdropComponent:d.Z,BackdropProps:(0,r.Z)({transitionDuration:$},n),closeAfterTransition:!0,disableBackdropClick:v,disableEscapeKeyDown:b,onEscapeKeyDown:N,onClose:I,open:M,ref:t},G),a.createElement(V,(0,r.Z)({appear:!0,in:M,timeout:$,onEnter:k,onEntering:P,onEntered:O,onExit:A,onExiting:R,onExited:D,role:"none presentation"},q),a.createElement("div",{className:(0,s.default)(l.container,l["scroll".concat((0,u.Z)(z))]),onClick:function(e){e.target===e.currentTarget&&e.target===Q.current&&(Q.current=null,T&&T(e),!v&&I&&I(e,"backdropClick"))},onMouseDown:function(e){Q.current=e.target}},a.createElement(j,(0,r.Z)({elevation:24,role:"dialog","aria-describedby":H,"aria-labelledby":K},W,{className:(0,s.default)(l.paper,l["paperScroll".concat((0,u.Z)(z))],l["paperWidth".concat((0,u.Z)(String(x)))],W.className,E&&l.paperFullScreen,C&&l.paperFullWidth)}),o))))}));const v=(0,l.Z)((function(e){return{root:{"@media print":{position:"absolute !important"}},scrollPaper:{display:"flex",justifyContent:"center",alignItems:"center"},scrollBody:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}},container:{height:"100%","@media print":{height:"auto"},outline:0},paper:{margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},paperScrollPaper:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},paperScrollBody:{display:"inline-block",verticalAlign:"middle",textAlign:"left"},paperWidthFalse:{maxWidth:"calc(100% - 64px)"},paperWidthXs:{maxWidth:Math.max(e.breakpoints.values.xs,444),"&$paperScrollBody":(0,o.Z)({},e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64),{maxWidth:"calc(100% - 64px)"})},paperWidthSm:{maxWidth:e.breakpoints.values.sm,"&$paperScrollBody":(0,o.Z)({},e.breakpoints.down(e.breakpoints.values.sm+64),{maxWidth:"calc(100% - 64px)"})},paperWidthMd:{maxWidth:e.breakpoints.values.md,"&$paperScrollBody":(0,o.Z)({},e.breakpoints.down(e.breakpoints.values.md+64),{maxWidth:"calc(100% - 64px)"})},paperWidthLg:{maxWidth:e.breakpoints.values.lg,"&$paperScrollBody":(0,o.Z)({},e.breakpoints.down(e.breakpoints.values.lg+64),{maxWidth:"calc(100% - 64px)"})},paperWidthXl:{maxWidth:e.breakpoints.values.xl,"&$paperScrollBody":(0,o.Z)({},e.breakpoints.down(e.breakpoints.values.xl+64),{maxWidth:"calc(100% - 64px)"})},paperFullWidth:{width:"calc(100% - 64px)"},paperFullScreen:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,"&$paperScrollBody":{margin:0,maxWidth:"100%"}}}}),{name:"MuiDialog"})(g)},6248:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(4670),l=o.forwardRef((function(e,t){var n=e.disableSpacing,s=void 0!==n&&n,l=e.classes,u=e.className,c=(0,i.Z)(e,["disableSpacing","classes","className"]);return o.createElement("div",(0,r.Z)({className:(0,a.default)(l.root,u,!s&&l.spacing),ref:t},c))}));const u=(0,s.Z)({root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},spacing:{"& > :not(:first-child)":{marginLeft:8}}},{name:"MuiDialogActions"})(l)},814:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(4670),l=o.forwardRef((function(e,t){var n=e.classes,s=e.className,l=e.dividers,u=void 0!==l&&l,c=(0,i.Z)(e,["classes","className","dividers"]);return o.createElement("div",(0,r.Z)({className:(0,a.default)(n.root,s,u&&n.dividers),ref:t},c))}));const u=(0,s.Z)((function(e){return{root:{flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"8px 24px","&:first-child":{paddingTop:20}},dividers:{padding:"16px 24px",borderTop:"1px solid ".concat(e.palette.divider),borderBottom:"1px solid ".concat(e.palette.divider)}}}),{name:"MuiDialogContent"})(l)},8101:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(2122),i=n(7294),o=(n(5697),n(4670)),a=n(2318),s=i.forwardRef((function(e,t){return i.createElement(a.Z,(0,r.Z)({component:"p",variant:"body1",color:"textSecondary",ref:t},e))}));const l=(0,o.Z)({root:{marginBottom:12}},{name:"MuiDialogContentText"})(s)},6222:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(2318),u=o.forwardRef((function(e,t){var n=e.children,s=e.classes,u=e.className,c=e.disableTypography,d=void 0!==c&&c,h=(0,i.Z)(e,["children","classes","className","disableTypography"]);return o.createElement("div",(0,r.Z)({className:(0,a.default)(s.root,u),ref:t},h),d?n:o.createElement(l.Z,{component:"h2",variant:"h6"},n))}));const c=(0,s.Z)({root:{margin:0,padding:"16px 24px",flex:"0 0 auto"}},{name:"MuiDialogTitle"})(u)},3636:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(9693),u=o.forwardRef((function(e,t){var n=e.absolute,s=void 0!==n&&n,l=e.classes,u=e.className,c=e.component,d=void 0===c?"hr":c,h=e.flexItem,f=void 0!==h&&h,p=e.light,m=void 0!==p&&p,g=e.orientation,v=void 0===g?"horizontal":g,y=e.role,b=void 0===y?"hr"!==d?"separator":void 0:y,w=e.variant,E=void 0===w?"fullWidth":w,_=(0,i.Z)(e,["absolute","classes","className","component","flexItem","light","orientation","role","variant"]);return o.createElement(d,(0,r.Z)({className:(0,a.default)(l.root,u,"fullWidth"!==E&&l[E],s&&l.absolute,f&&l.flexItem,m&&l.light,"vertical"===v&&l.vertical),role:b,ref:t},_))}));const c=(0,s.Z)((function(e){return{root:{height:1,margin:0,border:"none",flexShrink:0,backgroundColor:e.palette.divider},absolute:{position:"absolute",bottom:0,left:0,width:"100%"},inset:{marginLeft:72},light:{backgroundColor:(0,l.U1)(e.palette.divider,.08)},middle:{marginLeft:e.spacing(2),marginRight:e.spacing(2)},vertical:{height:"100%",width:1},flexItem:{alignSelf:"stretch",height:"auto"}}}),{name:"MuiDivider"})(u)},9643:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>x});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(6423),l=n(2692),u=n(4670),c=n(3935),d=n(9437),h=n(2666),f=n(3834),p=n(8920),m=n(3366),g=n(5653);function v(e,t){var n=function(e,t){var n,r=t.getBoundingClientRect();if(t.fakeTransform)n=t.fakeTransform;else{var i=window.getComputedStyle(t);n=i.getPropertyValue("-webkit-transform")||i.getPropertyValue("transform")}var o=0,a=0;if(n&&"none"!==n&&"string"==typeof n){var s=n.split("(")[1].split(")")[0].split(",");o=parseInt(s[4],10),a=parseInt(s[5],10)}return"left"===e?"translateX(".concat(window.innerWidth,"px) translateX(-").concat(r.left-o,"px)"):"right"===e?"translateX(-".concat(r.left+r.width-o,"px)"):"up"===e?"translateY(".concat(window.innerHeight,"px) translateY(-").concat(r.top-a,"px)"):"translateY(-".concat(r.top+r.height-a,"px)")}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}var y={enter:m.x9.enteringScreen,exit:m.x9.leavingScreen};const b=o.forwardRef((function(e,t){var n=e.children,a=e.direction,s=void 0===a?"down":a,l=e.in,u=e.onEnter,m=e.onEntering,b=e.onExit,w=e.onExited,E=e.style,_=e.timeout,C=void 0===_?y:_,S=(0,i.Z)(e,["children","direction","in","onEnter","onEntering","onExit","onExited","style","timeout"]),x=(0,p.Z)(),T=o.useRef(null),I=o.useCallback((function(e){T.current=c.findDOMNode(e)}),[]),k=(0,f.Z)(n.ref,I),O=(0,f.Z)(k,t),P=o.useCallback((function(){T.current&&v(s,T.current)}),[s]);return o.useEffect((function(){if(!l&&"down"!==s&&"right"!==s){var e=(0,d.Z)((function(){T.current&&v(s,T.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[s,l]),o.useEffect((function(){l||P()}),[l,P]),o.createElement(h.ZP,(0,r.Z)({onEnter:function(e,t){var n=T.current;v(s,n),(0,g.n)(n),u&&u(n,t)},onEntering:function(e,t){var n=T.current,i=(0,g.C)({timeout:C,style:E},{mode:"enter"});n.style.webkitTransition=x.transitions.create("-webkit-transform",(0,r.Z)({},i,{easing:x.transitions.easing.easeOut})),n.style.transition=x.transitions.create("transform",(0,r.Z)({},i,{easing:x.transitions.easing.easeOut})),n.style.webkitTransform="none",n.style.transform="none",m&&m(n,t)},onExit:function(){var e=T.current,t=(0,g.C)({timeout:C,style:E},{mode:"exit"});e.style.webkitTransition=x.transitions.create("-webkit-transform",(0,r.Z)({},t,{easing:x.transitions.easing.sharp})),e.style.transition=x.transitions.create("transform",(0,r.Z)({},t,{easing:x.transitions.easing.sharp})),v(s,e),b&&b(e)},onExited:function(){var e=T.current;e.style.webkitTransition="",e.style.transition="",w&&w(e)},appear:!0,in:l,timeout:C},S),(function(e,t){return o.cloneElement(n,(0,r.Z)({ref:O,style:(0,r.Z)({visibility:"exited"!==e||l?void 0:"hidden"},E,{},n.props.style)},t))}))}));var w=n(9895),E=n(3871),_={left:"right",right:"left",top:"down",bottom:"up"},C={enter:m.x9.enteringScreen,exit:m.x9.leavingScreen},S=o.forwardRef((function(e,t){var n=e.anchor,u=void 0===n?"left":n,c=e.BackdropProps,d=e.children,h=e.classes,f=e.className,m=e.elevation,g=void 0===m?16:m,v=e.ModalProps,y=(v=void 0===v?{}:v).BackdropProps,S=(0,i.Z)(v,["BackdropProps"]),x=e.onClose,T=e.open,I=void 0!==T&&T,k=e.PaperProps,O=void 0===k?{}:k,P=e.SlideProps,N=e.transitionDuration,A=void 0===N?C:N,D=e.variant,R=void 0===D?"temporary":D,M=(0,i.Z)(e,["anchor","BackdropProps","children","classes","className","elevation","ModalProps","onClose","open","PaperProps","SlideProps","transitionDuration","variant"]),L=(0,p.Z)(),j=o.useRef(!1);o.useEffect((function(){j.current=!0}),[]);var F=function(e,t){return"rtl"===e.direction&&function(e){return-1!==["left","right"].indexOf(e)}(t)?_[t]:t}(L,u),W=o.createElement(w.Z,(0,r.Z)({elevation:"temporary"===R?g:0,square:!0},O,{className:(0,a.default)(h.paper,h["paperAnchor".concat((0,E.Z)(F))],O.className,"temporary"!==R&&h["paperAnchorDocked".concat((0,E.Z)(F))])}),d);if("permanent"===R)return o.createElement("div",(0,r.Z)({className:(0,a.default)(h.root,h.docked,f),ref:t},M),W);var B=o.createElement(b,(0,r.Z)({in:I,direction:_[F],timeout:A,appear:j.current},P),W);return"persistent"===R?o.createElement("div",(0,r.Z)({className:(0,a.default)(h.root,h.docked,f),ref:t},M),B):o.createElement(s.Z,(0,r.Z)({BackdropProps:(0,r.Z)({},c,{},y,{transitionDuration:A}),BackdropComponent:l.Z,className:(0,a.default)(h.root,h.modal,f),open:I,onClose:x,ref:t},M,S),B)}));const x=(0,u.Z)((function(e){return{root:{},docked:{flex:"0 0 auto"},paper:{overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:e.zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},paperAnchorLeft:{left:0,right:"auto"},paperAnchorRight:{left:"auto",right:0},paperAnchorTop:{top:0,left:0,bottom:"auto",right:0,height:"auto",maxHeight:"100%"},paperAnchorBottom:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},paperAnchorDockedLeft:{borderRight:"1px solid ".concat(e.palette.divider)},paperAnchorDockedTop:{borderBottom:"1px solid ".concat(e.palette.divider)},paperAnchorDockedRight:{borderLeft:"1px solid ".concat(e.palette.divider)},paperAnchorDockedBottom:{borderTop:"1px solid ".concat(e.palette.divider)},modal:{}}}),{name:"MuiDrawer",flip:!1})(S)},32:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(7294).createContext({})},9487:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>_});var r=n(2122),i=n(9968),o=n(6410),a=n(8970),s=n(8481),l=n(1253),u=n(7294),c=(n(9864),n(5697),n(6010)),d=n(2666),h=n(4670),f=n(3366),p=n(5653),m=n(8920),g=u.forwardRef((function(e,t){var n=e.children,i=e.classes,o=e.className,a=e.collapsedHeight,s=void 0===a?"0px":a,h=e.component,g=void 0===h?"div":h,v=e.in,y=e.onEnter,b=e.onEntered,w=e.onEntering,E=e.onExit,_=e.onExiting,C=e.style,S=e.timeout,x=void 0===S?f.x9.standard:S,T=(0,l.Z)(e,["children","classes","className","collapsedHeight","component","in","onEnter","onEntered","onEntering","onExit","onExiting","style","timeout"]),I=(0,m.Z)(),k=u.useRef(),O=u.useRef(null),P=u.useRef(),N="number"==typeof s?"".concat(s,"px"):s;return u.useEffect((function(){return function(){clearTimeout(k.current)}}),[]),u.createElement(d.ZP,(0,r.Z)({in:v,onEnter:function(e,t){e.style.height=N,y&&y(e,t)},onEntered:function(e,t){e.style.height="auto",b&&b(e,t)},onEntering:function(e,t){var n=O.current?O.current.clientHeight:0,r=(0,p.C)({style:C,timeout:x},{mode:"enter"}).duration;if("auto"===x){var i=I.transitions.getAutoHeightDuration(n);e.style.transitionDuration="".concat(i,"ms"),P.current=i}else e.style.transitionDuration="string"==typeof r?r:"".concat(r,"ms");e.style.height="".concat(n,"px"),w&&w(e,t)},onExit:function(e){var t=O.current?O.current.clientHeight:0;e.style.height="".concat(t,"px"),E&&E(e)},onExiting:function(e){var t=O.current?O.current.clientHeight:0,n=(0,p.C)({style:C,timeout:x},{mode:"exit"}).duration;if("auto"===x){var r=I.transitions.getAutoHeightDuration(t);e.style.transitionDuration="".concat(r,"ms"),P.current=r}else e.style.transitionDuration="string"==typeof n?n:"".concat(n,"ms");e.style.height=N,_&&_(e)},addEndListener:function(e,t){"auto"===x&&(k.current=setTimeout(t,P.current||0))},timeout:"auto"===x?null:x},T),(function(e,a){return u.createElement(g,(0,r.Z)({className:(0,c.default)(i.container,o,{entered:i.entered,exited:!v&&"0px"===N&&i.hidden}[e]),style:(0,r.Z)({minHeight:N},C),ref:t},a),u.createElement("div",{className:i.wrapper,ref:O},u.createElement("div",{className:i.wrapperInner},n)))}))}));g.muiSupportAuto=!0;const v=(0,h.Z)((function(e){return{container:{height:0,overflow:"hidden",transition:e.transitions.create("height")},entered:{height:"auto",overflow:"visible"},hidden:{visibility:"hidden"},wrapper:{display:"flex"},wrapperInner:{width:"100%"}}}),{name:"MuiCollapse"})(g);var y=n(9895),b=n(32),w=n(2775),E=u.forwardRef((function(e,t){var n,d=e.children,h=e.classes,f=e.className,p=e.defaultExpanded,m=void 0!==p&&p,g=e.disabled,E=void 0!==g&&g,_=e.expanded,C=e.onChange,S=e.square,x=void 0!==S&&S,T=e.TransitionComponent,I=void 0===T?v:T,k=e.TransitionProps,O=(0,l.Z)(e,["children","classes","className","defaultExpanded","disabled","expanded","onChange","square","TransitionComponent","TransitionProps"]),P=(0,w.Z)({controlled:_,default:m,name:"ExpansionPanel",state:"expanded"}),N=(0,s.Z)(P,2),A=N[0],D=N[1],R=u.useCallback((function(e){D(!A),C&&C(e,!A)}),[A,C,D]),M=(n=u.Children.toArray(d),(0,i.Z)(n)||(0,o.Z)(n)||(0,a.Z)()),L=M[0],j=M.slice(1),F=u.useMemo((function(){return{expanded:A,disabled:E,toggle:R}}),[A,E,R]);return u.createElement(y.Z,(0,r.Z)({className:(0,c.default)(h.root,f,A&&h.expanded,E&&h.disabled,!x&&h.rounded),ref:t,square:x},O),u.createElement(b.Z.Provider,{value:F},L),u.createElement(I,(0,r.Z)({in:A,timeout:"auto"},k),u.createElement("div",{"aria-labelledby":L.props.id,id:L.props["aria-controls"],role:"region"},j)))}));const _=(0,h.Z)((function(e){var t={duration:e.transitions.duration.shortest};return{root:{position:"relative",transition:e.transitions.create(["margin"],t),"&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:e.palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-child":{"&:before":{display:"none"}},"&$expanded":{margin:"16px 0","&:first-child":{marginTop:0},"&:last-child":{marginBottom:0},"&:before":{opacity:0}},"&$expanded + &":{"&:before":{display:"none"}},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},rounded:{borderRadius:0,"&:first-child":{borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},"&:last-child":{borderBottomLeftRadius:e.shape.borderRadius,borderBottomRightRadius:e.shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},expanded:{},disabled:{}}}),{name:"MuiExpansionPanel"})(E)},6692:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(4670),l=o.forwardRef((function(e,t){var n=e.classes,s=e.className,l=(0,i.Z)(e,["classes","className"]);return o.createElement("div",(0,r.Z)({className:(0,a.default)(n.root,s),ref:t},l))}));const u=(0,s.Z)({root:{display:"flex",padding:"8px 24px 24px"}},{name:"MuiExpansionPanelDetails"})(l)},2527:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(4720),l=n(7812),u=n(4670),c=n(32),d=o.forwardRef((function(e,t){var n=e.children,u=e.classes,d=e.className,h=e.expandIcon,f=e.IconButtonProps,p=e.onBlur,m=e.onClick,g=e.onFocusVisible,v=(0,i.Z)(e,["children","classes","className","expandIcon","IconButtonProps","onBlur","onClick","onFocusVisible"]),y=o.useState(!1),b=y[0],w=y[1],E=o.useContext(c.Z),_=E.disabled,C=void 0!==_&&_,S=E.expanded,x=E.toggle;return o.createElement(s.Z,(0,r.Z)({focusRipple:!1,disableRipple:!0,disabled:C,component:"div","aria-expanded":S,className:(0,a.default)(u.root,d,C&&u.disabled,S&&u.expanded,b&&u.focused),onFocusVisible:function(e){w(!0),g&&g(e)},onBlur:function(e){w(!1),p&&p(e)},onClick:function(e){x&&x(e),m&&m(e)},ref:t},v),o.createElement("div",{className:(0,a.default)(u.content,S&&u.expanded)},n),h&&o.createElement(l.Z,(0,r.Z)({className:(0,a.default)(u.expandIcon,S&&u.expanded),edge:"end",component:"div",tabIndex:null,role:null,"aria-hidden":!0},f),h))}));const h=(0,u.Z)((function(e){var t={duration:e.transitions.duration.shortest};return{root:{display:"flex",minHeight:48,transition:e.transitions.create(["min-height","background-color"],t),padding:e.spacing(0,3),"&:hover:not($disabled)":{cursor:"pointer"},"&$expanded":{minHeight:64},"&$focused":{backgroundColor:e.palette.grey[300]},"&$disabled":{opacity:.38}},expanded:{},focused:{},disabled:{},content:{display:"flex",flexGrow:1,transition:e.transitions.create(["margin"],t),margin:"12px 0","&$expanded":{margin:"20px 0"}},expandIcon:{transform:"rotate(0deg)",transition:e.transitions.create("transform",t),"&:hover":{backgroundColor:"transparent"},"&$expanded":{transform:"rotate(180deg)"}}}}),{name:"MuiExpansionPanelSummary"})(d)},3637:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(2666)),s=n(3366),l=n(8920),u=n(5653),c=n(3834),d={entering:{opacity:1},entered:{opacity:1}},h={enter:s.x9.enteringScreen,exit:s.x9.leavingScreen};const f=o.forwardRef((function(e,t){var n=e.children,s=e.in,f=e.onEnter,p=e.onExit,m=e.style,g=e.timeout,v=void 0===g?h:g,y=(0,i.Z)(e,["children","in","onEnter","onExit","style","timeout"]),b=(0,l.Z)(),w=(0,c.Z)(n.ref,t);return o.createElement(a.ZP,(0,r.Z)({appear:!0,in:s,onEnter:function(e,t){(0,u.n)(e);var n=(0,u.C)({style:m,timeout:v},{mode:"enter"});e.style.webkitTransition=b.transitions.create("opacity",n),e.style.transition=b.transitions.create("opacity",n),f&&f(e,t)},onExit:function(e){var t=(0,u.C)({style:m,timeout:v},{mode:"exit"});e.style.webkitTransition=b.transitions.create("opacity",t),e.style.transition=b.transitions.create("opacity",t),p&&p(e)},timeout:v},y),(function(e,t){return o.cloneElement(n,(0,r.Z)({style:(0,r.Z)({opacity:0,visibility:"exited"!==e||s?void 0:"hidden"},d[e],{},m,{},n.props.style),ref:w},t))}))}))},9446:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(4741),l=n(4670),u=o.forwardRef((function(e,t){var n=e.disableUnderline,l=e.classes,u=e.fullWidth,c=void 0!==u&&u,d=e.inputComponent,h=void 0===d?"input":d,f=e.multiline,p=void 0!==f&&f,m=e.type,g=void 0===m?"text":m,v=(0,i.Z)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return o.createElement(s.Z,(0,r.Z)({classes:(0,r.Z)({},l,{root:(0,a.default)(l.root,!n&&l.underline),underline:null}),fullWidth:c,inputComponent:h,multiline:p,ref:t,type:g},v))}));u.muiName="Input";const c=(0,l.Z)((function(e){var t="light"===e.palette.type,n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)";return{root:{position:"relative",backgroundColor:r,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:t?"rgba(0, 0, 0, 0.13)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:r}},"&$focused":{backgroundColor:t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)"},"&$disabled":{backgroundColor:t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(n),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:before":{borderBottom:"1px solid ".concat(e.palette.text.primary)},"&$disabled:before":{borderBottomStyle:"dotted"}},focused:{},disabled:{},adornedStart:{paddingLeft:12},adornedEnd:{paddingRight:12},error:{},marginDense:{},multiline:{padding:"27px 12px 10px","&$marginDense":{paddingTop:23,paddingBottom:6}},input:{padding:"27px 12px 10px","&:-webkit-autofill":{WebkitBoxShadow:"dark"===e.palette.type?"0 0 0 100px #266798 inset":null,WebkitTextFillColor:"dark"===e.palette.type?"#fff":null,borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},inputMarginDense:{paddingTop:23,paddingBottom:6},inputHiddenLabel:{paddingTop:18,paddingBottom:19,"&$inputMarginDense":{paddingTop:10,paddingBottom:11}},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiFilledInput"})(u)},4436:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(6519),l=n(4670),u=n(3871),c=n(3711),d=n(5736),h=o.forwardRef((function(e,t){var n=e.children,l=e.classes,h=e.className,f=e.color,p=void 0===f?"primary":f,m=e.component,g=void 0===m?"div":m,v=e.disabled,y=void 0!==v&&v,b=e.error,w=void 0!==b&&b,E=e.fullWidth,_=void 0!==E&&E,C=e.focused,S=e.hiddenLabel,x=void 0!==S&&S,T=e.margin,I=void 0===T?"none":T,k=e.required,O=void 0!==k&&k,P=e.size,N=e.variant,A=void 0===N?"standard":N,D=(0,i.Z)(e,["children","classes","className","color","component","disabled","error","fullWidth","focused","hiddenLabel","margin","required","size","variant"]),R=o.useState((function(){var e=!1;return n&&o.Children.forEach(n,(function(t){if((0,c.Z)(t,["Input","Select"])){var n=(0,c.Z)(t,["Select"])?t.props.input:t;n&&(0,s.B7)(n.props)&&(e=!0)}})),e})),M=R[0],L=R[1],j=o.useState((function(){var e=!1;return n&&o.Children.forEach(n,(function(t){(0,c.Z)(t,["Input","Select"])&&(0,s.vd)(t.props,!0)&&(e=!0)})),e})),F=j[0],W=j[1],B=o.useState(!1),z=B[0],U=B[1],V=void 0!==C?C:z;y&&V&&U(!1);var Z=o.useCallback((function(){W(!0)}),[]),$={adornedStart:M,setAdornedStart:L,color:p,disabled:y,error:w,filled:F,focused:V,fullWidth:_,hiddenLabel:x,margin:("small"===P?"dense":void 0)||I,onBlur:function(){U(!1)},onEmpty:o.useCallback((function(){W(!1)}),[]),onFilled:Z,onFocus:function(){U(!0)},registerEffect:void 0,required:O,variant:A};return o.createElement(d.Z.Provider,{value:$},o.createElement(g,(0,r.Z)({className:(0,a.default)(l.root,h,"none"!==I&&l["margin".concat((0,u.Z)(I))],_&&l.fullWidth),ref:t},D),n))}));const f=(0,l.Z)({root:{display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},marginNormal:{marginTop:16,marginBottom:8},marginDense:{marginTop:8,marginBottom:4},fullWidth:{width:"100%"}},{name:"MuiFormControl"})(h)},5736:(e,t,n)=>{"use strict";n.d(t,{Y:()=>o,Z:()=>a});var r=n(7294),i=r.createContext();function o(){return r.useContext(i)}const a=i},9345:(e,t,n)=>{"use strict";function r(e){var t=e.props,n=e.states,r=e.muiFormControl;return n.reduce((function(e,n){return e[n]=t[n],r&&void 0===t[n]&&(e[n]=r[n]),e}),{})}n.d(t,{Z:()=>r})},202:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.Z,useFormControl:()=>i.Z});var r=n(4436),i=n(2601)},2601:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7294),i=n(5736);function o(){return r.useContext(i.Z)}},5190:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(2601),l=n(4670),u=n(2318),c=n(3871),d=o.forwardRef((function(e,t){e.checked;var n=e.classes,l=e.className,d=e.control,h=e.disabled,f=(e.inputRef,e.label),p=e.labelPlacement,m=void 0===p?"end":p,g=(e.name,e.onChange,e.value,(0,i.Z)(e,["checked","classes","className","control","disabled","inputRef","label","labelPlacement","name","onChange","value"])),v=(0,s.Z)(),y=h;void 0===y&&void 0!==d.props.disabled&&(y=d.props.disabled),void 0===y&&v&&(y=v.disabled);var b={disabled:y};return["checked","name","onChange","value","inputRef"].forEach((function(t){void 0===d.props[t]&&void 0!==e[t]&&(b[t]=e[t])})),o.createElement("label",(0,r.Z)({className:(0,a.default)(n.root,l,"end"!==m&&n["labelPlacement".concat((0,c.Z)(m))],y&&n.disabled),ref:t},g),o.cloneElement(d,b),o.createElement(u.Z,{component:"span",className:(0,a.default)(n.label,y&&n.disabled)},f))}));const h=(0,l.Z)((function(e){return{root:{display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,"&$disabled":{cursor:"default"}},labelPlacementStart:{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},labelPlacementTop:{flexDirection:"column-reverse",marginLeft:16},labelPlacementBottom:{flexDirection:"column",marginLeft:16},disabled:{},label:{"&$disabled":{color:e.palette.text.disabled}}}}),{name:"MuiFormControlLabel"})(d)},5249:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(4670),l=o.forwardRef((function(e,t){var n=e.classes,s=e.className,l=e.row,u=void 0!==l&&l,c=(0,i.Z)(e,["classes","className","row"]);return o.createElement("div",(0,r.Z)({className:(0,a.default)(n.root,s,u&&n.row),ref:t},c))}));const u=(0,s.Z)({root:{display:"flex",flexDirection:"column",flexWrap:"wrap"},row:{flexDirection:"row"}},{name:"MuiFormGroup"})(l)},170:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(2666)),s=n(8920),l=n(5653),u=n(3834);function c(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var d={entering:{opacity:1,transform:c(1)},entered:{opacity:1,transform:"none"}},h=o.forwardRef((function(e,t){var n=e.children,h=e.in,f=e.onEnter,p=e.onExit,m=e.style,g=e.timeout,v=void 0===g?"auto":g,y=(0,i.Z)(e,["children","in","onEnter","onExit","style","timeout"]),b=o.useRef(),w=o.useRef(),E=(0,u.Z)(n.ref,t),_=(0,s.Z)();return o.useEffect((function(){return function(){clearTimeout(b.current)}}),[]),o.createElement(a.ZP,(0,r.Z)({appear:!0,in:h,onEnter:function(e,t){(0,l.n)(e);var n,r=(0,l.C)({style:m,timeout:v},{mode:"enter"}),i=r.duration,o=r.delay;"auto"===v?(n=_.transitions.getAutoHeightDuration(e.clientHeight),w.current=n):n=i,e.style.transition=[_.transitions.create("opacity",{duration:n,delay:o}),_.transitions.create("transform",{duration:.666*n,delay:o})].join(","),f&&f(e,t)},onExit:function(e){var t,n=(0,l.C)({style:m,timeout:v},{mode:"exit"}),r=n.duration,i=n.delay;"auto"===v?(t=_.transitions.getAutoHeightDuration(e.clientHeight),w.current=t):t=r,e.style.transition=[_.transitions.create("opacity",{duration:t,delay:i}),_.transitions.create("transform",{duration:.666*t,delay:i||.333*t})].join(","),e.style.opacity="0",e.style.transform=c(.75),p&&p(e)},addEndListener:function(e,t){"auto"===v&&(b.current=setTimeout(t,w.current||0))},timeout:"auto"===v?null:v},y),(function(e,t){return o.cloneElement(n,(0,r.Z)({style:(0,r.Z)({opacity:0,transform:c(.75),visibility:"exited"!==e||h?void 0:"hidden"},d[e],{},m,{},n.props.style),ref:E},t))}))}));h.muiSupportAuto=!0;const f=h},9152:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(3871),u=o.forwardRef((function(e,t){var n=e.classes,s=e.className,u=e.color,c=void 0===u?"inherit":u,d=e.component,h=void 0===d?"span":d,f=e.fontSize,p=void 0===f?"default":f,m=(0,i.Z)(e,["classes","className","color","component","fontSize"]);return o.createElement(h,(0,r.Z)({className:(0,a.default)("material-icons",n.root,s,"inherit"!==c&&n["color".concat((0,l.Z)(c))],"default"!==p&&n["fontSize".concat((0,l.Z)(p))]),"aria-hidden":!0,ref:t},m))}));u.muiName="Icon";const c=(0,s.Z)((function(e){return{root:{userSelect:"none",fontSize:e.typography.pxToRem(24),width:"1em",height:"1em",overflow:"hidden",flexShrink:0},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(36)}}}),{name:"MuiIcon"})(u)},7812:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(9693),u=n(4720),c=n(3871),d=o.forwardRef((function(e,t){var n=e.edge,s=void 0!==n&&n,l=e.children,d=e.classes,h=e.className,f=e.color,p=void 0===f?"default":f,m=e.disabled,g=void 0!==m&&m,v=e.disableFocusRipple,y=void 0!==v&&v,b=e.size,w=void 0===b?"medium":b,E=(0,i.Z)(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return o.createElement(u.Z,(0,r.Z)({className:(0,a.default)(d.root,h,"default"!==p&&d["color".concat((0,c.Z)(p))],g&&d.disabled,"small"===w&&d["size".concat((0,c.Z)(w))],{start:d.edgeStart,end:d.edgeEnd}[s]),centerRipple:!0,focusRipple:!y,disabled:g,ref:t},E),o.createElement("span",{className:d.label},l))}));const h=(0,s.Z)((function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:(0,l.U1)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,l.U1)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,l.U1)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(d)},1890:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.Z});var r=n(7812)},8799:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(4741),l=n(4670),u=o.forwardRef((function(e,t){var n=e.disableUnderline,l=e.classes,u=e.fullWidth,c=void 0!==u&&u,d=e.inputComponent,h=void 0===d?"input":d,f=e.multiline,p=void 0!==f&&f,m=e.type,g=void 0===m?"text":m,v=(0,i.Z)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return o.createElement(s.Z,(0,r.Z)({classes:(0,r.Z)({},l,{root:(0,a.default)(l.root,!n&&l.underline),underline:null}),fullWidth:c,inputComponent:h,multiline:p,ref:t,type:g},v))}));u.muiName="Input";const c=(0,l.Z)((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(t),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(e.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(t)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},marginDense:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}}),{name:"MuiInput"})(u)},4023:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(2318),l=n(4670),u=n(5736),c=o.forwardRef((function(e,t){var n=e.children,l=e.classes,c=e.className,d=e.component,h=void 0===d?"div":d,f=e.disablePointerEvents,p=void 0!==f&&f,m=e.disableTypography,g=void 0!==m&&m,v=e.position,y=e.variant,b=(0,i.Z)(e,["children","classes","className","component","disablePointerEvents","disableTypography","position","variant"]),w=(0,u.Y)()||{},E=y;return y&&w.variant,w&&!E&&(E=w.variant),o.createElement(u.Z.Provider,{value:null},o.createElement(h,(0,r.Z)({className:(0,a.default)(l.root,c,p&&l.disablePointerEvents,w.hiddenLabel&&l.hiddenLabel,"filled"===E&&l.filled,{start:l.positionStart,end:l.positionEnd}[v],"dense"===w.margin&&l.marginDense),ref:t},b),"string"!=typeof n||g?n:o.createElement(s.Z,{color:"textSecondary"},n)))}));const d=(0,l.Z)({root:{display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap"},filled:{"&$positionStart:not($hiddenLabel)":{marginTop:16}},positionStart:{marginRight:8},positionEnd:{marginLeft:8},disablePointerEvents:{pointerEvents:"none"},hiddenLabel:{},marginDense:{}},{name:"MuiInputAdornment"})(c)},4741:(e,t,n)=>{"use strict";n.d(t,{Z:()=>w});var r=n(1253),i=n(2122),o=n(7294),a=(n(5697),n(6010)),s=n(9345),l=n(5736),u=n(4670),c=n(3871),d=n(3834),h=n(9437);function f(e,t){return parseInt(e[t],10)||0}var p="undefined"!=typeof window?o.useLayoutEffect:o.useEffect,m={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};const g=o.forwardRef((function(e,t){var n=e.onChange,a=e.rows,s=e.rowsMax,l=e.rowsMin,u=void 0===l?1:l,c=e.style,g=e.value,v=(0,r.Z)(e,["onChange","rows","rowsMax","rowsMin","style","value"]),y=a||u,b=o.useRef(null!=g).current,w=o.useRef(null),E=(0,d.Z)(t,w),_=o.useRef(null),C=o.useRef(0),S=o.useState({}),x=S[0],T=S[1],I=o.useCallback((function(){var t=w.current,n=window.getComputedStyle(t),r=_.current;r.style.width=n.width,r.value=t.value||e.placeholder||"x";var i=n["box-sizing"],o=f(n,"padding-bottom")+f(n,"padding-top"),a=f(n,"border-bottom-width")+f(n,"border-top-width"),l=r.scrollHeight-o;r.value="x";var u=r.scrollHeight-o,c=l;y&&(c=Math.max(Number(y)*u,c)),s&&(c=Math.min(Number(s)*u,c));var d=(c=Math.max(c,u))+("border-box"===i?o+a:0),h=Math.abs(c-l)<=1;T((function(e){return C.current<20&&(d>0&&Math.abs((e.outerHeightStyle||0)-d)>1||e.overflow!==h)?(C.current+=1,{overflow:h,outerHeightStyle:d}):e}))}),[s,y,e.placeholder]);return o.useEffect((function(){var e=(0,h.Z)((function(){C.current=0,I()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[I]),p((function(){I()})),o.useEffect((function(){C.current=0}),[g]),o.createElement(o.Fragment,null,o.createElement("textarea",(0,i.Z)({value:g,onChange:function(e){C.current=0,b||I(),n&&n(e)},ref:E,rows:y,style:(0,i.Z)({height:x.outerHeightStyle,overflow:x.overflow?"hidden":null},c)},v)),o.createElement("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:_,tabIndex:-1,style:(0,i.Z)({},m,{},c)}))}));var v=n(6519),y="undefined"==typeof window?o.useEffect:o.useLayoutEffect,b=o.forwardRef((function(e,t){var n=e["aria-describedby"],u=e.autoComplete,h=e.autoFocus,f=e.classes,p=e.className,m=(e.color,e.defaultValue),b=e.disabled,w=e.endAdornment,E=(e.error,e.fullWidth),_=void 0!==E&&E,C=e.id,S=e.inputComponent,x=void 0===S?"input":S,T=e.inputProps,I=void 0===T?{}:T,k=e.inputRef,O=(e.margin,e.multiline),P=void 0!==O&&O,N=e.name,A=e.onBlur,D=e.onChange,R=e.onClick,M=e.onFocus,L=e.onKeyDown,j=e.onKeyUp,F=e.placeholder,W=e.readOnly,B=e.renderSuffix,z=e.rows,U=e.rowsMax,V=e.rowsMin,Z=e.startAdornment,$=e.type,q=void 0===$?"text":$,H=e.value,K=(0,r.Z)(e,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","rowsMin","startAdornment","type","value"]),G=null!=I.value?I.value:H,Q=o.useRef(null!=G).current,Y=o.useRef(),X=o.useCallback((function(e){}),[]),J=(0,d.Z)(I.ref,X),ee=(0,d.Z)(k,J),te=(0,d.Z)(Y,ee),ne=o.useState(!1),re=ne[0],ie=ne[1],oe=(0,l.Y)(),ae=(0,s.Z)({props:e,muiFormControl:oe,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});ae.focused=oe?oe.focused:re,o.useEffect((function(){!oe&&b&&re&&(ie(!1),A&&A())}),[oe,b,re,A]);var se=oe&&oe.onFilled,le=oe&&oe.onEmpty,ue=o.useCallback((function(e){(0,v.vd)(e)?se&&se():le&&le()}),[se,le]);y((function(){Q&&ue({value:G})}),[G,ue,Q]),o.useEffect((function(){ue(Y.current)}),[]);var ce=x,de=(0,i.Z)({},I,{ref:te});return"string"!=typeof ce?de=(0,i.Z)({inputRef:te,type:q},de,{ref:null}):P?!z||U||V?(de=(0,i.Z)({rows:z,rowsMax:U},de),ce=g):ce="textarea":de=(0,i.Z)({type:q},de),o.useEffect((function(){oe&&oe.setAdornedStart(Boolean(Z))}),[oe,Z]),o.createElement("div",(0,i.Z)({className:(0,a.default)(f.root,f["color".concat((0,c.Z)(ae.color||"primary"))],p,ae.disabled&&f.disabled,ae.error&&f.error,_&&f.fullWidth,ae.focused&&f.focused,oe&&f.formControl,P&&f.multiline,Z&&f.adornedStart,w&&f.adornedEnd,"dense"===ae.margin&&f.marginDense),onClick:function(e){Y.current&&e.currentTarget===e.target&&Y.current.focus(),R&&R(e)},ref:t},K),Z,o.createElement(l.Z.Provider,{value:null},o.createElement(ce,(0,i.Z)({"aria-invalid":ae.error,"aria-describedby":n,autoComplete:u,autoFocus:h,defaultValue:m,disabled:ae.disabled,id:C,onAnimationStart:function(e){ue("mui-auto-fill-cancel"===e.animationName?Y.current:{value:"x"})},name:N,placeholder:F,readOnly:W,required:ae.required,rows:z,value:G,onKeyDown:L,onKeyUp:j},de,{className:(0,a.default)(f.input,I.className,ae.disabled&&f.disabled,P&&f.inputMultiline,ae.hiddenLabel&&f.inputHiddenLabel,Z&&f.inputAdornedStart,w&&f.inputAdornedEnd,"search"===q&&f.inputTypeSearch,"dense"===ae.margin&&f.inputMarginDense),onBlur:function(e){A&&A(e),I.onBlur&&I.onBlur(e),oe&&oe.onBlur?oe.onBlur(e):ie(!1)},onChange:function(e){if(!Q){var t=e.target||Y.current;if(null==t)throw new TypeError("Material-UI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://material-ui.com/r/input-component-ref-interface for more info.");ue({value:t.value})}for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];I.onChange&&I.onChange.apply(I,[e].concat(r)),D&&D.apply(void 0,[e].concat(r))},onFocus:function(e){ae.disabled?e.stopPropagation():(M&&M(e),I.onFocus&&I.onFocus(e),oe&&oe.onFocus?oe.onFocus(e):ie(!0))}}))),w,B?B((0,i.Z)({},ae,{startAdornment:Z})):null)}));const w=(0,u.Z)((function(e){var t="light"===e.palette.type,n={color:"currentColor",opacity:t?.42:.5,transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o={opacity:t?.42:.5};return{"@global":{"@keyframes mui-auto-fill":{from:{}},"@keyframes mui-auto-fill-cancel":{from:{}}},root:(0,i.Z)({},e.typography.body1,{color:e.palette.text.primary,lineHeight:"1.1876em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center","&$disabled":{color:e.palette.text.disabled,cursor:"default"}}),formControl:{},focused:{},disabled:{},adornedStart:{},adornedEnd:{},error:{},marginDense:{},multiline:{padding:"".concat(6,"px 0 ").concat(7,"px"),"&$marginDense":{paddingTop:3}},colorSecondary:{},fullWidth:{width:"100%"},input:{font:"inherit",color:"currentColor",padding:"".concat(6,"px 0 ").concat(7,"px"),border:0,boxSizing:"content-box",background:"none",height:"1.1876em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&:-ms-input-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{"-webkit-appearance":"none"},"label[data-shrink=false] + $formControl &":{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},"&$disabled":{opacity:1},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},inputMarginDense:{paddingTop:3},inputMultiline:{height:"auto",resize:"none",padding:0},inputTypeSearch:{"-moz-appearance":"textfield","-webkit-appearance":"textfield"},inputAdornedStart:{},inputAdornedEnd:{},inputHiddenLabel:{}}}),{name:"MuiInputBase"})(b)},6519:(e,t,n)=>{"use strict";function r(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function i(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(r(e.value)&&""!==e.value||t&&r(e.defaultValue)&&""!==e.defaultValue)}function o(e){return e.startAdornment}n.d(t,{vd:()=>i,B7:()=>o})},3700:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(9345),l=n(2601),u=n(4670),c=n(3871),d=o.forwardRef((function(e,t){var n=e.children,u=e.classes,d=e.className,h=(e.color,e.component),f=void 0===h?"label":h,p=(e.disabled,e.error,e.filled,e.focused,e.required,(0,i.Z)(e,["children","classes","className","color","component","disabled","error","filled","focused","required"])),m=(0,l.Z)(),g=(0,s.Z)({props:e,muiFormControl:m,states:["color","required","focused","disabled","error","filled"]});return o.createElement(f,(0,r.Z)({className:(0,a.default)(u.root,u["color".concat((0,c.Z)(g.color||"primary"))],d,g.disabled&&u.disabled,g.error&&u.error,g.filled&&u.filled,g.focused&&u.focused,g.required&&u.required),ref:t},p),n,g.required&&o.createElement("span",{className:(0,a.default)(u.asterisk,g.error&&u.error)}," ","*"))}));const h=(0,u.Z)((function(e){return{root:(0,r.Z)({color:e.palette.text.secondary},e.typography.body1,{lineHeight:1,padding:0,"&$focused":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),colorSecondary:{"&$focused":{color:e.palette.secondary.main}},focused:{},disabled:{},error:{},filled:{},required:{},asterisk:{"&$error":{color:e.palette.error.main}}}}),{name:"MuiFormLabel"})(d);var f=o.forwardRef((function(e,t){var n=e.classes,u=e.className,c=e.disableAnimation,d=void 0!==c&&c,f=(e.margin,e.shrink),p=(e.variant,(0,i.Z)(e,["classes","className","disableAnimation","margin","shrink","variant"])),m=(0,l.Z)(),g=f;void 0===g&&m&&(g=m.filled||m.focused||m.adornedStart);var v=(0,s.Z)({props:e,muiFormControl:m,states:["margin","variant"]});return o.createElement(h,(0,r.Z)({"data-shrink":g,className:(0,a.default)(n.root,u,m&&n.formControl,!d&&n.animated,g&&n.shrink,"dense"===v.margin&&n.marginDense,{filled:n.filled,outlined:n.outlined}[v.variant]),classes:{focused:n.focused,disabled:n.disabled,error:n.error,required:n.required,asterisk:n.asterisk},ref:t},p))}));const p=(0,u.Z)((function(e){return{root:{display:"block",transformOrigin:"top left"},focused:{},disabled:{},error:{},required:{},asterisk:{},formControl:{position:"absolute",left:0,top:0,transform:"translate(0, 24px) scale(1)"},marginDense:{transform:"translate(0, 21px) scale(1)"},shrink:{transform:"translate(0, 1.5px) scale(0.75)",transformOrigin:"top left"},animated:{transition:e.transitions.create(["color","transform"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},filled:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 20px) scale(1)","&$marginDense":{transform:"translate(12px, 17px) scale(1)"},"&$shrink":{transform:"translate(12px, 10px) scale(0.75)","&$marginDense":{transform:"translate(12px, 7px) scale(0.75)"}}},outlined:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 20px) scale(1)","&$marginDense":{transform:"translate(14px, 12px) scale(1)"},"&$shrink":{transform:"translate(14px, -6px) scale(0.75)"}}}}),{name:"MuiInputLabel"})(f)},9169:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.Z});var r=n(3700)},6572:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>f});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(3871),l=n(4670),u=n(4896),c=n(3834),d=n(2318),h=o.forwardRef((function(e,t){var n=e.classes,l=e.className,h=e.color,f=void 0===h?"primary":h,p=e.component,m=void 0===p?"a":p,g=e.onBlur,v=e.onFocus,y=e.TypographyClasses,b=e.underline,w=void 0===b?"hover":b,E=e.variant,_=void 0===E?"inherit":E,C=(0,i.Z)(e,["classes","className","color","component","onBlur","onFocus","TypographyClasses","underline","variant"]),S=(0,u.Z)(),x=S.isFocusVisible,T=S.onBlurVisible,I=S.ref,k=o.useState(!1),O=k[0],P=k[1],N=(0,c.Z)(t,I);return o.createElement(d.Z,(0,r.Z)({className:(0,a.default)(n.root,n["underline".concat((0,s.Z)(w))],l,O&&n.focusVisible,"button"===m&&n.button),classes:y,color:f,component:m,onBlur:function(e){O&&(T(),P(!1)),g&&g(e)},onFocus:function(e){x(e)&&P(!0),v&&v(e)},ref:N,variant:_},C))}));const f=(0,l.Z)({root:{},underlineNone:{textDecoration:"none"},underlineHover:{textDecoration:"none","&:hover":{textDecoration:"underline"}},underlineAlways:{textDecoration:"underline"},button:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none","&::-moz-focus-inner":{borderStyle:"none"},"&$focusVisible":{outline:"auto"}},focusVisible:{}},{name:"MuiLink"})(h)},2822:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(6987),u=o.forwardRef((function(e,t){var n=e.children,s=e.classes,u=e.className,c=e.component,d=void 0===c?"ul":c,h=e.dense,f=void 0!==h&&h,p=e.disablePadding,m=void 0!==p&&p,g=e.subheader,v=(0,i.Z)(e,["children","classes","className","component","dense","disablePadding","subheader"]),y=o.useMemo((function(){return{dense:f}}),[f]);return o.createElement(l.Z.Provider,{value:y},o.createElement(d,(0,r.Z)({className:(0,a.default)(s.root,u,f&&s.dense,!m&&s.padding,g&&s.subheader),ref:t},v),g,n))}));const c=(0,s.Z)({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(u)},6987:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(7294).createContext({})},3240:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.Z});var r=n(2822)},4968:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>m});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(4720),u=n(3711),c=n(3834),d=n(6987),h=n(3935),f="undefined"==typeof window?o.useEffect:o.useLayoutEffect,p=o.forwardRef((function(e,t){var n=e.alignItems,s=void 0===n?"center":n,p=e.autoFocus,m=void 0!==p&&p,g=e.button,v=void 0!==g&&g,y=e.children,b=e.classes,w=e.className,E=e.component,_=e.ContainerComponent,C=void 0===_?"li":_,S=e.ContainerProps,x=(S=void 0===S?{}:S).className,T=(0,i.Z)(S,["className"]),I=e.dense,k=void 0!==I&&I,O=e.disabled,P=void 0!==O&&O,N=e.disableGutters,A=void 0!==N&&N,D=e.divider,R=void 0!==D&&D,M=e.focusVisibleClassName,L=e.selected,j=void 0!==L&&L,F=(0,i.Z)(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),W=o.useContext(d.Z),B={dense:k||W.dense||!1,alignItems:s},z=o.useRef(null);f((function(){m&&z.current&&z.current.focus()}),[m]);var U=o.Children.toArray(y),V=U.length&&(0,u.Z)(U[U.length-1],["ListItemSecondaryAction"]),Z=o.useCallback((function(e){z.current=h.findDOMNode(e)}),[]),$=(0,c.Z)(Z,t),q=(0,r.Z)({className:(0,a.default)(b.root,w,B.dense&&b.dense,!A&&b.gutters,R&&b.divider,P&&b.disabled,v&&b.button,"center"!==s&&b.alignItemsFlexStart,V&&b.secondaryAction,j&&b.selected),disabled:P},F),H=E||"li";return v&&(q.component=E||"div",q.focusVisibleClassName=(0,a.default)(b.focusVisible,M),H=l.Z),V?(H=q.component||E?H:"div","li"===C&&("li"===H?H="div":"li"===q.component&&(q.component="div")),o.createElement(d.Z.Provider,{value:B},o.createElement(C,(0,r.Z)({className:(0,a.default)(b.container,x),ref:$},T),o.createElement(H,q,U),U.pop()))):o.createElement(d.Z.Provider,{value:B},o.createElement(H,(0,r.Z)({ref:$},q),U))}));const m=(0,s.Z)((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(p)},7311:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(6987),u=o.forwardRef((function(e,t){var n=e.classes,s=e.className,u=(0,i.Z)(e,["classes","className"]),c=o.useContext(l.Z);return o.createElement("div",(0,r.Z)({className:(0,a.default)(n.root,s,"flex-start"===c.alignItems&&n.alignItemsFlexStart),ref:t},u))}));const c=(0,s.Z)((function(e){return{root:{minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}}),{name:"MuiListItemIcon"})(u)},7183:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(2318),u=n(6987),c=o.forwardRef((function(e,t){var n=e.children,s=e.classes,c=e.className,d=e.disableTypography,h=void 0!==d&&d,f=e.inset,p=void 0!==f&&f,m=e.primary,g=e.primaryTypographyProps,v=e.secondary,y=e.secondaryTypographyProps,b=(0,i.Z)(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),w=o.useContext(u.Z).dense,E=null!=m?m:n;null==E||E.type===l.Z||h||(E=o.createElement(l.Z,(0,r.Z)({variant:w?"body2":"body1",className:s.primary,component:"span",display:"block"},g),E));var _=v;return null==_||_.type===l.Z||h||(_=o.createElement(l.Z,(0,r.Z)({variant:"body2",className:s.secondary,color:"textSecondary",display:"block"},y),_)),o.createElement("div",(0,r.Z)({className:(0,a.default)(s.root,c,w&&s.dense,p&&s.inset,E&&_&&s.multiline),ref:t},b),E,_)}));const d=(0,s.Z)({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(c)},6423:(e,t,n)=>{"use strict";n.d(t,{Z:()=>O});var r=n(1253),i=n(2122),o=n(7294),a=n(3935),s=(n(5697),n(159)),l=n(3869),u=n(626),c=n(6234),d=n(2568),h=n(3834),f=n(5192),p=n(2781),m=n(6610),g=n(5991),v=n(5061),y=n(5840),b=n(713);function w(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function E(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function _(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0,o=[t,n].concat((0,v.Z)(r)),a=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===o.indexOf(e)&&-1===a.indexOf(e.tagName)&&w(e,i)}))}function C(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}var S=function(){function e(){(0,m.Z)(this,e),this.modals=[],this.containers=[]}return(0,g.Z)(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&w(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);_(t,e.mountNode,e.modalRef,r,!0);var i=C(this.containers,(function(e){return e.container===t}));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=C(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=function(e,t){var n,r=[],i=[],o=e.container;if(!t.disableScrollLock){if(function(e){var t=(0,u.Z)(e);return t.body===e?(0,b.Z)(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o)){var a=(0,y.Z)();r.push({value:o.style.paddingRight,key:"padding-right",el:o}),o.style["padding-right"]="".concat(E(o)+a,"px"),n=(0,u.Z)(o).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){i.push(e.style.paddingRight),e.style.paddingRight="".concat(E(e)+a,"px")}))}var s=o.parentElement,l="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:o;r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){i[t]?e.style.paddingRight=i[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=C(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&w(e.modalRef,!0),_(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var i=r.modals[r.modals.length-1];i.modalRef&&w(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();const x=function(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,i=e.disableEnforceFocus,s=void 0!==i&&i,l=e.disableRestoreFocus,c=void 0!==l&&l,d=e.getDoc,f=e.isEnabled,p=e.open,m=o.useRef(),g=o.useRef(null),v=o.useRef(null),y=o.useRef(),b=o.useRef(null),w=o.useCallback((function(e){b.current=a.findDOMNode(e)}),[]),E=(0,h.Z)(t.ref,w);return o.useMemo((function(){p&&"undefined"!=typeof window&&(y.current=d().activeElement)}),[p]),o.useEffect((function(){if(p){var e=(0,u.Z)(b.current);r||!b.current||b.current.contains(e.activeElement)||(b.current.hasAttribute("tabIndex")||b.current.setAttribute("tabIndex",-1),b.current.focus());var t=function(){s||!f()||m.current?m.current=!1:b.current&&!b.current.contains(e.activeElement)&&b.current.focus()},n=function(t){!s&&f()&&9===t.keyCode&&e.activeElement===b.current&&(m.current=!0,t.shiftKey?v.current.focus():g.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var i=setInterval((function(){t()}),50);return function(){clearInterval(i),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),c||(y.current&&y.current.focus&&y.current.focus(),y.current=null)}}}),[r,s,c,f,p]),o.createElement(o.Fragment,null,o.createElement("div",{tabIndex:0,ref:g,"data-test":"sentinelStart"}),o.cloneElement(t,{ref:E}),o.createElement("div",{tabIndex:0,ref:v,"data-test":"sentinelEnd"}))};var T={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}};const I=o.forwardRef((function(e,t){var n=e.invisible,a=void 0!==n&&n,s=e.open,l=(0,r.Z)(e,["invisible","open"]);return s?o.createElement("div",(0,i.Z)({"aria-hidden":!0,ref:t},l,{style:(0,i.Z)({},T.root,{},a?T.invisible:{},{},l.style)})):null}));var k=new S;const O=o.forwardRef((function(e,t){var n=(0,s.Z)(),m=(0,l.Z)({name:"MuiModal",props:(0,i.Z)({},e),theme:n}),g=m.BackdropComponent,v=void 0===g?I:g,y=m.BackdropProps,b=m.children,E=m.closeAfterTransition,_=void 0!==E&&E,C=m.container,S=m.disableAutoFocus,T=void 0!==S&&S,O=m.disableBackdropClick,P=void 0!==O&&O,N=m.disableEnforceFocus,A=void 0!==N&&N,D=m.disableEscapeKeyDown,R=void 0!==D&&D,M=m.disablePortal,L=void 0!==M&&M,j=m.disableRestoreFocus,F=void 0!==j&&j,W=m.disableScrollLock,B=void 0!==W&&W,z=m.hideBackdrop,U=void 0!==z&&z,V=m.keepMounted,Z=void 0!==V&&V,$=m.manager,q=void 0===$?k:$,H=m.onBackdropClick,K=m.onClose,G=m.onEscapeKeyDown,Q=m.onRendered,Y=m.open,X=(0,r.Z)(m,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),J=o.useState(!0),ee=J[0],te=J[1],ne=o.useRef({}),re=o.useRef(null),ie=o.useRef(null),oe=(0,h.Z)(ie,t),ae=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(m),se=function(){return(0,u.Z)(re.current)},le=function(){return ne.current.modalRef=ie.current,ne.current.mountNode=re.current,ne.current},ue=function(){q.mount(le(),{disableScrollLock:B}),ie.current.scrollTop=0},ce=(0,f.Z)((function(){var e=function(e){return e="function"==typeof e?e():e,a.findDOMNode(e)}(C)||se().body;q.add(le(),e),ie.current&&ue()})),de=o.useCallback((function(){return q.isTopModal(le())}),[q]),he=(0,f.Z)((function(e){re.current=e,e&&(Q&&Q(),Y&&de()?ue():w(ie.current,!0))})),fe=o.useCallback((function(){q.remove(le())}),[q]);if(o.useEffect((function(){return function(){fe()}}),[fe]),o.useEffect((function(){Y?ce():ae&&_||fe()}),[Y,fe,ae,_,ce]),!Z&&!Y&&(!ae||ee))return null;var pe=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:p.Z}),me={};return void 0===b.props.tabIndex&&(me.tabIndex=b.props.tabIndex||"-1"),ae&&(me.onEnter=(0,d.Z)((function(){te(!1)}),b.props.onEnter),me.onExited=(0,d.Z)((function(){te(!0),_&&fe()}),b.props.onExited)),o.createElement(c.Z,{ref:he,container:C,disablePortal:L},o.createElement("div",(0,i.Z)({ref:oe,onKeyDown:function(e){"Escape"===e.key&&de()&&(e.stopPropagation(),G&&G(e),!R&&K&&K(e,"escapeKeyDown"))},role:"presentation"},X,{style:(0,i.Z)({},pe.root,{},!Y&&ee?pe.hidden:{},{},X.style)}),U?null:o.createElement(v,(0,i.Z)({open:Y,onClick:function(e){e.target===e.currentTarget&&(H&&H(e),!P&&K&&K(e,"backdropClick"))}},y)),o.createElement(x,{disableEnforceFocus:A,disableAutoFocus:T,disableRestoreFocus:F,getDoc:se,isEnabled:de,open:Y},o.cloneElement(b,me))))}))},6718:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(4741),l=n(6156),u=n(4670),c=n(8920),d=n(3871),h=o.forwardRef((function(e,t){e.children;var n=e.classes,s=e.className,u=e.label,h=e.labelWidth,f=e.notched,p=e.style,m=(0,i.Z)(e,["children","classes","className","label","labelWidth","notched","style"]),g="rtl"===(0,c.Z)().direction?"right":"left";if(void 0!==u)return o.createElement("fieldset",(0,r.Z)({"aria-hidden":!0,className:(0,a.default)(n.root,s),ref:t,style:p},m),o.createElement("legend",{className:(0,a.default)(n.legendLabelled,f&&n.legendNotched)},u?o.createElement("span",null,u):o.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}})));var v=h>0?.75*h+8:.01;return o.createElement("fieldset",(0,r.Z)({"aria-hidden":!0,style:(0,r.Z)((0,l.Z)({},"padding".concat((0,d.Z)(g)),8),p),className:(0,a.default)(n.root,s),ref:t},m),o.createElement("legend",{className:n.legend,style:{width:f?v:.01}},o.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}})))}));const f=(0,u.Z)((function(e){return{root:{position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:0,paddingLeft:8,pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1},legend:{textAlign:"left",padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},legendLabelled:{display:"block",width:"auto",textAlign:"left",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),"& > span":{paddingLeft:5,paddingRight:5,display:"inline-block"}},legendNotched:{maxWidth:1e3,transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}}),{name:"PrivateNotchedOutline"})(h);var p=o.forwardRef((function(e,t){var n=e.classes,l=e.fullWidth,u=void 0!==l&&l,c=e.inputComponent,d=void 0===c?"input":c,h=e.label,p=e.labelWidth,m=void 0===p?0:p,g=e.multiline,v=void 0!==g&&g,y=e.notched,b=e.type,w=void 0===b?"text":b,E=(0,i.Z)(e,["classes","fullWidth","inputComponent","label","labelWidth","multiline","notched","type"]);return o.createElement(s.Z,(0,r.Z)({renderSuffix:function(e){return o.createElement(f,{className:n.notchedOutline,label:h,labelWidth:m,notched:void 0!==y?y:Boolean(e.startAdornment||e.filled||e.focused)})},classes:(0,r.Z)({},n,{root:(0,a.default)(n.root,n.underline),notchedOutline:null}),fullWidth:u,inputComponent:d,multiline:v,ref:t,type:w},E))}));p.muiName="Input";const m=(0,u.Z)((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{root:{position:"relative",borderRadius:e.shape.borderRadius,"&:hover $notchedOutline":{borderColor:e.palette.text.primary},"@media (hover: none)":{"&:hover $notchedOutline":{borderColor:t}},"&$focused $notchedOutline":{borderColor:e.palette.primary.main,borderWidth:2},"&$error $notchedOutline":{borderColor:e.palette.error.main},"&$disabled $notchedOutline":{borderColor:e.palette.action.disabled}},colorSecondary:{"&$focused $notchedOutline":{borderColor:e.palette.secondary.main}},focused:{},disabled:{},adornedStart:{paddingLeft:14},adornedEnd:{paddingRight:14},error:{},marginDense:{},multiline:{padding:"18.5px 14px","&$marginDense":{paddingTop:10.5,paddingBottom:10.5}},notchedOutline:{borderColor:t},input:{padding:"18.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:"dark"===e.palette.type?"0 0 0 100px #266798 inset":null,WebkitTextFillColor:"dark"===e.palette.type?"#fff":null,borderRadius:"inherit"}},inputMarginDense:{paddingTop:10.5,paddingBottom:10.5},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiOutlinedInput"})(p)},4781:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.Z});var r=n(6718)},9895:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(1253),i=n(2122),o=n(7294),a=(n(5697),n(6010)),s=n(4670),l=o.forwardRef((function(e,t){var n=e.classes,s=e.className,l=e.component,u=void 0===l?"div":l,c=e.square,d=void 0!==c&&c,h=e.elevation,f=void 0===h?1:h,p=e.variant,m=void 0===p?"elevation":p,g=(0,r.Z)(e,["classes","className","component","square","elevation","variant"]);return o.createElement(u,(0,i.Z)({className:(0,a.default)(n.root,s,"outlined"===m?n.outlined:n["elevation".concat(f)],!d&&n.rounded),ref:t},g))}));const u=(0,s.Z)((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),(0,i.Z)({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(l)},6617:(e,t,n)=>{"use strict";n.d(t,{Z:()=>ve});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),"undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator),s=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(a&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}(),l=a&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),s))}};function u(e){return e&&"[object Function]"==={}.toString.call(e)}function c(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function d(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function h(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=c(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:h(d(e))}function f(e){return e&&e.referenceNode?e.referenceNode:e}var p=a&&!(!window.MSInputMethodContext||!document.documentMode),m=a&&/MSIE 10/.test(navigator.userAgent);function g(e){return 11===e?p:10===e?m:p||m}function v(e){if(!e)return document.documentElement;for(var t=g(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===c(n,"position")?v(n):n:e?e.ownerDocument.documentElement:document.documentElement}function y(e){return null!==e.parentNode?y(e.parentNode):e}function b(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,i=n?t:e,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a,s,l=o.commonAncestorContainer;if(e!==l&&t!==l||r.contains(i))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&v(a.firstElementChild)!==a?v(l):l;var u=y(e);return u.host?b(u.host,t):b(e,y(t).host)}function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var i=e.ownerDocument.documentElement,o=e.ownerDocument.scrollingElement||i;return o[n]}return e[n]}function E(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=w(t,"top"),i=w(t,"left"),o=n?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=i*o,e.right+=i*o,e}function _(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function C(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],g(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function S(e){var t=e.body,n=e.documentElement,r=g(10)&&getComputedStyle(n);return{height:C("Height",t,n,r),width:C("Width",t,n,r)}}var x=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},T=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),I=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function O(e){return k({},e,{right:e.left+e.width,bottom:e.top+e.height})}function P(e){var t={};try{if(g(10)){t=e.getBoundingClientRect();var n=w(e,"top"),r=w(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},o="HTML"===e.nodeName?S(e.ownerDocument):{},a=o.width||e.clientWidth||i.width,s=o.height||e.clientHeight||i.height,l=e.offsetWidth-a,u=e.offsetHeight-s;if(l||u){var d=c(e);l-=_(d,"x"),u-=_(d,"y"),i.width-=l,i.height-=u}return O(i)}function N(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=g(10),i="HTML"===t.nodeName,o=P(e),a=P(t),s=h(e),l=c(t),u=parseFloat(l.borderTopWidth),d=parseFloat(l.borderLeftWidth);n&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var f=O({top:o.top-a.top-u,left:o.left-a.left-d,width:o.width,height:o.height});if(f.marginTop=0,f.marginLeft=0,!r&&i){var p=parseFloat(l.marginTop),m=parseFloat(l.marginLeft);f.top-=u-p,f.bottom-=u-p,f.left-=d-m,f.right-=d-m,f.marginTop=p,f.marginLeft=m}return(r&&!n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(f=E(f,t)),f}function A(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=N(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:w(n),s=t?0:w(n,"left"),l={top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:o};return O(l)}function D(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===c(e,"position"))return!0;var n=d(e);return!!n&&D(n)}function R(e){if(!e||!e.parentElement||g())return document.documentElement;for(var t=e.parentElement;t&&"none"===c(t,"transform");)t=t.parentElement;return t||document.documentElement}function M(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=i?R(e):b(e,f(t));if("viewport"===r)o=A(a,i);else{var s=void 0;"scrollParent"===r?"BODY"===(s=h(d(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===r?e.ownerDocument.documentElement:r;var l=N(s,a,i);if("HTML"!==s.nodeName||D(a))o=l;else{var u=S(e.ownerDocument),c=u.height,p=u.width;o.top+=l.top-l.marginTop,o.bottom=c+l.top,o.left+=l.left-l.marginLeft,o.right=p+l.left}}var m="number"==typeof(n=n||0);return o.left+=m?n:n.left||0,o.top+=m?n:n.top||0,o.right-=m?n:n.right||0,o.bottom-=m?n:n.bottom||0,o}function L(e){return e.width*e.height}function j(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=M(n,r,o,i),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},l=Object.keys(s).map((function(e){return k({key:e},s[e],{area:L(s[e])})})).sort((function(e,t){return t.area-e.area})),u=l.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),c=u.length>0?u[0].key:l[0].key,d=e.split("-")[1];return c+(d?"-"+d:"")}function F(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=r?R(t):b(t,f(n));return N(n,i,r)}function W(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function B(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function z(e,t,n){n=n.split("-")[0];var r=W(e),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",l=o?"height":"width",u=o?"width":"height";return i[a]=t[a]+t[l]/2-r[l]/2,i[s]=n===s?t[s]-r[u]:t[B(s)],i}function U(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function V(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e.name===n}));var r=U(e,(function(e){return e.name===n}));return e.indexOf(r)}(e,0,n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&u(n)&&(t.offsets.popper=O(t.offsets.popper),t.offsets.reference=O(t.offsets.reference),t=n(t,e))})),t}function Z(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=F(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=j(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=z(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=V(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function $(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function q(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var i=t[r],o=i?""+i+n:e;if(void 0!==document.body.style[o])return o}return null}function H(){return this.state.isDestroyed=!0,$(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[q("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function K(e){var t=e.ownerDocument;return t?t.defaultView:window}function G(e,t,n,r){var i="BODY"===e.nodeName,o=i?e.ownerDocument.defaultView:e;o.addEventListener(t,n,{passive:!0}),i||G(h(o.parentNode),t,n,r),r.push(o)}function Q(e,t,n,r){n.updateBound=r,K(e).addEventListener("resize",n.updateBound,{passive:!0});var i=h(e);return G(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function Y(){this.state.eventsEnabled||(this.state=Q(this.reference,this.options,this.state,this.scheduleUpdate))}function X(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,K(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function J(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function ee(e,t){Object.keys(t).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&J(t[n])&&(r="px"),e.style[n]=t[n]+r}))}var te=a&&/Firefox/i.test(navigator.userAgent);function ne(e,t,n){var r=U(e,(function(e){return e.name===t})),i=!!r&&e.some((function(e){return e.name===n&&e.enabled&&e.order<r.order}));if(!i){var o="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return i}var re=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],ie=re.slice(3);function oe(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=ie.indexOf(e),r=ie.slice(n+1).concat(ie.slice(0,n));return t?r.reverse():r}var ae={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var i=e.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",u=s?"width":"height",c={start:I({},l,o[l]),end:I({},l,o[l]+o[u]-a[u])};e.offsets.popper=k({},a,c[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n,r=t.offset,i=e.placement,o=e.offsets,a=o.popper,s=o.reference,l=i.split("-")[0];return n=J(+r)?[+r,0]:function(e,t,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(U(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return(u=u.map((function(e,r){var i=(1===r?!o:o)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return O(s)[t]/100*o}return"vh"===a||"vw"===a?("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o:o}(e,i,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,r){J(n)&&(i[t]+=n*("-"===e[r-1]?-1:1))}))})),i}(r,a,s,l),"left"===l?(a.top+=n[0],a.left-=n[1]):"right"===l?(a.top+=n[0],a.left+=n[1]):"top"===l?(a.left+=n[0],a.top-=n[1]):"bottom"===l&&(a.left+=n[0],a.top+=n[1]),e.popper=a,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||v(e.instance.popper);e.instance.reference===n&&(n=v(n));var r=q("transform"),i=e.instance.popper.style,o=i.top,a=i.left,s=i[r];i.top="",i.left="",i[r]="";var l=M(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=o,i.left=a,i[r]=s,t.boundaries=l;var u=t.priority,c=e.offsets.popper,d={primary:function(e){var n=c[e];return c[e]<l[e]&&!t.escapeWithReference&&(n=Math.max(c[e],l[e])),I({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=c[n];return c[e]>l[e]&&!t.escapeWithReference&&(r=Math.min(c[n],l[e]-("right"===e?c.width:c.height))),I({},n,r)}};return u.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";c=k({},c,d[t](e))})),e.offsets.popper=c,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",l=a?"left":"top",u=a?"width":"height";return n[s]<o(r[l])&&(e.offsets.popper[l]=o(r[l])-n[u]),n[l]>o(r[s])&&(e.offsets.popper[l]=o(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!ne(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"==typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],o=e.offsets,a=o.popper,s=o.reference,l=-1!==["left","right"].indexOf(i),u=l?"height":"width",d=l?"Top":"Left",h=d.toLowerCase(),f=l?"left":"top",p=l?"bottom":"right",m=W(r)[u];s[p]-m<a[h]&&(e.offsets.popper[h]-=a[h]-(s[p]-m)),s[h]+m>a[p]&&(e.offsets.popper[h]+=s[h]+m-a[p]),e.offsets.popper=O(e.offsets.popper);var g=s[h]+s[u]/2-m/2,v=c(e.instance.popper),y=parseFloat(v["margin"+d]),b=parseFloat(v["border"+d+"Width"]),w=g-e.offsets.popper[h]-y-b;return w=Math.max(Math.min(a[u]-m,w),0),e.arrowElement=r,e.offsets.arrow=(I(n={},h,Math.round(w)),I(n,f,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if($(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=M(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=B(r),o=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case"flip":a=[r,i];break;case"clockwise":a=oe(r);break;case"counterclockwise":a=oe(r,!0);break;default:a=t.behavior}return a.forEach((function(s,l){if(r!==s||a.length===l+1)return e;r=e.placement.split("-")[0],i=B(r);var u=e.offsets.popper,c=e.offsets.reference,d=Math.floor,h="left"===r&&d(u.right)>d(c.left)||"right"===r&&d(u.left)<d(c.right)||"top"===r&&d(u.bottom)>d(c.top)||"bottom"===r&&d(u.top)<d(c.bottom),f=d(u.left)<d(n.left),p=d(u.right)>d(n.right),m=d(u.top)<d(n.top),g=d(u.bottom)>d(n.bottom),v="left"===r&&f||"right"===r&&p||"top"===r&&m||"bottom"===r&&g,y=-1!==["top","bottom"].indexOf(r),b=!!t.flipVariations&&(y&&"start"===o&&f||y&&"end"===o&&p||!y&&"start"===o&&m||!y&&"end"===o&&g),w=!!t.flipVariationsByContent&&(y&&"start"===o&&p||y&&"end"===o&&f||!y&&"start"===o&&g||!y&&"end"===o&&m),E=b||w;(h||v||E)&&(e.flipped=!0,(h||v)&&(r=a[l+1]),E&&(o=function(e){return"end"===e?"start":"start"===e?"end":e}(o)),e.placement=r+(o?"-"+o:""),e.offsets.popper=k({},e.offsets.popper,z(e.instance.popper,e.offsets.reference,e.placement)),e=V(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),e.placement=B(t),e.offsets.popper=O(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!ne(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=U(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,i=e.offsets.popper,o=U(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a,s,l=void 0!==o?o:t.gpuAcceleration,u=v(e.instance.popper),c=P(u),d={position:i.position},h=function(e,t){var n=e.offsets,r=n.popper,i=n.reference,o=Math.round,a=Math.floor,s=function(e){return e},l=o(i.width),u=o(r.width),c=-1!==["left","right"].indexOf(e.placement),d=-1!==e.placement.indexOf("-"),h=t?c||d||l%2==u%2?o:a:s,f=t?o:s;return{left:h(l%2==1&&u%2==1&&!d&&t?r.left-1:r.left),top:f(r.top),bottom:f(r.bottom),right:h(r.right)}}(e,window.devicePixelRatio<2||!te),f="bottom"===n?"top":"bottom",p="right"===r?"left":"right",m=q("transform");if(s="bottom"===f?"HTML"===u.nodeName?-u.clientHeight+h.bottom:-c.height+h.bottom:h.top,a="right"===p?"HTML"===u.nodeName?-u.clientWidth+h.right:-c.width+h.right:h.left,l&&m)d[m]="translate3d("+a+"px, "+s+"px, 0)",d[f]=0,d[p]=0,d.willChange="transform";else{var g="bottom"===f?-1:1,y="right"===p?-1:1;d[f]=s*g,d[p]=a*y,d.willChange=f+", "+p}var b={"x-placement":e.placement};return e.attributes=k({},b,e.attributes),e.styles=k({},d,e.styles),e.arrowStyles=k({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return ee(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach((function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)})),e.arrowElement&&Object.keys(e.arrowStyles).length&&ee(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,i){var o=F(i,t,e,n.positionFixed),a=j(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),ee(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},se=function(){function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};x(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=l(this.update.bind(this)),this.options=k({},e.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(k({},e.Defaults.modifiers,i.modifiers)).forEach((function(t){r.options.modifiers[t]=k({},e.Defaults.modifiers[t]||{},i.modifiers?i.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return k({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&u(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return T(e,[{key:"update",value:function(){return Z.call(this)}},{key:"destroy",value:function(){return H.call(this)}},{key:"enableEventListeners",value:function(){return Y.call(this)}},{key:"disableEventListeners",value:function(){return X.call(this)}}]),e}();se.Utils=("undefined"!=typeof window?window:n.g).PopperUtils,se.placements=re,se.Defaults=ae;const le=se;var ue=n(159),ce=n(6234),de=n(2568),he=n(4236),fe=n(3834);function pe(e){return"function"==typeof e?e():e}var me="undefined"!=typeof window?o.useLayoutEffect:o.useEffect,ge={};const ve=o.forwardRef((function(e,t){var n=e.anchorEl,a=e.children,s=e.container,l=e.disablePortal,u=void 0!==l&&l,c=e.keepMounted,d=void 0!==c&&c,h=e.modifiers,f=e.open,p=e.placement,m=void 0===p?"bottom":p,g=e.popperOptions,v=void 0===g?ge:g,y=e.popperRef,b=e.style,w=e.transition,E=void 0!==w&&w,_=(0,i.Z)(e,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition"]),C=o.useRef(null),S=(0,fe.Z)(C,t),x=o.useRef(null),T=(0,fe.Z)(x,y),I=o.useRef(T);me((function(){I.current=T}),[T]),o.useImperativeHandle(y,(function(){return x.current}),[]);var k=o.useState(!0),O=k[0],P=k[1],N=function(e,t){if("ltr"===(t&&t.direction||"ltr"))return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(m,(0,ue.Z)()),A=o.useState(N),D=A[0],R=A[1];o.useEffect((function(){x.current&&x.current.update()}));var M=o.useCallback((function(){if(C.current&&n&&f){x.current&&(x.current.destroy(),I.current(null));var e=function(e){R(e.placement)},t=(pe(n),new le(pe(n),C.current,(0,r.Z)({placement:N},v,{modifiers:(0,r.Z)({},u?{}:{preventOverflow:{boundariesElement:"window"}},{},h,{},v.modifiers),onCreate:(0,de.Z)(e,v.onCreate),onUpdate:(0,de.Z)(e,v.onUpdate)})));I.current(t)}}),[n,u,h,f,N,v]),L=o.useCallback((function(e){(0,he.Z)(S,e),M()}),[S,M]),j=function(){x.current&&(x.current.destroy(),I.current(null))};if(o.useEffect((function(){M()}),[M]),o.useEffect((function(){return function(){j()}}),[]),o.useEffect((function(){f||E||j()}),[f,E]),!d&&!f&&(!E||O))return null;var F={placement:D};return E&&(F.TransitionProps={in:f,onEnter:function(){P(!1)},onExited:function(){P(!0),j()}}),o.createElement(ce.Z,{disablePortal:u,container:s},o.createElement("div",(0,r.Z)({ref:L,role:"tooltip"},_,{style:(0,r.Z)({position:"fixed",top:0,left:0},b)}),"function"==typeof a?a(F):a))}))},6234:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(7294),i=n(3935),o=(n(5697),n(4236)),a=n(3834),s="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;const l=r.forwardRef((function(e,t){var n=e.children,l=e.container,u=e.disablePortal,c=void 0!==u&&u,d=e.onRendered,h=r.useState(null),f=h[0],p=h[1],m=(0,a.Z)(r.isValidElement(n)?n.ref:null,t);return s((function(){c||p(function(e){return e="function"==typeof e?e():e,i.findDOMNode(e)}(l)||document.body)}),[l,c]),s((function(){if(f&&!c)return(0,o.Z)(t,f),function(){(0,o.Z)(t,null)}}),[t,f,c]),s((function(){d&&(f||c)&&d()}),[d,f,c]),c?r.isValidElement(n)?r.cloneElement(n,{ref:m}):n:f?i.createPortal(n,f):f}))},3170:(e,t,n)=>{"use strict";n.d(t,{Z:()=>ae});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(5835)),s=n(5061),l=n(8481),u=n(484),c=(n(9864),n(6010)),d=n(3871),h=n(4670),f=n(3935),p=n(9437),m=n(626),g=n(713),v=n(2568),y=n(6423),b=n(170),w=n(9895);function E(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function _(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function C(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function S(e){return"function"==typeof e?e():e}var x=o.forwardRef((function(e,t){var n=e.action,a=e.anchorEl,s=e.anchorOrigin,l=void 0===s?{vertical:"top",horizontal:"left"}:s,u=e.anchorPosition,d=e.anchorReference,h=void 0===d?"anchorEl":d,x=e.children,T=e.classes,I=e.className,k=e.container,O=e.elevation,P=void 0===O?8:O,N=e.getContentAnchorEl,A=e.marginThreshold,D=void 0===A?16:A,R=e.onEnter,M=e.onEntered,L=e.onEntering,j=e.onExit,F=e.onExited,W=e.onExiting,B=e.open,z=e.PaperProps,U=void 0===z?{}:z,V=e.transformOrigin,Z=void 0===V?{vertical:"top",horizontal:"left"}:V,$=e.TransitionComponent,q=void 0===$?b.Z:$,H=e.transitionDuration,K=void 0===H?"auto":H,G=e.TransitionProps,Q=void 0===G?{}:G,Y=(0,i.Z)(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),X=o.useRef(),J=o.useCallback((function(e){if("anchorPosition"===h)return u;var t=S(a),n=(t instanceof(0,g.Z)(t).Element?t:(0,m.Z)(X.current).body).getBoundingClientRect(),r=0===e?l.vertical:"center";return{top:n.top+E(n,r),left:n.left+_(n,l.horizontal)}}),[a,l.horizontal,l.vertical,u,h]),ee=o.useCallback((function(e){var t=0;if(N&&"anchorEl"===h){var n=N(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}}return t}),[l.vertical,h,N]),te=o.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:E(e,Z.vertical)+t,horizontal:_(e,Z.horizontal)}}),[Z.horizontal,Z.vertical]),ne=o.useCallback((function(e){var t=ee(e),n={width:e.offsetWidth,height:e.offsetHeight},r=te(n,t);if("none"===h)return{top:null,left:null,transformOrigin:C(r)};var i=J(t),o=i.top-r.vertical,s=i.left-r.horizontal,l=o+n.height,u=s+n.width,c=(0,g.Z)(S(a)),d=c.innerHeight-D,f=c.innerWidth-D;if(o<D){var p=o-D;o-=p,r.vertical+=p}else if(l>d){var m=l-d;o-=m,r.vertical+=m}if(s<D){var v=s-D;s-=v,r.horizontal+=v}else if(u>f){var y=u-f;s-=y,r.horizontal+=y}return{top:"".concat(Math.round(o),"px"),left:"".concat(Math.round(s),"px"),transformOrigin:C(r)}}),[a,h,J,ee,te,D]),re=o.useCallback((function(){var e=X.current;if(e){var t=ne(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[ne]),ie=o.useCallback((function(e){X.current=f.findDOMNode(e)}),[]);o.useEffect((function(){B&&re()})),o.useImperativeHandle(n,(function(){return B?{updatePosition:function(){re()}}:null}),[B,re]),o.useEffect((function(){if(B){var e=(0,p.Z)((function(){re()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[B,re]);var oe=K;"auto"!==K||q.muiSupportAuto||(oe=void 0);var ae=k||(a?(0,m.Z)(S(a)).body:void 0);return o.createElement(y.Z,(0,r.Z)({container:ae,open:B,ref:t,BackdropProps:{invisible:!0},className:(0,c.default)(T.root,I)},Y),o.createElement(q,(0,r.Z)({appear:!0,in:B,onEnter:R,onEntered:M,onExit:j,onExited:F,onExiting:W,timeout:oe},Q,{onEntering:(0,v.Z)((function(e,t){L&&L(e,t),re()}),Q.onEntering)}),o.createElement(w.Z,(0,r.Z)({elevation:P,ref:ie},U,{className:(0,c.default)(T.paper,U.className)}),x)))}));const T=(0,h.Z)({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(x);var I=n(2822),k=n(5840),O=n(3834);function P(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function N(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function A(e,t){if(void 0===t)return!0;var n=e.innerText;return void 0===n&&(n=e.textContent),0!==(n=n.trim().toLowerCase()).length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function D(e,t,n,r,i,o){for(var a=!1,s=i(e,t,!!t&&n);s;){if(s===e.firstChild){if(a)return;a=!0}var l=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&A(s,o)&&!l)return void s.focus();s=i(e,s,n)}}var R="undefined"==typeof window?o.useEffect:o.useLayoutEffect;const M=o.forwardRef((function(e,t){var n=e.actions,a=e.autoFocus,s=void 0!==a&&a,l=e.autoFocusItem,u=void 0!==l&&l,c=e.children,d=e.className,h=e.disabledItemsFocusable,p=void 0!==h&&h,g=e.disableListWrap,v=void 0!==g&&g,y=e.onKeyDown,b=e.variant,w=void 0===b?"selectedMenu":b,E=(0,i.Z)(e,["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"]),_=o.useRef(null),C=o.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});R((function(){s&&_.current.focus()}),[s]),o.useImperativeHandle(n,(function(){return{adjustStyleForScrollbar:function(e,t){var n=!_.current.style.width;if(e.clientHeight<_.current.clientHeight&&n){var r="".concat((0,k.Z)(!0),"px");_.current.style["rtl"===t.direction?"paddingLeft":"paddingRight"]=r,_.current.style.width="calc(100% + ".concat(r,")")}return _.current}}}),[]);var S=o.useCallback((function(e){_.current=f.findDOMNode(e)}),[]),x=(0,O.Z)(S,t),T=-1;o.Children.forEach(c,(function(e,t){o.isValidElement(e)&&(e.props.disabled||("selectedMenu"===w&&e.props.selected||-1===T)&&(T=t))}));var M=o.Children.map(c,(function(e,t){if(t===T){var n={};return u&&(n.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===w&&(n.tabIndex=0),o.cloneElement(e,n)}return e}));return o.createElement(I.Z,(0,r.Z)({role:"menu",ref:x,className:d,onKeyDown:function(e){var t=_.current,n=e.key,r=(0,m.Z)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),D(t,r,v,p,P);else if("ArrowUp"===n)e.preventDefault(),D(t,r,v,p,N);else if("Home"===n)e.preventDefault(),D(t,null,v,p,P);else if("End"===n)e.preventDefault(),D(t,null,v,p,N);else if(1===n.length){var i=C.current,o=n.toLowerCase(),a=performance.now();i.keys.length>0&&(a-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&o!==i.keys[0]&&(i.repeating=!1)),i.lastTime=a,i.keys.push(o);var s=r&&!i.repeating&&A(r,i);i.previousKeyMatched&&(s||D(t,r,!1,p,P,i))?e.preventDefault():i.previousKeyMatched=!1}y&&y(e)},tabIndex:s?0:-1},E),M)}));var L=n(4236),j=n(8920),F={vertical:"top",horizontal:"right"},W={vertical:"top",horizontal:"left"},B=o.forwardRef((function(e,t){var n=e.autoFocus,a=void 0===n||n,s=e.children,l=e.classes,u=e.disableAutoFocusItem,d=void 0!==u&&u,h=e.MenuListProps,p=void 0===h?{}:h,m=e.onClose,g=e.onEntering,v=e.open,y=e.PaperProps,b=void 0===y?{}:y,w=e.PopoverClasses,E=e.transitionDuration,_=void 0===E?"auto":E,C=e.variant,S=void 0===C?"selectedMenu":C,x=(0,i.Z)(e,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","variant"]),I=(0,j.Z)(),k=a&&!d&&v,O=o.useRef(null),P=o.useRef(null),N=-1;o.Children.map(s,(function(e,t){o.isValidElement(e)&&(e.props.disabled||("menu"!==S&&e.props.selected||-1===N)&&(N=t))}));var A=o.Children.map(s,(function(e,t){return t===N?o.cloneElement(e,{ref:function(t){P.current=f.findDOMNode(t),(0,L.Z)(e.ref,t)}}):e}));return o.createElement(T,(0,r.Z)({getContentAnchorEl:function(){return P.current},classes:w,onClose:m,onEntering:function(e,t){O.current&&O.current.adjustStyleForScrollbar(e,I),g&&g(e,t)},anchorOrigin:"rtl"===I.direction?F:W,transformOrigin:"rtl"===I.direction?F:W,PaperProps:(0,r.Z)({},b,{classes:(0,r.Z)({},b.classes,{root:l.paper})}),open:v,ref:t,transitionDuration:_},x),o.createElement(M,(0,r.Z)({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),m&&m(e,"tabKeyDown"))},actions:O,autoFocus:a&&(-1===N||d),autoFocusItem:k,variant:S},p,{className:(0,c.default)(l.list,p.className)}),A))}));const z=(0,h.Z)({paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},{name:"MuiMenu"})(B);var U=n(6519),V=n(2775);function Z(e,t){return"object"===(0,u.Z)(t)&&null!==t?e===t:String(e)===String(t)}const $=o.forwardRef((function(e,t){var n=e["aria-label"],a=e.autoFocus,u=e.autoWidth,h=e.children,f=e.classes,p=e.className,m=e.defaultValue,g=e.disabled,v=e.displayEmpty,y=e.IconComponent,b=e.inputRef,w=e.labelId,E=e.MenuProps,_=void 0===E?{}:E,C=e.multiple,S=e.name,x=e.onBlur,T=e.onChange,I=e.onClose,k=e.onFocus,P=e.onOpen,N=e.open,A=e.readOnly,D=e.renderValue,R=(e.required,e.SelectDisplayProps),M=void 0===R?{}:R,L=e.tabIndex,j=(e.type,e.value),F=e.variant,W=void 0===F?"standard":F,B=(0,i.Z)(e,["aria-label","autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","required","SelectDisplayProps","tabIndex","type","value","variant"]),$=(0,V.Z)({controlled:j,default:m,name:"SelectInput"}),q=(0,l.Z)($,2),H=q[0],K=q[1],G=o.useRef(null),Q=o.useState(null),Y=Q[0],X=Q[1],J=o.useRef(null!=N).current,ee=o.useState(),te=ee[0],ne=ee[1],re=o.useState(!1),ie=re[0],oe=re[1],ae=(0,O.Z)(t,b);o.useImperativeHandle(ae,(function(){return{focus:function(){Y.focus()},node:G.current,value:H}}),[Y,H]),o.useEffect((function(){a&&Y&&Y.focus()}),[a,Y]);var se,le,ue=function(e,t){e?P&&P(t):I&&I(t),J||(ne(u?null:Y.clientWidth),oe(e))},ce=function(e){return function(t){var n;if(C||ue(!1,t),C){n=Array.isArray(H)?(0,s.Z)(H):[];var r=H.indexOf(e.props.value);-1===r?n.push(e.props.value):n.splice(r,1)}else n=e.props.value;H!==n&&(K(n),T&&(t.persist(),Object.defineProperty(t,"target",{writable:!0,value:{value:n,name:S}}),T(t,e)))}},de=null!==Y&&(J?N:ie);delete B["aria-invalid"];var he=[],fe=!1;((0,U.vd)({value:H})||v)&&(D?se=D(H):fe=!0);var pe=o.Children.map(h,(function(e){if(!o.isValidElement(e))return null;var t;if(C){if(!Array.isArray(H))throw new Error("Material-UI: the `value` prop must be an array when using the `Select` component with `multiple`.");(t=H.some((function(t){return Z(t,e.props.value)})))&&fe&&he.push(e.props.children)}else(t=Z(H,e.props.value))&&fe&&(le=e.props.children);return o.cloneElement(e,{"aria-selected":t?"true":void 0,onClick:ce(e),onKeyUp:function(t){" "===t.key&&t.preventDefault();var n=e.props.onKeyUp;"function"==typeof n&&n(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));fe&&(se=C?he.join(", "):le);var me,ge=te;!u&&J&&Y&&(ge=Y.clientWidth),me=void 0!==L?L:g?null:0;var ve=M.id||(S?"mui-component-select-".concat(S):void 0);return o.createElement(o.Fragment,null,o.createElement("div",(0,r.Z)({className:(0,c.default)(f.root,f.select,f.selectMenu,f[W],p,g&&f.disabled),ref:X,tabIndex:me,role:"button","aria-disabled":g?"true":void 0,"aria-expanded":de?"true":void 0,"aria-haspopup":"listbox","aria-label":n,"aria-labelledby":[w,ve].filter(Boolean).join(" ")||void 0,onKeyDown:function(e){A||-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),ue(!0,e))},onMouseDown:g||A?null:function(e){0===e.button&&(e.preventDefault(),Y.focus(),ue(!0,e))},onBlur:function(e){!de&&x&&(e.persist(),Object.defineProperty(e,"target",{writable:!0,value:{value:H,name:S}}),x(e))},onFocus:k},M,{id:ve}),function(e){return null==e||"string"==typeof e&&!e.trim()}(se)?o.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}}):se),o.createElement("input",(0,r.Z)({value:Array.isArray(H)?H.join(","):H,name:S,ref:G,type:"hidden",autoFocus:a},B)),o.createElement(y,{className:(0,c.default)(f.icon,f["icon".concat((0,d.Z)(W))],de&&f.iconOpen,g&&f.disabled)}),o.createElement(z,(0,r.Z)({id:"menu-".concat(S||""),anchorEl:Y,open:de,onClose:function(e){ue(!1,e)}},_,{MenuListProps:(0,r.Z)({"aria-labelledby":w,role:"listbox",disableListWrap:!0},_.MenuListProps),PaperProps:(0,r.Z)({},_.PaperProps,{style:(0,r.Z)({minWidth:ge},null!=_.PaperProps?_.PaperProps.style:null)})}),pe))}));var q=n(9345),H=n(2601);const K=(0,n(3786).Z)(o.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");var G=n(8799);const Q=o.forwardRef((function(e,t){var n=e.classes,a=e.className,s=e.disabled,l=e.IconComponent,u=e.inputRef,h=e.variant,f=void 0===h?"standard":h,p=(0,i.Z)(e,["classes","className","disabled","IconComponent","inputRef","variant"]);return o.createElement(o.Fragment,null,o.createElement("select",(0,r.Z)({className:(0,c.default)(n.root,n.select,n[f],a,s&&n.disabled),disabled:s,ref:u||t},p)),e.multiple?null:o.createElement(l,{className:(0,c.default)(n.icon,n["icon".concat((0,d.Z)(f))],s&&n.disabled)}))}));var Y=function(e){return{root:{},select:{"-moz-appearance":"none","-webkit-appearance":"none",userSelect:"none",borderRadius:0,minWidth:16,cursor:"pointer","&:focus":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},"&$disabled":{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:e.palette.background.paper},"&&":{paddingRight:24}},filled:{"&&":{paddingRight:32}},outlined:{borderRadius:e.shape.borderRadius,"&&":{paddingRight:32}},selectMenu:{height:"auto",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},disabled:{},icon:{position:"absolute",right:0,top:"calc(50% - 12px)",pointerEvents:"none",color:e.palette.action.active,"&$disabled":{color:e.palette.action.disabled}},iconOpen:{transform:"rotate(180deg)"},iconFilled:{right:7},iconOutlined:{right:7}}},X=o.createElement(G.Z,null),J=o.forwardRef((function(e,t){var n=e.children,a=e.classes,s=e.IconComponent,l=void 0===s?K:s,u=e.input,c=void 0===u?X:u,d=e.inputProps,h=(e.variant,(0,i.Z)(e,["children","classes","IconComponent","input","inputProps","variant"])),f=(0,H.Z)(),p=(0,q.Z)({props:e,muiFormControl:f,states:["variant"]});return o.cloneElement(c,(0,r.Z)({inputComponent:Q,inputProps:(0,r.Z)({children:n,classes:a,IconComponent:l,variant:p.variant,type:void 0},d,{},c?c.props.inputProps:{}),ref:t},h))}));J.muiName="Select",(0,h.Z)(Y,{name:"MuiNativeSelect"})(J);var ee=n(9446),te=n(6718),ne=Y,re=o.createElement(G.Z,null),ie=o.createElement(ee.Z,null),oe=o.forwardRef((function e(t,n){var s=t.autoWidth,l=void 0!==s&&s,u=t.children,c=t.classes,d=t.displayEmpty,h=void 0!==d&&d,f=t.IconComponent,p=void 0===f?K:f,m=t.id,g=t.input,v=t.inputProps,y=t.label,b=t.labelId,w=t.labelWidth,E=void 0===w?0:w,_=t.MenuProps,C=t.multiple,S=void 0!==C&&C,x=t.native,T=void 0!==x&&x,I=t.onClose,k=t.onOpen,O=t.open,P=t.renderValue,N=t.SelectDisplayProps,A=t.variant,D=void 0===A?"standard":A,R=(0,i.Z)(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","label","labelId","labelWidth","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"]),M=T?Q:$,L=(0,H.Z)(),j=(0,q.Z)({props:t,muiFormControl:L,states:["variant"]}).variant||D,F=g||{standard:re,outlined:o.createElement(te.Z,{label:y,labelWidth:E}),filled:ie}[j];return o.cloneElement(F,(0,r.Z)({inputComponent:M,inputProps:(0,r.Z)({children:u,IconComponent:p,variant:j,type:void 0,multiple:S},T?{id:m}:{autoWidth:l,displayEmpty:h,labelId:b,MenuProps:_,onClose:I,onOpen:k,open:O,renderValue:P,SelectDisplayProps:(0,r.Z)({id:m},N)},{},v,{classes:v?(0,a.Z)({baseClasses:c,newClasses:v.classes,Component:e}):c},g?g.props.inputProps:{}),ref:n},R))}));oe.muiName="Select";const ae=(0,h.Z)(ne,{name:"MuiSelect"})(oe)},3141:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.Z});var r=n(3170)},2087:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(3871),u=o.forwardRef((function(e,t){var n=e.children,s=e.classes,u=e.className,c=e.color,d=void 0===c?"inherit":c,h=e.component,f=void 0===h?"svg":h,p=e.fontSize,m=void 0===p?"default":p,g=e.htmlColor,v=e.titleAccess,y=e.viewBox,b=void 0===y?"0 0 24 24":y,w=(0,i.Z)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return o.createElement(f,(0,r.Z)({className:(0,a.default)(s.root,u,"inherit"!==d&&s["color".concat((0,l.Z)(d))],"default"!==m&&s["fontSize".concat((0,l.Z)(m))]),focusable:"false",viewBox:b,color:g,"aria-hidden":v?void 0:"true",role:v?"img":void 0,ref:t},w),n,v?o.createElement("title",null,v):null)}));u.muiName="SvgIcon";const c=(0,s.Z)((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(u)},2015:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.Z});var r=n(2087)},5574:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(9693),u=n(3871),c=n(6608),d=o.forwardRef((function(e,t){var n=e.classes,s=e.className,l=e.color,d=void 0===l?"secondary":l,h=e.edge,f=void 0!==h&&h,p=e.size,m=void 0===p?"medium":p,g=(0,i.Z)(e,["classes","className","color","edge","size"]),v=o.createElement("span",{className:n.thumb});return o.createElement("span",{className:(0,a.default)(n.root,s,{start:n.edgeStart,end:n.edgeEnd}[f],"small"===m&&n["size".concat((0,u.Z)(m))])},o.createElement(c.Z,(0,r.Z)({type:"checkbox",icon:v,checkedIcon:v,classes:{root:(0,a.default)(n.switchBase,n["color".concat((0,u.Z)(d))]),input:n.input,checked:n.checked,disabled:n.disabled},ref:t},g)),o.createElement("span",{className:n.track}))}));const h=(0,s.Z)((function(e){return{root:{display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle"},edgeStart:{marginLeft:-8},edgeEnd:{marginRight:-8},switchBase:{position:"absolute",top:0,left:0,zIndex:1,color:"light"===e.palette.type?e.palette.grey[50]:e.palette.grey[400],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),"&$checked":{transform:"translateX(20px)"},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{opacity:.5},"&$disabled + $track":{opacity:"light"===e.palette.type?.12:.1}},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,l.U1)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.primary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,l.U1)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.secondary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},sizeSmall:{width:40,height:24,padding:7,"& $thumb":{width:16,height:16},"& $switchBase":{padding:4,"&$checked":{transform:"translateX(16px)"}}},checked:{},disabled:{},input:{left:"-100%",width:"300%"},thumb:{boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"},track:{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white,opacity:"light"===e.palette.type?.38:.3}}}),{name:"MuiSwitch"})(d)},6366:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>w});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(8799),l=n(9446),u=n(6718),c=n(3700),d=n(4436),h=n(9345),f=n(2601),p=n(4670),m=o.forwardRef((function(e,t){var n=e.children,s=e.classes,l=e.className,u=e.component,c=void 0===u?"p":u,d=(e.disabled,e.error,e.filled,e.focused,e.margin,e.required,e.variant,(0,i.Z)(e,["children","classes","className","component","disabled","error","filled","focused","margin","required","variant"])),p=(0,f.Z)(),m=(0,h.Z)({props:e,muiFormControl:p,states:["variant","margin","disabled","error","filled","focused","required"]});return o.createElement(c,(0,r.Z)({className:(0,a.default)(s.root,("filled"===m.variant||"outlined"===m.variant)&&s.contained,l,m.disabled&&s.disabled,m.error&&s.error,m.filled&&s.filled,m.focused&&s.focused,m.required&&s.required,"dense"===m.margin&&s.marginDense),ref:t},d)," "===n?o.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}}):n)}));const g=(0,p.Z)((function(e){return{root:(0,r.Z)({color:e.palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,margin:0,"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),error:{},disabled:{},marginDense:{marginTop:4},contained:{marginLeft:14,marginRight:14},focused:{},filled:{},required:{}}}),{name:"MuiFormHelperText"})(m);var v=n(3170),y={standard:s.Z,filled:l.Z,outlined:u.Z},b=o.forwardRef((function(e,t){var n=e.autoComplete,s=e.autoFocus,l=void 0!==s&&s,u=e.children,h=e.classes,f=e.className,p=e.color,m=void 0===p?"primary":p,b=e.defaultValue,w=e.disabled,E=void 0!==w&&w,_=e.error,C=void 0!==_&&_,S=e.FormHelperTextProps,x=e.fullWidth,T=void 0!==x&&x,I=e.helperText,k=e.hiddenLabel,O=e.id,P=e.InputLabelProps,N=e.inputProps,A=e.InputProps,D=e.inputRef,R=e.label,M=e.multiline,L=void 0!==M&&M,j=e.name,F=e.onBlur,W=e.onChange,B=e.onFocus,z=e.placeholder,U=e.required,V=void 0!==U&&U,Z=e.rows,$=e.rowsMax,q=e.select,H=void 0!==q&&q,K=e.SelectProps,G=e.type,Q=e.value,Y=e.variant,X=void 0===Y?"standard":Y,J=(0,i.Z)(e,["autoComplete","autoFocus","children","classes","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","hiddenLabel","id","InputLabelProps","inputProps","InputProps","inputRef","label","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","rowsMax","select","SelectProps","type","value","variant"]),ee={};"outlined"===X&&(P&&void 0!==P.shrink&&(ee.notched=P.shrink),R&&(ee.label=o.createElement(o.Fragment,null,R,V&&" *"))),H&&(K&&K.native||(ee.id=void 0),ee["aria-describedby"]=void 0);var te=I&&O?"".concat(O,"-helper-text"):void 0,ne=R&&O?"".concat(O,"-label"):void 0,re=y[X],ie=o.createElement(re,(0,r.Z)({"aria-describedby":te,autoComplete:n,autoFocus:l,defaultValue:b,fullWidth:T,multiline:L,name:j,rows:Z,rowsMax:$,type:G,value:Q,id:O,inputRef:D,onBlur:F,onChange:W,onFocus:B,placeholder:z,inputProps:N},ee,A));return o.createElement(d.Z,(0,r.Z)({className:(0,a.default)(h.root,f),disabled:E,error:C,fullWidth:T,hiddenLabel:k,ref:t,required:V,color:m,variant:X},J),R&&o.createElement(c.Z,(0,r.Z)({htmlFor:O,id:ne},P),R),H?o.createElement(v.Z,(0,r.Z)({"aria-describedby":te,id:O,labelId:ne,value:Q,input:ie},K),u):ie,I&&o.createElement(g,(0,r.Z)({id:te},S),I))}));const w=(0,p.Z)({root:{}},{name:"MuiTextField"})(b)},6500:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(2122),i=n(1253),o=n(6156),a=n(7294),s=(n(5697),n(6010)),l=n(4670),u=a.forwardRef((function(e,t){var n=e.classes,o=e.className,l=e.component,u=void 0===l?"div":l,c=e.disableGutters,d=void 0!==c&&c,h=e.variant,f=void 0===h?"regular":h,p=(0,i.Z)(e,["classes","className","component","disableGutters","variant"]);return a.createElement(u,(0,r.Z)({className:(0,s.default)(n.root,n[f],o,!d&&n.gutters),ref:t},p))}));const c=(0,l.Z)((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:(0,o.Z)({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}}),{name:"MuiToolbar"})(u)},9069:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>T});var r=n(2122),i=n(8481),o=n(1253),a=n(6156),s=n(7294),l=n(3935),u=(n(5697),n(6010)),c=n(5953),d=n(9693),h=n(4670),f=n(3871),p=n(170),m=n(6617),g=n(3834),v=n(5001),y=n(4236),b=n(4896),w=n(2775),E=n(8920);function _(e){return Math.round(1e5*e)/1e5}var C=!1,S=null,x=s.forwardRef((function(e,t){var n=e.arrow,a=void 0!==n&&n,d=e.children,h=e.classes,_=e.disableFocusListener,x=void 0!==_&&_,T=e.disableHoverListener,I=void 0!==T&&T,k=e.disableTouchListener,O=void 0!==k&&k,P=e.enterDelay,N=void 0===P?100:P,A=e.enterNextDelay,D=void 0===A?0:A,R=e.enterTouchDelay,M=void 0===R?700:R,L=e.id,j=e.interactive,F=void 0!==j&&j,W=e.leaveDelay,B=void 0===W?0:W,z=e.leaveTouchDelay,U=void 0===z?1500:z,V=e.onClose,Z=e.onOpen,$=e.open,q=e.placement,H=void 0===q?"bottom":q,K=e.PopperProps,G=e.title,Q=e.TransitionComponent,Y=void 0===Q?p.Z:Q,X=e.TransitionProps,J=(0,o.Z)(e,["arrow","children","classes","disableFocusListener","disableHoverListener","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","id","interactive","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperProps","title","TransitionComponent","TransitionProps"]),ee=(0,E.Z)(),te=s.useState(),ne=te[0],re=te[1],ie=s.useState(null),oe=ie[0],ae=ie[1],se=s.useRef(!1),le=s.useRef(),ue=s.useRef(),ce=s.useRef(),de=s.useRef(),he=(0,w.Z)({controlled:$,default:!1,name:"Tooltip",state:"open"}),fe=(0,i.Z)(he,2),pe=fe[0],me=fe[1],ge=pe,ve=(0,v.Z)(L);s.useEffect((function(){return function(){clearTimeout(le.current),clearTimeout(ue.current),clearTimeout(ce.current),clearTimeout(de.current)}}),[]);var ye=function(e){clearTimeout(S),C=!0,me(!0),Z&&Z(e)},be=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return function(t){var n=d.props;"mouseover"===t.type&&n.onMouseOver&&e&&n.onMouseOver(t),se.current&&"touchstart"!==t.type||(ne&&ne.removeAttribute("title"),clearTimeout(ue.current),clearTimeout(ce.current),N||C&&D?(t.persist(),ue.current=setTimeout((function(){ye(t)}),C?D:N)):ye(t))}},we=(0,b.Z)(),Ee=we.isFocusVisible,_e=we.onBlurVisible,Ce=we.ref,Se=s.useState(!1),xe=Se[0],Te=Se[1],Ie=function(){xe&&(Te(!1),_e())},ke=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return function(t){ne||re(t.currentTarget),Ee(t)&&(Te(!0),be()(t));var n=d.props;n.onFocus&&e&&n.onFocus(t)}},Oe=function(e){clearTimeout(S),S=setTimeout((function(){C=!1}),800+B),me(!1),V&&V(e),clearTimeout(le.current),le.current=setTimeout((function(){se.current=!1}),ee.transitions.duration.shortest)},Pe=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return function(t){var n=d.props;"blur"===t.type&&(n.onBlur&&e&&n.onBlur(t),Ie()),"mouseleave"===t.type&&n.onMouseLeave&&t.currentTarget===ne&&n.onMouseLeave(t),clearTimeout(ue.current),clearTimeout(ce.current),t.persist(),ce.current=setTimeout((function(){Oe(t)}),B)}},Ne=(0,g.Z)(re,t),Ae=(0,g.Z)(Ce,Ne),De=s.useCallback((function(e){(0,y.Z)(Ae,l.findDOMNode(e))}),[Ae]),Re=(0,g.Z)(d.ref,De);""===G&&(ge=!1);var Me=!ge&&!I,Le=(0,r.Z)({"aria-describedby":ge?ve:null,title:Me&&"string"==typeof G?G:null},J,{},d.props,{className:(0,u.default)(J.className,d.props.className),ref:Re}),je={};O||(Le.onTouchStart=function(e){se.current=!0;var t=d.props;t.onTouchStart&&t.onTouchStart(e),clearTimeout(ce.current),clearTimeout(le.current),clearTimeout(de.current),e.persist(),de.current=setTimeout((function(){be()(e)}),M)},Le.onTouchEnd=function(e){d.props.onTouchEnd&&d.props.onTouchEnd(e),clearTimeout(de.current),clearTimeout(ce.current),e.persist(),ce.current=setTimeout((function(){Oe(e)}),U)}),I||(Le.onMouseOver=be(),Le.onMouseLeave=Pe(),F&&(je.onMouseOver=be(!1),je.onMouseLeave=Pe(!1))),x||(Le.onFocus=ke(),Le.onBlur=Pe(),F&&(je.onFocus=ke(!1),je.onBlur=Pe(!1)));var Fe=s.useMemo((function(){return(0,c.Z)({popperOptions:{modifiers:{arrow:{enabled:Boolean(oe),element:oe}}}},K)}),[oe,K]);return s.createElement(s.Fragment,null,s.cloneElement(d,Le),s.createElement(m.Z,(0,r.Z)({className:(0,u.default)(h.popper,F&&h.popperInteractive,a&&h.popperArrow),placement:H,anchorEl:ne,open:!!ne&&ge,id:Le["aria-describedby"],transition:!0},je,Fe),(function(e){var t=e.placement,n=e.TransitionProps;return s.createElement(Y,(0,r.Z)({timeout:ee.transitions.duration.shorter},n,X),s.createElement("div",{className:(0,u.default)(h.tooltip,h["tooltipPlacement".concat((0,f.Z)(t.split("-")[0]))],se.current&&h.touch,a&&h.tooltipArrow)},G,a?s.createElement("span",{className:h.arrow,ref:ae}):null))})))}));const T=(0,h.Z)((function(e){return{popper:{zIndex:e.zIndex.tooltip,pointerEvents:"none",flip:!1},popperInteractive:{pointerEvents:"auto"},popperArrow:{'&[x-placement*="bottom"] $arrow':{flip:!1,top:0,left:0,marginTop:"-0.95em",marginLeft:4,marginRight:4,width:"2em",height:"1em","&::before":{flip:!1,borderWidth:"0 1em 1em 1em",borderColor:"transparent transparent currentcolor transparent"}},'&[x-placement*="top"] $arrow':{flip:!1,bottom:0,left:0,marginBottom:"-0.95em",marginLeft:4,marginRight:4,width:"2em",height:"1em","&::before":{flip:!1,borderWidth:"1em 1em 0 1em",borderColor:"currentcolor transparent transparent transparent"}},'&[x-placement*="right"] $arrow':{flip:!1,left:0,marginLeft:"-0.95em",marginTop:4,marginBottom:4,height:"2em",width:"1em","&::before":{flip:!1,borderWidth:"1em 1em 1em 0",borderColor:"transparent currentcolor transparent transparent"}},'&[x-placement*="left"] $arrow':{flip:!1,right:0,marginRight:"-0.95em",marginTop:4,marginBottom:4,height:"2em",width:"1em","&::before":{flip:!1,borderWidth:"1em 0 1em 1em",borderColor:"transparent transparent transparent currentcolor"}}},tooltip:{backgroundColor:(0,d.U1)(e.palette.grey[700],.9),borderRadius:e.shape.borderRadius,color:e.palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(10),lineHeight:"".concat(_(1.4),"em"),maxWidth:300,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},tooltipArrow:{position:"relative",margin:"0"},arrow:{position:"absolute",fontSize:6,color:(0,d.U1)(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:0,height:0,borderStyle:"solid"}},touch:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:"".concat(_(16/14),"em"),fontWeight:e.typography.fontWeightRegular},tooltipPlacementLeft:(0,a.Z)({transformOrigin:"right center",margin:"0 24px "},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementRight:(0,a.Z)({transformOrigin:"left center",margin:"0 24px"},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementTop:(0,a.Z)({transformOrigin:"center bottom",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"}),tooltipPlacementBottom:(0,a.Z)({transformOrigin:"center top",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"})}}),{name:"MuiTooltip"})(x)},2318:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(3871),u={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},c=o.forwardRef((function(e,t){var n=e.align,s=void 0===n?"inherit":n,c=e.classes,d=e.className,h=e.color,f=void 0===h?"initial":h,p=e.component,m=e.display,g=void 0===m?"initial":m,v=e.gutterBottom,y=void 0!==v&&v,b=e.noWrap,w=void 0!==b&&b,E=e.paragraph,_=void 0!==E&&E,C=e.variant,S=void 0===C?"body1":C,x=e.variantMapping,T=void 0===x?u:x,I=(0,i.Z)(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),k=p||(_?"p":T[S]||u[S])||"span";return o.createElement(k,(0,r.Z)({className:(0,a.default)(c.root,d,"inherit"!==S&&c[S],"initial"!==f&&c["color".concat((0,l.Z)(f))],w&&c.noWrap,y&&c.gutterBottom,_&&c.paragraph,"inherit"!==s&&c["align".concat((0,l.Z)(s))],"initial"!==g&&c["display".concat((0,l.Z)(g))]),ref:t},I))}));const d=(0,s.Z)((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(c)},400:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.Z});var r=n(2318)},6608:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(2122),i=n(8481),o=n(1253),a=n(7294),s=(n(5697),n(6010)),l=n(2775),u=n(2601),c=n(4670),d=n(7812),h=a.forwardRef((function(e,t){var n=e.autoFocus,c=e.checked,h=e.checkedIcon,f=e.classes,p=e.className,m=e.defaultChecked,g=e.disabled,v=e.icon,y=e.id,b=e.inputProps,w=e.inputRef,E=e.name,_=e.onBlur,C=e.onChange,S=e.onFocus,x=e.readOnly,T=e.required,I=e.tabIndex,k=e.type,O=e.value,P=(0,o.Z)(e,["autoFocus","checked","checkedIcon","classes","className","defaultChecked","disabled","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"]),N=(0,l.Z)({controlled:c,default:Boolean(m),name:"SwitchBase",state:"checked"}),A=(0,i.Z)(N,2),D=A[0],R=A[1],M=(0,u.Z)(),L=g;M&&void 0===L&&(L=M.disabled);var j="checkbox"===k||"radio"===k;return a.createElement(d.Z,(0,r.Z)({component:"span",className:(0,s.default)(f.root,p,D&&f.checked,L&&f.disabled),disabled:L,tabIndex:null,role:void 0,onFocus:function(e){S&&S(e),M&&M.onFocus&&M.onFocus(e)},onBlur:function(e){_&&_(e),M&&M.onBlur&&M.onBlur(e)},ref:t},P),a.createElement("input",(0,r.Z)({autoFocus:n,checked:c,defaultChecked:m,className:f.input,disabled:L,id:j&&y,name:E,onChange:function(e){var t=e.target.checked;R(t),C&&C(e,t)},readOnly:x,ref:w,required:T,tabIndex:I,type:k,value:O},b)),D?h:v)}));const f=(0,c.Z)({root:{padding:9},checked:{},disabled:{},input:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}},{name:"PrivateSwitchBase"})(h)},9693:(e,t,n)=>{"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function i(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb(".concat(n.map((function(e){return parseInt(e,16)})).join(", "),")"):""}function o(e){if(0===e.indexOf("#"))return e;var t=s(e).values;return"#".concat(t.map((function(e){return 1===(t=e.toString(16)).length?"0".concat(t):t;var t})).join(""))}function a(e){var t=(e=s(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)},u="rgb",c=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(u+="a",c.push(t[3])),l({type:u,values:c})}function s(e){if(e.type)return e;if("#"===e.charAt(0))return s(i(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(["Material-UI: unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function l(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function u(e,t){var n=c(e),r=c(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function c(e){var t="hsl"===(e=s(e)).type?s(a(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return c(e)>.5?f(e,t):p(e,t)}function h(e,t){return e=s(e),t=r(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,l(e)}function f(e,t){if(e=s(e),t=r(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return l(e)}function p(e,t){if(e=s(e),t=r(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return l(e)}n.d(t,{oo:()=>i,vq:()=>o,ve:()=>a,tB:()=>s,wy:()=>l,mi:()=>u,H3:()=>c,_4:()=>d,U1:()=>h,_j:()=>f,$n:()=>p})},8129:(e,t,n)=>{"use strict";n.d(t,{Z:()=>q});var r=n(1253),i=n(5953),o=n(2122),a=["xs","sm","md","lg","xl"];function s(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,i=e.unit,s=void 0===i?"px":i,l=e.step,u=void 0===l?5:l,c=(0,r.Z)(e,["values","unit","step"]);function d(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(s,")")}function h(e,t){var r=a.indexOf(t);return r===a.length-1?d(e):"@media (min-width:".concat("number"==typeof n[e]?n[e]:e).concat(s,") and ")+"(max-width:".concat((-1!==r&&"number"==typeof n[a[r+1]]?n[a[r+1]]:t)-u/100).concat(s,")")}return(0,o.Z)({keys:a,values:n,up:d,down:function(e){var t=a.indexOf(e)+1,r=n[a[t]];return t===a.length?d("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-u/100).concat(s,")")},between:h,only:function(e){return h(e,e)},width:function(e){return n[e]}},c)}var l=n(6156);function u(e,t,n){var r;return(0,o.Z)({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,o.Z)({paddingLeft:t(2),paddingRight:t(2)},n,(0,l.Z)({},e.up("sm"),(0,o.Z)({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},(0,l.Z)(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),(0,l.Z)(r,e.up("sm"),{minHeight:64}),r)},n)}const c={black:"#000",white:"#fff"},d={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},h="#7986cb",f="#3f51b5",p="#303f9f",m="#ff4081",g="#f50057",v="#c51162",y="#e57373",b="#f44336",w="#d32f2f",E="#ffb74d",_="#ff9800",C="#f57c00",S="#64b5f6",x="#2196f3",T="#1976d2",I="#81c784",k="#4caf50",O="#388e3c";var P=n(9693),N={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:c.white,default:d[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},A={text:{primary:c.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:d[800],default:"#303030"},action:{active:c.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 D(e,t,n,r){e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,P.$n)(e.main,r):"dark"===t&&(e.dark=(0,P._j)(e.main,1.5*r)))}function R(e){var t=e.primary,n=void 0===t?{light:h,main:f,dark:p}:t,a=e.secondary,s=void 0===a?{light:m,main:g,dark:v}:a,l=e.error,u=void 0===l?{light:y,main:b,dark:w}:l,R=e.warning,M=void 0===R?{light:E,main:_,dark:C}:R,L=e.info,j=void 0===L?{light:S,main:x,dark:T}:L,F=e.success,W=void 0===F?{light:I,main:k,dark:O}:F,B=e.type,z=void 0===B?"light":B,U=e.contrastThreshold,V=void 0===U?3:U,Z=e.tonalOffset,$=void 0===Z?.2:Z,q=(0,r.Z)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function H(e){return(0,P.mi)(e,A.text.primary)>=V?A.text.primary:N.text.primary}var K=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=(0,o.Z)({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(["Material-UI: the color provided to augmentColor(color) is invalid.","The color object needs to have a `main` property or a `".concat(t,"` property.")].join("\n"));if("string"!=typeof e.main)throw new Error(["Material-UI: the color provided to augmentColor(color) is invalid.","`color.main` should be a string, but `".concat(JSON.stringify(e.main),"` was provided instead."),"","Did you intend to use one of the following approaches?","",'import { green } from "@material-ui/core/colors";',"","const theme1 = createMuiTheme({ palette: {"," primary: green,","} });","","const theme2 = createMuiTheme({ palette: {"," primary: { main: green[500] },","} });"].join("\n"));return D(e,"light",n,$),D(e,"dark",r,$),e.contrastText||(e.contrastText=H(e.main)),e},G={dark:A,light:N};return(0,i.Z)((0,o.Z)({common:c,type:z,primary:K(n),secondary:K(s,"A400","A200","A700"),error:K(u),warning:K(M),info:K(j),success:K(W),grey:d,contrastThreshold:V,getContrastText:H,augmentColor:K,tonalOffset:$},G[z]),q)}function M(e){return Math.round(1e5*e)/1e5}var L={textTransform:"uppercase"},j='"Roboto", "Helvetica", "Arial", sans-serif';function F(e,t){var n="function"==typeof t?t(e):t,a=n.fontFamily,s=void 0===a?j:a,l=n.fontSize,u=void 0===l?14:l,c=n.fontWeightLight,d=void 0===c?300:c,h=n.fontWeightRegular,f=void 0===h?400:h,p=n.fontWeightMedium,m=void 0===p?500:p,g=n.fontWeightBold,v=void 0===g?700:g,y=n.htmlFontSize,b=void 0===y?16:y,w=n.allVariants,E=n.pxToRem,_=(0,r.Z)(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),C=u/14,S=E||function(e){return"".concat(e/b*C,"rem")},x=function(e,t,n,r,i){return(0,o.Z)({fontFamily:s,fontWeight:e,fontSize:S(t),lineHeight:n},s===j?{letterSpacing:"".concat(M(r/t),"em")}:{},{},i,{},w)},T={h1:x(d,96,1.167,-1.5),h2:x(d,60,1.2,-.5),h3:x(f,48,1.167,0),h4:x(f,34,1.235,.25),h5:x(f,24,1.334,0),h6:x(m,20,1.6,.15),subtitle1:x(f,16,1.75,.15),subtitle2:x(m,14,1.57,.1),body1:x(f,16,1.5,.15),body2:x(f,14,1.43,.15),button:x(m,14,1.75,.4,L),caption:x(f,12,1.66,.4),overline:x(f,12,2.66,1,L)};return(0,i.Z)((0,o.Z)({htmlFontSize:b,pxToRem:S,round:M,fontFamily:s,fontSize:u,fontWeightLight:d,fontWeightRegular:f,fontWeightMedium:m,fontWeightBold:v},T),_,{clone:!1})}function W(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}const B=["none",W(0,2,1,-1,0,1,1,0,0,1,3,0),W(0,3,1,-2,0,2,2,0,0,1,5,0),W(0,3,3,-2,0,3,4,0,0,1,8,0),W(0,2,4,-1,0,4,5,0,0,1,10,0),W(0,3,5,-1,0,5,8,0,0,1,14,0),W(0,3,5,-1,0,6,10,0,0,1,18,0),W(0,4,5,-2,0,7,10,1,0,2,16,1),W(0,5,5,-3,0,8,10,1,0,3,14,2),W(0,5,6,-3,0,9,12,1,0,3,16,2),W(0,6,6,-3,0,10,14,1,0,4,18,3),W(0,6,7,-4,0,11,15,1,0,4,20,3),W(0,7,8,-4,0,12,17,2,0,5,22,4),W(0,7,8,-4,0,13,19,2,0,5,24,4),W(0,7,9,-4,0,14,21,2,0,5,26,4),W(0,8,9,-5,0,15,22,2,0,6,28,5),W(0,8,10,-5,0,16,24,2,0,6,30,5),W(0,8,11,-5,0,17,26,2,0,6,32,5),W(0,9,11,-5,0,18,28,2,0,7,34,6),W(0,9,12,-6,0,19,29,2,0,7,36,6),W(0,10,13,-6,0,20,31,3,0,8,38,7),W(0,10,13,-6,0,21,33,3,0,8,40,7),W(0,10,14,-6,0,22,35,3,0,8,42,7),W(0,11,14,-7,0,23,36,3,0,9,44,8),W(0,11,15,-7,0,24,38,3,0,9,46,8)],z={borderRadius:4};var U=n(8681);function V(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=(0,U.h)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return 0===n.length?t(1):1===n.length?t(n[0]):n.map((function(e){if("string"==typeof e)return e;var n=t(e);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return e}}),n.mui=!0,n}var Z=n(3366),$=n(2781);const q=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,o=e.mixins,a=void 0===o?{}:o,l=e.palette,c=void 0===l?{}:l,d=e.spacing,h=e.typography,f=void 0===h?{}:h,p=(0,r.Z)(e,["breakpoints","mixins","palette","spacing","typography"]),m=R(c),g=s(n),v=V(d),y=(0,i.Z)({breakpoints:g,direction:"ltr",mixins:u(g,v,a),overrides:{},palette:m,props:{},shadows:B,typography:F(m,f),spacing:v,shape:z,transitions:Z.ZP,zIndex:$.Z},p),b=arguments.length,w=new Array(b>1?b-1:0),E=1;E<b;E++)w[E-1]=arguments[E];return w.reduce((function(e,t){return(0,i.Z)(e,t)}),y)}},9700:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(0,n(8129).Z)()},5828:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MuiThemeProvider:()=>j,ServerStyleSheets:()=>R,StylesProvider:()=>A.ZP,ThemeProvider:()=>j,createGenerateClassName:()=>D.Z,createMuiTheme:()=>i.Z,createStyles:()=>o,darken:()=>r._j,decomposeColor:()=>r.tB,duration:()=>b.x9,easing:()=>b.Ui,emphasize:()=>r._4,fade:()=>r.U1,getContrastRatio:()=>r.mi,getLuminance:()=>r.H3,hexToRgb:()=>r.oo,hslToRgb:()=>r.ve,jssPreset:()=>F.Z,lighten:()=>r.$n,makeStyles:()=>u,recomposeColor:()=>r.wy,responsiveFontSizes:()=>v,rgbToHex:()=>r.vq,styled:()=>y.Z,useTheme:()=>w.Z,withStyles:()=>E.Z,withTheme:()=>k});var r=n(9693),i=n(8129);function o(e){return e}var a=n(2122),s=n(3914),l=n(9700);const u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,s.Z)(e,(0,a.Z)({defaultTheme:l.Z},t))};var c=n(6156);function d(e){return String(parseFloat(e)).length===String(e).length}function h(e){return parseFloat(e)}function f(e){return function(t,n){var r=String(t).match(/[\d.\-+]*\s*(.*)/)[1]||"";if(r===n)return t;var i=h(t);if("px"!==r)if("em"===r)i=h(t)*h(e);else if("rem"===r)return i=h(t)*h(e),t;var o=i;if("px"!==n)if("em"===n)o=i/h(e);else{if("rem"!==n)return t;o=i/h(e)}return parseFloat(o.toFixed(5))+n}}function p(e){var t=e.size,n=e.grid,r=t-t%n,i=r+n;return t-r<i-t?r:i}function m(e){var t=e.lineHeight;return e.pixels/(t*e.htmlFontSize)}function g(e){var t=e.cssProperty,n=e.min,r=e.max,i=e.unit,o=void 0===i?"rem":i,a=e.breakpoints,s=void 0===a?[600,960,1280]:a,l=e.transform,u=void 0===l?null:l,d=(0,c.Z)({},t,"".concat(n).concat(o)),h=(r-n)/s[s.length-1];return s.forEach((function(e){var r=n+h*e;null!==u&&(r=u(r)),d["@media (min-width:".concat(e,"px)")]=(0,c.Z)({},t,"".concat(Math.round(1e4*r)/1e4).concat(o))})),d}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.breakpoints,r=void 0===n?["sm","md","lg"]:n,i=t.disableAlign,o=void 0!==i&&i,s=t.factor,l=void 0===s?2:s,u=t.variants,c=void 0===u?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:u,h=(0,a.Z)({},e);h.typography=(0,a.Z)({},h.typography);var v=h.typography,y=f(v.htmlFontSize),b=r.map((function(e){return h.breakpoints.values[e]}));return c.forEach((function(e){var t=v[e],n=parseFloat(y(t.fontSize,"rem"));if(!(n<=1)){var r=n,i=1+(r-1)/l,s=t.lineHeight;if(!d(s)&&!o)throw new Error(["Material-UI: unsupported non-unitless line height with grid alignment.","Use unitless line heights instead."].join("\n"));d(s)||(s=parseFloat(y(s,"rem"))/parseFloat(n));var u=null;o||(u=function(e){return p({size:e,grid:m({pixels:4,lineHeight:s,htmlFontSize:v.htmlFontSize})})}),v[e]=(0,a.Z)({},t,{},g({cssProperty:"fontSize",min:i,max:r,unit:"rem",breakpoints:b,transform:u}))}})),h}var y=n(1911),b=n(3366),w=n(8920),E=n(4670),_=n(1253),C=n(7294),S=(n(5697),n(8679)),x=n.n(S),T=n(159);function I(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.defaultTheme,n=function(e){var n=C.forwardRef((function(n,r){var i=n.innerRef,o=(0,_.Z)(n,["innerRef"]),s=(0,T.Z)()||t;return C.createElement(e,(0,a.Z)({theme:s,ref:i||r},o))}));return x()(n,e),n};return n}I();const k=I({defaultTheme:l.Z});var O=n(6610),P=n(5991),N=n(4013),A=n(6975),D=n(5034),R=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,O.Z)(this,e),this.options=t}return(0,P.Z)(e,[{key:"collect",value:function(e){var t=new Map;this.sheetsRegistry=new N.xE;var n=(0,D.Z)();return C.createElement(A.ZP,(0,a.Z)({sheetsManager:t,serverGenerateClassName:n,sheetsRegistry:this.sheetsRegistry},this.options),e)}},{key:"toString",value:function(){return this.sheetsRegistry?this.sheetsRegistry.toString():""}},{key:"getStyleElement",value:function(e){return C.createElement("style",(0,a.Z)({id:"jss-server-side",key:"jss-server-side",dangerouslySetInnerHTML:{__html:this.toString()}},e))}}]),e}(),M=n(3800),L=n(7076);const j=function(e){var t=e.children,n=e.theme,r=(0,T.Z)(),i=C.useMemo((function(){var e=null===r?n:function(e,t){return"function"==typeof t?t(e):(0,a.Z)({},e,{},t)}(r,n);return null!=e&&(e[L.Z]=null!==r),e}),[n,r]);return C.createElement(M.Z.Provider,{value:i},t)};var F=n(246)},1911:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(2122),i=n(1253),o=n(7294),a=n(6010),s=(n(5697),n(8679)),l=n.n(s),u=n(3914);function c(e,t){var n={};return Object.keys(e).forEach((function(r){-1===t.indexOf(r)&&(n[r]=e[r])})),n}var d=n(9700);const h=function(e){var t=function(e){return function(t){var n,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=s.name,h=(0,i.Z)(s,["name"]),f=d,p="function"==typeof t?function(e){return{root:function(n){return t((0,r.Z)({theme:e},n))}}}:{root:t},m=(0,u.Z)(p,(0,r.Z)({Component:e,name:d||e.displayName,classNamePrefix:f},h));t.filterProps&&(n=t.filterProps,delete t.filterProps),t.propTypes&&(t.propTypes,delete t.propTypes);var g=o.forwardRef((function(t,s){var l=t.children,u=t.className,d=t.clone,h=t.component,f=(0,i.Z)(t,["children","className","clone","component"]),p=m(t),g=(0,a.default)(p.root,u),v=f;if(n&&(v=c(v,n)),d)return o.cloneElement(l,(0,r.Z)({className:(0,a.default)(l.props.className,g)},v));if("function"==typeof l)return l((0,r.Z)({className:g},v));var y=h||e;return o.createElement(y,(0,r.Z)({ref:s,className:g},v),l)}));return l()(g,e),g}}(e);return function(e,n){return t(e,(0,r.Z)({defaultTheme:d.Z},n))}}},3366:(e,t,n)=>{"use strict";n.d(t,{Ui:()=>i,x9:()=>o,ZP:()=>s});var r=n(1253),i={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)"},o={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function a(e){return"".concat(Math.round(e),"ms")}const s={easing:i,duration:o,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,s=void 0===n?o.standard:n,l=t.easing,u=void 0===l?i.easeInOut:l,c=t.delay,d=void 0===c?0:c;return(0,r.Z)(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof s?s:a(s)," ").concat(u," ").concat("string"==typeof d?d:a(d))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}}},8920:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(159),i=(n(7294),n(9700));function o(){return(0,r.Z)()||i.Z}},4670:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(2122),i=n(1253),o=n(7294),a=(n(5697),n(8679)),s=n.n(a),l=n(3914),u=n(3869),c=n(159);var d=n(9700);const h=function(e,t){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var a=t.defaultTheme,d=t.withTheme,h=void 0!==d&&d,f=t.name,p=(0,i.Z)(t,["defaultTheme","withTheme","name"]),m=f,g=(0,l.Z)(e,(0,r.Z)({defaultTheme:a,Component:n,name:f||n.displayName,classNamePrefix:m},p)),v=o.forwardRef((function(e,t){e.classes;var s,l=e.innerRef,d=(0,i.Z)(e,["classes","innerRef"]),p=g((0,r.Z)({},n.defaultProps,{},e)),m=d;return("string"==typeof f||h)&&(s=(0,c.Z)()||a,f&&(m=(0,u.Z)({theme:s,name:f,props:d})),h&&!m.theme&&(m.theme=s)),o.createElement(n,(0,r.Z)({ref:l||t,classes:p},m))}));return s()(v,n),v}}(e,(0,r.Z)({defaultTheme:d.Z},t))}},2781:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},5653:(e,t,n)=>{"use strict";n.d(t,{n:()=>r,C:()=>i});var r=function(e){return e.scrollTop};function i(e,t){var n=e.timeout,r=e.style,i=void 0===r?{}:r;return{duration:i.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:i.transitionDelay}}},3871:(e,t,n)=>{"use strict";function r(e){return e.charAt(0).toUpperCase()+e.slice(1)}n.d(t,{Z:()=>r})},2568:(e,t,n)=>{"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)}}),(function(){}))}n.d(t,{Z:()=>r})},3786:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(2122),i=n(7294),o=n(2087);function a(e,t){var n=i.memo(i.forwardRef((function(t,n){return i.createElement(o.Z,(0,r.Z)({ref:n},t),e)})));return n.muiName=o.Z.muiName,n}},9437:(e,t,n)=>{"use strict";function r(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=this,s=function(){e.apply(a,i)};clearTimeout(t),t=setTimeout(s,n)}return r.clear=function(){clearTimeout(t)},r}n.d(t,{Z:()=>r})},5840:(e,t,n)=>{"use strict";function r(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}n.d(t,{Z:()=>r})},3711:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(7294);function i(e,t){return r.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}},626:(e,t,n)=>{"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{Z:()=>r})},713:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(626);function i(e){return(0,r.Z)(e).defaultView||window}},4236:(e,t,n)=>{"use strict";function r(e,t){"function"==typeof e?e(t):e&&(e.current=t)}n.d(t,{Z:()=>r})},5001:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(7294);function i(e){var t=r.useState(e),n=t[0],i=t[1],o=e||n;return r.useEffect((function(){null==n&&i("mui-".concat(Math.round(1e5*Math.random())))}),[n]),o}},2775:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(7294);function i(e){var t=e.controlled,n=e.default,i=(e.name,e.state,r.useRef(void 0!==t).current),o=r.useState(n),a=o[0],s=o[1];return[i?t:a,r.useCallback((function(e){i||s(e)}),[])]}},5192:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7294),i="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function o(e){var t=r.useRef(e);return i((function(){t.current=e})),r.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}},3834:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7294),i=n(4236);function o(e,t){return r.useMemo((function(){return null==e&&null==t?null:function(n){(0,i.Z)(e,n),(0,i.Z)(t,n)}}),[e,t])}},4896:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(7294),i=n(3935),o=!0,a=!1,s=null,l={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 u(e){e.metaKey||e.altKey||e.ctrlKey||(o=!0)}function c(){o=!1}function d(){"hidden"===this.visibilityState&&a&&(o=!0)}function h(e){var t,n,r,i=e.target;try{return i.matches(":focus-visible")}catch(e){}return o||(n=(t=i).type,!("INPUT"!==(r=t.tagName)||!l[n]||t.readOnly)||"TEXTAREA"===r&&!t.readOnly||!!t.isContentEditable)}function f(){a=!0,window.clearTimeout(s),s=window.setTimeout((function(){a=!1}),100)}function p(){return{isFocusVisible:h,onBlurVisible:f,ref:r.useCallback((function(e){var t,n=i.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",u,!0),t.addEventListener("mousedown",c,!0),t.addEventListener("pointerdown",c,!0),t.addEventListener("touchstart",c,!0),t.addEventListener("visibilitychange",d,!0))}),[])}}},2067:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"}),"AccountCircle");t.default=o},3957:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");t.default=o},1673:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");t.default=o},9594:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward");t.default=o},9875:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft");t.default=o},6735:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");t.default=o},366:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("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");t.default=o},2215:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"}),"Cloud");t.default=o},8428:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("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");t.default=o},9067:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("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 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit");t.default=o},2972:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M10.09 15.59L11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"ExitToApp");t.default=o},5025:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess");t.default=o},4566:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.default=o},5612:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M3 13h2v-2H3v2zm0 4h2v-2H3v2zm2 4v-2H3c0 1.1.89 2 2 2zM3 9h2V7H3v2zm12 12h2v-2h-2v2zm4-18H9c-1.11 0-2 .9-2 2v10c0 1.1.89 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 12H9V5h10v10zm-8 6h2v-2h-2v2zm-4 0h2v-2H7v2z"}),"FlipToFront");t.default=o},4545:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M9 3L5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z"}),"ImportExport");t.default=o},5432:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"InfoOutlined");t.default=o},7133:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}),"Launch");t.default=o},2865:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"}),"Mail");t.default=o},2466:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V8l8 5 8-5v10zm-8-7L4 6h16l-8 5z"}),"MailOutline");t.default=o},8884:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");t.default=o},9579:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M6 19h12v2H6z"}),"Minimize");t.default=o},64:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M19 13H5v-2h14v2z"}),"Remove");t.default=o},3246:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"}),"Restore");t.default=o},3375:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"}),"Save");t.default=o},8995:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");t.default=o},9969:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{transform:"scale(1.2, 1.2)",d:"M15.95 10.78c.03-.25.05-.51.05-.78s-.02-.53-.06-.78l1.69-1.32c.15-.12.19-.34.1-.51l-1.6-2.77c-.1-.18-.31-.24-.49-.18l-1.99.8c-.42-.32-.86-.58-1.35-.78L12 2.34c-.03-.2-.2-.34-.4-.34H8.4c-.2 0-.36.14-.39.34l-.3 2.12c-.49.2-.94.47-1.35.78l-1.99-.8c-.18-.07-.39 0-.49.18l-1.6 2.77c-.1.18-.06.39.1.51l1.69 1.32c-.04.25-.07.52-.07.78s.02.53.06.78L2.37 12.1c-.15.12-.19.34-.1.51l1.6 2.77c.1.18.31.24.49.18l1.99-.8c.42.32.86.58 1.35.78l.3 2.12c.04.2.2.34.4.34h3.2c.2 0 .37-.14.39-.34l.3-2.12c.49-.2.94-.47 1.35-.78l1.99.8c.18.07.39 0 .49-.18l1.6-2.77c.1-.18.06-.39-.1-.51l-1.67-1.32zM10 13c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z"}),"Settings");t.default=o},3093:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(7294)),o=(0,r(n(2108)).default)(i.default.createElement("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z"}),"Share");t.default=o},2108:(e,t,n)=>{"use strict";var r=n(5318);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=o.default.memo(o.default.forwardRef((function(t,n){return o.default.createElement(a.default,(0,i.default)({ref:n},t),e)})));return n.muiName=a.default.muiName,n};var i=r(n(7154)),o=r(n(7294)),a=r(n(2015))},4709:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>E});var r=n(1253),i=n(2122),o=n(7294),a=(n(5697),n(6010)),s=n(9693),l=n(4670),u=n(9895),c=n(3786);const d=(0,c.Z)(o.createElement("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"}),"SuccessOutlined"),h=(0,c.Z)(o.createElement("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),f=(0,c.Z)(o.createElement("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"),p=(0,c.Z)(o.createElement("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");var m=n(7694),g=n(7812),v=n(3871),y={success:o.createElement(d,{fontSize:"inherit"}),warning:o.createElement(h,{fontSize:"inherit"}),error:o.createElement(f,{fontSize:"inherit"}),info:o.createElement(p,{fontSize:"inherit"})},b=o.createElement(m.Z,{fontSize:"small"}),w=o.forwardRef((function(e,t){var n=e.action,s=e.children,l=e.classes,c=e.className,d=e.closeText,h=void 0===d?"Close":d,f=e.color,p=e.icon,m=e.iconMapping,w=void 0===m?y:m,E=e.onClose,_=e.role,C=void 0===_?"alert":_,S=e.severity,x=void 0===S?"success":S,T=e.variant,I=void 0===T?"standard":T,k=(0,r.Z)(e,["action","children","classes","className","closeText","color","icon","iconMapping","onClose","role","severity","variant"]);return o.createElement(u.Z,(0,i.Z)({role:C,square:!0,elevation:0,className:(0,a.default)(l.root,l["".concat(I).concat((0,v.Z)(f||x))],c),ref:t},k),!1!==p?o.createElement("div",{className:l.icon},p||w[x]||y[x]):null,o.createElement("div",{className:l.message},s),null!=n?o.createElement("div",{className:l.action},n):null,null==n&&E?o.createElement("div",{className:l.action},o.createElement(g.Z,{size:"small","aria-label":h,title:h,color:"inherit",onClick:E},b)):null)}));const E=(0,l.Z)((function(e){var t="light"===e.palette.type?s._j:s.$n,n="light"===e.palette.type?s.$n:s._j;return{root:(0,i.Z)({},e.typography.body2,{borderRadius:e.shape.borderRadius,backgroundColor:"transparent",display:"flex",padding:"6px 16px"}),standardSuccess:{color:t(e.palette.success.main,.6),backgroundColor:n(e.palette.success.main,.9),"& $icon":{color:e.palette.success.main}},standardInfo:{color:t(e.palette.info.main,.6),backgroundColor:n(e.palette.info.main,.9),"& $icon":{color:e.palette.info.main}},standardWarning:{color:t(e.palette.warning.main,.6),backgroundColor:n(e.palette.warning.main,.9),"& $icon":{color:e.palette.warning.main}},standardError:{color:t(e.palette.error.main,.6),backgroundColor:n(e.palette.error.main,.9),"& $icon":{color:e.palette.error.main}},outlinedSuccess:{color:t(e.palette.success.main,.6),border:"1px solid ".concat(e.palette.success.main),"& $icon":{color:e.palette.success.main}},outlinedInfo:{color:t(e.palette.info.main,.6),border:"1px solid ".concat(e.palette.info.main),"& $icon":{color:e.palette.info.main}},outlinedWarning:{color:t(e.palette.warning.main,.6),border:"1px solid ".concat(e.palette.warning.main),"& $icon":{color:e.palette.warning.main}},outlinedError:{color:t(e.palette.error.main,.6),border:"1px solid ".concat(e.palette.error.main),"& $icon":{color:e.palette.error.main}},filledSuccess:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.success.main},filledInfo:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.info.main},filledWarning:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.warning.main},filledError:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.error.main},icon:{marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9},message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}}),{name:"MuiAlert"})(w)},3592:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createFilterOptions:()=>S,default:()=>N});var r=n(1253),i=n(6156),o=n(2122),a=n(7294),s=(n(5697),n(6010)),l=n(4670),u=n(6617),c=n(3871),d=a.forwardRef((function(e,t){var n=e.classes,i=e.className,l=e.color,u=void 0===l?"default":l,d=e.component,h=void 0===d?"li":d,f=e.disableGutters,p=void 0!==f&&f,m=e.disableSticky,g=void 0!==m&&m,v=e.inset,y=void 0!==v&&v,b=(0,r.Z)(e,["classes","className","color","component","disableGutters","disableSticky","inset"]);return a.createElement(h,(0,o.Z)({className:(0,s.default)(n.root,i,"default"!==u&&n["color".concat((0,c.Z)(u))],y&&n.inset,!g&&n.sticky,!p&&n.gutters),ref:t},b))}));const h=(0,l.Z)((function(e){return{root:{boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:e.palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},colorPrimary:{color:e.palette.primary.main},colorInherit:{color:"inherit"},gutters:{paddingLeft:16,paddingRight:16},inset:{paddingLeft:72},sticky:{position:"sticky",top:0,zIndex:1,backgroundColor:"inherit"}}}),{name:"MuiListSubheader"})(d);var f=n(9895),p=n(7812),m=n(1267),g=n(7694);const v=(0,n(3786).Z)(a.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");var y=n(8481),b=n(5001),w=n(2775),E=n(5192),_=n(4236);function C(e){return void 0!==e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function S(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.ignoreAccents,n=void 0===t||t,r=e.ignoreCase,i=void 0===r||r,o=e.limit,a=e.matchFrom,s=void 0===a?"any":a,l=e.stringify,u=e.trim,c=void 0!==u&&u;return function(e,t){var r=t.inputValue,a=t.getOptionLabel,u=c?r.trim():r;i&&(u=u.toLowerCase()),n&&(u=C(u));var d=e.filter((function(e){var t=(l||a)(e);return i&&(t=t.toLowerCase()),n&&(t=C(t)),"start"===s?0===t.indexOf(u):t.indexOf(u)>-1}));return"number"==typeof o?d.slice(0,o):d}}function x(e,t){for(var n=0;n<e.length;n+=1)if(t(e[n]))return n;return-1}var T=S();function I(e){e.anchorEl,e.open;var t=(0,r.Z)(e,["anchorEl","open"]);return a.createElement("div",t)}var k=a.createElement(g.Z,{fontSize:"small"}),O=a.createElement(v,null),P=a.forwardRef((function(e,t){e.autoComplete,e.autoHighlight,e.autoSelect,e.blurOnSelect;var n,i=e.ChipProps,l=e.classes,c=e.className,d=(void 0===e.clearOnBlur&&e.freeSolo,e.clearOnEscape,e.clearText),g=void 0===d?"Clear":d,v=e.closeIcon,C=void 0===v?k:v,S=e.closeText,P=void 0===S?"Close":S,N=(void 0===(e.debug,e.defaultValue)&&e.multiple,e.disableClearable),A=void 0!==N&&N,D=(e.disableCloseOnSelect,e.disabled),R=void 0!==D&&D,M=(e.disabledItemsFocusable,e.disableListWrap,e.disablePortal),L=void 0!==M&&M,j=(e.filterOptions,e.filterSelectedOptions,e.forcePopupIcon),F=void 0===j?"auto":j,W=e.freeSolo,B=void 0!==W&&W,z=e.fullWidth,U=void 0!==z&&z,V=e.getLimitTagsText,Z=void 0===V?function(e){return"+".concat(e)}:V,$=(e.getOptionDisabled,e.getOptionLabel),q=void 0===$?function(e){return e}:$,H=(e.getOptionSelected,e.groupBy),K=(void 0===e.handleHomeEndKeys&&e.freeSolo,e.id,e.includeInputInList,e.inputValue,e.limitTags),G=void 0===K?-1:K,Q=e.ListboxComponent,Y=void 0===Q?"ul":Q,X=e.ListboxProps,J=e.loading,ee=void 0!==J&&J,te=e.loadingText,ne=void 0===te?"Loading…":te,re=e.multiple,ie=void 0!==re&&re,oe=e.noOptionsText,ae=void 0===oe?"No options":oe,se=(e.onChange,e.onClose,e.onHighlightChange,e.onInputChange,e.onOpen,e.open,e.openOnFocus,e.openText),le=void 0===se?"Open":se,ue=(e.options,e.PaperComponent),ce=void 0===ue?f.Z:ue,de=e.PopperComponent,he=void 0===de?u.Z:de,fe=e.popupIcon,pe=void 0===fe?O:fe,me=e.renderGroup,ge=e.renderInput,ve=e.renderOption,ye=e.renderTags,be=(void 0===e.selectOnFocus&&e.freeSolo,e.size),we=void 0===be?"medium":be,Ee=(e.value,(0,r.Z)(e,["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","classes","className","clearOnBlur","clearOnEscape","clearText","closeIcon","closeText","debug","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionLabel","getOptionSelected","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","value"])),_e=L?I:he,Ce=function(e){var t=e.autoComplete,n=void 0!==t&&t,r=e.autoHighlight,i=void 0!==r&&r,s=e.autoSelect,l=void 0!==s&&s,u=e.blurOnSelect,c=void 0!==u&&u,d=e.clearOnBlur,h=void 0===d?!e.freeSolo:d,f=e.clearOnEscape,p=void 0!==f&&f,m=e.componentName,g=void 0===m?"useAutocomplete":m,v=e.debug,C=void 0!==v&&v,S=e.defaultValue,I=void 0===S?e.multiple?[]:null:S,k=e.disableClearable,O=void 0!==k&&k,P=e.disableCloseOnSelect,N=void 0!==P&&P,A=e.disabledItemsFocusable,D=void 0!==A&&A,R=e.disableListWrap,M=void 0!==R&&R,L=e.filterOptions,j=void 0===L?T:L,F=e.filterSelectedOptions,W=void 0!==F&&F,B=e.freeSolo,z=void 0!==B&&B,U=e.getOptionDisabled,V=e.getOptionLabel,Z=void 0===V?function(e){return e}:V,$=e.getOptionSelected,q=void 0===$?function(e,t){return e===t}:$,H=e.groupBy,K=e.handleHomeEndKeys,G=void 0===K?!e.freeSolo:K,Q=e.id,Y=e.includeInputInList,X=void 0!==Y&&Y,J=e.inputValue,ee=e.multiple,te=void 0!==ee&&ee,ne=e.onChange,re=e.onClose,ie=e.onHighlightChange,oe=e.onInputChange,ae=e.onOpen,se=e.open,le=e.openOnFocus,ue=void 0!==le&&le,ce=e.options,de=e.selectOnFocus,he=void 0===de?!e.freeSolo:de,fe=e.value,pe=(0,b.Z)(Q),me=Z,ge=a.useRef(!1),ve=a.useRef(!0),ye=a.useRef(null),be=a.useRef(null),we=a.useState(null),Ee=we[0],_e=we[1],Ce=a.useState(-1),Se=Ce[0],xe=Ce[1],Te=i?0:-1,Ie=a.useRef(Te),ke=(0,w.Z)({controlled:fe,default:I,name:g}),Oe=(0,y.Z)(ke,2),Pe=Oe[0],Ne=Oe[1],Ae=(0,w.Z)({controlled:J,default:"",name:g,state:"inputValue"}),De=(0,y.Z)(Ae,2),Re=De[0],Me=De[1],Le=a.useState(!1),je=Le[0],Fe=Le[1],We=(0,E.Z)((function(e,t){var n;if(te)n="";else if(null==t)n="";else{var r=me(t);n="string"==typeof r?r:""}Re!==n&&(Me(n),oe&&oe(e,n,"reset"))}));a.useEffect((function(){We(null,Pe)}),[Pe,We]);var Be=(0,w.Z)({controlled:se,default:!1,name:g,state:"open"}),ze=(0,y.Z)(Be,2),Ue=ze[0],Ve=ze[1],Ze=!te&&null!=Pe&&Re===me(Pe),$e=Ue,qe=$e?j(ce.filter((function(e){return!W||!(te?Pe:[Pe]).some((function(t){return null!==t&&q(e,t)}))})),{inputValue:Ze?"":Re,getOptionLabel:me}):[],He=(0,E.Z)((function(e){-1===e?ye.current.focus():Ee.querySelector('[data-tag-index="'.concat(e,'"]')).focus()}));a.useEffect((function(){te&&Se>Pe.length-1&&(xe(-1),He(-1))}),[Pe,te,Se,He]);var Ke=(0,E.Z)((function(e){var t=e.event,n=e.index,r=e.reason,i=void 0===r?"auto":r;if(Ie.current=n,-1===n?ye.current.removeAttribute("aria-activedescendant"):ye.current.setAttribute("aria-activedescendant","".concat(pe,"-option-").concat(n)),ie&&ie(t,-1===n?null:qe[n],i),be.current){var o=be.current.querySelector("[data-focus]");o&&o.removeAttribute("data-focus");var a=be.current.parentElement.querySelector('[role="listbox"]');if(a)if(-1!==n){var s=be.current.querySelector('[data-option-index="'.concat(n,'"]'));if(s&&(s.setAttribute("data-focus","true"),a.scrollHeight>a.clientHeight&&"mouse"!==i)){var l=s,u=a.clientHeight+a.scrollTop,c=l.offsetTop+l.offsetHeight;c>u?a.scrollTop=c-a.clientHeight:l.offsetTop-l.offsetHeight*(H?1.3:0)<a.scrollTop&&(a.scrollTop=l.offsetTop-l.offsetHeight*(H?1.3:0))}}else a.scrollTop=0}})),Ge=(0,E.Z)((function(e){var t=e.event,r=e.diff,i=e.direction,o=void 0===i?"next":i,a=e.reason,s=void 0===a?"auto":a;if($e){var l=function(e,t){if(!be.current||-1===e)return-1;for(var n=e;;){if("next"===t&&n===qe.length||"previous"===t&&-1===n)return-1;var r=be.current.querySelector('[data-option-index="'.concat(n,'"]')),i=!D&&r&&(r.disabled||"true"===r.getAttribute("aria-disabled"));if(!(r&&!r.hasAttribute("tabindex")||i))return n;n+="next"===t?1:-1}}(function(){var e=qe.length-1;if("reset"===r)return Te;if("start"===r)return 0;if("end"===r)return e;var t=Ie.current+r;return t<0?-1===t&&X?-1:M&&-1!==Ie.current||Math.abs(r)>1?0:e:t>e?t===e+1&&X?-1:M||Math.abs(r)>1?e:0:t}(),o);if(Ke({index:l,reason:s,event:t}),n&&"reset"!==r)if(-1===l)ye.current.value=Re;else{var u=me(qe[l]);ye.current.value=u,0===u.toLowerCase().indexOf(Re.toLowerCase())&&Re.length>0&&ye.current.setSelectionRange(Re.length,u.length)}}})),Qe=a.useCallback((function(){if($e){var e=te?Pe[0]:Pe;if(0!==qe.length&&null!=e){if(be.current)if(W||null==e)Ie.current>=qe.length-1?Ke({index:qe.length-1}):Ke({index:Ie.current});else{var t=qe[Ie.current];if(te&&t&&-1!==x(Pe,(function(e){return q(t,e)})))return;var n=x(qe,(function(t){return q(t,e)}));-1===n?Ge({diff:"reset"}):Ke({index:n})}}else Ge({diff:"reset"})}}),[0===qe.length,!te&&Pe,W,Ge,Ke,$e,Re,te]),Ye=(0,E.Z)((function(e){(0,_.Z)(be,e),e&&Qe()}));a.useEffect((function(){Qe()}),[Qe]);var Xe=function(e){Ue||(Ve(!0),ae&&ae(e))},Je=function(e,t){Ue&&(Ve(!1),re&&re(e,t))},et=function(e,t,n,r){Pe!==t&&(ne&&ne(e,t,n,r),Ne(t))},tt=a.useRef(!1),nt=function(e,t){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"options",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"select-option",i=t;if(te){var o=x(i=Array.isArray(Pe)?Pe.slice():[],(function(e){return q(t,e)}));-1===o?i.push(t):"freeSolo"!==n&&(i.splice(o,1),r="remove-option")}We(e,i),et(e,i,r,{option:t}),N||Je(e,r),(!0===c||"touch"===c&&tt.current||"mouse"===c&&!tt.current)&&ye.current.blur()},rt=function(e,t){if(te){Je(e,"toggleInput");var n=Se;-1===Se?""===Re&&"previous"===t&&(n=Pe.length-1):((n+="next"===t?1:-1)<0&&(n=0),n===Pe.length&&(n=-1)),n=function(e,t){if(-1===e)return-1;for(var n=e;;){if("next"===t&&n===Pe.length||"previous"===t&&-1===n)return-1;var r=Ee.querySelector('[data-tag-index="'.concat(n,'"]'));if(!r||r.hasAttribute("tabindex")&&!r.disabled&&"true"!==r.getAttribute("aria-disabled"))return n;n+="next"===t?1:-1}}(n,t),xe(n),He(n)}},it=function(e){ge.current=!0,Me(""),oe&&oe(e,"","clear"),et(e,te?[]:null,"clear")},ot=function(e){return function(t){switch(-1!==Se&&-1===["ArrowLeft","ArrowRight"].indexOf(t.key)&&(xe(-1),He(-1)),t.key){case"Home":$e&&G&&(t.preventDefault(),Ge({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":$e&&G&&(t.preventDefault(),Ge({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),Ge({diff:-5,direction:"previous",reason:"keyboard",event:t}),Xe(t);break;case"PageDown":t.preventDefault(),Ge({diff:5,direction:"next",reason:"keyboard",event:t}),Xe(t);break;case"ArrowDown":t.preventDefault(),Ge({diff:1,direction:"next",reason:"keyboard",event:t}),Xe(t);break;case"ArrowUp":t.preventDefault(),Ge({diff:-1,direction:"previous",reason:"keyboard",event:t}),Xe(t);break;case"ArrowLeft":rt(t,"previous");break;case"ArrowRight":rt(t,"next");break;case"Enter":if(229===t.which)break;if(-1!==Ie.current&&$e){var r=qe[Ie.current],i=!!U&&U(r);if(t.preventDefault(),i)return;nt(t,r,"select-option"),n&&ye.current.setSelectionRange(ye.current.value.length,ye.current.value.length)}else z&&""!==Re&&!1===Ze&&(te&&t.preventDefault(),nt(t,Re,"create-option","freeSolo"));break;case"Escape":$e?(t.preventDefault(),t.stopPropagation(),Je(t,"escape")):p&&(""!==Re||te&&Pe.length>0)&&(t.preventDefault(),t.stopPropagation(),it(t));break;case"Backspace":if(te&&""===Re&&Pe.length>0){var o=-1===Se?Pe.length-1:Se,a=Pe.slice();a.splice(o,1),et(t,a,"remove-option",{option:Pe[o]})}}e.onKeyDown&&e.onKeyDown(t)}},at=function(e){Fe(!0),ue&&!ge.current&&Xe(e)},st=function(e){null===be.current||document.activeElement!==be.current.parentElement?(Fe(!1),ve.current=!0,ge.current=!1,C&&""!==Re||(l&&-1!==Ie.current&&$e?nt(e,qe[Ie.current],"blur"):l&&z&&""!==Re?nt(e,Re,"blur","freeSolo"):h&&We(e,Pe),Je(e,"blur"))):ye.current.focus()},lt=function(e){var t=e.target.value;Re!==t&&(Me(t),oe&&oe(e,t,"input")),""===t?O||te||et(e,null,"clear"):Xe(e)},ut=function(e){Ke({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"mouse"})},ct=function(){tt.current=!0},dt=function(e){var t=Number(e.currentTarget.getAttribute("data-option-index"));nt(e,qe[t],"select-option"),tt.current=!1},ht=function(e){return function(t){var n=Pe.slice();n.splice(e,1),et(t,n,"remove-option",{option:Pe[e]})}},ft=function(e){Ue?Je(e,"toggleInput"):Xe(e)},pt=function(e){e.target.getAttribute("id")!==pe&&e.preventDefault()},mt=function(){ye.current.focus(),he&&ve.current&&ye.current.selectionEnd-ye.current.selectionStart==0&&ye.current.select(),ve.current=!1},gt=function(e){""!==Re&&Ue||ft(e)},vt=z&&Re.length>0;vt=vt||(te?Pe.length>0:null!==Pe);var yt=qe;return H&&(new Map,yt=qe.reduce((function(e,t,n){var r=H(t);return e.length>0&&e[e.length-1].group===r?e[e.length-1].options.push(t):e.push({key:n,index:n,group:r,options:[t]}),e}),[])),{getRootProps:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,o.Z)({"aria-owns":$e?"".concat(pe,"-popup"):null,role:"combobox","aria-expanded":$e},e,{onKeyDown:ot(e),onMouseDown:pt,onClick:mt})},getInputLabelProps:function(){return{id:"".concat(pe,"-label"),htmlFor:pe}},getInputProps:function(){return{id:pe,value:Re,onBlur:st,onFocus:at,onChange:lt,onMouseDown:gt,"aria-activedescendant":$e?"":null,"aria-autocomplete":n?"both":"list","aria-controls":$e?"".concat(pe,"-popup"):null,autoComplete:"off",ref:ye,autoCapitalize:"none",spellCheck:"false"}},getClearProps:function(){return{tabIndex:-1,onClick:it}},getPopupIndicatorProps:function(){return{tabIndex:-1,onClick:ft}},getTagProps:function(e){var t=e.index;return{key:t,"data-tag-index":t,tabIndex:-1,onDelete:ht(t)}},getListboxProps:function(){return{role:"listbox",id:"".concat(pe,"-popup"),"aria-labelledby":"".concat(pe,"-label"),ref:Ye,onMouseDown:function(e){e.preventDefault()}}},getOptionProps:function(e){var t=e.index,n=e.option,r=(te?Pe:[Pe]).some((function(e){return null!=e&&q(n,e)})),i=!!U&&U(n);return{key:t,tabIndex:-1,role:"option",id:"".concat(pe,"-option-").concat(t),onMouseOver:ut,onClick:dt,onTouchStart:ct,"data-option-index":t,"aria-disabled":i,"aria-selected":r}},id:pe,inputValue:Re,value:Pe,dirty:vt,popupOpen:$e,focused:je||-1!==Se,anchorEl:Ee,setAnchorEl:_e,focusedTag:Se,groupedOptions:yt}}((0,o.Z)({},e,{componentName:"Autocomplete"})),Se=Ce.getRootProps,xe=Ce.getInputProps,Te=Ce.getInputLabelProps,Ie=Ce.getPopupIndicatorProps,ke=Ce.getClearProps,Oe=Ce.getTagProps,Pe=Ce.getListboxProps,Ne=Ce.getOptionProps,Ae=Ce.value,De=Ce.dirty,Re=Ce.id,Me=Ce.popupOpen,Le=Ce.focused,je=Ce.focusedTag,Fe=Ce.anchorEl,We=Ce.setAnchorEl,Be=Ce.inputValue,ze=Ce.groupedOptions;if(ie&&Ae.length>0){var Ue=function(e){return(0,o.Z)({className:(0,s.default)(l.tag,"small"===we&&l.tagSizeSmall),disabled:R},Oe(e))};n=ye?ye(Ae,Ue):Ae.map((function(e,t){return a.createElement(m.Z,(0,o.Z)({label:q(e),size:we},Ue({index:t}),i))}))}if(G>-1&&Array.isArray(n)){var Ve=n.length-G;!Le&&Ve>0&&(n=n.splice(0,G)).push(a.createElement("span",{className:l.tag,key:n.length},Z(Ve)))}var Ze=me||function(e){return a.createElement("li",{key:e.key},a.createElement(h,{className:l.groupLabel,component:"div"},e.group),a.createElement("ul",{className:l.groupUl},e.children))},$e=ve||q,qe=function(e,t){var n=Ne({option:e,index:t});return a.createElement("li",(0,o.Z)({},n,{className:l.option}),$e(e,{selected:n["aria-selected"],inputValue:Be}))},He=!A&&!R,Ke=(!B||!0===F)&&!1!==F;return a.createElement(a.Fragment,null,a.createElement("div",(0,o.Z)({ref:t,className:(0,s.default)(l.root,c,Le&&l.focused,U&&l.fullWidth,He&&l.hasClearIcon,Ke&&l.hasPopupIcon)},Se(Ee)),ge({id:Re,disabled:R,fullWidth:!0,size:"small"===we?"small":void 0,InputLabelProps:Te(),InputProps:{ref:We,className:l.inputRoot,startAdornment:n,endAdornment:a.createElement("div",{className:l.endAdornment},He?a.createElement(p.Z,(0,o.Z)({},ke(),{"aria-label":g,title:g,className:(0,s.default)(l.clearIndicator,De&&l.clearIndicatorDirty)}),C):null,Ke?a.createElement(p.Z,(0,o.Z)({},Ie(),{disabled:R,"aria-label":Me?P:le,title:Me?P:le,className:(0,s.default)(l.popupIndicator,Me&&l.popupIndicatorOpen)}),pe):null)},inputProps:(0,o.Z)({className:(0,s.default)(l.input,-1===je&&l.inputFocused),disabled:R},xe())})),Me&&Fe?a.createElement(_e,{className:(0,s.default)(l.popper,L&&l.popperDisablePortal),style:{width:Fe?Fe.clientWidth:null},role:"presentation",anchorEl:Fe,open:!0},a.createElement(ce,{className:l.paper},ee&&0===ze.length?a.createElement("div",{className:l.loading},ne):null,0!==ze.length||B||ee?null:a.createElement("div",{className:l.noOptions},ae),ze.length>0?a.createElement(Y,(0,o.Z)({className:l.listbox},Pe(),X),ze.map((function(e,t){return H?Ze({key:e.key,group:e.group,children:e.options.map((function(t,n){return qe(t,e.index+n)}))}):qe(e,t)}))):null)):null)}));const N=(0,l.Z)((function(e){var t;return{root:{"&$focused $clearIndicatorDirty":{visibility:"visible"},"@media (pointer: fine)":{"&:hover $clearIndicatorDirty":{visibility:"visible"}}},fullWidth:{width:"100%"},focused:{},tag:{margin:3,maxWidth:"calc(100% - 6px)"},tagSizeSmall:{margin:2,maxWidth:"calc(100% - 4px)"},hasPopupIcon:{},hasClearIcon:{},inputRoot:{flexWrap:"wrap","$hasPopupIcon &, $hasClearIcon &":{paddingRight:30},"$hasPopupIcon$hasClearIcon &":{paddingRight:56},"& $input":{width:0,minWidth:30},'&[class*="MuiInput-root"]':{paddingBottom:1,"& $input":{padding:4},"& $input:first-child":{padding:"6px 0"}},'&[class*="MuiInput-root"][class*="MuiInput-marginDense"]':{"& $input":{padding:"4px 4px 5px"},"& $input:first-child":{padding:"3px 0 6px"}},'&[class*="MuiOutlinedInput-root"]':{padding:9,"$hasPopupIcon &, $hasClearIcon &":{paddingRight:39},"$hasPopupIcon$hasClearIcon &":{paddingRight:65},"& $input":{padding:"9.5px 4px"},"& $input:first-child":{paddingLeft:6},"& $endAdornment":{right:9}},'&[class*="MuiOutlinedInput-root"][class*="MuiOutlinedInput-marginDense"]':{padding:6,"& $input":{padding:"4.5px 4px"}},'&[class*="MuiFilledInput-root"]':{paddingTop:19,paddingLeft:8,"$hasPopupIcon &, $hasClearIcon &":{paddingRight:39},"$hasPopupIcon$hasClearIcon &":{paddingRight:65},"& $input":{padding:"9px 4px"},"& $endAdornment":{right:9}},'&[class*="MuiFilledInput-root"][class*="MuiFilledInput-marginDense"]':{paddingBottom:1,"& $input":{padding:"4.5px 4px"}}},input:{flexGrow:1,textOverflow:"ellipsis",opacity:0},inputFocused:{opacity:1},endAdornment:{position:"absolute",right:0,top:"calc(50% - 14px)"},clearIndicator:{marginRight:-2,padding:4,visibility:"hidden"},clearIndicatorDirty:{},popupIndicator:{padding:2,marginRight:-2},popupIndicatorOpen:{transform:"rotate(180deg)"},popper:{zIndex:e.zIndex.modal},popperDisablePortal:{position:"absolute"},paper:(0,o.Z)({},e.typography.body1,{overflow:"hidden",margin:"4px 0"}),listbox:{listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto"},loading:{color:e.palette.text.secondary,padding:"14px 16px"},noOptions:{color:e.palette.text.secondary,padding:"14px 16px"},option:(t={minHeight:48,display:"flex",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16},(0,i.Z)(t,e.breakpoints.up("sm"),{minHeight:"auto"}),(0,i.Z)(t,'&[aria-selected="true"]',{backgroundColor:e.palette.action.selected}),(0,i.Z)(t,'&[data-focus="true"]',{backgroundColor:e.palette.action.hover}),(0,i.Z)(t,"&:active",{backgroundColor:e.palette.action.selected}),(0,i.Z)(t,'&[aria-disabled="true"]',{opacity:e.palette.action.disabledOpacity,pointerEvents:"none"}),t),groupLabel:{backgroundColor:e.palette.background.paper,top:-8},groupUl:{padding:0,"& $option":{paddingLeft:24}}}}),{name:"MuiAutocomplete"})(P)},7694:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(7294);const i=(0,n(3786).Z)(r.createElement("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")},6975:(e,t,n)=>{"use strict";n.d(t,{NU:()=>h,ZP:()=>f});var r,i=n(2122),o=n(1253),a=n(7294),s=(n(5697),n(5034)),l=n(4013),u=n(246),c=(0,l.Ue)((0,u.Z)()),d={disableGeneration:!1,generateClassName:(0,s.Z)(),jss:c,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},h=a.createContext(d);function f(e){var t=e.children,n=e.injectFirst,s=void 0!==n&&n,c=e.disableGeneration,d=void 0!==c&&c,f=(0,o.Z)(e,["children","injectFirst","disableGeneration"]),p=a.useContext(h),m=(0,i.Z)({},p,{disableGeneration:d},f);if(!m.jss.options.insertionPoint&&s&&"undefined"!=typeof window){if(!r){var g=document.head;r=document.createComment("mui-inject-first"),g.insertBefore(r,g.firstChild)}m.jss=(0,l.Ue)({plugins:(0,u.Z)().plugins,insertionPoint:r})}return a.createElement(h.Provider,{value:m},t)}},7076:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__"},5034:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7076),i=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,o=e.productionPrefix,a=void 0===o?"jss":o,s=e.seed,l=void 0===s?"":s,u=""===l?"":"".concat(l,"-"),c=0;return function(e,t){c+=1;var o=t.options.name;if(o&&0===o.indexOf("Mui")&&!t.options.link&&!n){if(-1!==i.indexOf(e.key))return"Mui-".concat(e.key);var s="".concat(u).concat(o,"-").concat(e.key);return t.options.theme[r.Z]&&""===l?"".concat(s,"-").concat(c):s}return"".concat(u).concat(a).concat(c)}}},3869:(e,t,n)=>{"use strict";function r(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var i,o=t.props[n];for(i in o)void 0===r[i]&&(r[i]=o[i]);return r}n.d(t,{Z:()=>r})},246:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Pe});var r=n(4013),i=Date.now(),o="fnValues"+i,a="fnStyle"+ ++i;var s=n(2122),l="@global",u="@global ",c=function(){function e(e,t,n){for(var i in this.type="global",this.at=l,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new r.RB((0,s.Z)({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),d=function(){function e(e,t,n){this.type="global",this.at=l,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=e,this.options=n;var r=e.substr(u.length);this.rule=n.jss.createRule(r,t,(0,s.Z)({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),h=/\s*,\s*/g;function f(e,t){for(var n=e.split(h),r="",i=0;i<n.length;i++)r+=t+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}var p=/\s*,\s*/g,m=/&/g,g=/\$([\w-]+)/g;const v=function(){function e(e,t){return function(n,r){var i=e.getRule(r)||t&&t.getRule(r);return i?(i=i).selector:r}}function t(e,t){for(var n=t.split(p),r=e.split(p),i="",o=0;o<n.length;o++)for(var a=n[o],s=0;s<r.length;s++){var l=r[s];i&&(i+=", "),i+=-1!==l.indexOf("&")?l.replace(m,a):a+" "+l}return i}function n(e,t,n){if(n)return(0,s.Z)({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var i=(0,s.Z)({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete i.name,i}return{onProcessStyle:function(r,i,o){if("style"!==i.type)return r;var a,l,u=i,c=u.options.parent;for(var d in r){var h=-1!==d.indexOf("&"),f="@"===d[0];if(h||f){if(a=n(u,c,a),h){var p=t(d,u.selector);l||(l=e(c,o)),p=p.replace(g,l),c.addRule(p,r[d],(0,s.Z)({},a,{selector:p}))}else f&&c.addRule(d,{},a).addRule(u.key,r[d],{selector:u.selector});delete r[d]}}return r}}};var y=/[A-Z]/g,b=/^ms-/,w={};function E(e){return"-"+e.toLowerCase()}const _=function(e){if(w.hasOwnProperty(e))return w[e];var t=e.replace(y,E);return w[e]=b.test(t)?"-"+t:t};function C(e){var t={};for(var n in e)t[0===n.indexOf("--")?n:_(n)]=e[n];return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(C):t.fallbacks=C(e.fallbacks)),t}var S=r.HZ&&CSS?CSS.px:"px",x=r.HZ&&CSS?CSS.ms:"ms",T=r.HZ&&CSS?CSS.percent:"%";function I(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var i in e)r[i]=e[i],r[i.replace(t,n)]=e[i];return r}var k=I({"animation-delay":x,"animation-duration":x,"background-position":S,"background-position-x":S,"background-position-y":S,"background-size":S,border:S,"border-bottom":S,"border-bottom-left-radius":S,"border-bottom-right-radius":S,"border-bottom-width":S,"border-left":S,"border-left-width":S,"border-radius":S,"border-right":S,"border-right-width":S,"border-top":S,"border-top-left-radius":S,"border-top-right-radius":S,"border-top-width":S,"border-width":S,margin:S,"margin-bottom":S,"margin-left":S,"margin-right":S,"margin-top":S,padding:S,"padding-bottom":S,"padding-left":S,"padding-right":S,"padding-top":S,"mask-position-x":S,"mask-position-y":S,"mask-size":S,height:S,width:S,"min-height":S,"max-height":S,"min-width":S,"max-width":S,bottom:S,left:S,top:S,right:S,"box-shadow":S,"text-shadow":S,"column-gap":S,"column-rule":S,"column-rule-width":S,"column-width":S,"font-size":S,"font-size-delta":S,"letter-spacing":S,"text-indent":S,"text-stroke":S,"text-stroke-width":S,"word-spacing":S,motion:S,"motion-offset":S,outline:S,"outline-offset":S,"outline-width":S,perspective:S,"perspective-origin-x":T,"perspective-origin-y":T,"transform-origin":T,"transform-origin-x":T,"transform-origin-y":T,"transform-origin-z":T,"transition-delay":x,"transition-duration":x,"vertical-align":S,"flex-basis":S,"shape-margin":S,size:S,grid:S,"grid-gap":S,"grid-row-gap":S,"grid-column-gap":S,"grid-template-rows":S,"grid-template-columns":S,"grid-auto-rows":S,"grid-auto-columns":S,"box-shadow-x":S,"box-shadow-y":S,"box-shadow-blur":S,"box-shadow-spread":S,"font-line-height":S,"text-shadow-x":S,"text-shadow-y":S,"text-shadow-blur":S});function O(e,t,n){if(!t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=O(e,t[r],n);else if("object"==typeof t)if("fallbacks"===e)for(var i in t)t[i]=O(i,t[i],n);else for(var o in t)t[o]=O(e+"-"+o,t[o],n);else if("number"==typeof t){var a=n[e]||k[e];return a?"function"==typeof a?a(t).toString():""+t+a:t.toString()}return t}const P=function(e){void 0===e&&(e={});var t=I(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=O(r,e[r],t);return e},onChangeValue:function(e,n){return O(n,e,t)}}};var N=n(3827),A=n(5061),D="",R="",M="",L="",j=N.Z&&"ontouchstart"in document.documentElement;if(N.Z){var F={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},W=document.createElement("p").style;for(var B in F)if(B+"Transform"in W){D=B,R=F[B];break}"Webkit"===D&&"msHyphens"in W&&(D="ms",R=F.ms,L="edge"),"Webkit"===D&&"-apple-trailing-word"in W&&(M="apple")}var z=D,U=R,V=M,Z=L,$=j,q={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===z?"-webkit-"+e:U+e)}},H={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===z?U+"print-"+e:e)}},K=/[-\s]+(.)?/g;function G(e,t){return t?t.toUpperCase():""}function Q(e){return e.replace(K,G)}function Y(e){return Q("-"+e)}var X,J={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===z){var n="mask-image";if(Q(n)in t)return e;if(z+Y(n)in t)return U+e}return e}},ee={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==V||$?e:U+e)}},te={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:U+e)}},ne={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:U+e)}},re={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===z||"ms"===z&&"edge"!==Z?U+e:e)}},ie={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===z||"ms"===z||"apple"===V?U+e:e)}},oe={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===z?"WebkitColumn"+Y(e)in t&&U+"column-"+e:"Moz"===z&&"page"+Y(e)in t&&"page-"+e)}},ae={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===z)return e;var n=e.replace("-inline","");return z+Y(n)in t&&U+n}},se={supportedProperty:function(e,t){return Q(e)in t&&e}},le={supportedProperty:function(e,t){var n=Y(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:z+n in t?U+e:"Webkit"!==z&&"Webkit"+n in t&&"-webkit-"+e}},ue={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===z?""+U+e:e)}},ce={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===z?U+"scroll-chaining":e)}},de={"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"},he={supportedProperty:function(e,t){var n=de[e];return!!n&&z+Y(n)in t&&U+n}},fe={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"},pe=Object.keys(fe),me=function(e){return U+e},ge=[q,H,J,ee,te,ne,re,ie,oe,ae,se,le,ue,ce,he,{supportedProperty:function(e,t,n){var r=n.multiple;if(pe.indexOf(e)>-1){var i=fe[e];if(!Array.isArray(i))return z+Y(i)in t&&U+i;if(!r)return!1;for(var o=0;o<i.length;o++)if(!(z+Y(i[0])in t))return!1;return i.map(me)}return!1}}],ve=ge.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),ye=ge.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,(0,A.Z)(t.noPrefill)),e}),[]),be={};if(N.Z){X=document.createElement("p");var we=window.getComputedStyle(document.documentElement,"");for(var Ee in we)isNaN(Ee)||(be[we[Ee]]=we[Ee]);ye.forEach((function(e){return delete be[e]}))}function _e(e,t){if(void 0===t&&(t={}),!X)return e;if(null!=be[e])return be[e];"transition"!==e&&"transform"!==e||(t[e]=e in X.style);for(var n=0;n<ve.length&&(be[e]=ve[n](e,X.style,t),!be[e]);n++);try{X.style[e]=""}catch(e){return!1}return be[e]}var Ce,Se={},xe={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},Te=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function Ie(e,t,n){return"var"===t?"var":"all"===t?"all":"all"===n?", all":(t?_e(t):", "+_e(n))||t||n}function ke(e,t){var n=t;if(!Ce||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=Se[r])return Se[r];try{Ce.style[e]=n}catch(e){return Se[r]=!1,!1}if(xe[e])n=n.replace(Te,Ie);else if(""===Ce.style[e]&&("-ms-flex"===(n=U+n)&&(Ce.style[e]="-ms-flexbox"),Ce.style[e]=n,""===Ce.style[e]))return Se[r]=!1,!1;return Ce.style[e]="",Se[r]=n,Se[r]}N.Z&&(Ce=document.createElement("p"));const Oe=function(){function e(t){for(var n in t){var i=t[n];if("fallbacks"===n&&Array.isArray(i))t[n]=i.map(e);else{var o=!1,a=_e(n);a&&a!==n&&(o=!0);var s=!1,l=ke(a,(0,r.EK)(i));l&&l!==i&&(s=!0),(o||s)&&(o&&delete t[n],t[a||n]=l||i)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===z?e:"@"+U+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return ke(t,(0,r.EK)(e))||e}}};function Pe(){return{plugins:[{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var i=(0,r.JH)(e,{},n);return i[a]=t,i},onProcessStyle:function(e,t){if(o in t||a in t)return e;var n={};for(var r in e){var i=e[r];"function"==typeof i&&(delete e[r],n[r]=i)}return t[o]=n,e},onUpdate:function(e,t,n,r){var i=t,s=i[a];s&&(i.style=s(e)||{});var l=i[o];if(l)for(var u in l)i.prop(u,l[u](e),r)}},{onCreateRule:function(e,t,n){if(!e)return null;if(e===l)return new c(e,t,n);if("@"===e[0]&&e.substr(0,u.length)===u)return new d(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),!1===n.scoped&&(n.selector=e),null},onProcessRule:function(e){"style"===e.type&&(function(e){var t=e.options,n=e.style,r=n?n[l]:null;if(r){for(var i in r)t.sheet.addRule(i,r[i],(0,s.Z)({},t,{selector:f(i,e.selector)}));delete n[l]}}(e),function(e){var t=e.options,n=e.style;for(var r in n)if("@"===r[0]&&r.substr(0,l.length)===l){var i=f(r.substr(l.length),e.selector);t.sheet.addRule(i,n[r],(0,s.Z)({},t,{selector:i})),delete n[r]}}(e))}},v(),{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=C(e[t]);return e}return C(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=_(t);return t===r?e:(n.prop(r,e),null)}},P(),"undefined"==typeof window?null:Oe(),(e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length},{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),o=0;o<i.length;o++)r[i[o]]=t[i[o]];return r}})]};var e}},3914:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(1253),i=n(2122),o=n(7294),a=n(4013),s=n(5835);const l=function(e,t,n,r){var i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},u=function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},c=function(e,t,n){e.get(t).delete(n)};var d=n(159),h=n(6975),f=-1e9;function p(){return f+=1}var m=n(5953);function g(e){var t="function"==typeof e;return{create:function(n,r){var o;try{o=t?e(n):e}catch(e){throw e}if(!r||!n.overrides||!n.overrides[r])return o;var a=n.overrides[r],s=(0,i.Z)({},o);return Object.keys(a).forEach((function(e){s[e]=(0,m.Z)(s[e],a[e])})),s},options:{}}}const v={};function y(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,i=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,i=!0),i&&(r.cacheClasses.value=(0,s.Z)({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}function b(e,t){var n=e.state,r=e.theme,o=e.stylesOptions,c=e.stylesCreator,d=e.name;if(!o.disableGeneration){var h=u(o.sheetsManager,c,r);h||(h={refs:0,staticSheet:null,dynamicStyles:null},l(o.sheetsManager,c,r,h));var f=(0,i.Z)({},c.options,{},o,{theme:r,flip:"boolean"==typeof o.flip?o.flip:"rtl"===r.direction});f.generateId=f.serverGenerateClassName||f.generateClassName;var p=o.sheetsRegistry;if(0===h.refs){var m;o.sheetsCache&&(m=u(o.sheetsCache,c,r));var g=c.create(r,d);m||((m=o.jss.createStyleSheet(g,(0,i.Z)({link:!1},f))).attach(),o.sheetsCache&&l(o.sheetsCache,c,r,m)),p&&p.add(m),h.staticSheet=m,h.dynamicStyles=(0,a._$)(g)}if(h.dynamicStyles){var v=o.jss.createStyleSheet(h.dynamicStyles,(0,i.Z)({link:!0},f));v.update(t),v.attach(),n.dynamicSheet=v,n.classes=(0,s.Z)({baseClasses:h.staticSheet.classes,newClasses:v.classes}),p&&p.add(v)}else n.classes=h.staticSheet.classes;h.refs+=1}}function w(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}function E(e){var t=e.state,n=e.theme,r=e.stylesOptions,i=e.stylesCreator;if(!r.disableGeneration){var o=u(r.sheetsManager,i,n);o.refs-=1;var a=r.sheetsRegistry;0===o.refs&&(c(r.sheetsManager,i,n),r.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}function _(e,t){var n,r=o.useRef([]),i=o.useMemo((function(){return{}}),t);r.current!==i&&(r.current=i,n=e()),o.useEffect((function(){return function(){n&&n()}}),[i])}function C(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,a=t.classNamePrefix,s=t.Component,l=t.defaultTheme,u=void 0===l?v:l,c=(0,r.Z)(t,["name","classNamePrefix","Component","defaultTheme"]),f=g(e),m=n||a||"makeStyles";f.options={index:p(),name:n,meta:m,classNamePrefix:m};var C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,d.Z)()||u,r=(0,i.Z)({},o.useContext(h.NU),{},c),a=o.useRef(),l=o.useRef();_((function(){var i={name:n,state:{},stylesCreator:f,stylesOptions:r,theme:t};return b(i,e),l.current=!1,a.current=i,function(){E(i)}}),[t,f]),o.useEffect((function(){l.current&&w(a.current,e),l.current=!0}));var p=y(a.current,e.classes,s);return p};return C}},5835:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(2122);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;if(e.Component,!n)return t;var i=(0,r.Z)({},t);return Object.keys(n).forEach((function(e){n[e]&&(i[e]="".concat(t[e]," ").concat(n[e]))})),i}},3800:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(7294).createContext(null)},159:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7294),i=n(3800);function o(){return r.useContext(i.Z)}},1410:(e,t,n)=>{"use strict";n.d(t,{k:()=>a});var r=n(484),i=(n(5697),{xs:0,sm:600,md:960,lg:1280,xl:1920}),o={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(i[e],"px)")}};function a(e,t,n){if(Array.isArray(t)){var i=e.theme.breakpoints||o;return t.reduce((function(e,r,o){return e[i.up(i.keys[o])]=n(t[o]),e}),{})}if("object"===(0,r.Z)(t)){var a=e.theme.breakpoints||o;return Object.keys(t).reduce((function(e,r){return e[a.up(r)]=n(t[r]),e}),{})}return n(t)}},9668:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(5953);const i=function(e,t){return t?(0,r.Z)(e,t,{clone:!1}):e}},8681:(e,t,n)=>{"use strict";n.d(t,{h:()=>f,Z:()=>m});var r,i,o=n(8481),a=n(1410),s=n(9668),l={m:"margin",p:"padding"},u={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},c={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},d=(r=function(e){if(e.length>2){if(!c[e])return[e];e=c[e]}var t=e.split(""),n=(0,o.Z)(t,2),r=n[0],i=n[1],a=l[r],s=u[i]||"";return Array.isArray(s)?s.map((function(e){return a+e})):[a+s]},i={},function(e){return void 0===i[e]&&(i[e]=r(e)),i[e]}),h=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function f(e){var t=e.spacing||8;return"number"==typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"==typeof t?t:function(){}}function p(e){var t=f(e.theme);return Object.keys(e).map((function(n){if(-1===h.indexOf(n))return null;var r=function(e,t){return function(n){return e.reduce((function(e,r){return e[r]=function(e,t){if("string"==typeof t)return t;var n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:"-".concat(n)}(t,n),e}),{})}}(d(n),t),i=e[n];return(0,a.k)(e,i,r)})).reduce(s.Z,{})}p.propTypes={},p.filterProps=h;const m=p},5953:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(2122),i=n(484);function o(e){return e&&"object"===(0,i.Z)(e)&&e.constructor===Object}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},i=n.clone?(0,r.Z)({},e):e;return o(e)&&o(t)&&Object.keys(t).forEach((function(r){"__proto__"!==r&&(o(t[r])&&r in e?i[r]=a(e[r],t[r],n):i[r]=t[r])})),i}},6664:function(e,t,n){!function(e,t){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;function a(){}function s(){}s.resetWarningCache=a;var l,u=(function(e){e.exports=function(){function e(e,t,n,r,i,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var a=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 a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:a};return n.PropTypes=n,n}()}(l={exports:{}},l.exports),l.exports),c=function(e){return null!==e&&"object"===n(e)},d="[object Object]",h=function e(t,n){if(!c(t)||!c(n))return t===n;var r=Array.isArray(t);if(r!==Array.isArray(n))return!1;var i=Object.prototype.toString.call(t)===d;if(i!==(Object.prototype.toString.call(n)===d))return!1;if(!i&&!r)return!1;var o=Object.keys(t),a=Object.keys(n);if(o.length!==a.length)return!1;for(var s={},l=0;l<o.length;l+=1)s[o[l]]=!0;for(var u=0;u<a.length;u+=1)s[a[u]]=!0;var h=Object.keys(s);if(h.length!==o.length)return!1;var f=t,p=n;return h.every((function(t){return e(f[t],p[t])}))},f=function(e){var n=t.useRef(e);return t.useEffect((function(){n.current=e}),[e]),n.current},p=function(e){if(null===e||c(t=e)&&"function"==typeof t.elements&&"function"==typeof t.createToken&&"function"==typeof t.createPaymentMethod&&"function"==typeof t.confirmCardPayment)return e;var t;throw new Error("Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")},m=function(e){if(function(e){return c(e)&&"function"==typeof e.then}(e))return{tag:"async",stripePromise:Promise.resolve(e).then(p)};var t=p(e);return null===t?{tag:"empty"}:{tag:"sync",stripe:t}},g=t.createContext(null);g.displayName="ElementsContext";var v=function(e){var n=e.stripe,r=e.options,o=e.children,a=t.useRef(!1),s=t.useRef(!0),l=t.useMemo((function(){return m(n)}),[n]),u=i(t.useState((function(){return{stripe:null,elements:null}})),2),c=u[0],d=u[1],p=f(n),v=f(r);return null!==p&&(p!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it."),h(r,v)||console.warn("Unsupported prop change on Elements: You cannot change the `options` prop after setting the `stripe` prop.")),a.current||("sync"===l.tag&&(a.current=!0,d({stripe:l.stripe,elements:l.stripe.elements(r)})),"async"===l.tag&&(a.current=!0,l.stripePromise.then((function(e){e&&s.current&&d({stripe:e,elements:e.elements(r)})})))),t.useEffect((function(){return function(){s.current=!1}}),[]),t.useEffect((function(){var e=c.stripe;e&&e._registerWrapper&&e._registerWrapper({name:"react-stripe-js",version:"1.4.0"})}),[c.stripe]),t.createElement(g.Provider,{value:c},o)};v.propTypes={stripe:u.any,options:u.object};var y=function(e){return function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e}(t.useContext(g),e)},b=function(e){return(0,e.children)(y("mounts <ElementsConsumer>"))};b.propTypes={children:u.func.isRequired};var w=function(e){var n=t.useRef(e);return t.useEffect((function(){n.current=e}),[e]),function(){n.current&&n.current.apply(n,arguments)}},E=function(e){return c(e)?(e.paymentRequest,r(e,["paymentRequest"])):{}},_=function(){},C=function(e,n){var r,i="".concat((r=e).charAt(0).toUpperCase()+r.slice(1),"Element"),o=n?function(e){y("mounts <".concat(i,">"));var n=e.id,r=e.className;return t.createElement("div",{id:n,className:r})}:function(n){var r=n.id,o=n.className,a=n.options,s=void 0===a?{}:a,l=n.onBlur,u=void 0===l?_:l,c=n.onFocus,d=void 0===c?_:c,f=n.onReady,p=void 0===f?_:f,m=n.onChange,g=void 0===m?_:m,v=n.onEscape,b=void 0===v?_:v,C=n.onClick,S=void 0===C?_:C,x=y("mounts <".concat(i,">")).elements,T=t.useRef(null),I=t.useRef(null),k=w(p),O=w(u),P=w(d),N=w(S),A=w(g),D=w(b);t.useLayoutEffect((function(){if(null==T.current&&x&&null!=I.current){var t=x.create(e,s);T.current=t,t.mount(I.current),t.on("ready",(function(){return k(t)})),t.on("change",A),t.on("blur",O),t.on("focus",P),t.on("escape",D),t.on("click",N)}}));var R=t.useRef(s);return t.useEffect((function(){R.current&&R.current.paymentRequest!==s.paymentRequest&&console.warn("Unsupported prop change: options.paymentRequest is not a customizable property.");var e=E(s);0===Object.keys(e).length||h(e,E(R.current))||T.current&&(T.current.update(e),R.current=s)}),[s]),t.useLayoutEffect((function(){return function(){T.current&&T.current.destroy()}}),[]),t.createElement("div",{id:r,className:o,ref:I})};return o.propTypes={id:u.string,className:u.string,onChange:u.func,onBlur:u.func,onFocus:u.func,onReady:u.func,onClick:u.func,options:u.object},o.displayName=i,o.__elementType=e,o},S="undefined"==typeof window,x=C("auBankAccount",S),T=C("card",S),I=C("cardNumber",S),k=C("cardExpiry",S),O=C("cardCvc",S),P=C("fpxBank",S),N=C("iban",S),A=C("idealBank",S),D=C("p24Bank",S),R=C("epsBank",S),M=C("paymentRequestButton",S),L=C("afterpayClearpayMessage",S);e.AfterpayClearpayMessageElement=L,e.AuBankAccountElement=x,e.CardCvcElement=O,e.CardElement=T,e.CardExpiryElement=k,e.CardNumberElement=I,e.Elements=v,e.ElementsConsumer=b,e.EpsBankElement=R,e.FpxBankElement=P,e.IbanElement=N,e.IdealBankElement=A,e.P24BankElement=D,e.PaymentRequestButtonElement=M,e.useElements=function(){return y("calls useElements()").elements},e.useStripe=function(){return y("calls useStripe()").stripe},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(7294))},4465:(e,t,n)=>{"use strict";n.r(t),n.d(t,{loadStripe:()=>c});var r="https://js.stripe.com/v3",i=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,o="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",a=null,s=function(e,t,n){if(null===e)return null;var r=e.apply(void 0,t);return function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"1.13.2",startTime:t})}(r,n),r},l=Promise.resolve().then((function(){return e=null,null!==a?a:a=new Promise((function(t,n){if("undefined"!=typeof window)if(window.Stripe&&e&&console.warn(o),window.Stripe)t(window.Stripe);else try{var a=function(){for(var e=document.querySelectorAll('script[src^="'.concat(r,'"]')),t=0;t<e.length;t++){var n=e[t];if(i.test(n.src))return n}return null}();a&&e?console.warn(o):a||(a=function(e){var t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(r).concat(t);var i=document.head||document.body;if(!i)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return i.appendChild(n),n}(e)),a.addEventListener("load",(function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))})),a.addEventListener("error",(function(){n(new Error("Failed to load Stripe.js"))}))}catch(e){return void n(e)}else t(null)}));var e})),u=!1;l.catch((function(e){u||console.warn(e)}));var c=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];u=!0;var r=Date.now();return l.then((function(e){return s(e,t,r)}))}},6010:(e,t,n)=>{"use strict";function r(e){var t,n,i="";if(e)if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(n=r(t))&&(i&&(i+=" "),i+=n);else"boolean"==typeof e||e.call||(i&&(i+=" "),i+=e);return i}function i(){for(var e,t=0,n="";t<arguments.length;)(e=r(arguments[t++]))&&(n&&(n+=" "),n+=e);return n}n.r(t),n.d(t,{default:()=>i})},6729:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,i),!0;case 5:return c.fn.call(c.context,t,r,i,o),!0;case 6:return c.fn.call(c.context,t,r,i,o,a),!0}for(u=1,l=new Array(d-1);u<d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var h,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,r);break;case 4:c[u].fn.call(c[u].context,t,r,i);break;default:if(!l)for(h=1,l=new Array(d-1);h<d;h++)l[h-1]=arguments[h];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==t||i&&!s[l].once||r&&s[l].context!==r)&&u.push(s[l]);u.length?this._events[o]=1===u.length?u[0]:u:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s},1316:e=>{"use strict";e.exports=()=>/[<>:"\/\\|?*\x00-\x1F]/g,e.exports.windowsNames=()=>/^(con|prn|aux|nul|com[0-9]|lpt[0-9])$/i},5503:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SDK_VERSION:()=>r.Jn,_DEFAULT_ENTRY_NAME:()=>r.l4,_addComponent:()=>r.H9,_addOrOverwriteComponent:()=>r.Vr,_apps:()=>r.Af,_clearComponents:()=>r.Z8,_components:()=>r.lz,_getProvider:()=>r.qX,_registerComponent:()=>r.Xd,_removeServiceInstance:()=>r.wN,deleteApp:()=>r.P2,getApp:()=>r.Mq,getApps:()=>r.C6,initializeApp:()=>r.ZF,onLog:()=>r.TP,registerVersion:()=>r.KN,setLogLevel:()=>r.Ub});var r=n(3198);(0,r.KN)("firebase-exp","9.0.0-beta.2","app")},3887:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ActionCodeURL:()=>Ae,AuthCredential:()=>Ce,EmailAuthCredential:()=>Ie,EmailAuthProvider:()=>Re,FacebookAuthProvider:()=>Fe,GithubAuthProvider:()=>Be,GoogleAuthProvider:()=>We,OAuthCredential:()=>Oe,OAuthProvider:()=>je,PhoneAuthCredential:()=>Ne,PhoneAuthProvider:()=>mr,PhoneMultiFactorGenerator:()=>_r,RecaptchaVerifier:()=>lr,SAMLAuthProvider:()=>Ue,TwitterAuthProvider:()=>Ve,applyActionCode:()=>dt,browserLocalPersistence:()=>Qt,browserPopupRedirectResolver:()=>Xn,browserSessionPersistence:()=>Pn,checkActionCode:()=>ht,confirmPasswordReset:()=>ct,createUserWithEmailAndPassword:()=>pt,debugErrorMap:()=>p,deleteUser:()=>Wt,fetchSignInMethodsForEmail:()=>bt,getAdditionalUserInfo:()=>At,getAuth:()=>Cr,getIdToken:()=>Z,getIdTokenResult:()=>$,getMultiFactorResolver:()=>Ut,getRedirectResult:()=>Hn,inMemoryPersistence:()=>re,indexedDBLocalPersistence:()=>dn,initializeAuth:()=>I,isSignInWithEmailLink:()=>vt,linkWithCredential:()=>rt,linkWithPhoneNumber:()=>dr,linkWithPopup:()=>br,linkWithRedirect:()=>qn,multiFactor:()=>$t,onAuthStateChanged:()=>Mt,onIdTokenChanged:()=>Rt,parseActionCodeURL:()=>De,prodErrorMap:()=>m,reauthenticateWithCredential:()=>it,reauthenticateWithPhoneNumber:()=>hr,reauthenticateWithPopup:()=>yr,reauthenticateWithRedirect:()=>$n,reload:()=>X,sendEmailVerification:()=>wt,sendPasswordResetEmail:()=>ut,sendSignInLinkToEmail:()=>gt,setPersistence:()=>Dt,signInAnonymously:()=>He,signInWithCredential:()=>nt,signInWithCustomToken:()=>ot,signInWithEmailAndPassword:()=>mt,signInWithEmailLink:()=>yt,signInWithPhoneNumber:()=>cr,signInWithPopup:()=>vr,signInWithRedirect:()=>Zn,signOut:()=>Ft,unlink:()=>Ye,updateCurrentUser:()=>jt,updateEmail:()=>Ct,updatePassword:()=>St,updatePhoneNumber:()=>pr,updateProfile:()=>_t,useAuthEmulator:()=>we,useDeviceLanguage:()=>Lt,verifyBeforeUpdateEmail:()=>Et,verifyPasswordResetCode:()=>ft});var r=n(3198),i=n(8448),o=n(4594),a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function l(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function c(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}Object.create,Object.create;var d=function(){function e(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}return e.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},e.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},e.prototype.setServiceProps=function(e){return this.serviceProps=e,this},e.prototype.setInstanceCreatedCallback=function(e){return this.onInstanceCreated=e,this},e}(),h="[DEFAULT]",f=function(){function e(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.onInitCallbacks=new Set}return e.prototype.get=function(e){void 0===e&&(e=h);var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new i.BH;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{var r=this.getOrInitializeService({instanceIdentifier:t});r&&n.resolve(r)}catch(e){}}return this.instancesDeferred.get(t).promise},e.prototype.getImmediate=function(e){var t=a({identifier:h,optional:!1},e),n=t.identifier,r=t.optional,i=this.normalizeInstanceIdentifier(n);if(!this.isInitialized(i)&&!this.shouldAutoInitialize()){if(r)return null;throw Error("Service "+this.name+" is not available")}try{return this.getOrInitializeService({instanceIdentifier:i})}catch(e){if(r)return null;throw e}},e.prototype.getComponent=function(){return this.component},e.prototype.setComponent=function(e){var t,n;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(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:h})}catch(e){}try{for(var r=l(this.instancesDeferred.entries()),i=r.next();!i.done;i=r.next()){var o=u(i.value,2),a=o[0],s=o[1],c=this.normalizeInstanceIdentifier(a);try{var d=this.getOrInitializeService({instanceIdentifier:c});s.resolve(d)}catch(e){}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}}},e.prototype.clearInstance=function(e){void 0===e&&(e=h),this.instancesDeferred.delete(e),this.instances.delete(e)},e.prototype.delete=function(){return e=this,t=void 0,r=function(){var e;return function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,(function(t){switch(t.label){case 0:return e=Array.from(this.instances.values()),[4,Promise.all(c(c([],u(e.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()})))),u(e.filter((function(e){return"_delete"in e})).map((function(e){return e._delete()})))))];case 1:return t.sent(),[2]}}))},new((n=void 0)||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}));var e,t,n,r},e.prototype.isComponentSet=function(){return null!=this.component},e.prototype.isInitialized=function(e){return void 0===e&&(e=h),this.instances.has(e)},e.prototype.initialize=function(e){var t,n;void 0===e&&(e={});var r=e.instanceIdentifier,i=void 0===r?h:r,o=e.options,a=void 0===o?{}:o,s=this.normalizeInstanceIdentifier(i);if(this.isInitialized(s))throw Error(this.name+"("+s+") has already been initialized");if(!this.isComponentSet())throw Error("Component "+this.name+" has not been registered yet");var c=this.getOrInitializeService({instanceIdentifier:s,options:a});try{for(var d=l(this.instancesDeferred.entries()),f=d.next();!f.done;f=d.next()){var p=u(f.value,2),m=p[0],g=p[1];s===this.normalizeInstanceIdentifier(m)&&g.resolve(c)}}catch(e){t={error:e}}finally{try{f&&!f.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}return this.invokeOnInitCallbacks(c,s),c},e.prototype.onInit=function(e){var t=this;return this.onInitCallbacks.add(e),function(){t.onInitCallbacks.delete(e)}},e.prototype.invokeOnInitCallbacks=function(e,t){var n,r;try{for(var i=l(this.onInitCallbacks),o=i.next();!o.done;o=i.next()){var a=o.value;try{a(e,t)}catch(e){}}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype.getOrInitializeService=function(e){var t,n=e.instanceIdentifier,r=e.options,i=void 0===r?{}:r,o=this.instances.get(n);if(!o&&this.component&&(o=this.component.instanceFactory(this.container,{instanceIdentifier:(t=n,t===h?void 0:t),options:i}),this.instances.set(n,o),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,n,o)}catch(e){}return o||null},e.prototype.normalizeInstanceIdentifier=function(e){return this.component?this.component.multipleInstances?e:h:e},e.prototype.shouldAutoInitialize=function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode},e}();!function(){function e(e){this.name=e,this.providers=new Map}e.prototype.addComponent=function(e){var t=this.getProvider(e.name);if(t.isComponentSet())throw new Error("Component "+e.name+" has already been registered with "+this.name);t.setComponent(e)},e.prototype.addOrOverwriteComponent=function(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)},e.prototype.getProvider=function(e){if(this.providers.has(e))return this.providers.get(e);var t=new f(e,this);return this.providers.set(e,t),t},e.prototype.getProviders=function(){return Array.from(this.providers.values())}}();const p=function(){return{"admin-restricted-operation":"This operation is restricted to administrators only.","argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","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.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-change-needs-verification":"Multi-factor users must always have a verified email.","email-already-in-use":"The email address is already in use by another account.","emulator-config-failed":'Auth instance has already been used to make a network call. Auth can no longer be configured to use the emulator. Try calling "useAuthEmulator()" sooner.',"expired-action-code":"The action code has expired.","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal AuthError has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registed for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal AuthError has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-dynamic-link-domain":"The provided dynamic link domain is not configured or authorized for the current project.","invalid-email":"The email address is badly formatted.","invalid-emulator-scheme":"Emulator URL must start with a valid scheme (http:// or https://).","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is malformed or has expired.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-multi-factor-session":"The request does not contain a valid proof of first factor successful sign-in.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invalid-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-provider-id":"The specified provider ID is invalid.","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","invalid-tenant-id":"The Auth instance's tenant ID is invalid.","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal AuthError has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-or-invalid-nonce":"The request does not contain a valid nonce. This can occur if the SHA-256 hash of the provided raw nonce does not match the hashed nonce in the ID token payload.","missing-multi-factor-info":"No second factor identifier is provided.","missing-multi-factor-session":"The request is missing proof of first factor successful sign-in.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","multi-factor-info-not-found":"The user does not have a second factor matching the identifier provided.","multi-factor-auth-required":"Proof of ownership of a second factor is required to complete sign-in.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network AuthError (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal AuthError has occurred.","no-such-provider":"User was not linked to an account with the given provider.","null-user":"A null user object was provided as the argument for an operation which requires a non-null user object.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',"popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.","rejected-credential":"The request contains malformed or mismatching credentials.","second-factor-already-in-use":"The second factor is already enrolled on this account.","maximum-second-factor-count-exceeded":"The maximum allowed number of second factors on a user has been exceeded.","tenant-id-mismatch":"The provided tenant ID does not match the Auth instance's tenant ID",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted. Please whitelist the domain in the Firebase console.","unsupported-first-factor":"Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","unsupported-tenant-operation":"This operation is not supported in a multi-tenant context.","unverified-email":"The operation requires a verified email.","user-cancelled":"The user did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled.","already-initialized":"Auth can only be initialized once per app."}},m=function(){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."}},g=new i.LL("auth","Firebase",{"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."}),v=new o.Yd("@firebase/auth-exp");function y(e,...t){v.logLevel<=o.in.ERROR&&v.error(`Auth (${r.Jn}): ${e}`,...t)}function b(e,...t){throw E(e,...t)}function w(e,...t){return E(e,...t)}function E(e,...t){if("string"!=typeof e){const n=t[0],r=[...t.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(n,...r)}return g.create(e,...t)}function _(e,t,...n){if(!e)throw E(t,...n)}function C(e){const t="INTERNAL ASSERTION FAILED: "+e;throw y(t),new Error(t)}function S(e,t){e||C(t)}const x=new Map;function T(e){S(e instanceof Function,"Expected a class definition");let t=x.get(e);return t?(S(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,x.set(e,t),t)}function I(e,t){const n=(0,r.qX)(e,"auth-exp");return n.isInitialized()&&b(n.getImmediate(),"already-initialized"),n.initialize({options:t})}function k(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function O(){return"http:"===P()||"https:"===P()}function P(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}class N{constructor(e,t){this.shortDelay=e,this.longDelay=t,S(t>e,"Short delay should be less than long delay!"),this.isMobile=(0,i.uI)()||(0,i.b$)()}get(){return"undefined"!=typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&(O()||(0,i.ru)()||"connection"in navigator)&&!navigator.onLine?Math.min(5e3,this.shortDelay):this.isMobile?this.longDelay:this.shortDelay}}function A(e,t){S(e.emulator,"Emulator should always be set here");const{url:n}=e.emulator;return t?`${n}${t.startsWith("/")?t.slice(1):t}`:n}class D{static initialize(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}static fetch(){return this.fetchImpl?this.fetchImpl:"undefined"!=typeof self&&"fetch"in self?self.fetch:void C("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"undefined"!=typeof self&&"Headers"in self?self.Headers:void C("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"undefined"!=typeof self&&"Response"in self?self.Response:void C("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}const R={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"},M=new N(3e4,6e4);function L(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function j(e,t,n,r,o={}){return F(e,o,(()=>{let o={},a={};r&&("GET"===t?a=r:o={body:JSON.stringify(r)});const s=(0,i.xO)(Object.assign({key:e.config.apiKey},a)).slice(1),l=new(D.headers());return l.set("Content-Type","application/json"),l.set("X-Client-Version",e._getSdkClientVersion()),e.languageCode&&l.set("X-Firebase-Locale",e.languageCode),D.fetch()(B(e,e.config.apiHost,n,s),Object.assign({method:t,headers:l,referrerPolicy:"no-referrer"},o))}))}async function F(e,t,n){e._canInitEmulator=!1;const r=Object.assign(Object.assign({},R),t);try{const t=new z(e),i=await Promise.race([n(),t.promise]);t.clearNetworkTimeout();const o=await i.json();if("needConfirmation"in o)throw U(e,"account-exists-with-different-credential",o);if(i.ok&&!("errorMessage"in o))return o;{const t=(i.ok?o.errorMessage:o.error.message).split(" : ")[0];if("FEDERATED_USER_ID_ALREADY_LINKED"===t)throw U(e,"credential-already-in-use",o);if("EMAIL_EXISTS"===t)throw U(e,"email-already-in-use",o);b(e,r[t]||t.toLowerCase().replace(/[_\s]+/g,"-"))}}catch(t){if(t instanceof i.ZR)throw t;b(e,"network-request-failed")}}async function W(e,t,n,r,i={}){const o=await j(e,t,n,r,i);return"mfaPendingCredential"in o&&b(e,"multi-factor-auth-required",{serverResponse:o}),o}function B(e,t,n,r){const i=`${t}${n}?${r}`;return e.config.emulator?A(e.config,i):`${e.config.apiScheme}://${i}`}class z{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise(((e,t)=>{this.timer=setTimeout((()=>t(w(this.auth,"timeout"))),M.get())}))}clearNetworkTimeout(){clearTimeout(this.timer)}}function U(e,t,n){const r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=w(e,t,r);return i.customData._tokenResponse=n,i}function V(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(e){}}function Z(e,t=!1){return(0,i.m9)(e).getIdToken(t)}async function $(e,t=!1){const n=(0,i.m9)(e),r=await n.getIdToken(t),o=H(r);_(o&&o.exp&&o.auth_time&&o.iat,n.auth,"internal-error");const a="object"==typeof o.firebase?o.firebase:void 0,s=null==a?void 0:a.sign_in_provider;return{claims:o,token:r,authTime:V(q(o.auth_time)),issuedAtTime:V(q(o.iat)),expirationTime:V(q(o.exp)),signInProvider:s||null,signInSecondFactor:(null==a?void 0:a.sign_in_second_factor)||null}}function q(e){return 1e3*Number(e)}function H(e){const[t,n,r]=e.split(".");if(void 0===t||void 0===n||void 0===r)return y("JWT malformed, contained fewer than 3 sections"),null;try{const e=(0,i.tV)(n);return e?JSON.parse(e):(y("Failed to decode base64 JWT payload"),null)}catch(e){return y("Caught error parsing JWT payload as JSON",e),null}}async function K(e,t,n=!1){if(n)return t;try{return await t}catch(t){throw t instanceof i.ZR&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}(t)&&e.auth.currentUser===e&&await e.auth.signOut(),t}}class G{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,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){var t;if(e){const e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}{this.errorBackoff=3e4;const e=(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5;return Math.max(0,e)}}schedule(e=!1){if(!this.isRunning)return;const t=this.getInterval(e);this.timerId=setTimeout((async()=>{await this.iteration()}),t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){return void("auth/network-request-failed"===e.code&&this.schedule(!0))}this.schedule()}}class Q{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=V(this.lastLoginAt),this.creationTime=V(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function Y(e){var t;const n=e.auth,r=await e.getIdToken(),i=await K(e,async function(e,t){return j(e,"POST","/v1/accounts:lookup",t)}(n,{idToken:r}));_(null==i?void 0:i.users.length,n,"internal-error");const o=i.users[0];e._notifyReloadListener(o);const a=(null===(t=o.providerUserInfo)||void 0===t?void 0:t.length)?o.providerUserInfo.map((e=>{var{providerId:t}=e,n=s(e,["providerId"]);return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}})):[],l=(u=e.providerData,c=a,[...u.filter((e=>!c.some((t=>t.providerId===e.providerId)))),...c]);var u,c;const d=e.isAnonymous,h=!(e.email&&o.passwordHash||(null==l?void 0:l.length)),f=!!d&&h,p={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 Q(o.createdAt,o.lastLoginAt),isAnonymous:f};Object.assign(e,p)}async function X(e){const t=(0,i.m9)(e);await Y(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}class J{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){_(e.idToken,"internal-error"),_(void 0!==e.idToken,"internal-error"),_(void 0!==e.refreshToken,"internal-error");const t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):function(e){const t=H(e);return _(t,"internal-error"),_(void 0!==t.exp,"internal-error"),_(void 0!==t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}async getToken(e,t=!1){return _(!this.accessToken||this.refreshToken,e,"user-token-expired"),t||!this.accessToken||this.isExpired?this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null:this.accessToken}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){const{accessToken:n,refreshToken:r,expiresIn:o}=await async function(e,t){const n=await F(e,{},(()=>{const n=(0,i.xO)({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:o}=e.config,a=B(e,r,"/v1/token",`key=${o}`);return D.fetch()(a,{method:"POST",headers:{"X-Client-Version":e._getSdkClientVersion(),"Content-Type":"application/x-www-form-urlencoded"},body:n})}));return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}(e,t);this.updateTokensAndExpiration(n,r,Number(o))}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}static fromJSON(e,t){const{refreshToken:n,accessToken:r,expirationTime:i}=t,o=new J;return n&&(_("string"==typeof n,"internal-error",{appName:e}),o.refreshToken=n),r&&(_("string"==typeof r,"internal-error",{appName:e}),o.accessToken=r),i&&(_("number"==typeof i,"internal-error",{appName:e}),o.expirationTime=i),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new J,this.toJSON())}_performRefresh(){return C("not implemented")}}function ee(e,t){_("string"==typeof e||void 0===e,"internal-error",{appName:t})}class te{constructor(e){var{uid:t,auth:n,stsTokenManager:r}=e,i=s(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.emailVerified=!1,this.isAnonymous=!1,this.tenantId=null,this.providerData=[],this.proactiveRefresh=new G(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.metadata=new Q(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){const t=await K(this,this.stsTokenManager.getToken(this.auth,e));return _(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return $(this,e)}reload(){return X(this)}_assign(e){this!==e&&(_(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map((e=>Object.assign({},e))),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){return new te(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}))}_onReload(e){_(!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,t=!1){let n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),t&&await Y(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){const e=await this.getIdToken();return await K(this,async function(e,t){return j(e,"POST","/v1/accounts:delete",t)}(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,t){var n,r,i,o,a,s,l,u;const c=null!==(n=t.displayName)&&void 0!==n?n:void 0,d=null!==(r=t.email)&&void 0!==r?r:void 0,h=null!==(i=t.phoneNumber)&&void 0!==i?i:void 0,f=null!==(o=t.photoURL)&&void 0!==o?o:void 0,p=null!==(a=t.tenantId)&&void 0!==a?a:void 0,m=null!==(s=t._redirectEventId)&&void 0!==s?s:void 0,g=null!==(l=t.createdAt)&&void 0!==l?l:void 0,v=null!==(u=t.lastLoginAt)&&void 0!==u?u:void 0,{uid:y,emailVerified:b,isAnonymous:w,providerData:E,stsTokenManager:C}=t;_(y&&C,e,"internal-error");const S=J.fromJSON(this.name,C);_("string"==typeof y,e,"internal-error"),ee(c,e.name),ee(d,e.name),_("boolean"==typeof b,e,"internal-error"),_("boolean"==typeof w,e,"internal-error"),ee(h,e.name),ee(f,e.name),ee(p,e.name),ee(m,e.name),ee(g,e.name),ee(v,e.name);const x=new te({uid:y,auth:e,email:d,emailVerified:b,displayName:c,isAnonymous:w,photoURL:f,phoneNumber:h,tenantId:p,stsTokenManager:S,createdAt:g,lastLoginAt:v});return E&&Array.isArray(E)&&(x.providerData=E.map((e=>Object.assign({},e)))),m&&(x._redirectEventId=m),x}static async _fromIdTokenResponse(e,t,n=!1){const r=new J;r.updateFromServerResponse(t);const i=new te({uid:t.localId,auth:e,stsTokenManager:r,isAnonymous:n});return await Y(i),i}}class ne{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){const t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}ne.type="NONE";const re=ne;function ie(e,t,n){return`firebase:${e}:${t}:${n}`}class oe{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;const{config:r,name:i}=this.auth;this.fullUserKey=ie(this.userKey,r.apiKey,i),this.fullPersistenceKey=ie("persistence",r.apiKey,i),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);return e?te._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 t=await this.getCurrentUser();return await this.removeCurrentUser(),this.persistence=e,t?this.setCurrentUser(t):void 0}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,n="authUser"){if(!t.length)return new oe(T(re),e,n);let r=T(re);for(const e of t)if(await e._isAvailable()){r=e;break}let i=null;const o=ie(n,e.config.apiKey,e.name);for(const n of t)try{const t=await n._get(o);if(t){const o=te._fromJSON(e,t);n!==r&&(i=o);break}}catch(e){}return i&&await r._set(o,i.toJSON()),await Promise.all(t.map((async e=>{if(e!==r)try{await e._remove(o)}catch(e){}}))),new oe(r,e,n)}}function ae(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(ce(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(se(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(he(t))return"Blackberry";if(fe(t))return"Webos";if(le(t))return"Safari";if((t.includes("chrome/")||ue(t))&&!t.includes("edge/"))return"Chrome";if(de(t))return"Android";{const t=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,n=e.match(t);if(2===(null==n?void 0:n.length))return n[1]}return"Other"}function se(e=(0,i.z$)()){return/firefox\//i.test(e)}function le(e=(0,i.z$)()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function ue(e=(0,i.z$)()){return/crios\//i.test(e)}function ce(e=(0,i.z$)()){return/iemobile/i.test(e)}function de(e=(0,i.z$)()){return/android/i.test(e)}function he(e=(0,i.z$)()){return/blackberry/i.test(e)}function fe(e=(0,i.z$)()){return/webos/i.test(e)}function pe(e=(0,i.z$)()){return/iphone|ipad|ipod/i.test(e)}function me(e=(0,i.z$)()){return pe(e)||de(e)||fe(e)||he(e)||/windows phone/i.test(e)||ce(e)}function ge(e,t=[]){let n;switch(e){case"Browser":n=ae((0,i.z$)());break;case"Worker":n=`${ae((0,i.z$)())}-${e}`;break;default:n=e}const o=t.length?t.join(","):"FirebaseCore-web";return`${n}/JsCore/${r.Jn}/${o}`}class ve{constructor(e,t){this.app=e,this.config=t,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new be(this),this.idTokenSubscription=new be(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.redirectInitializerError=null,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=g,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=t.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=T(t)),this._initializationPromise=this.queue((async()=>{var n;this._deleted||(this.persistenceManager=await oe.create(this,e),this._deleted||((null===(n=this._popupRedirectResolver)||void 0===n?void 0:n._shouldInitProactively)&&await this._popupRedirectResolver._initialize(this),await this.initializeCurrentUser(t),this._deleted||(this._isInitialized=!0)))})),this._initializationPromise.then((()=>{if(this.redirectInitializerError)throw this.redirectInitializerError}))}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();return this.currentUser||e?this.currentUser&&e&&this.currentUser.uid===e.uid?(this._currentUser._assign(e),void await this.currentUser.getIdToken()):void await this._updateCurrentUser(e):void 0}async initializeCurrentUser(e){var t;let n=await this.assertedPersistence.getCurrentUser();if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const r=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,i=null==n?void 0:n._redirectEventId,o=await this.tryRedirectSignIn(e);r&&r!==i||!(null==o?void 0:o.user)||(n=o.user)}return n?n._redirectEventId?(_(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===n._redirectEventId?this.directlySetCurrentUser(n):this.reloadAndSetCurrentUserOrClear(n)):this.reloadAndSetCurrentUserOrClear(n):this.directlySetCurrentUser(null)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(e){this.redirectInitializerError=e,await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await Y(e)}catch(e){if("auth/network-request-failed"!==e.code)return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"==typeof navigator)return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}async updateCurrentUser(e){const t=e?(0,i.m9)(e):null;return t&&_(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e){if(!this._deleted)return e&&_(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),this.queue((async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()}))}async signOut(){return(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null)}setPersistence(e){return this.queue((async()=>{await this.assertedPersistence.setPersistence(T(e))}))}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new i.LL("auth","Firebase",e())}onAuthStateChanged(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}onIdTokenChanged(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.toJSON()}}async _setRedirectUser(e,t){const n=await this.getOrInitRedirectPersistenceManager(t);return null===e?n.removeCurrentUser():n.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const t=e&&T(e)||this._popupRedirectResolver;_(t,this,"argument-error"),this.redirectPersistenceManager=await oe.create(this,[T(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,n;return this._isInitialized&&await this.queue((async()=>{})),(null===(t=this._currentUser)||void 0===t?void 0:t._redirectEventId)===e?this._currentUser:(null===(n=this.redirectUser)||void 0===n?void 0:n._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,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const n=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,n,r){if(this._deleted)return()=>{};const i="function"==typeof t?t:t.next,o=this._isInitialized?Promise.resolve():this._initializationPromise;return _(o,this,"internal-error"),o.then((()=>i(this.currentUser))),"function"==typeof t?e.addObserver(t,n,r):e.addObserver(t)}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 _(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){e&&!this.frameworks.includes(e)&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=ge(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getSdkClientVersion(){return this.clientVersion}}function ye(e){return(0,i.m9)(e)}class be{constructor(e){this.auth=e,this.observer=null,this.addObserver=(0,i.ne)((e=>this.observer=e))}get next(){return _(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}function we(e,t,n){const r=ye(e);_(r._canInitEmulator,r,"emulator-config-failed"),_(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");const i=!!(null==n?void 0:n.disableWarnings),o=Ee(t),{host:a,port:s}=function(e){const t=Ee(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){const e=i[1];return{host:e,port:_e(r.substr(e.length+1))}}{const[e,t]=r.split(":");return{host:e,port:_e(t)}}}(t),l=null===s?"":`:${s}`;r.config.emulator={url:`${o}//${a}${l}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:a,port:s,protocol:o.replace(":",""),options:Object.freeze({disableWarnings:i})}),function(e){function t(){const e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!=typeof console&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),"undefined"==typeof window||"undefined"==typeof document||e||("loading"===document.readyState?window.addEventListener("DOMContentLoaded",t):t())}(i)}function Ee(e){const t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function _e(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}class Ce{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return C("not implemented")}_getIdTokenResponse(e){return C("not implemented")}_linkToIdToken(e,t){return C("not implemented")}_getReauthenticationResolver(e){return C("not implemented")}}async function Se(e,t){return j(e,"POST","/v1/accounts:resetPassword",L(e,t))}async function xe(e,t){return j(e,"POST","/v1/accounts:update",t)}async function Te(e,t){return j(e,"POST","/v1/accounts:sendOobCode",L(e,t))}class Ie extends Ce{constructor(e,t,n,r=null){super("password",n),this._email=e,this._password=t,this._tenantId=r}static _fromEmailAndPassword(e,t){return new Ie(e,t,"password")}static _fromEmailAndCode(e,t,n=null){return new Ie(e,t,"emailLink",n)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){const t="string"==typeof e?JSON.parse(e):e;if((null==t?void 0:t.email)&&(null==t?void 0:t.password)){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":return async function(e,t){return W(e,"POST","/v1/accounts:signInWithPassword",L(e,t))}(e,{returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return async function(e,t){return W(e,"POST","/v1/accounts:signInWithEmailLink",L(e,t))}(e,{email:this._email,oobCode:this._password});default:b(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return xe(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return async function(e,t){return W(e,"POST","/v1/accounts:signInWithEmailLink",L(e,t))}(e,{idToken:t,email:this._email,oobCode:this._password});default:b(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}async function ke(e,t){return W(e,"POST","/v1/accounts:signInWithIdp",L(e,t))}class Oe extends Ce{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const t=new Oe(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):b("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const t="string"==typeof e?JSON.parse(e):e,{providerId:n,signInMethod:r}=t,i=s(t,["providerId","signInMethod"]);if(!n||!r)return null;const o=new Oe(n,r);return Object.assign(o,i),o}_getIdTokenResponse(e){return ke(e,this.buildRequest())}_linkToIdToken(e,t){const n=this.buildRequest();return n.idToken=t,ke(e,n)}_getReauthenticationResolver(e){const t=this.buildRequest();return t.autoCreate=!1,ke(e,t)}buildRequest(){const e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=(0,i.xO)(t)}return e}}const Pe={USER_NOT_FOUND:"user-not-found"};class Ne extends Ce{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new Ne({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new Ne({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return async function(e,t){return W(e,"POST","/v1/accounts:signInWithPhoneNumber",L(e,t))}(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return async function(e,t){const n=await W(e,"POST","/v1/accounts:signInWithPhoneNumber",L(e,t));if(n.temporaryProof)throw U(e,"account-exists-with-different-credential",n);return n}(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return async function(e,t){return W(e,"POST","/v1/accounts:signInWithPhoneNumber",L(e,Object.assign(Object.assign({},t),{operation:"REAUTH"})),Pe)}(e,this._makeVerificationRequest())}_makeVerificationRequest(){const{temporaryProof:e,phoneNumber:t,verificationId:n,verificationCode:r}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:n,code:r}}toJSON(){const e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}static fromJSON(e){"string"==typeof e&&(e=JSON.parse(e));const{verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}=e;return n||t||r||i?new Ne({verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}):null}}class Ae{constructor(e){var t,n,r,o,a,s;const l=(0,i.zd)((0,i.pd)(e)),u=null!==(t=l.apiKey)&&void 0!==t?t:null,c=null!==(n=l.oobCode)&&void 0!==n?n:null,d=function(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}(null!==(r=l.mode)&&void 0!==r?r:null);_(u&&c&&d,"argument-error"),this.apiKey=u,this.operation=d,this.code=c,this.continueUrl=null!==(o=l.continueUrl)&&void 0!==o?o:null,this.languageCode=null!==(a=l.languageCode)&&void 0!==a?a:null,this.tenantId=null!==(s=l.tenantId)&&void 0!==s?s:null}static parseLink(e){const t=function(e){const t=(0,i.zd)((0,i.pd)(e)).link,n=t?(0,i.zd)((0,i.pd)(t)).deep_link_id:null,r=(0,i.zd)((0,i.pd)(e)).deep_link_id;return(r?(0,i.zd)((0,i.pd)(r)).link:null)||r||n||t||e}(e);try{return new Ae(t)}catch(e){return null}}}function De(e){return Ae.parseLink(e)}class Re{constructor(){this.providerId=Re.PROVIDER_ID}static credential(e,t){return Ie._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){const n=Ae.parseLink(t);return _(n,"argument-error"),Ie._fromEmailAndCode(e,n.code,n.tenantId)}}Re.PROVIDER_ID="password",Re.EMAIL_PASSWORD_SIGN_IN_METHOD="password",Re.EMAIL_LINK_SIGN_IN_METHOD="emailLink";class Me{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}}class Le extends Me{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class je extends Le{static credentialFromJSON(e){const t="string"==typeof e?JSON.parse(e):e;return _("providerId"in t&&"signInMethod"in t,"argument-error"),Oe._fromParams(t)}credential(e){return this._credential(e)}_credential(e){return _(e.idToken||e.accessToken,"argument-error"),Oe._fromParams(Object.assign(Object.assign({},e),{providerId:this.providerId,signInMethod:this.providerId}))}static credentialFromResult(e){return je.oauthCredentialFromTaggedObject(e)}static credentialFromError(e){return je.oauthCredentialFromTaggedObject(e.customData||{})}static oauthCredentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:t,oauthAccessToken:n,oauthTokenSecret:r,pendingToken:i,nonce:o,providerId:a}=e;if(!(n||r||t||i))return null;if(!a)return null;try{return new je(a)._credential({idToken:t,accessToken:n,rawNonce:o,pendingToken:i})}catch(e){return null}}}class Fe extends Le{constructor(){super("facebook.com")}static credential(e){return Oe._fromParams({providerId:Fe.PROVIDER_ID,signInMethod:Fe.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Fe.credentialFromTaggedObject(e)}static credentialFromError(e){return Fe.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e))return null;if(!e.oauthAccessToken)return null;try{return Fe.credential(e.oauthAccessToken)}catch(e){return null}}}Fe.FACEBOOK_SIGN_IN_METHOD="facebook.com",Fe.PROVIDER_ID="facebook.com";class We extends Le{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return Oe._fromParams({providerId:We.PROVIDER_ID,signInMethod:We.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return We.credentialFromTaggedObject(e)}static credentialFromError(e){return We.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:t,oauthAccessToken:n}=e;if(!t&&!n)return null;try{return We.credential(t,n)}catch(e){return null}}}We.GOOGLE_SIGN_IN_METHOD="google.com",We.PROVIDER_ID="google.com";class Be extends Le{constructor(){super("github.com")}static credential(e){return Oe._fromParams({providerId:Be.PROVIDER_ID,signInMethod:Be.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Be.credentialFromTaggedObject(e)}static credentialFromError(e){return Be.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e))return null;if(!e.oauthAccessToken)return null;try{return Be.credential(e.oauthAccessToken)}catch(e){return null}}}Be.GITHUB_SIGN_IN_METHOD="github.com",Be.PROVIDER_ID="github.com";class ze extends Ce{constructor(e,t){super(e,e),this.pendingToken=t}_getIdTokenResponse(e){return ke(e,this.buildRequest())}_linkToIdToken(e,t){const n=this.buildRequest();return n.idToken=t,ke(e,n)}_getReauthenticationResolver(e){const t=this.buildRequest();return t.autoCreate=!1,ke(e,t)}toJSON(){return{signInMethod:this.signInMethod,providerId:this.providerId,pendingToken:this.pendingToken}}static fromJSON(e){const t="string"==typeof e?JSON.parse(e):e,{providerId:n,signInMethod:r,pendingToken:i}=t;return n&&r&&i&&n===r?new ze(n,i):null}static _create(e,t){return new ze(e,t)}buildRequest(){return{requestUri:"http://localhost",returnSecureToken:!0,pendingToken:this.pendingToken}}}class Ue extends Me{constructor(e){_(e.startsWith("saml."),"argument-error"),super(e)}static credentialFromResult(e){return Ue.samlCredentialFromTaggedObject(e)}static credentialFromError(e){return Ue.samlCredentialFromTaggedObject(e.customData||{})}static credentialFromJSON(e){const t=ze.fromJSON(e);return _(t,"argument-error"),t}static samlCredentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{pendingToken:t,providerId:n}=e;if(!t||!n)return null;try{return ze._create(n,t)}catch(e){return null}}}class Ve extends Le{constructor(){super("twitter.com")}static credential(e,t){return Oe._fromParams({providerId:Ve.PROVIDER_ID,signInMethod:Ve.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return Ve.credentialFromTaggedObject(e)}static credentialFromError(e){return Ve.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:t,oauthTokenSecret:n}=e;if(!t||!n)return null;try{return Ve.credential(t,n)}catch(e){return null}}}async function Ze(e,t){return W(e,"POST","/v1/accounts:signUp",L(e,t))}Ve.TWITTER_SIGN_IN_METHOD="twitter.com",Ve.PROVIDER_ID="twitter.com";class $e{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,n,r=!1){const i=await te._fromIdTokenResponse(e,n,r),o=qe(n);return new $e({user:i,providerId:o,_tokenResponse:n,operationType:t})}static async _forOperation(e,t,n){await e._updateTokensIfNecessary(n,!0);const r=qe(n);return new $e({user:e,providerId:r,_tokenResponse:n,operationType:t})}}function qe(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}async function He(e){var t;const n=ye(e);if(null===(t=n.currentUser)||void 0===t?void 0:t.isAnonymous)return new $e({user:n.currentUser,providerId:null,operationType:"signIn"});const r=await Ze(n,{returnSecureToken:!0}),i=await $e._fromIdTokenResponse(n,"signIn",r,!0);return await n._updateCurrentUser(i.user),i}class Ke extends i.ZR{constructor(e,t,n,r){var i;super(t.code,t.message),this.operationType=n,this.user=r,this.name="FirebaseError",Object.setPrototypeOf(this,Ke.prototype),this.appName=e.name,this.code=t.code,this.tenantId=null!==(i=e.tenantId)&&void 0!==i?i:void 0,this.serverResponse=t.customData.serverResponse}static _fromErrorAndOperation(e,t,n,r){return new Ke(e,t,n,r)}}function Ge(e,t,n,r){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch((n=>{if("auth/multi-factor-auth-required"===n.code)throw Ke._fromErrorAndOperation(e,n,t,r);throw n}))}function Qe(e){return new Set(e.map((({providerId:e})=>e)).filter((e=>!!e)))}async function Ye(e,t){const n=(0,i.m9)(e);await Je(!0,n,t);const{providerUserInfo:r}=await async function(e,t){return j(e,"POST","/v1/accounts:update",t)}(n.auth,{idToken:await n.getIdToken(),deleteProvider:[t]}),o=Qe(r||[]);return n.providerData=n.providerData.filter((e=>o.has(e.providerId))),o.has("phone")||(n.phoneNumber=null),await n.auth._persistUserIfCurrent(n),n}async function Xe(e,t,n=!1){const r=await K(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return $e._forOperation(e,"link",r)}async function Je(e,t,n){await Y(t);const r=!1===e?"provider-already-linked":"no-such-provider";_(Qe(t.providerData).has(n)===e,t.auth,r)}async function et(e,t,n=!1){const{auth:r}=e,i="reauthenticate";try{const o=await K(e,Ge(r,i,t,e),n);_(o.idToken,r,"internal-error");const a=H(o.idToken);_(a,r,"internal-error");const{sub:s}=a;return _(e.uid===s,r,"user-mismatch"),$e._forOperation(e,i,o)}catch(e){throw"auth/user-not-found"===(null==e?void 0:e.code)&&b(r,"user-mismatch"),e}}async function tt(e,t,n=!1){const r="signIn",i=await Ge(e,r,t),o=await $e._fromIdTokenResponse(e,r,i);return n||await e._updateCurrentUser(o.user),o}async function nt(e,t){return tt(ye(e),t)}async function rt(e,t){const n=(0,i.m9)(e);return await Je(!1,n,t.providerId),Xe(n,t)}async function it(e,t){return et((0,i.m9)(e),t)}async function ot(e,t){const n=ye(e),r=await async function(e,t){return W(e,"POST","/v1/accounts:signInWithCustomToken",L(e,t))}(n,{token:t,returnSecureToken:!0}),i=await $e._fromIdTokenResponse(n,"signIn",r);return await n._updateCurrentUser(i.user),i}class at{constructor(e,t){this.factorId=e,this.uid=t.mfaEnrollmentId,this.enrollmentTime=new Date(t.enrolledAt).toUTCString(),this.displayName=t.displayName}static _fromServerResponse(e,t){return"phoneInfo"in t?st._fromServerResponse(e,t):b(e,"internal-error")}}class st extends at{constructor(e){super("phone",e),this.phoneNumber=e.phoneInfo}static _fromServerResponse(e,t){return new st(t)}}function lt(e,t,n){var r;_((null===(r=n.url)||void 0===r?void 0:r.length)>0,e,"invalid-continue-uri"),_(void 0===n.dynamicLinkDomain||n.dynamicLinkDomain.length>0,e,"invalid-dynamic-link-domain"),t.continueUrl=n.url,t.dynamicLinkDomain=n.dynamicLinkDomain,t.canHandleCodeInApp=n.handleCodeInApp,n.iOS&&(_(n.iOS.bundleId.length>0,e,"missing-ios-bundle-id"),t.iosBundleId=n.iOS.bundleId),n.android&&(_(n.android.packageName.length>0,e,"missing-android-pkg-name"),t.androidInstallApp=n.android.installApp,t.androidMinimumVersionCode=n.android.minimumVersion,t.androidPackageName=n.android.packageName)}async function ut(e,t,n){const r=(0,i.m9)(e),o={requestType:"PASSWORD_RESET",email:t};n&<(r,o,n),await async function(e,t){return Te(e,t)}(r,o)}async function ct(e,t,n){await Se((0,i.m9)(e),{oobCode:t,newPassword:n})}async function dt(e,t){await async function(e,t){return j(e,"POST","/v1/accounts:update",L(e,t))}((0,i.m9)(e),{oobCode:t})}async function ht(e,t){const n=(0,i.m9)(e),r=await Se(n,{oobCode:t}),o=r.requestType;switch(_(o,n,"internal-error"),o){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":_(r.newEmail,n,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":_(r.mfaInfo,n,"internal-error");default:_(r.email,n,"internal-error")}let a=null;return r.mfaInfo&&(a=at._fromServerResponse(ye(n),r.mfaInfo)),{data:{email:("VERIFY_AND_CHANGE_EMAIL"===r.requestType?r.newEmail:r.email)||null,previousEmail:("VERIFY_AND_CHANGE_EMAIL"===r.requestType?r.email:r.newEmail)||null,multiFactorInfo:a},operation:o}}async function ft(e,t){const{data:n}=await ht((0,i.m9)(e),t);return n.email}async function pt(e,t,n){const r=ye(e),i=await Ze(r,{returnSecureToken:!0,email:t,password:n}),o=await $e._fromIdTokenResponse(r,"signIn",i);return await r._updateCurrentUser(o.user),o}function mt(e,t,n){return nt((0,i.m9)(e),Re.credential(t,n))}async function gt(e,t,n){const r=(0,i.m9)(e),o={requestType:"EMAIL_SIGNIN",email:t};_(n.handleCodeInApp,r,"argument-error"),n&<(r,o,n),await async function(e,t){return Te(e,t)}(r,o)}function vt(e,t){const n=Ae.parseLink(t);return"EMAIL_SIGNIN"===(null==n?void 0:n.operation)}async function yt(e,t,n){const r=(0,i.m9)(e),o=Re.credentialWithLink(t,n||k());return _(o._tenantId===(r.tenantId||null),r,"tenant-id-mismatch"),nt(r,o)}async function bt(e,t){const n={identifier:t,continueUri:O()?k():"http://localhost"},{signinMethods:r}=await async function(e,t){return j(e,"POST","/v1/accounts:createAuthUri",L(e,t))}((0,i.m9)(e),n);return r||[]}async function wt(e,t){const n=(0,i.m9)(e),r={requestType:"VERIFY_EMAIL",idToken:await e.getIdToken()};t&<(n.auth,r,t);const{email:o}=await async function(e,t){return Te(e,t)}(n.auth,r);o!==e.email&&await e.reload()}async function Et(e,t,n){const r=(0,i.m9)(e),o={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:await e.getIdToken(),newEmail:t};n&<(r.auth,o,n);const{email:a}=await async function(e,t){return Te(e,t)}(r.auth,o);a!==e.email&&await e.reload()}async function _t(e,{displayName:t,photoURL:n}){if(void 0===t&&void 0===n)return;const r=(0,i.m9)(e),o={idToken:await r.getIdToken(),displayName:t,photoUrl:n,returnSecureToken:!0},a=await K(r,async function(e,t){return j(e,"POST","/v1/accounts:update",t)}(r.auth,o));r.displayName=a.displayName||null,r.photoURL=a.photoUrl||null;const s=r.providerData.find((({providerId:e})=>"password"===e));s&&(s.displayName=r.displayName,s.photoURL=r.photoURL),await r._updateTokensIfNecessary(a)}function Ct(e,t){return xt((0,i.m9)(e),t,null)}function St(e,t){return xt((0,i.m9)(e),null,t)}async function xt(e,t,n){const{auth:r}=e,i={idToken:await e.getIdToken(),returnSecureToken:!0};t&&(i.email=t),n&&(i.password=n);const o=await K(e,xe(r,i));await e._updateTokensIfNecessary(o,!0)}class Tt{constructor(e,t,n={}){this.isNewUser=e,this.providerId=t,this.profile=n}}class It extends Tt{constructor(e,t,n,r){super(e,t,n),this.username=r}}class kt extends Tt{constructor(e,t){super(e,"facebook.com",t)}}class Ot extends It{constructor(e,t){super(e,"github.com",t,"string"==typeof(null==t?void 0:t.login)?null==t?void 0:t.login:null)}}class Pt extends Tt{constructor(e,t){super(e,"google.com",t)}}class Nt extends It{constructor(e,t,n){super(e,"twitter.com",t,n)}}function At(e){const{user:t,_tokenResponse:n}=e;return t.isAnonymous&&!n?{providerId:null,isNewUser:!1,profile:null}:function(e){var t,n;if(!e)return null;const{providerId:r}=e,i=e.rawUserInfo?JSON.parse(e.rawUserInfo):{},o=e.isNewUser||"identitytoolkit#SignupNewUserResponse"===e.kind;if(!r&&(null==e?void 0:e.idToken)){const r=null===(n=null===(t=H(e.idToken))||void 0===t?void 0:t.firebase)||void 0===n?void 0:n.sign_in_provider;if(r)return new Tt(o,"anonymous"!==r&&"custom"!==r?r:null)}if(!r)return null;switch(r){case"facebook.com":return new kt(o,i);case"github.com":return new Ot(o,i);case"google.com":return new Pt(o,i);case"twitter.com":return new Nt(o,i,e.screenName||null);case"custom":case"anonymous":return new Tt(o,null);default:return new Tt(o,r,i)}}(n)}function Dt(e,t){return(0,i.m9)(e).setPersistence(t)}function Rt(e,t,n,r){return(0,i.m9)(e).onIdTokenChanged(t,n,r)}function Mt(e,t,n,r){return(0,i.m9)(e).onAuthStateChanged(t,n,r)}function Lt(e){(0,i.m9)(e).useDeviceLanguage()}function jt(e,t){return(0,i.m9)(e).updateCurrentUser(t)}function Ft(e){return(0,i.m9)(e).signOut()}async function Wt(e){return(0,i.m9)(e).delete()}class Bt{constructor(e,t){this.type=e,this.credential=t}static _fromIdtoken(e){return new Bt("enroll",e)}static _fromMfaPendingCredential(e){return new Bt("signin",e)}toJSON(){return{multiFactorSession:{["enroll"===this.type?"idToken":"pendingCredential"]:this.credential}}}static fromJSON(e){var t,n;if(null==e?void 0:e.multiFactorSession){if(null===(t=e.multiFactorSession)||void 0===t?void 0:t.pendingCredential)return Bt._fromMfaPendingCredential(e.multiFactorSession.pendingCredential);if(null===(n=e.multiFactorSession)||void 0===n?void 0:n.idToken)return Bt._fromIdtoken(e.multiFactorSession.idToken)}return null}}class zt{constructor(e,t,n){this.session=e,this.hints=t,this.signInResolver=n}static _fromError(e,t){const n=ye(e),r=(t.serverResponse.mfaInfo||[]).map((e=>at._fromServerResponse(n,e)));_(t.serverResponse.mfaPendingCredential,n,"internal-error");const i=Bt._fromMfaPendingCredential(t.serverResponse.mfaPendingCredential);return new zt(i,r,(async e=>{const r=await e._process(n,i);delete t.serverResponse.mfaInfo,delete t.serverResponse.mfaPendingCredential;const o=Object.assign(Object.assign({},t.serverResponse),{idToken:r.idToken,refreshToken:r.refreshToken});switch(t.operationType){case"signIn":const e=await $e._fromIdTokenResponse(n,t.operationType,o);return await n._updateCurrentUser(e.user),e;case"reauthenticate":return _(t.user,n,"internal-error"),$e._forOperation(t.user,t.operationType,o);default:b(n,"internal-error")}}))}async resolveSignIn(e){const t=e;return this.signInResolver(t)}}function Ut(e,t){var n;const r=(0,i.m9)(e),o=t;return _(t.operationType,r,"argument-error"),_(null===(n=o.serverResponse)||void 0===n?void 0:n.mfaPendingCredential,r,"argument-error"),zt._fromError(r,o)}class Vt{constructor(e){this.user=e,this.enrolledFactors=[],e._onReload((t=>{t.mfaInfo&&(this.enrolledFactors=t.mfaInfo.map((t=>at._fromServerResponse(e.auth,t))))}))}static _fromUser(e){return new Vt(e)}async getSession(){return Bt._fromIdtoken(await this.user.getIdToken())}async enroll(e,t){const n=e,r=await this.getSession(),i=await K(this.user,n._process(this.user.auth,r,t));return await this.user._updateTokensIfNecessary(i),this.user.reload()}async unenroll(e){const t="string"==typeof e?e:e.uid,n=await this.user.getIdToken(),r=await K(this.user,(i=this.user.auth,o={idToken:n,mfaEnrollmentId:t},j(i,"POST","/v2/accounts/mfaEnrollment:withdraw",Object.assign({tenantId:i.tenantId},o))));var i,o;this.enrolledFactors=this.enrolledFactors.filter((({uid:e})=>e!==t)),await this.user._updateTokensIfNecessary(r);try{await this.user.reload()}catch(e){if("auth/user-token-expired"!==e.code)throw e}}}const Zt=new WeakMap;function $t(e){const t=(0,i.m9)(e);return Zt.has(t)||Zt.set(t,Vt._fromUser(t)),Zt.get(t)}class qt{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?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 t=this.auth.onIdTokenChanged((t=>{var n;e((null===(n=t)||void 0===n?void 0:n.stsTokenManager.accessToken)||null)}));this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){_(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}const Ht="__sak";class Kt{constructor(e,t){this.storage=e,this.type=t}_isAvailable(){try{return this.storage?(this.storage.setItem(Ht,"1"),this.storage.removeItem(Ht),Promise.resolve(!0)):Promise.resolve(!1)}catch(e){return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){const t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}}class Gt extends Kt{constructor(){super(window.localStorage,"LOCAL"),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=function(){const e=(0,i.z$)();return le(e)||pe(e)}()&&function(){try{return!(!window||window===window.top)}catch(e){return!1}}(),this.fallbackToPolling=me(),this.boundEventHandler=this.onStorageEvent.bind(this)}forAllChangedKeys(e){for(const t of Object.keys(this.listeners)){const n=this.storage.getItem(t),r=this.localCache[t];n!==r&&e(t,r,n)}}onStorageEvent(e,t=!1){if(!e.key)return void this.forAllChangedKeys(((e,t,n)=>{this.notifyListeners(e,n)}));const n=e.key;if(t?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const r=this.storage.getItem(n);if(e.newValue!==r)null!==e.newValue?this.storage.setItem(n,e.newValue):this.storage.removeItem(n);else if(this.localCache[n]===e.newValue&&!t)return}const r=()=>{const e=this.storage.getItem(n);(t||this.localCache[n]!==e)&&this.notifyListeners(n,e)},o=this.storage.getItem(n);(0,i.w1)()&&10===document.documentMode&&o!==e.newValue&&e.newValue!==e.oldValue?setTimeout(r,10):r()}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const e of Array.from(n))e(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval((()=>{this.forAllChangedKeys(((e,t,n)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:n}),!0)}))}),1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){const t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}Gt.type="LOCAL";const Qt=Gt;class Yt{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const t=this.receivers.find((t=>t.isListeningto(e)));if(t)return t;const n=new Yt(e);return this.receivers.push(n),n}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const t=e,{eventId:n,eventType:r,data:i}=t.data,o=this.handlersMap[r];if(!(null==o?void 0:o.size))return;t.ports[0].postMessage({status:"ack",eventId:n,eventType:r});const a=Array.from(o).map((async e=>e(t.origin,i))),s=await function(e){return Promise.all(e.map((async e=>{try{return{fulfilled:!0,value:await e}}catch(e){return{fulfilled:!1,reason:e}}})))}(a);t.ports[0].postMessage({status:"done",eventId:n,eventType:r,response:s})}_subscribe(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}Yt.receivers=[];class Xt{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,t,n=50){const r="undefined"!=typeof MessageChannel?new MessageChannel:null;if(!r)throw new Error("connection_unavailable");let i,o;return new Promise(((a,s)=>{const l=function(e="",t=20){return`${e}${Math.floor(Math.random()*Math.pow(10,t))}`}();r.port1.start();const u=setTimeout((()=>{s(new Error("unsupported_event"))}),n);o={messageChannel:r,onMessage(e){const t=e;if(t.data.eventId===l)switch(t.data.status){case"ack":clearTimeout(u),i=setTimeout((()=>{s(new Error("timeout"))}),3e3);break;case"done":clearTimeout(i),a(t.data.response);break;default:clearTimeout(u),clearTimeout(i),s(new Error("invalid_response"))}}},this.handlers.add(o),r.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:l,data:t},[r.port2])})).finally((()=>{o&&this.removeMessageHandler(o)}))}}function Jt(){return window}function en(){return void 0!==Jt().WorkerGlobalScope&&"function"==typeof Jt().importScripts}const tn="firebaseLocalStorageDb",nn="firebaseLocalStorage",rn="fbase_key";class on{constructor(e){this.request=e}toPromise(){return new Promise(((e,t)=>{this.request.addEventListener("success",(()=>{e(this.request.result)})),this.request.addEventListener("error",(()=>{t(this.request.error)}))}))}}function an(e,t){return e.transaction([nn],t?"readwrite":"readonly").objectStore(nn)}function sn(){const e=indexedDB.open(tn,1);return new Promise(((t,n)=>{e.addEventListener("error",(()=>{n(e.error)})),e.addEventListener("upgradeneeded",(()=>{const t=e.result;try{t.createObjectStore(nn,{keyPath:rn})}catch(e){n(e)}})),e.addEventListener("success",(async()=>{const n=e.result;if(!n.objectStoreNames.contains(nn))return await function(){const e=indexedDB.deleteDatabase(tn);return new on(e).toPromise()}(),sn();t(n)}))}))}async function ln(e,t,n){const r=an(e,!0).put({[rn]:t,value:n});return new on(r).toPromise()}function un(e,t){const n=an(e,!0).delete(t);return new on(n).toPromise()}class cn{constructor(){this.type="LOCAL",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=await sn()),this.db}async _withRetries(e){let t=0;for(;;)try{const t=await this._openDb();return await e(t)}catch(e){if(t++>3)throw e;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return en()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Yt._getInstance(en()?self:null),this.receiver._subscribe("keyChanged",(async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)}))),this.receiver._subscribe("ping",(async(e,t)=>["keyChanged"]))}async initializeSender(){var e,t;if(this.activeServiceWorker=await async function(){if(!(null===navigator||void 0===navigator?void 0:navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch(e){return null}}(),!this.activeServiceWorker)return;this.sender=new Xt(this.activeServiceWorker);const n=await this.sender._send("ping",{},800);n&&(null===(e=n[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=n[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){var t;if(this.sender&&this.activeServiceWorker&&((null===(t=null===navigator||void 0===navigator?void 0:navigator.serviceWorker)||void 0===t?void 0:t.controller)||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(t){}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await sn();return await ln(e,Ht,"1"),await un(e,Ht),!0}catch(e){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite((async()=>(await this._withRetries((n=>ln(n,e,t))),this.localCache[e]=t,this.notifyServiceWorker(e))))}async _get(e){const t=await this._withRetries((t=>async function(e,t){const n=an(e,!1).get(t),r=await new on(n).toPromise();return void 0===r?null:r.value}(t,e)));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite((async()=>(await this._withRetries((t=>un(t,e))),delete this.localCache[e],this.notifyServiceWorker(e))))}async _poll(){const e=await this._withRetries((e=>{const t=an(e,!1).getAll();return new on(t).toPromise()}));if(!e)return[];if(0!==this.pendingWrites)return[];const t=[],n=new Set;for(const{fbase_key:r,value:i}of e)n.add(r),JSON.stringify(this.localCache[r])!==JSON.stringify(i)&&(this.notifyListeners(r,i),t.push(r));for(const e of Object.keys(this.localCache))this.localCache[e]&&!n.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const e of Array.from(n))e(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval((async()=>this._poll()),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}cn.type="LOCAL";const dn=cn;class hn{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach((n=>{this.isEventForConsumer(e,n)&&(t=!0,this.sendToConsumer(e,n),this.saveEventToCache(e))})),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return pn(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var n;if(e.error&&!pn(e)){const r=(null===(n=e.error.code)||void 0===n?void 0:n.split("auth/")[1])||"internal-error";t.onError(w(this.auth,r))}else t.onAuthEvent(e)}isEventForConsumer(e,t){const n=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(fn(e))}saveEventToCache(e){this.cachedEventUids.add(fn(e)),this.lastProcessedEventTime=Date.now()}}function fn(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter((e=>e)).join("-")}function pn({type:e,error:t}){return"unknown"===e&&"auth/no-auth-event"===(null==t?void 0:t.code)}function mn(e){return`${e||""}${Math.floor(1e9*Math.random())}`}const gn=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,vn=/^https?/;function yn(e){const t=k(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){const i=new URL(e);return""===i.hostname&&""===r?"chrome-extension:"===n&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===n&&i.hostname===r}if(!vn.test(n))return!1;if(gn.test(e))return r===e;const i=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}function bn(e){return new Promise(((t,n)=>{const r=document.createElement("script");var i,o;r.setAttribute("src",e),r.onload=t,r.onerror=n,r.type="text/javascript",r.charset="UTF-8",(null!==(o=null===(i=document.getElementsByTagName("head"))||void 0===i?void 0:i[0])&&void 0!==o?o:document).appendChild(r)}))}function wn(e){return`__${e}${Math.floor(1e6*Math.random())}`}const En=new N(3e4,6e4);function _n(){const e=Jt().___jsl;if(null==e?void 0:e.H)for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let t=0;t<e.CP.length;t++)e.CP[t]=null}let Cn=null;function Sn(e){return Cn=Cn||function(e){return new Promise(((t,n)=>{var r,i,o;function a(){_n(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{_n(),n(w(e,"network-request-failed"))},timeout:En.get()})}if(null===(i=null===(r=Jt().gapi)||void 0===r?void 0:r.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else{if(!(null===(o=Jt().gapi)||void 0===o?void 0:o.load)){const t=wn("iframefcb");return Jt()[t]=()=>{gapi.load?a():n(w(e,"network-request-failed"))},bn(`https://apis.google.com/js/api.js?onload=${t}`)}a()}})).catch((e=>{throw Cn=null,e}))}(e),Cn}const xn=new N(5e3,15e3),Tn={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"}},In=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function kn(e){const t=e.config;_(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?A(t,"emulator/auth/iframe"):`https://${e.config.authDomain}/__/auth/iframe`,o={apiKey:t.apiKey,appName:e.name,v:r.Jn},a=In.get(e.config.apiHost);a&&(o.eid=a);const s=e._getFrameworks();return s.length&&(o.fw=s.join(",")),`${n}?${(0,i.xO)(o).slice(1)}`}class On extends Kt{constructor(){super(window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}On.type="SESSION";const Pn=On,Nn={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class An{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}function Dn(e,t){return t?T(t):(_(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}class Rn extends Ce{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return ke(e,this._buildIdpRequest())}_linkToIdToken(e,t){return ke(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return ke(e,this._buildIdpRequest())}_buildIdpRequest(e){const t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function Mn(e){return tt(e.auth,new Rn(e),e.bypassAuthState)}function Ln(e){const{auth:t,user:n}=e;return _(n,t,"internal-error"),et(n,new Rn(e),e.bypassAuthState)}async function jn(e){const{auth:t,user:n}=e;return _(n,t,"internal-error"),Xe(n,new Rn(e),e.bypassAuthState)}class Fn{constructor(e,t,n,r,i=!1){this.auth=e,this.resolver=n,this.user=r,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise((async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(e){this.reject(e)}}))}async onAuthEvent(e){const{urlResponse:t,sessionId:n,postBody:r,tenantId:i,error:o,type:a}=e;if(o)return void this.reject(o);const s={auth:this.auth,requestUri:t,sessionId:n,tenantId:i||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(a)(s))}catch(e){this.reject(e)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return Mn;case"linkViaPopup":case"linkViaRedirect":return jn;case"reauthViaPopup":case"reauthViaRedirect":return Ln;default:b(this.auth,"internal-error")}}resolve(e){S(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){S(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()}}const Wn=new Map;class Bn extends Fn{constructor(e,t,n=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,n),this.eventId=null}async execute(){let e=Wn.get(this.auth._key());if(!e){try{const t=await async function(e,t){const n=Vn(t),r="true"===await Un(e)._get(n);return await Un(e)._remove(n),r}(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(t){e=()=>Promise.reject(t)}Wn.set(this.auth._key(),e)}return e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"!==e.type){if(e.eventId){const t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}else this.resolve(null)}async onExecution(){}cleanUp(){}}async function zn(e,t){return Un(e)._set(Vn(t),"true")}function Un(e){return T(e._redirectPersistence)}function Vn(e){return ie("pendingRedirect",e.config.apiKey,e.name)}function Zn(e,t,n){return async function(e,t,n){const r=ye(e);_(t instanceof Me,e,"argument-error");const i=Dn(r,n);return await zn(i,r),i._openRedirect(r,t,"signInViaRedirect")}(e,t,n)}function $n(e,t,n){return async function(e,t,n){const r=(0,i.m9)(e);_(t instanceof Me,r.auth,"argument-error");const o=Dn(r.auth,n);await zn(o,r.auth);const a=await Gn(r);return o._openRedirect(r.auth,t,"reauthViaRedirect",a)}(e,t,n)}function qn(e,t,n){return async function(e,t,n){const r=(0,i.m9)(e);_(t instanceof Me,r.auth,"argument-error");const o=Dn(r.auth,n);await Je(!1,r,t.providerId),await zn(o,r.auth);const a=await Gn(r);return o._openRedirect(r.auth,t,"linkViaRedirect",a)}(e,t,n)}async function Hn(e,t){return await ye(e)._initializationPromise,Kn(e,t,!1)}async function Kn(e,t,n=!1){const r=ye(e),i=Dn(r,t),o=new Bn(r,i,n),a=await o.execute();return a&&!n&&(delete a.user._redirectEventId,await r._persistUserIfCurrent(a.user),await r._setRedirectUser(null,t)),a}async function Gn(e){const t=mn(`${e.uid}:::`);return e._redirectEventId=t,await e.auth._setRedirectUser(e),await e.auth._persistUserIfCurrent(e),t}function Qn(e,t,n,o,a,s){_(e.config.authDomain,e,"auth-domain-config-required"),_(e.config.apiKey,e,"invalid-api-key");const l={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:o,v:r.Jn,eventId:a};if(t instanceof Me){t.setDefaultLanguage(e.languageCode),l.providerId=t.providerId||"",(0,i.xb)(t.getCustomParameters())||(l.customParameters=JSON.stringify(t.getCustomParameters()));for(const[e,t]of Object.entries(s||{}))l[e]=t}if(t instanceof Le){const e=t.getScopes().filter((e=>""!==e));e.length>0&&(l.scopes=e.join(","))}e.tenantId&&(l.tid=e.tenantId);const u=l;for(const e of Object.keys(u))void 0===u[e]&&delete u[e];return`${function({config:e}){return e.emulator?A(e,"emulator/auth/handler"):`https://${e.authDomain}/__/auth/handler`}(e)}?${(0,i.xO)(u).slice(1)}`}const Yn="webStorageSupport",Xn=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Pn,this._completeRedirectFn=Kn}async _openPopup(e,t,n,r){var o;return S(null===(o=this.eventManagers[e._key()])||void 0===o?void 0:o.manager,"_initialize() not called before _openPopup()"),function(e,t,n,r=500,o=600){const a=Math.min((window.screen.availHeight-o)/2,0).toString(),s=Math.min((window.screen.availWidth-r)/2,0).toString();let l="";const u=Object.assign(Object.assign({},Nn),{width:r.toString(),height:o.toString(),top:a,left:s}),c=(0,i.z$)().toLowerCase();n&&(l=ue(c)?"_blank":n),se(c)&&(t=t||"http://localhost",u.scrollbars="yes");const d=Object.entries(u).reduce(((e,[t,n])=>`${e}${t}=${n},`),"");if(function(e=(0,i.z$)()){var t;return pe(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(c)&&"_self"!==l)return function(e,t){const n=document.createElement("a");n.href=e,n.target=t;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}(t||"",l),new An(null);const h=window.open(t||"",l,d);_(h,e,"popup-blocked");try{h.focus()}catch(e){}return new An(h)}(e,Qn(e,t,n,k(),r),mn())}async _openRedirect(e,t,n,r){var i;return await this._originValidation(e),i=Qn(e,t,n,k(),r),Jt().location.href=i,new Promise((()=>{}))}_initialize(e){const t=e._key();if(this.eventManagers[t]){const{manager:e,promise:n}=this.eventManagers[t];return e?Promise.resolve(e):(S(n,"If manager is not set, promise should be"),n)}const n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n}async initAndGetManager(e){const t=await async function(e){const t=await Sn(e),n=Jt().gapi;return _(n,e,"internal-error"),t.open({where:document.body,url:kn(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:Tn,dontclear:!0},(t=>new Promise((async(n,r)=>{await t.restyle({setHideOnLeave:!1});const i=w(e,"network-request-failed"),o=Jt().setTimeout((()=>{r(i)}),xn.get());function a(){Jt().clearTimeout(o),n(t)}t.ping(a).then(a,(()=>{r(i)}))}))))}(e),n=new hn(e);return t.register("authEvent",(t=>(_(null==t?void 0:t.authEvent,e,"invalid-auth-event"),{status:n.onEvent(t.authEvent)?"ACK":"ERROR"})),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:n},this.iframes[e._key()]=t,n}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(Yn,{type:Yn},(n=>{var r;const i=null===(r=null==n?void 0:n[0])||void 0===r?void 0:r.webStorageSupport;void 0!==i&&t(!!i),b(e,"internal-error")}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=async function(e){if(e.config.emulator)return;const{authorizedDomains:t}=await async function(e){return j(e,"GET","/v1/projects",{})}(e);for(const e of t)try{if(yn(e))return}catch(e){}b(e,"unauthorized-domain")}(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return me()||le()||pe()}},Jn=1e12;class er{constructor(e){this.auth=e,this.counter=Jn,this._widgets=new Map}render(e,t){const n=this.counter;return this._widgets.set(n,new tr(e,this.auth.name,t||{})),this.counter++,n}reset(e){var t;const n=e||Jn;null===(t=this._widgets.get(n))||void 0===t||t.delete(),this._widgets.delete(n)}getResponse(e){var t;const n=e||Jn;return(null===(t=this._widgets.get(n))||void 0===t?void 0:t.getResponse())||""}async execute(e){var t;const n=e||Jn;return null===(t=this._widgets.get(n))||void 0===t||t.execute(),""}}class tr{constructor(e,t,n){this.params=n,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};const r="string"==typeof e?document.getElementById(e):e;_(r,"argument-error",{appName:t}),this.container=r,this.isVisible="invisible"!==this.params.size,this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}getResponse(){return this.checkIfDeleted(),this.responseToken}delete(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)}execute(){this.checkIfDeleted(),this.timerId||(this.timerId=window.setTimeout((()=>{this.responseToken=function(e){const t=[],n="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let e=0;e<50;e++)t.push(n.charAt(Math.floor(Math.random()*n.length)));return t.join("")}();const{callback:e,"expired-callback":t}=this.params;if(e)try{e(this.responseToken)}catch(e){}this.timerId=window.setTimeout((()=>{if(this.timerId=null,this.responseToken=null,t)try{t()}catch(e){}this.isVisible&&this.execute()}),6e4)}),500))}checkIfDeleted(){if(this.deleted)throw new Error("reCAPTCHA mock was already deleted!")}}const nr=wn("rcb"),rr=new N(3e4,6e4);class ir{constructor(){this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!Jt().grecaptcha}load(e,t=""){return _(function(e){return e.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(e)}(t),e,"argument-error"),this.shouldResolveImmediately(t)?Promise.resolve(Jt().grecaptcha):new Promise(((n,r)=>{const o=Jt().setTimeout((()=>{r(w(e,"network-request-failed"))}),rr.get());Jt()[nr]=()=>{Jt().clearTimeout(o),delete Jt()[nr];const i=Jt().grecaptcha;if(!i)return void r(w(e,"internal-error"));const a=i.render;i.render=(e,t)=>{const n=a(e,t);return this.counter++,n},this.hostLanguage=t,n(i)},bn(`https://www.google.com/recaptcha/api.js??${(0,i.xO)({onload:nr,render:"explicit",hl:t})}`).catch((()=>{clearTimeout(o),r(w(e,"internal-error"))}))}))}clearedOneInstance(){this.counter--}shouldResolveImmediately(e){return!!Jt().grecaptcha&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}class or{async load(e){return new er(e)}clearedOneInstance(){}}const ar="recaptcha",sr={theme:"light",type:"image"};class lr{constructor(e,t=Object.assign({},sr),n){this.parameters=t,this.type=ar,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=ye(n),this.isInvisible="invisible"===this.parameters.size,_("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment");const r="string"==typeof e?document.getElementById(e):e;_(r,this.auth,"argument-error"),this.container=r,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new or:new ir,this.validateStartingState()}async verify(){this.assertNotDestroyed();const e=await this.render(),t=this.getAssertedRecaptcha();return t.getResponse(e)||new Promise((n=>{const r=e=>{e&&(this.tokenChangeListeners.delete(r),n(e))};this.tokenChangeListeners.add(r),this.isInvisible&&t.execute(e)}))}render(){try{this.assertNotDestroyed()}catch(e){return Promise.reject(e)}return this.renderPromise||(this.renderPromise=this.makeRenderPromise().catch((e=>{throw this.renderPromise=null,e}))),this.renderPromise}_reset(){this.assertNotDestroyed(),null!==this.widgetId&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach((e=>{this.container.removeChild(e)}))}validateStartingState(){_(!this.parameters.sitekey,this.auth,"argument-error"),_(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),_("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(e){return t=>{if(this.tokenChangeListeners.forEach((e=>e(t))),"function"==typeof e)e(t);else if("string"==typeof e){const n=Jt()[e];"function"==typeof n&&n(t)}}}assertNotDestroyed(){_(!this.destroyed,this.auth,"internal-error")}async makeRenderPromise(){if(await this.init(),!this.widgetId){let e=this.container;if(!this.isInvisible){const t=document.createElement("div");e.appendChild(t),e=t}this.widgetId=this.getAssertedRecaptcha().render(e,this.parameters)}return this.widgetId}async init(){_(O()&&!en(),this.auth,"internal-error"),await function(){let e=null;return new Promise((t=>{"complete"!==document.readyState?(e=()=>t(),window.addEventListener("load",e)):t()})).catch((t=>{throw e&&window.removeEventListener("load",e),t}))}(),this.recaptcha=await this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);const e=await async function(e){return(await j(e,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""}(this.auth);_(e,this.auth,"internal-error"),this.parameters.sitekey=e}getAssertedRecaptcha(){return _(this.recaptcha,this.auth,"internal-error"),this.recaptcha}}class ur{constructor(e,t){this.verificationId=e,this.onConfirmation=t}confirm(e){const t=Ne._fromVerification(this.verificationId,e);return this.onConfirmation(t)}}async function cr(e,t,n){const r=ye(e),o=await fr(r,t,(0,i.m9)(n));return new ur(o,(e=>nt(r,e)))}async function dr(e,t,n){const r=(0,i.m9)(e);await Je(!1,r,"phone");const o=await fr(r.auth,t,(0,i.m9)(n));return new ur(o,(e=>rt(r,e)))}async function hr(e,t,n){const r=(0,i.m9)(e),o=await fr(r.auth,t,(0,i.m9)(n));return new ur(o,(e=>it(r,e)))}async function fr(e,t,n){var r;const i=await n.verify();try{let o;if(_("string"==typeof i,e,"argument-error"),_(n.type===ar,e,"argument-error"),o="string"==typeof t?{phoneNumber:t}:t,"session"in o){const t=o.session;if("phoneNumber"in o)return _("enroll"===t.type,e,"internal-error"),(await function(e,t){return j(e,"POST","/v2/accounts/mfaEnrollment:start",Object.assign({tenantId:e.tenantId},t))}(e,{idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:o.phoneNumber,recaptchaToken:i}})).phoneSessionInfo.sessionInfo;{_("signin"===t.type,e,"internal-error");const n=(null===(r=o.multiFactorHint)||void 0===r?void 0:r.uid)||o.multiFactorUid;return _(n,e,"missing-multi-factor-info"),(await function(e,t){return j(e,"POST","/v2/accounts/mfaSignIn:start",Object.assign({tenantId:e.tenantId},t))}(e,{mfaPendingCredential:t.credential,mfaEnrollmentId:n,phoneSignInInfo:{recaptchaToken:i}})).phoneResponseInfo.sessionInfo}}{const{sessionInfo:t}=await async function(e,t){return j(e,"POST","/v1/accounts:sendVerificationCode",L(e,t))}(e,{phoneNumber:o.phoneNumber,recaptchaToken:i});return t}}finally{n._reset()}}async function pr(e,t){await Xe((0,i.m9)(e),t)}class mr{constructor(e){this.providerId=mr.PROVIDER_ID,this.auth=ye(e)}verifyPhoneNumber(e,t){return fr(this.auth,e,(0,i.m9)(t))}static credential(e,t){return Ne._fromVerification(e,t)}static credentialFromResult(e){const t=e;return mr.credentialFromTaggedObject(t)}static credentialFromError(e){return mr.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{phoneNumber:t,temporaryProof:n}=e;return t&&n?Ne._fromTokenResponse(t,n):null}}mr.PROVIDER_ID="phone",mr.PHONE_SIGN_IN_METHOD="phone";const gr=new N(2e3,1e4);async function vr(e,t,n){const r=ye(e);_(t instanceof Me,e,"argument-error");const i=Dn(r,n);return new wr(r,"signInViaPopup",t,i).executeNotNull()}async function yr(e,t,n){const r=(0,i.m9)(e);_(t instanceof Me,r.auth,"argument-error");const o=Dn(r.auth,n);return new wr(r.auth,"reauthViaPopup",t,o,r).executeNotNull()}async function br(e,t,n){const r=(0,i.m9)(e);_(t instanceof Me,r.auth,"argument-error");const o=Dn(r.auth,n);return new wr(r.auth,"linkViaPopup",t,o,r).executeNotNull()}class wr extends Fn{constructor(e,t,n,r,i){super(e,t,r,i),this.provider=n,this.authWindow=null,this.pollId=null,wr.currentPopupAction&&wr.currentPopupAction.cancel(),wr.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return _(e,this.auth,"internal-error"),e}async onExecution(){S(1===this.filter.length,"Popup operations only handle one event");const e=mn();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch((e=>{this.reject(e)})),this.resolver._isIframeWebStorageSupported(this.auth,(e=>{e||this.reject(w(this.auth,"web-storage-unsupported"))})),this.pollUserCancellation()}get eventId(){var e;return(null===(e=this.authWindow)||void 0===e?void 0:e.associatedEvent)||null}cancel(){this.reject(w(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,wr.currentPopupAction=null}pollUserCancellation(){const e=()=>{var t,n;(null===(n=null===(t=this.authWindow)||void 0===t?void 0:t.window)||void 0===n?void 0:n.closed)?this.pollId=window.setTimeout((()=>{this.pollId=null,this.reject(w(this.auth,"popup-closed-by-user"))}),2e3):this.pollId=window.setTimeout(e,gr.get())};e()}}wr.currentPopupAction=null;class Er extends class{constructor(e){this.factorId=e}_process(e,t,n){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,n);case"signin":return this._finalizeSignIn(e,t.credential);default:return C("unexpected MultiFactorSessionType")}}}{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new Er(e)}_finalizeEnroll(e,t,n){return function(e,t){return j(e,"POST","/v2/accounts/mfaEnrollment:finalize",Object.assign({tenantId:e.tenantId},t))}(e,{idToken:t,displayName:n,phoneVerificationInfo:this.credential._makeVerificationRequest()})}_finalizeSignIn(e,t){return function(e,t){return j(e,"POST","/v2/accounts/mfaSignIn:finalize",Object.assign({tenantId:e.tenantId},t))}(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()})}}class _r{constructor(){}static assertion(e){return Er._fromCredential(e)}}function Cr(e=(0,r.Mq)()){const t=(0,r.qX)(e,"auth-exp");return t.isInitialized()?t.getImmediate():I(e,{popupRedirectResolver:Xn,persistence:[dn,Qt]})}var Sr;Sr="Browser",(0,r.Xd)(new d("auth-exp",((e,{options:t})=>{const n=e.getProvider("app-exp").getImmediate(),{apiKey:r,authDomain:i}=n.options;return(e=>{_(r&&!r.includes(":"),"invalid-api-key",{appName:e.name}),_(!(null==i?void 0:i.includes(":")),"argument-error",{appName:e.name});const n={apiKey:r,authDomain:i,clientPlatform:Sr,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:ge(Sr)},o=new ve(e,n);return function(e,t){const n=(null==t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(T);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null==t?void 0:t.popupRedirectResolver)}(o,t),o})(n)}),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback(((e,t,n)=>{e.getProvider("auth-internal").initialize()}))),(0,r.Xd)(new d("auth-internal",(e=>{return t=ye(e.getProvider("auth-exp").getImmediate()),new qt(t);var t}),"PRIVATE").setInstantiationMode("EXPLICIT")),(0,r.KN)("@firebase/auth-exp","0.0.900-exp.d92a36260",void 0)},7212:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AbstractUserDataWriter:()=>yf,Bytes:()=>fh,CACHE_SIZE_UNLIMITED:()=>Kd,CollectionReference:()=>Wd,DocumentReference:()=>jd,DocumentSnapshot:()=>qh,FieldPath:()=>dh,FieldValue:()=>ph,FirebaseFirestore:()=>Gd,FirestoreError:()=>_r,GeoPoint:()=>mh,LoadBundleTask:()=>Hd,Query:()=>Fd,QueryConstraint:()=>Xh,QueryDocumentSnapshot:()=>Hh,QuerySnapshot:()=>Kh,SnapshotMetadata:()=>$h,Timestamp:()=>Fr,Transaction:()=>Ff,WriteBatch:()=>Ef,addDoc:()=>Df,arrayRemove:()=>Vf,arrayUnion:()=>Uf,clearIndexedDbPersistence:()=>rh,collection:()=>Bd,collectionGroup:()=>zd,deleteDoc:()=>Af,deleteField:()=>Bf,disableNetwork:()=>ah,doc:()=>Ud,documentId:()=>hh,enableIndexedDbPersistence:()=>eh,enableMultiTabIndexedDbPersistence:()=>th,enableNetwork:()=>oh,endAt:()=>ff,endBefore:()=>hf,ensureFirestoreConfigured:()=>Xd,executeWrite:()=>Lf,getDoc:()=>Cf,getDocFromCache:()=>xf,getDocFromServer:()=>Tf,getDocs:()=>If,getDocsFromCache:()=>kf,getDocsFromServer:()=>Of,getFirestore:()=>Yd,increment:()=>Zf,initializeFirestore:()=>Qd,limit:()=>af,limitToLast:()=>sf,loadBundle:()=>lh,namedQuery:()=>uh,onSnapshot:()=>Rf,onSnapshotsInSync:()=>Mf,orderBy:()=>rf,query:()=>Jh,queryEqual:()=>Zd,refEqual:()=>Vd,runTransaction:()=>Wf,serverTimestamp:()=>zf,setDoc:()=>Pf,setLogLevel:()=>xr,snapshotEqual:()=>Qh,startAfter:()=>cf,startAt:()=>uf,terminate:()=>sh,updateDoc:()=>Nf,useFirestoreEmulator:()=>Ld,waitForPendingWrites:()=>ih,where:()=>tf,writeBatch:()=>$f});var r=n(3198),i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function o(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function s(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}Object.create,Object.create;var l=n(8448),u=function(){function e(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}return e.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},e.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},e.prototype.setServiceProps=function(e){return this.serviceProps=e,this},e.prototype.setInstanceCreatedCallback=function(e){return this.onInstanceCreated=e,this},e}(),c="[DEFAULT]",d=function(){function e(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.onInitCallbacks=new Set}return e.prototype.get=function(e){void 0===e&&(e=c);var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new l.BH;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{var r=this.getOrInitializeService({instanceIdentifier:t});r&&n.resolve(r)}catch(e){}}return this.instancesDeferred.get(t).promise},e.prototype.getImmediate=function(e){var t=i({identifier:c,optional:!1},e),n=t.identifier,r=t.optional,o=this.normalizeInstanceIdentifier(n);if(!this.isInitialized(o)&&!this.shouldAutoInitialize()){if(r)return null;throw Error("Service "+this.name+" is not available")}try{return this.getOrInitializeService({instanceIdentifier:o})}catch(e){if(r)return null;throw e}},e.prototype.getComponent=function(){return this.component},e.prototype.setComponent=function(e){var t,n;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(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:c})}catch(e){}try{for(var r=o(this.instancesDeferred.entries()),i=r.next();!i.done;i=r.next()){var s=a(i.value,2),l=s[0],u=s[1],d=this.normalizeInstanceIdentifier(l);try{var h=this.getOrInitializeService({instanceIdentifier:d});u.resolve(h)}catch(e){}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}}},e.prototype.clearInstance=function(e){void 0===e&&(e=c),this.instancesDeferred.delete(e),this.instances.delete(e)},e.prototype.delete=function(){return function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}(this,void 0,void 0,(function(){var e;return function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,(function(t){switch(t.label){case 0:return e=Array.from(this.instances.values()),[4,Promise.all(s(s([],a(e.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()})))),a(e.filter((function(e){return"_delete"in e})).map((function(e){return e._delete()})))))];case 1:return t.sent(),[2]}}))}))},e.prototype.isComponentSet=function(){return null!=this.component},e.prototype.isInitialized=function(e){return void 0===e&&(e=c),this.instances.has(e)},e.prototype.initialize=function(e){var t,n;void 0===e&&(e={});var r=e.instanceIdentifier,i=void 0===r?c:r,s=e.options,l=void 0===s?{}:s,u=this.normalizeInstanceIdentifier(i);if(this.isInitialized(u))throw Error(this.name+"("+u+") has already been initialized");if(!this.isComponentSet())throw Error("Component "+this.name+" has not been registered yet");var d=this.getOrInitializeService({instanceIdentifier:u,options:l});try{for(var h=o(this.instancesDeferred.entries()),f=h.next();!f.done;f=h.next()){var p=a(f.value,2),m=p[0],g=p[1];u===this.normalizeInstanceIdentifier(m)&&g.resolve(d)}}catch(e){t={error:e}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}finally{if(t)throw t.error}}return this.invokeOnInitCallbacks(d,u),d},e.prototype.onInit=function(e){var t=this;return this.onInitCallbacks.add(e),function(){t.onInitCallbacks.delete(e)}},e.prototype.invokeOnInitCallbacks=function(e,t){var n,r;try{for(var i=o(this.onInitCallbacks),a=i.next();!a.done;a=i.next()){var s=a.value;try{s(e,t)}catch(e){}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype.getOrInitializeService=function(e){var t,n=e.instanceIdentifier,r=e.options,i=void 0===r?{}:r,o=this.instances.get(n);if(!o&&this.component&&(o=this.component.instanceFactory(this.container,{instanceIdentifier:(t=n,t===c?void 0:t),options:i}),this.instances.set(n,o),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,n,o)}catch(e){}return o||null},e.prototype.normalizeInstanceIdentifier=function(e){return this.component?this.component.multipleInstances?e:c:e},e.prototype.shouldAutoInitialize=function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode},e}();!function(){function e(e){this.name=e,this.providers=new Map}e.prototype.addComponent=function(e){var t=this.getProvider(e.name);if(t.isComponentSet())throw new Error("Component "+e.name+" has already been registered with "+this.name);t.setComponent(e)},e.prototype.addOrOverwriteComponent=function(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)},e.prototype.getProvider=function(e){if(this.providers.has(e))return this.providers.get(e);var t=new d(e,this);return this.providers.set(e,t),t},e.prototype.getProviders=function(){return Array.from(this.providers.values())}}();var h=n(4594),f=function(e,t){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var m,g="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},v=v||{},y=g||self;function b(){}function w(e){var t=typeof e;return"array"==(t="object"!=t?t:e?Array.isArray(e)?"array":t:"null")||"object"==t&&"number"==typeof e.length}function E(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}var _="closure_uid_"+(1e9*Math.random()>>>0),C=0;function S(e,t,n){return e.call.apply(e.bind,arguments)}function x(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function T(e,t,n){return(T=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?S:x).apply(null,arguments)}function I(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}function k(){return Date.now()}function O(e,t){function n(){}n.prototype=t.prototype,e.X=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.Kb=function(e,n,r){for(var i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return t.prototype[n].apply(e,i)}}function P(){this.j=this.j,this.i=this.i}P.prototype.j=!1,P.prototype.ja=function(){!this.j&&(this.j=!0,this.G(),0)&&function(e){Object.prototype.hasOwnProperty.call(e,_)&&e[_]||(e[_]=++C)}(this)},P.prototype.G=function(){if(this.i)for(;this.i.length;)this.i.shift()()};var N=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if("string"==typeof e)return"string"!=typeof t||1!=t.length?-1:e.indexOf(t,0);for(var n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1},A=Array.prototype.forEach?function(e,t,n){Array.prototype.forEach.call(e,t,n)}:function(e,t,n){for(var r=e.length,i="string"==typeof e?e.split(""):e,o=0;o<r;o++)o in i&&t.call(n,i[o],o,e)};function D(e){return Array.prototype.concat.apply([],arguments)}function R(e){var t=e.length;if(0<t){for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}return[]}function M(e){return/^[\s\xa0]*$/.test(e)}var L,j=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]};function F(e,t){return-1!=e.indexOf(t)}function W(e,t){return e<t?-1:e>t?1:0}e:{var B=y.navigator;if(B){var z=B.userAgent;if(z){L=z;break e}}L=""}function U(e,t,n){for(var r in e)t.call(n,e[r],r,e)}function V(e){var t={};for(var n in e)t[n]=e[n];return t}var Z="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function $(e,t){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])e[n]=r[n];for(var o=0;o<Z.length;o++)n=Z[o],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function q(e){return q[" "](e),e}q[" "]=b;var H,K,G=F(L,"Opera"),Q=F(L,"Trident")||F(L,"MSIE"),Y=F(L,"Edge"),X=Y||Q,J=F(L,"Gecko")&&!(F(L.toLowerCase(),"webkit")&&!F(L,"Edge"))&&!(F(L,"Trident")||F(L,"MSIE"))&&!F(L,"Edge"),ee=F(L.toLowerCase(),"webkit")&&!F(L,"Edge");function te(){var e=y.document;return e?e.documentMode:void 0}e:{var ne="",re=(K=L,J?/rv:([^\);]+)(\)|;)/.exec(K):Y?/Edge\/([\d\.]+)/.exec(K):Q?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(K):ee?/WebKit\/(\S+)/.exec(K):G?/(?:Version)[ \/]?(\S+)/.exec(K):void 0);if(re&&(ne=re?re[1]:""),Q){var ie=te();if(null!=ie&&ie>parseFloat(ne)){H=String(ie);break e}}H=ne}var oe,ae={};function se(e){return function(e,t){var n=ae;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:n[e]=t()}(e,(function(){for(var t=0,n=j(String(H)).split("."),r=j(String(e)).split("."),i=Math.max(n.length,r.length),o=0;0==t&&o<i;o++){var a=n[o]||"",s=r[o]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==a[0].length&&0==s[0].length)break;t=W(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||W(0==a[2].length,0==s[2].length)||W(a[2],s[2]),a=a[3],s=s[3]}while(0==t)}return 0<=t}))}y.document&&Q?oe=te()||parseInt(H,10)||void 0:oe=void 0;var le=oe,ue=!Q||9<=Number(le),ce=Q&&!se("9"),de=function(){if(!y.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{y.addEventListener("test",b,t),y.removeEventListener("test",b,t)}catch(e){}return e}();function he(e,t){this.type=e,this.a=this.target=t,this.defaultPrevented=!1}function fe(e,t){if(he.call(this,e?e.type:""),this.relatedTarget=this.a=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.pointerId=0,this.pointerType="",this.c=null,e){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.a=t,t=e.relatedTarget){if(J){e:{try{q(t.nodeName);var i=!0;break e}catch(e){}i=!1}i||(t=null)}}else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"==typeof e.pointerType?e.pointerType:pe[e.pointerType]||"",this.c=e,e.defaultPrevented&&this.b()}}he.prototype.b=function(){this.defaultPrevented=!0},O(fe,he);var pe={2:"touch",3:"pen",4:"mouse"};fe.prototype.b=function(){fe.X.b.call(this);var e=this.c;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,ce)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(e){}};var me="closure_listenable_"+(1e6*Math.random()|0),ge=0;function ve(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.ca=i,this.key=++ge,this.Y=this.Z=!1}function ye(e){e.Y=!0,e.listener=null,e.proxy=null,e.src=null,e.ca=null}function be(e){this.src=e,this.a={},this.b=0}function we(e,t){var n=t.type;if(n in e.a){var r,i=e.a[n],o=N(i,t);(r=0<=o)&&Array.prototype.splice.call(i,o,1),r&&(ye(t),0==e.a[n].length&&(delete e.a[n],e.b--))}}function Ee(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i];if(!o.Y&&o.listener==t&&o.capture==!!n&&o.ca==r)return i}return-1}be.prototype.add=function(e,t,n,r,i){var o=e.toString();(e=this.a[o])||(e=this.a[o]=[],this.b++);var a=Ee(e,t,r,i);return-1<a?(t=e[a],n||(t.Z=!1)):((t=new ve(t,this.src,o,!!r,i)).Z=n,e.push(t)),t};var _e="closure_lm_"+(1e6*Math.random()|0),Ce={};function Se(e,t,n,r,i){if(r&&r.once)return Te(e,t,n,r,i);if(Array.isArray(t)){for(var o=0;o<t.length;o++)Se(e,t[o],n,r,i);return null}return n=Re(n),e&&e[me]?e.va(t,n,E(r)?!!r.capture:!!r,i):xe(e,t,n,!1,r,i)}function xe(e,t,n,r,i,o){if(!t)throw Error("Invalid event type");var a=E(i)?!!i.capture:!!i;if(a&&!ue)return null;var s=Ae(e);if(s||(e[_e]=s=new be(e)),(n=s.add(t,n,r,a,o)).proxy)return n;if(r=function(){var e=Ne,t=ue?function(n){return e.call(t.src,t.listener,n)}:function(n){if(!(n=e.call(t.src,t.listener,n)))return n};return t}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)de||(i=a),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(Oe(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}return n}function Te(e,t,n,r,i){if(Array.isArray(t)){for(var o=0;o<t.length;o++)Te(e,t[o],n,r,i);return null}return n=Re(n),e&&e[me]?e.wa(t,n,E(r)?!!r.capture:!!r,i):xe(e,t,n,!0,r,i)}function Ie(e,t,n,r,i){if(Array.isArray(t))for(var o=0;o<t.length;o++)Ie(e,t[o],n,r,i);else r=E(r)?!!r.capture:!!r,n=Re(n),e&&e[me]?(e=e.c,(t=String(t).toString())in e.a&&-1<(n=Ee(o=e.a[t],n,r,i))&&(ye(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete e.a[t],e.b--))):e&&(e=Ae(e))&&(t=e.a[t.toString()],e=-1,t&&(e=Ee(t,n,r,i)),(n=-1<e?t[e]:null)&&ke(n))}function ke(e){if("number"!=typeof e&&e&&!e.Y){var t=e.src;if(t&&t[me])we(t.c,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(Oe(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=Ae(t))?(we(n,e),0==n.b&&(n.src=null,t[_e]=null)):ye(e)}}}function Oe(e){return e in Ce?Ce[e]:Ce[e]="on"+e}function Pe(e,t){var n=e.listener,r=e.ca||e.src;return e.Z&&ke(e),n.call(r,t)}function Ne(e,t){if(e.Y)return!0;if(!ue){if(!t)e:{t=["window","event"];for(var n=y,r=0;r<t.length;r++)if(null==(n=n[t[r]])){t=null;break e}t=n}return Pe(e,t=new fe(t,this))}return Pe(e,new fe(t,this))}function Ae(e){return(e=e[_e])instanceof be?e:null}var De="__closure_events_fn_"+(1e9*Math.random()>>>0);function Re(e){return"function"==typeof e?e:(e[De]||(e[De]=function(t){return e.handleEvent(t)}),e[De])}function Me(){P.call(this),this.c=new be(this),this.J=this,this.C=null}function Le(e,t){var n,r=e.C;if(r)for(n=[];r;r=r.C)n.push(r);if(e=e.J,r=t.type||t,"string"==typeof t)t=new he(t,e);else if(t instanceof he)t.target=t.target||e;else{var i=t;$(t=new he(r,e),i)}if(i=!0,n)for(var o=n.length-1;0<=o;o--){var a=t.a=n[o];i=je(a,r,!0,t)&&i}if(i=je(a=t.a=e,r,!0,t)&&i,i=je(a,r,!1,t)&&i,n)for(o=0;o<n.length;o++)i=je(a=t.a=n[o],r,!1,t)&&i}function je(e,t,n,r){if(!(t=e.c.a[String(t)]))return!0;t=t.concat();for(var i=!0,o=0;o<t.length;++o){var a=t[o];if(a&&!a.Y&&a.capture==n){var s=a.listener,l=a.ca||a.src;a.Z&&we(e.c,a),i=!1!==s.call(l,r)&&i}}return i&&!r.defaultPrevented}O(Me,P),Me.prototype[me]=!0,(m=Me.prototype).addEventListener=function(e,t,n,r){Se(this,e,t,n,r)},m.removeEventListener=function(e,t,n,r){Ie(this,e,t,n,r)},m.G=function(){if(Me.X.G.call(this),this.c){var e,t=this.c;for(e in t.a){for(var n=t.a[e],r=0;r<n.length;r++)ye(n[r]);delete t.a[e],t.b--}}this.C=null},m.va=function(e,t,n,r){return this.c.add(String(e),t,!1,n,r)},m.wa=function(e,t,n,r){return this.c.add(String(e),t,!0,n,r)};var Fe=y.JSON.stringify;function We(){this.b=this.a=null}var Be,ze=new(function(){function e(e,t){this.c=e,this.f=t,this.b=0,this.a=null}return e.prototype.get=function(){var e;return 0<this.b?(this.b--,e=this.a,this.a=e.next,e.next=null):e=this.c(),e},e}())((function(){return new Ve}),(function(e){e.reset()}));function Ue(){var e=He,t=null;return e.a&&(t=e.a,e.a=e.a.next,e.a||(e.b=null),t.next=null),t}function Ve(){this.next=this.b=this.a=null}function Ze(e){y.setTimeout((function(){throw e}),0)}function $e(e,t){Be||function(){var e=y.Promise.resolve(void 0);Be=function(){e.then(Ke)}}(),qe||(Be(),qe=!0),He.add(e,t)}We.prototype.add=function(e,t){var n=ze.get();n.set(e,t),this.b?this.b.next=n:this.a=n,this.b=n},Ve.prototype.set=function(e,t){this.a=e,this.b=t,this.next=null},Ve.prototype.reset=function(){this.next=this.b=this.a=null};var qe=!1,He=new We;function Ke(){for(var e;e=Ue();){try{e.a.call(e.b)}catch(e){Ze(e)}var t=ze;t.f(e),100>t.b&&(t.b++,e.next=t.a,t.a=e)}qe=!1}function Ge(e,t){Me.call(this),this.b=e||1,this.a=t||y,this.f=T(this.Za,this),this.g=k()}function Qe(e){e.aa=!1,e.M&&(e.a.clearTimeout(e.M),e.M=null)}function Ye(e,t,n){if("function"==typeof e)n&&(e=T(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=T(e.handleEvent,e)}return 2147483647<Number(t)?-1:y.setTimeout(e,t||0)}function Xe(e){e.a=Ye((function(){e.a=null,e.c&&(e.c=!1,Xe(e))}),e.h);var t=e.b;e.b=null,e.g.apply(null,t)}O(Ge,Me),(m=Ge.prototype).aa=!1,m.M=null,m.Za=function(){if(this.aa){var e=k()-this.g;0<e&&e<.8*this.b?this.M=this.a.setTimeout(this.f,this.b-e):(this.M&&(this.a.clearTimeout(this.M),this.M=null),Le(this,"tick"),this.aa&&(Qe(this),this.start()))}},m.start=function(){this.aa=!0,this.M||(this.M=this.a.setTimeout(this.f,this.b),this.g=k())},m.G=function(){Ge.X.G.call(this),Qe(this),delete this.a};var Je=function(e){function t(t,n){var r=e.call(this)||this;return r.g=t,r.h=n,r.b=null,r.c=!1,r.a=null,r}return function(e,t){function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.f=function(e){this.b=arguments,this.a?this.c=!0:Xe(this)},t.prototype.G=function(){e.prototype.G.call(this),this.a&&(y.clearTimeout(this.a),this.a=null,this.c=!1,this.b=null)},t}(P);function et(e){P.call(this),this.b=e,this.a={}}O(et,P);var tt=[];function nt(e,t,n,r){Array.isArray(n)||(n&&(tt[0]=n.toString()),n=tt);for(var i=0;i<n.length;i++){var o=Se(t,n[i],r||e.handleEvent,!1,e.b||e);if(!o)break;e.a[o.key]=o}}function rt(e){U(e.a,(function(e,t){this.a.hasOwnProperty(t)&&ke(e)}),e),e.a={}}function it(){this.a=!0}function ot(e,t,n,r){e.info((function(){return"XMLHTTP TEXT ("+t+"): "+function(e,t){if(!e.a)return t;if(!t)return null;try{var n=JSON.parse(t);if(n)for(e=0;e<n.length;e++)if(Array.isArray(n[e])){var r=n[e];if(!(2>r.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var o=i[0];if("noop"!=o&&"stop"!=o&&"close"!=o)for(var a=1;a<i.length;a++)i[a]=""}}}return Fe(n)}catch(e){return t}}(e,n)+(r?" "+r:"")}))}et.prototype.G=function(){et.X.G.call(this),rt(this)},et.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},it.prototype.info=function(){};var at={},st=null;function lt(){return st=st||new Me}function ut(e){he.call(this,at.Fa,e)}function ct(e){var t=lt();Le(t,new ut(t,e))}function dt(e,t){he.call(this,at.STAT_EVENT,e),this.stat=t}function ht(e){var t=lt();Le(t,new dt(t,e))}function ft(e){he.call(this,at.Ga,e)}function pt(e,t){if("function"!=typeof e)throw Error("Fn must not be null and must be a function");return y.setTimeout((function(){e()}),t)}at.Fa="serverreachability",O(ut,he),at.STAT_EVENT="statevent",O(dt,he),at.Ga="timingevent",O(ft,he);var mt={NO_ERROR:0,$a:1,nb:2,mb:3,hb:4,lb:5,ob:6,Da:7,TIMEOUT:8,rb:9},gt={fb:"complete",Bb:"success",Ea:"error",Da:"abort",tb:"ready",ub:"readystatechange",TIMEOUT:"timeout",pb:"incrementaldata",sb:"progress",ib:"downloadprogress",Jb:"uploadprogress"};function vt(){}function yt(e){var t;return(t=e.a)||(t=e.a={}),t}function bt(){}vt.prototype.a=null;var wt,Et={OPEN:"a",eb:"b",Ea:"c",qb:"d"};function _t(){he.call(this,"d")}function Ct(){he.call(this,"c")}function St(){}function xt(e,t,n,r){this.g=e,this.c=t,this.f=n,this.S=r||1,this.J=new et(this),this.P=Tt,e=X?125:void 0,this.R=new Ge(e),this.B=null,this.b=!1,this.j=this.l=this.i=this.H=this.u=this.T=this.o=null,this.s=[],this.a=null,this.D=0,this.h=this.m=null,this.N=-1,this.A=!1,this.O=0,this.F=null,this.V=this.C=this.U=this.I=!1}O(_t,he),O(Ct,he),O(St,vt),wt=new St;var Tt=45e3,It={},kt={};function Ot(e,t,n){e.H=1,e.i=Yt($t(t)),e.j=n,e.I=!0,Pt(e,null)}function Pt(e,t){e.u=k(),Dt(e),e.l=$t(e.i);var n=e.l,r=e.S;Array.isArray(r)||(r=[String(r)]),dn(n.b,"t",r),e.D=0,e.a=or(e.g,e.g.C?t:null),0<e.O&&(e.F=new Je(T(e.Ca,e,e.a),e.O)),nt(e.J,e.a,"readystatechange",e.Xa),t=e.B?V(e.B):{},e.j?(e.m||(e.m="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.a.ba(e.l,e.m,e.j,t)):(e.m="GET",e.a.ba(e.l,e.m,null,t)),ct(1),function(e,t,n,r,i,o){e.info((function(){if(e.a)if(o)for(var a="",s=o.split("&"),l=0;l<s.length;l++){var u=s[l].split("=");if(1<u.length){var c=u[0];u=u[1];var d=c.split("_");a=2<=d.length&&"type"==d[1]?a+(c+"=")+u+"&":a+(c+"=redacted&")}}else a=null;else a=o;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+t+"\n"+n+"\n"+a}))}(e.c,e.m,e.l,e.f,e.S,e.j)}function Nt(e,t,n){for(var r=!0;!e.A&&e.D<n.length;){var i=At(e,n);if(i==kt){4==t&&(e.h=4,ht(14),r=!1),ot(e.c,e.f,null,"[Incomplete Response]");break}if(i==It){e.h=4,ht(15),ot(e.c,e.f,n,"[Invalid Chunk]"),r=!1;break}ot(e.c,e.f,i,null),Ft(e,i)}4==t&&0==n.length&&(e.h=1,ht(16),r=!1),e.b=e.b&&r,r?0<n.length&&!e.V&&(e.V=!0,(t=e.g).a==e&&t.U&&!t.F&&(t.c.info("Great, no buffering proxy detected. Bytes received: "+n.length),Yn(t),t.F=!0,ht(11))):(ot(e.c,e.f,n,"[Invalid Chunked Response]"),jt(e),Lt(e))}function At(e,t){var n=e.D,r=t.indexOf("\n",n);return-1==r?kt:(n=Number(t.substring(n,r)),isNaN(n)?It:(r+=1)+n>t.length?kt:(t=t.substr(r,n),e.D=r+n,t))}function Dt(e){e.T=k()+e.P,Rt(e,e.P)}function Rt(e,t){if(null!=e.o)throw Error("WatchDog timer not null");e.o=pt(T(e.Va,e),t)}function Mt(e){e.o&&(y.clearTimeout(e.o),e.o=null)}function Lt(e){0==e.g.v||e.A||er(e.g,e)}function jt(e){Mt(e);var t=e.F;t&&"function"==typeof t.ja&&t.ja(),e.F=null,Qe(e.R),rt(e.J),e.a&&(t=e.a,e.a=null,t.abort(),t.ja())}function Ft(e,t){try{var n=e.g;if(0!=n.v&&(n.a==e||yn(n.b,e)))if(n.I=e.N,!e.C&&yn(n.b,e)&&3==n.v){try{var r=n.ka.a.parse(t)}catch(e){r=null}if(Array.isArray(r)&&3==r.length){var i=r;if(0==i[0]){e:if(!n.j){if(n.a){if(!(n.a.u+3e3<e.u))break e;Jn(n),Un(n)}Qn(n),ht(18)}}else n.oa=i[1],0<n.oa-n.P&&37500>i[2]&&n.H&&0==n.o&&!n.m&&(n.m=pt(T(n.Sa,n),6e3));if(1>=vn(n.b)&&n.ea){try{n.ea()}catch(e){}n.ea=void 0}}else nr(n,11)}else if((e.C||n.a==e)&&Jn(n),!M(t))for(t=r=n.ka.a.parse(t),r=0;r<t.length;r++)if(i=t[r],n.P=i[0],i=i[1],2==n.v)if("c"==i[0]){n.J=i[1],n.ga=i[2];var o=i[3];null!=o&&(n.ha=o,n.c.info("VER="+n.ha));var a=i[4];null!=a&&(n.pa=a,n.c.info("SVER="+n.pa));var s=i[5];if(null!=s&&"number"==typeof s&&0<s){var l=1.5*s;n.D=l,n.c.info("backChannelRequestTimeoutMs_="+l)}l=n;var u=e.a;if(u){var c=u.a?u.a.getResponseHeader("X-Client-Wire-Protocol"):null;if(c){var d=l.b;!d.a&&(F(c,"spdy")||F(c,"quic")||F(c,"h2"))&&(d.f=d.g,d.a=new Set,d.b&&(bn(d,d.b),d.b=null))}if(l.A){var h=u.a?u.a.getResponseHeader("X-HTTP-Session-Id"):null;h&&(l.na=h,Qt(l.B,l.A,h))}}n.v=3,n.f&&n.f.ta(),n.U&&(n.N=k()-e.u,n.c.info("Handshake RTT: "+n.N+"ms"));var f=e;if((l=n).la=ir(l,l.C?l.ga:null,l.fa),f.C){wn(l.b,f);var p=f,m=l.D;m&&p.setTimeout(m),p.o&&(Mt(p),Dt(p)),l.a=f}else Gn(l);0<n.g.length&&$n(n)}else"stop"!=i[0]&&"close"!=i[0]||nr(n,7);else 3==n.v&&("stop"==i[0]||"close"==i[0]?"stop"==i[0]?nr(n,7):zn(n):"noop"!=i[0]&&n.f&&n.f.sa(i),n.o=0);ct(4)}catch(e){}}function Wt(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(w(e)||"string"==typeof e)A(e,t,void 0);else{if(e.L&&"function"==typeof e.L)var n=e.L();else if(e.K&&"function"==typeof e.K)n=void 0;else if(w(e)||"string"==typeof e){n=[];for(var r=e.length,i=0;i<r;i++)n.push(i)}else for(i in n=[],r=0,e)n[r++]=i;i=(r=function(e){if(e.K&&"function"==typeof e.K)return e.K();if("string"==typeof e)return e.split("");if(w(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}for(r in t=[],n=0,e)t[n++]=e[r];return t}(e)).length;for(var o=0;o<i;o++)t.call(void 0,r[o],n&&n[o],e)}}function Bt(e,t){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(e)if(e instanceof Bt)for(n=e.L(),r=0;r<n.length;r++)this.set(n[r],e.get(n[r]));else for(r in e)this.set(r,e[r])}function zt(e){if(e.c!=e.a.length){for(var t=0,n=0;t<e.a.length;){var r=e.a[t];Ut(e.b,r)&&(e.a[n++]=r),t++}e.a.length=n}if(e.c!=e.a.length){var i={};for(n=t=0;t<e.a.length;)Ut(i,r=e.a[t])||(e.a[n++]=r,i[r]=1),t++;e.a.length=n}}function Ut(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(m=xt.prototype).setTimeout=function(e){this.P=e},m.Xa=function(e){e=e.target;var t=this.F;t&&3==jn(e)?t.f():this.Ca(e)},m.Ca=function(e){try{if(e==this.a)e:{var t=jn(this.a),n=this.a.ua(),r=this.a.W();if(!(3>t||3==t&&!X&&!this.a.$())){this.A||4!=t||7==n||ct(8==n||0>=r?3:2),Mt(this);var i=this.a.W();this.N=i;var o=this.a.$();if(this.b=200==i,function(e,t,n,r,i,o,a){e.info((function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+t+"\n"+n+"\n"+o+" "+a}))}(this.c,this.m,this.l,this.f,this.S,t,i),this.b){if(this.U&&!this.C){t:{if(this.a){var a,s=this.a;if((a=s.a?s.a.getResponseHeader("X-HTTP-Initial-Response"):null)&&!M(a)){var l=a;break t}}l=null}if(!l){this.b=!1,this.h=3,ht(12),jt(this),Lt(this);break e}ot(this.c,this.f,l,"Initial handshake response via X-HTTP-Initial-Response"),this.C=!0,Ft(this,l)}this.I?(Nt(this,t,o),X&&this.b&&3==t&&(nt(this.J,this.R,"tick",this.Wa),this.R.start())):(ot(this.c,this.f,o,null),Ft(this,o)),4==t&&jt(this),this.b&&!this.A&&(4==t?er(this.g,this):(this.b=!1,Dt(this)))}else 400==i&&0<o.indexOf("Unknown SID")?(this.h=3,ht(12)):(this.h=0,ht(13)),jt(this),Lt(this)}}}catch(e){}},m.Wa=function(){if(this.a){var e=jn(this.a),t=this.a.$();this.D<t.length&&(Mt(this),Nt(this,e,t),this.b&&4!=e&&Dt(this))}},m.cancel=function(){this.A=!0,jt(this)},m.Va=function(){this.o=null;var e=k();0<=e-this.T?(function(e,t){e.info((function(){return"TIMEOUT: "+t}))}(this.c,this.l),2!=this.H&&(ct(3),ht(17)),jt(this),this.h=2,Lt(this)):Rt(this,this.T-e)},(m=Bt.prototype).K=function(){zt(this);for(var e=[],t=0;t<this.a.length;t++)e.push(this.b[this.a[t]]);return e},m.L=function(){return zt(this),this.a.concat()},m.get=function(e,t){return Ut(this.b,e)?this.b[e]:t},m.set=function(e,t){Ut(this.b,e)||(this.c++,this.a.push(e)),this.b[e]=t},m.forEach=function(e,t){for(var n=this.L(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);e.call(t,o,i,this)}};var Vt=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function Zt(e,t){if(this.c=this.j=this.f="",this.h=null,this.i=this.g="",this.a=!1,e instanceof Zt){this.a=void 0!==t?t:e.a,qt(this,e.f),this.j=e.j,Ht(this,e.c),Kt(this,e.h),this.g=e.g,t=e.b;var n=new sn;n.c=t.c,t.a&&(n.a=new Bt(t.a),n.b=t.b),Gt(this,n),this.i=e.i}else e&&(n=String(e).match(Vt))?(this.a=!!t,qt(this,n[1]||"",!0),this.j=Xt(n[2]||""),Ht(this,n[3]||"",!0),Kt(this,n[4]),this.g=Xt(n[5]||"",!0),Gt(this,n[6]||"",!0),this.i=Xt(n[7]||"")):(this.a=!!t,this.b=new sn(null,this.a))}function $t(e){return new Zt(e)}function qt(e,t,n){e.f=n?Xt(t,!0):t,e.f&&(e.f=e.f.replace(/:$/,""))}function Ht(e,t,n){e.c=n?Xt(t,!0):t}function Kt(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.h=t}else e.h=null}function Gt(e,t,n){t instanceof sn?(e.b=t,function(e,t){t&&!e.f&&(ln(e),e.c=null,e.a.forEach((function(e,t){var n=t.toLowerCase();t!=n&&(un(this,t),dn(this,n,e))}),e)),e.f=t}(e.b,e.a)):(n||(t=Jt(t,on)),e.b=new sn(t,e.a))}function Qt(e,t,n){e.b.set(t,n)}function Yt(e){return Qt(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^k()).toString(36)),e}function Xt(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function Jt(e,t,n){return"string"==typeof e?(e=encodeURI(e).replace(t,en),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function en(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}Zt.prototype.toString=function(){var e=[],t=this.f;t&&e.push(Jt(t,tn,!0),":");var n=this.c;return(n||"file"==t)&&(e.push("//"),(t=this.j)&&e.push(Jt(t,tn,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.h)&&e.push(":",String(n))),(n=this.g)&&(this.c&&"/"!=n.charAt(0)&&e.push("/"),e.push(Jt(n,"/"==n.charAt(0)?rn:nn,!0))),(n=this.b.toString())&&e.push("?",n),(n=this.i)&&e.push("#",Jt(n,an)),e.join("")};var tn=/[#\/\?@]/g,nn=/[#\?:]/g,rn=/[#\?]/g,on=/[#\?@]/g,an=/#/g;function sn(e,t){this.b=this.a=null,this.c=e||null,this.f=!!t}function ln(e){e.a||(e.a=new Bt,e.b=0,e.c&&function(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),i=null;if(0<=r){var o=e[n].substring(0,r);i=e[n].substring(r+1)}else o=e[n];t(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.c,(function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)})))}function un(e,t){ln(e),t=hn(e,t),Ut(e.a.b,t)&&(e.c=null,e.b-=e.a.get(t).length,Ut((e=e.a).b,t)&&(delete e.b[t],e.c--,e.a.length>2*e.c&&zt(e)))}function cn(e,t){return ln(e),t=hn(e,t),Ut(e.a.b,t)}function dn(e,t,n){un(e,t),0<n.length&&(e.c=null,e.a.set(hn(e,t),R(n)),e.b+=n.length)}function hn(e,t){return t=String(t),e.f&&(t=t.toLowerCase()),t}(m=sn.prototype).add=function(e,t){ln(this),this.c=null,e=hn(this,e);var n=this.a.get(e);return n||this.a.set(e,n=[]),n.push(t),this.b+=1,this},m.forEach=function(e,t){ln(this),this.a.forEach((function(n,r){A(n,(function(n){e.call(t,n,r,this)}),this)}),this)},m.L=function(){ln(this);for(var e=this.a.K(),t=this.a.L(),n=[],r=0;r<t.length;r++)for(var i=e[r],o=0;o<i.length;o++)n.push(t[r]);return n},m.K=function(e){ln(this);var t=[];if("string"==typeof e)cn(this,e)&&(t=D(t,this.a.get(hn(this,e))));else{e=this.a.K();for(var n=0;n<e.length;n++)t=D(t,e[n])}return t},m.set=function(e,t){return ln(this),this.c=null,cn(this,e=hn(this,e))&&(this.b-=this.a.get(e).length),this.a.set(e,[t]),this.b+=1,this},m.get=function(e,t){return e&&0<(e=this.K(e)).length?String(e[0]):t},m.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var e=[],t=this.a.L(),n=0;n<t.length;n++){var r=t[n],i=encodeURIComponent(String(r));r=this.K(r);for(var o=0;o<r.length;o++){var a=i;""!==r[o]&&(a+="="+encodeURIComponent(String(r[o]))),e.push(a)}}return this.c=e.join("&")};var fn=function(e,t){this.b=e,this.a=t};function pn(e){this.g=e||mn,e=y.PerformanceNavigationTiming?0<(e=y.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):!!(y.ia&&y.ia.ya&&y.ia.ya()&&y.ia.ya().Lb),this.f=e?this.g:1,this.a=null,1<this.f&&(this.a=new Set),this.b=null,this.c=[]}var mn=10;function gn(e){return!!e.b||!!e.a&&e.a.size>=e.f}function vn(e){return e.b?1:e.a?e.a.size:0}function yn(e,t){return e.b?e.b==t:!!e.a&&e.a.has(t)}function bn(e,t){e.a?e.a.add(t):e.b=t}function wn(e,t){e.b&&e.b==t?e.b=null:e.a&&e.a.has(t)&&e.a.delete(t)}function En(e){var t,n;if(null!=e.b)return e.c.concat(e.b.s);if(null!=e.a&&0!==e.a.size){var r=e.c;try{for(var i=p(e.a.values()),o=i.next();!o.done;o=i.next()){var a=o.value;r=r.concat(a.s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}return R(e.c)}function _n(){}function Cn(){this.a=new _n}function Sn(e,t,n){var r=n||"";try{Wt(e,(function(e,n){var i=e;E(e)&&(i=Fe(e)),t.push(r+n+"="+encodeURIComponent(i))}))}catch(e){throw t.push(r+"type="+encodeURIComponent("_badmap")),e}}function xn(e,t,n,r,i){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,i(r)}catch(e){}}pn.prototype.cancel=function(){var e,t;if(this.c=En(this),this.b)this.b.cancel(),this.b=null;else if(this.a&&0!==this.a.size){try{for(var n=p(this.a.values()),r=n.next();!r.done;r=n.next())r.value.cancel()}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.a.clear()}},_n.prototype.stringify=function(e){return y.JSON.stringify(e,void 0)},_n.prototype.parse=function(e){return y.JSON.parse(e,void 0)};var Tn=y.JSON.parse;function In(e){Me.call(this),this.headers=new Bt,this.H=e||null,this.b=!1,this.s=this.a=null,this.B="",this.h=0,this.f="",this.g=this.A=this.l=this.u=!1,this.o=0,this.m=null,this.I=kn,this.D=this.F=!1}O(In,Me);var kn="",On=/^https?$/i,Pn=["POST","PUT"];function Nn(e){return"content-type"==e.toLowerCase()}function An(e,t){e.b=!1,e.a&&(e.g=!0,e.a.abort(),e.g=!1),e.f=t,e.h=5,Dn(e),Mn(e)}function Dn(e){e.u||(e.u=!0,Le(e,"complete"),Le(e,"error"))}function Rn(e){if(e.b&&void 0!==v&&(!e.s[1]||4!=jn(e)||2!=e.W()))if(e.l&&4==jn(e))Ye(e.za,0,e);else if(Le(e,"readystatechange"),4==jn(e)){e.b=!1;try{var t,n=e.W();e:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break e;default:r=!1}if(!(t=r)){var i;if(i=0===n){var o=String(e.B).match(Vt)[1]||null;if(!o&&y.self&&y.self.location){var a=y.self.location.protocol;o=a.substr(0,a.length-1)}i=!On.test(o?o.toLowerCase():"")}t=i}if(t)Le(e,"complete"),Le(e,"success");else{e.h=6;try{var s=2<jn(e)?e.a.statusText:""}catch(n){s=""}e.f=s+" ["+e.W()+"]",Dn(e)}}finally{Mn(e)}}}function Mn(e,t){if(e.a){Ln(e);var n=e.a,r=e.s[0]?b:null;e.a=null,e.s=null,t||Le(e,"ready");try{n.onreadystatechange=r}catch(e){}}}function Ln(e){e.a&&e.D&&(e.a.ontimeout=null),e.m&&(y.clearTimeout(e.m),e.m=null)}function jn(e){return e.a?e.a.readyState:0}function Fn(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=function(e){var t="";return U(e,(function(e,n){t+=n,t+=":",t+=e,t+="\r\n"})),t}(n),"string"==typeof e?null!=n&&encodeURIComponent(String(n)):Qt(e,t,n))}function Wn(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function Bn(e){this.pa=0,this.g=[],this.c=new it,this.ga=this.la=this.B=this.fa=this.a=this.na=this.A=this.V=this.i=this.O=this.l=null,this.Oa=this.R=0,this.La=Wn("failFast",!1,e),this.H=this.m=this.j=this.h=this.f=null,this.S=!0,this.I=this.oa=this.P=-1,this.T=this.o=this.u=0,this.Ha=Wn("baseRetryDelayMs",5e3,e),this.Ra=Wn("retryDelaySeedMs",1e4,e),this.Ma=Wn("forwardChannelMaxRetries",2,e),this.ma=Wn("forwardChannelRequestTimeoutMs",2e4,e),this.Na=e&&e.g||void 0,this.D=void 0,this.C=e&&e.supportsCrossDomainXhr||!1,this.J="",this.b=new pn(e&&e.concurrentRequestLimit),this.ka=new Cn,this.da=e&&e.fastHandshake||!1,this.Ia=e&&e.b||!1,e&&e.f&&(this.c.a=!1),e&&e.forceLongPolling&&(this.S=!1),this.U=!this.da&&this.S&&e&&e.detectBufferingProxy||!1,this.ea=void 0,this.N=0,this.F=!1,this.s=null,(this.Ka=e&&e.c||!1)&&this.c.info("Opt-in to enable Chrome Origin Trials.")}function zn(e){if(Vn(e),3==e.v){var t=e.R++,n=$t(e.B);Qt(n,"SID",e.J),Qt(n,"RID",t),Qt(n,"TYPE","terminate"),Hn(e,n),(t=new xt(e,e.c,t,void 0)).H=2,t.i=Yt($t(n)),n=!1,y.navigator&&y.navigator.sendBeacon&&(n=y.navigator.sendBeacon(t.i.toString(),"")),!n&&y.Image&&((new Image).src=t.i,n=!0),n||(t.a=or(t.g,null),t.a.ba(t.i)),t.u=k(),Dt(t)}rr(e)}function Un(e){e.a&&(Yn(e),e.a.cancel(),e.a=null)}function Vn(e){Un(e),e.j&&(y.clearTimeout(e.j),e.j=null),Jn(e),e.b.cancel(),e.h&&("number"==typeof e.h&&y.clearTimeout(e.h),e.h=null)}function Zn(e,t){e.g.push(new fn(e.Oa++,t)),3==e.v&&$n(e)}function $n(e){gn(e.b)||e.h||(e.h=!0,$e(e.Ba,e),e.u=0)}function qn(e,t){var n;n=t?t.f:e.R++;var r=$t(e.B);Qt(r,"SID",e.J),Qt(r,"RID",n),Qt(r,"AID",e.P),Hn(e,r),e.i&&e.l&&Fn(r,e.i,e.l),n=new xt(e,e.c,n,e.u+1),null===e.i&&(n.B=e.l),t&&(e.g=t.s.concat(e.g)),t=Kn(e,n,1e3),n.setTimeout(Math.round(.5*e.ma)+Math.round(.5*e.ma*Math.random())),bn(e.b,n),Ot(n,r,t)}function Hn(e,t){e.f&&Wt({},(function(e,n){Qt(t,n,e)}))}function Kn(e,t,n){n=Math.min(e.g.length,n);var r=e.f?T(e.f.Ja,e.f,e):null;e:for(var i=e.g,o=-1;;){var a=["count="+n];-1==o?0<n?(o=i[0].b,a.push("ofs="+o)):o=0:a.push("ofs="+o);for(var s=!0,l=0;l<n;l++){var u=i[l].b,c=i[l].a;if(0>(u-=o))o=Math.max(0,i[l].b-100),s=!1;else try{Sn(c,a,"req"+u+"_")}catch(e){r&&r(c)}}if(s){r=a.join("&");break e}}return e=e.g.splice(0,n),t.s=e,r}function Gn(e){e.a||e.j||(e.T=1,$e(e.Aa,e),e.o=0)}function Qn(e){return!(e.a||e.j||3<=e.o||(e.T++,e.j=pt(T(e.Aa,e),tr(e,e.o)),e.o++,0))}function Yn(e){null!=e.s&&(y.clearTimeout(e.s),e.s=null)}function Xn(e){e.a=new xt(e,e.c,"rpc",e.T),null===e.i&&(e.a.B=e.l),e.a.O=0;var t=$t(e.la);Qt(t,"RID","rpc"),Qt(t,"SID",e.J),Qt(t,"CI",e.H?"0":"1"),Qt(t,"AID",e.P),Hn(e,t),Qt(t,"TYPE","xmlhttp"),e.i&&e.l&&Fn(t,e.i,e.l),e.D&&e.a.setTimeout(e.D);var n=e.a;e=e.ga,n.H=1,n.i=Yt($t(t)),n.j=null,n.I=!0,Pt(n,e)}function Jn(e){null!=e.m&&(y.clearTimeout(e.m),e.m=null)}function er(e,t){var n=null;if(e.a==t){Jn(e),Yn(e),e.a=null;var r=2}else{if(!yn(e.b,t))return;n=t.s,wn(e.b,t),r=1}if(e.I=t.N,0!=e.v)if(t.b)if(1==r){n=t.j?t.j.length:0,t=k()-t.u;var i=e.u;Le(r=lt(),new ft(r,n,t,i)),$n(e)}else Gn(e);else if(3==(i=t.h)||0==i&&0<e.I||!(1==r&&function(e,t){return!(vn(e.b)>=e.b.f-(e.h?1:0)||(e.h?(e.g=t.s.concat(e.g),0):1==e.v||2==e.v||e.u>=(e.La?0:e.Ma)||(e.h=pt(T(e.Ba,e,t),tr(e,e.u)),e.u++,0)))}(e,t)||2==r&&Qn(e)))switch(n&&0<n.length&&(t=e.b,t.c=t.c.concat(n)),i){case 1:nr(e,5);break;case 4:nr(e,10);break;case 3:nr(e,6);break;default:nr(e,2)}}function tr(e,t){var n=e.Ha+Math.floor(Math.random()*e.Ra);return e.f||(n*=2),n*t}function nr(e,t){if(e.c.info("Error code "+t),2==t){var n=null;e.f&&(n=null);var r=T(e.Ya,e);n||(n=new Zt("//www.google.com/images/cleardot.gif"),y.location&&"http"==y.location.protocol||qt(n,"https"),Yt(n)),function(e,t){var n=new it;if(y.Image){var r=new Image;r.onload=I(xn,n,r,"TestLoadImage: loaded",!0,t),r.onerror=I(xn,n,r,"TestLoadImage: error",!1,t),r.onabort=I(xn,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=I(xn,n,r,"TestLoadImage: timeout",!1,t),y.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=e}else t(!1)}(n.toString(),r)}else ht(2);e.v=0,e.f&&e.f.ra(t),rr(e),Vn(e)}function rr(e){e.v=0,e.I=-1,e.f&&(0==En(e.b).length&&0==e.g.length||(e.b.c.length=0,R(e.g),e.g.length=0),e.f.qa())}function ir(e,t,n){var r=function(e){return e instanceof Zt?$t(e):new Zt(e,void 0)}(n);if(""!=r.c)t&&Ht(r,t+"."+r.c),Kt(r,r.h);else{var i=y.location;r=function(e,t,n,r){var i=new Zt(null,void 0);return e&&qt(i,e),t&&Ht(i,t),n&&Kt(i,n),r&&(i.g=r),i}(i.protocol,t?t+"."+i.hostname:i.hostname,+i.port,n)}return e.V&&U(e.V,(function(e,t){Qt(r,t,e)})),t=e.A,n=e.na,t&&n&&Qt(r,t,n),Qt(r,"VER",e.ha),Hn(e,r),r}function or(e,t){if(t&&!e.C)throw Error("Can't create secondary domain capable XhrIo object.");return(t=new In(e.Na)).F=e.C,t}function ar(){}function sr(){if(Q&&!(10<=Number(le)))throw Error("Environmental error: no available transport.")}function lr(e,t){Me.call(this),this.a=new Bn(t),this.o=e,this.b=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.a.l=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e["X-WebChannel-Content-Type"]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.a&&(e?e["X-WebChannel-Client-Profile"]=t.a:e={"X-WebChannel-Client-Profile":t.a}),this.a.O=e,(e=t&&t.httpHeadersOverwriteParam)&&!M(e)&&(this.a.i=e),this.m=t&&t.supportsCrossDomainXhr||!1,this.l=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!M(t)&&(this.a.A=t,null!==(e=this.b)&&t in e&&t in(e=this.b)&&delete e[t]),this.f=new dr(this)}function ur(e){_t.call(this);var t=e.__sm__;if(t){e:{for(var n in t){e=n;break e}e=void 0}(this.c=e)?(e=this.c,this.data=null!==t&&e in t?t[e]:void 0):this.data=t}else this.data=e}function cr(){Ct.call(this),this.status=1}function dr(e){this.a=e}(m=In.prototype).ba=function(e,t,n,r){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.B+"; newUri="+e);t=t?t.toUpperCase():"GET",this.B=e,this.f="",this.h=0,this.u=!1,this.b=!0,this.a=new XMLHttpRequest,this.s=this.H?yt(this.H):yt(wt),this.a.onreadystatechange=T(this.za,this);try{this.A=!0,this.a.open(t,String(e),!0),this.A=!1}catch(e){return void An(this,e)}e=n||"";var i=new Bt(this.headers);r&&Wt(r,(function(e,t){i.set(t,e)})),r=function(e){e:{for(var t=Nn,n=e.length,r="string"==typeof e?e.split(""):e,i=0;i<n;i++)if(i in r&&t.call(void 0,r[i],i,e)){t=i;break e}t=-1}return 0>t?null:"string"==typeof e?e.charAt(t):e[t]}(i.L()),n=y.FormData&&e instanceof y.FormData,!(0<=N(Pn,t))||r||n||i.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),i.forEach((function(e,t){this.a.setRequestHeader(t,e)}),this),this.I&&(this.a.responseType=this.I),"withCredentials"in this.a&&this.a.withCredentials!==this.F&&(this.a.withCredentials=this.F);try{Ln(this),0<this.o&&((this.D=function(e){return Q&&se(9)&&"number"==typeof e.timeout&&void 0!==e.ontimeout}(this.a))?(this.a.timeout=this.o,this.a.ontimeout=T(this.xa,this)):this.m=Ye(this.xa,this.o,this)),this.l=!0,this.a.send(e),this.l=!1}catch(e){An(this,e)}},m.xa=function(){void 0!==v&&this.a&&(this.f="Timed out after "+this.o+"ms, aborting",this.h=8,Le(this,"timeout"),this.abort(8))},m.abort=function(e){this.a&&this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1,this.h=e||7,Le(this,"complete"),Le(this,"abort"),Mn(this))},m.G=function(){this.a&&(this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1),Mn(this,!0)),In.X.G.call(this)},m.za=function(){this.j||(this.A||this.l||this.g?Rn(this):this.Ua())},m.Ua=function(){Rn(this)},m.W=function(){try{return 2<jn(this)?this.a.status:-1}catch(e){return-1}},m.$=function(){try{return this.a?this.a.responseText:""}catch(e){return""}},m.Pa=function(e){if(this.a){var t=this.a.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),Tn(t)}},m.ua=function(){return this.h},m.Qa=function(){return"string"==typeof this.f?this.f:String(this.f)},(m=Bn.prototype).ha=8,m.v=1,m.Ba=function(e){if(this.h)if(this.h=null,1==this.v){if(!e){this.R=Math.floor(1e5*Math.random()),e=this.R++;var t,n=new xt(this,this.c,e,void 0),r=this.l;if(this.O&&(r?$(r=V(r),this.O):r=this.O),null===this.i&&(n.B=r),this.da)e:{for(var i=t=0;i<this.g.length;i++){var o=this.g[i];if(void 0===(o="__data__"in o.a&&"string"==typeof(o=o.a.__data__)?o.length:void 0))break;if(4096<(t+=o)){t=i;break e}if(4096===t||i===this.g.length-1){t=i+1;break e}}t=1e3}else t=1e3;t=Kn(this,n,t),Qt(i=$t(this.B),"RID",e),Qt(i,"CVER",22),this.A&&Qt(i,"X-HTTP-Session-Id",this.A),Hn(this,i),this.i&&r&&Fn(i,this.i,r),bn(this.b,n),this.Ia&&Qt(i,"TYPE","init"),this.da?(Qt(i,"$req",t),Qt(i,"SID","null"),n.U=!0,Ot(n,i,null)):Ot(n,i,t),this.v=2}}else 3==this.v&&(e?qn(this,e):0==this.g.length||gn(this.b)||qn(this))},m.Aa=function(){if(this.j=null,Xn(this),this.U&&!(this.F||null==this.a||0>=this.N)){var e=2*this.N;this.c.info("BP detection timer enabled: "+e),this.s=pt(T(this.Ta,this),e)}},m.Ta=function(){this.s&&(this.s=null,this.c.info("BP detection timeout reached."),this.c.info("Buffering proxy detected and switch to long-polling!"),this.H=!1,this.F=!0,ht(10),Un(this),Xn(this))},m.Sa=function(){null!=this.m&&(this.m=null,Un(this),Qn(this),ht(19))},m.Ya=function(e){e?(this.c.info("Successfully pinged google.com"),ht(2)):(this.c.info("Failed to ping google.com"),ht(1))},(m=ar.prototype).ta=function(){},m.sa=function(){},m.ra=function(){},m.qa=function(){},m.Ja=function(){},sr.prototype.a=function(e,t){return new lr(e,t)},O(lr,Me),lr.prototype.g=function(){this.a.f=this.f,this.m&&(this.a.C=!0);var e=this.a,t=this.o,n=this.b||void 0;ht(0),e.fa=t,e.V=n||{},e.H=e.S,e.B=ir(e,null,e.fa),$n(e)},lr.prototype.close=function(){zn(this.a)},lr.prototype.h=function(e){if("string"==typeof e){var t={};t.__data__=e,Zn(this.a,t)}else this.l?((t={}).__data__=Fe(e),Zn(this.a,t)):Zn(this.a,e)},lr.prototype.G=function(){this.a.f=null,delete this.f,zn(this.a),delete this.a,lr.X.G.call(this)},O(ur,_t),O(cr,Ct),O(dr,ar),dr.prototype.ta=function(){Le(this.a,"a")},dr.prototype.sa=function(e){Le(this.a,new ur(e))},dr.prototype.ra=function(e){Le(this.a,new cr(e))},dr.prototype.qa=function(){Le(this.a,"b")},sr.prototype.createWebChannel=sr.prototype.a,lr.prototype.send=lr.prototype.h,lr.prototype.open=lr.prototype.g,lr.prototype.close=lr.prototype.close,mt.NO_ERROR=0,mt.TIMEOUT=8,mt.HTTP_ERROR=6,gt.COMPLETE="complete",bt.EventType=Et,Et.OPEN="a",Et.CLOSE="b",Et.ERROR="c",Et.MESSAGE="d",Me.prototype.listen=Me.prototype.va,In.prototype.listenOnce=In.prototype.wa,In.prototype.getLastError=In.prototype.Qa,In.prototype.getLastErrorCode=In.prototype.ua,In.prototype.getStatus=In.prototype.W,In.prototype.getResponseJson=In.prototype.Pa,In.prototype.getResponseText=In.prototype.$,In.prototype.send=In.prototype.ba;var hr=mt,fr=gt,pr=at,mr=10,gr=11,vr=bt,yr=In;let br="8.6.1";class wr{constructor(e,t){this.previousValue=e,t&&(t.sequenceNumberHandler=e=>this.t(e),this.i=e=>t.writeSequenceNumber(e))}t(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.i&&this.i(e),e}}wr.o=-1;const Er={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 _r extends Error{constructor(e,t){super(t),this.code=e,this.message=t,this.name="FirebaseError",this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}const Cr=new h.Yd("@firebase/firestore");function Sr(){return Cr.logLevel}function xr(e){Cr.setLogLevel(e)}function Tr(e,...t){if(Cr.logLevel<=h.in.DEBUG){const n=t.map(Or);Cr.debug(`Firestore (${br}): ${e}`,...n)}}function Ir(e,...t){if(Cr.logLevel<=h.in.ERROR){const n=t.map(Or);Cr.error(`Firestore (${br}): ${e}`,...n)}}function kr(e,...t){if(Cr.logLevel<=h.in.WARN){const n=t.map(Or);Cr.warn(`Firestore (${br}): ${e}`,...n)}}function Or(e){if("string"==typeof e)return e;try{return t=e,JSON.stringify(t)}catch(t){return e}var t}function Pr(e="Unexpected state"){const t=`FIRESTORE (${br}) INTERNAL ASSERTION FAILED: `+e;throw Ir(t),new Error(t)}function Nr(e,t){e||Pr()}function Ar(e,t){return e}function Dr(e){const t="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(e);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(n);else for(let t=0;t<e;t++)n[t]=Math.floor(256*Math.random());return n}class Rr{static u(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=Math.floor(256/e.length)*e.length;let n="";for(;n.length<20;){const r=Dr(40);for(let i=0;i<r.length;++i)n.length<20&&r[i]<t&&(n+=e.charAt(r[i]%e.length))}return n}}function Mr(e,t){return e<t?-1:e>t?1:0}function Lr(e,t,n){return e.length===t.length&&e.every(((e,r)=>n(e,t[r])))}function jr(e){return e+"\0"}class Fr{constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0)throw new _r(Er.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(t>=1e9)throw new _r(Er.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<-62135596800)throw new _r(Er.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new _r(Er.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return Fr.fromMillis(Date.now())}static fromDate(e){return Fr.fromMillis(e.getTime())}static fromMillis(e){const t=Math.floor(e/1e3),n=Math.floor(1e6*(e-1e3*t));return new Fr(t,n)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?Mr(this.nanoseconds,e.nanoseconds):Mr(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")}}class Wr{constructor(e){this.timestamp=e}static fromTimestamp(e){return new Wr(e)}static min(){return new Wr(new Fr(0,0))}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}}function Br(e){let t=0;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function zr(e,t){for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function Ur(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}class Vr{constructor(e,t,n){void 0===t?t=0:t>e.length&&Pr(),void 0===n?n=e.length-t:n>e.length-t&&Pr(),this.segments=e,this.offset=t,this.len=n}get length(){return this.len}isEqual(e){return 0===Vr.comparator(this,e)}child(e){const t=this.segments.slice(this.offset,this.limit());return e instanceof Vr?e.forEach((e=>{t.push(e)})):t.push(e),this.construct(t)}limit(){return this.offset+this.length}popFirst(e){return e=void 0===e?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 0===this.length}isPrefixOf(e){if(e.length<this.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}forEach(e){for(let t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,t){const n=Math.min(e.length,t.length);for(let r=0;r<n;r++){const n=e.get(r),i=t.get(r);if(n<i)return-1;if(n>i)return 1}return e.length<t.length?-1:e.length>t.length?1:0}}class Zr extends Vr{construct(e,t,n){return new Zr(e,t,n)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}static fromString(...e){const t=[];for(const n of e){if(n.indexOf("//")>=0)throw new _r(Er.INVALID_ARGUMENT,`Invalid segment (${n}). Paths must not contain // in them.`);t.push(...n.split("/").filter((e=>e.length>0)))}return new Zr(t)}static emptyPath(){return new Zr([])}}const $r=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class qr extends Vr{construct(e,t,n){return new qr(e,t,n)}static isValidIdentifier(e){return $r.test(e)}canonicalString(){return this.toArray().map((e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),qr.isValidIdentifier(e)||(e="`"+e+"`"),e))).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&"__name__"===this.get(0)}static keyField(){return new qr(["__name__"])}static fromServerFormat(e){const t=[];let n="",r=0;const i=()=>{if(0===n.length)throw new _r(Er.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(n),n=""};let o=!1;for(;r<e.length;){const t=e[r];if("\\"===t){if(r+1===e.length)throw new _r(Er.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const t=e[r+1];if("\\"!==t&&"."!==t&&"`"!==t)throw new _r(Er.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);n+=t,r+=2}else"`"===t?(o=!o,r++):"."!==t||o?(n+=t,r++):(i(),r++)}if(i(),o)throw new _r(Er.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new qr(t)}static emptyPath(){return new qr([])}}class Hr{constructor(e){this.fields=e,e.sort(qr.comparator)}covers(e){for(const t of this.fields)if(t.isPrefixOf(e))return!0;return!1}isEqual(e){return Lr(this.fields,e.fields,((e,t)=>e.isEqual(t)))}}class Kr{constructor(e){this.binaryString=e}static fromBase64String(e){const t=atob(e);return new Kr(t)}static fromUint8Array(e){const t=function(e){let t="";for(let n=0;n<e.length;++n)t+=String.fromCharCode(e[n]);return t}(e);return new Kr(t)}toBase64(){return e=this.binaryString,btoa(e);var e}toUint8Array(){return function(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return Mr(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}Kr.EMPTY_BYTE_STRING=new Kr("");const Gr=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Qr(e){if(Nr(!!e),"string"==typeof e){let t=0;const n=Gr.exec(e);if(Nr(!!n),n[1]){let e=n[1];e=(e+"000000000").substr(0,9),t=Number(e)}const r=new Date(e);return{seconds:Math.floor(r.getTime()/1e3),nanos:t}}return{seconds:Yr(e.seconds),nanos:Yr(e.nanos)}}function Yr(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function Xr(e){return"string"==typeof e?Kr.fromBase64String(e):Kr.fromUint8Array(e)}function Jr(e){var t,n;return"server_timestamp"===(null===(n=((null===(t=null==e?void 0:e.mapValue)||void 0===t?void 0:t.fields)||{}).__type__)||void 0===n?void 0:n.stringValue)}function ei(e){const t=e.mapValue.fields.__previous_value__;return Jr(t)?ei(t):t}function ti(e){const t=Qr(e.mapValue.fields.__local_write_time__.timestampValue);return new Fr(t.seconds,t.nanos)}function ni(e){return null==e}function ri(e){return 0===e&&1/e==-1/0}function ii(e){return"number"==typeof e&&Number.isInteger(e)&&!ri(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER}class oi{constructor(e){this.path=e}static fromPath(e){return new oi(Zr.fromString(e))}static fromName(e){return new oi(Zr.fromString(e).popFirst(5))}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}isEqual(e){return null!==e&&0===Zr.comparator(this.path,e.path)}toString(){return this.path.toString()}static comparator(e,t){return Zr.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new oi(new Zr(e.slice()))}}function ai(e){return"nullValue"in e?0:"booleanValue"in e?1:"integerValue"in e||"doubleValue"in e?2:"timestampValue"in e?3:"stringValue"in e?5:"bytesValue"in e?6:"referenceValue"in e?7:"geoPointValue"in e?8:"arrayValue"in e?9:"mapValue"in e?Jr(e)?4:10:Pr()}function si(e,t){const n=ai(e);if(n!==ai(t))return!1;switch(n){case 0:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return ti(e).isEqual(ti(t));case 3:return function(e,t){if("string"==typeof e.timestampValue&&"string"==typeof t.timestampValue&&e.timestampValue.length===t.timestampValue.length)return e.timestampValue===t.timestampValue;const n=Qr(e.timestampValue),r=Qr(t.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(e,t);case 5:return e.stringValue===t.stringValue;case 6:return function(e,t){return Xr(e.bytesValue).isEqual(Xr(t.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(e,t){return Yr(e.geoPointValue.latitude)===Yr(t.geoPointValue.latitude)&&Yr(e.geoPointValue.longitude)===Yr(t.geoPointValue.longitude)}(e,t);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return Yr(e.integerValue)===Yr(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){const n=Yr(e.doubleValue),r=Yr(t.doubleValue);return n===r?ri(n)===ri(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return Lr(e.arrayValue.values||[],t.arrayValue.values||[],si);case 10:return function(e,t){const n=e.mapValue.fields||{},r=t.mapValue.fields||{};if(Br(n)!==Br(r))return!1;for(const e in n)if(n.hasOwnProperty(e)&&(void 0===r[e]||!si(n[e],r[e])))return!1;return!0}(e,t);default:return Pr()}}function li(e,t){return void 0!==(e.values||[]).find((e=>si(e,t)))}function ui(e,t){const n=ai(e),r=ai(t);if(n!==r)return Mr(n,r);switch(n){case 0:return 0;case 1:return Mr(e.booleanValue,t.booleanValue);case 2:return function(e,t){const n=Yr(e.integerValue||e.doubleValue),r=Yr(t.integerValue||t.doubleValue);return n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(e,t);case 3:return ci(e.timestampValue,t.timestampValue);case 4:return ci(ti(e),ti(t));case 5:return Mr(e.stringValue,t.stringValue);case 6:return function(e,t){const n=Xr(e),r=Xr(t);return n.compareTo(r)}(e.bytesValue,t.bytesValue);case 7:return function(e,t){const n=e.split("/"),r=t.split("/");for(let e=0;e<n.length&&e<r.length;e++){const t=Mr(n[e],r[e]);if(0!==t)return t}return Mr(n.length,r.length)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){const n=Mr(Yr(e.latitude),Yr(t.latitude));return 0!==n?n:Mr(Yr(e.longitude),Yr(t.longitude))}(e.geoPointValue,t.geoPointValue);case 9:return function(e,t){const n=e.values||[],r=t.values||[];for(let e=0;e<n.length&&e<r.length;++e){const t=ui(n[e],r[e]);if(t)return t}return Mr(n.length,r.length)}(e.arrayValue,t.arrayValue);case 10:return function(e,t){const n=e.fields||{},r=Object.keys(n),i=t.fields||{},o=Object.keys(i);r.sort(),o.sort();for(let e=0;e<r.length&&e<o.length;++e){const t=Mr(r[e],o[e]);if(0!==t)return t;const a=ui(n[r[e]],i[o[e]]);if(0!==a)return a}return Mr(r.length,o.length)}(e.mapValue,t.mapValue);default:throw Pr()}}function ci(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return Mr(e,t);const n=Qr(e),r=Qr(t),i=Mr(n.seconds,r.seconds);return 0!==i?i:Mr(n.nanos,r.nanos)}function di(e){return hi(e)}function hi(e){return"nullValue"in e?"null":"booleanValue"in e?""+e.booleanValue:"integerValue"in e?""+e.integerValue:"doubleValue"in e?""+e.doubleValue:"timestampValue"in e?function(e){const t=Qr(e);return`time(${t.seconds},${t.nanos})`}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?Xr(e.bytesValue).toBase64():"referenceValue"in e?(n=e.referenceValue,oi.fromName(n).toString()):"geoPointValue"in e?`geo(${(t=e.geoPointValue).latitude},${t.longitude})`:"arrayValue"in e?function(e){let t="[",n=!0;for(const r of e.values||[])n?n=!1:t+=",",t+=hi(r);return t+"]"}(e.arrayValue):"mapValue"in e?function(e){const t=Object.keys(e.fields||{}).sort();let n="{",r=!0;for(const i of t)r?r=!1:n+=",",n+=`${i}:${hi(e.fields[i])}`;return n+"}"}(e.mapValue):Pr();var t,n}function fi(e,t){return{referenceValue:`projects/${e.projectId}/databases/${e.database}/documents/${t.path.canonicalString()}`}}function pi(e){return!!e&&"integerValue"in e}function mi(e){return!!e&&"arrayValue"in e}function gi(e){return!!e&&"nullValue"in e}function vi(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function yi(e){return!!e&&"mapValue"in e}class bi{constructor(e){this.overlayMap=new Map,this.partialValue=e}static empty(){return new bi({mapValue:{}})}field(e){return bi.extractNestedValue(this.buildProto(),e)}toProto(){return this.field(qr.emptyPath())}set(e,t){this.setOverlay(e,t)}setAll(e){e.forEach(((e,t)=>{e?this.set(t,e):this.delete(t)}))}delete(e){this.setOverlay(e,null)}isEqual(e){return si(this.buildProto(),e.buildProto())}setOverlay(e,t){let n=this.overlayMap;for(let t=0;t<e.length-1;++t){const r=e.get(t);let i=n.get(r);i instanceof Map?n=i:i&&10===ai(i)?(i=new Map(Object.entries(i.mapValue.fields||{})),n.set(r,i),n=i):(i=new Map,n.set(r,i),n=i)}n.set(e.lastSegment(),t)}applyOverlay(e,t){let n=!1;const r=bi.extractNestedValue(this.partialValue,e),i=yi(r)?Object.assign({},r.mapValue.fields):{};return t.forEach(((t,r)=>{if(t instanceof Map){const o=this.applyOverlay(e.child(r),t);null!=o&&(i[r]=o,n=!0)}else null!==t?(i[r]=t,n=!0):i.hasOwnProperty(r)&&(delete i[r],n=!0)})),n?{mapValue:{fields:i}}:null}buildProto(){const e=this.applyOverlay(qr.emptyPath(),this.overlayMap);return null!=e&&(this.partialValue=e,this.overlayMap.clear()),this.partialValue}static extractNestedValue(e,t){if(t.isEmpty())return e;{let n=e;for(let e=0;e<t.length-1;++e){if(!n.mapValue.fields)return null;if(n=n.mapValue.fields[t.get(e)],!yi(n))return null}return n=(n.mapValue.fields||{})[t.lastSegment()],n||null}}clone(){return new bi(this.buildProto())}}function wi(e){const t=[];return zr(e.fields||{},((e,n)=>{const r=new qr([e]);if(yi(n)){const e=wi(n.mapValue).fields;if(0===e.length)t.push(r);else for(const n of e)t.push(r.child(n))}else t.push(r)})),new Hr(t)}class Ei{constructor(e,t,n,r,i){this.key=e,this.documentType=t,this.version=n,this.data=r,this.documentState=i}static newInvalidDocument(e){return new Ei(e,0,Wr.min(),bi.empty(),0)}static newFoundDocument(e,t,n){return new Ei(e,1,t,n,0)}static newNoDocument(e,t){return new Ei(e,2,t,bi.empty(),0)}static newUnknownDocument(e,t){return new Ei(e,3,t,bi.empty(),2)}convertToFoundDocument(e,t){return this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=bi.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=bi.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this}get hasLocalMutations(){return 1===this.documentState}get hasCommittedMutations(){return 2===this.documentState}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return 0!==this.documentType}isFoundDocument(){return 1===this.documentType}isNoDocument(){return 2===this.documentType}isUnknownDocument(){return 3===this.documentType}isEqual(e){return e instanceof Ei&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}clone(){return new Ei(this.key,this.documentType,this.version,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.toProto())}, {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}class _i{constructor(e,t=null,n=[],r=[],i=null,o=null,a=null){this.path=e,this.collectionGroup=t,this.orderBy=n,this.filters=r,this.limit=i,this.startAt=o,this.endAt=a,this.h=null}}function Ci(e,t=null,n=[],r=[],i=null,o=null,a=null){return new _i(e,t,n,r,i,o,a)}function Si(e){const t=Ar(e);if(null===t.h){let e=t.path.canonicalString();null!==t.collectionGroup&&(e+="|cg:"+t.collectionGroup),e+="|f:",e+=t.filters.map((e=>function(e){return e.field.canonicalString()+e.op.toString()+di(e.value)}(e))).join(","),e+="|ob:",e+=t.orderBy.map((e=>function(e){return e.field.canonicalString()+e.dir}(e))).join(","),ni(t.limit)||(e+="|l:",e+=t.limit),t.startAt&&(e+="|lb:",e+=ji(t.startAt)),t.endAt&&(e+="|ub:",e+=ji(t.endAt)),t.h=e}return t.h}function xi(e,t){if(e.limit!==t.limit)return!1;if(e.orderBy.length!==t.orderBy.length)return!1;for(let n=0;n<e.orderBy.length;n++)if(!Wi(e.orderBy[n],t.orderBy[n]))return!1;if(e.filters.length!==t.filters.length)return!1;for(let i=0;i<e.filters.length;i++)if(n=e.filters[i],r=t.filters[i],n.op!==r.op||!n.field.isEqual(r.field)||!si(n.value,r.value))return!1;var n,r;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!zi(e.startAt,t.startAt)&&zi(e.endAt,t.endAt)}function Ti(e){return oi.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}class Ii extends class{}{constructor(e,t,n){super(),this.field=e,this.op=t,this.value=n}static create(e,t,n){return e.isKeyField()?"in"===t||"not-in"===t?this.l(e,t,n):new ki(e,t,n):"array-contains"===t?new Ai(e,n):"in"===t?new Di(e,n):"not-in"===t?new Ri(e,n):"array-contains-any"===t?new Mi(e,n):new Ii(e,t,n)}static l(e,t,n){return"in"===t?new Oi(e,n):new Pi(e,n)}matches(e){const t=e.data.field(this.field);return"!="===this.op?null!==t&&this.m(ui(t,this.value)):null!==t&&ai(this.value)===ai(t)&&this.m(ui(t,this.value))}m(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return 0===e;case"!=":return 0!==e;case">":return e>0;case">=":return e>=0;default:return Pr()}}g(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}}class ki extends Ii{constructor(e,t,n){super(e,t,n),this.key=oi.fromName(n.referenceValue)}matches(e){const t=oi.comparator(e.key,this.key);return this.m(t)}}class Oi extends Ii{constructor(e,t){super(e,"in",t),this.keys=Ni(0,t)}matches(e){return this.keys.some((t=>t.isEqual(e.key)))}}class Pi extends Ii{constructor(e,t){super(e,"not-in",t),this.keys=Ni(0,t)}matches(e){return!this.keys.some((t=>t.isEqual(e.key)))}}function Ni(e,t){var n;return((null===(n=t.arrayValue)||void 0===n?void 0:n.values)||[]).map((e=>oi.fromName(e.referenceValue)))}class Ai extends Ii{constructor(e,t){super(e,"array-contains",t)}matches(e){const t=e.data.field(this.field);return mi(t)&&li(t.arrayValue,this.value)}}class Di extends Ii{constructor(e,t){super(e,"in",t)}matches(e){const t=e.data.field(this.field);return null!==t&&li(this.value.arrayValue,t)}}class Ri extends Ii{constructor(e,t){super(e,"not-in",t)}matches(e){if(li(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const t=e.data.field(this.field);return null!==t&&!li(this.value.arrayValue,t)}}class Mi extends Ii{constructor(e,t){super(e,"array-contains-any",t)}matches(e){const t=e.data.field(this.field);return!(!mi(t)||!t.arrayValue.values)&&t.arrayValue.values.some((e=>li(this.value.arrayValue,e)))}}class Li{constructor(e,t){this.position=e,this.before=t}}function ji(e){return`${e.before?"b":"a"}:${e.position.map((e=>di(e))).join(",")}`}class Fi{constructor(e,t="asc"){this.field=e,this.dir=t}}function Wi(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}function Bi(e,t,n){let r=0;for(let i=0;i<e.position.length;i++){const o=t[i],a=e.position[i];if(r=o.field.isKeyField()?oi.comparator(oi.fromName(a.referenceValue),n.key):ui(a,n.data.field(o.field)),"desc"===o.dir&&(r*=-1),0!==r)break}return e.before?r<=0:r<0}function zi(e,t){if(null===e)return null===t;if(null===t)return!1;if(e.before!==t.before||e.position.length!==t.position.length)return!1;for(let n=0;n<e.position.length;n++)if(!si(e.position[n],t.position[n]))return!1;return!0}class Ui{constructor(e,t=null,n=[],r=[],i=null,o="F",a=null,s=null){this.path=e,this.collectionGroup=t,this.explicitOrderBy=n,this.filters=r,this.limit=i,this.limitType=o,this.startAt=a,this.endAt=s,this.p=null,this.T=null,this.startAt,this.endAt}}function Vi(e,t,n,r,i,o,a,s){return new Ui(e,t,n,r,i,o,a,s)}function Zi(e){return new Ui(e)}function $i(e){return!ni(e.limit)&&"F"===e.limitType}function qi(e){return!ni(e.limit)&&"L"===e.limitType}function Hi(e){return e.explicitOrderBy.length>0?e.explicitOrderBy[0].field:null}function Ki(e){for(const t of e.filters)if(t.g())return t.field;return null}function Gi(e){return null!==e.collectionGroup}function Qi(e){const t=Ar(e);if(null===t.p){t.p=[];const e=Ki(t),n=Hi(t);if(null!==e&&null===n)e.isKeyField()||t.p.push(new Fi(e)),t.p.push(new Fi(qr.keyField(),"asc"));else{let e=!1;for(const n of t.explicitOrderBy)t.p.push(n),n.field.isKeyField()&&(e=!0);if(!e){const e=t.explicitOrderBy.length>0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";t.p.push(new Fi(qr.keyField(),e))}}}return t.p}function Yi(e){const t=Ar(e);if(!t.T)if("F"===t.limitType)t.T=Ci(t.path,t.collectionGroup,Qi(t),t.filters,t.limit,t.startAt,t.endAt);else{const e=[];for(const n of Qi(t)){const t="desc"===n.dir?"asc":"desc";e.push(new Fi(n.field,t))}const n=t.endAt?new Li(t.endAt.position,!t.endAt.before):null,r=t.startAt?new Li(t.startAt.position,!t.startAt.before):null;t.T=Ci(t.path,t.collectionGroup,e,t.filters,t.limit,n,r)}return t.T}function Xi(e,t,n){return new Ui(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function Ji(e,t){return xi(Yi(e),Yi(t))&&e.limitType===t.limitType}function eo(e){return`${Si(Yi(e))}|lt:${e.limitType}`}function to(e){return`Query(target=${function(e){let t=e.path.canonicalString();return null!==e.collectionGroup&&(t+=" collectionGroup="+e.collectionGroup),e.filters.length>0&&(t+=`, filters: [${e.filters.map((e=>{return`${(t=e).field.canonicalString()} ${t.op} ${di(t.value)}`;var t})).join(", ")}]`),ni(e.limit)||(t+=", limit: "+e.limit),e.orderBy.length>0&&(t+=`, orderBy: [${e.orderBy.map((e=>function(e){return`${e.field.canonicalString()} (${e.dir})`}(e))).join(", ")}]`),e.startAt&&(t+=", startAt: "+ji(e.startAt)),e.endAt&&(t+=", endAt: "+ji(e.endAt)),`Target(${t})`}(Yi(e))}; limitType=${e.limitType})`}function no(e,t){return t.isFoundDocument()&&function(e,t){const n=t.key.path;return null!==e.collectionGroup?t.key.hasCollectionId(e.collectionGroup)&&e.path.isPrefixOf(n):oi.isDocumentKey(e.path)?e.path.isEqual(n):e.path.isImmediateParentOf(n)}(e,t)&&function(e,t){for(const n of e.explicitOrderBy)if(!n.field.isKeyField()&&null===t.data.field(n.field))return!1;return!0}(e,t)&&function(e,t){for(const n of e.filters)if(!n.matches(t))return!1;return!0}(e,t)&&function(e,t){return!(e.startAt&&!Bi(e.startAt,Qi(e),t)||e.endAt&&Bi(e.endAt,Qi(e),t))}(e,t)}function ro(e){return(t,n)=>{let r=!1;for(const i of Qi(e)){const e=io(i,t,n);if(0!==e)return e;r=r||i.field.isKeyField()}return 0}}function io(e,t,n){const r=e.field.isKeyField()?oi.comparator(t.key,n.key):function(e,t,n){const r=t.data.field(e),i=n.data.field(e);return null!==r&&null!==i?ui(r,i):Pr()}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return-1*r;default:return Pr()}}function oo(e,t){if(e.I){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:ri(t)?"-0":t}}function ao(e){return{integerValue:""+e}}function so(e,t){return ii(t)?ao(t):oo(e,t)}class lo{constructor(){this._=void 0}}function uo(e,t,n){return e instanceof fo?function(e,t){const n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:e.seconds,nanos:e.nanoseconds}}}};return t&&(n.fields.__previous_value__=t),{mapValue:n}}(n,t):e instanceof po?mo(e,t):e instanceof go?vo(e,t):function(e,t){const n=ho(e,t),r=bo(n)+bo(e.A);return pi(n)&&pi(e.A)?ao(r):oo(e.R,r)}(e,t)}function co(e,t,n){return e instanceof po?mo(e,t):e instanceof go?vo(e,t):n}function ho(e,t){return e instanceof yo?pi(n=t)||function(e){return!!e&&"doubleValue"in e}(n)?t:{integerValue:0}:null;var n}class fo extends lo{}class po extends lo{constructor(e){super(),this.elements=e}}function mo(e,t){const n=wo(t);for(const t of e.elements)n.some((e=>si(e,t)))||n.push(t);return{arrayValue:{values:n}}}class go extends lo{constructor(e){super(),this.elements=e}}function vo(e,t){let n=wo(t);for(const t of e.elements)n=n.filter((e=>!si(e,t)));return{arrayValue:{values:n}}}class yo extends lo{constructor(e,t){super(),this.R=e,this.A=t}}function bo(e){return Yr(e.integerValue||e.doubleValue)}function wo(e){return mi(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}class Eo{constructor(e,t){this.field=e,this.transform=t}}class _o{constructor(e,t){this.version=e,this.transformResults=t}}class Co{constructor(e,t){this.updateTime=e,this.exists=t}static none(){return new Co}static exists(e){return new Co(void 0,e)}static updateTime(e){return new Co(e)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function So(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}class xo{}function To(e,t,n){e instanceof No?function(e,t,n){const r=e.value.clone(),i=Ro(e.fieldTransforms,t,n.transformResults);r.setAll(i),t.convertToFoundDocument(n.version,r).setHasCommittedMutations()}(e,t,n):e instanceof Ao?function(e,t,n){if(!So(e.precondition,t))return void t.convertToUnknownDocument(n.version);const r=Ro(e.fieldTransforms,t,n.transformResults),i=t.data;i.setAll(Do(e)),i.setAll(r),t.convertToFoundDocument(n.version,i).setHasCommittedMutations()}(e,t,n):function(e,t,n){t.convertToNoDocument(n.version).setHasCommittedMutations()}(0,t,n)}function Io(e,t,n){e instanceof No?function(e,t,n){if(!So(e.precondition,t))return;const r=e.value.clone(),i=Mo(e.fieldTransforms,n,t);r.setAll(i),t.convertToFoundDocument(Po(t),r).setHasLocalMutations()}(e,t,n):e instanceof Ao?function(e,t,n){if(!So(e.precondition,t))return;const r=Mo(e.fieldTransforms,n,t),i=t.data;i.setAll(Do(e)),i.setAll(r),t.convertToFoundDocument(Po(t),i).setHasLocalMutations()}(e,t,n):function(e,t){So(e.precondition,t)&&t.convertToNoDocument(Wr.min())}(e,t)}function ko(e,t){let n=null;for(const r of e.fieldTransforms){const e=t.data.field(r.field),i=ho(r.transform,e||null);null!=i&&(null==n&&(n=bi.empty()),n.set(r.field,i))}return n||null}function Oo(e,t){return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&!!function(e,t){return void 0===e&&void 0===t||!(!e||!t)&&Lr(e,t,((e,t)=>function(e,t){return e.field.isEqual(t.field)&&function(e,t){return e instanceof po&&t instanceof po||e instanceof go&&t instanceof go?Lr(e.elements,t.elements,si):e instanceof yo&&t instanceof yo?si(e.A,t.A):e instanceof fo&&t instanceof fo}(e.transform,t.transform)}(e,t)))}(e.fieldTransforms,t.fieldTransforms)&&(0===e.type?e.value.isEqual(t.value):1!==e.type||e.data.isEqual(t.data)&&e.fieldMask.isEqual(t.fieldMask))}function Po(e){return e.isFoundDocument()?e.version:Wr.min()}class No extends xo{constructor(e,t,n,r=[]){super(),this.key=e,this.value=t,this.precondition=n,this.fieldTransforms=r,this.type=0}}class Ao extends xo{constructor(e,t,n,r,i=[]){super(),this.key=e,this.data=t,this.fieldMask=n,this.precondition=r,this.fieldTransforms=i,this.type=1}}function Do(e){const t=new Map;return e.fieldMask.fields.forEach((n=>{if(!n.isEmpty()){const r=e.data.field(n);t.set(n,r)}})),t}function Ro(e,t,n){const r=new Map;Nr(e.length===n.length);for(let i=0;i<n.length;i++){const o=e[i],a=o.transform,s=t.data.field(o.field);r.set(o.field,co(a,s,n[i]))}return r}function Mo(e,t,n){const r=new Map;for(const i of e){const e=i.transform,o=n.data.field(i.field);r.set(i.field,uo(e,o,t))}return r}class Lo extends xo{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=2,this.fieldTransforms=[]}}class jo extends xo{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=3,this.fieldTransforms=[]}}class Fo{constructor(e){this.count=e}}var Wo,Bo;function zo(e){switch(e){case Er.OK:return Pr();case Er.CANCELLED:case Er.UNKNOWN:case Er.DEADLINE_EXCEEDED:case Er.RESOURCE_EXHAUSTED:case Er.INTERNAL:case Er.UNAVAILABLE:case Er.UNAUTHENTICATED:return!1;case Er.INVALID_ARGUMENT:case Er.NOT_FOUND:case Er.ALREADY_EXISTS:case Er.PERMISSION_DENIED:case Er.FAILED_PRECONDITION:case Er.ABORTED:case Er.OUT_OF_RANGE:case Er.UNIMPLEMENTED:case Er.DATA_LOSS:return!0;default:return Pr()}}function Uo(e){if(void 0===e)return Ir("GRPC error has no .code"),Er.UNKNOWN;switch(e){case Wo.OK:return Er.OK;case Wo.CANCELLED:return Er.CANCELLED;case Wo.UNKNOWN:return Er.UNKNOWN;case Wo.DEADLINE_EXCEEDED:return Er.DEADLINE_EXCEEDED;case Wo.RESOURCE_EXHAUSTED:return Er.RESOURCE_EXHAUSTED;case Wo.INTERNAL:return Er.INTERNAL;case Wo.UNAVAILABLE:return Er.UNAVAILABLE;case Wo.UNAUTHENTICATED:return Er.UNAUTHENTICATED;case Wo.INVALID_ARGUMENT:return Er.INVALID_ARGUMENT;case Wo.NOT_FOUND:return Er.NOT_FOUND;case Wo.ALREADY_EXISTS:return Er.ALREADY_EXISTS;case Wo.PERMISSION_DENIED:return Er.PERMISSION_DENIED;case Wo.FAILED_PRECONDITION:return Er.FAILED_PRECONDITION;case Wo.ABORTED:return Er.ABORTED;case Wo.OUT_OF_RANGE:return Er.OUT_OF_RANGE;case Wo.UNIMPLEMENTED:return Er.UNIMPLEMENTED;case Wo.DATA_LOSS:return Er.DATA_LOSS;default:return Pr()}}(Bo=Wo||(Wo={}))[Bo.OK=0]="OK",Bo[Bo.CANCELLED=1]="CANCELLED",Bo[Bo.UNKNOWN=2]="UNKNOWN",Bo[Bo.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",Bo[Bo.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",Bo[Bo.NOT_FOUND=5]="NOT_FOUND",Bo[Bo.ALREADY_EXISTS=6]="ALREADY_EXISTS",Bo[Bo.PERMISSION_DENIED=7]="PERMISSION_DENIED",Bo[Bo.UNAUTHENTICATED=16]="UNAUTHENTICATED",Bo[Bo.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",Bo[Bo.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",Bo[Bo.ABORTED=10]="ABORTED",Bo[Bo.OUT_OF_RANGE=11]="OUT_OF_RANGE",Bo[Bo.UNIMPLEMENTED=12]="UNIMPLEMENTED",Bo[Bo.INTERNAL=13]="INTERNAL",Bo[Bo.UNAVAILABLE=14]="UNAVAILABLE",Bo[Bo.DATA_LOSS=15]="DATA_LOSS";class Vo{constructor(e,t){this.comparator=e,this.root=t||$o.EMPTY}insert(e,t){return new Vo(this.comparator,this.root.insert(e,t,this.comparator).copy(null,null,$o.BLACK,null,null))}remove(e){return new Vo(this.comparator,this.root.remove(e,this.comparator).copy(null,null,$o.BLACK,null,null))}get(e){let t=this.root;for(;!t.isEmpty();){const n=this.comparator(e,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null}indexOf(e){let t=0,n=this.root;for(;!n.isEmpty();){const r=this.comparator(e,n.key);if(0===r)return t+n.left.size;r<0?n=n.left:(t+=n.left.size+1,n=n.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal(((t,n)=>(e(t,n),!1)))}toString(){const e=[];return this.inorderTraversal(((t,n)=>(e.push(`${t}:${n}`),!1))),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new Zo(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new Zo(this.root,e,this.comparator,!1)}getReverseIterator(){return new Zo(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new Zo(this.root,e,this.comparator,!0)}}class Zo{constructor(e,t,n,r){this.isReverse=r,this.nodeStack=[];let i=1;for(;!e.isEmpty();)if(i=t?n(e.key,t):1,r&&(i*=-1),i<0)e=this.isReverse?e.left:e.right;else{if(0===i){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const t={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class $o{constructor(e,t,n,r,i){this.key=e,this.value=t,this.color=null!=n?n:$o.RED,this.left=null!=r?r:$o.EMPTY,this.right=null!=i?i:$o.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,t,n,r,i){return new $o(null!=e?e:this.key,null!=t?t:this.value,null!=n?n:this.color,null!=r?r:this.left,null!=i?i:this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,n){let r=this;const i=n(e,r.key);return r=i<0?r.copy(null,null,null,r.left.insert(e,t,n),null):0===i?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(e,t,n)),r.fixUp()}removeMin(){if(this.left.isEmpty())return $o.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,t){let n,r=this;if(t(e,r.key)<0)r.left.isEmpty()||r.left.isRed()||r.left.left.isRed()||(r=r.moveRedLeft()),r=r.copy(null,null,null,r.left.remove(e,t),null);else{if(r.left.isRed()&&(r=r.rotateRight()),r.right.isEmpty()||r.right.isRed()||r.right.left.isRed()||(r=r.moveRedRight()),0===t(e,r.key)){if(r.right.isEmpty())return $o.EMPTY;n=r.right.min(),r=r.copy(n.key,n.value,null,null,r.right.removeMin())}r=r.copy(null,null,null,null,r.right.remove(e,t))}return r.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,$o.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,$o.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),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}checkMaxDepth(){const e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed())throw Pr();if(this.right.isRed())throw Pr();const e=this.left.check();if(e!==this.right.check())throw Pr();return e+(this.isRed()?0:1)}}$o.EMPTY=null,$o.RED=!0,$o.BLACK=!1,$o.EMPTY=new class{constructor(){this.size=0}get key(){throw Pr()}get value(){throw Pr()}get color(){throw Pr()}get left(){throw Pr()}get right(){throw Pr()}copy(e,t,n,r,i){return this}insert(e,t,n){return new $o(e,t)}remove(e,t){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};class qo{constructor(e){this.comparator=e,this.data=new Vo(this.comparator)}has(e){return null!==this.data.get(e)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal(((t,n)=>(e(t),!1)))}forEachInRange(e,t){const n=this.data.getIteratorFrom(e[0]);for(;n.hasNext();){const r=n.getNext();if(this.comparator(r.key,e[1])>=0)return;t(r.key)}}forEachWhile(e,t){let n;for(n=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();n.hasNext();)if(!e(n.getNext().key))return}firstAfterOrEqual(e){const t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}getIterator(){return new Ho(this.data.getIterator())}getIteratorFrom(e){return new Ho(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let t=this;return t.size<e.size&&(t=e,e=this),e.forEach((e=>{t=t.add(e)})),t}isEqual(e){if(!(e instanceof qo))return!1;if(this.size!==e.size)return!1;const t=this.data.getIterator(),n=e.data.getIterator();for(;t.hasNext();){const e=t.getNext().key,r=n.getNext().key;if(0!==this.comparator(e,r))return!1}return!0}toArray(){const e=[];return this.forEach((t=>{e.push(t)})),e}toString(){const e=[];return this.forEach((t=>e.push(t))),"SortedSet("+e.toString()+")"}copy(e){const t=new qo(this.comparator);return t.data=e,t}}class Ho{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}const Ko=new Vo(oi.comparator);function Go(){return Ko}const Qo=new Vo(oi.comparator);function Yo(){return Qo}const Xo=new Vo(oi.comparator);function Jo(){return Xo}const ea=new qo(oi.comparator);function ta(...e){let t=ea;for(const n of e)t=t.add(n);return t}const na=new qo(Mr);function ra(){return na}class ia{constructor(e,t,n,r,i){this.snapshotVersion=e,this.targetChanges=t,this.targetMismatches=n,this.documentUpdates=r,this.resolvedLimboDocuments=i}static createSynthesizedRemoteEventForCurrentChange(e,t){const n=new Map;return n.set(e,oa.createSynthesizedTargetChangeForCurrentChange(e,t)),new ia(Wr.min(),n,ra(),Go(),ta())}}class oa{constructor(e,t,n,r,i){this.resumeToken=e,this.current=t,this.addedDocuments=n,this.modifiedDocuments=r,this.removedDocuments=i}static createSynthesizedTargetChangeForCurrentChange(e,t){return new oa(Kr.EMPTY_BYTE_STRING,t,ta(),ta(),ta())}}class aa{constructor(e,t,n,r){this.P=e,this.removedTargetIds=t,this.key=n,this.v=r}}class sa{constructor(e,t){this.targetId=e,this.V=t}}class la{constructor(e,t,n=Kr.EMPTY_BYTE_STRING,r=null){this.state=e,this.targetIds=t,this.resumeToken=n,this.cause=r}}class ua{constructor(){this.S=0,this.D=ha(),this.C=Kr.EMPTY_BYTE_STRING,this.N=!1,this.k=!0}get current(){return this.N}get resumeToken(){return this.C}get $(){return 0!==this.S}get O(){return this.k}M(e){e.approximateByteSize()>0&&(this.k=!0,this.C=e)}F(){let e=ta(),t=ta(),n=ta();return this.D.forEach(((r,i)=>{switch(i){case 0:e=e.add(r);break;case 2:t=t.add(r);break;case 1:n=n.add(r);break;default:Pr()}})),new oa(this.C,this.N,e,t,n)}L(){this.k=!1,this.D=ha()}B(e,t){this.k=!0,this.D=this.D.insert(e,t)}U(e){this.k=!0,this.D=this.D.remove(e)}q(){this.S+=1}K(){this.S-=1}j(){this.k=!0,this.N=!0}}class ca{constructor(e){this.W=e,this.G=new Map,this.H=Go(),this.J=da(),this.Y=new qo(Mr)}X(e){for(const t of e.P)e.v&&e.v.isFoundDocument()?this.Z(t,e.v):this.tt(t,e.key,e.v);for(const t of e.removedTargetIds)this.tt(t,e.key,e.v)}et(e){this.forEachTarget(e,(t=>{const n=this.nt(t);switch(e.state){case 0:this.st(t)&&n.M(e.resumeToken);break;case 1:n.K(),n.$||n.L(),n.M(e.resumeToken);break;case 2:n.K(),n.$||this.removeTarget(t);break;case 3:this.st(t)&&(n.j(),n.M(e.resumeToken));break;case 4:this.st(t)&&(this.it(t),n.M(e.resumeToken));break;default:Pr()}}))}forEachTarget(e,t){e.targetIds.length>0?e.targetIds.forEach(t):this.G.forEach(((e,n)=>{this.st(n)&&t(n)}))}rt(e){const t=e.targetId,n=e.V.count,r=this.ot(t);if(r){const e=r.target;if(Ti(e))if(0===n){const n=new oi(e.path);this.tt(t,n,Ei.newNoDocument(n,Wr.min()))}else Nr(1===n);else this.ct(t)!==n&&(this.it(t),this.Y=this.Y.add(t))}}at(e){const t=new Map;this.G.forEach(((n,r)=>{const i=this.ot(r);if(i){if(n.current&&Ti(i.target)){const t=new oi(i.target.path);null!==this.H.get(t)||this.ut(r,t)||this.tt(r,t,Ei.newNoDocument(t,e))}n.O&&(t.set(r,n.F()),n.L())}}));let n=ta();this.J.forEach(((e,t)=>{let r=!0;t.forEachWhile((e=>{const t=this.ot(e);return!t||2===t.purpose||(r=!1,!1)})),r&&(n=n.add(e))}));const r=new ia(e,t,this.Y,this.H,n);return this.H=Go(),this.J=da(),this.Y=new qo(Mr),r}Z(e,t){if(!this.st(e))return;const n=this.ut(e,t.key)?2:0;this.nt(e).B(t.key,n),this.H=this.H.insert(t.key,t),this.J=this.J.insert(t.key,this.ht(t.key).add(e))}tt(e,t,n){if(!this.st(e))return;const r=this.nt(e);this.ut(e,t)?r.B(t,1):r.U(t),this.J=this.J.insert(t,this.ht(t).delete(e)),n&&(this.H=this.H.insert(t,n))}removeTarget(e){this.G.delete(e)}ct(e){const t=this.nt(e).F();return this.W.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}q(e){this.nt(e).q()}nt(e){let t=this.G.get(e);return t||(t=new ua,this.G.set(e,t)),t}ht(e){let t=this.J.get(e);return t||(t=new qo(Mr),this.J=this.J.insert(e,t)),t}st(e){const t=null!==this.ot(e);return t||Tr("WatchChangeAggregator","Detected inactive target",e),t}ot(e){const t=this.G.get(e);return t&&t.$?null:this.W.lt(e)}it(e){this.G.set(e,new ua),this.W.getRemoteKeysForTarget(e).forEach((t=>{this.tt(e,t,null)}))}ut(e,t){return this.W.getRemoteKeysForTarget(e).has(t)}}function da(){return new Vo(oi.comparator)}function ha(){return new Vo(oi.comparator)}const fa={asc:"ASCENDING",desc:"DESCENDING"},pa={"<":"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 ma{constructor(e,t){this.databaseId=e,this.I=t}}function ga(e,t){return e.I?`${new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+t.nanoseconds).slice(-9)}Z`:{seconds:""+t.seconds,nanos:t.nanoseconds}}function va(e,t){return e.I?t.toBase64():t.toUint8Array()}function ya(e,t){return ga(e,t.toTimestamp())}function ba(e){return Nr(!!e),Wr.fromTimestamp(function(e){const t=Qr(e);return new Fr(t.seconds,t.nanos)}(e))}function wa(e,t){return function(e){return new Zr(["projects",e.projectId,"databases",e.database])}(e).child("documents").child(t).canonicalString()}function Ea(e){const t=Zr.fromString(e);return Nr($a(t)),t}function _a(e,t){return wa(e.databaseId,t.path)}function Ca(e,t){const n=Ea(t);if(n.get(1)!==e.databaseId.projectId)throw new _r(Er.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+e.databaseId.projectId);if(n.get(3)!==e.databaseId.database)throw new _r(Er.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new oi(Ia(n))}function Sa(e,t){return wa(e.databaseId,t)}function xa(e){const t=Ea(e);return 4===t.length?Zr.emptyPath():Ia(t)}function Ta(e){return new Zr(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function Ia(e){return Nr(e.length>4&&"documents"===e.get(4)),e.popFirst(5)}function ka(e,t,n){return{name:_a(e,t),fields:n.toProto().mapValue.fields}}function Oa(e,t,n){const r=Ca(e,t.name),i=ba(t.updateTime),o=new bi({mapValue:{fields:t.fields}}),a=Ei.newFoundDocument(r,i,o);return n&&a.setHasCommittedMutations(),n?a.setHasCommittedMutations():a}function Pa(e,t){let n;if(t instanceof No)n={update:ka(e,t.key,t.value)};else if(t instanceof Lo)n={delete:_a(e,t.key)};else if(t instanceof Ao)n={update:ka(e,t.key,t.data),updateMask:Za(t.fieldMask)};else{if(!(t instanceof jo))return Pr();n={verify:_a(e,t.key)}}return t.fieldTransforms.length>0&&(n.updateTransforms=t.fieldTransforms.map((e=>function(e,t){const n=t.transform;if(n instanceof fo)return{fieldPath:t.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(n instanceof po)return{fieldPath:t.field.canonicalString(),appendMissingElements:{values:n.elements}};if(n instanceof go)return{fieldPath:t.field.canonicalString(),removeAllFromArray:{values:n.elements}};if(n instanceof yo)return{fieldPath:t.field.canonicalString(),increment:n.A};throw Pr()}(0,e)))),t.precondition.isNone||(n.currentDocument=function(e,t){return void 0!==t.updateTime?{updateTime:ya(e,t.updateTime)}:void 0!==t.exists?{exists:t.exists}:Pr()}(e,t.precondition)),n}function Na(e,t){const n=t.currentDocument?function(e){return void 0!==e.updateTime?Co.updateTime(ba(e.updateTime)):void 0!==e.exists?Co.exists(e.exists):Co.none()}(t.currentDocument):Co.none(),r=t.updateTransforms?t.updateTransforms.map((t=>function(e,t){let n=null;if("setToServerValue"in t)Nr("REQUEST_TIME"===t.setToServerValue),n=new fo;else if("appendMissingElements"in t){const e=t.appendMissingElements.values||[];n=new po(e)}else if("removeAllFromArray"in t){const e=t.removeAllFromArray.values||[];n=new go(e)}else"increment"in t?n=new yo(e,t.increment):Pr();const r=qr.fromServerFormat(t.fieldPath);return new Eo(r,n)}(e,t))):[];if(t.update){t.update.name;const i=Ca(e,t.update.name),o=new bi({mapValue:{fields:t.update.fields}});if(t.updateMask){const e=function(e){const t=e.fieldPaths||[];return new Hr(t.map((e=>qr.fromServerFormat(e))))}(t.updateMask);return new Ao(i,o,e,n,r)}return new No(i,o,n,r)}if(t.delete){const r=Ca(e,t.delete);return new Lo(r,n)}if(t.verify){const r=Ca(e,t.verify);return new jo(r,n)}return Pr()}function Aa(e,t){return{documents:[Sa(e,t.path)]}}function Da(e,t){const n={structuredQuery:{}},r=t.path;null!==t.collectionGroup?(n.parent=Sa(e,r),n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(n.parent=Sa(e,r.popLast()),n.structuredQuery.from=[{collectionId:r.lastSegment()}]);const i=function(e){if(0===e.length)return;const t=e.map((e=>function(e){if("=="===e.op){if(vi(e.value))return{unaryFilter:{field:Ba(e.field),op:"IS_NAN"}};if(gi(e.value))return{unaryFilter:{field:Ba(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(vi(e.value))return{unaryFilter:{field:Ba(e.field),op:"IS_NOT_NAN"}};if(gi(e.value))return{unaryFilter:{field:Ba(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Ba(e.field),op:Wa(e.op),value:e.value}}}(e)));return 1===t.length?t[0]:{compositeFilter:{op:"AND",filters:t}}}(t.filters);i&&(n.structuredQuery.where=i);const o=function(e){if(0!==e.length)return e.map((e=>function(e){return{field:Ba(e.field),direction:Fa(e.dir)}}(e)))}(t.orderBy);o&&(n.structuredQuery.orderBy=o);const a=function(e,t){return e.I||ni(t)?t:{value:t}}(e,t.limit);return null!==a&&(n.structuredQuery.limit=a),t.startAt&&(n.structuredQuery.startAt=La(t.startAt)),t.endAt&&(n.structuredQuery.endAt=La(t.endAt)),n}function Ra(e){let t=xa(e.parent);const n=e.structuredQuery,r=n.from?n.from.length:0;let i=null;if(r>0){Nr(1===r);const e=n.from[0];e.allDescendants?i=e.collectionId:t=t.child(e.collectionId)}let o=[];n.where&&(o=Ma(n.where));let a=[];n.orderBy&&(a=n.orderBy.map((e=>function(e){return new Fi(za(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))}(e))));let s=null;n.limit&&(s=function(e){let t;return t="object"==typeof e?e.value:e,ni(t)?null:t}(n.limit));let l=null;n.startAt&&(l=ja(n.startAt));let u=null;return n.endAt&&(u=ja(n.endAt)),Vi(t,i,a,o,s,"F",l,u)}function Ma(e){return e?void 0!==e.unaryFilter?[Va(e)]:void 0!==e.fieldFilter?[Ua(e)]:void 0!==e.compositeFilter?e.compositeFilter.filters.map((e=>Ma(e))).reduce(((e,t)=>e.concat(t))):Pr():[]}function La(e){return{before:e.before,values:e.position}}function ja(e){const t=!!e.before,n=e.values||[];return new Li(n,t)}function Fa(e){return fa[e]}function Wa(e){return pa[e]}function Ba(e){return{fieldPath:e.canonicalString()}}function za(e){return qr.fromServerFormat(e.fieldPath)}function Ua(e){return Ii.create(za(e.fieldFilter.field),function(e){switch(e){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";case"OPERATOR_UNSPECIFIED":default:return Pr()}}(e.fieldFilter.op),e.fieldFilter.value)}function Va(e){switch(e.unaryFilter.op){case"IS_NAN":const t=za(e.unaryFilter.field);return Ii.create(t,"==",{doubleValue:NaN});case"IS_NULL":const n=za(e.unaryFilter.field);return Ii.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const r=za(e.unaryFilter.field);return Ii.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const i=za(e.unaryFilter.field);return Ii.create(i,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":default:return Pr()}}function Za(e){const t=[];return e.fields.forEach((e=>t.push(e.canonicalString()))),{fieldPaths:t}}function $a(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}function qa(e){let t="";for(let n=0;n<e.length;n++)t.length>0&&(t=Ka(t)),t=Ha(e.get(n),t);return Ka(t)}function Ha(e,t){let n=t;const r=e.length;for(let t=0;t<r;t++){const r=e.charAt(t);switch(r){case"\0":n+="";break;case"":n+="";break;default:n+=r}}return n}function Ka(e){return e+""}function Ga(e){const t=e.length;if(Nr(t>=2),2===t)return Nr(""===e.charAt(0)&&""===e.charAt(1)),Zr.emptyPath();const n=t-2,r=[];let i="";for(let o=0;o<t;){const t=e.indexOf("",o);switch((t<0||t>n)&&Pr(),e.charAt(t+1)){case"":const n=e.substring(o,t);let a;0===i.length?a=n:(i+=n,a=i,i=""),r.push(a);break;case"":i+=e.substring(o,t),i+="\0";break;case"":i+=e.substring(o,t+1);break;default:Pr()}o=t+2}return new Zr(r)}class Qa{constructor(e,t){this.seconds=e,this.nanoseconds=t}}class Ya{constructor(e,t,n){this.ownerId=e,this.allowTabSynchronization=t,this.leaseTimestampMs=n}}Ya.store="owner",Ya.key="owner";class Xa{constructor(e,t,n){this.userId=e,this.lastAcknowledgedBatchId=t,this.lastStreamToken=n}}Xa.store="mutationQueues",Xa.keyPath="userId";class Ja{constructor(e,t,n,r,i){this.userId=e,this.batchId=t,this.localWriteTimeMs=n,this.baseMutations=r,this.mutations=i}}Ja.store="mutations",Ja.keyPath="batchId",Ja.userMutationsIndex="userMutationsIndex",Ja.userMutationsKeyPath=["userId","batchId"];class es{constructor(){}static prefixForUser(e){return[e]}static prefixForPath(e,t){return[e,qa(t)]}static key(e,t,n){return[e,qa(t),n]}}es.store="documentMutations",es.PLACEHOLDER=new es;class ts{constructor(e,t){this.path=e,this.readTime=t}}class ns{constructor(e,t){this.path=e,this.version=t}}class rs{constructor(e,t,n,r,i,o){this.unknownDocument=e,this.noDocument=t,this.document=n,this.hasCommittedMutations=r,this.readTime=i,this.parentPath=o}}rs.store="remoteDocuments",rs.readTimeIndex="readTimeIndex",rs.readTimeIndexPath="readTime",rs.collectionReadTimeIndex="collectionReadTimeIndex",rs.collectionReadTimeIndexPath=["parentPath","readTime"];class is{constructor(e){this.byteSize=e}}is.store="remoteDocumentGlobal",is.key="remoteDocumentGlobalKey";class os{constructor(e,t,n,r,i,o,a){this.targetId=e,this.canonicalId=t,this.readTime=n,this.resumeToken=r,this.lastListenSequenceNumber=i,this.lastLimboFreeSnapshotVersion=o,this.query=a}}os.store="targets",os.keyPath="targetId",os.queryTargetsIndexName="queryTargetsIndex",os.queryTargetsKeyPath=["canonicalId","targetId"];class as{constructor(e,t,n){this.targetId=e,this.path=t,this.sequenceNumber=n}}as.store="targetDocuments",as.keyPath=["targetId","path"],as.documentTargetsIndex="documentTargetsIndex",as.documentTargetsKeyPath=["path","targetId"];class ss{constructor(e,t,n,r){this.highestTargetId=e,this.highestListenSequenceNumber=t,this.lastRemoteSnapshotVersion=n,this.targetCount=r}}ss.key="targetGlobalKey",ss.store="targetGlobal";class ls{constructor(e,t){this.collectionId=e,this.parent=t}}ls.store="collectionParents",ls.keyPath=["collectionId","parent"];class us{constructor(e,t,n,r){this.clientId=e,this.updateTimeMs=t,this.networkEnabled=n,this.inForeground=r}}us.store="clientMetadata",us.keyPath="clientId";class cs{constructor(e,t,n){this.bundleId=e,this.createTime=t,this.version=n}}cs.store="bundles",cs.keyPath="bundleId";class ds{constructor(e,t,n){this.name=e,this.readTime=t,this.bundledQuery=n}}ds.store="namedQueries",ds.keyPath="name";const hs=[Xa.store,Ja.store,es.store,rs.store,os.store,Ya.store,ss.store,as.store,us.store,is.store,ls.store,cs.store,ds.store],fs="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class ps{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach((e=>e()))}}class ms{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}class gs{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e((e=>{this.isDone=!0,this.result=e,this.nextCallback&&this.nextCallback(e)}),(e=>{this.isDone=!0,this.error=e,this.catchCallback&&this.catchCallback(e)}))}catch(e){return this.next(void 0,e)}next(e,t){return this.callbackAttached&&Pr(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(e,this.result):new gs(((n,r)=>{this.nextCallback=t=>{this.wrapSuccess(e,t).next(n,r)},this.catchCallback=e=>{this.wrapFailure(t,e).next(n,r)}}))}toPromise(){return new Promise(((e,t)=>{this.next(e,t)}))}wrapUserFunction(e){try{const t=e();return t instanceof gs?t:gs.resolve(t)}catch(e){return gs.reject(e)}}wrapSuccess(e,t){return e?this.wrapUserFunction((()=>e(t))):gs.resolve(t)}wrapFailure(e,t){return e?this.wrapUserFunction((()=>e(t))):gs.reject(t)}static resolve(e){return new gs(((t,n)=>{t(e)}))}static reject(e){return new gs(((t,n)=>{n(e)}))}static waitFor(e){return new gs(((t,n)=>{let r=0,i=0,o=!1;e.forEach((e=>{++r,e.next((()=>{++i,o&&i===r&&t()}),(e=>n(e)))})),o=!0,i===r&&t()}))}static or(e){let t=gs.resolve(!1);for(const n of e)t=t.next((e=>e?gs.resolve(e):n()));return t}static forEach(e,t){const n=[];return e.forEach(((e,r)=>{n.push(t.call(this,e,r))})),this.waitFor(n)}}class vs{constructor(e,t){this.action=e,this.transaction=t,this.aborted=!1,this.ft=new ms,this.transaction.oncomplete=()=>{this.ft.resolve()},this.transaction.onabort=()=>{t.error?this.ft.reject(new ws(e,t.error)):this.ft.resolve()},this.transaction.onerror=t=>{const n=xs(t.target.error);this.ft.reject(new ws(e,n))}}static open(e,t,n,r){try{return new vs(t,e.transaction(r,n))}catch(e){throw new ws(t,e)}}get dt(){return this.ft.promise}abort(e){e&&this.ft.reject(e),this.aborted||(Tr("SimpleDb","Aborting transaction:",e?e.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())}store(e){const t=this.transaction.objectStore(e);return new _s(t)}}class ys{constructor(e,t,n){this.name=e,this.version=t,this.wt=n,12.2===ys._t((0,l.z$)())&&Ir("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}static delete(e){return Tr("SimpleDb","Removing database:",e),Cs(window.indexedDB.deleteDatabase(e)).toPromise()}static gt(){if("undefined"==typeof indexedDB)return!1;if(ys.yt())return!0;const e=(0,l.z$)(),t=ys._t(e),n=0<t&&t<10,r=ys.Et(e),i=0<r&&r<4.5;return!(e.indexOf("MSIE ")>0||e.indexOf("Trident/")>0||e.indexOf("Edge/")>0||n||i)}static yt(){var e;return"undefined"!=typeof process&&"YES"===(null===(e=process.env)||void 0===e?void 0:e.Tt)}static It(e,t){return e.store(t)}static _t(e){const t=e.match(/i(?:phone|pad|pod) os ([\d_]+)/i),n=t?t[1].split("_").slice(0,2).join("."):"-1";return Number(n)}static Et(e){const t=e.match(/Android ([\d.]+)/i),n=t?t[1].split(".").slice(0,2).join("."):"-1";return Number(n)}async At(e){return this.db||(Tr("SimpleDb","Opening database:",this.name),this.db=await new Promise(((t,n)=>{const r=indexedDB.open(this.name,this.version);r.onsuccess=e=>{const n=e.target.result;t(n)},r.onblocked=()=>{n(new ws(e,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},r.onerror=t=>{const r=t.target.error;"VersionError"===r.name?n(new _r(Er.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")):n(new ws(e,r))},r.onupgradeneeded=e=>{Tr("SimpleDb",'Database "'+this.name+'" requires upgrade from version:',e.oldVersion);const t=e.target.result;this.wt.Rt(t,r.transaction,e.oldVersion,this.version).next((()=>{Tr("SimpleDb","Database upgrade to version "+this.version+" complete")}))}}))),this.Pt&&(this.db.onversionchange=e=>this.Pt(e)),this.db}bt(e){this.Pt=e,this.db&&(this.db.onversionchange=t=>e(t))}async runTransaction(e,t,n,r){const i="readonly"===t;let o=0;for(;;){++o;try{this.db=await this.At(e);const t=vs.open(this.db,e,i?"readonly":"readwrite",n),o=r(t).catch((e=>(t.abort(e),gs.reject(e)))).toPromise();return o.catch((()=>{})),await t.dt,o}catch(e){const t="FirebaseError"!==e.name&&o<3;if(Tr("SimpleDb","Transaction failed with error:",e.message,"Retrying:",t),this.close(),!t)return Promise.reject(e)}}}close(){this.db&&this.db.close(),this.db=void 0}}class bs{constructor(e){this.vt=e,this.Vt=!1,this.St=null}get isDone(){return this.Vt}get Dt(){return this.St}set cursor(e){this.vt=e}done(){this.Vt=!0}Ct(e){this.St=e}delete(){return Cs(this.vt.delete())}}class ws extends _r{constructor(e,t){super(Er.UNAVAILABLE,`IndexedDB transaction '${e}' failed: ${t}`),this.name="IndexedDbTransactionError"}}function Es(e){return"IndexedDbTransactionError"===e.name}class _s{constructor(e){this.store=e}put(e,t){let n;return void 0!==t?(Tr("SimpleDb","PUT",this.store.name,e,t),n=this.store.put(t,e)):(Tr("SimpleDb","PUT",this.store.name,"<auto-key>",e),n=this.store.put(e)),Cs(n)}add(e){return Tr("SimpleDb","ADD",this.store.name,e,e),Cs(this.store.add(e))}get(e){return Cs(this.store.get(e)).next((t=>(void 0===t&&(t=null),Tr("SimpleDb","GET",this.store.name,e,t),t)))}delete(e){return Tr("SimpleDb","DELETE",this.store.name,e),Cs(this.store.delete(e))}count(){return Tr("SimpleDb","COUNT",this.store.name),Cs(this.store.count())}Nt(e,t){const n=this.cursor(this.options(e,t)),r=[];return this.xt(n,((e,t)=>{r.push(t)})).next((()=>r))}kt(e,t){Tr("SimpleDb","DELETE ALL",this.store.name);const n=this.options(e,t);n.$t=!1;const r=this.cursor(n);return this.xt(r,((e,t,n)=>n.delete()))}Ot(e,t){let n;t?n=e:(n={},t=e);const r=this.cursor(n);return this.xt(r,t)}Mt(e){const t=this.cursor({});return new gs(((n,r)=>{t.onerror=e=>{const t=xs(e.target.error);r(t)},t.onsuccess=t=>{const r=t.target.result;r?e(r.primaryKey,r.value).next((e=>{e?r.continue():n()})):n()}}))}xt(e,t){const n=[];return new gs(((r,i)=>{e.onerror=e=>{i(e.target.error)},e.onsuccess=e=>{const i=e.target.result;if(!i)return void r();const o=new bs(i),a=t(i.primaryKey,i.value,o);if(a instanceof gs){const e=a.catch((e=>(o.done(),gs.reject(e))));n.push(e)}o.isDone?r():null===o.Dt?i.continue():i.continue(o.Dt)}})).next((()=>gs.waitFor(n)))}options(e,t){let n;return void 0!==e&&("string"==typeof e?n=e:t=e),{index:n,range:t}}cursor(e){let t="next";if(e.reverse&&(t="prev"),e.index){const n=this.store.index(e.index);return e.$t?n.openKeyCursor(e.range,t):n.openCursor(e.range,t)}return this.store.openCursor(e.range,t)}}function Cs(e){return new gs(((t,n)=>{e.onsuccess=e=>{const n=e.target.result;t(n)},e.onerror=e=>{const t=xs(e.target.error);n(t)}}))}let Ss=!1;function xs(e){const t=ys._t((0,l.z$)());if(t>=12.2&&t<13){const t="An internal error was encountered in the Indexed Database server";if(e.message.indexOf(t)>=0){const e=new _r("internal",`IOS_INDEXEDDB_BUG1: IndexedDb has thrown '${t}'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.`);return Ss||(Ss=!0,setTimeout((()=>{throw e}),0)),e}}return e}class Ts extends ps{constructor(e,t){super(),this.Ft=e,this.currentSequenceNumber=t}}function Is(e,t){const n=Ar(e);return ys.It(n.Ft,t)}class ks{constructor(e,t,n,r){this.batchId=e,this.localWriteTime=t,this.baseMutations=n,this.mutations=r}applyToRemoteDocument(e,t){const n=t.mutationResults;for(let t=0;t<this.mutations.length;t++){const r=this.mutations[t];r.key.isEqual(e.key)&&To(r,e,n[t])}}applyToLocalView(e){for(const t of this.baseMutations)t.key.isEqual(e.key)&&Io(t,e,this.localWriteTime);for(const t of this.mutations)t.key.isEqual(e.key)&&Io(t,e,this.localWriteTime)}applyToLocalDocumentSet(e){this.mutations.forEach((t=>{const n=e.get(t.key),r=n;this.applyToLocalView(r),n.isValidDocument()||r.convertToNoDocument(Wr.min())}))}keys(){return this.mutations.reduce(((e,t)=>e.add(t.key)),ta())}isEqual(e){return this.batchId===e.batchId&&Lr(this.mutations,e.mutations,((e,t)=>Oo(e,t)))&&Lr(this.baseMutations,e.baseMutations,((e,t)=>Oo(e,t)))}}class Os{constructor(e,t,n,r){this.batch=e,this.commitVersion=t,this.mutationResults=n,this.docVersions=r}static from(e,t,n){Nr(e.mutations.length===n.length);let r=Jo();const i=e.mutations;for(let e=0;e<i.length;e++)r=r.insert(i[e].key,n[e].version);return new Os(e,t,n,r)}}class Ps{constructor(e,t,n,r,i=Wr.min(),o=Wr.min(),a=Kr.EMPTY_BYTE_STRING){this.target=e,this.targetId=t,this.purpose=n,this.sequenceNumber=r,this.snapshotVersion=i,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=a}withSequenceNumber(e){return new Ps(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken)}withResumeToken(e,t){return new Ps(this.target,this.targetId,this.purpose,this.sequenceNumber,t,this.lastLimboFreeSnapshotVersion,e)}withLastLimboFreeSnapshotVersion(e){return new Ps(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken)}}class Ns{constructor(e){this.Lt=e}}function As(e,t){if(t.document)return Oa(e.Lt,t.document,!!t.hasCommittedMutations);if(t.noDocument){const e=oi.fromSegments(t.noDocument.path),n=js(t.noDocument.readTime),r=Ei.newNoDocument(e,n);return t.hasCommittedMutations?r.setHasCommittedMutations():r}if(t.unknownDocument){const e=oi.fromSegments(t.unknownDocument.path),n=js(t.unknownDocument.version);return Ei.newUnknownDocument(e,n)}return Pr()}function Ds(e,t,n){const r=Rs(n),i=t.key.path.popLast().toArray();if(t.isFoundDocument()){const n=function(e,t){return{name:_a(e,t.key),fields:t.data.toProto().mapValue.fields,updateTime:ga(e,t.version.toTimestamp())}}(e.Lt,t),o=t.hasCommittedMutations;return new rs(null,null,n,o,r,i)}if(t.isNoDocument()){const e=t.key.path.toArray(),n=Ls(t.version),o=t.hasCommittedMutations;return new rs(null,new ts(e,n),null,o,r,i)}if(t.isUnknownDocument()){const e=t.key.path.toArray(),n=Ls(t.version);return new rs(new ns(e,n),null,null,!0,r,i)}return Pr()}function Rs(e){const t=e.toTimestamp();return[t.seconds,t.nanoseconds]}function Ms(e){const t=new Fr(e[0],e[1]);return Wr.fromTimestamp(t)}function Ls(e){const t=e.toTimestamp();return new Qa(t.seconds,t.nanoseconds)}function js(e){const t=new Fr(e.seconds,e.nanoseconds);return Wr.fromTimestamp(t)}function Fs(e,t){const n=(t.baseMutations||[]).map((t=>Na(e.Lt,t)));for(let e=0;e<t.mutations.length-1;++e){const n=t.mutations[e];if(e+1<t.mutations.length&&void 0!==t.mutations[e+1].transform){const r=t.mutations[e+1];n.updateTransforms=r.transform.fieldTransforms,t.mutations.splice(e+1,1),++e}}const r=t.mutations.map((t=>Na(e.Lt,t))),i=Fr.fromMillis(t.localWriteTimeMs);return new ks(t.batchId,i,n,r)}function Ws(e){const t=js(e.readTime),n=void 0!==e.lastLimboFreeSnapshotVersion?js(e.lastLimboFreeSnapshotVersion):Wr.min();let r;var i;return void 0!==e.query.documents?(Nr(1===(i=e.query).documents.length),r=Yi(Zi(xa(i.documents[0])))):r=function(e){return Yi(Ra(e))}(e.query),new Ps(r,e.targetId,0,e.lastListenSequenceNumber,t,n,Kr.fromBase64String(e.resumeToken))}function Bs(e,t){const n=Ls(t.snapshotVersion),r=Ls(t.lastLimboFreeSnapshotVersion);let i;i=Ti(t.target)?Aa(e.Lt,t.target):Da(e.Lt,t.target);const o=t.resumeToken.toBase64();return new os(t.targetId,Si(t.target),n,o,t.sequenceNumber,r,i)}function zs(e){const t=Ra({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?Xi(t,t.limit,"L"):t}class Us{getBundleMetadata(e,t){return Vs(e).get(t).next((e=>{if(e)return{id:(t=e).bundleId,createTime:js(t.createTime),version:t.version};var t}))}saveBundleMetadata(e,t){return Vs(e).put({bundleId:(n=t).id,createTime:Ls(ba(n.createTime)),version:n.version});var n}getNamedQuery(e,t){return Zs(e).get(t).next((e=>{if(e)return{name:(t=e).name,query:zs(t.bundledQuery),readTime:js(t.readTime)};var t}))}saveNamedQuery(e,t){return Zs(e).put(function(e){return{name:e.name,readTime:Ls(ba(e.readTime)),bundledQuery:e.bundledQuery}}(t))}}function Vs(e){return Is(e,cs.store)}function Zs(e){return Is(e,ds.store)}class $s{constructor(){this.Bt=new qs}addToCollectionParentIndex(e,t){return this.Bt.add(t),gs.resolve()}getCollectionParents(e,t){return gs.resolve(this.Bt.getEntries(t))}}class qs{constructor(){this.index={}}add(e){const t=e.lastSegment(),n=e.popLast(),r=this.index[t]||new qo(Zr.comparator),i=!r.has(n);return this.index[t]=r.add(n),i}has(e){const t=e.lastSegment(),n=e.popLast(),r=this.index[t];return r&&r.has(n)}getEntries(e){return(this.index[e]||new qo(Zr.comparator)).toArray()}}class Hs{constructor(){this.Ut=new qs}addToCollectionParentIndex(e,t){if(!this.Ut.has(t)){const n=t.lastSegment(),r=t.popLast();e.addOnCommittedListener((()=>{this.Ut.add(t)}));const i={collectionId:n,parent:qa(r)};return Ks(e).put(i)}return gs.resolve()}getCollectionParents(e,t){const n=[],r=IDBKeyRange.bound([t,""],[jr(t),""],!1,!0);return Ks(e).Nt(r).next((e=>{for(const r of e){if(r.collectionId!==t)break;n.push(Ga(r.parent))}return n}))}}function Ks(e){return Is(e,ls.store)}const Gs={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0};class Qs{constructor(e,t,n){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=n}static withCacheSize(e){return new Qs(e,Qs.DEFAULT_COLLECTION_PERCENTILE,Qs.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}function Ys(e,t,n){const r=e.store(Ja.store),i=e.store(es.store),o=[],a=IDBKeyRange.only(n.batchId);let s=0;const l=r.Ot({range:a},((e,t,n)=>(s++,n.delete())));o.push(l.next((()=>{Nr(1===s)})));const u=[];for(const e of n.mutations){const r=es.key(t,e.key.path,n.batchId);o.push(i.delete(r)),u.push(e.key)}return gs.waitFor(o).next((()=>u))}function Xs(e){if(!e)return 0;let t;if(e.document)t=e.document;else if(e.unknownDocument)t=e.unknownDocument;else{if(!e.noDocument)throw Pr();t=e.noDocument}return JSON.stringify(t).length}Qs.DEFAULT_COLLECTION_PERCENTILE=10,Qs.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,Qs.DEFAULT=new Qs(41943040,Qs.DEFAULT_COLLECTION_PERCENTILE,Qs.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),Qs.DISABLED=new Qs(-1,0,0);class Js{constructor(e,t,n,r){this.userId=e,this.R=t,this.qt=n,this.referenceDelegate=r,this.Kt={}}static Qt(e,t,n,r){Nr(""!==e.uid);const i=e.isAuthenticated()?e.uid:"";return new Js(i,t,n,r)}checkEmpty(e){let t=!0;const n=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return tl(e).Ot({index:Ja.userMutationsIndex,range:n},((e,n,r)=>{t=!1,r.done()})).next((()=>t))}addMutationBatch(e,t,n,r){const i=nl(e),o=tl(e);return o.add({}).next((a=>{Nr("number"==typeof a);const s=new ks(a,t,n,r),l=function(e,t,n){const r=n.baseMutations.map((t=>Pa(e.Lt,t))),i=n.mutations.map((t=>Pa(e.Lt,t)));return new Ja(t,n.batchId,n.localWriteTime.toMillis(),r,i)}(this.R,this.userId,s),u=[];let c=new qo(((e,t)=>Mr(e.canonicalString(),t.canonicalString())));for(const e of r){const t=es.key(this.userId,e.key.path,a);c=c.add(e.key.path.popLast()),u.push(o.put(l)),u.push(i.put(t,es.PLACEHOLDER))}return c.forEach((t=>{u.push(this.qt.addToCollectionParentIndex(e,t))})),e.addOnCommittedListener((()=>{this.Kt[a]=s.keys()})),gs.waitFor(u).next((()=>s))}))}lookupMutationBatch(e,t){return tl(e).get(t).next((e=>e?(Nr(e.userId===this.userId),Fs(this.R,e)):null))}jt(e,t){return this.Kt[t]?gs.resolve(this.Kt[t]):this.lookupMutationBatch(e,t).next((e=>{if(e){const n=e.keys();return this.Kt[t]=n,n}return null}))}getNextMutationBatchAfterBatchId(e,t){const n=t+1,r=IDBKeyRange.lowerBound([this.userId,n]);let i=null;return tl(e).Ot({index:Ja.userMutationsIndex,range:r},((e,t,r)=>{t.userId===this.userId&&(Nr(t.batchId>=n),i=Fs(this.R,t)),r.done()})).next((()=>i))}getHighestUnacknowledgedBatchId(e){const t=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]);let n=-1;return tl(e).Ot({index:Ja.userMutationsIndex,range:t,reverse:!0},((e,t,r)=>{n=t.batchId,r.done()})).next((()=>n))}getAllMutationBatches(e){const t=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return tl(e).Nt(Ja.userMutationsIndex,t).next((e=>e.map((e=>Fs(this.R,e)))))}getAllMutationBatchesAffectingDocumentKey(e,t){const n=es.prefixForPath(this.userId,t.path),r=IDBKeyRange.lowerBound(n),i=[];return nl(e).Ot({range:r},((n,r,o)=>{const[a,s,l]=n,u=Ga(s);if(a===this.userId&&t.path.isEqual(u))return tl(e).get(l).next((e=>{if(!e)throw Pr();Nr(e.userId===this.userId),i.push(Fs(this.R,e))}));o.done()})).next((()=>i))}getAllMutationBatchesAffectingDocumentKeys(e,t){let n=new qo(Mr);const r=[];return t.forEach((t=>{const i=es.prefixForPath(this.userId,t.path),o=IDBKeyRange.lowerBound(i),a=nl(e).Ot({range:o},((e,r,i)=>{const[o,a,s]=e,l=Ga(a);o===this.userId&&t.path.isEqual(l)?n=n.add(s):i.done()}));r.push(a)})),gs.waitFor(r).next((()=>this.Wt(e,n)))}getAllMutationBatchesAffectingQuery(e,t){const n=t.path,r=n.length+1,i=es.prefixForPath(this.userId,n),o=IDBKeyRange.lowerBound(i);let a=new qo(Mr);return nl(e).Ot({range:o},((e,t,i)=>{const[o,s,l]=e,u=Ga(s);o===this.userId&&n.isPrefixOf(u)?u.length===r&&(a=a.add(l)):i.done()})).next((()=>this.Wt(e,a)))}Wt(e,t){const n=[],r=[];return t.forEach((t=>{r.push(tl(e).get(t).next((e=>{if(null===e)throw Pr();Nr(e.userId===this.userId),n.push(Fs(this.R,e))})))})),gs.waitFor(r).next((()=>n))}removeMutationBatch(e,t){return Ys(e.Ft,this.userId,t).next((n=>(e.addOnCommittedListener((()=>{this.Gt(t.batchId)})),gs.forEach(n,(t=>this.referenceDelegate.markPotentiallyOrphaned(e,t))))))}Gt(e){delete this.Kt[e]}performConsistencyCheck(e){return this.checkEmpty(e).next((t=>{if(!t)return gs.resolve();const n=IDBKeyRange.lowerBound(es.prefixForUser(this.userId)),r=[];return nl(e).Ot({range:n},((e,t,n)=>{if(e[0]===this.userId){const t=Ga(e[1]);r.push(t)}else n.done()})).next((()=>{Nr(0===r.length)}))}))}containsKey(e,t){return el(e,this.userId,t)}zt(e){return rl(e).get(this.userId).next((e=>e||new Xa(this.userId,-1,"")))}}function el(e,t,n){const r=es.prefixForPath(t,n.path),i=r[1],o=IDBKeyRange.lowerBound(r);let a=!1;return nl(e).Ot({range:o,$t:!0},((e,n,r)=>{const[o,s,l]=e;o===t&&s===i&&(a=!0),r.done()})).next((()=>a))}function tl(e){return Is(e,Ja.store)}function nl(e){return Is(e,es.store)}function rl(e){return Is(e,Xa.store)}class il{constructor(e){this.Ht=e}next(){return this.Ht+=2,this.Ht}static Jt(){return new il(0)}static Yt(){return new il(-1)}}class ol{constructor(e,t){this.referenceDelegate=e,this.R=t}allocateTargetId(e){return this.Xt(e).next((t=>{const n=new il(t.highestTargetId);return t.highestTargetId=n.next(),this.Zt(e,t).next((()=>t.highestTargetId))}))}getLastRemoteSnapshotVersion(e){return this.Xt(e).next((e=>Wr.fromTimestamp(new Fr(e.lastRemoteSnapshotVersion.seconds,e.lastRemoteSnapshotVersion.nanoseconds))))}getHighestSequenceNumber(e){return this.Xt(e).next((e=>e.highestListenSequenceNumber))}setTargetsMetadata(e,t,n){return this.Xt(e).next((r=>(r.highestListenSequenceNumber=t,n&&(r.lastRemoteSnapshotVersion=n.toTimestamp()),t>r.highestListenSequenceNumber&&(r.highestListenSequenceNumber=t),this.Zt(e,r))))}addTargetData(e,t){return this.te(e,t).next((()=>this.Xt(e).next((n=>(n.targetCount+=1,this.ee(t,n),this.Zt(e,n))))))}updateTargetData(e,t){return this.te(e,t)}removeTargetData(e,t){return this.removeMatchingKeysForTargetId(e,t.targetId).next((()=>al(e).delete(t.targetId))).next((()=>this.Xt(e))).next((t=>(Nr(t.targetCount>0),t.targetCount-=1,this.Zt(e,t))))}removeTargets(e,t,n){let r=0;const i=[];return al(e).Ot(((o,a)=>{const s=Ws(a);s.sequenceNumber<=t&&null===n.get(s.targetId)&&(r++,i.push(this.removeTargetData(e,s)))})).next((()=>gs.waitFor(i))).next((()=>r))}forEachTarget(e,t){return al(e).Ot(((e,n)=>{const r=Ws(n);t(r)}))}Xt(e){return sl(e).get(ss.key).next((e=>(Nr(null!==e),e)))}Zt(e,t){return sl(e).put(ss.key,t)}te(e,t){return al(e).put(Bs(this.R,t))}ee(e,t){let n=!1;return e.targetId>t.highestTargetId&&(t.highestTargetId=e.targetId,n=!0),e.sequenceNumber>t.highestListenSequenceNumber&&(t.highestListenSequenceNumber=e.sequenceNumber,n=!0),n}getTargetCount(e){return this.Xt(e).next((e=>e.targetCount))}getTargetData(e,t){const n=Si(t),r=IDBKeyRange.bound([n,Number.NEGATIVE_INFINITY],[n,Number.POSITIVE_INFINITY]);let i=null;return al(e).Ot({range:r,index:os.queryTargetsIndexName},((e,n,r)=>{const o=Ws(n);xi(t,o.target)&&(i=o,r.done())})).next((()=>i))}addMatchingKeys(e,t,n){const r=[],i=ll(e);return t.forEach((t=>{const o=qa(t.path);r.push(i.put(new as(n,o))),r.push(this.referenceDelegate.addReference(e,n,t))})),gs.waitFor(r)}removeMatchingKeys(e,t,n){const r=ll(e);return gs.forEach(t,(t=>{const i=qa(t.path);return gs.waitFor([r.delete([n,i]),this.referenceDelegate.removeReference(e,n,t)])}))}removeMatchingKeysForTargetId(e,t){const n=ll(e),r=IDBKeyRange.bound([t],[t+1],!1,!0);return n.delete(r)}getMatchingKeysForTargetId(e,t){const n=IDBKeyRange.bound([t],[t+1],!1,!0),r=ll(e);let i=ta();return r.Ot({range:n,$t:!0},((e,t,n)=>{const r=Ga(e[1]),o=new oi(r);i=i.add(o)})).next((()=>i))}containsKey(e,t){const n=qa(t.path),r=IDBKeyRange.bound([n],[jr(n)],!1,!0);let i=0;return ll(e).Ot({index:as.documentTargetsIndex,$t:!0,range:r},(([e,t],n,r)=>{0!==e&&(i++,r.done())})).next((()=>i>0))}lt(e,t){return al(e).get(t).next((e=>e?Ws(e):null))}}function al(e){return Is(e,os.store)}function sl(e){return Is(e,ss.store)}function ll(e){return Is(e,as.store)}async function ul(e){if(e.code!==Er.FAILED_PRECONDITION||e.message!==fs)throw e;Tr("LocalStore","Unexpectedly lost primary lease")}function cl([e,t],[n,r]){const i=Mr(e,n);return 0===i?Mr(t,r):i}class dl{constructor(e){this.ne=e,this.buffer=new qo(cl),this.se=0}ie(){return++this.se}re(e){const t=[e,this.ie()];if(this.buffer.size<this.ne)this.buffer=this.buffer.add(t);else{const e=this.buffer.last();cl(t,e)<0&&(this.buffer=this.buffer.delete(e).add(t))}}get maxValue(){return this.buffer.last()[0]}}class hl{constructor(e,t){this.garbageCollector=e,this.asyncQueue=t,this.oe=!1,this.ce=null}start(e){-1!==this.garbageCollector.params.cacheSizeCollectionThreshold&&this.ae(e)}stop(){this.ce&&(this.ce.cancel(),this.ce=null)}get started(){return null!==this.ce}ae(e){const t=this.oe?3e5:6e4;Tr("LruGarbageCollector",`Garbage collection scheduled in ${t}ms`),this.ce=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",t,(async()=>{this.ce=null,this.oe=!0;try{await e.collectGarbage(this.garbageCollector)}catch(e){Es(e)?Tr("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",e):await ul(e)}await this.ae(e)}))}}class fl{constructor(e,t){this.ue=e,this.params=t}calculateTargetCount(e,t){return this.ue.he(e).next((e=>Math.floor(t/100*e)))}nthSequenceNumber(e,t){if(0===t)return gs.resolve(wr.o);const n=new dl(t);return this.ue.forEachTarget(e,(e=>n.re(e.sequenceNumber))).next((()=>this.ue.le(e,(e=>n.re(e))))).next((()=>n.maxValue))}removeTargets(e,t,n){return this.ue.removeTargets(e,t,n)}removeOrphanedDocuments(e,t){return this.ue.removeOrphanedDocuments(e,t)}collect(e,t){return-1===this.params.cacheSizeCollectionThreshold?(Tr("LruGarbageCollector","Garbage collection skipped; disabled"),gs.resolve(Gs)):this.getCacheSize(e).next((n=>n<this.params.cacheSizeCollectionThreshold?(Tr("LruGarbageCollector",`Garbage collection skipped; Cache size ${n} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),Gs):this.fe(e,t)))}getCacheSize(e){return this.ue.getCacheSize(e)}fe(e,t){let n,r,i,o,a,s,l;const u=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next((t=>(t>this.params.maximumSequenceNumbersToCollect?(Tr("LruGarbageCollector",`Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${t}`),r=this.params.maximumSequenceNumbersToCollect):r=t,o=Date.now(),this.nthSequenceNumber(e,r)))).next((r=>(n=r,a=Date.now(),this.removeTargets(e,n,t)))).next((t=>(i=t,s=Date.now(),this.removeOrphanedDocuments(e,n)))).next((e=>(l=Date.now(),Sr()<=h.in.DEBUG&&Tr("LruGarbageCollector",`LRU Garbage Collection\n\tCounted targets in ${o-u}ms\n\tDetermined least recently used ${r} in `+(a-o)+"ms\n"+`\tRemoved ${i} targets in `+(s-a)+"ms\n"+`\tRemoved ${e} documents in `+(l-s)+"ms\n"+`Total Duration: ${l-u}ms`),gs.resolve({didRun:!0,sequenceNumbersCollected:r,targetsRemoved:i,documentsRemoved:e}))))}}class pl{constructor(e,t){this.db=e,this.garbageCollector=function(e,t){return new fl(e,t)}(this,t)}he(e){const t=this.de(e);return this.db.getTargetCache().getTargetCount(e).next((e=>t.next((t=>e+t))))}de(e){let t=0;return this.le(e,(e=>{t++})).next((()=>t))}forEachTarget(e,t){return this.db.getTargetCache().forEachTarget(e,t)}le(e,t){return this.we(e,((e,n)=>t(n)))}addReference(e,t,n){return ml(e,n)}removeReference(e,t,n){return ml(e,n)}removeTargets(e,t,n){return this.db.getTargetCache().removeTargets(e,t,n)}markPotentiallyOrphaned(e,t){return ml(e,t)}_e(e,t){return function(e,t){let n=!1;return rl(e).Mt((r=>el(e,r,t).next((e=>(e&&(n=!0),gs.resolve(!e)))))).next((()=>n))}(e,t)}removeOrphanedDocuments(e,t){const n=this.db.getRemoteDocumentCache().newChangeBuffer(),r=[];let i=0;return this.we(e,((o,a)=>{if(a<=t){const t=this._e(e,o).next((t=>{if(!t)return i++,n.getEntry(e,o).next((()=>(n.removeEntry(o),ll(e).delete([0,qa(o.path)]))))}));r.push(t)}})).next((()=>gs.waitFor(r))).next((()=>n.apply(e))).next((()=>i))}removeTarget(e,t){const n=t.withSequenceNumber(e.currentSequenceNumber);return this.db.getTargetCache().updateTargetData(e,n)}updateLimboDocument(e,t){return ml(e,t)}we(e,t){const n=ll(e);let r,i=wr.o;return n.Ot({index:as.documentTargetsIndex},(([e,n],{path:o,sequenceNumber:a})=>{0===e?(i!==wr.o&&t(new oi(Ga(r)),i),i=a,r=o):i=wr.o})).next((()=>{i!==wr.o&&t(new oi(Ga(r)),i)}))}getCacheSize(e){return this.db.getRemoteDocumentCache().getSize(e)}}function ml(e,t){return ll(e).put(function(e,t){return new as(0,qa(e.path),t)}(t,e.currentSequenceNumber))}class gl{constructor(e,t){this.mapKeyFn=e,this.equalsFn=t,this.inner={}}get(e){const t=this.mapKeyFn(e),n=this.inner[t];if(void 0!==n)for(const[t,r]of n)if(this.equalsFn(t,e))return r}has(e){return void 0!==this.get(e)}set(e,t){const n=this.mapKeyFn(e),r=this.inner[n];if(void 0!==r){for(let n=0;n<r.length;n++)if(this.equalsFn(r[n][0],e))return void(r[n]=[e,t]);r.push([e,t])}else this.inner[n]=[[e,t]]}delete(e){const t=this.mapKeyFn(e),n=this.inner[t];if(void 0===n)return!1;for(let r=0;r<n.length;r++)if(this.equalsFn(n[r][0],e))return 1===n.length?delete this.inner[t]:n.splice(r,1),!0;return!1}forEach(e){zr(this.inner,((t,n)=>{for(const[t,r]of n)e(t,r)}))}isEmpty(){return Ur(this.inner)}}class vl{constructor(){this.changes=new gl((e=>e.toString()),((e,t)=>e.isEqual(t))),this.changesApplied=!1}getReadTime(e){const t=this.changes.get(e);return t?t.readTime:Wr.min()}addEntry(e,t){this.assertNotApplied(),this.changes.set(e.key,{document:e,readTime:t})}removeEntry(e,t=null){this.assertNotApplied(),this.changes.set(e,{document:Ei.newInvalidDocument(e),readTime:t})}getEntry(e,t){this.assertNotApplied();const n=this.changes.get(t);return void 0!==n?gs.resolve(n.document):this.getFromCache(e,t)}getEntries(e,t){return this.getAllFromCache(e,t)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}class yl{constructor(e,t){this.R=e,this.qt=t}addEntry(e,t,n){return El(e).put(_l(t),n)}removeEntry(e,t){const n=El(e),r=_l(t);return n.delete(r)}updateMetadata(e,t){return this.getMetadata(e).next((n=>(n.byteSize+=t,this.me(e,n))))}getEntry(e,t){return El(e).get(_l(t)).next((e=>this.ge(t,e)))}ye(e,t){return El(e).get(_l(t)).next((e=>({document:this.ge(t,e),size:Xs(e)})))}getEntries(e,t){let n=Go();return this.pe(e,t,((e,t)=>{const r=this.ge(e,t);n=n.insert(e,r)})).next((()=>n))}Ee(e,t){let n=Go(),r=new Vo(oi.comparator);return this.pe(e,t,((e,t)=>{const i=this.ge(e,t);n=n.insert(e,i),r=r.insert(e,Xs(t))})).next((()=>({documents:n,Te:r})))}pe(e,t,n){if(t.isEmpty())return gs.resolve();const r=IDBKeyRange.bound(t.first().path.toArray(),t.last().path.toArray()),i=t.getIterator();let o=i.getNext();return El(e).Ot({range:r},((e,t,r)=>{const a=oi.fromSegments(e);for(;o&&oi.comparator(o,a)<0;)n(o,null),o=i.getNext();o&&o.isEqual(a)&&(n(o,t),o=i.hasNext()?i.getNext():null),o?r.Ct(o.path.toArray()):r.done()})).next((()=>{for(;o;)n(o,null),o=i.hasNext()?i.getNext():null}))}getDocumentsMatchingQuery(e,t,n){let r=Go();const i=t.path.length+1,o={};if(n.isEqual(Wr.min())){const e=t.path.toArray();o.range=IDBKeyRange.lowerBound(e)}else{const e=t.path.toArray(),r=Rs(n);o.range=IDBKeyRange.lowerBound([e,r],!0),o.index=rs.collectionReadTimeIndex}return El(e).Ot(o,((e,n,o)=>{if(e.length!==i)return;const a=As(this.R,n);t.path.isPrefixOf(a.key.path)?no(t,a)&&(r=r.insert(a.key,a)):o.done()})).next((()=>r))}newChangeBuffer(e){return new bl(this,!!e&&e.trackRemovals)}getSize(e){return this.getMetadata(e).next((e=>e.byteSize))}getMetadata(e){return wl(e).get(is.key).next((e=>(Nr(!!e),e)))}me(e,t){return wl(e).put(is.key,t)}ge(e,t){if(t){const e=As(this.R,t);if(!e.isNoDocument()||!e.version.isEqual(Wr.min()))return e}return Ei.newInvalidDocument(e)}}class bl extends vl{constructor(e,t){super(),this.Ie=e,this.trackRemovals=t,this.Ae=new gl((e=>e.toString()),((e,t)=>e.isEqual(t)))}applyChanges(e){const t=[];let n=0,r=new qo(((e,t)=>Mr(e.canonicalString(),t.canonicalString())));return this.changes.forEach(((i,o)=>{const a=this.Ae.get(i);if(o.document.isValidDocument()){const s=Ds(this.Ie.R,o.document,this.getReadTime(i));r=r.add(i.path.popLast());const l=Xs(s);n+=l-a,t.push(this.Ie.addEntry(e,i,s))}else if(n-=a,this.trackRemovals){const n=Ds(this.Ie.R,Ei.newNoDocument(i,Wr.min()),this.getReadTime(i));t.push(this.Ie.addEntry(e,i,n))}else t.push(this.Ie.removeEntry(e,i))})),r.forEach((n=>{t.push(this.Ie.qt.addToCollectionParentIndex(e,n))})),t.push(this.Ie.updateMetadata(e,n)),gs.waitFor(t)}getFromCache(e,t){return this.Ie.ye(e,t).next((e=>(this.Ae.set(t,e.size),e.document)))}getAllFromCache(e,t){return this.Ie.Ee(e,t).next((({documents:e,Te:t})=>(t.forEach(((e,t)=>{this.Ae.set(e,t)})),e)))}}function wl(e){return Is(e,is.store)}function El(e){return Is(e,rs.store)}function _l(e){return e.path.toArray()}class Cl{constructor(e){this.R=e}Rt(e,t,n,r){Nr(n<r&&n>=0&&r<=11);const i=new vs("createOrUpgrade",t);n<1&&r>=1&&(function(e){e.createObjectStore(Ya.store)}(e),function(e){e.createObjectStore(Xa.store,{keyPath:Xa.keyPath}),e.createObjectStore(Ja.store,{keyPath:Ja.keyPath,autoIncrement:!0}).createIndex(Ja.userMutationsIndex,Ja.userMutationsKeyPath,{unique:!0}),e.createObjectStore(es.store)}(e),Sl(e),function(e){e.createObjectStore(rs.store)}(e));let o=gs.resolve();return n<3&&r>=3&&(0!==n&&(function(e){e.deleteObjectStore(as.store),e.deleteObjectStore(os.store),e.deleteObjectStore(ss.store)}(e),Sl(e)),o=o.next((()=>function(e){const t=e.store(ss.store),n=new ss(0,0,Wr.min().toTimestamp(),0);return t.put(ss.key,n)}(i)))),n<4&&r>=4&&(0!==n&&(o=o.next((()=>function(e,t){return t.store(Ja.store).Nt().next((n=>{e.deleteObjectStore(Ja.store),e.createObjectStore(Ja.store,{keyPath:Ja.keyPath,autoIncrement:!0}).createIndex(Ja.userMutationsIndex,Ja.userMutationsKeyPath,{unique:!0});const r=t.store(Ja.store),i=n.map((e=>r.put(e)));return gs.waitFor(i)}))}(e,i)))),o=o.next((()=>{!function(e){e.createObjectStore(us.store,{keyPath:us.keyPath})}(e)}))),n<5&&r>=5&&(o=o.next((()=>this.Re(i)))),n<6&&r>=6&&(o=o.next((()=>(function(e){e.createObjectStore(is.store)}(e),this.Pe(i))))),n<7&&r>=7&&(o=o.next((()=>this.be(i)))),n<8&&r>=8&&(o=o.next((()=>this.ve(e,i)))),n<9&&r>=9&&(o=o.next((()=>{!function(e){e.objectStoreNames.contains("remoteDocumentChanges")&&e.deleteObjectStore("remoteDocumentChanges")}(e),function(e){const t=e.objectStore(rs.store);t.createIndex(rs.readTimeIndex,rs.readTimeIndexPath,{unique:!1}),t.createIndex(rs.collectionReadTimeIndex,rs.collectionReadTimeIndexPath,{unique:!1})}(t)}))),n<10&&r>=10&&(o=o.next((()=>this.Ve(i)))),n<11&&r>=11&&(o=o.next((()=>{!function(e){e.createObjectStore(cs.store,{keyPath:cs.keyPath})}(e),function(e){e.createObjectStore(ds.store,{keyPath:ds.keyPath})}(e)}))),o}Pe(e){let t=0;return e.store(rs.store).Ot(((e,n)=>{t+=Xs(n)})).next((()=>{const n=new is(t);return e.store(is.store).put(is.key,n)}))}Re(e){const t=e.store(Xa.store),n=e.store(Ja.store);return t.Nt().next((t=>gs.forEach(t,(t=>{const r=IDBKeyRange.bound([t.userId,-1],[t.userId,t.lastAcknowledgedBatchId]);return n.Nt(Ja.userMutationsIndex,r).next((n=>gs.forEach(n,(n=>{Nr(n.userId===t.userId);const r=Fs(this.R,n);return Ys(e,t.userId,r).next((()=>{}))}))))}))))}be(e){const t=e.store(as.store),n=e.store(rs.store);return e.store(ss.store).get(ss.key).next((e=>{const r=[];return n.Ot(((n,i)=>{const o=new Zr(n),a=function(e){return[0,qa(e)]}(o);r.push(t.get(a).next((n=>n?gs.resolve():(n=>t.put(new as(0,qa(n),e.highestListenSequenceNumber)))(o))))})).next((()=>gs.waitFor(r)))}))}ve(e,t){e.createObjectStore(ls.store,{keyPath:ls.keyPath});const n=t.store(ls.store),r=new qs,i=e=>{if(r.add(e)){const t=e.lastSegment(),r=e.popLast();return n.put({collectionId:t,parent:qa(r)})}};return t.store(rs.store).Ot({$t:!0},((e,t)=>{const n=new Zr(e);return i(n.popLast())})).next((()=>t.store(es.store).Ot({$t:!0},(([e,t,n],r)=>{const o=Ga(t);return i(o.popLast())}))))}Ve(e){const t=e.store(os.store);return t.Ot(((e,n)=>{const r=Ws(n),i=Bs(this.R,r);return t.put(i)}))}}function Sl(e){e.createObjectStore(as.store,{keyPath:as.keyPath}).createIndex(as.documentTargetsIndex,as.documentTargetsKeyPath,{unique:!0}),e.createObjectStore(os.store,{keyPath:os.keyPath}).createIndex(os.queryTargetsIndexName,os.queryTargetsKeyPath,{unique:!0}),e.createObjectStore(ss.store)}const xl="Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.";class Tl{constructor(e,t,n,r,i,o,a,s,l,u){if(this.allowTabSynchronization=e,this.persistenceKey=t,this.clientId=n,this.Se=i,this.window=o,this.document=a,this.De=l,this.Ce=u,this.Ne=null,this.xe=!1,this.isPrimary=!1,this.networkEnabled=!0,this.ke=null,this.inForeground=!1,this.$e=null,this.Oe=null,this.Me=Number.NEGATIVE_INFINITY,this.Fe=e=>Promise.resolve(),!Tl.gt())throw new _r(Er.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.referenceDelegate=new pl(this,r),this.Le=t+"main",this.R=new Ns(s),this.Be=new ys(this.Le,11,new Cl(this.R)),this.Ue=new ol(this.referenceDelegate,this.R),this.qt=new Hs,this.qe=function(e,t){return new yl(e,t)}(this.R,this.qt),this.Ke=new Us,this.window&&this.window.localStorage?this.Qe=this.window.localStorage:(this.Qe=null,!1===u&&Ir("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}start(){return this.je().then((()=>{if(!this.isPrimary&&!this.allowTabSynchronization)throw new _r(Er.FAILED_PRECONDITION,xl);return this.We(),this.Ge(),this.ze(),this.runTransaction("getHighestListenSequenceNumber","readonly",(e=>this.Ue.getHighestSequenceNumber(e)))})).then((e=>{this.Ne=new wr(e,this.De)})).then((()=>{this.xe=!0})).catch((e=>(this.Be&&this.Be.close(),Promise.reject(e))))}He(e){return this.Fe=async t=>{if(this.started)return e(t)},e(this.isPrimary)}setDatabaseDeletedListener(e){this.Be.bt((async t=>{null===t.newVersion&&await e()}))}setNetworkEnabled(e){this.networkEnabled!==e&&(this.networkEnabled=e,this.Se.enqueueAndForget((async()=>{this.started&&await this.je()})))}je(){return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",(e=>kl(e).put(new us(this.clientId,Date.now(),this.networkEnabled,this.inForeground)).next((()=>{if(this.isPrimary)return this.Je(e).next((e=>{e||(this.isPrimary=!1,this.Se.enqueueRetryable((()=>this.Fe(!1))))}))})).next((()=>this.Ye(e))).next((t=>this.isPrimary&&!t?this.Xe(e).next((()=>!1)):!!t&&this.Ze(e).next((()=>!0)))))).catch((e=>{if(Es(e))return Tr("IndexedDbPersistence","Failed to extend owner lease: ",e),this.isPrimary;if(!this.allowTabSynchronization)throw e;return Tr("IndexedDbPersistence","Releasing owner lease after error during lease refresh",e),!1})).then((e=>{this.isPrimary!==e&&this.Se.enqueueRetryable((()=>this.Fe(e))),this.isPrimary=e}))}Je(e){return Il(e).get(Ya.key).next((e=>gs.resolve(this.tn(e))))}en(e){return kl(e).delete(this.clientId)}async nn(){if(this.isPrimary&&!this.sn(this.Me,18e5)){this.Me=Date.now();const e=await this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",(e=>{const t=Is(e,us.store);return t.Nt().next((e=>{const n=this.rn(e,18e5),r=e.filter((e=>-1===n.indexOf(e)));return gs.forEach(r,(e=>t.delete(e.clientId))).next((()=>r))}))})).catch((()=>[]));if(this.Qe)for(const t of e)this.Qe.removeItem(this.on(t.clientId))}}ze(){this.Oe=this.Se.enqueueAfterDelay("client_metadata_refresh",4e3,(()=>this.je().then((()=>this.nn())).then((()=>this.ze()))))}tn(e){return!!e&&e.ownerId===this.clientId}Ye(e){return this.Ce?gs.resolve(!0):Il(e).get(Ya.key).next((t=>{if(null!==t&&this.sn(t.leaseTimestampMs,5e3)&&!this.cn(t.ownerId)){if(this.tn(t)&&this.networkEnabled)return!0;if(!this.tn(t)){if(!t.allowTabSynchronization)throw new _r(Er.FAILED_PRECONDITION,xl);return!1}}return!(!this.networkEnabled||!this.inForeground)||kl(e).Nt().next((e=>void 0===this.rn(e,5e3).find((e=>{if(this.clientId!==e.clientId){const t=!this.networkEnabled&&e.networkEnabled,n=!this.inForeground&&e.inForeground,r=this.networkEnabled===e.networkEnabled;if(t||n&&r)return!0}return!1}))))})).next((e=>(this.isPrimary!==e&&Tr("IndexedDbPersistence",`Client ${e?"is":"is not"} eligible for a primary lease.`),e)))}async shutdown(){this.xe=!1,this.an(),this.Oe&&(this.Oe.cancel(),this.Oe=null),this.un(),this.hn(),await this.Be.runTransaction("shutdown","readwrite",[Ya.store,us.store],(e=>{const t=new Ts(e,wr.o);return this.Xe(t).next((()=>this.en(t)))})),this.Be.close(),this.ln()}rn(e,t){return e.filter((e=>this.sn(e.updateTimeMs,t)&&!this.cn(e.clientId)))}fn(){return this.runTransaction("getActiveClients","readonly",(e=>kl(e).Nt().next((e=>this.rn(e,18e5).map((e=>e.clientId))))))}get started(){return this.xe}getMutationQueue(e){return Js.Qt(e,this.R,this.qt,this.referenceDelegate)}getTargetCache(){return this.Ue}getRemoteDocumentCache(){return this.qe}getIndexManager(){return this.qt}getBundleCache(){return this.Ke}runTransaction(e,t,n){Tr("IndexedDbPersistence","Starting transaction:",e);const r="readonly"===t?"readonly":"readwrite";let i;return this.Be.runTransaction(e,r,hs,(r=>(i=new Ts(r,this.Ne?this.Ne.next():wr.o),"readwrite-primary"===t?this.Je(i).next((e=>!!e||this.Ye(i))).next((t=>{if(!t)throw Ir(`Failed to obtain primary lease for action '${e}'.`),this.isPrimary=!1,this.Se.enqueueRetryable((()=>this.Fe(!1))),new _r(Er.FAILED_PRECONDITION,fs);return n(i)})).next((e=>this.Ze(i).next((()=>e)))):this.dn(i).next((()=>n(i)))))).then((e=>(i.raiseOnCommittedEvent(),e)))}dn(e){return Il(e).get(Ya.key).next((e=>{if(null!==e&&this.sn(e.leaseTimestampMs,5e3)&&!this.cn(e.ownerId)&&!this.tn(e)&&!(this.Ce||this.allowTabSynchronization&&e.allowTabSynchronization))throw new _r(Er.FAILED_PRECONDITION,xl)}))}Ze(e){const t=new Ya(this.clientId,this.allowTabSynchronization,Date.now());return Il(e).put(Ya.key,t)}static gt(){return ys.gt()}Xe(e){const t=Il(e);return t.get(Ya.key).next((e=>this.tn(e)?(Tr("IndexedDbPersistence","Releasing primary lease."),t.delete(Ya.key)):gs.resolve()))}sn(e,t){const n=Date.now();return!(e<n-t||e>n&&(Ir(`Detected an update time that is in the future: ${e} > ${n}`),1))}We(){null!==this.document&&"function"==typeof this.document.addEventListener&&(this.$e=()=>{this.Se.enqueueAndForget((()=>(this.inForeground="visible"===this.document.visibilityState,this.je())))},this.document.addEventListener("visibilitychange",this.$e),this.inForeground="visible"===this.document.visibilityState)}un(){this.$e&&(this.document.removeEventListener("visibilitychange",this.$e),this.$e=null)}Ge(){var e;"function"==typeof(null===(e=this.window)||void 0===e?void 0:e.addEventListener)&&(this.ke=()=>{this.an(),this.Se.enqueueAndForget((()=>this.shutdown()))},this.window.addEventListener("pagehide",this.ke))}hn(){this.ke&&(this.window.removeEventListener("pagehide",this.ke),this.ke=null)}cn(e){var t;try{const n=null!==(null===(t=this.Qe)||void 0===t?void 0:t.getItem(this.on(e)));return Tr("IndexedDbPersistence",`Client '${e}' ${n?"is":"is not"} zombied in LocalStorage`),n}catch(e){return Ir("IndexedDbPersistence","Failed to get zombied client id.",e),!1}}an(){if(this.Qe)try{this.Qe.setItem(this.on(this.clientId),String(Date.now()))}catch(e){Ir("Failed to set zombie client id.",e)}}ln(){if(this.Qe)try{this.Qe.removeItem(this.on(this.clientId))}catch(e){}}on(e){return`firestore_zombie_${this.persistenceKey}_${e}`}}function Il(e){return Is(e,Ya.store)}function kl(e){return Is(e,us.store)}function Ol(e,t){let n=e.projectId;return e.isDefaultDatabase||(n+="."+e.database),"firestore/"+t+"/"+n+"/"}class Pl{constructor(e,t){this.progress=e,this.wn=t}}class Nl{constructor(e,t,n){this.qe=e,this._n=t,this.qt=n}mn(e,t){return this._n.getAllMutationBatchesAffectingDocumentKey(e,t).next((n=>this.gn(e,t,n)))}gn(e,t,n){return this.qe.getEntry(e,t).next((e=>{for(const t of n)t.applyToLocalView(e);return e}))}yn(e,t){e.forEach(((e,n)=>{for(const e of t)e.applyToLocalView(n)}))}pn(e,t){return this.qe.getEntries(e,t).next((t=>this.En(e,t).next((()=>t))))}En(e,t){return this._n.getAllMutationBatchesAffectingDocumentKeys(e,t).next((e=>this.yn(t,e)))}getDocumentsMatchingQuery(e,t,n){return function(e){return oi.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}(t)?this.Tn(e,t.path):Gi(t)?this.In(e,t,n):this.An(e,t,n)}Tn(e,t){return this.mn(e,new oi(t)).next((e=>{let t=Yo();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t}))}In(e,t,n){const r=t.collectionGroup;let i=Yo();return this.qt.getCollectionParents(e,r).next((o=>gs.forEach(o,(o=>{const a=function(e,t){return new Ui(t,null,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(t,o.child(r));return this.An(e,a,n).next((e=>{e.forEach(((e,t)=>{i=i.insert(e,t)}))}))})).next((()=>i))))}An(e,t,n){let r,i;return this.qe.getDocumentsMatchingQuery(e,t,n).next((n=>(r=n,this._n.getAllMutationBatchesAffectingQuery(e,t)))).next((t=>(i=t,this.Rn(e,i,r).next((e=>{r=e;for(const e of i)for(const t of e.mutations){const n=t.key;let i=r.get(n);null==i&&(i=Ei.newInvalidDocument(n),r=r.insert(n,i)),Io(t,i,e.localWriteTime),i.isFoundDocument()||(r=r.remove(n))}}))))).next((()=>(r.forEach(((e,n)=>{no(t,n)||(r=r.remove(e))})),r)))}Rn(e,t,n){let r=ta();for(const e of t)for(const t of e.mutations)t instanceof Ao&&null===n.get(t.key)&&(r=r.add(t.key));let i=n;return this.qe.getEntries(e,r).next((e=>(e.forEach(((e,t)=>{t.isFoundDocument()&&(i=i.insert(e,t))})),i)))}}class Al{constructor(e,t,n,r){this.targetId=e,this.fromCache=t,this.Pn=n,this.bn=r}static vn(e,t){let n=ta(),r=ta();for(const e of t.docChanges)switch(e.type){case 0:n=n.add(e.doc.key);break;case 1:r=r.add(e.doc.key)}return new Al(e,t.fromCache,n,r)}}class Dl{Vn(e){this.Sn=e}getDocumentsMatchingQuery(e,t,n,r){return function(e){return 0===e.filters.length&&null===e.limit&&null==e.startAt&&null==e.endAt&&(0===e.explicitOrderBy.length||1===e.explicitOrderBy.length&&e.explicitOrderBy[0].field.isKeyField())}(t)||n.isEqual(Wr.min())?this.Dn(e,t):this.Sn.pn(e,r).next((i=>{const o=this.Cn(t,i);return($i(t)||qi(t))&&this.Nn(t.limitType,o,r,n)?this.Dn(e,t):(Sr()<=h.in.DEBUG&&Tr("QueryEngine","Re-using previous result from %s to execute query: %s",n.toString(),to(t)),this.Sn.getDocumentsMatchingQuery(e,t,n).next((e=>(o.forEach((t=>{e=e.insert(t.key,t)})),e))))}))}Cn(e,t){let n=new qo(ro(e));return t.forEach(((t,r)=>{no(e,r)&&(n=n.add(r))})),n}Nn(e,t,n,r){if(n.size!==t.size)return!0;const i="F"===e?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(r)>0)}Dn(e,t){return Sr()<=h.in.DEBUG&&Tr("QueryEngine","Using full collection scan to execute query:",to(t)),this.Sn.getDocumentsMatchingQuery(e,t,Wr.min())}}class Rl{constructor(e,t,n,r){this.persistence=e,this.xn=t,this.R=r,this.kn=new Vo(Mr),this.$n=new gl((e=>Si(e)),xi),this.On=Wr.min(),this._n=e.getMutationQueue(n),this.Mn=e.getRemoteDocumentCache(),this.Ue=e.getTargetCache(),this.Fn=new Nl(this.Mn,this._n,this.persistence.getIndexManager()),this.Ke=e.getBundleCache(),this.xn.Vn(this.Fn)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",(t=>e.collect(t,this.kn)))}}function Ml(e,t,n,r){return new Rl(e,t,n,r)}async function Ll(e,t){const n=Ar(e);let r=n._n,i=n.Fn;const o=await n.persistence.runTransaction("Handle user change","readonly",(e=>{let o;return n._n.getAllMutationBatches(e).next((a=>(o=a,r=n.persistence.getMutationQueue(t),i=new Nl(n.Mn,r,n.persistence.getIndexManager()),r.getAllMutationBatches(e)))).next((t=>{const n=[],r=[];let a=ta();for(const e of o){n.push(e.batchId);for(const t of e.mutations)a=a.add(t.key)}for(const e of t){r.push(e.batchId);for(const t of e.mutations)a=a.add(t.key)}return i.pn(e,a).next((e=>({Ln:e,removedBatchIds:n,addedBatchIds:r})))}))}));return n._n=r,n.Fn=i,n.xn.Vn(n.Fn),o}function jl(e){const t=Ar(e);return t.persistence.runTransaction("Get last remote snapshot version","readonly",(e=>t.Ue.getLastRemoteSnapshotVersion(e)))}function Fl(e,t,n,r,i){let o=ta();return n.forEach((e=>o=o.add(e))),t.getEntries(e,o).next((e=>{let o=Go();return n.forEach(((n,a)=>{const s=e.get(n),l=(null==i?void 0:i.get(n))||r;a.isNoDocument()&&a.version.isEqual(Wr.min())?(t.removeEntry(n,l),o=o.insert(n,a)):!s.isValidDocument()||a.version.compareTo(s.version)>0||0===a.version.compareTo(s.version)&&s.hasPendingWrites?(t.addEntry(a,l),o=o.insert(n,a)):Tr("LocalStore","Ignoring outdated watch update for ",n,". Current version:",s.version," Watch version:",a.version)})),o}))}function Wl(e,t){const n=Ar(e);return n.persistence.runTransaction("Get next mutation batch","readonly",(e=>(void 0===t&&(t=-1),n._n.getNextMutationBatchAfterBatchId(e,t))))}function Bl(e,t){const n=Ar(e);return n.persistence.runTransaction("Allocate target","readwrite",(e=>{let r;return n.Ue.getTargetData(e,t).next((i=>i?(r=i,gs.resolve(r)):n.Ue.allocateTargetId(e).next((i=>(r=new Ps(t,i,0,e.currentSequenceNumber),n.Ue.addTargetData(e,r).next((()=>r)))))))})).then((e=>{const r=n.kn.get(e.targetId);return(null===r||e.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(n.kn=n.kn.insert(e.targetId,e),n.$n.set(t,e.targetId)),e}))}async function zl(e,t,n){const r=Ar(e),i=r.kn.get(t),o=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",o,(e=>r.persistence.referenceDelegate.removeTarget(e,i)))}catch(e){if(!Es(e))throw e;Tr("LocalStore",`Failed to update sequence numbers for target ${t}: ${e}`)}r.kn=r.kn.remove(t),r.$n.delete(i.target)}function Ul(e,t,n){const r=Ar(e);let i=Wr.min(),o=ta();return r.persistence.runTransaction("Execute query","readonly",(e=>function(e,t,n){const r=Ar(e),i=r.$n.get(n);return void 0!==i?gs.resolve(r.kn.get(i)):r.Ue.getTargetData(t,n)}(r,e,Yi(t)).next((t=>{if(t)return i=t.lastLimboFreeSnapshotVersion,r.Ue.getMatchingKeysForTargetId(e,t.targetId).next((e=>{o=e}))})).next((()=>r.xn.getDocumentsMatchingQuery(e,t,n?i:Wr.min(),n?o:ta()))).next((e=>({documents:e,Bn:o})))))}function Vl(e,t){const n=Ar(e),r=Ar(n.Ue),i=n.kn.get(t);return i?Promise.resolve(i.target):n.persistence.runTransaction("Get target data","readonly",(e=>r.lt(e,t).next((e=>e?e.target:null))))}function Zl(e){const t=Ar(e);return t.persistence.runTransaction("Get new document changes","readonly",(e=>function(e,t,n){const r=Ar(e);let i=Go(),o=Rs(n);const a=El(t),s=IDBKeyRange.lowerBound(o,!0);return a.Ot({index:rs.readTimeIndex,range:s},((e,t)=>{const n=As(r.R,t);i=i.insert(n.key,n),o=t.readTime})).next((()=>({wn:i,readTime:Ms(o)})))}(t.Mn,e,t.On))).then((({wn:e,readTime:n})=>(t.On=n,e)))}async function $l(e,t,n=ta()){const r=await Bl(e,Yi(zs(t.bundledQuery))),i=Ar(e);return i.persistence.runTransaction("Save named query","readwrite",(e=>{const o=ba(t.readTime);if(r.snapshotVersion.compareTo(o)>=0)return i.Ke.saveNamedQuery(e,t);const a=r.withResumeToken(Kr.EMPTY_BYTE_STRING,o);return i.kn=i.kn.insert(a.targetId,a),i.Ue.updateTargetData(e,a).next((()=>i.Ue.removeMatchingKeysForTargetId(e,r.targetId))).next((()=>i.Ue.addMatchingKeys(e,n,r.targetId))).next((()=>i.Ke.saveNamedQuery(e,t)))}))}class ql{constructor(e){this.R=e,this.Qn=new Map,this.jn=new Map}getBundleMetadata(e,t){return gs.resolve(this.Qn.get(t))}saveBundleMetadata(e,t){var n;return this.Qn.set(t.id,{id:(n=t).id,version:n.version,createTime:ba(n.createTime)}),gs.resolve()}getNamedQuery(e,t){return gs.resolve(this.jn.get(t))}saveNamedQuery(e,t){return this.jn.set(t.name,function(e){return{name:e.name,query:zs(e.bundledQuery),readTime:ba(e.readTime)}}(t)),gs.resolve()}}class Hl{constructor(){this.Wn=new qo(Kl.Gn),this.zn=new qo(Kl.Hn)}isEmpty(){return this.Wn.isEmpty()}addReference(e,t){const n=new Kl(e,t);this.Wn=this.Wn.add(n),this.zn=this.zn.add(n)}Jn(e,t){e.forEach((e=>this.addReference(e,t)))}removeReference(e,t){this.Yn(new Kl(e,t))}Xn(e,t){e.forEach((e=>this.removeReference(e,t)))}Zn(e){const t=new oi(new Zr([])),n=new Kl(t,e),r=new Kl(t,e+1),i=[];return this.zn.forEachInRange([n,r],(e=>{this.Yn(e),i.push(e.key)})),i}ts(){this.Wn.forEach((e=>this.Yn(e)))}Yn(e){this.Wn=this.Wn.delete(e),this.zn=this.zn.delete(e)}es(e){const t=new oi(new Zr([])),n=new Kl(t,e),r=new Kl(t,e+1);let i=ta();return this.zn.forEachInRange([n,r],(e=>{i=i.add(e.key)})),i}containsKey(e){const t=new Kl(e,0),n=this.Wn.firstAfterOrEqual(t);return null!==n&&e.isEqual(n.key)}}class Kl{constructor(e,t){this.key=e,this.ns=t}static Gn(e,t){return oi.comparator(e.key,t.key)||Mr(e.ns,t.ns)}static Hn(e,t){return Mr(e.ns,t.ns)||oi.comparator(e.key,t.key)}}class Gl{constructor(e,t){this.qt=e,this.referenceDelegate=t,this._n=[],this.ss=1,this.rs=new qo(Kl.Gn)}checkEmpty(e){return gs.resolve(0===this._n.length)}addMutationBatch(e,t,n,r){const i=this.ss;this.ss++,this._n.length>0&&this._n[this._n.length-1];const o=new ks(i,t,n,r);this._n.push(o);for(const t of r)this.rs=this.rs.add(new Kl(t.key,i)),this.qt.addToCollectionParentIndex(e,t.key.path.popLast());return gs.resolve(o)}lookupMutationBatch(e,t){return gs.resolve(this.os(t))}getNextMutationBatchAfterBatchId(e,t){const n=t+1,r=this.cs(n),i=r<0?0:r;return gs.resolve(this._n.length>i?this._n[i]:null)}getHighestUnacknowledgedBatchId(){return gs.resolve(0===this._n.length?-1:this.ss-1)}getAllMutationBatches(e){return gs.resolve(this._n.slice())}getAllMutationBatchesAffectingDocumentKey(e,t){const n=new Kl(t,0),r=new Kl(t,Number.POSITIVE_INFINITY),i=[];return this.rs.forEachInRange([n,r],(e=>{const t=this.os(e.ns);i.push(t)})),gs.resolve(i)}getAllMutationBatchesAffectingDocumentKeys(e,t){let n=new qo(Mr);return t.forEach((e=>{const t=new Kl(e,0),r=new Kl(e,Number.POSITIVE_INFINITY);this.rs.forEachInRange([t,r],(e=>{n=n.add(e.ns)}))})),gs.resolve(this.us(n))}getAllMutationBatchesAffectingQuery(e,t){const n=t.path,r=n.length+1;let i=n;oi.isDocumentKey(i)||(i=i.child(""));const o=new Kl(new oi(i),0);let a=new qo(Mr);return this.rs.forEachWhile((e=>{const t=e.key.path;return!!n.isPrefixOf(t)&&(t.length===r&&(a=a.add(e.ns)),!0)}),o),gs.resolve(this.us(a))}us(e){const t=[];return e.forEach((e=>{const n=this.os(e);null!==n&&t.push(n)})),t}removeMutationBatch(e,t){Nr(0===this.hs(t.batchId,"removed")),this._n.shift();let n=this.rs;return gs.forEach(t.mutations,(r=>{const i=new Kl(r.key,t.batchId);return n=n.delete(i),this.referenceDelegate.markPotentiallyOrphaned(e,r.key)})).next((()=>{this.rs=n}))}Gt(e){}containsKey(e,t){const n=new Kl(t,0),r=this.rs.firstAfterOrEqual(n);return gs.resolve(t.isEqual(r&&r.key))}performConsistencyCheck(e){return this._n.length,gs.resolve()}hs(e,t){return this.cs(e)}cs(e){return 0===this._n.length?0:e-this._n[0].batchId}os(e){const t=this.cs(e);return t<0||t>=this._n.length?null:this._n[t]}}class Ql{constructor(e,t){this.qt=e,this.ls=t,this.docs=new Vo(oi.comparator),this.size=0}addEntry(e,t,n){const r=t.key,i=this.docs.get(r),o=i?i.size:0,a=this.ls(t);return this.docs=this.docs.insert(r,{document:t.clone(),size:a,readTime:n}),this.size+=a-o,this.qt.addToCollectionParentIndex(e,r.path.popLast())}removeEntry(e){const t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}getEntry(e,t){const n=this.docs.get(t);return gs.resolve(n?n.document.clone():Ei.newInvalidDocument(t))}getEntries(e,t){let n=Go();return t.forEach((e=>{const t=this.docs.get(e);n=n.insert(e,t?t.document.clone():Ei.newInvalidDocument(e))})),gs.resolve(n)}getDocumentsMatchingQuery(e,t,n){let r=Go();const i=new oi(t.path.child("")),o=this.docs.getIteratorFrom(i);for(;o.hasNext();){const{key:e,value:{document:i,readTime:a}}=o.getNext();if(!t.path.isPrefixOf(e.path))break;a.compareTo(n)<=0||no(t,i)&&(r=r.insert(i.key,i.clone()))}return gs.resolve(r)}fs(e,t){return gs.forEach(this.docs,(e=>t(e)))}newChangeBuffer(e){return new Yl(this)}getSize(e){return gs.resolve(this.size)}}class Yl extends vl{constructor(e){super(),this.Ie=e}applyChanges(e){const t=[];return this.changes.forEach(((n,r)=>{r.document.isValidDocument()?t.push(this.Ie.addEntry(e,r.document,this.getReadTime(n))):this.Ie.removeEntry(n)})),gs.waitFor(t)}getFromCache(e,t){return this.Ie.getEntry(e,t)}getAllFromCache(e,t){return this.Ie.getEntries(e,t)}}class Xl{constructor(e){this.persistence=e,this.ds=new gl((e=>Si(e)),xi),this.lastRemoteSnapshotVersion=Wr.min(),this.highestTargetId=0,this.ws=0,this._s=new Hl,this.targetCount=0,this.gs=il.Jt()}forEachTarget(e,t){return this.ds.forEach(((e,n)=>t(n))),gs.resolve()}getLastRemoteSnapshotVersion(e){return gs.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return gs.resolve(this.ws)}allocateTargetId(e){return this.highestTargetId=this.gs.next(),gs.resolve(this.highestTargetId)}setTargetsMetadata(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.ws&&(this.ws=t),gs.resolve()}te(e){this.ds.set(e.target,e);const t=e.targetId;t>this.highestTargetId&&(this.gs=new il(t),this.highestTargetId=t),e.sequenceNumber>this.ws&&(this.ws=e.sequenceNumber)}addTargetData(e,t){return this.te(t),this.targetCount+=1,gs.resolve()}updateTargetData(e,t){return this.te(t),gs.resolve()}removeTargetData(e,t){return this.ds.delete(t.target),this._s.Zn(t.targetId),this.targetCount-=1,gs.resolve()}removeTargets(e,t,n){let r=0;const i=[];return this.ds.forEach(((o,a)=>{a.sequenceNumber<=t&&null===n.get(a.targetId)&&(this.ds.delete(o),i.push(this.removeMatchingKeysForTargetId(e,a.targetId)),r++)})),gs.waitFor(i).next((()=>r))}getTargetCount(e){return gs.resolve(this.targetCount)}getTargetData(e,t){const n=this.ds.get(t)||null;return gs.resolve(n)}addMatchingKeys(e,t,n){return this._s.Jn(t,n),gs.resolve()}removeMatchingKeys(e,t,n){this._s.Xn(t,n);const r=this.persistence.referenceDelegate,i=[];return r&&t.forEach((t=>{i.push(r.markPotentiallyOrphaned(e,t))})),gs.waitFor(i)}removeMatchingKeysForTargetId(e,t){return this._s.Zn(t),gs.resolve()}getMatchingKeysForTargetId(e,t){const n=this._s.es(t);return gs.resolve(n)}containsKey(e,t){return gs.resolve(this._s.containsKey(t))}}class Jl{constructor(e,t){this.ys={},this.Ne=new wr(0),this.xe=!1,this.xe=!0,this.referenceDelegate=e(this),this.Ue=new Xl(this),this.qt=new $s,this.qe=function(e,t){return new Ql(e,t)}(this.qt,(e=>this.referenceDelegate.ps(e))),this.R=new Ns(t),this.Ke=new ql(this.R)}start(){return Promise.resolve()}shutdown(){return this.xe=!1,Promise.resolve()}get started(){return this.xe}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(){return this.qt}getMutationQueue(e){let t=this.ys[e.toKey()];return t||(t=new Gl(this.qt,this.referenceDelegate),this.ys[e.toKey()]=t),t}getTargetCache(){return this.Ue}getRemoteDocumentCache(){return this.qe}getBundleCache(){return this.Ke}runTransaction(e,t,n){Tr("MemoryPersistence","Starting transaction:",e);const r=new eu(this.Ne.next());return this.referenceDelegate.Es(),n(r).next((e=>this.referenceDelegate.Ts(r).next((()=>e)))).toPromise().then((e=>(r.raiseOnCommittedEvent(),e)))}Is(e,t){return gs.or(Object.values(this.ys).map((n=>()=>n.containsKey(e,t))))}}class eu extends ps{constructor(e){super(),this.currentSequenceNumber=e}}class tu{constructor(e){this.persistence=e,this.As=new Hl,this.Rs=null}static Ps(e){return new tu(e)}get bs(){if(this.Rs)return this.Rs;throw Pr()}addReference(e,t,n){return this.As.addReference(n,t),this.bs.delete(n.toString()),gs.resolve()}removeReference(e,t,n){return this.As.removeReference(n,t),this.bs.add(n.toString()),gs.resolve()}markPotentiallyOrphaned(e,t){return this.bs.add(t.toString()),gs.resolve()}removeTarget(e,t){this.As.Zn(t.targetId).forEach((e=>this.bs.add(e.toString())));const n=this.persistence.getTargetCache();return n.getMatchingKeysForTargetId(e,t.targetId).next((e=>{e.forEach((e=>this.bs.add(e.toString())))})).next((()=>n.removeTargetData(e,t)))}Es(){this.Rs=new Set}Ts(e){const t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return gs.forEach(this.bs,(n=>{const r=oi.fromPath(n);return this.vs(e,r).next((e=>{e||t.removeEntry(r)}))})).next((()=>(this.Rs=null,t.apply(e))))}updateLimboDocument(e,t){return this.vs(e,t).next((e=>{e?this.bs.delete(t.toString()):this.bs.add(t.toString())}))}ps(e){return 0}vs(e,t){return gs.or([()=>gs.resolve(this.As.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(e,t),()=>this.persistence.Is(e,t)])}}class nu{constructor(e){this.uid=e}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}function ru(e,t){return`firestore_clients_${e}_${t}`}function iu(e,t,n){let r=`firestore_mutations_${e}_${n}`;return t.isAuthenticated()&&(r+=`_${t.uid}`),r}function ou(e,t){return`firestore_targets_${e}_${t}`}nu.UNAUTHENTICATED=new nu(null),nu.GOOGLE_CREDENTIALS=new nu("google-credentials-uid"),nu.FIRST_PARTY=new nu("first-party-uid");class au{constructor(e,t,n,r){this.user=e,this.batchId=t,this.state=n,this.error=r}static Vs(e,t,n){const r=JSON.parse(n);let i,o="object"==typeof r&&-1!==["pending","acknowledged","rejected"].indexOf(r.state)&&(void 0===r.error||"object"==typeof r.error);return o&&r.error&&(o="string"==typeof r.error.message&&"string"==typeof r.error.code,o&&(i=new _r(r.error.code,r.error.message))),o?new au(e,t,r.state,i):(Ir("SharedClientState",`Failed to parse mutation state for ID '${t}': ${n}`),null)}Ss(){const e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)}}class su{constructor(e,t,n){this.targetId=e,this.state=t,this.error=n}static Vs(e,t){const n=JSON.parse(t);let r,i="object"==typeof n&&-1!==["not-current","current","rejected"].indexOf(n.state)&&(void 0===n.error||"object"==typeof n.error);return i&&n.error&&(i="string"==typeof n.error.message&&"string"==typeof n.error.code,i&&(r=new _r(n.error.code,n.error.message))),i?new su(e,n.state,r):(Ir("SharedClientState",`Failed to parse target state for ID '${e}': ${t}`),null)}Ss(){const e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)}}class lu{constructor(e,t){this.clientId=e,this.activeTargetIds=t}static Vs(e,t){const n=JSON.parse(t);let r="object"==typeof n&&n.activeTargetIds instanceof Array,i=ra();for(let e=0;r&&e<n.activeTargetIds.length;++e)r=ii(n.activeTargetIds[e]),i=i.add(n.activeTargetIds[e]);return r?new lu(e,i):(Ir("SharedClientState",`Failed to parse client data for instance '${e}': ${t}`),null)}}class uu{constructor(e,t){this.clientId=e,this.onlineState=t}static Vs(e){const t=JSON.parse(e);return"object"==typeof t&&-1!==["Unknown","Online","Offline"].indexOf(t.onlineState)&&"string"==typeof t.clientId?new uu(t.clientId,t.onlineState):(Ir("SharedClientState",`Failed to parse online state: ${e}`),null)}}class cu{constructor(){this.activeTargetIds=ra()}Ds(e){this.activeTargetIds=this.activeTargetIds.add(e)}Cs(e){this.activeTargetIds=this.activeTargetIds.delete(e)}Ss(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class du{constructor(e,t,n,r,i){this.window=e,this.Se=t,this.persistenceKey=n,this.Ns=r,this.syncEngine=null,this.onlineStateHandler=null,this.sequenceNumberHandler=null,this.xs=this.ks.bind(this),this.$s=new Vo(Mr),this.started=!1,this.Os=[];const o=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");this.storage=this.window.localStorage,this.currentUser=i,this.Ms=ru(this.persistenceKey,this.Ns),this.Fs=function(e){return`firestore_sequence_number_${e}`}(this.persistenceKey),this.$s=this.$s.insert(this.Ns,new cu),this.Ls=new RegExp(`^firestore_clients_${o}_([^_]*)$`),this.Bs=new RegExp(`^firestore_mutations_${o}_(\\d+)(?:_(.*))?$`),this.Us=new RegExp(`^firestore_targets_${o}_(\\d+)$`),this.qs=function(e){return`firestore_online_state_${e}`}(this.persistenceKey),this.Ks=function(e){return`firestore_bundle_loaded_${e}`}(this.persistenceKey),this.window.addEventListener("storage",this.xs)}static gt(e){return!(!e||!e.localStorage)}async start(){const e=await this.syncEngine.fn();for(const t of e){if(t===this.Ns)continue;const e=this.getItem(ru(this.persistenceKey,t));if(e){const n=lu.Vs(t,e);n&&(this.$s=this.$s.insert(n.clientId,n))}}this.Qs();const t=this.storage.getItem(this.qs);if(t){const e=this.js(t);e&&this.Ws(e)}for(const e of this.Os)this.ks(e);this.Os=[],this.window.addEventListener("pagehide",(()=>this.shutdown())),this.started=!0}writeSequenceNumber(e){this.setItem(this.Fs,JSON.stringify(e))}getAllActiveQueryTargets(){return this.Gs(this.$s)}isActiveQueryTarget(e){let t=!1;return this.$s.forEach(((n,r)=>{r.activeTargetIds.has(e)&&(t=!0)})),t}addPendingMutation(e){this.zs(e,"pending")}updateMutationState(e,t,n){this.zs(e,t,n),this.Hs(e)}addLocalQueryTarget(e){let t="not-current";if(this.isActiveQueryTarget(e)){const n=this.storage.getItem(ou(this.persistenceKey,e));if(n){const r=su.Vs(e,n);r&&(t=r.state)}}return this.Js.Ds(e),this.Qs(),t}removeLocalQueryTarget(e){this.Js.Cs(e),this.Qs()}isLocalQueryTarget(e){return this.Js.activeTargetIds.has(e)}clearQueryState(e){this.removeItem(ou(this.persistenceKey,e))}updateQueryState(e,t,n){this.Ys(e,t,n)}handleUserChange(e,t,n){t.forEach((e=>{this.Hs(e)})),this.currentUser=e,n.forEach((e=>{this.addPendingMutation(e)}))}setOnlineState(e){this.Xs(e)}notifyBundleLoaded(){this.Zs()}shutdown(){this.started&&(this.window.removeEventListener("storage",this.xs),this.removeItem(this.Ms),this.started=!1)}getItem(e){const t=this.storage.getItem(e);return Tr("SharedClientState","READ",e,t),t}setItem(e,t){Tr("SharedClientState","SET",e,t),this.storage.setItem(e,t)}removeItem(e){Tr("SharedClientState","REMOVE",e),this.storage.removeItem(e)}ks(e){const t=e;if(t.storageArea===this.storage){if(Tr("SharedClientState","EVENT",t.key,t.newValue),t.key===this.Ms)return void Ir("Received WebStorage notification for local change. Another client might have garbage-collected our state");this.Se.enqueueRetryable((async()=>{if(this.started){if(null!==t.key)if(this.Ls.test(t.key)){if(null==t.newValue){const e=this.ti(t.key);return this.ei(e,null)}{const e=this.ni(t.key,t.newValue);if(e)return this.ei(e.clientId,e)}}else if(this.Bs.test(t.key)){if(null!==t.newValue){const e=this.si(t.key,t.newValue);if(e)return this.ii(e)}}else if(this.Us.test(t.key)){if(null!==t.newValue){const e=this.ri(t.key,t.newValue);if(e)return this.oi(e)}}else if(t.key===this.qs){if(null!==t.newValue){const e=this.js(t.newValue);if(e)return this.Ws(e)}}else if(t.key===this.Fs){const e=function(e){let t=wr.o;if(null!=e)try{const n=JSON.parse(e);Nr("number"==typeof n),t=n}catch(e){Ir("SharedClientState","Failed to read sequence number from WebStorage",e)}return t}(t.newValue);e!==wr.o&&this.sequenceNumberHandler(e)}else if(t.key===this.Ks)return this.syncEngine.ci()}else this.Os.push(t)}))}}get Js(){return this.$s.get(this.Ns)}Qs(){this.setItem(this.Ms,this.Js.Ss())}zs(e,t,n){const r=new au(this.currentUser,e,t,n),i=iu(this.persistenceKey,this.currentUser,e);this.setItem(i,r.Ss())}Hs(e){const t=iu(this.persistenceKey,this.currentUser,e);this.removeItem(t)}Xs(e){const t={clientId:this.Ns,onlineState:e};this.storage.setItem(this.qs,JSON.stringify(t))}Ys(e,t,n){const r=ou(this.persistenceKey,e),i=new su(e,t,n);this.setItem(r,i.Ss())}Zs(){this.setItem(this.Ks,"value-not-used")}ti(e){const t=this.Ls.exec(e);return t?t[1]:null}ni(e,t){const n=this.ti(e);return lu.Vs(n,t)}si(e,t){const n=this.Bs.exec(e),r=Number(n[1]),i=void 0!==n[2]?n[2]:null;return au.Vs(new nu(i),r,t)}ri(e,t){const n=this.Us.exec(e),r=Number(n[1]);return su.Vs(r,t)}js(e){return uu.Vs(e)}async ii(e){if(e.user.uid===this.currentUser.uid)return this.syncEngine.ai(e.batchId,e.state,e.error);Tr("SharedClientState",`Ignoring mutation for non-active user ${e.user.uid}`)}oi(e){return this.syncEngine.ui(e.targetId,e.state,e.error)}ei(e,t){const n=t?this.$s.insert(e,t):this.$s.remove(e),r=this.Gs(this.$s),i=this.Gs(n),o=[],a=[];return i.forEach((e=>{r.has(e)||o.push(e)})),r.forEach((e=>{i.has(e)||a.push(e)})),this.syncEngine.hi(o,a).then((()=>{this.$s=n}))}Ws(e){this.$s.get(e.clientId)&&this.onlineStateHandler(e.onlineState)}Gs(e){let t=ra();return e.forEach(((e,n)=>{t=t.unionWith(n.activeTargetIds)})),t}}class hu{constructor(){this.li=new cu,this.fi={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,t,n){}addLocalQueryTarget(e){return this.li.Ds(e),this.fi[e]||"not-current"}updateQueryState(e,t,n){this.fi[e]=t}removeLocalQueryTarget(e){this.li.Cs(e)}isLocalQueryTarget(e){return this.li.activeTargetIds.has(e)}clearQueryState(e){delete this.fi[e]}getAllActiveQueryTargets(){return this.li.activeTargetIds}isActiveQueryTarget(e){return this.li.activeTargetIds.has(e)}start(){return this.li=new cu,Promise.resolve()}handleUserChange(e,t,n){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(){}}class fu{di(e){}shutdown(){}}class pu{constructor(){this.wi=()=>this._i(),this.mi=()=>this.gi(),this.yi=[],this.pi()}di(e){this.yi.push(e)}shutdown(){window.removeEventListener("online",this.wi),window.removeEventListener("offline",this.mi)}pi(){window.addEventListener("online",this.wi),window.addEventListener("offline",this.mi)}_i(){Tr("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const e of this.yi)e(0)}gi(){Tr("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const e of this.yi)e(1)}static gt(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}const mu={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery"};class gu{constructor(e){this.Ei=e.Ei,this.Ti=e.Ti}Ii(e){this.Ai=e}Ri(e){this.Pi=e}onMessage(e){this.bi=e}close(){this.Ti()}send(e){this.Ei(e)}vi(){this.Ai()}Vi(e){this.Pi(e)}Si(e){this.bi(e)}}class vu extends class{constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;const t=e.ssl?"https":"http";this.Di=t+"://"+e.host,this.Ci="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}Ni(e,t,n,r){const i=this.xi(e,t);Tr("RestConnection","Sending: ",i,n);const o={};return this.ki(o,r),this.$i(e,i,o,n).then((e=>(Tr("RestConnection","Received: ",e),e)),(t=>{throw kr("RestConnection",`${e} failed with error: `,t,"url: ",i,"request:",n),t}))}Oi(e,t,n,r){return this.Ni(e,t,n,r)}ki(e,t){if(e["X-Goog-Api-Client"]="gl-js/ fire/"+br,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t)for(const n in t.authHeaders)t.authHeaders.hasOwnProperty(n)&&(e[n]=t.authHeaders[n])}xi(e,t){const n=mu[e];return`${this.Di}/v1/${t}:${n}`}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling}$i(e,t,n,r){return new Promise(((i,o)=>{const a=new yr;a.listenOnce(fr.COMPLETE,(()=>{try{switch(a.getLastErrorCode()){case hr.NO_ERROR:const t=a.getResponseJson();Tr("Connection","XHR received:",JSON.stringify(t)),i(t);break;case hr.TIMEOUT:Tr("Connection",'RPC "'+e+'" timed out'),o(new _r(Er.DEADLINE_EXCEEDED,"Request time out"));break;case hr.HTTP_ERROR:const n=a.getStatus();if(Tr("Connection",'RPC "'+e+'" failed with status:',n,"response text:",a.getResponseText()),n>0){const e=a.getResponseJson().error;if(e&&e.status&&e.message){const t=function(e){const t=e.toLowerCase().replace(/_/g,"-");return Object.values(Er).indexOf(t)>=0?t:Er.UNKNOWN}(e.status);o(new _r(t,e.message))}else o(new _r(Er.UNKNOWN,"Server responded with status "+a.getStatus()))}else o(new _r(Er.UNAVAILABLE,"Connection failed."));break;default:Pr()}}finally{Tr("Connection",'RPC "'+e+'" completed.')}}));const s=JSON.stringify(r);a.send(t,"POST",s,n,15)}))}Mi(e,t){const n=[this.Di,"/","google.firestore.v1.Firestore","/",e,"/channel"],r=new sr,i=lt(),o={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.ki(o.initMessageHeaders,t),(0,l.uI)()||(0,l.b$)()||(0,l.d)()||(0,l.w1)()||(0,l.Mn)()||(0,l.ru)()||(o.httpHeadersOverwriteParam="$httpHeaders");const a=n.join("");Tr("Connection","Creating WebChannel: "+a,o);const s=r.createWebChannel(a,o);let u=!1,c=!1;const d=new gu({Ei:e=>{c?Tr("Connection","Not sending because WebChannel is closed:",e):(u||(Tr("Connection","Opening WebChannel transport."),s.open(),u=!0),Tr("Connection","WebChannel sending:",e),s.send(e))},Ti:()=>s.close()}),h=(e,t,n)=>{e.listen(t,(e=>{try{n(e)}catch(e){setTimeout((()=>{throw e}),0)}}))};return h(s,vr.EventType.OPEN,(()=>{c||Tr("Connection","WebChannel transport opened.")})),h(s,vr.EventType.CLOSE,(()=>{c||(c=!0,Tr("Connection","WebChannel transport closed"),d.Vi())})),h(s,vr.EventType.ERROR,(e=>{c||(c=!0,kr("Connection","WebChannel transport errored:",e),d.Vi(new _r(Er.UNAVAILABLE,"The operation could not be completed")))})),h(s,vr.EventType.MESSAGE,(e=>{var t;if(!c){const n=e.data[0];Nr(!!n);const r=n,i=r.error||(null===(t=r[0])||void 0===t?void 0:t.error);if(i){Tr("Connection","WebChannel received error:",i);const e=i.status;let t=function(e){const t=Wo[e];if(void 0!==t)return Uo(t)}(e),n=i.message;void 0===t&&(t=Er.INTERNAL,n="Unknown error status: "+e+" with message "+i.message),c=!0,d.Vi(new _r(t,n)),s.close()}else Tr("Connection","WebChannel received:",n),d.Si(n)}})),h(i,pr.STAT_EVENT,(e=>{e.stat===mr?Tr("Connection","Detected buffering proxy"):e.stat===gr&&Tr("Connection","Detected no buffering proxy")})),setTimeout((()=>{d.vi()}),0),d}}function yu(){return"undefined"!=typeof window?window:null}function bu(){return"undefined"!=typeof document?document:null}function wu(e){return new ma(e,!0)}class Eu{constructor(e,t,n=1e3,r=1.5,i=6e4){this.Se=e,this.timerId=t,this.Fi=n,this.Li=r,this.Bi=i,this.Ui=0,this.qi=null,this.Ki=Date.now(),this.reset()}reset(){this.Ui=0}Qi(){this.Ui=this.Bi}ji(e){this.cancel();const t=Math.floor(this.Ui+this.Wi()),n=Math.max(0,Date.now()-this.Ki),r=Math.max(0,t-n);r>0&&Tr("ExponentialBackoff",`Backing off for ${r} ms (base delay: ${this.Ui} ms, delay with jitter: ${t} ms, last attempt: ${n} ms ago)`),this.qi=this.Se.enqueueAfterDelay(this.timerId,r,(()=>(this.Ki=Date.now(),e()))),this.Ui*=this.Li,this.Ui<this.Fi&&(this.Ui=this.Fi),this.Ui>this.Bi&&(this.Ui=this.Bi)}Gi(){null!==this.qi&&(this.qi.skipDelay(),this.qi=null)}cancel(){null!==this.qi&&(this.qi.cancel(),this.qi=null)}Wi(){return(Math.random()-.5)*this.Ui}}class _u{constructor(e,t,n,r,i,o){this.Se=e,this.zi=n,this.Hi=r,this.Ji=i,this.listener=o,this.state=0,this.Yi=0,this.Xi=null,this.stream=null,this.Zi=new Eu(e,t)}tr(){return 1===this.state||2===this.state||4===this.state}er(){return 2===this.state}start(){3!==this.state?this.auth():this.nr()}async stop(){this.tr()&&await this.close(0)}sr(){this.state=0,this.Zi.reset()}ir(){this.er()&&null===this.Xi&&(this.Xi=this.Se.enqueueAfterDelay(this.zi,6e4,(()=>this.rr())))}cr(e){this.ar(),this.stream.send(e)}async rr(){if(this.er())return this.close(0)}ar(){this.Xi&&(this.Xi.cancel(),this.Xi=null)}async close(e,t){this.ar(),this.Zi.cancel(),this.Yi++,3!==e?this.Zi.reset():t&&t.code===Er.RESOURCE_EXHAUSTED?(Ir(t.toString()),Ir("Using maximum backoff delay to prevent overloading the backend."),this.Zi.Qi()):t&&t.code===Er.UNAUTHENTICATED&&this.Ji.invalidateToken(),null!==this.stream&&(this.ur(),this.stream.close(),this.stream=null),this.state=e,await this.listener.Ri(t)}ur(){}auth(){this.state=1;const e=this.hr(this.Yi),t=this.Yi;this.Ji.getToken().then((e=>{this.Yi===t&&this.lr(e)}),(t=>{e((()=>{const e=new _r(Er.UNKNOWN,"Fetching auth token failed: "+t.message);return this.dr(e)}))}))}lr(e){const t=this.hr(this.Yi);this.stream=this.wr(e),this.stream.Ii((()=>{t((()=>(this.state=2,this.listener.Ii())))})),this.stream.Ri((e=>{t((()=>this.dr(e)))})),this.stream.onMessage((e=>{t((()=>this.onMessage(e)))}))}nr(){this.state=4,this.Zi.ji((async()=>{this.state=0,this.start()}))}dr(e){return Tr("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(3,e)}hr(e){return t=>{this.Se.enqueueAndForget((()=>this.Yi===e?t():(Tr("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())))}}}class Cu extends _u{constructor(e,t,n,r,i){super(e,"listen_stream_connection_backoff","listen_stream_idle",t,n,i),this.R=r}wr(e){return this.Hi.Mi("Listen",e)}onMessage(e){this.Zi.reset();const t=function(e,t){let n;if("targetChange"in t){t.targetChange;const r=function(e){return"NO_CHANGE"===e?0:"ADD"===e?1:"REMOVE"===e?2:"CURRENT"===e?3:"RESET"===e?4:Pr()}(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],o=function(e,t){return e.I?(Nr(void 0===t||"string"==typeof t),Kr.fromBase64String(t||"")):(Nr(void 0===t||t instanceof Uint8Array),Kr.fromUint8Array(t||new Uint8Array))}(e,t.targetChange.resumeToken),a=t.targetChange.cause,s=a&&function(e){const t=void 0===e.code?Er.UNKNOWN:Uo(e.code);return new _r(t,e.message||"")}(a);n=new la(r,i,o,s||null)}else if("documentChange"in t){t.documentChange;const r=t.documentChange;r.document,r.document.name,r.document.updateTime;const i=Ca(e,r.document.name),o=ba(r.document.updateTime),a=new bi({mapValue:{fields:r.document.fields}}),s=Ei.newFoundDocument(i,o,a),l=r.targetIds||[],u=r.removedTargetIds||[];n=new aa(l,u,s.key,s)}else if("documentDelete"in t){t.documentDelete;const r=t.documentDelete;r.document;const i=Ca(e,r.document),o=r.readTime?ba(r.readTime):Wr.min(),a=Ei.newNoDocument(i,o),s=r.removedTargetIds||[];n=new aa([],s,a.key,a)}else if("documentRemove"in t){t.documentRemove;const r=t.documentRemove;r.document;const i=Ca(e,r.document),o=r.removedTargetIds||[];n=new aa([],o,i,null)}else{if(!("filter"in t))return Pr();{t.filter;const e=t.filter;e.targetId;const r=e.count||0,i=new Fo(r),o=e.targetId;n=new sa(o,i)}}return n}(this.R,e),n=function(e){if(!("targetChange"in e))return Wr.min();const t=e.targetChange;return t.targetIds&&t.targetIds.length?Wr.min():t.readTime?ba(t.readTime):Wr.min()}(e);return this.listener._r(t,n)}mr(e){const t={};t.database=Ta(this.R),t.addTarget=function(e,t){let n;const r=t.target;return n=Ti(r)?{documents:Aa(e,r)}:{query:Da(e,r)},n.targetId=t.targetId,t.resumeToken.approximateByteSize()>0?n.resumeToken=va(e,t.resumeToken):t.snapshotVersion.compareTo(Wr.min())>0&&(n.readTime=ga(e,t.snapshotVersion.toTimestamp())),n}(this.R,e);const n=function(e,t){const n=function(e,t){switch(t){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return Pr()}}(0,t.purpose);return null==n?null:{"goog-listen-tags":n}}(this.R,e);n&&(t.labels=n),this.cr(t)}gr(e){const t={};t.database=Ta(this.R),t.removeTarget=e,this.cr(t)}}class Su extends _u{constructor(e,t,n,r,i){super(e,"write_stream_connection_backoff","write_stream_idle",t,n,i),this.R=r,this.yr=!1}get pr(){return this.yr}start(){this.yr=!1,this.lastStreamToken=void 0,super.start()}ur(){this.yr&&this.Er([])}wr(e){return this.Hi.Mi("Write",e)}onMessage(e){if(Nr(!!e.streamToken),this.lastStreamToken=e.streamToken,this.yr){this.Zi.reset();const t=function(e,t){return e&&e.length>0?(Nr(void 0!==t),e.map((e=>function(e,t){let n=e.updateTime?ba(e.updateTime):ba(t);return n.isEqual(Wr.min())&&(n=ba(t)),new _o(n,e.transformResults||[])}(e,t)))):[]}(e.writeResults,e.commitTime),n=ba(e.commitTime);return this.listener.Tr(n,t)}return Nr(!e.writeResults||0===e.writeResults.length),this.yr=!0,this.listener.Ir()}Ar(){const e={};e.database=Ta(this.R),this.cr(e)}Er(e){const t={streamToken:this.lastStreamToken,writes:e.map((e=>Pa(this.R,e)))};this.cr(t)}}class xu extends class{}{constructor(e,t,n){super(),this.credentials=e,this.Hi=t,this.R=n,this.Rr=!1}Pr(){if(this.Rr)throw new _r(Er.FAILED_PRECONDITION,"The client has already been terminated.")}Ni(e,t,n){return this.Pr(),this.credentials.getToken().then((r=>this.Hi.Ni(e,t,n,r))).catch((e=>{throw"FirebaseError"===e.name?(e.code===Er.UNAUTHENTICATED&&this.credentials.invalidateToken(),e):new _r(Er.UNKNOWN,e.toString())}))}Oi(e,t,n){return this.Pr(),this.credentials.getToken().then((r=>this.Hi.Oi(e,t,n,r))).catch((e=>{throw"FirebaseError"===e.name?(e.code===Er.UNAUTHENTICATED&&this.credentials.invalidateToken(),e):new _r(Er.UNKNOWN,e.toString())}))}terminate(){this.Rr=!0}}class Tu{constructor(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state="Unknown",this.br=0,this.vr=null,this.Vr=!0}Sr(){0===this.br&&(this.Dr("Unknown"),this.vr=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(()=>(this.vr=null,this.Cr("Backend didn't respond within 10 seconds."),this.Dr("Offline"),Promise.resolve()))))}Nr(e){"Online"===this.state?this.Dr("Unknown"):(this.br++,this.br>=1&&(this.kr(),this.Cr(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.Dr("Offline")))}set(e){this.kr(),this.br=0,"Online"===e&&(this.Vr=!1),this.Dr(e)}Dr(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}Cr(e){const t=`Could not reach Cloud Firestore backend. ${e}\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.Vr?(Ir(t),this.Vr=!1):Tr("OnlineStateTracker",t)}kr(){null!==this.vr&&(this.vr.cancel(),this.vr=null)}}class Iu{constructor(e,t,n,r,i){this.localStore=e,this.datastore=t,this.asyncQueue=n,this.remoteSyncer={},this.$r=[],this.Or=new Map,this.Mr=new Set,this.Fr=[],this.Lr=i,this.Lr.di((e=>{n.enqueueAndForget((async()=>{Lu(this)&&(Tr("RemoteStore","Restarting streams for network reachability change."),await async function(e){const t=Ar(e);t.Mr.add(4),await Ou(t),t.Br.set("Unknown"),t.Mr.delete(4),await ku(t)}(this))}))})),this.Br=new Tu(n,r)}}async function ku(e){if(Lu(e))for(const t of e.Fr)await t(!0)}async function Ou(e){for(const t of e.Fr)await t(!1)}function Pu(e,t){const n=Ar(e);n.Or.has(t.targetId)||(n.Or.set(t.targetId,t),Mu(n)?Ru(n):Ju(n).er()&&Au(n,t))}function Nu(e,t){const n=Ar(e),r=Ju(n);n.Or.delete(t),r.er()&&Du(n,t),0===n.Or.size&&(r.er()?r.ir():Lu(n)&&n.Br.set("Unknown"))}function Au(e,t){e.Ur.q(t.targetId),Ju(e).mr(t)}function Du(e,t){e.Ur.q(t),Ju(e).gr(t)}function Ru(e){e.Ur=new ca({getRemoteKeysForTarget:t=>e.remoteSyncer.getRemoteKeysForTarget(t),lt:t=>e.Or.get(t)||null}),Ju(e).start(),e.Br.Sr()}function Mu(e){return Lu(e)&&!Ju(e).tr()&&e.Or.size>0}function Lu(e){return 0===Ar(e).Mr.size}function ju(e){e.Ur=void 0}async function Fu(e){e.Or.forEach(((t,n)=>{Au(e,t)}))}async function Wu(e,t){ju(e),Mu(e)?(e.Br.Nr(t),Ru(e)):e.Br.set("Unknown")}async function Bu(e,t,n){if(e.Br.set("Online"),t instanceof la&&2===t.state&&t.cause)try{await async function(e,t){const n=t.cause;for(const r of t.targetIds)e.Or.has(r)&&(await e.remoteSyncer.rejectListen(r,n),e.Or.delete(r),e.Ur.removeTarget(r))}(e,t)}catch(n){Tr("RemoteStore","Failed to remove targets %s: %s ",t.targetIds.join(","),n),await zu(e,n)}else if(t instanceof aa?e.Ur.X(t):t instanceof sa?e.Ur.rt(t):e.Ur.et(t),!n.isEqual(Wr.min()))try{const t=await jl(e.localStore);n.compareTo(t)>=0&&await function(e,t){const n=e.Ur.at(t);return n.targetChanges.forEach(((n,r)=>{if(n.resumeToken.approximateByteSize()>0){const i=e.Or.get(r);i&&e.Or.set(r,i.withResumeToken(n.resumeToken,t))}})),n.targetMismatches.forEach((t=>{const n=e.Or.get(t);if(!n)return;e.Or.set(t,n.withResumeToken(Kr.EMPTY_BYTE_STRING,n.snapshotVersion)),Du(e,t);const r=new Ps(n.target,t,1,n.sequenceNumber);Au(e,r)})),e.remoteSyncer.applyRemoteEvent(n)}(e,n)}catch(t){Tr("RemoteStore","Failed to raise snapshot:",t),await zu(e,t)}}async function zu(e,t,n){if(!Es(t))throw t;e.Mr.add(1),await Ou(e),e.Br.set("Offline"),n||(n=()=>jl(e.localStore)),e.asyncQueue.enqueueRetryable((async()=>{Tr("RemoteStore","Retrying IndexedDB access"),await n(),e.Mr.delete(1),await ku(e)}))}function Uu(e,t){return t().catch((n=>zu(e,n,t)))}async function Vu(e){const t=Ar(e),n=ec(t);let r=t.$r.length>0?t.$r[t.$r.length-1].batchId:-1;for(;Zu(t);)try{const e=await Wl(t.localStore,r);if(null===e){0===t.$r.length&&n.ir();break}r=e.batchId,$u(t,e)}catch(e){await zu(t,e)}qu(t)&&Hu(t)}function Zu(e){return Lu(e)&&e.$r.length<10}function $u(e,t){e.$r.push(t);const n=ec(e);n.er()&&n.pr&&n.Er(t.mutations)}function qu(e){return Lu(e)&&!ec(e).tr()&&e.$r.length>0}function Hu(e){ec(e).start()}async function Ku(e){ec(e).Ar()}async function Gu(e){const t=ec(e);for(const n of e.$r)t.Er(n.mutations)}async function Qu(e,t,n){const r=e.$r.shift(),i=Os.from(r,t,n);await Uu(e,(()=>e.remoteSyncer.applySuccessfulWrite(i))),await Vu(e)}async function Yu(e,t){t&&ec(e).pr&&await async function(e,t){if(zo(n=t.code)&&n!==Er.ABORTED){const n=e.$r.shift();ec(e).sr(),await Uu(e,(()=>e.remoteSyncer.rejectFailedWrite(n.batchId,t))),await Vu(e)}var n}(e,t),qu(e)&&Hu(e)}async function Xu(e,t){const n=Ar(e);t?(n.Mr.delete(2),await ku(n)):t||(n.Mr.add(2),await Ou(n),n.Br.set("Unknown"))}function Ju(e){return e.qr||(e.qr=function(e,t,n){const r=Ar(e);return r.Pr(),new Cu(t,r.Hi,r.credentials,r.R,n)}(e.datastore,e.asyncQueue,{Ii:Fu.bind(null,e),Ri:Wu.bind(null,e),_r:Bu.bind(null,e)}),e.Fr.push((async t=>{t?(e.qr.sr(),Mu(e)?Ru(e):e.Br.set("Unknown")):(await e.qr.stop(),ju(e))}))),e.qr}function ec(e){return e.Kr||(e.Kr=function(e,t,n){const r=Ar(e);return r.Pr(),new Su(t,r.Hi,r.credentials,r.R,n)}(e.datastore,e.asyncQueue,{Ii:Ku.bind(null,e),Ri:Yu.bind(null,e),Ir:Gu.bind(null,e),Tr:Qu.bind(null,e)}),e.Fr.push((async t=>{t?(e.Kr.sr(),await Vu(e)):(await e.Kr.stop(),e.$r.length>0&&(Tr("RemoteStore",`Stopping write stream with ${e.$r.length} pending writes`),e.$r=[]))}))),e.Kr}class tc{constructor(e,t,n,r,i){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=n,this.op=r,this.removalCallback=i,this.deferred=new ms,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((e=>{}))}static createAndSchedule(e,t,n,r,i){const o=Date.now()+n,a=new tc(e,t,o,r,i);return a.start(n),a}start(e){this.timerHandle=setTimeout((()=>this.handleDelayElapsed()),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new _r(Er.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget((()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then((e=>this.deferred.resolve(e)))):Promise.resolve()))}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function nc(e,t){if(Ir("AsyncQueue",`${t}: ${e}`),Es(e))return new _r(Er.UNAVAILABLE,`${t}: ${e}`);throw e}class rc{constructor(e){this.comparator=e?(t,n)=>e(t,n)||oi.comparator(t.key,n.key):(e,t)=>oi.comparator(e.key,t.key),this.keyedMap=Yo(),this.sortedSet=new Vo(this.comparator)}static emptySet(e){return new rc(e.comparator)}has(e){return null!=this.keyedMap.get(e)}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 t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal(((t,n)=>(e(t),!1)))}add(e){const t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}delete(e){const t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}isEqual(e){if(!(e instanceof rc))return!1;if(this.size!==e.size)return!1;const t=this.sortedSet.getIterator(),n=e.sortedSet.getIterator();for(;t.hasNext();){const e=t.getNext().key,r=n.getNext().key;if(!e.isEqual(r))return!1}return!0}toString(){const e=[];return this.forEach((t=>{e.push(t.toString())})),0===e.length?"DocumentSet ()":"DocumentSet (\n "+e.join(" \n")+"\n)"}copy(e,t){const n=new rc;return n.comparator=this.comparator,n.keyedMap=e,n.sortedSet=t,n}}class ic{constructor(){this.Qr=new Vo(oi.comparator)}track(e){const t=e.doc.key,n=this.Qr.get(t);n?0!==e.type&&3===n.type?this.Qr=this.Qr.insert(t,e):3===e.type&&1!==n.type?this.Qr=this.Qr.insert(t,{type:n.type,doc:e.doc}):2===e.type&&2===n.type?this.Qr=this.Qr.insert(t,{type:2,doc:e.doc}):2===e.type&&0===n.type?this.Qr=this.Qr.insert(t,{type:0,doc:e.doc}):1===e.type&&0===n.type?this.Qr=this.Qr.remove(t):1===e.type&&2===n.type?this.Qr=this.Qr.insert(t,{type:1,doc:n.doc}):0===e.type&&1===n.type?this.Qr=this.Qr.insert(t,{type:2,doc:e.doc}):Pr():this.Qr=this.Qr.insert(t,e)}jr(){const e=[];return this.Qr.inorderTraversal(((t,n)=>{e.push(n)})),e}}class oc{constructor(e,t,n,r,i,o,a,s){this.query=e,this.docs=t,this.oldDocs=n,this.docChanges=r,this.mutatedKeys=i,this.fromCache=o,this.syncStateChanged=a,this.excludesMetadataChanges=s}static fromInitialDocuments(e,t,n,r){const i=[];return t.forEach((e=>{i.push({type:0,doc:e})})),new oc(e,t,rc.emptySet(t),i,n,r,!0,!1)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&Ji(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const t=this.docChanges,n=e.docChanges;if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(t[e].type!==n[e].type||!t[e].doc.isEqual(n[e].doc))return!1;return!0}}class ac{constructor(){this.Wr=void 0,this.listeners=[]}}class sc{constructor(){this.queries=new gl((e=>eo(e)),Ji),this.onlineState="Unknown",this.Gr=new Set}}async function lc(e,t){const n=Ar(e),r=t.query;let i=!1,o=n.queries.get(r);if(o||(i=!0,o=new ac),i)try{o.Wr=await n.onListen(r)}catch(e){const n=nc(e,`Initialization of query '${to(t.query)}' failed`);return void t.onError(n)}n.queries.set(r,o),o.listeners.push(t),t.zr(n.onlineState),o.Wr&&t.Hr(o.Wr)&&hc(n)}async function uc(e,t){const n=Ar(e),r=t.query;let i=!1;const o=n.queries.get(r);if(o){const e=o.listeners.indexOf(t);e>=0&&(o.listeners.splice(e,1),i=0===o.listeners.length)}if(i)return n.queries.delete(r),n.onUnlisten(r)}function cc(e,t){const n=Ar(e);let r=!1;for(const e of t){const t=e.query,i=n.queries.get(t);if(i){for(const t of i.listeners)t.Hr(e)&&(r=!0);i.Wr=e}}r&&hc(n)}function dc(e,t,n){const r=Ar(e),i=r.queries.get(t);if(i)for(const e of i.listeners)e.onError(n);r.queries.delete(t)}function hc(e){e.Gr.forEach((e=>{e.next()}))}class fc{constructor(e,t,n){this.query=e,this.Jr=t,this.Yr=!1,this.Xr=null,this.onlineState="Unknown",this.options=n||{}}Hr(e){if(!this.options.includeMetadataChanges){const t=[];for(const n of e.docChanges)3!==n.type&&t.push(n);e=new oc(e.query,e.docs,e.oldDocs,t,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0)}let t=!1;return this.Yr?this.Zr(e)&&(this.Jr.next(e),t=!0):this.eo(e,this.onlineState)&&(this.no(e),t=!0),this.Xr=e,t}onError(e){this.Jr.error(e)}zr(e){this.onlineState=e;let t=!1;return this.Xr&&!this.Yr&&this.eo(this.Xr,e)&&(this.no(this.Xr),t=!0),t}eo(e,t){if(!e.fromCache)return!0;const n="Offline"!==t;return!(this.options.so&&n||e.docs.isEmpty()&&"Offline"!==t)}Zr(e){if(e.docChanges.length>0)return!0;const t=this.Xr&&this.Xr.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges}no(e){e=oc.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache),this.Yr=!0,this.Jr.next(e)}}class pc{constructor(e,t){this.payload=e,this.byteLength=t}io(){return"metadata"in this.payload}}class mc{constructor(e){this.R=e}Un(e){return Ca(this.R,e)}qn(e){return e.metadata.exists?Oa(this.R,e.document,!1):Ei.newNoDocument(this.Un(e.metadata.name),this.Kn(e.metadata.readTime))}Kn(e){return ba(e)}}class gc{constructor(e,t,n){this.ro=e,this.localStore=t,this.R=n,this.queries=[],this.documents=[],this.progress=vc(e)}oo(e){this.progress.bytesLoaded+=e.byteLength;let t=this.progress.documentsLoaded;return e.payload.namedQuery?this.queries.push(e.payload.namedQuery):e.payload.documentMetadata?(this.documents.push({metadata:e.payload.documentMetadata}),e.payload.documentMetadata.exists||++t):e.payload.document&&(this.documents[this.documents.length-1].document=e.payload.document,++t),t!==this.progress.documentsLoaded?(this.progress.documentsLoaded=t,Object.assign({},this.progress)):null}co(e){const t=new Map,n=new mc(this.R);for(const r of e)if(r.metadata.queries){const e=n.Un(r.metadata.name);for(const n of r.metadata.queries){const r=(t.get(n)||ta()).add(e);t.set(n,r)}}return t}async complete(){const e=await async function(e,t,n,r){const i=Ar(e);let o=ta(),a=Go(),s=Jo();for(const e of n){const n=t.Un(e.metadata.name);e.document&&(o=o.add(n)),a=a.insert(n,t.qn(e)),s=s.insert(n,t.Kn(e.metadata.readTime))}const l=i.Mn.newChangeBuffer({trackRemovals:!0}),u=await Bl(i,function(e){return Yi(Zi(Zr.fromString(`__bundle__/docs/${e}`)))}(r));return i.persistence.runTransaction("Apply bundle documents","readwrite",(e=>Fl(e,l,a,Wr.min(),s).next((t=>(l.apply(e),t))).next((t=>i.Ue.removeMatchingKeysForTargetId(e,u.targetId).next((()=>i.Ue.addMatchingKeys(e,o,u.targetId))).next((()=>i.Fn.En(e,t))).next((()=>t))))))}(this.localStore,new mc(this.R),this.documents,this.ro.id),t=this.co(this.documents);for(const e of this.queries)await $l(this.localStore,e,t.get(e.name));return this.progress.taskState="Success",new Pl(Object.assign({},this.progress),e)}}function vc(e){return{taskState:"Running",documentsLoaded:0,bytesLoaded:0,totalDocuments:e.totalDocuments,totalBytes:e.totalBytes}}class yc{constructor(e){this.key=e}}class bc{constructor(e){this.key=e}}class wc{constructor(e,t){this.query=e,this.ao=t,this.uo=null,this.current=!1,this.ho=ta(),this.mutatedKeys=ta(),this.lo=ro(e),this.fo=new rc(this.lo)}get wo(){return this.ao}_o(e,t){const n=t?t.mo:new ic,r=t?t.fo:this.fo;let i=t?t.mutatedKeys:this.mutatedKeys,o=r,a=!1;const s=$i(this.query)&&r.size===this.query.limit?r.last():null,l=qi(this.query)&&r.size===this.query.limit?r.first():null;if(e.inorderTraversal(((e,t)=>{const u=r.get(e),c=no(this.query,t)?t:null,d=!!u&&this.mutatedKeys.has(u.key),h=!!c&&(c.hasLocalMutations||this.mutatedKeys.has(c.key)&&c.hasCommittedMutations);let f=!1;u&&c?u.data.isEqual(c.data)?d!==h&&(n.track({type:3,doc:c}),f=!0):this.yo(u,c)||(n.track({type:2,doc:c}),f=!0,(s&&this.lo(c,s)>0||l&&this.lo(c,l)<0)&&(a=!0)):!u&&c?(n.track({type:0,doc:c}),f=!0):u&&!c&&(n.track({type:1,doc:u}),f=!0,(s||l)&&(a=!0)),f&&(c?(o=o.add(c),i=h?i.add(e):i.delete(e)):(o=o.delete(e),i=i.delete(e)))})),$i(this.query)||qi(this.query))for(;o.size>this.query.limit;){const e=$i(this.query)?o.last():o.first();o=o.delete(e.key),i=i.delete(e.key),n.track({type:1,doc:e})}return{fo:o,mo:n,Nn:a,mutatedKeys:i}}yo(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(e,t,n){const r=this.fo;this.fo=e.fo,this.mutatedKeys=e.mutatedKeys;const i=e.mo.jr();i.sort(((e,t)=>function(e,t){const n=e=>{switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return Pr()}};return n(e)-n(t)}(e.type,t.type)||this.lo(e.doc,t.doc))),this.po(n);const o=t?this.Eo():[],a=0===this.ho.size&&this.current?1:0,s=a!==this.uo;return this.uo=a,0!==i.length||s?{snapshot:new oc(this.query,e.fo,r,i,e.mutatedKeys,0===a,s,!1),To:o}:{To:o}}zr(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({fo:this.fo,mo:new ic,mutatedKeys:this.mutatedKeys,Nn:!1},!1)):{To:[]}}Io(e){return!this.ao.has(e)&&!!this.fo.has(e)&&!this.fo.get(e).hasLocalMutations}po(e){e&&(e.addedDocuments.forEach((e=>this.ao=this.ao.add(e))),e.modifiedDocuments.forEach((e=>{})),e.removedDocuments.forEach((e=>this.ao=this.ao.delete(e))),this.current=e.current)}Eo(){if(!this.current)return[];const e=this.ho;this.ho=ta(),this.fo.forEach((e=>{this.Io(e.key)&&(this.ho=this.ho.add(e.key))}));const t=[];return e.forEach((e=>{this.ho.has(e)||t.push(new bc(e))})),this.ho.forEach((n=>{e.has(n)||t.push(new yc(n))})),t}Ao(e){this.ao=e.Bn,this.ho=ta();const t=this._o(e.documents);return this.applyChanges(t,!0)}Ro(){return oc.fromInitialDocuments(this.query,this.fo,this.mutatedKeys,0===this.uo)}}class Ec{constructor(e,t,n){this.query=e,this.targetId=t,this.view=n}}class _c{constructor(e){this.key=e,this.Po=!1}}class Cc{constructor(e,t,n,r,i,o){this.localStore=e,this.remoteStore=t,this.eventManager=n,this.sharedClientState=r,this.currentUser=i,this.maxConcurrentLimboResolutions=o,this.bo={},this.vo=new gl((e=>eo(e)),Ji),this.Vo=new Map,this.So=new Set,this.Do=new Vo(oi.comparator),this.Co=new Map,this.No=new Hl,this.xo={},this.ko=new Map,this.$o=il.Yt(),this.onlineState="Unknown",this.Oo=void 0}get isPrimaryClient(){return!0===this.Oo}}async function Sc(e,t){const n=Qc(e);let r,i;const o=n.vo.get(t);if(o)r=o.targetId,n.sharedClientState.addLocalQueryTarget(r),i=o.view.Ro();else{const e=await Bl(n.localStore,Yi(t)),o=n.sharedClientState.addLocalQueryTarget(e.targetId);r=e.targetId,i=await xc(n,t,r,"current"===o),n.isPrimaryClient&&Pu(n.remoteStore,e)}return i}async function xc(e,t,n,r){e.Mo=(t,n,r)=>async function(e,t,n,r){let i=t.view._o(n);i.Nn&&(i=await Ul(e.localStore,t.query,!1).then((({documents:e})=>t.view._o(e,i))));const o=r&&r.targetChanges.get(t.targetId),a=t.view.applyChanges(i,e.isPrimaryClient,o);return Lc(e,t.targetId,a.To),a.snapshot}(e,t,n,r);const i=await Ul(e.localStore,t,!0),o=new wc(t,i.Bn),a=o._o(i.documents),s=oa.createSynthesizedTargetChangeForCurrentChange(n,r&&"Offline"!==e.onlineState),l=o.applyChanges(a,e.isPrimaryClient,s);Lc(e,n,l.To);const u=new Ec(t,n,o);return e.vo.set(t,u),e.Vo.has(n)?e.Vo.get(n).push(t):e.Vo.set(n,[t]),l.snapshot}async function Tc(e,t){const n=Ar(e),r=n.vo.get(t),i=n.Vo.get(r.targetId);if(i.length>1)return n.Vo.set(r.targetId,i.filter((e=>!Ji(e,t)))),void n.vo.delete(t);n.isPrimaryClient?(n.sharedClientState.removeLocalQueryTarget(r.targetId),n.sharedClientState.isActiveQueryTarget(r.targetId)||await zl(n.localStore,r.targetId,!1).then((()=>{n.sharedClientState.clearQueryState(r.targetId),Nu(n.remoteStore,r.targetId),Rc(n,r.targetId)})).catch(ul)):(Rc(n,r.targetId),await zl(n.localStore,r.targetId,!0))}async function Ic(e,t){const n=Ar(e);try{const e=await function(e,t){const n=Ar(e),r=t.snapshotVersion;let i=n.kn;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(e=>{const o=n.Mn.newChangeBuffer({trackRemovals:!0});i=n.kn;const a=[];t.targetChanges.forEach(((t,o)=>{const s=i.get(o);if(!s)return;a.push(n.Ue.removeMatchingKeys(e,t.removedDocuments,o).next((()=>n.Ue.addMatchingKeys(e,t.addedDocuments,o))));const l=t.resumeToken;if(l.approximateByteSize()>0){const u=s.withResumeToken(l,r).withSequenceNumber(e.currentSequenceNumber);i=i.insert(o,u),function(e,t,n){return Nr(t.resumeToken.approximateByteSize()>0),0===e.resumeToken.approximateByteSize()||t.snapshotVersion.toMicroseconds()-e.snapshotVersion.toMicroseconds()>=3e8||n.addedDocuments.size+n.modifiedDocuments.size+n.removedDocuments.size>0}(s,u,t)&&a.push(n.Ue.updateTargetData(e,u))}}));let s=Go();if(t.documentUpdates.forEach(((r,i)=>{t.resolvedLimboDocuments.has(r)&&a.push(n.persistence.referenceDelegate.updateLimboDocument(e,r))})),a.push(Fl(e,o,t.documentUpdates,r,void 0).next((e=>{s=e}))),!r.isEqual(Wr.min())){const t=n.Ue.getLastRemoteSnapshotVersion(e).next((t=>n.Ue.setTargetsMetadata(e,e.currentSequenceNumber,r)));a.push(t)}return gs.waitFor(a).next((()=>o.apply(e))).next((()=>n.Fn.En(e,s))).next((()=>s))})).then((e=>(n.kn=i,e)))}(n.localStore,t);t.targetChanges.forEach(((e,t)=>{const r=n.Co.get(t);r&&(Nr(e.addedDocuments.size+e.modifiedDocuments.size+e.removedDocuments.size<=1),e.addedDocuments.size>0?r.Po=!0:e.modifiedDocuments.size>0?Nr(r.Po):e.removedDocuments.size>0&&(Nr(r.Po),r.Po=!1))})),await Wc(n,e,t)}catch(e){await ul(e)}}function kc(e,t,n){const r=Ar(e);if(r.isPrimaryClient&&0===n||!r.isPrimaryClient&&1===n){const e=[];r.vo.forEach(((n,r)=>{const i=r.view.zr(t);i.snapshot&&e.push(i.snapshot)})),function(e,t){const n=Ar(e);n.onlineState=t;let r=!1;n.queries.forEach(((e,n)=>{for(const e of n.listeners)e.zr(t)&&(r=!0)})),r&&hc(n)}(r.eventManager,t),e.length&&r.bo._r(e),r.onlineState=t,r.isPrimaryClient&&r.sharedClientState.setOnlineState(t)}}async function Oc(e,t,n){const r=Ar(e);r.sharedClientState.updateQueryState(t,"rejected",n);const i=r.Co.get(t),o=i&&i.key;if(o){let e=new Vo(oi.comparator);e=e.insert(o,Ei.newNoDocument(o,Wr.min()));const n=ta().add(o),i=new ia(Wr.min(),new Map,new qo(Mr),e,n);await Ic(r,i),r.Do=r.Do.remove(o),r.Co.delete(t),Fc(r)}else await zl(r.localStore,t,!1).then((()=>Rc(r,t,n))).catch(ul)}async function Pc(e,t){const n=Ar(e),r=t.batch.batchId;try{const e=await function(e,t){const n=Ar(e);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",(e=>{const r=t.batch.keys(),i=n.Mn.newChangeBuffer({trackRemovals:!0});return function(e,t,n,r){const i=n.batch,o=i.keys();let a=gs.resolve();return o.forEach((e=>{a=a.next((()=>r.getEntry(t,e))).next((t=>{const o=n.docVersions.get(e);Nr(null!==o),t.version.compareTo(o)<0&&(i.applyToRemoteDocument(t,n),t.isValidDocument()&&r.addEntry(t,n.commitVersion))}))})),a.next((()=>e._n.removeMutationBatch(t,i)))}(n,e,t,i).next((()=>i.apply(e))).next((()=>n._n.performConsistencyCheck(e))).next((()=>n.Fn.pn(e,r)))}))}(n.localStore,t);Dc(n,r,null),Ac(n,r),n.sharedClientState.updateMutationState(r,"acknowledged"),await Wc(n,e)}catch(e){await ul(e)}}async function Nc(e,t,n){const r=Ar(e);try{const e=await function(e,t){const n=Ar(e);return n.persistence.runTransaction("Reject batch","readwrite-primary",(e=>{let r;return n._n.lookupMutationBatch(e,t).next((t=>(Nr(null!==t),r=t.keys(),n._n.removeMutationBatch(e,t)))).next((()=>n._n.performConsistencyCheck(e))).next((()=>n.Fn.pn(e,r)))}))}(r.localStore,t);Dc(r,t,n),Ac(r,t),r.sharedClientState.updateMutationState(t,"rejected",n),await Wc(r,e)}catch(n){await ul(n)}}function Ac(e,t){(e.ko.get(t)||[]).forEach((e=>{e.resolve()})),e.ko.delete(t)}function Dc(e,t,n){const r=Ar(e);let i=r.xo[r.currentUser.toKey()];if(i){const e=i.get(t);e&&(n?e.reject(n):e.resolve(),i=i.remove(t)),r.xo[r.currentUser.toKey()]=i}}function Rc(e,t,n=null){e.sharedClientState.removeLocalQueryTarget(t);for(const r of e.Vo.get(t))e.vo.delete(r),n&&e.bo.Fo(r,n);e.Vo.delete(t),e.isPrimaryClient&&e.No.Zn(t).forEach((t=>{e.No.containsKey(t)||Mc(e,t)}))}function Mc(e,t){e.So.delete(t.path.canonicalString());const n=e.Do.get(t);null!==n&&(Nu(e.remoteStore,n),e.Do=e.Do.remove(t),e.Co.delete(n),Fc(e))}function Lc(e,t,n){for(const r of n)r instanceof yc?(e.No.addReference(r.key,t),jc(e,r)):r instanceof bc?(Tr("SyncEngine","Document no longer in limbo: "+r.key),e.No.removeReference(r.key,t),e.No.containsKey(r.key)||Mc(e,r.key)):Pr()}function jc(e,t){const n=t.key,r=n.path.canonicalString();e.Do.get(n)||e.So.has(r)||(Tr("SyncEngine","New document in limbo: "+n),e.So.add(r),Fc(e))}function Fc(e){for(;e.So.size>0&&e.Do.size<e.maxConcurrentLimboResolutions;){const t=e.So.values().next().value;e.So.delete(t);const n=new oi(Zr.fromString(t)),r=e.$o.next();e.Co.set(r,new _c(n)),e.Do=e.Do.insert(n,r),Pu(e.remoteStore,new Ps(Yi(Zi(n.path)),r,2,wr.o))}}async function Wc(e,t,n){const r=Ar(e),i=[],o=[],a=[];r.vo.isEmpty()||(r.vo.forEach(((e,s)=>{a.push(r.Mo(s,t,n).then((e=>{if(e){r.isPrimaryClient&&r.sharedClientState.updateQueryState(s.targetId,e.fromCache?"not-current":"current"),i.push(e);const t=Al.vn(s.targetId,e);o.push(t)}})))})),await Promise.all(a),r.bo._r(i),await async function(e,t){const n=Ar(e);try{await n.persistence.runTransaction("notifyLocalViewChanges","readwrite",(e=>gs.forEach(t,(t=>gs.forEach(t.Pn,(r=>n.persistence.referenceDelegate.addReference(e,t.targetId,r))).next((()=>gs.forEach(t.bn,(r=>n.persistence.referenceDelegate.removeReference(e,t.targetId,r)))))))))}catch(e){if(!Es(e))throw e;Tr("LocalStore","Failed to update sequence numbers: "+e)}for(const e of t){const t=e.targetId;if(!e.fromCache){const e=n.kn.get(t),r=e.snapshotVersion,i=e.withLastLimboFreeSnapshotVersion(r);n.kn=n.kn.insert(t,i)}}}(r.localStore,o))}async function Bc(e,t){const n=Ar(e);if(!n.currentUser.isEqual(t)){Tr("SyncEngine","User change. New user:",t.toKey());const e=await Ll(n.localStore,t);n.currentUser=t,function(e,t){e.ko.forEach((e=>{e.forEach((e=>{e.reject(new _r(Er.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))}))})),e.ko.clear()}(n),n.sharedClientState.handleUserChange(t,e.removedBatchIds,e.addedBatchIds),await Wc(n,e.Ln)}}function zc(e,t){const n=Ar(e),r=n.Co.get(t);if(r&&r.Po)return ta().add(r.key);{let e=ta();const r=n.Vo.get(t);if(!r)return e;for(const t of r){const r=n.vo.get(t);e=e.unionWith(r.view.wo)}return e}}async function Uc(e,t){const n=Ar(e),r=await Ul(n.localStore,t.query,!0),i=t.view.Ao(r);return n.isPrimaryClient&&Lc(n,t.targetId,i.To),i}async function Vc(e){const t=Ar(e);return Zl(t.localStore).then((e=>Wc(t,e)))}async function Zc(e,t,n,r){const i=Ar(e),o=await function(e,t){const n=Ar(e),r=Ar(n._n);return n.persistence.runTransaction("Lookup mutation documents","readonly",(e=>r.jt(e,t).next((t=>t?n.Fn.pn(e,t):gs.resolve(null)))))}(i.localStore,t);null!==o?("pending"===n?await Vu(i.remoteStore):"acknowledged"===n||"rejected"===n?(Dc(i,t,r||null),Ac(i,t),function(e,t){Ar(Ar(e)._n).Gt(t)}(i.localStore,t)):Pr(),await Wc(i,o)):Tr("SyncEngine","Cannot apply mutation batch with id: "+t)}async function $c(e,t,n){const r=Ar(e),i=[],o=[];for(const e of t){let t;const n=r.Vo.get(e);if(n&&0!==n.length){t=await Bl(r.localStore,Yi(n[0]));for(const e of n){const t=r.vo.get(e),n=await Uc(r,t);n.snapshot&&o.push(n.snapshot)}}else{const n=await Vl(r.localStore,e);t=await Bl(r.localStore,n),await xc(r,qc(n),e,!1)}i.push(t)}return r.bo._r(o),i}function qc(e){return Vi(e.path,e.collectionGroup,e.orderBy,e.filters,e.limit,"F",e.startAt,e.endAt)}function Hc(e){const t=Ar(e);return Ar(Ar(t.localStore).persistence).fn()}async function Kc(e,t,n,r){const i=Ar(e);if(i.Oo)Tr("SyncEngine","Ignoring unexpected query state notification.");else if(i.Vo.has(t))switch(n){case"current":case"not-current":{const e=await Zl(i.localStore),r=ia.createSynthesizedRemoteEventForCurrentChange(t,"current"===n);await Wc(i,e,r);break}case"rejected":await zl(i.localStore,t,!0),Rc(i,t,r);break;default:Pr()}}async function Gc(e,t,n){const r=Qc(e);if(r.Oo){for(const e of t){if(r.Vo.has(e)){Tr("SyncEngine","Adding an already active target "+e);continue}const t=await Vl(r.localStore,e),n=await Bl(r.localStore,t);await xc(r,qc(t),n.targetId,!1),Pu(r.remoteStore,n)}for(const e of n)r.Vo.has(e)&&await zl(r.localStore,e,!1).then((()=>{Nu(r.remoteStore,e),Rc(r,e)})).catch(ul)}}function Qc(e){const t=Ar(e);return t.remoteStore.remoteSyncer.applyRemoteEvent=Ic.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=zc.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=Oc.bind(null,t),t.bo._r=cc.bind(null,t.eventManager),t.bo.Fo=dc.bind(null,t.eventManager),t}function Yc(e){const t=Ar(e);return t.remoteStore.remoteSyncer.applySuccessfulWrite=Pc.bind(null,t),t.remoteStore.remoteSyncer.rejectFailedWrite=Nc.bind(null,t),t}class Xc{constructor(){this.synchronizeTabs=!1}async initialize(e){this.R=wu(e.databaseInfo.databaseId),this.sharedClientState=this.Bo(e),this.persistence=this.Uo(e),await this.persistence.start(),this.gcScheduler=this.qo(e),this.localStore=this.Ko(e)}qo(e){return null}Ko(e){return Ml(this.persistence,new Dl,e.initialUser,this.R)}Uo(e){return new Jl(tu.Ps,this.R)}Bo(e){return new hu}async terminate(){this.gcScheduler&&this.gcScheduler.stop(),await this.sharedClientState.shutdown(),await this.persistence.shutdown()}}class Jc extends Xc{constructor(e,t,n){super(),this.Qo=e,this.cacheSizeBytes=t,this.forceOwnership=n,this.synchronizeTabs=!1}async initialize(e){await super.initialize(e),await async function(e){const t=Ar(e);return t.persistence.runTransaction("Synchronize last document change read time","readonly",(e=>function(e){const t=El(e);let n=Wr.min();return t.Ot({index:rs.readTimeIndex,reverse:!0},((e,t,r)=>{t.readTime&&(n=Ms(t.readTime)),r.done()})).next((()=>n))}(e))).then((e=>{t.On=e}))}(this.localStore),await this.Qo.initialize(this,e),await Yc(this.Qo.syncEngine),await Vu(this.Qo.remoteStore)}Ko(e){return Ml(this.persistence,new Dl,e.initialUser,this.R)}qo(e){const t=this.persistence.referenceDelegate.garbageCollector;return new hl(t,e.asyncQueue)}Uo(e){const t=Ol(e.databaseInfo.databaseId,e.databaseInfo.persistenceKey),n=void 0!==this.cacheSizeBytes?Qs.withCacheSize(this.cacheSizeBytes):Qs.DEFAULT;return new Tl(this.synchronizeTabs,t,e.clientId,n,e.asyncQueue,yu(),bu(),this.R,this.sharedClientState,!!this.forceOwnership)}Bo(e){return new hu}}class ed extends Jc{constructor(e,t){super(e,t,!1),this.Qo=e,this.cacheSizeBytes=t,this.synchronizeTabs=!0}async initialize(e){await super.initialize(e);const t=this.Qo.syncEngine;this.sharedClientState instanceof du&&(this.sharedClientState.syncEngine={ai:Zc.bind(null,t),ui:Kc.bind(null,t),hi:Gc.bind(null,t),fn:Hc.bind(null,t),ci:Vc.bind(null,t)},await this.sharedClientState.start()),await this.persistence.He((async e=>{await async function(e,t){const n=Ar(e);if(Qc(n),Yc(n),!0===t&&!0!==n.Oo){const e=n.sharedClientState.getAllActiveQueryTargets(),t=await $c(n,e.toArray());n.Oo=!0,await Xu(n.remoteStore,!0);for(const e of t)Pu(n.remoteStore,e)}else if(!1===t&&!1!==n.Oo){const e=[];let t=Promise.resolve();n.Vo.forEach(((r,i)=>{n.sharedClientState.isLocalQueryTarget(i)?e.push(i):t=t.then((()=>(Rc(n,i),zl(n.localStore,i,!0)))),Nu(n.remoteStore,i)})),await t,await $c(n,e),function(e){const t=Ar(e);t.Co.forEach(((e,n)=>{Nu(t.remoteStore,n)})),t.No.ts(),t.Co=new Map,t.Do=new Vo(oi.comparator)}(n),n.Oo=!1,await Xu(n.remoteStore,!1)}}(this.Qo.syncEngine,e),this.gcScheduler&&(e&&!this.gcScheduler.started?this.gcScheduler.start(this.localStore):e||this.gcScheduler.stop())}))}Bo(e){const t=yu();if(!du.gt(t))throw new _r(Er.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");const n=Ol(e.databaseInfo.databaseId,e.databaseInfo.persistenceKey);return new du(t,e.asyncQueue,n,e.clientId,e.initialUser)}}class td{async initialize(e,t){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(t),this.remoteStore=this.createRemoteStore(t),this.eventManager=this.createEventManager(t),this.syncEngine=this.createSyncEngine(t,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=e=>kc(this.syncEngine,e,1),this.remoteStore.remoteSyncer.handleCredentialChange=Bc.bind(null,this.syncEngine),await Xu(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return new sc}createDatastore(e){const t=wu(e.databaseInfo.databaseId),n=(r=e.databaseInfo,new vu(r));var r;return function(e,t,n){return new xu(e,t,n)}(e.credentials,n,t)}createRemoteStore(e){return t=this.localStore,n=this.datastore,r=e.asyncQueue,i=e=>kc(this.syncEngine,e,0),o=pu.gt()?new pu:new fu,new Iu(t,n,r,i,o);var t,n,r,i,o}createSyncEngine(e,t){return function(e,t,n,r,i,o,a){const s=new Cc(e,t,n,r,i,o);return a&&(s.Oo=!0),s}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}terminate(){return async function(e){const t=Ar(e);Tr("RemoteStore","RemoteStore shutting down."),t.Mr.add(5),await Ou(t),t.Lr.shutdown(),t.Br.set("Unknown")}(this.remoteStore)}}function nd(e,t=10240){let n=0;return{async read(){if(n<e.byteLength){const r={value:e.slice(n,n+t),done:!1};return n+=t,r}return{done:!0}},async cancel(){},releaseLock(){},closed:Promise.reject("unimplemented")}}class rd{constructor(e){this.observer=e,this.muted=!1}next(e){this.observer.next&&this.jo(this.observer.next,e)}error(e){this.observer.error?this.jo(this.observer.error,e):console.error("Uncaught Error in snapshot listener:",e)}Wo(){this.muted=!0}jo(e,t){this.muted||setTimeout((()=>{this.muted||e(t)}),0)}}class id{constructor(e,t){this.Go=e,this.R=t,this.metadata=new ms,this.buffer=new Uint8Array,this.zo=new TextDecoder("utf-8"),this.Ho().then((e=>{e&&e.io()?this.metadata.resolve(e.payload.metadata):this.metadata.reject(new Error(`The first element of the bundle is not a metadata, it is\n ${JSON.stringify(null==e?void 0:e.payload)}`))}),(e=>this.metadata.reject(e)))}close(){return this.Go.cancel()}async getMetadata(){return this.metadata.promise}async Lo(){return await this.getMetadata(),this.Ho()}async Ho(){const e=await this.Jo();if(null===e)return null;const t=this.zo.decode(e),n=Number(t);isNaN(n)&&this.Yo(`length string (${t}) is not valid number`);const r=await this.Xo(n);return new pc(JSON.parse(r),e.length+n)}Zo(){return this.buffer.findIndex((e=>e==="{".charCodeAt(0)))}async Jo(){for(;this.Zo()<0&&!await this.tc(););if(0===this.buffer.length)return null;const e=this.Zo();e<0&&this.Yo("Reached the end of bundle when a length string is expected.");const t=this.buffer.slice(0,e);return this.buffer=this.buffer.slice(e),t}async Xo(e){for(;this.buffer.length<e;)await this.tc()&&this.Yo("Reached the end of bundle when more is expected.");const t=this.zo.decode(this.buffer.slice(0,e));return this.buffer=this.buffer.slice(e),t}Yo(e){throw this.Go.cancel(),new Error(`Invalid bundle format: ${e}`)}async tc(){const e=await this.Go.read();if(!e.done){const t=new Uint8Array(this.buffer.length+e.value.length);t.set(this.buffer),t.set(e.value,this.buffer.length),this.buffer=t}return e.done}}class od{constructor(e){this.datastore=e,this.readVersions=new Map,this.mutations=[],this.committed=!1,this.lastWriteError=null,this.writtenDocs=new Set}async lookup(e){if(this.ensureCommitNotCalled(),this.mutations.length>0)throw new _r(Er.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes.");const t=await async function(e,t){const n=Ar(e),r=Ta(n.R)+"/documents",i={documents:t.map((e=>_a(n.R,e)))},o=await n.Oi("BatchGetDocuments",r,i),a=new Map;o.forEach((e=>{const t=function(e,t){return"found"in t?function(e,t){Nr(!!t.found),t.found.name,t.found.updateTime;const n=Ca(e,t.found.name),r=ba(t.found.updateTime),i=new bi({mapValue:{fields:t.found.fields}});return Ei.newFoundDocument(n,r,i)}(e,t):"missing"in t?function(e,t){Nr(!!t.missing),Nr(!!t.readTime);const n=Ca(e,t.missing),r=ba(t.readTime);return Ei.newNoDocument(n,r)}(e,t):Pr()}(n.R,e);a.set(t.key.toString(),t)}));const s=[];return t.forEach((e=>{const t=a.get(e.toString());Nr(!!t),s.push(t)})),s}(this.datastore,e);return t.forEach((e=>this.recordVersion(e))),t}set(e,t){this.write(t.toMutation(e,this.precondition(e))),this.writtenDocs.add(e.toString())}update(e,t){try{this.write(t.toMutation(e,this.preconditionForUpdate(e)))}catch(e){this.lastWriteError=e}this.writtenDocs.add(e.toString())}delete(e){this.write(new Lo(e,this.precondition(e))),this.writtenDocs.add(e.toString())}async commit(){if(this.ensureCommitNotCalled(),this.lastWriteError)throw this.lastWriteError;const e=this.readVersions;this.mutations.forEach((t=>{e.delete(t.key.toString())})),e.forEach(((e,t)=>{const n=oi.fromPath(t);this.mutations.push(new jo(n,this.precondition(n)))})),await async function(e,t){const n=Ar(e),r=Ta(n.R)+"/documents",i={writes:t.map((e=>Pa(n.R,e)))};await n.Ni("Commit",r,i)}(this.datastore,this.mutations),this.committed=!0}recordVersion(e){let t;if(e.isFoundDocument())t=e.version;else{if(!e.isNoDocument())throw Pr();t=Wr.min()}const n=this.readVersions.get(e.key.toString());if(n){if(!t.isEqual(n))throw new _r(Er.ABORTED,"Document version changed between two reads.")}else this.readVersions.set(e.key.toString(),t)}precondition(e){const t=this.readVersions.get(e.toString());return!this.writtenDocs.has(e.toString())&&t?Co.updateTime(t):Co.none()}preconditionForUpdate(e){const t=this.readVersions.get(e.toString());if(!this.writtenDocs.has(e.toString())&&t){if(t.isEqual(Wr.min()))throw new _r(Er.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return Co.updateTime(t)}return Co.exists(!0)}write(e){this.ensureCommitNotCalled(),this.mutations.push(e)}ensureCommitNotCalled(){}}class ad{constructor(e,t,n,r){this.asyncQueue=e,this.datastore=t,this.updateFunction=n,this.deferred=r,this.ec=5,this.Zi=new Eu(this.asyncQueue,"transaction_retry")}run(){this.nc()}nc(){this.Zi.ji((async()=>{const e=new od(this.datastore),t=this.sc(e);t&&t.then((t=>{this.asyncQueue.enqueueAndForget((()=>e.commit().then((()=>{this.deferred.resolve(t)})).catch((e=>{this.ic(e)}))))})).catch((e=>{this.ic(e)}))}))}sc(e){try{const t=this.updateFunction(e);return!ni(t)&&t.catch&&t.then?t:(this.deferred.reject(Error("Transaction callback must return a Promise")),null)}catch(e){return this.deferred.reject(e),null}}ic(e){this.ec>0&&this.rc(e)?(this.ec-=1,this.asyncQueue.enqueueAndForget((()=>(this.nc(),Promise.resolve())))):this.deferred.reject(e)}rc(e){if("FirebaseError"===e.name){const t=e.code;return"aborted"===t||"failed-precondition"===t||!zo(t)}return!1}}class sd{constructor(e,t,n){this.credentials=e,this.asyncQueue=t,this.databaseInfo=n,this.user=nu.UNAUTHENTICATED,this.clientId=Rr.u(),this.credentialListener=()=>Promise.resolve(),this.credentials.setChangeListener(t,(async e=>{Tr("FirestoreClient","Received user=",e.uid),await this.credentialListener(e),this.user=e}))}async getConfiguration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,credentials:this.credentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.credentialListener=e}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new _r(Er.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();const e=new ms;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted((async()=>{try{this.onlineComponents&&await this.onlineComponents.terminate(),this.offlineComponents&&await this.offlineComponents.terminate(),this.credentials.removeChangeListener(),e.resolve()}catch(t){const n=nc(t,"Failed to shutdown persistence");e.reject(n)}})),e.promise}}async function ld(e,t){e.asyncQueue.verifyOperationInProgress(),Tr("FirestoreClient","Initializing OfflineComponentProvider");const n=await e.getConfiguration();await t.initialize(n);let r=n.initialUser;e.setCredentialChangeListener((async e=>{r.isEqual(e)||(await Ll(t.localStore,e),r=e)})),t.persistence.setDatabaseDeletedListener((()=>e.terminate())),e.offlineComponents=t}async function ud(e,t){e.asyncQueue.verifyOperationInProgress();const n=await cd(e);Tr("FirestoreClient","Initializing OnlineComponentProvider");const r=await e.getConfiguration();await t.initialize(n,r),e.setCredentialChangeListener((e=>async function(e,t){const n=Ar(e);n.asyncQueue.verifyOperationInProgress(),Tr("RemoteStore","RemoteStore received new credentials");const r=Lu(n);n.Mr.add(3),await Ou(n),r&&n.Br.set("Unknown"),await n.remoteSyncer.handleCredentialChange(t),n.Mr.delete(3),await ku(n)}(t.remoteStore,e))),e.onlineComponents=t}async function cd(e){return e.offlineComponents||(Tr("FirestoreClient","Using default OfflineComponentProvider"),await ld(e,new Xc)),e.offlineComponents}async function dd(e){return e.onlineComponents||(Tr("FirestoreClient","Using default OnlineComponentProvider"),await ud(e,new td)),e.onlineComponents}function hd(e){return cd(e).then((e=>e.persistence))}function fd(e){return cd(e).then((e=>e.localStore))}function pd(e){return dd(e).then((e=>e.remoteStore))}function md(e){return dd(e).then((e=>e.syncEngine))}async function gd(e){const t=await dd(e),n=t.eventManager;return n.onListen=Sc.bind(null,t.syncEngine),n.onUnlisten=Tc.bind(null,t.syncEngine),n}function vd(e,t,n={}){const r=new ms;return e.asyncQueue.enqueueAndForget((async()=>function(e,t,n,r,i){const o=new rd({next:o=>{t.enqueueAndForget((()=>uc(e,a)));const s=o.docs.has(n);!s&&o.fromCache?i.reject(new _r(Er.UNAVAILABLE,"Failed to get document because the client is offline.")):s&&o.fromCache&&r&&"server"===r.source?i.reject(new _r(Er.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):i.resolve(o)},error:e=>i.reject(e)}),a=new fc(Zi(n.path),o,{includeMetadataChanges:!0,so:!0});return lc(e,a)}(await gd(e),e.asyncQueue,t,n,r))),r.promise}function yd(e,t,n={}){const r=new ms;return e.asyncQueue.enqueueAndForget((async()=>function(e,t,n,r,i){const o=new rd({next:n=>{t.enqueueAndForget((()=>uc(e,a))),n.fromCache&&"server"===r.source?i.reject(new _r(Er.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):i.resolve(n)},error:e=>i.reject(e)}),a=new fc(n,o,{includeMetadataChanges:!0,so:!0});return lc(e,a)}(await gd(e),e.asyncQueue,t,n,r))),r.promise}class bd{constructor(e,t,n,r,i,o,a){this.databaseId=e,this.appId=t,this.persistenceKey=n,this.host=r,this.ssl=i,this.forceLongPolling=o,this.autoDetectLongPolling=a}}class wd{constructor(e,t){this.projectId=e,this.database=t||"(default)"}get isDefaultDatabase(){return"(default)"===this.database}isEqual(e){return e instanceof wd&&e.projectId===this.projectId&&e.database===this.database}}const Ed=new Map;class _d{constructor(e,t){this.user=t,this.type="OAuth",this.authHeaders={},this.authHeaders.Authorization=`Bearer ${e}`}}class Cd{constructor(){this.changeListener=null}getToken(){return Promise.resolve(null)}invalidateToken(){}setChangeListener(e,t){this.changeListener=t,e.enqueueRetryable((()=>t(nu.UNAUTHENTICATED)))}removeChangeListener(){this.changeListener=null}}class Sd{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}setChangeListener(e,t){this.changeListener=t,e.enqueueRetryable((()=>t(this.token.user)))}removeChangeListener(){this.changeListener=null}}class xd{constructor(e){this.currentUser=nu.UNAUTHENTICATED,this.oc=new ms,this.cc=0,this.changeListener=()=>Promise.resolve(),this.ac=!1,this.forceRefresh=!1,this.auth=null,this.asyncQueue=null,this.uc=()=>{this.cc++,this.currentUser=this.hc(),this.oc.resolve(),this.ac&&this.asyncQueue.enqueueRetryable((()=>this.changeListener(this.currentUser)))};const t=e=>{Tr("FirebaseCredentialsProvider","Auth detected"),this.auth=e,this.lc(),this.auth.addAuthTokenListener(this.uc)};e.onInit((e=>t(e))),setTimeout((()=>{if(!this.auth){const n=e.getImmediate({optional:!0});n?t(n):this.ac&&(Tr("FirebaseCredentialsProvider","Auth not yet detected"),this.asyncQueue.enqueueRetryable((()=>this.changeListener(this.currentUser))))}}),0)}getToken(){const e=this.cc,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then((t=>this.cc!==e?(Tr("FirebaseCredentialsProvider","getToken aborted due to token change."),this.getToken()):t?(Nr("string"==typeof t.accessToken),new _d(t.accessToken,this.currentUser)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}setChangeListener(e,t){this.ac=!0,this.asyncQueue=e,this.changeListener=t}removeChangeListener(){this.auth&&this.auth.removeAuthTokenListener(this.uc),this.changeListener=()=>Promise.resolve()}hc(){const e=this.auth&&this.auth.getUid();return Nr(null===e||"string"==typeof e),new nu(e)}lc(){this.ac&&(this.ac=!1,this.asyncQueue.enqueueRetryable((async()=>{await this.oc.promise,await this.changeListener(this.currentUser),this.ac=!0})))}}class Td{constructor(e,t,n){this.fc=e,this.dc=t,this.wc=n,this.type="FirstParty",this.user=nu.FIRST_PARTY}get authHeaders(){const e={"X-Goog-AuthUser":this.dc},t=this.fc.auth.getAuthHeaderValueForFirstParty([]);return t&&(e.Authorization=t),this.wc&&(e["X-Goog-Iam-Authorization-Token"]=this.wc),e}}class Id{constructor(e,t,n){this.fc=e,this.dc=t,this.wc=n}getToken(){return Promise.resolve(new Td(this.fc,this.dc,this.wc))}setChangeListener(e,t){e.enqueueRetryable((()=>t(nu.FIRST_PARTY)))}removeChangeListener(){}invalidateToken(){}}function kd(e,t,n){if(!n)throw new _r(Er.INVALID_ARGUMENT,`Function ${e}() cannot be called with an empty ${t}.`)}function Od(e){if(!oi.isDocumentKey(e))throw new _r(Er.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`)}function Pd(e){if(oi.isDocumentKey(e))throw new _r(Er.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${e} has ${e.length}.`)}function Nd(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e=`${e.substring(0,20)}...`),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";{const t=function(e){if(e.constructor){const t=/function\s+([^\s(]+)\s*\(/.exec(e.constructor.toString());if(t&&t.length>1)return t[1]}return null}(e);return t?`a custom ${t} object`:"an object"}}return"function"==typeof e?"a function":Pr()}function Ad(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new _r(Er.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=Nd(e);throw new _r(Er.INVALID_ARGUMENT,`Expected type '${t.name}', but it was: ${n}`)}}return e}function Dd(e,t){if(t<=0)throw new _r(Er.INVALID_ARGUMENT,`Function ${e}() requires a positive number, but it was: ${t}.`)}class Rd{constructor(e){var t;if(void 0===e.host){if(void 0!==e.ssl)throw new _r(Er.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=null===(t=e.ssl)||void 0===t||t;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,void 0===e.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==e.cacheSizeBytes&&e.cacheSizeBytes<1048576)throw new _r(Er.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,function(e,t,n,r){if(!0===t&&!0===r)throw new _r(Er.INVALID_ARGUMENT,"experimentalForceLongPolling and experimentalAutoDetectLongPolling cannot be used together.")}(0,e.experimentalForceLongPolling,0,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}}class Md{constructor(e,t){this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new Rd({}),this._settingsFrozen=!1,e instanceof wd?(this._databaseId=e,this._credentials=new Cd):(this._app=e,this._databaseId=function(e){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new _r(Er.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new wd(e.options.projectId)}(e),this._credentials=new xd(t))}get app(){if(!this._app)throw new _r(Er.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 void 0!==this._terminateTask}_setSettings(e){if(this._settingsFrozen)throw new _r(Er.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 Rd(e),void 0!==e.credentials&&(this._credentials=function(e){if(!e)return new Cd;switch(e.type){case"gapi":const t=e.client;return Nr(!("object"!=typeof t||null===t||!t.auth||!t.auth.getAuthHeaderValueForFirstParty)),new Id(t,e.sessionIndex||"0",e.iamToken||null);case"provider":return e.client;default:throw new _r(Er.INVALID_ARGUMENT,"makeCredentialsProvider 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 t=Ed.get(e);t&&(Tr("ComponentProvider","Removing Datastore"),Ed.delete(e),t.terminate())}(this),Promise.resolve()}}function Ld(e,t,n,r={}){const i=(e=Ad(e,Md))._getSettings();if("firestore.googleapis.com"!==i.host&&i.host!==t&&kr("Host has been set in both settings() and useEmulator(), emulator host will be used"),e._setSettings(Object.assign(Object.assign({},i),{host:`${t}:${n}`,ssl:!1})),r.mockUserToken){const t=(0,l.Sg)(r.mockUserToken),n=r.mockUserToken.sub||r.mockUserToken.user_id;if(!n)throw new _r(Er.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");e._credentials=new Sd(new _d(t,new nu(n)))}}class jd{constructor(e,t,n){this.converter=t,this._key=n,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new Wd(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new jd(this.firestore,e,this._key)}}class Fd{constructor(e,t,n){this.converter=t,this._query=n,this.type="query",this.firestore=e}withConverter(e){return new Fd(this.firestore,e,this._query)}}class Wd extends Fd{constructor(e,t,n){super(e,t,Zi(n)),this._path=n,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 jd(this.firestore,null,new oi(e))}withConverter(e){return new Wd(this.firestore,e,this._path)}}function Bd(e,t,...n){if(e=(0,l.m9)(e),kd("collection","path",t),e instanceof Md){const r=Zr.fromString(t,...n);return Pd(r),new Wd(e,null,r)}{if(!(e instanceof jd||e instanceof Wd))throw new _r(Er.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=Zr.fromString(e.path,...n).child(Zr.fromString(t));return Pd(r),new Wd(e.firestore,null,r)}}function zd(e,t){if(e=Ad(e,Md),kd("collectionGroup","collection id",t),t.indexOf("/")>=0)throw new _r(Er.INVALID_ARGUMENT,`Invalid collection ID '${t}' passed to function collectionGroup(). Collection IDs must not contain '/'.`);return new Fd(e,null,function(e){return new Ui(Zr.emptyPath(),e)}(t))}function Ud(e,t,...n){if(e=(0,l.m9)(e),1===arguments.length&&(t=Rr.u()),kd("doc","path",t),e instanceof Md){const r=Zr.fromString(t,...n);return Od(r),new jd(e,null,new oi(r))}{if(!(e instanceof jd||e instanceof Wd))throw new _r(Er.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=e._path.child(Zr.fromString(t,...n));return Od(r),new jd(e.firestore,e instanceof Wd?e.converter:null,new oi(r))}}function Vd(e,t){return e=(0,l.m9)(e),t=(0,l.m9)(t),(e instanceof jd||e instanceof Wd)&&(t instanceof jd||t instanceof Wd)&&e.firestore===t.firestore&&e.path===t.path&&e.converter===t.converter}function Zd(e,t){return e=(0,l.m9)(e),t=(0,l.m9)(t),e instanceof Fd&&t instanceof Fd&&e.firestore===t.firestore&&Ji(e._query,t._query)&&e.converter===t.converter}class $d{constructor(){this._c=Promise.resolve(),this.mc=[],this.gc=!1,this.yc=[],this.Ec=null,this.Tc=!1,this.Ic=[],this.Zi=new Eu(this,"async_queue_retry"),this.Ac=()=>{const e=bu();e&&Tr("AsyncQueue","Visibility state changed to "+e.visibilityState),this.Zi.Gi()};const e=bu();e&&"function"==typeof e.addEventListener&&e.addEventListener("visibilitychange",this.Ac)}get isShuttingDown(){return this.gc}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.Rc(),this.Pc(e)}enterRestrictedMode(){if(!this.gc){this.gc=!0;const e=bu();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("visibilitychange",this.Ac)}}enqueue(e){return this.Rc(),this.gc?new Promise((e=>{})):this.Pc(e)}enqueueRetryable(e){this.enqueueAndForget((()=>(this.mc.push(e),this.bc())))}async bc(){if(0!==this.mc.length){try{await this.mc[0](),this.mc.shift(),this.Zi.reset()}catch(e){if(!Es(e))throw e;Tr("AsyncQueue","Operation failed with retryable error: "+e)}this.mc.length>0&&this.Zi.ji((()=>this.bc()))}}Pc(e){const t=this._c.then((()=>(this.Tc=!0,e().catch((e=>{throw this.Ec=e,this.Tc=!1,Ir("INTERNAL UNHANDLED ERROR: ",function(e){let t=e.message||"";return e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t}(e)),e})).then((e=>(this.Tc=!1,e))))));return this._c=t,t}enqueueAfterDelay(e,t,n){this.Rc(),this.Ic.indexOf(e)>-1&&(t=0);const r=tc.createAndSchedule(this,e,t,n,(e=>this.vc(e)));return this.yc.push(r),r}Rc(){this.Ec&&Pr()}verifyOperationInProgress(){}async Vc(){let e;do{e=this._c,await e}while(e!==this._c)}Sc(e){for(const t of this.yc)if(t.timerId===e)return!0;return!1}Dc(e){return this.Vc().then((()=>{this.yc.sort(((e,t)=>e.targetTimeMs-t.targetTimeMs));for(const t of this.yc)if(t.skipDelay(),"all"!==e&&t.timerId===e)break;return this.Vc()}))}Cc(e){this.Ic.push(e)}vc(e){const t=this.yc.indexOf(e);this.yc.splice(t,1)}}function qd(e){return function(e,t){if("object"!=typeof e||null===e)return!1;const n=e;for(const e of["next","error","complete"])if(e in n&&"function"==typeof n[e])return!0;return!1}(e)}class Hd{constructor(){this._progressObserver={},this._taskCompletionResolver=new ms,this._lastProgress={taskState:"Running",totalBytes:0,totalDocuments:0,bytesLoaded:0,documentsLoaded:0}}onProgress(e,t,n){this._progressObserver={next:e,error:t,complete:n}}catch(e){return this._taskCompletionResolver.promise.catch(e)}then(e,t){return this._taskCompletionResolver.promise.then(e,t)}_completeWith(e){this._updateProgress(e),this._progressObserver.complete&&this._progressObserver.complete(),this._taskCompletionResolver.resolve(e)}_failWith(e){this._lastProgress.taskState="Error",this._progressObserver.next&&this._progressObserver.next(this._lastProgress),this._progressObserver.error&&this._progressObserver.error(e),this._taskCompletionResolver.reject(e)}_updateProgress(e){this._lastProgress=e,this._progressObserver.next&&this._progressObserver.next(e)}}const Kd=-1;class Gd extends Md{constructor(e,t){super(e,t),this.type="firestore",this._queue=new $d,this._persistenceKey="name"in e?e.name:"[DEFAULT]"}_terminate(){return this._firestoreClient||Jd(this),this._firestoreClient.terminate()}}function Qd(e,t){const n=(0,r.qX)(e,"firestore-exp");if(n.isInitialized())throw new _r(Er.FAILED_PRECONDITION,"Firestore can only be initialized once per app.");if(void 0!==t.cacheSizeBytes&&-1!==t.cacheSizeBytes&&t.cacheSizeBytes<1048576)throw new _r(Er.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");return n.initialize({options:t})}function Yd(e=(0,r.Mq)()){return(0,r.qX)(e,"firestore-exp").getImmediate()}function Xd(e){return e._firestoreClient||Jd(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function Jd(e){var t;const n=e._freezeSettings(),r=function(e,t,n,r){return new bd(e,t,n,r.host,r.ssl,r.experimentalForceLongPolling,r.experimentalAutoDetectLongPolling)}(e._databaseId,(null===(t=e._app)||void 0===t?void 0:t.options.appId)||"",e._persistenceKey,n);e._firestoreClient=new sd(e._credentials,e._queue,r)}function eh(e,t){ch(e=Ad(e,Gd));const n=Xd(e),r=e._freezeSettings(),i=new td;return nh(n,i,new Jc(i,r.cacheSizeBytes,null==t?void 0:t.forceOwnership))}function th(e){ch(e=Ad(e,Gd));const t=Xd(e),n=e._freezeSettings(),r=new td;return nh(t,r,new ed(r,n.cacheSizeBytes))}function nh(e,t,n){const r=new ms;return e.asyncQueue.enqueue((async()=>{try{await ld(e,n),await ud(e,t),r.resolve()}catch(e){if(!function(e){return"FirebaseError"===e.name?e.code===Er.FAILED_PRECONDITION||e.code===Er.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&e instanceof DOMException)||22===e.code||20===e.code||11===e.code}(e))throw e;console.warn("Error enabling offline persistence. Falling back to persistence disabled: "+e),r.reject(e)}})).then((()=>r.promise))}function rh(e){if(e._initialized&&!e._terminated)throw new _r(Er.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");const t=new ms;return e._queue.enqueueAndForgetEvenWhileRestricted((async()=>{try{await async function(e){if(!ys.gt())return Promise.resolve();const t=e+"main";await ys.delete(t)}(Ol(e._databaseId,e._persistenceKey)),t.resolve()}catch(e){t.reject(e)}})),t.promise}function ih(e){return function(e){const t=new ms;return e.asyncQueue.enqueueAndForget((async()=>async function(e,t){const n=Ar(e);Lu(n.remoteStore)||Tr("SyncEngine","The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled.");try{const e=await function(e){const t=Ar(e);return t.persistence.runTransaction("Get highest unacknowledged batch id","readonly",(e=>t._n.getHighestUnacknowledgedBatchId(e)))}(n.localStore);if(-1===e)return void t.resolve();const r=n.ko.get(e)||[];r.push(t),n.ko.set(e,r)}catch(e){const n=nc(e,"Initialization of waitForPendingWrites() operation failed");t.reject(n)}}(await md(e),t))),t.promise}(Xd(e=Ad(e,Gd)))}function oh(e){return function(e){return e.asyncQueue.enqueue((async()=>{const t=await hd(e),n=await pd(e);return t.setNetworkEnabled(!0),function(e){const t=Ar(e);return t.Mr.delete(0),ku(t)}(n)}))}(Xd(e=Ad(e,Gd)))}function ah(e){return function(e){return e.asyncQueue.enqueue((async()=>{const t=await hd(e),n=await pd(e);return t.setNetworkEnabled(!1),async function(e){const t=Ar(e);t.Mr.add(0),await Ou(t),t.Br.set("Offline")}(n)}))}(Xd(e=Ad(e,Gd)))}function sh(e){return(0,r.wN)(e.app,"firestore-exp"),e._delete()}function lh(e,t){const n=Xd(e=Ad(e,Gd)),r=new Hd;return function(e,t,n,r){const i=function(e,t){let n;return n="string"==typeof e?(new TextEncoder).encode(e):e,function(e,t){return new id(e,t)}(function(e,t){if(e instanceof Uint8Array)return nd(e,t);if(e instanceof ArrayBuffer)return nd(new Uint8Array(e),t);if(e instanceof ReadableStream)return e.getReader();throw new Error("Source of `toByteStreamReader` has to be a ArrayBuffer or ReadableStream")}(n),t)}(n,wu(t));e.asyncQueue.enqueueAndForget((async()=>{!function(e,t,n){const r=Ar(e);(async function(e,t,n){try{const r=await t.getMetadata();if(await function(e,t){const n=Ar(e),r=ba(t.createTime);return n.persistence.runTransaction("hasNewerBundle","readonly",(e=>n.Ke.getBundleMetadata(e,t.id))).then((e=>!!e&&e.createTime.compareTo(r)>=0))}(e.localStore,r))return await t.close(),void n._completeWith(function(e){return{taskState:"Success",documentsLoaded:e.totalDocuments,bytesLoaded:e.totalBytes,totalDocuments:e.totalDocuments,totalBytes:e.totalBytes}}(r));n._updateProgress(vc(r));const i=new gc(r,e.localStore,t.R);let o=await t.Lo();for(;o;){const e=await i.oo(o);e&&n._updateProgress(e),o=await t.Lo()}const a=await i.complete();await Wc(e,a.wn,void 0),await function(e,t){const n=Ar(e);return n.persistence.runTransaction("Save bundle","readwrite",(e=>n.Ke.saveBundleMetadata(e,t)))}(e.localStore,r),n._completeWith(a.progress)}catch(e){kr("SyncEngine",`Loading bundle failed with ${e}`),n._failWith(e)}})(r,t,n).then((()=>{r.sharedClientState.notifyBundleLoaded()}))}(await md(e),i,r)}))}(n,e._databaseId,t,r),r}function uh(e,t){return function(e,t){return e.asyncQueue.enqueue((async()=>function(e,t){const n=Ar(e);return n.persistence.runTransaction("Get named query","readonly",(e=>n.Ke.getNamedQuery(e,t)))}(await fd(e),t)))}(Xd(e=Ad(e,Gd)),t).then((t=>t?new Fd(e,null,t.query):null))}function ch(e){if(e._initialized||e._terminated)throw new _r(Er.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.")}class dh{constructor(...e){for(let t=0;t<e.length;++t)if(0===e[t].length)throw new _r(Er.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new qr(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}function hh(){return new dh("__name__")}class fh{constructor(e){this._byteString=e}static fromBase64String(e){try{return new fh(Kr.fromBase64String(e))}catch(e){throw new _r(Er.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+e)}}static fromUint8Array(e){return new fh(Kr.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)}}class ph{constructor(e){this._methodName=e}}class mh{constructor(e,t){if(!isFinite(e)||e<-90||e>90)throw new _r(Er.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new _r(Er.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return Mr(this._lat,e._lat)||Mr(this._long,e._long)}}const gh=/^__.*__$/;class vh{constructor(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}toMutation(e,t){return null!==this.fieldMask?new Ao(e,this.data,this.fieldMask,t,this.fieldTransforms):new No(e,this.data,t,this.fieldTransforms)}}class yh{constructor(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}toMutation(e,t){return new Ao(e,this.data,this.fieldMask,t,this.fieldTransforms)}}function bh(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw Pr()}}class wh{constructor(e,t,n,r,i,o){this.settings=e,this.databaseId=t,this.R=n,this.ignoreUndefinedProperties=r,void 0===i&&this.Nc(),this.fieldTransforms=i||[],this.fieldMask=o||[]}get path(){return this.settings.path}get xc(){return this.settings.xc}kc(e){return new wh(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.R,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}$c(e){var t;const n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.kc({path:n,Oc:!1});return r.Mc(e),r}Fc(e){var t;const n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.kc({path:n,Oc:!1});return r.Nc(),r}Lc(e){return this.kc({path:void 0,Oc:!0})}Bc(e){return Bh(e,this.settings.methodName,this.settings.Uc||!1,this.path,this.settings.qc)}contains(e){return void 0!==this.fieldMask.find((t=>e.isPrefixOf(t)))||void 0!==this.fieldTransforms.find((t=>e.isPrefixOf(t.field)))}Nc(){if(this.path)for(let e=0;e<this.path.length;e++)this.Mc(this.path.get(e))}Mc(e){if(0===e.length)throw this.Bc("Document fields must not be empty");if(bh(this.xc)&&gh.test(e))throw this.Bc('Document fields cannot begin and end with "__"')}}class Eh{constructor(e,t,n){this.databaseId=e,this.ignoreUndefinedProperties=t,this.R=n||wu(e)}Kc(e,t,n,r=!1){return new wh({xc:e,methodName:t,qc:n,path:qr.emptyPath(),Oc:!1,Uc:r},this.databaseId,this.R,this.ignoreUndefinedProperties)}}function _h(e){const t=e._freezeSettings(),n=wu(e._databaseId);return new Eh(e._databaseId,!!t.ignoreUndefinedProperties,n)}function Ch(e,t,n,r,i,o={}){const a=e.Kc(o.merge||o.mergeFields?2:0,t,n,i);Lh("Data must be an object, but it was:",a,r);const s=Rh(r,a);let l,u;if(o.merge)l=new Hr(a.fieldMask),u=a.fieldTransforms;else if(o.mergeFields){const e=[];for(const r of o.mergeFields){const i=jh(t,r,n);if(!a.contains(i))throw new _r(Er.INVALID_ARGUMENT,`Field '${i}' is specified in your field mask but missing from your input data.`);zh(e,i)||e.push(i)}l=new Hr(e),u=a.fieldTransforms.filter((e=>l.covers(e.field)))}else l=null,u=a.fieldTransforms;return new vh(new bi(s),l,u)}class Sh extends ph{_toFieldTransform(e){if(2!==e.xc)throw 1===e.xc?e.Bc(`${this._methodName}() can only appear at the top level of your update data`):e.Bc(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return e.fieldMask.push(e.path),null}isEqual(e){return e instanceof Sh}}function xh(e,t,n){return new wh({xc:3,qc:t.settings.qc,methodName:e._methodName,Oc:n},t.databaseId,t.R,t.ignoreUndefinedProperties)}class Th extends ph{_toFieldTransform(e){return new Eo(e.path,new fo)}isEqual(e){return e instanceof Th}}class Ih extends ph{constructor(e,t){super(e),this.Qc=t}_toFieldTransform(e){const t=xh(this,e,!0),n=this.Qc.map((e=>Dh(e,t))),r=new po(n);return new Eo(e.path,r)}isEqual(e){return this===e}}class kh extends ph{constructor(e,t){super(e),this.Qc=t}_toFieldTransform(e){const t=xh(this,e,!0),n=this.Qc.map((e=>Dh(e,t))),r=new go(n);return new Eo(e.path,r)}isEqual(e){return this===e}}class Oh extends ph{constructor(e,t){super(e),this.jc=t}_toFieldTransform(e){const t=new yo(e.R,so(e.R,this.jc));return new Eo(e.path,t)}isEqual(e){return this===e}}function Ph(e,t,n,r){const i=e.Kc(1,t,n);Lh("Data must be an object, but it was:",i,r);const o=[],a=bi.empty();zr(r,((e,r)=>{const s=Wh(t,e,n);r=(0,l.m9)(r);const u=i.Fc(s);if(r instanceof Sh)o.push(s);else{const e=Dh(r,u);null!=e&&(o.push(s),a.set(s,e))}}));const s=new Hr(o);return new yh(a,s,i.fieldTransforms)}function Nh(e,t,n,r,i,o){const a=e.Kc(1,t,n),s=[jh(t,r,n)],u=[i];if(o.length%2!=0)throw new _r(Er.INVALID_ARGUMENT,`Function ${t}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let e=0;e<o.length;e+=2)s.push(jh(t,o[e])),u.push(o[e+1]);const c=[],d=bi.empty();for(let e=s.length-1;e>=0;--e)if(!zh(c,s[e])){const t=s[e];let n=u[e];n=(0,l.m9)(n);const r=a.Fc(t);if(n instanceof Sh)c.push(t);else{const e=Dh(n,r);null!=e&&(c.push(t),d.set(t,e))}}const h=new Hr(c);return new yh(d,h,a.fieldTransforms)}function Ah(e,t,n,r=!1){return Dh(n,e.Kc(r?4:3,t))}function Dh(e,t){if(Mh(e=(0,l.m9)(e)))return Lh("Unsupported field value:",t,e),Rh(e,t);if(e instanceof ph)return function(e,t){if(!bh(t.xc))throw t.Bc(`${e._methodName}() can only be used with update() and set()`);if(!t.path)throw t.Bc(`${e._methodName}() is not currently supported inside arrays`);const n=e._toFieldTransform(t);n&&t.fieldTransforms.push(n)}(e,t),null;if(void 0===e&&t.ignoreUndefinedProperties)return null;if(t.path&&t.fieldMask.push(t.path),e instanceof Array){if(t.settings.Oc&&4!==t.xc)throw t.Bc("Nested arrays are not supported");return function(e,t){const n=[];let r=0;for(const i of e){let e=Dh(i,t.Lc(r));null==e&&(e={nullValue:"NULL_VALUE"}),n.push(e),r++}return{arrayValue:{values:n}}}(e,t)}return function(e,t){if(null===(e=(0,l.m9)(e)))return{nullValue:"NULL_VALUE"};if("number"==typeof e)return so(t.R,e);if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){const n=Fr.fromDate(e);return{timestampValue:ga(t.R,n)}}if(e instanceof Fr){const n=new Fr(e.seconds,1e3*Math.floor(e.nanoseconds/1e3));return{timestampValue:ga(t.R,n)}}if(e instanceof mh)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof fh)return{bytesValue:va(t.R,e._byteString)};if(e instanceof jd){const n=t.databaseId,r=e.firestore._databaseId;if(!r.isEqual(n))throw t.Bc(`Document reference is for database ${r.projectId}/${r.database} but should be for database ${n.projectId}/${n.database}`);return{referenceValue:wa(e.firestore._databaseId||t.databaseId,e._key.path)}}throw t.Bc(`Unsupported field value: ${Nd(e)}`)}(e,t)}function Rh(e,t){const n={};return Ur(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):zr(e,((e,r)=>{const i=Dh(r,t.$c(e));null!=i&&(n[e]=i)})),{mapValue:{fields:n}}}function Mh(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof Fr||e instanceof mh||e instanceof fh||e instanceof jd||e instanceof ph)}function Lh(e,t,n){if(!Mh(n)||!function(e){return"object"==typeof e&&null!==e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}(n)){const r=Nd(n);throw"an object"===r?t.Bc(e+" a custom object"):t.Bc(e+" "+r)}}function jh(e,t,n){if((t=(0,l.m9)(t))instanceof dh)return t._internalPath;if("string"==typeof t)return Wh(e,t);throw Bh("Field path arguments must be of type string or FieldPath.",e,!1,void 0,n)}const Fh=new RegExp("[~\\*/\\[\\]]");function Wh(e,t,n){if(t.search(Fh)>=0)throw Bh(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,e,!1,void 0,n);try{return new dh(...t.split("."))._internalPath}catch(r){throw Bh(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,e,!1,void 0,n)}}function Bh(e,t,n,r,i){const o=r&&!r.isEmpty(),a=void 0!==i;let s=`Function ${t}() called with invalid data`;n&&(s+=" (via `toFirestore()`)"),s+=". ";let l="";return(o||a)&&(l+=" (found",o&&(l+=` in field ${r}`),a&&(l+=` in document ${i}`),l+=")"),new _r(Er.INVALID_ARGUMENT,s+e+l)}function zh(e,t){return e.some((e=>e.isEqual(t)))}class Uh{constructor(e,t,n,r,i){this._firestore=e,this._userDataWriter=t,this._key=n,this._document=r,this._converter=i}get id(){return this._key.path.lastSegment()}get ref(){return new jd(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){const e=new Vh(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.toProto())}}get(e){if(this._document){const t=this._document.data.field(Zh("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}class Vh extends Uh{data(){return super.data()}}function Zh(e,t){return"string"==typeof t?Wh(e,t):t instanceof dh?t._internalPath:t._delegate._internalPath}class $h{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class qh extends Uh{constructor(e,t,n,r,i,o){super(e,t,n,r,o),this._firestore=e,this._firestoreImpl=e,this.metadata=i}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const t=new Hh(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.toProto(),e.serverTimestamps)}}get(e,t={}){if(this._document){const n=this._document.data.field(Zh("DocumentSnapshot.get",e));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}}class Hh extends qh{data(e={}){return super.data(e)}}class Kh{constructor(e,t,n,r){this._firestore=e,this._userDataWriter=t,this._snapshot=r,this.metadata=new $h(r.hasPendingWrites,r.fromCache),this.query=n}get docs(){const e=[];return this.forEach((t=>e.push(t))),e}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(e,t){this._snapshot.docs.forEach((n=>{e.call(t,new Hh(this._firestore,this._userDataWriter,n.key,n,new $h(this._snapshot.mutatedKeys.has(n.key),this._snapshot.fromCache),this.query.converter))}))}docChanges(e={}){const t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new _r(Er.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(e,t){if(e._snapshot.oldDocs.isEmpty()){let t,n=0;return e._snapshot.docChanges.map((r=>{const i=new Hh(e._firestore,e._userDataWriter,r.doc.key,r.doc,new $h(e._snapshot.mutatedKeys.has(r.doc.key),e._snapshot.fromCache),e.query.converter);return t=r.doc,{type:"added",doc:i,oldIndex:-1,newIndex:n++}}))}{let n=e._snapshot.oldDocs;return e._snapshot.docChanges.filter((e=>t||3!==e.type)).map((t=>{const r=new Hh(e._firestore,e._userDataWriter,t.doc.key,t.doc,new $h(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter);let i=-1,o=-1;return 0!==t.type&&(i=n.indexOf(t.doc.key),n=n.delete(t.doc.key)),1!==t.type&&(n=n.add(t.doc),o=n.indexOf(t.doc.key)),{type:Gh(t.type),doc:r,oldIndex:i,newIndex:o}}))}}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}}function Gh(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return Pr()}}function Qh(e,t){return e instanceof qh&&t instanceof qh?e._firestore===t._firestore&&e._key.isEqual(t._key)&&(null===e._document?null===t._document:e._document.isEqual(t._document))&&e._converter===t._converter:e instanceof Kh&&t instanceof Kh&&e._firestore===t._firestore&&Zd(e.query,t.query)&&e.metadata.isEqual(t.metadata)&&e._snapshot.isEqual(t._snapshot)}function Yh(e){if(qi(e)&&0===e.explicitOrderBy.length)throw new _r(Er.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class Xh{}function Jh(e,...t){for(const n of t)e=n._apply(e);return e}class ef extends Xh{constructor(e,t,n){super(),this.Wc=e,this.Gc=t,this.zc=n,this.type="where"}_apply(e){const t=_h(e.firestore),n=function(e,t,n,r,i,o,a){let s;if(i.isKeyField()){if("array-contains"===o||"array-contains-any"===o)throw new _r(Er.INVALID_ARGUMENT,`Invalid Query. You can't perform '${o}' queries on FieldPath.documentId().`);if("in"===o||"not-in"===o){gf(a,o);const t=[];for(const n of a)t.push(mf(r,e,n));s={arrayValue:{values:t}}}else s=mf(r,e,a)}else"in"!==o&&"not-in"!==o&&"array-contains-any"!==o||gf(a,o),s=Ah(n,"where",a,"in"===o||"not-in"===o);const l=Ii.create(i,o,s);return function(e,t){if(t.g()){const n=Ki(e);if(null!==n&&!n.isEqual(t.field))throw new _r(Er.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 '${n.toString()}' and '${t.field.toString()}'`);const r=Hi(e);null!==r&&vf(0,t.field,r)}const n=function(e,t){for(const n of e.filters)if(t.indexOf(n.op)>=0)return n.op;return null}(e,function(e){switch(e){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[]}}(t.op));if(null!==n)throw n===t.op?new _r(Er.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${t.op.toString()}' filter.`):new _r(Er.INVALID_ARGUMENT,`Invalid query. You cannot use '${t.op.toString()}' filters with '${n.toString()}' filters.`)}(e,l),l}(e._query,0,t,e.firestore._databaseId,this.Wc,this.Gc,this.zc);return new Fd(e.firestore,e.converter,function(e,t){const n=e.filters.concat([t]);return new Ui(e.path,e.collectionGroup,e.explicitOrderBy.slice(),n,e.limit,e.limitType,e.startAt,e.endAt)}(e._query,n))}}function tf(e,t,n){const r=t,i=Zh("where",e);return new ef(i,r,n)}class nf extends Xh{constructor(e,t){super(),this.Wc=e,this.Hc=t,this.type="orderBy"}_apply(e){const t=function(e,t,n){if(null!==e.startAt)throw new _r(Er.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==e.endAt)throw new _r(Er.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");const r=new Fi(t,n);return function(e,t){if(null===Hi(e)){const n=Ki(e);null!==n&&vf(0,n,t.field)}}(e,r),r}(e._query,this.Wc,this.Hc);return new Fd(e.firestore,e.converter,function(e,t){const n=e.explicitOrderBy.concat([t]);return new Ui(e.path,e.collectionGroup,n,e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(e._query,t))}}function rf(e,t="asc"){const n=t,r=Zh("orderBy",e);return new nf(r,n)}class of extends Xh{constructor(e,t,n){super(),this.type=e,this.Jc=t,this.Yc=n}_apply(e){return new Fd(e.firestore,e.converter,Xi(e._query,this.Jc,this.Yc))}}function af(e){return Dd("limit",e),new of("limit",e,"F")}function sf(e){return Dd("limitToLast",e),new of("limitToLast",e,"L")}class lf extends Xh{constructor(e,t,n){super(),this.type=e,this.Xc=t,this.Zc=n}_apply(e){const t=pf(e,this.type,this.Xc,this.Zc);return new Fd(e.firestore,e.converter,function(e,t){return new Ui(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,t,e.endAt)}(e._query,t))}}function uf(...e){return new lf("startAt",e,!0)}function cf(...e){return new lf("startAfter",e,!1)}class df extends Xh{constructor(e,t,n){super(),this.type=e,this.Xc=t,this.Zc=n}_apply(e){const t=pf(e,this.type,this.Xc,this.Zc);return new Fd(e.firestore,e.converter,function(e,t){return new Ui(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,e.startAt,t)}(e._query,t))}}function hf(...e){return new df("endBefore",e,!0)}function ff(...e){return new df("endAt",e,!1)}function pf(e,t,n,r){if(n[0]=(0,l.m9)(n[0]),n[0]instanceof Uh)return function(e,t,n,r,i){if(!r)throw new _r(Er.NOT_FOUND,`Can't use a DocumentSnapshot that doesn't exist for ${n}().`);const o=[];for(const n of Qi(e))if(n.field.isKeyField())o.push(fi(t,r.key));else{const e=r.data.field(n.field);if(Jr(e))throw new _r(Er.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+n.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(null===e){const e=n.field.canonicalString();throw new _r(Er.INVALID_ARGUMENT,`Invalid query. You are trying to start or end a query using a document for which the field '${e}' (used as the orderBy) does not exist.`)}o.push(e)}return new Li(o,i)}(e._query,e.firestore._databaseId,t,n[0]._document,r);{const i=_h(e.firestore);return function(e,t,n,r,i,o){const a=e.explicitOrderBy;if(i.length>a.length)throw new _r(Er.INVALID_ARGUMENT,`Too many arguments provided to ${r}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);const s=[];for(let o=0;o<i.length;o++){const l=i[o];if(a[o].field.isKeyField()){if("string"!=typeof l)throw new _r(Er.INVALID_ARGUMENT,`Invalid query. Expected a string for document ID in ${r}(), but got a ${typeof l}`);if(!Gi(e)&&-1!==l.indexOf("/"))throw new _r(Er.INVALID_ARGUMENT,`Invalid query. When querying a collection and ordering by FieldPath.documentId(), the value passed to ${r}() must be a plain document ID, but '${l}' contains a slash.`);const n=e.path.child(Zr.fromString(l));if(!oi.isDocumentKey(n))throw new _r(Er.INVALID_ARGUMENT,`Invalid query. When querying a collection group and ordering by FieldPath.documentId(), the value passed to ${r}() must result in a valid document path, but '${n}' is not because it contains an odd number of segments.`);const i=new oi(n);s.push(fi(t,i))}else{const e=Ah(n,r,l);s.push(e)}}return new Li(s,o)}(e._query,e.firestore._databaseId,i,t,n,r)}}function mf(e,t,n){if("string"==typeof(n=(0,l.m9)(n))){if(""===n)throw new _r(Er.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid document ID, but it was an empty string.");if(!Gi(t)&&-1!==n.indexOf("/"))throw new _r(Er.INVALID_ARGUMENT,`Invalid query. When querying a collection by FieldPath.documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);const r=t.path.child(Zr.fromString(n));if(!oi.isDocumentKey(r))throw new _r(Er.INVALID_ARGUMENT,`Invalid query. When querying a collection group by FieldPath.documentId(), the value provided must result in a valid document path, but '${r}' is not because it has an odd number of segments (${r.length}).`);return fi(e,new oi(r))}if(n instanceof jd)return fi(e,n._key);throw new _r(Er.INVALID_ARGUMENT,`Invalid query. When querying with FieldPath.documentId(), you must provide a valid string or a DocumentReference, but it was: ${Nd(n)}.`)}function gf(e,t){if(!Array.isArray(e)||0===e.length)throw new _r(Er.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${t.toString()}' filters.`);if(e.length>10)throw new _r(Er.INVALID_ARGUMENT,`Invalid Query. '${t.toString()}' filters support a maximum of 10 elements in the value array.`)}function vf(e,t,n){if(!n.isEqual(t))throw new _r(Er.INVALID_ARGUMENT,`Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '${t.toString()}' and so you must also use '${t.toString()}' as your first argument to orderBy(), but your first orderBy() is on field '${n.toString()}' instead.`)}class yf{convertValue(e,t="none"){switch(ai(e)){case 0:return null;case 1:return e.booleanValue;case 2:return Yr(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,t);case 5:return e.stringValue;case 6:return this.convertBytes(Xr(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,t);case 10:return this.convertObject(e.mapValue,t);default:throw Pr()}}convertObject(e,t){const n={};return zr(e.fields||{},((e,r)=>{n[e]=this.convertValue(r,t)})),n}convertGeoPoint(e){return new mh(Yr(e.latitude),Yr(e.longitude))}convertArray(e,t){return(e.values||[]).map((e=>this.convertValue(e,t)))}convertServerTimestamp(e,t){switch(t){case"previous":const n=ei(e);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(ti(e));default:return null}}convertTimestamp(e){const t=Qr(e);return new Fr(t.seconds,t.nanos)}convertDocumentKey(e,t){const n=Zr.fromString(e);Nr($a(n));const r=new wd(n.get(1),n.get(3)),i=new oi(n.popFirst(5));return r.isEqual(t)||Ir(`Document ${i} contains a document reference within a different database (${r.projectId}/${r.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`),i}}function bf(e,t,n){let r;return r=e?n&&(n.merge||n.mergeFields)?e.toFirestore(t,n):e.toFirestore(t):t,r}class wf extends yf{constructor(e){super(),this.firestore=e}convertBytes(e){return new fh(e)}convertReference(e){const t=this.convertDocumentKey(e,this.firestore._databaseId);return new jd(this.firestore,null,t)}}class Ef{constructor(e,t){this._firestore=e,this._commitHandler=t,this._mutations=[],this._committed=!1,this._dataReader=_h(e)}set(e,t,n){this._verifyNotCommitted();const r=_f(e,this._firestore),i=bf(r.converter,t,n),o=Ch(this._dataReader,"WriteBatch.set",r._key,i,null!==r.converter,n);return this._mutations.push(o.toMutation(r._key,Co.none())),this}update(e,t,n,...r){this._verifyNotCommitted();const i=_f(e,this._firestore);let o;return o="string"==typeof(t=(0,l.m9)(t))||t instanceof dh?Nh(this._dataReader,"WriteBatch.update",i._key,t,n,r):Ph(this._dataReader,"WriteBatch.update",i._key,t),this._mutations.push(o.toMutation(i._key,Co.exists(!0))),this}delete(e){this._verifyNotCommitted();const t=_f(e,this._firestore);return this._mutations=this._mutations.concat(new Lo(t._key,Co.none())),this}commit(){return this._verifyNotCommitted(),this._committed=!0,this._mutations.length>0?this._commitHandler(this._mutations):Promise.resolve()}_verifyNotCommitted(){if(this._committed)throw new _r(Er.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")}}function _f(e,t){if((e=(0,l.m9)(e)).firestore!==t)throw new _r(Er.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return e}function Cf(e){e=Ad(e,jd);const t=Ad(e.firestore,Gd);return vd(Xd(t),e._key).then((n=>jf(t,e,n)))}class Sf extends yf{constructor(e){super(),this.firestore=e}convertBytes(e){return new fh(e)}convertReference(e){const t=this.convertDocumentKey(e,this.firestore._databaseId);return new jd(this.firestore,null,t)}}function xf(e){e=Ad(e,jd);const t=Ad(e.firestore,Gd),n=Xd(t),r=new Sf(t);return function(e,t){const n=new ms;return e.asyncQueue.enqueueAndForget((async()=>async function(e,t,n){try{const r=await function(e,t){const n=Ar(e);return n.persistence.runTransaction("read document","readonly",(e=>n.Fn.mn(e,t)))}(e,t);r.isFoundDocument()?n.resolve(r):r.isNoDocument()?n.resolve(null):n.reject(new _r(Er.UNAVAILABLE,"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)"))}catch(e){const r=nc(e,`Failed to get document '${t} from cache`);n.reject(r)}}(await fd(e),t,n))),n.promise}(n,e._key).then((n=>new qh(t,r,e._key,n,new $h(null!==n&&n.hasLocalMutations,!0),e.converter)))}function Tf(e){e=Ad(e,jd);const t=Ad(e.firestore,Gd);return vd(Xd(t),e._key,{source:"server"}).then((n=>jf(t,e,n)))}function If(e){e=Ad(e,Fd);const t=Ad(e.firestore,Gd),n=Xd(t),r=new Sf(t);return Yh(e._query),yd(n,e._query).then((n=>new Kh(t,r,e,n)))}function kf(e){e=Ad(e,Fd);const t=Ad(e.firestore,Gd),n=Xd(t),r=new Sf(t);return function(e,t){const n=new ms;return e.asyncQueue.enqueueAndForget((async()=>async function(e,t,n){try{const r=await Ul(e,t,!0),i=new wc(t,r.Bn),o=i._o(r.documents),a=i.applyChanges(o,!1);n.resolve(a.snapshot)}catch(e){const r=nc(e,`Failed to execute query '${t} against cache`);n.reject(r)}}(await fd(e),t,n))),n.promise}(n,e._query).then((n=>new Kh(t,r,e,n)))}function Of(e){e=Ad(e,Fd);const t=Ad(e.firestore,Gd),n=Xd(t),r=new Sf(t);return yd(n,e._query,{source:"server"}).then((n=>new Kh(t,r,e,n)))}function Pf(e,t,n){e=Ad(e,jd);const r=Ad(e.firestore,Gd),i=bf(e.converter,t,n);return Lf(r,[Ch(_h(r),"setDoc",e._key,i,null!==e.converter,n).toMutation(e._key,Co.none())])}function Nf(e,t,n,...r){e=Ad(e,jd);const i=Ad(e.firestore,Gd),o=_h(i);let a;return a="string"==typeof(t=(0,l.m9)(t))||t instanceof dh?Nh(o,"updateDoc",e._key,t,n,r):Ph(o,"updateDoc",e._key,t),Lf(i,[a.toMutation(e._key,Co.exists(!0))])}function Af(e){return Lf(Ad(e.firestore,Gd),[new Lo(e._key,Co.none())])}function Df(e,t){const n=Ad(e.firestore,Gd),r=Ud(e),i=bf(e.converter,t);return Lf(n,[Ch(_h(e.firestore),"addDoc",r._key,i,null!==e.converter,{}).toMutation(r._key,Co.exists(!1))]).then((()=>r))}function Rf(e,...t){var n,r,i;e=(0,l.m9)(e);let o={includeMetadataChanges:!1},a=0;"object"!=typeof t[a]||qd(t[a])||(o=t[a],a++);const s={includeMetadataChanges:o.includeMetadataChanges};if(qd(t[a])){const e=t[a];t[a]=null===(n=e.next)||void 0===n?void 0:n.bind(e),t[a+1]=null===(r=e.error)||void 0===r?void 0:r.bind(e),t[a+2]=null===(i=e.complete)||void 0===i?void 0:i.bind(e)}let u,c,d;if(e instanceof jd)c=Ad(e.firestore,Gd),d=Zi(e._key.path),u={next:n=>{t[a]&&t[a](jf(c,e,n))},error:t[a+1],complete:t[a+2]};else{const n=Ad(e,Fd);c=Ad(n.firestore,Gd),d=n._query;const r=new Sf(c);u={next:e=>{t[a]&&t[a](new Kh(c,r,n,e))},error:t[a+1],complete:t[a+2]},Yh(e._query)}return function(e,t,n,r){const i=new rd(r),o=new fc(t,i,n);return e.asyncQueue.enqueueAndForget((async()=>lc(await gd(e),o))),()=>{i.Wo(),e.asyncQueue.enqueueAndForget((async()=>uc(await gd(e),o)))}}(Xd(c),d,s,u)}function Mf(e,t){return function(e,t){const n=new rd(t);return e.asyncQueue.enqueueAndForget((async()=>function(e,t){Ar(e).Gr.add(t),t.next()}(await gd(e),n))),()=>{n.Wo(),e.asyncQueue.enqueueAndForget((async()=>function(e,t){Ar(e).Gr.delete(t)}(await gd(e),n)))}}(Xd(e=Ad(e,Gd)),qd(t)?t:{next:t})}function Lf(e,t){return function(e,t){const n=new ms;return e.asyncQueue.enqueueAndForget((async()=>async function(e,t,n){const r=Yc(e);try{const e=await function(e,t){const n=Ar(e),r=Fr.now(),i=t.reduce(((e,t)=>e.add(t.key)),ta());let o;return n.persistence.runTransaction("Locally write mutations","readwrite",(e=>n.Fn.pn(e,i).next((i=>{o=i;const a=[];for(const e of t){const t=ko(e,o.get(e.key));null!=t&&a.push(new Ao(e.key,t,wi(t.toProto().mapValue),Co.exists(!0)))}return n._n.addMutationBatch(e,r,a,t)})))).then((e=>(e.applyToLocalDocumentSet(o),{batchId:e.batchId,changes:o})))}(r.localStore,t);r.sharedClientState.addPendingMutation(e.batchId),function(e,t,n){let r=e.xo[e.currentUser.toKey()];r||(r=new Vo(Mr)),r=r.insert(t,n),e.xo[e.currentUser.toKey()]=r}(r,e.batchId,n),await Wc(r,e.changes),await Vu(r.remoteStore)}catch(e){const t=nc(e,"Failed to persist write");n.reject(t)}}(await md(e),t,n))),n.promise}(Xd(e),t)}function jf(e,t,n){const r=n.docs.get(t._key),i=new Sf(e);return new qh(e,i,t._key,r,new $h(n.hasPendingWrites,n.fromCache),t.converter)}class Ff extends class{constructor(e,t){this._firestore=e,this._transaction=t,this._dataReader=_h(e)}get(e){const t=_f(e,this._firestore),n=new wf(this._firestore);return this._transaction.lookup([t._key]).then((e=>{if(!e||1!==e.length)return Pr();const r=e[0];if(r.isFoundDocument())return new Uh(this._firestore,n,r.key,r,t.converter);if(r.isNoDocument())return new Uh(this._firestore,n,t._key,null,t.converter);throw Pr()}))}set(e,t,n){const r=_f(e,this._firestore),i=bf(r.converter,t,n),o=Ch(this._dataReader,"Transaction.set",r._key,i,null!==r.converter,n);return this._transaction.set(r._key,o),this}update(e,t,n,...r){const i=_f(e,this._firestore);let o;return o="string"==typeof(t=(0,l.m9)(t))||t instanceof dh?Nh(this._dataReader,"Transaction.update",i._key,t,n,r):Ph(this._dataReader,"Transaction.update",i._key,t),this._transaction.update(i._key,o),this}delete(e){const t=_f(e,this._firestore);return this._transaction.delete(t._key),this}}{constructor(e,t){super(e,t),this._firestore=e}get(e){const t=_f(e,this._firestore),n=new Sf(this._firestore);return super.get(e).then((e=>new qh(this._firestore,n,t._key,e._document,new $h(!1,!1),t.converter)))}}function Wf(e,t){return function(e,t){const n=new ms;return e.asyncQueue.enqueueAndForget((async()=>{const r=await function(e){return dd(e).then((e=>e.datastore))}(e);new ad(e.asyncQueue,r,t,n).run()})),n.promise}(Xd(e),(n=>t(new Ff(e,n))))}function Bf(){return new Sh("deleteField")}function zf(){return new Th("serverTimestamp")}function Uf(...e){return new Ih("arrayUnion",e)}function Vf(...e){return new kh("arrayRemove",e)}function Zf(e){return new Oh("increment",e)}function $f(e){return Xd(e=Ad(e,Gd)),new Ef(e,(t=>Lf(e,t)))}!function(e){br=e}(r.Jn),(0,r.Xd)(new u("firestore-exp",((e,{options:t})=>{const n=e.getProvider("app-exp").getImmediate(),r=new Gd(n,e.getProvider("auth-internal"));return t&&r._setSettings(t),r}),"PUBLIC")),(0,r.KN)("@firebase/firestore","0.0.900-exp.d92a36260",void 0)},3495:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getFunctions:()=>E,httpsCallable:()=>C,useFunctionsEmulator:()=>_});var r=n(3198),i=n(8448),o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function l(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}Object.create,Object.create;var u=function(){function e(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}return e.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},e.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},e.prototype.setServiceProps=function(e){return this.serviceProps=e,this},e.prototype.setInstanceCreatedCallback=function(e){return this.onInstanceCreated=e,this},e}(),c="[DEFAULT]",d=function(){function e(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.onInitCallbacks=new Set}return e.prototype.get=function(e){void 0===e&&(e=c);var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new i.BH;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{var r=this.getOrInitializeService({instanceIdentifier:t});r&&n.resolve(r)}catch(e){}}return this.instancesDeferred.get(t).promise},e.prototype.getImmediate=function(e){var t=o({identifier:c,optional:!1},e),n=t.identifier,r=t.optional,i=this.normalizeInstanceIdentifier(n);if(!this.isInitialized(i)&&!this.shouldAutoInitialize()){if(r)return null;throw Error("Service "+this.name+" is not available")}try{return this.getOrInitializeService({instanceIdentifier:i})}catch(e){if(r)return null;throw e}},e.prototype.getComponent=function(){return this.component},e.prototype.setComponent=function(e){var t,n;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(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:c})}catch(e){}try{for(var r=a(this.instancesDeferred.entries()),i=r.next();!i.done;i=r.next()){var o=s(i.value,2),l=o[0],u=o[1],d=this.normalizeInstanceIdentifier(l);try{var h=this.getOrInitializeService({instanceIdentifier:d});u.resolve(h)}catch(e){}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}}},e.prototype.clearInstance=function(e){void 0===e&&(e=c),this.instancesDeferred.delete(e),this.instances.delete(e)},e.prototype.delete=function(){return e=this,t=void 0,r=function(){var e;return function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,(function(t){switch(t.label){case 0:return e=Array.from(this.instances.values()),[4,Promise.all(l(l([],s(e.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()})))),s(e.filter((function(e){return"_delete"in e})).map((function(e){return e._delete()})))))];case 1:return t.sent(),[2]}}))},new((n=void 0)||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}));var e,t,n,r},e.prototype.isComponentSet=function(){return null!=this.component},e.prototype.isInitialized=function(e){return void 0===e&&(e=c),this.instances.has(e)},e.prototype.initialize=function(e){var t,n;void 0===e&&(e={});var r=e.instanceIdentifier,i=void 0===r?c:r,o=e.options,l=void 0===o?{}:o,u=this.normalizeInstanceIdentifier(i);if(this.isInitialized(u))throw Error(this.name+"("+u+") has already been initialized");if(!this.isComponentSet())throw Error("Component "+this.name+" has not been registered yet");var d=this.getOrInitializeService({instanceIdentifier:u,options:l});try{for(var h=a(this.instancesDeferred.entries()),f=h.next();!f.done;f=h.next()){var p=s(f.value,2),m=p[0],g=p[1];u===this.normalizeInstanceIdentifier(m)&&g.resolve(d)}}catch(e){t={error:e}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}finally{if(t)throw t.error}}return this.invokeOnInitCallbacks(d,u),d},e.prototype.onInit=function(e){var t=this;return this.onInitCallbacks.add(e),function(){t.onInitCallbacks.delete(e)}},e.prototype.invokeOnInitCallbacks=function(e,t){var n,r;try{for(var i=a(this.onInitCallbacks),o=i.next();!o.done;o=i.next()){var s=o.value;try{s(e,t)}catch(e){}}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype.getOrInitializeService=function(e){var t,n=e.instanceIdentifier,r=e.options,i=void 0===r?{}:r,o=this.instances.get(n);if(!o&&this.component&&(o=this.component.instanceFactory(this.container,{instanceIdentifier:(t=n,t===c?void 0:t),options:i}),this.instances.set(n,o),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,n,o)}catch(e){}return o||null},e.prototype.normalizeInstanceIdentifier=function(e){return this.component?this.component.multipleInstances?e:c:e},e.prototype.shouldAutoInitialize=function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode},e}();function h(e,t){const n={};for(const r in e)e.hasOwnProperty(r)&&(n[r]=t(e[r]));return n}function f(e){if(null==e)return null;if(e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&isFinite(e))return e;if(!0===e||!1===e)return e;if("[object String]"===Object.prototype.toString.call(e))return e;if(Array.isArray(e))return e.map((e=>f(e)));if("function"==typeof e||"object"==typeof e)return h(e,(e=>f(e)));throw new Error("Data cannot be encoded in JSON: "+e)}function p(e){if(null==e)return e;if(e["@type"])switch(e["@type"]){case"type.googleapis.com/google.protobuf.Int64Value":case"type.googleapis.com/google.protobuf.UInt64Value":{const t=Number(e.value);if(isNaN(t))throw new Error("Data cannot be decoded from JSON: "+e);return t}default:throw new Error("Data cannot be decoded from JSON: "+e)}return Array.isArray(e)?e.map((e=>p(e))):"function"==typeof e||"object"==typeof e?h(e,(e=>p(e))):e}!function(){function e(e){this.name=e,this.providers=new Map}e.prototype.addComponent=function(e){var t=this.getProvider(e.name);if(t.isComponentSet())throw new Error("Component "+e.name+" has already been registered with "+this.name);t.setComponent(e)},e.prototype.addOrOverwriteComponent=function(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)},e.prototype.getProvider=function(e){if(this.providers.has(e))return this.providers.get(e);var t=new d(e,this);return this.providers.set(e,t),t},e.prototype.getProviders=function(){return Array.from(this.providers.values())}}();const m="functions-exp",g={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 v extends i.ZR{constructor(e,t,n){super(`functions-exp/${e}`,t||""),this.details=n}}class y{constructor(e,t){this.auth=null,this.messaging=null,this.auth=e.getImmediate({optional:!0}),this.messaging=t.getImmediate({optional:!0}),this.auth||e.get().then((e=>this.auth=e),(()=>{})),this.messaging||t.get().then((e=>this.messaging=e),(()=>{}))}async getAuthToken(){if(this.auth)try{const e=await this.auth.getToken();return null==e?void 0:e.accessToken}catch(e){return}}async getMessagingToken(){if(this.messaging&&"Notification"in self&&"granted"===Notification.permission)try{return this.messaging.getToken()}catch(e){return}}async getContext(){return{authToken:await this.getAuthToken(),messagingToken:await this.getMessagingToken()}}}class b{constructor(e,t,n,r="us-central1",i){this.app=e,this.fetchImpl=i,this.emulatorOrigin=null,this.contextProvider=new y(t,n),this.cancelAllRequests=new Promise((e=>{this.deleteService=()=>Promise.resolve(e())}));try{const e=new URL(r);this.customDomain=e.origin,this.region="us-central1"}catch(e){this.customDomain=null,this.region=r}}_delete(){return this.deleteService()}_url(e){const t=this.app.options.projectId;return null!==this.emulatorOrigin?`${this.emulatorOrigin}/${t}/${this.region}/${e}`:null!==this.customDomain?`${this.customDomain}/${e}`:`https://${this.region}-${t}.cloudfunctions.net/${e}`}}async function w(e,t,n,r){let i;n["Content-Type"]="application/json";try{i=await r(e,{method:"POST",body:JSON.stringify(t),headers:n})}catch(e){return{status:0,json:null}}let o=null;try{o=await i.json()}catch(e){}return{status:i.status,json:o}}function E(e=(0,r.Mq)(),t="us-central1"){return(0,r.qX)((0,i.m9)(e),m).getImmediate({identifier:t})}function _(e,t,n){!function(e,t,n){e.emulatorOrigin=`http://${t}:${n}`}((0,i.m9)(e),t,n)}function C(e,t,n){return function(e,t,n){return r=>async function(e,t,n,r){const i=e._url(t),o={data:n=f(n)},a={},s=await e.contextProvider.getContext();s.authToken&&(a.Authorization="Bearer "+s.authToken),s.messagingToken&&(a["Firebase-Instance-ID-Token"]=s.messagingToken);const l=r.timeout||7e4,u=await Promise.race([w(i,o,a,e.fetchImpl),(c=l,new Promise(((e,t)=>{setTimeout((()=>{t(new v("deadline-exceeded","deadline-exceeded"))}),c)}))),e.cancelAllRequests]);var c;if(!u)throw new v("cancelled","Firebase Functions instance was deleted.");const d=function(e,t){let n,r=function(e){if(e>=200&&e<300)return"ok";switch(e){case 0:return"internal";case 400:return"invalid-argument";case 401:return"unauthenticated";case 403:return"permission-denied";case 404:return"not-found";case 409:return"aborted";case 429:return"resource-exhausted";case 499:return"cancelled";case 500:return"internal";case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline-exceeded"}return"unknown"}(e),i=r;try{const e=t&&t.error;if(e){const t=e.status;if("string"==typeof t){if(!g[t])return new v("internal","internal");r=g[t],i=t}const o=e.message;"string"==typeof o&&(i=o),n=e.details,void 0!==n&&(n=p(n))}}catch(e){}return"ok"===r?null:new v(r,i,n)}(u.status,u.json);if(d)throw d;if(!u.json)throw new v("internal","Response is not valid JSON object.");let h=u.json.data;if(void 0===h&&(h=u.json.result),void 0===h)throw new v("internal","Response is missing data field.");return{data:p(h)}}(e,t,r,n||{})}((0,i.m9)(e),t,n)}var S;S=fetch.bind(self),(0,r.Xd)(new u(m,((e,{instanceIdentifier:t})=>{const n=e.getProvider("app-exp").getImmediate(),r=e.getProvider("auth-internal"),i=e.getProvider("messaging");return new b(n,r,i,t,S)}),"PUBLIC").setMultipleInstances(!0)),(0,r.KN)("@firebase/functions-exp","0.0.900-exp.d92a36260")},4147:(e,t,n)=>{var r,i,o,a;o=window.$,(a={config:{},container:{},controls:{},errors:{},items:{},utils:{}}).utils.F=function(){},a.utils.extend=function(e,t){e.prototype=a.utils.createObject(t.prototype),e.prototype.contructor=e},a.utils.createObject=function(e){return"function"==typeof Object.create?Object.create(e):(a.utils.F.prototype=e,new a.utils.F)},a.utils.objectKeys=function(e){var t,n;if("function"==typeof Object.keys)return Object.keys(e);for(n in t=[],e)t.push(n);return t},a.utils.getHashValue=function(e){var t=location.hash.match(new RegExp(e+"=([^&]*)"));return t?t[1]:null},a.utils.getQueryStringParam=function(e){if(window.location.hash)return a.utils.getHashValue(e);if(!window.location.search)return null;var t,n,r=window.location.search.substr(1).split("&"),i={};for(n=0;n<r.length;n++)i[(t=r[n].split("="))[0]]=t[1];return i[e]||null},a.utils.copy=function(e,t){for(var n in t)e[n]=t[n];return e},a.utils.animFrame=function(e){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)})((function(){e()}))},a.utils.indexOf=function(e,t){if(!(t instanceof Array))throw new Error("Haystack is not an Array");if(t.indexOf)return t.indexOf(e);for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1},"object"!=typeof Int8Array?a.utils.isFunction=function(e){return"function"==typeof e||!1}:a.utils.isFunction=function(e){return"[object Function]"===toString.call(e)},a.utils.fnBind=function(e,t,n){if(void 0!==Function.prototype.bind)return Function.prototype.bind.apply(e,[t].concat(n||[]));var r=function(){var i=(n||[]).concat(Array.prototype.slice.call(arguments,0));if(!(this instanceof r))return e.apply(t,i);e.apply(this,i)};return r.prototype=e.prototype,r},a.utils.removeFromArray=function(e,t){var n=a.utils.indexOf(e,t);if(-1===n)throw new Error("Can't remove item from array. Item is not in the array");t.splice(n,1)},a.utils.now=function(){return"function"==typeof Date.now?Date.now():(new Date).getTime()},a.utils.getUniqueId=function(){return(1e15*Math.random()).toString(36).replace(".","")},a.utils.filterXss=function(e,t){var n=e.replace(/javascript/gi,"javascript").replace(/expression/gi,"expression").replace(/onload/gi,"onload").replace(/script/gi,"script").replace(/onerror/gi,"onerror");return!0===t?n:n.replace(/>/g,">").replace(/</g,"<")},a.utils.stripTags=function(e){return o.trim(e.replace(/(<([^>]+)>)/gi,""))},a.utils.EventEmitter=function(){this._mSubscriptions={},this._mSubscriptions[a.utils.EventEmitter.ALL_EVENT]=[],this.on=function(e,t,n){if(!a.utils.isFunction(t))throw new Error("Tried to listen to event "+e+" with non-function callback "+t);this._mSubscriptions[e]||(this._mSubscriptions[e]=[]),this._mSubscriptions[e].push({fn:t,ctx:n})},this.emit=function(e){var t,n,r;r=Array.prototype.slice.call(arguments,1);var i=this._mSubscriptions[e];if(i)for(i=i.slice(),t=0;t<i.length;t++)n=i[t].ctx||{},i[t].fn.apply(n,r);r.unshift(e);var o=this._mSubscriptions[a.utils.EventEmitter.ALL_EVENT].slice();for(t=0;t<o.length;t++)n=o[t].ctx||{},o[t].fn.apply(n,r)},this.unbind=function(e,t,n){if(!this._mSubscriptions[e])throw new Error("No subscribtions to unsubscribe for event "+e);var r,i=!1;for(r=0;r<this._mSubscriptions[e].length;r++)t&&this._mSubscriptions[e][r].fn!==t||n&&n!==this._mSubscriptions[e][r].ctx||(this._mSubscriptions[e].splice(r,1),i=!0);if(!1===i)throw new Error("Nothing to unbind for "+e)},this.off=this.unbind,this.trigger=this.emit},a.utils.EventEmitter.ALL_EVENT="__all",a.utils.DragListener=function(e,t){a.utils.EventEmitter.call(this),this._eElement=o(e),this._oDocument=o(document),this._eBody=o(document.body),this._nButtonCode=t||0,this._nDelay=200,this._nDistance=10,this._nX=0,this._nY=0,this._nOriginalX=0,this._nOriginalY=0,this._bDragging=!1,this._fMove=a.utils.fnBind(this.onMouseMove,this),this._fUp=a.utils.fnBind(this.onMouseUp,this),this._fDown=a.utils.fnBind(this.onMouseDown,this),this._eElement.on("mousedown touchstart",this._fDown)},a.utils.DragListener.timeout=null,a.utils.copy(a.utils.DragListener.prototype,{destroy:function(){this._eElement.unbind("mousedown touchstart",this._fDown),this._oDocument.unbind("mouseup touchend",this._fUp),this._eElement=null,this._oDocument=null,this._eBody=null},onMouseDown:function(e){if(e.preventDefault(),0==e.button||"touchstart"===e.type){var t=this._getCoordinates(e);this._nOriginalX=t.x,this._nOriginalY=t.y,this._oDocument.on("mousemove touchmove",this._fMove),this._oDocument.one("mouseup touchend",this._fUp),this._timeout=setTimeout(a.utils.fnBind(this._startDrag,this),this._nDelay)}},onMouseMove:function(e){if(null!=this._timeout){e.preventDefault();var t=this._getCoordinates(e);this._nX=t.x-this._nOriginalX,this._nY=t.y-this._nOriginalY,!1===this._bDragging&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&(clearTimeout(this._timeout),this._startDrag()),this._bDragging&&this.emit("drag",this._nX,this._nY,e)}},onMouseUp:function(e){null!=this._timeout&&(clearTimeout(this._timeout),this._eBody.removeClass("lm_dragging"),this._eElement.removeClass("lm_dragging"),this._oDocument.find("iframe").css("pointer-events",""),this._oDocument.unbind("mousemove touchmove",this._fMove),this._oDocument.unbind("mouseup touchend",this._fUp),!0===this._bDragging&&(this._bDragging=!1,this.emit("dragStop",e,this._nOriginalX+this._nX)))},_startDrag:function(){this._bDragging=!0,this._eBody.addClass("lm_dragging"),this._eElement.addClass("lm_dragging"),this._oDocument.find("iframe").css("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)},_getCoordinates:function(e){return{x:(e=e.originalEvent&&e.originalEvent.touches?e.originalEvent.touches[0]:e).pageX,y:e.pageY}}}),a.LayoutManager=function(e,t){if(!o||"function"!=typeof o.noConflict)throw new Error('jQuery is missing as dependency for GoldenLayout. Please either expose $ on GoldenLayout\'s scope (e.g. window) or add "jquery" to your paths when using RequireJS/AMD');a.utils.EventEmitter.call(this),this.isInitialised=!1,this._isFullPage=!1,this._resizeTimeoutId=null,this._components={"lm-react-component":a.utils.ReactComponentHandler},this._itemAreas=[],this._resizeFunction=a.utils.fnBind(this._onResize,this),this._unloadFunction=a.utils.fnBind(this._onUnload,this),this._maximisedItem=null,this._maximisePlaceholder=o('<div class="lm_maximise_place"></div>'),this._creationTimeoutPassed=!1,this._subWindowsCreated=!1,this._dragSources=[],this._updatingColumnsResponsive=!1,this._firstLoad=!0,this.width=null,this.height=null,this.root=null,this.openPopouts=[],this.selectedItem=null,this.isSubWindow=!1,this.eventHub=new a.utils.EventHub(this),this.config=this._createConfig(e),this.container=t,this.dropTargetIndicator=null,this.transitionIndicator=null,this.tabDropPlaceholder=o('<div class="lm_drop_tab_placeholder"></div>'),!0===this.isSubWindow&&o("body").css("visibility","hidden"),this._typeToItem={column:a.utils.fnBind(a.items.RowOrColumn,this,[!0]),row:a.utils.fnBind(a.items.RowOrColumn,this,[!1]),stack:a.items.Stack,component:a.items.Component}},a.LayoutManager.__lm=a,a.LayoutManager.minifyConfig=function(e){return(new a.utils.ConfigMinifier).minifyConfig(e)},a.LayoutManager.unminifyConfig=function(e){return(new a.utils.ConfigMinifier).unminifyConfig(e)},a.utils.copy(a.LayoutManager.prototype,{registerComponent:function(e,t){if("function"!=typeof t)throw new Error("Please register a constructor function");if(void 0!==this._components[e])throw new Error("Component "+e+" is already registered");this._components[e]=t},toConfig:function(e){var t,n,r;if(!1===this.isInitialised)throw new Error("Can't create config, layout not yet initialised");if(e&&!(e instanceof a.items.AbstractContentItem))throw new Error("Root must be a ContentItem");for((t={settings:a.utils.copy({},this.config.settings),dimensions:a.utils.copy({},this.config.dimensions),labels:a.utils.copy({},this.config.labels)}).content=[],(n=function(e,t){var r,i;for(r in t.config)"content"!==r&&(e[r]=t.config[r]);if(t.contentItems.length)for(e.content=[],i=0;i<t.contentItems.length;i++)e.content[i]={},n(e.content[i],t.contentItems[i])})(t,e?{contentItems:[e]}:this.root),this._$reconcilePopoutWindows(),t.openPopouts=[],r=0;r<this.openPopouts.length;r++)t.openPopouts.push(this.openPopouts[r].toConfig());return t.maximisedItemId=this._maximisedItem?"__glMaximised":null,t},getComponent:function(e){if(void 0===this._components[e])throw new a.errors.ConfigurationError('Unknown component "'+e+'"');return this._components[e]},init:function(){if(!1===this._subWindowsCreated&&(this._createSubWindows(),this._subWindowsCreated=!0),"loading"!==document.readyState&&null!==document.body){if(!0===this.isSubWindow&&!1===this._creationTimeoutPassed)return setTimeout(a.utils.fnBind(this.init,this),7),void(this._creationTimeoutPassed=!0);!0===this.isSubWindow&&this._adjustToWindowMode(),this._setContainer(),this.dropTargetIndicator=new a.controls.DropTargetIndicator(this.container),this.transitionIndicator=new a.controls.TransitionIndicator,this.updateSize(),this._create(this.config),this._bindEvents(),this.isInitialised=!0,this._adjustColumnsResponsive(),this.emit("initialised")}else o(document).ready(a.utils.fnBind(this.init,this))},updateSize:function(e,t){2===arguments.length?(this.width=e,this.height=t):(this.width=this.container.width(),this.height=this.container.height()),!0===this.isInitialised&&(this.root.callDownwards("setSize",[this.width,this.height]),this._maximisedItem&&(this._maximisedItem.element.width(this.container.width()),this._maximisedItem.element.height(this.container.height()),this._maximisedItem.callDownwards("setSize")),this._adjustColumnsResponsive())},destroy:function(){!1!==this.isInitialised&&(this._onUnload(),o(window).off("resize",this._resizeFunction),o(window).off("unload beforeunload",this._unloadFunction),this.root.callDownwards("_$destroy",[],!0),this.root.contentItems=[],this.tabDropPlaceholder.remove(),this.dropTargetIndicator.destroy(),this.transitionIndicator.destroy(),this.eventHub.destroy(),this._dragSources.forEach((function(e){e._dragListener.destroy(),e._element=null,e._itemConfig=null,e._dragListener=null})),this._dragSources=[])},createContentItem:function(e,t){var n;if("string"!=typeof e.type)throw new a.errors.ConfigurationError("Missing parameter 'type'",e);if("react-component"===e.type&&(e.type="component",e.componentName="lm-react-component"),!this._typeToItem[e.type])throw n="Unknown type '"+e.type+"'. Valid types are "+a.utils.objectKeys(this._typeToItem).join(","),new a.errors.ConfigurationError(n);return"component"!==e.type||t instanceof a.items.Stack||!t||!0===this.isSubWindow&&t instanceof a.items.Root||(e={type:"stack",width:e.width,height:e.height,content:[e]}),new this._typeToItem[e.type](this,e,t)},createPopout:function(e,t,n,r){var i,o,s,l,u,c,d=e,h=e instanceof a.items.AbstractContentItem,f=this;if(n=n||null,h){for(d=this.toConfig(e).content,n=a.utils.getUniqueId(),l=e.parent,u=e;1===l.contentItems.length&&!l.isRoot;)l=l.parent,u=u.parent;l.addId(n),isNaN(r)&&(r=a.utils.indexOf(u,l.contentItems))}else d instanceof Array||(d=[d]);return!t&&h&&(i=window.screenX||window.screenLeft,o=window.screenY||window.screenTop,t={left:i+(s=e.element.offset()).left,top:o+s.top,width:e.element.width(),height:e.element.height()}),t||h||(t={left:window.screenX||window.screenLeft+20,top:window.screenY||window.screenTop+20,width:500,height:309}),h&&e.remove(),(c=new a.controls.BrowserPopout(d,t,n,r,this)).on("initialised",(function(){f.emit("windowOpened",c)})),c.on("closed",(function(){f._$reconcilePopoutWindows()})),this.openPopouts.push(c),c},createDragSource:function(e,t){this.config.settings.constrainDragToContainer=!1;var n=new a.controls.DragSource(o(e),t,this);return this._dragSources.push(n),n},selectItem:function(e,t){if(!0!==this.config.settings.selectionEnabled)throw new Error("Please set selectionEnabled to true to use this feature");e!==this.selectedItem&&(null!==this.selectedItem&&this.selectedItem.deselect(),e&&!0!==t&&e.select(),this.selectedItem=e,this.emit("selectionChanged",e))},_$maximiseItem:function(e){null!==this._maximisedItem&&this._$minimiseItem(this._maximisedItem),this._maximisedItem=e,this._maximisedItem.addId("__glMaximised"),e.element.addClass("lm_maximised"),e.element.after(this._maximisePlaceholder),this.root.element.prepend(e.element),e.element.width(this.container.width()),e.element.height(this.container.height()),e.callDownwards("setSize"),this._maximisedItem.emit("maximised"),this.emit("stateChanged")},_$minimiseItem:function(e){e.element.removeClass("lm_maximised"),e.removeId("__glMaximised"),this._maximisePlaceholder.after(e.element),this._maximisePlaceholder.remove(),e.parent.callDownwards("setSize"),this._maximisedItem=null,e.emit("minimised"),this.emit("stateChanged")},_$closeWindow:function(){window.setTimeout((function(){window.close()}),1)},_$getArea:function(e,t){var n,r,i=1/0,o=null;for(n=0;n<this._itemAreas.length;n++)e>(r=this._itemAreas[n]).x1&&e<r.x2&&t>r.y1&&t<r.y2&&i>r.surface&&(i=r.surface,o=r);return o},_$createRootItemAreas:function(){var e={y2:0,x2:0,y1:"y2",x1:"x2"};for(var t in e){var n=this.root._$getArea();n.side=t,n[t]=e[t]?n[e[t]]-50:50,n.surface=(n.x2-n.x1)*(n.y2-n.y1),this._itemAreas.push(n)}},_$calculateItemAreas:function(){var e,t,n=this._getAllContentItems();if(this._itemAreas=[],1!==n.length){for(this._$createRootItemAreas(),e=0;e<n.length;e++)if(n[e].isStack&&null!==(t=n[e]._$getArea()))if(t instanceof Array)this._itemAreas=this._itemAreas.concat(t);else{this._itemAreas.push(t);var r={};a.utils.copy(r,t),a.utils.copy(r,t.contentItem._contentAreaDimensions.header.highlightArea),r.surface=(r.x2-r.x1)*(r.y2-r.y1),this._itemAreas.push(r)}}else this._itemAreas.push(this.root._$getArea())},_$normalizeContentItem:function(e,t){if(!e)throw new Error("No content item defined");if(a.utils.isFunction(e)&&(e=e()),e instanceof a.items.AbstractContentItem)return e;if(o.isPlainObject(e)&&e.type){var n=this.createContentItem(e,t);return n.callDownwards("_$init"),n}throw new Error("Invalid contentItem")},_$reconcilePopoutWindows:function(){var e,t=[];for(e=0;e<this.openPopouts.length;e++)!1===this.openPopouts[e].getWindow().closed?t.push(this.openPopouts[e]):this.emit("windowClosed",this.openPopouts[e]);this.openPopouts.length!==t.length&&(this.emit("stateChanged"),this.openPopouts=t)},_getAllContentItems:function(){var e=[],t=function(n){if(e.push(n),n.contentItems instanceof Array)for(var r=0;r<n.contentItems.length;r++)t(n.contentItems[r])};return t(this.root),e},_bindEvents:function(){this._isFullPage&&o(window).resize(this._resizeFunction),o(window).on("unload beforeunload",this._unloadFunction)},_onResize:function(){clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=setTimeout(a.utils.fnBind(this.updateSize,this),100)},_createConfig:function(e){var t=a.utils.getQueryStringParam("gl-window");t&&(this.isSubWindow=!0,e=localStorage.getItem(t),e=JSON.parse(e),e=(new a.utils.ConfigMinifier).unminifyConfig(e),localStorage.removeItem(t)),e=o.extend(!0,{},a.config.defaultConfig,e);var n=function(e){for(var t in e)"props"!==t&&"object"==typeof e[t]?n(e[t]):"type"===t&&"react-component"===e[t]&&(e.type="component",e.componentName="lm-react-component")};return n(e),!1===e.settings.hasHeaders&&(e.dimensions.headerHeight=0),e},_adjustToWindowMode:function(){var e=o('<div class="lm_popin" title="'+this.config.labels.popin+'"><div class="lm_icon"></div><div class="lm_bg"></div></div>');e.click(a.utils.fnBind((function(){this.emit("popIn")}),this)),document.title=a.utils.stripTags(this.config.content[0].title),o("head").append(o("body link, body style, template, .gl_keep")),this.container=o("body").html("").css("visibility","visible").append(e),document.body.offsetHeight,window.__glInstance=this},_createSubWindows:function(){var e,t;for(e=0;e<this.config.openPopouts.length;e++)t=this.config.openPopouts[e],this.createPopout(t.content,t.dimensions,t.parentId,t.indexInParent)},_setContainer:function(){var e=o(this.container||"body");if(0===e.length)throw new Error("GoldenLayout container not found");if(e.length>1)throw new Error("GoldenLayout more than one container element specified");e[0]===document.body&&(this._isFullPage=!0,o("html, body").css({height:"100%",margin:0,padding:0,overflow:"hidden"})),this.container=e},_create:function(e){var t;if(!(e.content instanceof Array))throw t=void 0===e.content?"Missing setting 'content' on top level of configuration":"Configuration parameter 'content' must be an array",new a.errors.ConfigurationError(t,e);if(e.content.length>1)throw t="Top level content can't contain more then one element.",new a.errors.ConfigurationError(t,e);this.root=new a.items.Root(this,{content:e.content},this.container),this.root.callDownwards("_$init"),"__glMaximised"===e.maximisedItemId&&this.root.getItemsById(e.maximisedItemId)[0].toggleMaximise()},_onUnload:function(){if(!0===this.config.settings.closePopoutsOnUnload)for(var e=0;e<this.openPopouts.length;e++)this.openPopouts[e].close()},_adjustColumnsResponsive:function(){if(this._useResponsiveLayout()&&!this._updatingColumnsResponsive&&this.config.dimensions&&this.config.dimensions.minItemWidth&&0!==this.root.contentItems.length&&this.root.contentItems[0].isRow){this._firstLoad=!1;var e=this.root.contentItems[0].contentItems.length;if(!(e<=1)){var t=this.config.dimensions.minItemWidth;if(!(e*t<=this.width)){this._updatingColumnsResponsive=!0;for(var n=e-Math.max(Math.floor(this.width/t),1),r=this.root.contentItems[0],i=this._findAllStackContainers()[0],o=0;o<n;o++){var a=r.contentItems[r.contentItems.length-1];this._addChildContentItemsToContainer(i,a)}this._updatingColumnsResponsive=!1}}}else this._firstLoad=!1},_useResponsiveLayout:function(){return this.config.settings&&("always"==this.config.settings.responsiveMode||"onload"==this.config.settings.responsiveMode&&this._firstLoad)},_addChildContentItemsToContainer:function(e,t){"stack"===t.type?t.contentItems.forEach((function(n){e.addChild(n),t.removeChild(n,!0)})):t.contentItems.forEach(a.utils.fnBind((function(t){this._addChildContentItemsToContainer(e,t)}),this))},_findAllStackContainers:function(){var e=[];return this._findAllStackContainersRecursive(e,this.root),e},_findAllStackContainersRecursive:function(e,t){t.contentItems.forEach(a.utils.fnBind((function(t){"stack"==t.type?e.push(t):t.isComponent||this._findAllStackContainersRecursive(e,t)}),this))}}),r=[n(4070)],void 0===(i=function(e){return o=e,a.LayoutManager}.apply(t,r))||(e.exports=i),a.config.itemDefaultConfig={isClosable:!0,reorderEnabled:!0,title:""},a.config.defaultConfig={openPopouts:[],settings:{hasHeaders:!0,constrainDragToContainer:!0,reorderEnabled:!0,selectionEnabled:!1,popoutWholeStack:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,showPopoutIcon:!0,showMaximiseIcon:!0,showCloseIcon:!0,responsiveMode:"onload",tabOverlapAllowance:0,reorderOnTabMenuClick:!0,tabControlOffset:10},dimensions:{borderWidth:5,borderGrabWidth:15,minItemHeight:10,minItemWidth:10,headerHeight:20,dragProxyWidth:300,dragProxyHeight:200},labels:{close:"close",maximise:"maximise",minimise:"minimise",popout:"open in new window",popin:"pop in",tabDropdown:"additional tabs"}},a.container.ItemContainer=function(e,t,n){a.utils.EventEmitter.call(this),this.width=null,this.height=null,this.title=e.componentName,this.parent=t,this.layoutManager=n,this.isHidden=!1,this._config=e,this._element=o(['<div class="lm_item_container">','<div class="lm_content"></div>',"</div>"].join("")),this._contentElement=this._element.find(".lm_content")},a.utils.copy(a.container.ItemContainer.prototype,{getElement:function(){return this._contentElement},hide:function(){this.emit("hide"),this.isHidden=!0,this._element.hide()},show:function(){this.emit("show"),this.isHidden=!1,this._element.show(),0==this.height&&0==this.width||this.emit("shown")},setSize:function(e,t){for(var n,r,i,o,a=this.parent,s=this;!a.isColumn&&!a.isRow;)if(s=a,(a=a.parent).isRoot)return!1;for(n=("height"==(r=a.isColumn?"height":"width")?t:e)/(this[r]*(1/(s.config[r]/100)))*100,i=(s.config[r]-n)/(a.contentItems.length-1),o=0;o<a.contentItems.length;o++)a.contentItems[o]===s?a.contentItems[o].config[r]=n:a.contentItems[o].config[r]+=i;return a.callDownwards("setSize"),!0},close:function(){this._config.isClosable&&(this.emit("close"),this.parent.close())},getState:function(){return this._config.componentState},extendState:function(e){this.setState(o.extend(!0,this.getState(),e))},setState:function(e){this._config.componentState=e,this.parent.emitBubblingEvent("stateChanged")},setTitle:function(e){this.parent.setTitle(e)},_$setSize:function(e,t){if(e!==this.width||t!==this.height){this.width=e,this.height=t;var n=this._contentElement[0],r=n.offsetWidth-n.clientWidth,i=n.offsetHeight-n.clientHeight;this._contentElement.width(this.width-r).height(this.height-i),this.emit("resize")}}}),a.controls.BrowserPopout=function(e,t,n,r,i){a.utils.EventEmitter.call(this),this.isInitialised=!1,this._config=e,this._dimensions=t,this._parentId=n,this._indexInParent=r,this._layoutManager=i,this._popoutWindow=null,this._id=null,this._createWindow()},a.utils.copy(a.controls.BrowserPopout.prototype,{toConfig:function(){if(!1===this.isInitialised)throw new Error("Can't create config, layout not yet initialised");return{dimensions:{width:this.getGlInstance().width,height:this.getGlInstance().height,left:this._popoutWindow.screenX||this._popoutWindow.screenLeft,top:this._popoutWindow.screenY||this._popoutWindow.screenTop},content:this.getGlInstance().toConfig().content,parentId:this._parentId,indexInParent:this._indexInParent}},getGlInstance:function(){return this._popoutWindow.__glInstance},getWindow:function(){return this._popoutWindow},close:function(){if(this.getGlInstance())this.getGlInstance()._$closeWindow();else try{this.getWindow().close()}catch(e){}},popIn:function(){var e,t;this._indexInParent,this._parentId&&(e=o.extend(!0,{},this.getGlInstance().toConfig()).content[0],(t=this._layoutManager.root.getItemsById(this._parentId)[0])||(t=this._layoutManager.root.contentItems.length>0?this._layoutManager.root.contentItems[0]:this._layoutManager.root)),t.addChild(e,this._indexInParent),this.close()},_createWindow:function(){var e,t=this._createUrl(),n=Math.floor(1e6*Math.random()).toString(36),r=this._serializeWindowOptions({width:this._dimensions.width,height:this._dimensions.height,innerWidth:this._dimensions.width,innerHeight:this._dimensions.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=window.open(t,n,r),this._popoutWindow)o(this._popoutWindow).on("load",a.utils.fnBind(this._positionWindow,this)).on("unload beforeunload",a.utils.fnBind(this._onClose,this)),e=setInterval(a.utils.fnBind((function(){this._popoutWindow.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this._onInitialised(),clearInterval(e))}),this),10);else if(!0===this._layoutManager.config.settings.blockedPopoutsThrowError){var i=new Error("Popout blocked");throw i.type="popoutBlocked",i}},_serializeWindowOptions:function(e){var t,n=[];for(t in e)n.push(t+"="+e[t]);return n.join(",")},_createUrl:function(){var e,t={content:this._config},n="gl-window-config-"+a.utils.getUniqueId();t=(new a.utils.ConfigMinifier).minifyConfig(t);try{localStorage.setItem(n,JSON.stringify(t))}catch(e){throw new Error("Error while writing to localStorage "+e.toString())}return 1===(e=document.location.href.split("?")).length?e[0]+"?gl-window="+n:document.location.href+"&gl-window="+n},_positionWindow:function(){this._popoutWindow.moveTo(this._dimensions.left,this._dimensions.top),this._popoutWindow.focus()},_onInitialised:function(){this.isInitialised=!0,this.getGlInstance().on("popIn",this.popIn,this),this.emit("initialised")},_onClose:function(){setTimeout(a.utils.fnBind(this.emit,this,["closed"]),50)}}),a.controls.DragProxy=function(e,t,n,r,i,s){a.utils.EventEmitter.call(this),this._dragListener=n,this._layoutManager=r,this._contentItem=i,this._originalParent=s,this._area=null,this._lastValidArea=null,this._dragListener.on("drag",this._onDrag,this),this._dragListener.on("dragStop",this._onDrop,this),this.element=o(a.controls.DragProxy._template),s&&s._side&&(this._sided=s._sided,this.element.addClass("lm_"+s._side),["right","bottom"].indexOf(s._side)>=0&&this.element.find(".lm_content").after(this.element.find(".lm_header"))),this.element.css({left:e,top:t}),this.element.find(".lm_tab").attr("title",a.utils.stripTags(this._contentItem.config.title)),this.element.find(".lm_title").html(this._contentItem.config.title),this.childElementContainer=this.element.find(".lm_content"),this.childElementContainer.append(i.element),this._updateTree(),this._layoutManager._$calculateItemAreas(),this._setDimensions(),o(document.body).append(this.element);var l=this._layoutManager.container.offset();this._minX=l.left,this._minY=l.top,this._maxX=this._layoutManager.container.width()+this._minX,this._maxY=this._layoutManager.container.height()+this._minY,this._width=this.element.width(),this._height=this.element.height(),this._setDropPosition(e,t)},a.controls.DragProxy._template='<div class="lm_dragProxy"><div class="lm_header"><ul class="lm_tabs"><li class="lm_tab lm_active"><i class="lm_left"></i><span class="lm_title"></span><i class="lm_right"></i></li></ul></div><div class="lm_content"></div></div>',a.utils.copy(a.controls.DragProxy.prototype,{_onDrag:function(e,t,n){var r=(n=n.originalEvent&&n.originalEvent.touches?n.originalEvent.touches[0]:n).pageX,i=n.pageY;(r>this._minX&&r<this._maxX&&i>this._minY&&i<this._maxY||!0!==this._layoutManager.config.settings.constrainDragToContainer)&&this._setDropPosition(r,i)},_setDropPosition:function(e,t){this.element.css({left:e,top:t}),this._area=this._layoutManager._$getArea(e,t),null!==this._area&&(this._lastValidArea=this._area,this._area.contentItem._$highlightDropZone(e,t,this._area))},_onDrop:function(){this._layoutManager.dropTargetIndicator.hide(),null!==this._area?this._area.contentItem._$onDrop(this._contentItem,this._area):null!==this._lastValidArea?this._lastValidArea.contentItem._$onDrop(this._contentItem,this._lastValidArea):this._originalParent?this._originalParent.addChild(this._contentItem):this._contentItem._$destroy(),this.element.remove(),this._layoutManager.emit("itemDropped",this._contentItem)},_updateTree:function(){this._contentItem.parent&&this._contentItem.parent.removeChild(this._contentItem,!0),this._contentItem._$setParent(this)},_setDimensions:function(){var e=this._layoutManager.config.dimensions,t=e.dragProxyWidth,n=e.dragProxyHeight;this.element.width(t),this.element.height(n),t-=this._sided?e.headerHeight:0,n-=this._sided?0:e.headerHeight,this.childElementContainer.width(t),this.childElementContainer.height(n),this._contentItem.element.width(t),this._contentItem.element.height(n),this._contentItem.callDownwards("_$show"),this._contentItem.callDownwards("setSize")}}),a.controls.DragSource=function(e,t,n){this._element=e,this._itemConfig=t,this._layoutManager=n,this._dragListener=null,this._createDragListener()},a.utils.copy(a.controls.DragSource.prototype,{_createDragListener:function(){null!==this._dragListener&&this._dragListener.destroy(),this._dragListener=new a.utils.DragListener(this._element),this._dragListener.on("dragStart",this._onDragStart,this),this._dragListener.on("dragStop",this._createDragListener,this)},_onDragStart:function(e,t){var n=this._itemConfig;a.utils.isFunction(n)&&(n=n());var r=this._layoutManager._$normalizeContentItem(o.extend(!0,{},n)),i=new a.controls.DragProxy(e,t,this._dragListener,this._layoutManager,r,null);this._layoutManager.transitionIndicator.transitionElements(this._element,i.element)}}),a.controls.DropTargetIndicator=function(){this.element=o(a.controls.DropTargetIndicator._template),o(document.body).append(this.element)},a.controls.DropTargetIndicator._template='<div class="lm_dropTargetIndicator"><div class="lm_inner"></div></div>',a.utils.copy(a.controls.DropTargetIndicator.prototype,{destroy:function(){this.element.remove()},highlight:function(e,t,n,r){this.highlightArea({x1:e,y1:t,x2:n,y2:r})},highlightArea:function(e){this.element.css({left:e.x1,top:e.y1,width:e.x2-e.x1,height:e.y2-e.y1}).show()},hide:function(){this.element.hide()}}),a.controls.Header=function(e,t){a.utils.EventEmitter.call(this),this.layoutManager=e,this.element=o(a.controls.Header._template),!0===this.layoutManager.config.settings.selectionEnabled&&(this.element.addClass("lm_selectable"),this.element.on("click touchstart",a.utils.fnBind(this._onHeaderClick,this))),this.tabsContainer=this.element.find(".lm_tabs"),this.tabDropdownContainer=this.element.find(".lm_tabdropdown_list"),this.tabDropdownContainer.hide(),this.controlsContainer=this.element.find(".lm_controls"),this.parent=t,this.parent.on("resize",this._updateTabSizes,this),this.tabs=[],this.activeContentItem=null,this.closeButton=null,this.tabDropdownButton=null,this.hideAdditionalTabsDropdown=a.utils.fnBind(this._hideAdditionalTabsDropdown,this),o(document).mouseup(this.hideAdditionalTabsDropdown),this._lastVisibleTabIndex=-1,this._tabControlOffset=this.layoutManager.config.settings.tabControlOffset,this._createControls()},a.controls.Header._template=['<div class="lm_header">','<ul class="lm_tabs"></ul>','<ul class="lm_controls"></ul>','<ul class="lm_tabdropdown_list"></ul>',"</div>"].join(""),a.utils.copy(a.controls.Header.prototype,{createTab:function(e,t){var n,r;for(r=0;r<this.tabs.length;r++)if(this.tabs[r].contentItem===e)return;if(n=new a.controls.Tab(this,e),0===this.tabs.length)return this.tabs.push(n),void this.tabsContainer.append(n.element);void 0===t&&(t=this.tabs.length),t>0?this.tabs[t-1].element.after(n.element):this.tabs[0].element.before(n.element),this.tabs.splice(t,0,n),this._updateTabSizes()},removeTab:function(e){for(var t=0;t<this.tabs.length;t++)if(this.tabs[t].contentItem===e)return this.tabs[t]._$destroy(),void this.tabs.splice(t,1);throw new Error("contentItem is not controlled by this header")},setActiveContentItem:function(e){var t,n,r,i;for(t=0;t<this.tabs.length;t++)r=this.tabs[t].contentItem===e,this.tabs[t].setActive(r),!0===r&&(this.activeContentItem=e,this.parent.config.activeItemIndex=t);if(this.layoutManager.config.settings.reorderOnTabMenuClick&&-1!==this._lastVisibleTabIndex&&this.parent.config.activeItemIndex>this._lastVisibleTabIndex){for(i=this.tabs[this.parent.config.activeItemIndex],n=this.parent.config.activeItemIndex;n>0;n--)this.tabs[n]=this.tabs[n-1];this.tabs[0]=i,this.parent.config.activeItemIndex=0}this._updateTabSizes(),this.parent.emitBubblingEvent("stateChanged")},position:function(e){var t=this.parent._header.show;return t&&!this.parent._side&&(t="top"),void 0!==e&&this.parent._header.show!=e&&(this.parent._header.show=e,this.parent._setupHeaderPosition()),t},_$setClosable:function(e){return!(!this.closeButton||!this._isClosable()||(this.closeButton.element[e?"show":"hide"](),0))},_$destroy:function(){this.emit("destroy",this);for(var e=0;e<this.tabs.length;e++)this.tabs[e]._$destroy();o(document).off("mouseup",this.hideAdditionalTabsDropdown),this.element.remove()},_getHeaderSetting:function(e){if(e in this.parent._header)return this.parent._header[e]},_createControls:function(){var e,t,n,r,i,o,s,l,u;u=a.utils.fnBind(this._showAdditionalTabsDropdown,this),l=this.layoutManager.config.labels.tabDropdown,this.tabDropdownButton=new a.controls.HeaderButton(this,l,"lm_tabdropdown",u),this.tabDropdownButton.element.hide(),this._getHeaderSetting("popout")&&(t=a.utils.fnBind(this._onPopoutClick,this),n=this._getHeaderSetting("popout"),new a.controls.HeaderButton(this,n,"lm_popout",t)),this._getHeaderSetting("maximise")&&(o=a.utils.fnBind(this.parent.toggleMaximise,this.parent),r=this._getHeaderSetting("maximise"),i=this._getHeaderSetting("minimise"),s=new a.controls.HeaderButton(this,r,"lm_maximise",o),this.parent.on("maximised",(function(){s.element.attr("title",i)})),this.parent.on("minimised",(function(){s.element.attr("title",r)}))),this._isClosable()&&(e=a.utils.fnBind(this.parent.remove,this.parent),n=this._getHeaderSetting("close"),this.closeButton=new a.controls.HeaderButton(this,n,"lm_close",e))},_showAdditionalTabsDropdown:function(){this.tabDropdownContainer.show()},_hideAdditionalTabsDropdown:function(e){this.tabDropdownContainer.hide()},_isClosable:function(){return this.parent.config.isClosable&&this.layoutManager.config.settings.showCloseIcon},_onPopoutClick:function(){!0===this.layoutManager.config.settings.popoutWholeStack?this.parent.popout():this.activeContentItem.popout()},_onHeaderClick:function(e){e.target===this.element[0]&&this.parent.select()},_updateTabSizes:function(e){if(0!==this.tabs.length){this.tabDropdownButton.element.toggle(!0===e);var t=function(e){return e?"width":"height"};this.element.css(t(!this.parent._sided),""),this.element[t(this.parent._sided)](this.layoutManager.config.dimensions.headerHeight);var n,r,i,o,a=this.element.outerWidth()-this.controlsContainer.outerWidth()-this._tabControlOffset,s=0,l=0,u=0,c=this.layoutManager.config.settings.tabOverlapAllowance,d=!1,h=this.activeContentItem?this.tabs.indexOf(this.activeContentItem.tab):0,f=this.tabs[h];for(this.parent._sided&&(a=this.element.outerHeight()-this.controlsContainer.outerHeight()-this._tabControlOffset),this._lastVisibleTabIndex=-1,r=0;r<this.tabs.length;r++)if(n=this.tabs[r].element,this.tabsContainer.append(n),s+=n.outerWidth()+parseInt(n.css("margin-right"),10),(l=h<=r?s:s+f.element.outerWidth()+parseInt(f.element.css("margin-right"),10))>a){if(d)r===h&&(n.css({"z-index":"auto","margin-left":""}),this.tabsContainer.append(n));else if((u=h>0&&h<=r?(l-a)/(r-1):(l-a)/r)<c){for(i=0;i<=r;i++)o=i!==h&&0!==i?"-"+u+"px":"",this.tabs[i].element.css({"z-index":r-i,"margin-left":o});this._lastVisibleTabIndex=r,this.tabsContainer.append(n)}else d=!0;if(d&&r!==h){if(!e)return void this._updateTabSizes(!0);n.css({"z-index":"auto","margin-left":""}),this.tabDropdownContainer.append(n)}}else this._lastVisibleTabIndex=r,n.css({"z-index":"auto","margin-left":""}),this.tabsContainer.append(n)}}}),a.controls.HeaderButton=function(e,t,n,r){this._header=e,this.element=o('<li class="'+n+'" title="'+t+'"></li>'),this._header.on("destroy",this._$destroy,this),this._action=r,this.element.on("click touchstart",this._action),this._header.controlsContainer.append(this.element)},a.utils.copy(a.controls.HeaderButton.prototype,{_$destroy:function(){this.element.off(),this.element.remove()}}),a.controls.Splitter=function(e,t,n){this._isVertical=e,this._size=t,this._grabSize=n<t?t:n,this.element=this._createElement(),this._dragListener=new a.utils.DragListener(this.element)},a.utils.copy(a.controls.Splitter.prototype,{on:function(e,t,n){this._dragListener.on(e,t,n)},_$destroy:function(){this.element.remove()},_createElement:function(){var e=o('<div class="lm_drag_handle"></div>'),t=o('<div class="lm_splitter"></div>');t.append(e);var n=this._grabSize-this._size,r=n/2;return this._isVertical?(e.css("top",-r),e.css("height",this._size+n),t.addClass("lm_vertical"),t.height(this._size)):(e.css("left",-r),e.css("width",this._size+n),t.addClass("lm_horizontal"),t.width(this._size)),t}}),a.controls.Tab=function(e,t){this.header=e,this.contentItem=t,this.element=o(a.controls.Tab._template),this.titleElement=this.element.find(".lm_title"),this.closeElement=this.element.find(".lm_close_tab"),this.closeElement[t.config.isClosable?"show":"hide"](),this.isActive=!1,this.setTitle(t.config.title),this.contentItem.on("titleChanged",this.setTitle,this),this._layoutManager=this.contentItem.layoutManager,!0===this._layoutManager.config.settings.reorderEnabled&&!0===t.config.reorderEnabled&&(this._dragListener=new a.utils.DragListener(this.element),this._dragListener.on("dragStart",this._onDragStart,this),this.contentItem.on("destroy",this._dragListener.destroy,this._dragListener)),this._onTabClickFn=a.utils.fnBind(this._onTabClick,this),this._onCloseClickFn=a.utils.fnBind(this._onCloseClick,this),this.element.on("mousedown touchstart",this._onTabClickFn),this.contentItem.config.isClosable?(this.closeElement.on("click touchstart",this._onCloseClickFn),this.closeElement.on("mousedown",this._onCloseMousedown)):this.closeElement.remove(),this.contentItem.tab=this,this.contentItem.emit("tab",this),this.contentItem.layoutManager.emit("tabCreated",this),this.contentItem.isComponent&&(this.contentItem.container.tab=this,this.contentItem.container.emit("tab",this))},a.controls.Tab._template='<li class="lm_tab"><i class="lm_left"></i><span class="lm_title"></span><div class="lm_close_tab"></div><i class="lm_right"></i></li>',a.utils.copy(a.controls.Tab.prototype,{setTitle:function(e){this.element.attr("title",a.utils.stripTags(e)),this.titleElement.html(e)},setActive:function(e){e!==this.isActive&&(this.isActive=e,e?this.element.addClass("lm_active"):this.element.removeClass("lm_active"))},_$destroy:function(){this.element.off("mousedown touchstart",this._onTabClickFn),this.closeElement.off("click touchstart",this._onCloseClickFn),this._dragListener&&(this.contentItem.off("destroy",this._dragListener.destroy,this._dragListener),this._dragListener.off("dragStart",this._onDragStart),this._dragListener=null),this.element.remove()},_onDragStart:function(e,t){!0===this.contentItem.parent.isMaximised&&this.contentItem.parent.toggleMaximise(),new a.controls.DragProxy(e,t,this._dragListener,this._layoutManager,this.contentItem,this.header.parent)},_onTabClick:function(e){if(0===e.button||"touchstart"===e.type){var t=this.header.parent.getActiveContentItem();this.contentItem!==t&&this.header.parent.setActiveContentItem(this.contentItem)}else 1===e.button&&this.contentItem.config.isClosable&&this._onCloseClick(e)},_onCloseClick:function(e){e.stopPropagation(),this.header.parent.removeChild(this.contentItem)},_onCloseMousedown:function(e){e.stopPropagation()}}),a.controls.TransitionIndicator=function(){this._element=o('<div class="lm_transition_indicator"></div>'),o(document.body).append(this._element),this._toElement=null,this._fromDimensions=null,this._totalAnimationDuration=200,this._animationStartTime=null},a.utils.copy(a.controls.TransitionIndicator.prototype,{destroy:function(){this._element.remove()},transitionElements:function(e,t){},_nextAnimationFrame:function(){var e,t=this._measure(this._toElement),n=(a.utils.now()-this._animationStartTime)/this._totalAnimationDuration,r={};if(n>=1)this._element.hide();else{for(e in t.opacity=0,this._fromDimensions)r[e]=this._fromDimensions[e]+(t[e]-this._fromDimensions[e])*n;this._element.css(r),a.utils.animFrame(a.utils.fnBind(this._nextAnimationFrame,this))}},_measure:function(e){var t=e.offset();return{left:t.left,top:t.top,width:e.outerWidth(),height:e.outerHeight()}}}),a.errors.ConfigurationError=function(e,t){Error.call(this),this.name="Configuration Error",this.message=e,this.node=t},a.errors.ConfigurationError.prototype=new Error,a.items.AbstractContentItem=function(e,t,n){a.utils.EventEmitter.call(this),this.config=this._extendItemNode(t),this.type=t.type,this.contentItems=[],this.parent=n,this.isInitialised=!1,this.isMaximised=!1,this.isRoot=!1,this.isRow=!1,this.isColumn=!1,this.isStack=!1,this.isComponent=!1,this.layoutManager=e,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this.on(a.utils.EventEmitter.ALL_EVENT,this._propagateEvent,this),t.content&&this._createContentItems(t)},a.utils.copy(a.items.AbstractContentItem.prototype,{setSize:function(){throw new Error("Abstract Method")},callDownwards:function(e,t,n,r){var i;for(!0!==n&&!0!==r&&this[e].apply(this,t||[]),i=0;i<this.contentItems.length;i++)this.contentItems[i].callDownwards(e,t,n);!0===n&&!0!==r&&this[e].apply(this,t||[])},removeChild:function(e,t){var n=a.utils.indexOf(e,this.contentItems);if(-1===n)throw new Error("Can't remove child item. Unknown content item");!0!==t&&this.contentItems[n]._$destroy(),this.contentItems.splice(n,1),this.config.content.splice(n,1),this.contentItems.length>0?this.callDownwards("setSize"):this instanceof a.items.Root||!0!==this.config.isClosable||this.parent.removeChild(this)},addChild:function(e,t){void 0===t&&(t=this.contentItems.length),this.contentItems.splice(t,0,e),void 0===this.config.content&&(this.config.content=[]),this.config.content.splice(t,0,e.config),e.parent=this,!0===e.parent.isInitialised&&!1===e.isInitialised&&e._$init()},replaceChild:function(e,t,n){t=this.layoutManager._$normalizeContentItem(t);var r=a.utils.indexOf(e,this.contentItems),i=e.element[0].parentNode;if(-1===r)throw new Error("Can't replace child. oldChild is not child of this");i.replaceChild(t.element[0],e.element[0]),!0===n&&(e.parent=null,e._$destroy()),this.contentItems[r]=t,t.parent=this,this.isStack&&(this.header.tabs[r].contentItem=t),!0===t.parent.isInitialised&&!1===t.isInitialised&&t._$init(),this.callDownwards("setSize")},remove:function(){this.parent.removeChild(this)},popout:function(){var e=this.layoutManager.createPopout(this);return this.emitBubblingEvent("stateChanged"),e},toggleMaximise:function(e){e&&e.preventDefault(),!0===this.isMaximised?this.layoutManager._$minimiseItem(this):this.layoutManager._$maximiseItem(this),this.isMaximised=!this.isMaximised,this.emitBubblingEvent("stateChanged")},select:function(){this.layoutManager.selectedItem!==this&&(this.layoutManager.selectItem(this,!0),this.element.addClass("lm_selected"))},deselect:function(){this.layoutManager.selectedItem===this&&(this.layoutManager.selectedItem=null,this.element.removeClass("lm_selected"))},setTitle:function(e){this.config.title=e,this.emit("titleChanged",e),this.emit("stateChanged")},hasId:function(e){return!!this.config.id&&("string"==typeof this.config.id?this.config.id===e:this.config.id instanceof Array?-1!==a.utils.indexOf(e,this.config.id):void 0)},addId:function(e){this.hasId(e)||(this.config.id?"string"==typeof this.config.id?this.config.id=[this.config.id,e]:this.config.id instanceof Array&&this.config.id.push(e):this.config.id=e)},removeId:function(e){if(!this.hasId(e))throw new Error("Id not found");if("string"==typeof this.config.id)delete this.config.id;else if(this.config.id instanceof Array){var t=a.utils.indexOf(e,this.config.id);this.config.id.splice(t,1)}},getItemsByFilter:function(e){var t=[],n=function(r){for(var i=0;i<r.contentItems.length;i++)!0===e(r.contentItems[i])&&t.push(r.contentItems[i]),n(r.contentItems[i])};return n(this),t},getItemsById:function(e){return this.getItemsByFilter((function(t){return t.config.id instanceof Array?-1!==a.utils.indexOf(e,t.config.id):t.config.id===e}))},getItemsByType:function(e){return this._$getItemsByProperty("type",e)},getComponentsByName:function(e){var t,n=this._$getItemsByProperty("componentName",e),r=[];for(t=0;t<n.length;t++)r.push(n[t].instance);return r},_$getItemsByProperty:function(e,t){return this.getItemsByFilter((function(n){return n[e]===t}))},_$setParent:function(e){this.parent=e},_$highlightDropZone:function(e,t,n){this.layoutManager.dropTargetIndicator.highlightArea(n)},_$onDrop:function(e){this.addChild(e)},_$hide:function(){this._callOnActiveComponents("hide"),this.element.hide(),this.layoutManager.updateSize()},_$show:function(){this._callOnActiveComponents("show"),this.element.show(),this.layoutManager.updateSize()},_callOnActiveComponents:function(e){var t,n,r=this.getItemsByType("stack");for(n=0;n<r.length;n++)(t=r[n].getActiveContentItem())&&t.isComponent&&t.container[e]()},_$destroy:function(){this.emitBubblingEvent("beforeItemDestroyed"),this.callDownwards("_$destroy",[],!0,!0),this.element.remove(),this.emitBubblingEvent("itemDestroyed")},_$getArea:function(e){var t=(e=e||this.element).offset(),n=e.width(),r=e.height();return{x1:t.left,y1:t.top,x2:t.left+n,y2:t.top+r,surface:n*r,contentItem:this}},_$init:function(){var e;for(this.setSize(),e=0;e<this.contentItems.length;e++)this.childElementContainer.append(this.contentItems[e].element);this.isInitialised=!0,this.emitBubblingEvent("itemCreated"),this.emitBubblingEvent(this.type+"Created")},emitBubblingEvent:function(e){var t=new a.utils.BubblingEvent(e,this);this.emit(e,t)},_createContentItems:function(e){var t,n;if(!(e.content instanceof Array))throw new a.errors.ConfigurationError("content must be an Array",e);for(n=0;n<e.content.length;n++)t=this.layoutManager.createContentItem(e.content[n],this),this.contentItems.push(t)},_extendItemNode:function(e){for(var t in a.config.itemDefaultConfig)void 0===e[t]&&(e[t]=a.config.itemDefaultConfig[t]);return e},_propagateEvent:function(e,t){t instanceof a.utils.BubblingEvent&&!1===t.isPropagationStopped&&!0===this.isInitialised&&(!1===this.isRoot&&this.parent?this.parent.emit.apply(this.parent,Array.prototype.slice.call(arguments,0)):this._scheduleEventPropagationToLayoutManager(e,t))},_scheduleEventPropagationToLayoutManager:function(e,t){-1===a.utils.indexOf(e,this._throttledEvents)?this.layoutManager.emit(e,t.origin):!0!==this._pendingEventPropagations[e]&&(this._pendingEventPropagations[e]=!0,a.utils.animFrame(a.utils.fnBind(this._propagateEventToLayoutManager,this,[e,t])))},_propagateEventToLayoutManager:function(e,t){this._pendingEventPropagations[e]=!1,this.layoutManager.emit(e,t)}}),a.items.Component=function(e,t,n){a.items.AbstractContentItem.call(this,e,t,n);var r=e.getComponent(this.config.componentName),i=o.extend(!0,{},this.config.componentState||{});i.componentName=this.config.componentName,this.componentName=this.config.componentName,""===this.config.title&&(this.config.title=this.config.componentName),this.isComponent=!0,this.container=new a.container.ItemContainer(this.config,this,e),this.instance=new r(this.container,i),this.element=this.container._element},a.utils.extend(a.items.Component,a.items.AbstractContentItem),a.utils.copy(a.items.Component.prototype,{close:function(){this.parent.removeChild(this)},setSize:function(){this.element.is(":visible")&&this.container._$setSize(this.element.width(),this.element.height())},_$init:function(){a.items.AbstractContentItem.prototype._$init.call(this),this.container.emit("open")},_$hide:function(){this.container.hide(),a.items.AbstractContentItem.prototype._$hide.call(this)},_$show:function(){this.container.show(),a.items.AbstractContentItem.prototype._$show.call(this)},_$shown:function(){this.container.shown(),a.items.AbstractContentItem.prototype._$shown.call(this)},_$destroy:function(){this.container.emit("destroy",this),a.items.AbstractContentItem.prototype._$destroy.call(this)},_$getArea:function(){return null}}),a.items.Root=function(e,t,n){a.items.AbstractContentItem.call(this,e,t,null),this.isRoot=!0,this.type="root",this.element=o('<div class="lm_goldenlayout lm_item lm_root"></div>'),this.childElementContainer=this.element,this._containerElement=n,this._containerElement.append(this.element)},a.utils.extend(a.items.Root,a.items.AbstractContentItem),a.utils.copy(a.items.Root.prototype,{addChild:function(e){if(this.contentItems.length>0)throw new Error("Root node can only have a single child");e=this.layoutManager._$normalizeContentItem(e,this),this.childElementContainer.append(e.element),a.items.AbstractContentItem.prototype.addChild.call(this,e),this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged")},setSize:function(e,t){e=void 0===e?this._containerElement.width():e,t=void 0===t?this._containerElement.height():t,this.element.width(e),this.element.height(t),this.contentItems[0]&&(this.contentItems[0].element.width(e),this.contentItems[0].element.height(t))},_$highlightDropZone:function(e,t,n){this.layoutManager.tabDropPlaceholder.remove(),a.items.AbstractContentItem.prototype._$highlightDropZone.apply(this,arguments)},_$onDrop:function(e,t){var n;if(e.isComponent&&((n=this.layoutManager.createContentItem({type:"stack",header:e.config.header||{}},this))._$init(),n.addChild(e),e=n),this.contentItems.length){var r="x"==t.side[0]?"row":"column",i="x"==t.side[0]?"width":"height",o="2"==t.side[1],s=this.contentItems[0];if(!s instanceof a.items.RowOrColumn||s.type!=r){var l=this.layoutManager.createContentItem({type:r},this);this.replaceChild(s,l),l.addChild(e,o?0:void 0,!0),l.addChild(s,o?void 0:0,!0),s.config[i]=50,e.config[i]=50,l.callDownwards("setSize")}else{var u=s.contentItems[o?0:s.contentItems.length-1];s.addChild(e,o?0:void 0,!0),u.config[i]*=.5,e.config[i]=u.config[i],s.callDownwards("setSize")}}else this.addChild(e)}}),a.items.RowOrColumn=function(e,t,n,r){a.items.AbstractContentItem.call(this,t,n,r),this.isRow=!e,this.isColumn=e,this.element=o('<div class="lm_item lm_'+(e?"column":"row")+'"></div>'),this.childElementContainer=this.element,this._splitterSize=t.config.dimensions.borderWidth,this._splitterGrabSize=t.config.dimensions.borderGrabWidth,this._isColumn=e,this._dimension=e?"height":"width",this._splitter=[],this._splitterPosition=null,this._splitterMinPosition=null,this._splitterMaxPosition=null},a.utils.extend(a.items.RowOrColumn,a.items.AbstractContentItem),a.utils.copy(a.items.RowOrColumn.prototype,{addChild:function(e,t,n){var r,i,o,s;if(e=this.layoutManager._$normalizeContentItem(e,this),void 0===t&&(t=this.contentItems.length),this.contentItems.length>0?(s=this._createSplitter(Math.max(0,t-1)).element,t>0?(this.contentItems[t-1].element.after(s),s.after(e.element)):(this.contentItems[0].element.before(s),s.before(e.element))):this.childElementContainer.append(e.element),a.items.AbstractContentItem.prototype.addChild.call(this,e,t),r=1/this.contentItems.length*100,!0!==n){for(o=0;o<this.contentItems.length;o++)this.contentItems[o]===e?e.config[this._dimension]=r:(i=this.contentItems[o].config[this._dimension]*=(100-r)/100,this.contentItems[o].config[this._dimension]=i);this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged")}else this.emitBubblingEvent("stateChanged")},removeChild:function(e,t){var n,r,i=e.config[this._dimension],o=a.utils.indexOf(e,this.contentItems),s=Math.max(o-1,0);if(-1===o)throw new Error("Can't remove child. ContentItem is not child of this Row or Column");for(this._splitter[s]&&(this._splitter[s]._$destroy(),this._splitter.splice(s,1)),n=0;n<this.contentItems.length;n++)this.contentItems[n]!==e&&(this.contentItems[n].config[this._dimension]+=i/(this.contentItems.length-1));a.items.AbstractContentItem.prototype.removeChild.call(this,e,t),1===this.contentItems.length&&!0===this.config.isClosable?(r=this.contentItems[0],this.contentItems=[],this.parent.replaceChild(this,r,!0)):(this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged"))},replaceChild:function(e,t){var n=e.config[this._dimension];a.items.AbstractContentItem.prototype.replaceChild.call(this,e,t),t.config[this._dimension]=n,this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged")},setSize:function(){this.contentItems.length>0&&(this._calculateRelativeSizes(),this._setAbsoluteSizes()),this.emitBubblingEvent("stateChanged"),this.emit("resize")},_$init:function(){var e;if(!0!==this.isInitialised)for(a.items.AbstractContentItem.prototype._$init.call(this),e=0;e<this.contentItems.length-1;e++)this.contentItems[e].element.after(this._createSplitter(e).element)},_setAbsoluteSizes:function(){var e,t=this._calculateAbsoluteSizes();for(e=0;e<this.contentItems.length;e++)t.additionalPixel-e>0&&t.itemSizes[e]++,this._isColumn?(this.contentItems[e].element.width(t.totalWidth),this.contentItems[e].element.height(t.itemSizes[e])):(this.contentItems[e].element.width(t.itemSizes[e]),this.contentItems[e].element.height(t.totalHeight))},_calculateAbsoluteSizes:function(){var e,t,n=(this.contentItems.length-1)*this._splitterSize,r=this.element.width(),i=this.element.height(),o=0,a=[];for(this._isColumn?i-=n:r-=n,e=0;e<this.contentItems.length;e++)o+=t=this._isColumn?Math.floor(i*(this.contentItems[e].config.height/100)):Math.floor(r*(this.contentItems[e].config.width/100)),a.push(t);return{itemSizes:a,additionalPixel:Math.floor((this._isColumn?i:r)-o),totalWidth:r,totalHeight:i}},_calculateRelativeSizes:function(){var e,t=0,n=[],r=this._isColumn?"height":"width";for(e=0;e<this.contentItems.length;e++)void 0!==this.contentItems[e].config[r]?t+=this.contentItems[e].config[r]:n.push(this.contentItems[e]);if(100!==Math.round(t))if(Math.round(t)<100&&n.length>0){for(e=0;e<n.length;e++)n[e].config[r]=(100-t)/n.length;this._respectMinItemWidth()}else{if(Math.round(t)>100)for(e=0;e<n.length;e++)n[e].config[r]=50,t+=50;for(e=0;e<this.contentItems.length;e++)this.contentItems[e].config[r]=this.contentItems[e].config[r]/t*100;this._respectMinItemWidth()}else this._respectMinItemWidth()},_respectMinItemWidth:function(){var e,t,n,r,i=this.layoutManager.config.dimensions&&this.layoutManager.config.dimensions.minItemWidth||0,o=[],a=0,s=0,l=0,u=0,c=[];if(!(this._isColumn||!i||this.contentItems.length<=1)){e=this._calculateAbsoluteSizes();for(var d=0;d<this.contentItems.length;d++)this.contentItems[d],(u=e.itemSizes[d])<i?(s+=i-u,r={width:i}):(a+=u-i,r={width:u},o.push(r)),c.push(r);if(!(0===s||s>a)){for(t=s/a,l=s,d=0;d<o.length;d++)r=o[d],l-=n=Math.round((r.width-i)*t),r.width-=n;for(0!==l&&(c[c.length-1].width-=l),d=0;d<this.contentItems.length;d++)this.contentItems[d].config.width=c[d].width/e.totalWidth*100}}},_createSplitter:function(e){var t;return(t=new a.controls.Splitter(this._isColumn,this._splitterSize,this._splitterGrabSize)).on("drag",a.utils.fnBind(this._onSplitterDrag,this,[t]),this),t.on("dragStop",a.utils.fnBind(this._onSplitterDragStop,this,[t]),this),t.on("dragStart",a.utils.fnBind(this._onSplitterDragStart,this,[t]),this),this._splitter.splice(e,0,t),t},_getItemsForSplitter:function(e){var t=a.utils.indexOf(e,this._splitter);return{before:this.contentItems[t],after:this.contentItems[t+1]}},_getMinimumDimensions:function(e){for(var t=0,n=0,r=0;r<e.length;++r)t=Math.max(e[r].minWidth||0,t),n=Math.max(e[r].minHeight||0,n);return{horizontal:t,vertical:n}},_onSplitterDragStart:function(e){var t=this._getItemsForSplitter(e),n=this.layoutManager.config.dimensions[this._isColumn?"minItemHeight":"minItemWidth"],r=this._getMinimumDimensions(t.before.config.content),i=this._isColumn?r.vertical:r.horizontal,o=this._getMinimumDimensions(t.after.config.content),a=this._isColumn?o.vertical:o.horizontal;this._splitterPosition=0,this._splitterMinPosition=-1*(t.before.element[this._dimension]()-(i||n)),this._splitterMaxPosition=t.after.element[this._dimension]()-(a||n)},_onSplitterDrag:function(e,t,n){var r=this._isColumn?n:t;r>this._splitterMinPosition&&r<this._splitterMaxPosition&&(this._splitterPosition=r,e.element.css(this._isColumn?"top":"left",r))},_onSplitterDragStop:function(e){var t=this._getItemsForSplitter(e),n=t.before.element[this._dimension](),r=t.after.element[this._dimension](),i=(this._splitterPosition+n)/(n+r),o=t.before.config[this._dimension]+t.after.config[this._dimension];t.before.config[this._dimension]=i*o,t.after.config[this._dimension]=(1-i)*o,e.element.css({top:0,left:0}),a.utils.animFrame(a.utils.fnBind(this.callDownwards,this,["setSize"]))}}),a.items.Stack=function(e,t,n){a.items.AbstractContentItem.call(this,e,t,n),this.element=o('<div class="lm_item lm_stack"></div>'),this._activeContentItem=null;var r=e.config;this._header={show:!0===r.settings.hasHeaders&&!1!==t.hasHeaders,popout:r.settings.showPopoutIcon&&r.labels.popout,maximise:r.settings.showMaximiseIcon&&r.labels.maximise,close:r.settings.showCloseIcon&&r.labels.close,minimise:r.labels.minimise},r.header&&a.utils.copy(this._header,r.header),t.header&&a.utils.copy(this._header,t.header),t.content&&t.content[0]&&t.content[0].header&&a.utils.copy(this._header,t.content[0].header),this._dropZones={},this._dropSegment=null,this._contentAreaDimensions=null,this._dropIndex=null,this.isStack=!0,this.childElementContainer=o('<div class="lm_items"></div>'),this.header=new a.controls.Header(e,this),this.element.append(this.header.element),this.element.append(this.childElementContainer),this._setupHeaderPosition(),this._$validateClosability()},a.utils.extend(a.items.Stack,a.items.AbstractContentItem),a.utils.copy(a.items.Stack.prototype,{setSize:function(){var e,t=this._header.show?this.layoutManager.config.dimensions.headerHeight:0,n=this.element.width()-(this._sided?t:0),r=this.element.height()-(this._sided?0:t);for(this.childElementContainer.width(n),this.childElementContainer.height(r),e=0;e<this.contentItems.length;e++)this.contentItems[e].element.width(n).height(r);this.emit("resize"),this.emitBubblingEvent("stateChanged")},_$init:function(){var e,t;if(!0!==this.isInitialised){for(a.items.AbstractContentItem.prototype._$init.call(this),e=0;e<this.contentItems.length;e++)this.header.createTab(this.contentItems[e]),this.contentItems[e]._$hide();if(this.contentItems.length>0){if(!(t=this.contentItems[this.config.activeItemIndex||0]))throw new Error("Configured activeItemIndex out of bounds");this.setActiveContentItem(t)}}},setActiveContentItem:function(e){if(-1===a.utils.indexOf(e,this.contentItems))throw new Error("contentItem is not a child of this stack");null!==this._activeContentItem&&this._activeContentItem._$hide(),this._activeContentItem=e,this.header.setActiveContentItem(e),e._$show(),this.emit("activeContentItemChanged",e),this.layoutManager.emit("activeContentItemChanged",e),this.emitBubblingEvent("stateChanged")},getActiveContentItem:function(){return this.header.activeContentItem},addChild:function(e,t){e=this.layoutManager._$normalizeContentItem(e,this),a.items.AbstractContentItem.prototype.addChild.call(this,e,t),this.childElementContainer.append(e.element),this.header.createTab(e,t),this.setActiveContentItem(e),this.callDownwards("setSize"),this._$validateClosability(),this.emitBubblingEvent("stateChanged")},removeChild:function(e,t){var n=a.utils.indexOf(e,this.contentItems);a.items.AbstractContentItem.prototype.removeChild.call(this,e,t),this.header.removeTab(e),this.header.activeContentItem===e&&(this.contentItems.length>0?this.setActiveContentItem(this.contentItems[Math.max(n-1,0)]):this._activeContentItem=null),this._$validateClosability(),this.emitBubblingEvent("stateChanged")},_$validateClosability:function(){var e,t,n;for(e=this.header._isClosable(),n=0,t=this.contentItems.length;n<t&&e;n++)e=this.contentItems[n].config.isClosable;this.header._$setClosable(e)},_$destroy:function(){a.items.AbstractContentItem.prototype._$destroy.call(this),this.header._$destroy()},_$onDrop:function(e){if("header"===this._dropSegment)return this._resetHeaderDropZone(),void this.addChild(e,this._dropIndex);if("body"!==this._dropSegment){var t,n,r,i="top"===this._dropSegment||"bottom"===this._dropSegment,o="left"===this._dropSegment||"right"===this._dropSegment,s="top"===this._dropSegment||"left"===this._dropSegment,l=i&&this.parent.isColumn||o&&this.parent.isRow,u=i?"column":"row",c=i?"height":"width";e.isComponent&&((n=this.layoutManager.createContentItem({type:"stack",header:e.config.header||{}},this))._$init(),n.addChild(e),e=n),l?(t=a.utils.indexOf(this,this.parent.contentItems),this.parent.addChild(e,s?t:t+1,!0),this.config[c]*=.5,e.config[c]=this.config[c],this.parent.callDownwards("setSize")):(u=i?"column":"row",r=this.layoutManager.createContentItem({type:u},this),this.parent.replaceChild(this,r),r.addChild(e,s?0:void 0,!0),r.addChild(this,s?void 0:0,!0),this.config[c]=50,e.config[c]=50,r.callDownwards("setSize"))}else this.addChild(e)},_$highlightDropZone:function(e,t){var n,r;for(n in this._contentAreaDimensions)if((r=this._contentAreaDimensions[n].hoverArea).x1<e&&r.x2>e&&r.y1<t&&r.y2>t)return void("header"===n?(this._dropSegment="header",this._highlightHeaderDropZone(this._sided?t:e)):(this._resetHeaderDropZone(),this._highlightBodyDropZone(n)))},_$getArea:function(){if(!1===this.element.is(":visible"))return null;var e=a.items.AbstractContentItem.prototype._$getArea,t=e.call(this,this.header.element),n=e.call(this,this.childElementContainer),r=n.x2-n.x1,i=n.y2-n.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}}},this._activeContentItem&&!1===this._activeContentItem.isComponent?t:0===this.contentItems.length?(this._contentAreaDimensions.body={hoverArea:{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2},highlightArea:{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2}},e.call(this,this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:n.x1,y1:n.y1,x2:n.x1+.25*r,y2:n.y2},highlightArea:{x1:n.x1,y1:n.y1,x2:n.x1+.5*r,y2:n.y2}},this._contentAreaDimensions.top={hoverArea:{x1:n.x1+.25*r,y1:n.y1,x2:n.x1+.75*r,y2:n.y1+.5*i},highlightArea:{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y1+.5*i}},this._contentAreaDimensions.right={hoverArea:{x1:n.x1+.75*r,y1:n.y1,x2:n.x2,y2:n.y2},highlightArea:{x1:n.x1+.5*r,y1:n.y1,x2:n.x2,y2:n.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:n.x1+.25*r,y1:n.y1+.5*i,x2:n.x1+.75*r,y2:n.y2},highlightArea:{x1:n.x1,y1:n.y1+.5*i,x2:n.x2,y2:n.y2}},e.call(this,this.element))},_highlightHeaderDropZone:function(e){var t,n,r,i,o,a,s,l,u=this.header.tabs.length,c=!1;if(0===u)return s=this.header.element.offset(),void this.layoutManager.dropTargetIndicator.highlightArea({x1:s.left,x2:s.left+100,y1:s.top+this.header.element.height()-20,y2:s.top+this.header.element.height()});for(t=0;t<u;t++)if(o=(n=this.header.tabs[t].element).offset(),this._sided?(i=o.top,r=o.left,l=n.height()):(i=o.left,r=o.top,l=n.width()),e>i&&e<i+l){c=!0;break}if(!(!1===c&&e<i)){if(e<i+l/2?(this._dropIndex=t,n.before(this.layoutManager.tabDropPlaceholder)):(this._dropIndex=Math.min(t+1,u),n.after(this.layoutManager.tabDropPlaceholder)),this._sided)return placeHolderTop=this.layoutManager.tabDropPlaceholder.offset().top,void this.layoutManager.dropTargetIndicator.highlightArea({x1:r,x2:r+n.innerHeight(),y1:placeHolderTop,y2:placeHolderTop+this.layoutManager.tabDropPlaceholder.width()});a=this.layoutManager.tabDropPlaceholder.offset().left,this.layoutManager.dropTargetIndicator.highlightArea({x1:a,x2:a+this.layoutManager.tabDropPlaceholder.width(),y1:r,y2:r+n.innerHeight()})}},_resetHeaderDropZone:function(){this.layoutManager.tabDropPlaceholder.remove()},_setupHeaderPosition:function(){var e=["right","left","bottom"].indexOf(this._header.show)>=0&&this._header.show;if(this.header.element.toggle(!!this._header.show),this._side=e,this._sided=["right","left"].indexOf(this._side)>=0,this.element.removeClass("lm_left lm_right lm_bottom"),this._side&&this.element.addClass("lm_"+this._side),this.element.find(".lm_header").length&&this.childElementContainer){var t=["right","bottom"].indexOf(this._side)>=0?"before":"after";this.header.element[t](this.childElementContainer),this.callDownwards("setSize")}},_highlightBodyDropZone:function(e){var t=this._contentAreaDimensions[e].highlightArea;this.layoutManager.dropTargetIndicator.highlightArea(t),this._dropSegment=e}}),a.utils.BubblingEvent=function(e,t){this.name=e,this.origin=t,this.isPropagationStopped=!1},a.utils.BubblingEvent.prototype.stopPropagation=function(){this.isPropagationStopped=!0},a.utils.ConfigMinifier=function(){if(this._keys=["settings","hasHeaders","constrainDragToContainer","selectionEnabled","dimensions","borderWidth","minItemHeight","minItemWidth","headerHeight","dragProxyWidth","dragProxyHeight","labels","close","maximise","minimise","popout","content","componentName","componentState","id","width","type","height","isClosable","title","popoutWholeStack","openPopouts","parentId","activeItemIndex","reorderEnabled","borderGrabWidth"],this._keys.length>36)throw new Error("Too many keys in config minifier map");this._values=[!0,!1,"row","column","stack","component","close","maximise","minimise","open in new window"]},a.utils.copy(a.utils.ConfigMinifier.prototype,{minifyConfig:function(e){var t={};return this._nextLevel(e,t,"_min"),t},unminifyConfig:function(e){var t={};return this._nextLevel(e,t,"_max"),t},_nextLevel:function(e,t,n){var r,i;for(r in e)e instanceof Array&&(r=parseInt(r,10)),e.hasOwnProperty(r)&&(i=this[n](r,this._keys),"object"==typeof e[r]?(t[i]=e[r]instanceof Array?[]:{},this._nextLevel(e[r],t[i],n)):t[i]=this[n](e[r],this._values))},_min:function(e,t){if("string"==typeof e&&1===e.length)return"___"+e;var n=a.utils.indexOf(e,t);return-1===n?e:n.toString(36)},_max:function(e,t){return"string"==typeof e&&1===e.length?t[parseInt(e,36)]:"string"==typeof e&&"___"===e.substr(0,3)?e[3]:e}}),a.utils.EventHub=function(e){a.utils.EventEmitter.call(this),this._layoutManager=e,this._dontPropagateToParent=null,this._childEventSource=null,this.on(a.utils.EventEmitter.ALL_EVENT,a.utils.fnBind(this._onEventFromThis,this)),this._boundOnEventFromChild=a.utils.fnBind(this._onEventFromChild,this),o(window).on("gl_child_event",this._boundOnEventFromChild)},a.utils.EventHub.prototype._onEventFromThis=function(){var e=Array.prototype.slice.call(arguments);this._layoutManager.isSubWindow&&e[0]!==this._dontPropagateToParent&&this._propagateToParent(e),this._propagateToChildren(e),this._dontPropagateToParent=null,this._childEventSource=null},a.utils.EventHub.prototype._$onEventFromParent=function(e){this._dontPropagateToParent=e[0],this.emit.apply(this,e)},a.utils.EventHub.prototype._onEventFromChild=function(e){this._childEventSource=e.originalEvent.__gl,this.emit.apply(this,e.originalEvent.__glArgs)},a.utils.EventHub.prototype._propagateToParent=function(e){var t,n="gl_child_event";document.createEvent?(t=window.opener.document.createEvent("HTMLEvents")).initEvent(n,!0,!0):(t=window.opener.document.createEventObject()).eventType=n,t.eventName=n,t.__glArgs=e,t.__gl=this._layoutManager,document.createEvent?window.opener.dispatchEvent(t):window.opener.fireEvent("on"+t.eventType,t)},a.utils.EventHub.prototype._propagateToChildren=function(e){var t,n;for(n=0;n<this._layoutManager.openPopouts.length;n++)(t=this._layoutManager.openPopouts[n].getGlInstance())&&t!==this._childEventSource&&t.eventHub._$onEventFromParent(e)},a.utils.EventHub.prototype.destroy=function(){o(window).off("gl_child_event",this._boundOnEventFromChild)},a.utils.ReactComponentHandler=function(e,t){this._reactComponent=null,this._originalComponentWillUpdate=null,this._container=e,this._initialState=t,this._reactClass=this._getReactClass(),this._container.on("open",this._render,this),this._container.on("destroy",this._destroy,this)},a.utils.copy(a.utils.ReactComponentHandler.prototype,{_render:function(){this._reactComponent=ReactDOM.render(this._getReactComponent(),this._container.getElement()[0]),this._originalComponentWillUpdate=this._reactComponent.componentWillUpdate||function(){},this._reactComponent.componentWillUpdate=this._onUpdate.bind(this),this._container.getState()&&this._reactComponent.setState(this._container.getState())},_destroy:function(){ReactDOM.unmountComponentAtNode(this._container.getElement()[0]),this._container.off("open",this._render,this),this._container.off("destroy",this._destroy,this)},_onUpdate:function(e,t){this._container.setState(t),this._originalComponentWillUpdate.call(this._reactComponent,e,t)},_getReactClass:function(){var e,t=this._container._config.component;if(!t)throw new Error("No react component name. type: react-component needs a field `component`");if(!(e=this._container.layoutManager.getComponent(t)))throw new Error('React component "'+t+'" not found. Please register all components with GoldenLayout using `registerComponent(name, component)`');return e},_getReactComponent:function(){var e={glEventHub:this._container.layoutManager.eventHub,glContainer:this._container},t=o.extend(e,this._container._config.props);return React.createElement(this._reactClass,t)}})},8679:(e,t,n)=>{"use strict";var r=n(9864),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(p){var i=f(n);i&&i!==p&&e(t,i,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),g=0;g<a.length;++g){var v=a[g];if(!(o[v]||r&&r[v]||m&&m[v]||s&&s[v])){var y=h(n,v);try{u(t,v,y)}catch(e){}}}}return t}},3827:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};const i="object"===("undefined"==typeof window?"undefined":r(window))&&"object"===("undefined"==typeof document?"undefined":r(document))&&9===document.nodeType},4070:function(e,t){var n;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";var o=[],a=Object.getPrototypeOf,s=o.slice,l=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},u=o.push,c=o.indexOf,d={},h=d.toString,f=d.hasOwnProperty,p=f.toString,m=p.call(Object),g={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},y=function(e){return null!=e&&e===e.window},b=r.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function E(e,t,n){var r,i,o=(n=n||b).createElement("script");if(o.text=e,t)for(r in w)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function _(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[h.call(e)]||"object":typeof e}var C="3.5.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-deprecated/ajax-event-alias,-effects,-effects/Tween,-effects/animatedSelector",S=function(e,t){return new S.fn.init(e,t)};function x(e){var t=!!e&&"length"in e&&e.length,n=_(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}S.fn=S.prototype={jquery:C,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(e){return this.pushStack(S.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(S.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:o.sort,splice:o.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[s]||{},s++),"object"==typeof a||v(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(u&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(u,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(C+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==h.call(e)||(t=a(e))&&("function"!=typeof(n=f.call(t,"constructor")&&t.constructor)||p.call(n)!==m))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){E(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(x(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(x(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:c.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(x(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return l(a)},guid:1,support:g}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=o[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){d["[object "+t+"]"]=t.toLowerCase()}));var T=function(e){var t,n,r,i,o,a,s,l,u,c,d,h,f,p,m,g,v,y,b,w="sizzle"+1*new Date,E=e.document,_=0,C=0,S=le(),x=le(),T=le(),I=le(),k=function(e,t){return e===t&&(d=!0),0},O={}.hasOwnProperty,P=[],N=P.pop,A=P.push,D=P.push,R=P.slice,M=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",j="[\\x20\\t\\r\\n\\f]",F="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\[[\\x20\\t\\r\\n\\f]*("+F+")(?:"+j+"*([*^$|!~]?=)"+j+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+F+"))|)"+j+"*\\]",B=":("+F+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",z=new RegExp(j+"+","g"),U=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),V=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),Z=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),$=new RegExp(j+"|>"),q=new RegExp(B),H=new RegExp("^"+F+"$"),K={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},G=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"<22>":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){h()},ae=we((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{D.apply(P=R.call(E.childNodes),E.childNodes),P[E.childNodes.length].nodeType}catch(e){D={apply:P.length?function(e,t){A.apply(e,R.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,i){var o,s,u,c,d,p,v,y=t&&t.ownerDocument,E=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==E&&9!==E&&11!==E)return r;if(!i&&(h(t),t=t||f,m)){if(11!==E&&(d=J.exec(e)))if(o=d[1]){if(9===E){if(!(u=t.getElementById(o)))return r;if(u.id===o)return r.push(u),r}else if(y&&(u=y.getElementById(o))&&b(t,u)&&u.id===o)return r.push(u),r}else{if(d[2])return D.apply(r,t.getElementsByTagName(e)),r;if((o=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return D.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!I[e+" "]&&(!g||!g.test(e))&&(1!==E||"object"!==t.nodeName.toLowerCase())){if(v=e,y=t,1===E&&($.test(e)||Z.test(e))){for((y=ee.test(e)&&ve(t.parentNode)||t)===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(re,ie):t.setAttribute("id",c=w)),s=(p=a(e)).length;s--;)p[s]=(c?"#"+c:":scope")+" "+be(p[s]);v=p.join(",")}try{return D.apply(r,y.querySelectorAll(v)),r}catch(t){I(e,!0)}finally{c===w&&t.removeAttribute("id")}}}return l(e.replace(U,"$1"),t,r,i)}function le(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function ue(e){return e[w]=!0,e}function ce(e){var t=f.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function he(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function me(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ge(e){return ue((function(t){return t=+t,ue((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},o=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!G.test(t||n&&n.nodeName||"HTML")},h=se.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:E;return a!=f&&9===a.nodeType&&a.documentElement?(p=(f=a).documentElement,m=!o(f),E!=f&&(i=f.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=ce((function(e){return p.appendChild(e).appendChild(f.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ce((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ce((function(e){return e.appendChild(f.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=X.test(f.getElementsByClassName),n.getById=ce((function(e){return p.appendChild(e).id=w,!f.getElementsByName||!f.getElementsByName(w).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},v=[],g=[],(n.qsa=X.test(f.querySelectorAll))&&(ce((function(e){var t;p.appendChild(e).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+L+")"),e.querySelectorAll("[id~="+w+"-]").length||g.push("~="),(t=f.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||g.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+w+"+*").length||g.push(".#.+[+~]"),e.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),ce((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=f.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=X.test(y=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ce((function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",B)})),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),t=X.test(p.compareDocumentPosition),b=t||X.test(p.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},k=t?function(e,t){if(e===t)return d=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==f||e.ownerDocument==E&&b(E,e)?-1:t==f||t.ownerDocument==E&&b(E,t)?1:c?M(c,e)-M(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==f?-1:t==f?1:i?-1:o?1:c?M(c,e)-M(c,t):0;if(i===o)return he(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?he(a[r],s[r]):a[r]==E?-1:s[r]==E?1:0},f):f},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(h(e),n.matchesSelector&&m&&!I[t+" "]&&(!v||!v.test(t))&&(!g||!g.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){I(t,!0)}return se(t,f,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!=f&&h(e),b(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=f&&h(e);var i=r.attrHandle[t.toLowerCase()],o=i&&O.call(r.attrHandle,t.toLowerCase())?i(e,t,!m):void 0;return void 0!==o?o:n.attributes||!m?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],i=0,o=0;if(d=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(k),d){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return c=null,e},i=se.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=se.selectors={cacheLength:50,createPseudo:ue,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return K.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&q.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"("+j+"|$)"))&&S(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=se.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(z," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,d,h,f,p,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s,b=!1;if(g){if(o){for(;m;){for(h=t;h=h[m];)if(s?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&y){for(b=(f=(u=(c=(d=(h=g)[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===_&&u[1])&&u[2],h=f&&g.childNodes[f];h=++f&&h&&h[m]||(b=f=0)||p.pop();)if(1===h.nodeType&&++b&&h===t){c[e]=[_,f,b];break}}else if(y&&(b=f=(u=(c=(d=(h=t)[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===_&&u[1]),!1===b)for(;(h=++f&&h&&h[m]||(b=f=0)||p.pop())&&((s?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++b||(y&&((c=(d=h[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]=[_,b]),h!==t)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return i[w]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ue((function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=M(e,o[a])]=!(n[r]=o[a])})):function(e){return i(e,0,n)}):i}},pseudos:{not:ue((function(e){var t=[],n=[],r=s(e.replace(U,"$1"));return r[w]?ue((function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:ue((function(e){return function(t){return se(e,t).length>0}})),contains:ue((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}})),lang:ue((function(e){return H.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:me(!1),disabled:me(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ge((function(){return[0]})),last:ge((function(e,t){return[t-1]})),eq:ge((function(e,t,n){return[n<0?n+t:n]})),even:ge((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:ge((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:ge((function(e,t,n){for(var r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e})),gt:ge((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=fe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=pe(t);function ye(){}function be(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function we(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=C++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,l){var u,c,d,h=[_,s];if(l){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,l))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(c=(d=t[w]||(t[w]={}))[t.uniqueID]||(d[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((u=c[o])&&u[0]===_&&u[1]===s)return h[2]=u[2];if(c[o]=h,h[2]=e(t,n,l))return!0}return!1}}function Ee(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function _e(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,u=null!=t;s<l;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),u&&t.push(s)));return a}function Ce(e,t,n,r,i,o){return r&&!r[w]&&(r=Ce(r)),i&&!i[w]&&(i=Ce(i,o)),ue((function(o,a,s,l){var u,c,d,h=[],f=[],p=a.length,m=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),g=!e||!o&&t?m:_e(m,h,e,s,l),v=n?i||(o?e:p||r)?[]:a:g;if(n&&n(g,v,s,l),r)for(u=_e(v,f),r(u,[],s,l),c=u.length;c--;)(d=u[c])&&(v[f[c]]=!(g[f[c]]=d));if(o){if(i||e){if(i){for(u=[],c=v.length;c--;)(d=v[c])&&u.push(g[c]=d);i(null,v=[],u,l)}for(c=v.length;c--;)(d=v[c])&&(u=i?M(o,d):h[c])>-1&&(o[u]=!(a[u]=d))}}else v=_e(v===a?v.splice(p,v.length):v),i?i(null,a,v,l):D.apply(a,v)}))}function Se(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],l=a?1:0,c=we((function(e){return e===t}),s,!0),d=we((function(e){return M(t,e)>-1}),s,!0),h=[function(e,n,r){var i=!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):d(e,n,r));return t=null,i}];l<o;l++)if(n=r.relative[e[l].type])h=[we(Ee(h),n)];else{if((n=r.filter[e[l].type].apply(null,e[l].matches))[w]){for(i=++l;i<o&&!r.relative[e[i].type];i++);return Ce(l>1&&Ee(h),l>1&&be(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(U,"$1"),n,l<i&&Se(e.slice(l,i)),i<o&&Se(e=e.slice(i)),i<o&&be(e))}h.push(n)}return Ee(h)}return ye.prototype=r.filters=r.pseudos,r.setFilters=new ye,a=se.tokenize=function(e,t){var n,i,o,a,s,l,u,c=x[e+" "];if(c)return t?0:c.slice(0);for(s=e,l=[],u=r.preFilter;s;){for(a in n&&!(i=V.exec(s))||(i&&(s=s.slice(i[0].length)||s),l.push(o=[])),n=!1,(i=Z.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(U," ")}),s=s.slice(n.length)),r.filter)!(i=K[a].exec(s))||u[a]&&!(i=u[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?se.error(e):x(e,l).slice(0)},s=se.compile=function(e,t){var n,i=[],o=[],s=T[e+" "];if(!s){for(t||(t=a(e)),n=t.length;n--;)(s=Se(t[n]))[w]?i.push(s):o.push(s);(s=T(e,function(e,t){var n=t.length>0,i=e.length>0,o=function(o,a,s,l,c){var d,p,g,v=0,y="0",b=o&&[],w=[],E=u,C=o||i&&r.find.TAG("*",c),S=_+=null==E?1:Math.random()||.1,x=C.length;for(c&&(u=a==f||a||c);y!==x&&null!=(d=C[y]);y++){if(i&&d){for(p=0,a||d.ownerDocument==f||(h(d),s=!m);g=e[p++];)if(g(d,a||f,s)){l.push(d);break}c&&(_=S)}n&&((d=!g&&d)&&v--,o&&b.push(d))}if(v+=y,n&&y!==v){for(p=0;g=t[p++];)g(b,w,a,s);if(o){if(v>0)for(;y--;)b[y]||w[y]||(w[y]=N.call(l));w=_e(w)}D.apply(l,w),c&&!o&&w.length>0&&v+t.length>1&&se.uniqueSort(l)}return c&&(_=S,u=E),b};return n?ue(o):o}(o,i))).selector=e}return s},l=se.select=function(e,t,n,i){var o,l,u,c,d,h="function"==typeof e&&e,f=!i&&a(e=h.selector||e);if(n=n||[],1===f.length){if((l=f[0]=f[0].slice(0)).length>2&&"ID"===(u=l[0]).type&&9===t.nodeType&&m&&r.relative[l[1].type]){if(!(t=(r.find.ID(u.matches[0].replace(te,ne),t)||[])[0]))return n;h&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(o=K.needsContext.test(e)?0:l.length;o--&&(u=l[o],!r.relative[c=u.type]);)if((d=r.find[c])&&(i=d(u.matches[0].replace(te,ne),ee.test(l[0].type)&&ve(t.parentNode)||t))){if(l.splice(o,1),!(e=i.length&&be(l)))return D.apply(n,i),n;break}}return(h||s(e,f))(i,t,!m,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},n.sortStable=w.split("").sort(k).join("")===w,n.detectDuplicates=!!d,h(),n.sortDetached=ce((function(e){return 1&e.compareDocumentPosition(f.createElement("fieldset"))})),ce((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||de("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ce((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||de("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ce((function(e){return null==e.getAttribute("disabled")}))||de(L,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),se}(r);S.find=T,S.expr=T.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=T.uniqueSort,S.text=T.getText,S.isXMLDoc=T.isXML,S.contains=T.contains,S.escapeSelector=T.escape;var I=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},k=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},O=S.expr.match.needsContext;function P(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function A(e,t,n){return v(t)?S.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?S.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?S.grep(e,(function(e){return c.call(t,e)>-1!==n})):S.filter(t,e,n)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,(function(e){return 1===e.nodeType})))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter((function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return r>1?S.uniqueSort(n):n},filter:function(e){return this.pushStack(A(this,e||[],!1))},not:function(e){return this.pushStack(A(this,e||[],!0))},is:function(e){return!!A(this,"string"==typeof e&&O.test(e)?S(e):e||[],!1).length}});var D,R=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:R.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:b,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=b.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(b);var M=/^(?:parents|prev(?:Until|All))/,L={children:!0,contents:!0,next:!0,prev:!0};function j(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!O.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?c.call(S(e),this[0]):c.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return I(e,"parentNode")},parentsUntil:function(e,t,n){return I(e,"parentNode",n)},next:function(e){return j(e,"nextSibling")},prev:function(e){return j(e,"previousSibling")},nextAll:function(e){return I(e,"nextSibling")},prevAll:function(e){return I(e,"previousSibling")},nextUntil:function(e,t,n){return I(e,"nextSibling",n)},prevUntil:function(e,t,n){return I(e,"previousSibling",n)},siblings:function(e){return k((e.parentNode||{}).firstChild,e)},children:function(e){return k(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(P(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},(function(e,t){S.fn[e]=function(n,r){var i=S.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=S.filter(r,i)),this.length>1&&(L[e]||S.uniqueSort(i),M.test(e)&&i.reverse()),this.pushStack(i)}}));var F=/[^\x20\t\r\n\f]+/g;function W(e){return e}function B(e){throw e}function z(e,t,n,r){var i;try{e&&v(i=e.promise)?i.call(e).done(t).fail(n):e&&v(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return S.each(e.match(F)||[],(function(e,n){t[n]=!0})),t}(e):S.extend({},e);var t,n,r,i,o=[],a=[],s=-1,l=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},u={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){S.each(n,(function(n,r){v(r)?e.unique&&u.has(r)||o.push(r):r&&r.length&&"string"!==_(r)&&t(r)}))}(arguments),n&&!t&&l()),this},remove:function(){return S.each(arguments,(function(e,t){for(var n;(n=S.inArray(t,o,n))>-1;)o.splice(n,1),n<=s&&s--})),this},has:function(e){return e?S.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},S.extend({Deferred:function(e){var t=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return S.Deferred((function(n){S.each(t,(function(t,r){var i=v(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&v(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,i){var o=0;function a(e,t,n,i){return function(){var s=this,l=arguments,u=function(){var r,u;if(!(e<o)){if((r=n.apply(s,l))===t.promise())throw new TypeError("Thenable self-resolution");u=r&&("object"==typeof r||"function"==typeof r)&&r.then,v(u)?i?u.call(r,a(o,t,W,i),a(o,t,B,i)):(o++,u.call(r,a(o,t,W,i),a(o,t,B,i),a(o,t,W,t.notifyWith))):(n!==W&&(s=void 0,l=[r]),(i||t.resolveWith)(s,l))}},c=i?u:function(){try{u()}catch(r){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(r,c.stackTrace),e+1>=o&&(n!==B&&(s=void 0,l=[r]),t.rejectWith(s,l))}};e?c():(S.Deferred.getStackHook&&(c.stackTrace=S.Deferred.getStackHook()),r.setTimeout(c))}}return S.Deferred((function(r){t[0][3].add(a(0,r,v(i)?i:W,r.notifyWith)),t[1][3].add(a(0,r,v(e)?e:W)),t[2][3].add(a(0,r,v(n)?n:B))})).promise()},promise:function(e){return null!=e?S.extend(e,i):i}},o={};return S.each(t,(function(e,r){var a=r[2],s=r[5];i[r[1]]=a.add,s&&a.add((function(){n=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(r[3].fire),o[r[0]]=function(){return o[r[0]+"With"](this===o?void 0:this,arguments),this},o[r[0]+"With"]=a.fireWith})),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=s.call(arguments),o=S.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?s.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(z(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||v(i[n]&&i[n].then)))return o.then();for(;n--;)z(i[n],a(n),o.reject);return o.promise()}});var U=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){r.console&&r.console.warn&&e&&U.test(e.name)&&r.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){r.setTimeout((function(){throw e}))};var V=S.Deferred();function Z(){b.removeEventListener("DOMContentLoaded",Z),r.removeEventListener("load",Z),S.ready()}S.fn.ready=function(e){return V.then(e).catch((function(e){S.readyException(e)})),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0,!0!==e&&--S.readyWait>0||V.resolveWith(b,[S]))}}),S.ready.then=V.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?r.setTimeout(S.ready):(b.addEventListener("DOMContentLoaded",Z),r.addEventListener("load",Z));var $=function(e,t,n,r,i,o,a){var s=0,l=e.length,u=null==n;if("object"===_(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,v(r)||(a=!0),u&&(a?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(S(e),n)})),t))for(;s<l;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:u?t.call(e):l?t(e[0],n):o},q=/^-ms-/,H=/-([a-z])/g;function K(e,t){return t.toUpperCase()}function G(e){return e.replace(q,"ms-").replace(H,K)}var Q=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Y(){this.expando=S.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Q(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[G(t)]=n;else for(r in t)i[G(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][G(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(G):(t=G(t))in r?[t]:t.match(F)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var X=new Y,J=new Y,ee=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,te=/[A-Z]/g;function ne(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(te,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ee.test(e)?JSON.parse(e):e)}(n)}catch(e){}J.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return J.hasData(e)||X.hasData(e)},data:function(e,t,n){return J.access(e,t,n)},removeData:function(e,t){J.remove(e,t)},_data:function(e,t,n){return X.access(e,t,n)},_removeData:function(e,t){X.remove(e,t)}}),S.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=J.get(o),1===o.nodeType&&!X.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=G(r.slice(5)),ne(o,r,i[r]));X.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){J.set(this,e)})):$(this,(function(t){var n;if(o&&void 0===t)return void 0!==(n=J.get(o,e))||void 0!==(n=ne(o,e))?n:void 0;this.each((function(){J.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){J.remove(this,e)}))}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=X.get(e,t),n&&(!r||Array.isArray(n)?r=X.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){S.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return X.get(e,n)||X.access(e,n,{empty:S.Callbacks("once memory").add((function(){X.remove(e,[t+"queue",n])}))})}}),S.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?S.queue(this[0],e):void 0===t?this:this.each((function(){var n=S.queue(this,e,t);S._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&S.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){S.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=X.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],ae=b.documentElement,se=function(e){return S.contains(e.ownerDocument,e)},le={composed:!0};ae.getRootNode&&(se=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(le)===e.ownerDocument});var ue=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&se(e)&&"none"===S.css(e,"display")},ce={};function de(e){var t,n=e.ownerDocument,r=e.nodeName,i=ce[r];return i||(t=n.body.appendChild(n.createElement(r)),i=S.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),ce[r]=i,i)}function he(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=X.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ue(r)&&(i[o]=de(r))):"none"!==n&&(i[o]="none",X.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}S.fn.extend({show:function(){return he(this,!0)},hide:function(){return he(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){ue(this)?S(this).show():S(this).hide()}))}});var fe,pe,me=/^(?:checkbox|radio)$/i,ge=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ve=/^$|^module$|\/(?:java|ecma)script/i;fe=b.createDocumentFragment().appendChild(b.createElement("div")),(pe=b.createElement("input")).setAttribute("type","radio"),pe.setAttribute("checked","checked"),pe.setAttribute("name","t"),fe.appendChild(pe),g.checkClone=fe.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!fe.cloneNode(!0).lastChild.defaultValue,fe.innerHTML="<option></option>",g.option=!!fe.lastChild;var ye={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function be(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&P(e,t)?S.merge([e],n):n}function we(e,t){for(var n=0,r=e.length;n<r;n++)X.set(e[n],"globalEval",!t||X.get(t[n],"globalEval"))}ye.tbody=ye.tfoot=ye.colgroup=ye.caption=ye.thead,ye.th=ye.td,g.option||(ye.optgroup=ye.option=[1,"<select multiple='multiple'>","</select>"]);var Ee=/<|&#?\w+;/;function _e(e,t,n,r,i){for(var o,a,s,l,u,c,d=t.createDocumentFragment(),h=[],f=0,p=e.length;f<p;f++)if((o=e[f])||0===o)if("object"===_(o))S.merge(h,o.nodeType?[o]:o);else if(Ee.test(o)){for(a=a||d.appendChild(t.createElement("div")),s=(ge.exec(o)||["",""])[1].toLowerCase(),l=ye[s]||ye._default,a.innerHTML=l[1]+S.htmlPrefilter(o)+l[2],c=l[0];c--;)a=a.lastChild;S.merge(h,a.childNodes),(a=d.firstChild).textContent=""}else h.push(t.createTextNode(o));for(d.textContent="",f=0;o=h[f++];)if(r&&S.inArray(o,r)>-1)i&&i.push(o);else if(u=se(o),a=be(d.appendChild(o),"script"),u&&we(a),n)for(c=0;o=a[c++];)ve.test(o.type||"")&&n.push(o);return d}var Ce=/^key/,Se=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,xe=/^([^.]*)(?:\.(.+)|)/;function Te(){return!0}function Ie(){return!1}function ke(e,t){return e===function(){try{return b.activeElement}catch(e){}}()==("focus"===t)}function Oe(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Oe(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ie;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each((function(){S.event.add(this,t,i,r,n)}))}function Pe(e,t,n){n?(X.set(e,t,!1),S.event.add(e,t,{namespace:!1,handler:function(e){var r,i,o=X.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(S.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=s.call(arguments),X.set(this,t,o),r=n(this,t),this[t](),o!==(i=X.get(this,t))||r?X.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i.value}else o.length&&(X.set(this,t,{value:S.event.trigger(S.extend(o[0],S.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===X.get(e,t)&&S.event.add(e,t,Te)}S.event={global:{},add:function(e,t,n,r,i){var o,a,s,l,u,c,d,h,f,p,m,g=X.get(e);if(Q(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(ae,i),n.guid||(n.guid=S.guid++),(l=g.events)||(l=g.events=Object.create(null)),(a=g.handle)||(a=g.handle=function(t){return void 0!==S&&S.event.triggered!==t.type?S.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(F)||[""]).length;u--;)f=m=(s=xe.exec(t[u])||[])[1],p=(s[2]||"").split(".").sort(),f&&(d=S.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,d=S.event.special[f]||{},c=S.extend({type:f,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:p.join(".")},o),(h=l[f])||((h=l[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,p,a)||e.addEventListener&&e.addEventListener(f,a)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,c):h.push(c),S.event.global[f]=!0)},remove:function(e,t,n,r,i){var o,a,s,l,u,c,d,h,f,p,m,g=X.hasData(e)&&X.get(e);if(g&&(l=g.events)){for(u=(t=(t||"").match(F)||[""]).length;u--;)if(f=m=(s=xe.exec(t[u])||[])[1],p=(s[2]||"").split(".").sort(),f){for(d=S.event.special[f]||{},h=l[f=(r?d.delegateType:d.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)c=h[o],!i&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,d.remove&&d.remove.call(e,c));a&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,p,g.handle)||S.removeEvent(e,f,g.handle),delete l[f])}else for(f in l)S.event.remove(e,f+t[u],n,r,!0);S.isEmptyObject(l)&&X.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),l=S.event.fix(e),u=(X.get(this,"events")||Object.create(null))[l.type]||[],c=S.event.special[l.type]||{};for(s[0]=l,t=1;t<arguments.length;t++)s[t]=arguments[t];if(l.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,l)){for(a=S.event.handlers.call(this,l,u),t=0;(i=a[t++])&&!l.isPropagationStopped();)for(l.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==o.namespace&&!l.rnamespace.test(o.namespace)||(l.handleObj=o,l.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(l.result=r)&&(l.preventDefault(),l.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,l),l.result}},handlers:function(e,t){var n,r,i,o,a,s=[],l=t.delegateCount,u=e.target;if(l&&u.nodeType&&!("click"===e.type&&e.button>=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(o=[],a={},n=0;n<l;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?S(i,this).index(u)>-1:S.find(i,this,null,[u]).length),a[i]&&o.push(r);o.length&&s.push({elem:u,handlers:o})}return u=this,l<t.length&&s.push({elem:u,handlers:t.slice(l)}),s},addProp:function(e,t){Object.defineProperty(S.Event.prototype,e,{enumerable:!0,configurable:!0,get:v(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return me.test(t.type)&&t.click&&P(t,"input")&&Pe(t,"click",Te),!1},trigger:function(e){var t=this||e;return me.test(t.type)&&t.click&&P(t,"input")&&Pe(t,"click"),!0},_default:function(e){var t=e.target;return me.test(t.type)&&t.click&&P(t,"input")&&X.get(t,"click")||P(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Te:Ie,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Ie,isPropagationStopped:Ie,isImmediatePropagationStopped:Ie,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Te,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Te,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Te,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Ce.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Se.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},(function(e,t){S.event.special[e]={setup:function(){return Pe(this,e,ke),!1},trigger:function(){return Pe(this,e),!0},delegateType:t}})),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){S.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||S.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}})),S.fn.extend({on:function(e,t,n,r){return Oe(this,e,t,n,r)},one:function(e,t,n,r){return Oe(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ie),this.each((function(){S.event.remove(this,e,n,t)}))}});var Ne=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,De=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Re(e,t){return P(e,"table")&&P(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Me(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Le(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function je(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(X.hasData(e)&&(s=X.get(e).events))for(i in X.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);J.hasData(e)&&(o=J.access(e),a=S.extend({},o),J.set(t,a))}}function Fe(e,t){var n=t.nodeName.toLowerCase();"input"===n&&me.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function We(e,t,n,r){t=l(t);var i,o,a,s,u,c,d=0,h=e.length,f=h-1,p=t[0],m=v(p);if(m||h>1&&"string"==typeof p&&!g.checkClone&&Ae.test(p))return e.each((function(i){var o=e.eq(i);m&&(t[0]=p.call(this,i,o.html())),We(o,t,n,r)}));if(h&&(o=(i=_e(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=S.map(be(i,"script"),Me)).length;d<h;d++)u=i,d!==f&&(u=S.clone(u,!0,!0),s&&S.merge(a,be(u,"script"))),n.call(e[d],u,d);if(s)for(c=a[a.length-1].ownerDocument,S.map(a,Le),d=0;d<s;d++)u=a[d],ve.test(u.type||"")&&!X.access(u,"globalEval")&&S.contains(c,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},c):E(u.textContent.replace(De,""),u,c))}return e}function Be(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(be(r)),r.parentNode&&(n&&se(r)&&we(be(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),l=se(e);if(!(g.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=be(s),r=0,i=(o=be(e)).length;r<i;r++)Fe(o[r],a[r]);if(t)if(n)for(o=o||be(e),a=a||be(s),r=0,i=o.length;r<i;r++)je(o[r],a[r]);else je(e,s);return(a=be(s,"script")).length>0&&we(a,!l&&be(e,"script")),s},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(Q(n)){if(t=n[X.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[X.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Be(this,e,!0)},remove:function(e){return Be(this,e)},text:function(e){return $(this,(function(e){return void 0===e?S.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return We(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Re(this,e).appendChild(e)}))},prepend:function(){return We(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Re(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return We(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return We(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(be(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return S.clone(this,e,t)}))},html:function(e){return $(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ne.test(e)&&!ye[(ge.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(be(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return We(this,arguments,(function(t){var n=this.parentNode;S.inArray(this,e)<0&&(S.cleanData(be(this)),n&&n.replaceChild(t,this))}),e)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){S.fn[e]=function(e){for(var n,r=[],i=S(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),S(i[a])[t](n),u.apply(r,n.get());return this.pushStack(r)}}));var ze=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),Ue=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=r),t.getComputedStyle(e)},Ve=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ze=new RegExp(oe.join("|"),"i");function $e(e,t,n){var r,i,o,a,s=e.style;return(n=n||Ue(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||se(e)||(a=S.style(e,t)),!g.pixelBoxStyles()&&ze.test(a)&&Ze.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function qe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(c){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ae.appendChild(u).appendChild(c);var e=r.getComputedStyle(c);n="1%"!==e.top,l=12===t(e.marginLeft),c.style.right="60%",a=36===t(e.right),i=36===t(e.width),c.style.position="absolute",o=12===t(c.offsetWidth/3),ae.removeChild(u),c=null}}function t(e){return Math.round(parseFloat(e))}var n,i,o,a,s,l,u=b.createElement("div"),c=b.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===c.style.backgroundClip,S.extend(g,{boxSizingReliable:function(){return e(),i},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),o},reliableTrDimensions:function(){var e,t,n,i;return null==s&&(e=b.createElement("table"),t=b.createElement("tr"),n=b.createElement("div"),e.style.cssText="position:absolute;left:-11111px",t.style.height="1px",n.style.height="9px",ae.appendChild(e).appendChild(t).appendChild(n),i=r.getComputedStyle(t),s=parseInt(i.height)>3,ae.removeChild(e)),s}}))}();var He=["Webkit","Moz","ms"],Ke=b.createElement("div").style,Ge={};function Qe(e){return S.cssProps[e]||Ge[e]||(e in Ke?e:Ge[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=He.length;n--;)if((e=He[n]+t)in Ke)return e}(e)||e)}var Ye=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Je={position:"absolute",visibility:"hidden",display:"block"},et={letterSpacing:"0",fontWeight:"400"};function tt(e,t,n){var r=ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function nt(e,t,n,r,i,o){var a="width"===t?1:0,s=0,l=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=S.css(e,n+oe[a],!0,i)),r?("content"===n&&(l-=S.css(e,"padding"+oe[a],!0,i)),"margin"!==n&&(l-=S.css(e,"border"+oe[a]+"Width",!0,i))):(l+=S.css(e,"padding"+oe[a],!0,i),"padding"!==n?l+=S.css(e,"border"+oe[a]+"Width",!0,i):s+=S.css(e,"border"+oe[a]+"Width",!0,i));return!r&&o>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-s-.5))||0),l}function rt(e,t,n){var r=Ue(e),i=(!g.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=$e(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(ze.test(a)){if(!n)return a;a="auto"}return(!g.boxSizingReliable()&&i||!g.reliableTrDimensions()&&P(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+nt(e,t,n||(i?"border":"content"),o,r,a)+"px"}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=$e(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=G(t),l=Xe.test(t),u=e.style;if(l||(t=Qe(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=function(e,t,n,r){var i,o,a=20,s=function(){return S.css(e,t,"")},l=s(),u=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==u&&+l)&&ie.exec(S.css(e,t));if(c&&c[3]!==u){for(l/=2,u=u||c[3],c=+l||1;a--;)S.style(e,t,c+u),(1-o)*(1-(o=s()/l||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+u),n=n||[]}return n&&(c=+c||+l||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2]),i}(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||l||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),g.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(l?u.setProperty(t,n):u[t]=n))}},css:function(e,t,n,r){var i,o,a,s=G(t);return Xe.test(t)||(t=Qe(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=$e(e,t,r)),"normal"===i&&t in et&&(i=et[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],(function(e,t){S.cssHooks[t]={get:function(e,n,r){if(n)return!Ye.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?rt(e,t,r):Ve(e,Je,(function(){return rt(e,t,r)}))},set:function(e,n,r){var i,o=Ue(e),a=!g.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===S.css(e,"boxSizing",!1,o),l=r?nt(e,t,r,s,o):0;return s&&a&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-nt(e,t,"border",!1,o)-.5)),l&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=S.css(e,t)),tt(0,n,l)}}})),S.cssHooks.marginLeft=qe(g.reliableMarginLeft,(function(e,t){if(t)return(parseFloat($e(e,"marginLeft"))||e.getBoundingClientRect().left-Ve(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),S.each({margin:"",padding:"",border:"Width"},(function(e,t){S.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(S.cssHooks[e+t].set=tt)})),S.fn.extend({css:function(e,t){return $(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ue(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)}),e,t,arguments.length>1)}}),S.fn.delay=function(e,t){return e=S.fx&&S.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,n){var i=r.setTimeout(t,e);n.stop=function(){r.clearTimeout(i)}}))},function(){var e=b.createElement("input"),t=b.createElement("select").appendChild(b.createElement("option"));e.type="checkbox",g.checkOn=""!==e.value,g.optSelected=t.selected,(e=b.createElement("input")).value="t",e.type="radio",g.radioValue="t"===e.value}();var it,ot=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){S.removeAttr(this,e)}))}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?it:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&P(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(F);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),it={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=ot[t]||S.find.attr;ot[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ot[a],ot[a]=i,i=null!=n(e,t,r)?a:null,ot[a]=o),i}}));var at=/^(?:input|select|textarea|button)$/i,st=/^(?:a|area)$/i;function lt(e){return(e.match(F)||[]).join(" ")}function ut(e){return e.getAttribute&&e.getAttribute("class")||""}function ct(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(F)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[S.propFix[e]||e]}))}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):at.test(e.nodeName)||st.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){S.propFix[this.toLowerCase()]=this})),S.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,l=0;if(v(e))return this.each((function(t){S(this).addClass(e.call(this,t,ut(this)))}));if((t=ct(e)).length)for(;n=this[l++];)if(i=ut(n),r=1===n.nodeType&&" "+lt(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=lt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,l=0;if(v(e))return this.each((function(t){S(this).removeClass(e.call(this,t,ut(this)))}));if(!arguments.length)return this.attr("class","");if((t=ct(e)).length)for(;n=this[l++];)if(i=ut(n),r=1===n.nodeType&&" "+lt(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=lt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):v(e)?this.each((function(n){S(this).toggleClass(e.call(this,n,ut(this),t),t)})):this.each((function(){var t,i,o,a;if(r)for(i=0,o=S(this),a=ct(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=ut(this))&&X.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":X.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+lt(ut(n))+" ").indexOf(t)>-1)return!0;return!1}});var dt=/\r/g;S.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=v(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,S(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=S.map(i,(function(e){return null==e?"":e+""}))),(t=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=S.valHooks[i.type]||S.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(dt,""):null==n?"":n:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:lt(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],l=a?o+1:i.length;for(r=o<0?l:a?o:0;r<l;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!P(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=S.makeArray(t),a=i.length;a--;)((r=i[a]).selected=S.inArray(S.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],(function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=S.inArray(S(e).val(),t)>-1}},g.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),g.focusin="onfocusin"in r;var ht=/^(?:focusinfocus|focusoutblur)$/,ft=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,i){var o,a,s,l,u,c,d,h,p=[n||b],m=f.call(e,"type")?e.type:e,g=f.call(e,"namespace")?e.namespace.split("."):[];if(a=h=s=n=n||b,3!==n.nodeType&&8!==n.nodeType&&!ht.test(m+S.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),u=m.indexOf(":")<0&&"on"+m,(e=e[S.expando]?e:new S.Event(m,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),d=S.event.special[m]||{},i||!d.trigger||!1!==d.trigger.apply(n,t))){if(!i&&!d.noBubble&&!y(n)){for(l=d.delegateType||m,ht.test(l+m)||(a=a.parentNode);a;a=a.parentNode)p.push(a),s=a;s===(n.ownerDocument||b)&&p.push(s.defaultView||s.parentWindow||r)}for(o=0;(a=p[o++])&&!e.isPropagationStopped();)h=a,e.type=o>1?l:d.bindType||m,(c=(X.get(a,"events")||Object.create(null))[e.type]&&X.get(a,"handle"))&&c.apply(a,t),(c=u&&a[u])&&c.apply&&Q(a)&&(e.result=c.apply(a,t),!1===e.result&&e.preventDefault());return e.type=m,i||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),t)||!Q(n)||u&&v(n[m])&&!y(n)&&((s=n[u])&&(n[u]=null),S.event.triggered=m,e.isPropagationStopped()&&h.addEventListener(m,ft),n[m](),e.isPropagationStopped()&&h.removeEventListener(m,ft),S.event.triggered=void 0,s&&(n[u]=s)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each((function(){S.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),g.focusin||S.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){S.event.simulate(t,e.target,S.event.fix(e))};S.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=X.access(r,t);i||r.addEventListener(e,n,!0),X.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=X.access(r,t)-1;i?X.access(r,t,i):(r.removeEventListener(e,n,!0),X.remove(r,t))}}})),S.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new r.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||S.error("Invalid XML: "+e),t};var pt,mt=/\[\]$/,gt=/\r?\n/g,vt=/^(?:submit|button|image|reset|file)$/i,yt=/^(?:input|select|textarea|keygen)/i;function bt(e,t,n,r){var i;if(Array.isArray(t))S.each(t,(function(t,i){n||mt.test(e)?r(e,i):bt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==_(t))r(e,t);else for(i in t)bt(e+"["+i+"]",t[i],n,r)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=v(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,(function(){i(this.name,this.value)}));else for(n in e)bt(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&yt.test(this.nodeName)&&!vt.test(e)&&(this.checked||!me.test(e))})).map((function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,(function(e){return{name:t.name,value:e.replace(gt,"\r\n")}})):{name:t.name,value:n.replace(gt,"\r\n")}})).get()}}),S.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return v(e)?this.each((function(t){S(this).wrapInner(e.call(this,t))})):this.each((function(){var t=S(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=v(e);return this.each((function(n){S(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){S(this).replaceWith(this.childNodes)})),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},g.createHTMLDocument=((pt=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===pt.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(g.createHTMLDocument?((r=(t=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,t.head.appendChild(r)):t=b),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=_e([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,l,u=S.css(e,"position"),c=S(e),d={};"static"===u&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),l=S.css(e,"left"),("absolute"===u||"fixed"===u)&&(o+l).indexOf("auto")>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(l)||0),v(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):("number"==typeof d.top&&(d.top+="px"),"number"==typeof d.left&&(d.left+="px"),c.css(d))}},S.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){S.offset.setOffset(this,e,t)}));var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===S.css(e,"position");)e=e.offsetParent;return e||ae}))}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;S.fn[e]=function(r){return $(this,(function(e,r,i){var o;if(y(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i}),e,r,arguments.length)}})),S.each(["top","left"],(function(e,t){S.cssHooks[t]=qe(g.pixelPosition,(function(e,n){if(n)return n=$e(e,t),ze.test(n)?S(e).position()[t]+"px":n}))})),S.each({Height:"height",Width:"width"},(function(e,t){S.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){S.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return $(this,(function(t,n,i){var o;return y(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?S.css(t,n,s):S.style(t,n,i,s)}),t,a?i:void 0,a)}}))})),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){S.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}));var wt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),v(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=P,S.isFunction=v,S.isWindow=y,S.camelCase=G,S.type=_,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(wt,"")},void 0===(n=function(){return S}.apply(t,[]))||(e.exports=n);var Et=r.jQuery,_t=r.$;return S.noConflict=function(e){return r.$===S&&(r.$=_t),e&&r.jQuery===S&&(r.jQuery=Et),S},void 0===i&&(r.jQuery=r.$=S),S}))},4013:(e,t,n)=>{"use strict";n.d(t,{HZ:()=>pe,Ue:()=>me,_$:()=>fe,EK:()=>f,JH:()=>d,xE:()=>Q,RB:()=>H});var r=n(2122),i=n(3827),o=n(5991),a=n(1788),s=n(3349),l=n(9756),u={}.constructor;function c(e){if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(c);if(e.constructor!==u)return e;var t={};for(var n in e)t[n]=c(e[n]);return t}function d(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=c(t);return r.plugins.onCreateRule(e,i,n)||(e[0],null)}var h=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n};function f(e,t){if(void 0===t&&(t=!1),!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=", "),n+=h(e[r]," ");else n=h(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n}function p(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function m(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,o=void 0===i?0:i,a=t.fallbacks;if(e&&o++,a)if(Array.isArray(a))for(var s=0;s<a.length;s++){var l=a[s];for(var u in l){var c=l[u];null!=c&&(r&&(r+="\n"),r+=""+p(u+": "+f(c)+";",o))}}else for(var d in a){var h=a[d];null!=h&&(r&&(r+="\n"),r+=""+p(d+": "+f(h)+";",o))}for(var m in t){var g=t[m];null!=g&&"fallbacks"!==m&&(r&&(r+="\n"),r+=""+p(m+": "+f(g)+";",o))}return(r||n.allowEmpty)&&e?(r&&(r="\n"+r+"\n"),p(e+" {"+r,--o)+p("}",o)):r}var g=/([[\].#*$><+~=|^:(),"'`\s])/g,v="undefined"!=typeof CSS&&CSS.escape,y=function(e){return v?v(e):e.replace(g,"\\$1")},b=function(){function e(e,t,n){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,a=e in this.style;if(o&&!a&&!r)return this;var s=o&&a;if(s?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var l=this.options.sheet;return l&&l.attached,this},e}(),w=function(e){function t(t,n,r){var i;(i=e.call(this,t,n,r)||this).selectorText=void 0,i.id=void 0,i.renderable=void 0;var o=r.selector,a=r.scoped,l=r.sheet,u=r.generateId;return o?i.selectorText=o:!1!==a&&(i.id=u((0,s.Z)((0,s.Z)(i)),l),i.selectorText="."+y(i.id)),i}(0,a.Z)(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=f(n))}return e},n.toString=function(e){var t=this.options.sheet,n=t&&t.options.link?(0,r.Z)({},e,{allowEmpty:!0}):e;return m(this.selectorText,this.style,n)},(0,o.Z)(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;n&&t&&(t.setSelector(n,e)||t.replaceRule(n,this))}},get:function(){return this.selectorText}}]),t}(b),E={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new w(e,t,n)}},_={indent:1,children:!0},C=/@([\w-]+)/,S=function(){function e(e,t,n){this.type="conditional",this.at=void 0,this.key=void 0,this.query=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.query=n.name;var i=e.match(C);for(var o in this.at=i?i[1]:"unknown",this.options=n,this.rules=new H((0,r.Z)({},n,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.toString=function(e){if(void 0===e&&(e=_),null==e.indent&&(e.indent=_.indent),null==e.children&&(e.children=_.children),!1===e.children)return this.query+" {}";var t=this.rules.toString(e);return t?this.query+" {\n"+t+"\n}":""},e}(),x=/@media|@supports\s+/,T={onCreateRule:function(e,t,n){return x.test(e)?new S(e,t,n):null}},I={indent:1,children:!0},k=/@keyframes\s+([\w-]+)/,O=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var i=e.match(k);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var o=n.scoped,a=n.sheet,s=n.generateId;for(var l in this.id=!1===o?this.name:y(s(this,a)),this.rules=new H((0,r.Z)({},n,{parent:this})),t)this.rules.add(l,t[l],(0,r.Z)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){if(void 0===e&&(e=I),null==e.indent&&(e.indent=I.indent),null==e.children&&(e.children=I.children),!1===e.children)return this.at+" "+this.id+" {}";var t=this.rules.toString(e);return t&&(t="\n"+t+"\n"),this.at+" "+this.id+" {"+t+"}"},e}(),P=/@keyframes\s+/,N=/\$([\w-]+)/g,A=function(e,t){return"string"==typeof e?e.replace(N,(function(e,n){return n in t?t[n]:e})):e},D=function(e,t,n){var r=e[t],i=A(r,n);i!==r&&(e[t]=i)},R={onCreateRule:function(e,t,n){return"string"==typeof e&&P.test(e)?new O(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&D(e,"animation-name",n.keyframes),"animation"in e&&D(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return A(e,r.keyframes);default:return e}}},M=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).renderable=void 0,t}return(0,a.Z)(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=t&&t.options.link?(0,r.Z)({},e,{allowEmpty:!0}):e;return m(this.key,this.style,n)},t}(b),L={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new M(e,t,n):null}},j=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.style)){for(var t="",n=0;n<this.style.length;n++)t+=m(this.at,this.style[n]),this.style[n+1]&&(t+="\n");return t}return m(this.at,this.style,e)},e}(),F=/@font-face/,W={onCreateRule:function(e,t,n){return F.test(e)?new j(e,t,n):null}},B=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return m(this.key,this.style,e)},e}(),z={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new B(e,t,n):null}},U=function(){function e(e,t,n){this.type="simple",this.key=void 0,this.value=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),V={"@charset":!0,"@import":!0,"@namespace":!0},Z=[E,T,R,L,W,z,{onCreateRule:function(e,t,n){return e in V?new U(e,t,n):null}}],$={process:!0},q={force:!0,process:!0},H=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=void 0,this.classes=void 0,this.keyframes=void 0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var i=this.options,o=i.parent,a=i.sheet,s=i.jss,l=i.Renderer,u=i.generateId,c=i.scoped,h=(0,r.Z)({classes:this.classes,parent:o,sheet:a,jss:s,Renderer:l,generateId:u,scoped:c,name:e},n),f=e;e in this.raw&&(f=e+"-d"+this.counter++),this.raw[f]=t,f in this.classes&&(h.selector="."+y(this.classes[f]));var p=d(f,t,h);if(!p)return null;this.register(p);var m=void 0===h.index?this.index.length:h.index;return this.index.splice(m,0,p),p},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof w?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof O&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof w?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof O&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.map[e],t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=$);var i=this.options,o=i.jss.plugins,a=i.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var s=t,l=s.style;if(o.onUpdate(n,t,a,r),r.process&&l&&l!==s.style){for(var u in o.onProcessStyle(s.style,s,a),s.style){var c=s.style[u];c!==l[u]&&s.prop(u,c,q)}for(var d in l){var h=s.style[d],f=l[d];null==h&&h!==f&&s.prop(d,null,q)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=0;i<this.index.length;i++){var o=this.index[i].toString(e);(o||r)&&(t&&(t+="\n"),t+=o)}return t},e}(),K=function(){function e(e,t){for(var n in this.options=void 0,this.deployed=void 0,this.attached=void 0,this.rules=void 0,this.renderer=void 0,this.classes=void 0,this.keyframes=void 0,this.queue=void 0,this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=(0,r.Z)({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new H(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"==typeof e?e:this.rules.get(e);return!!t&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),G=function(){function e(){this.plugins={internal:[],external:[]},this.registry=void 0}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),Q=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=(0,l.Z)(t,["attached"]),i="",o=0;o<this.registry.length;o++){var a=this.registry[o];null!=n&&a.attached!==n||(i&&(i+="\n"),i+=a.toString(r))}return i},(0,o.Z)(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),Y=new Q,X="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),J="2f1acc6c3a606b082e5eef5e54414ffb";null==X[J]&&(X[J]=0);var ee=X[J]++,te=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var i="",o="";return r&&(r.options.classNamePrefix&&(o=r.options.classNamePrefix),null!=r.options.jss.id&&(i=String(r.options.jss.id))),e.minify?""+(o||"c")+ee+i+t:o+n.key+"-"+ee+(i?"-"+i:"")+"-"+t}},ne=function(e){var t;return function(){return t||(t=e()),t}};function re(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}}function ie(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=f(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"important"),!0;e.attributeStyleMap?e.attributeStyleMap.set(t,r):e.style.setProperty(t,r)}catch(e){return!1}return!0}function oe(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}}function ae(e,t){return e.selectorText=t,e.selectorText===t}var se=ne((function(){return document.querySelector("head")}));var le=ne((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),ue=function(e,t,n){var r=e.cssRules.length;(void 0===n||n>r)&&(n=r);try{"insertRule"in e?e.insertRule(t,n):"appendRule"in e&&e.appendRule(t)}catch(e){return!1}return e.cssRules[n]},ce=function(){function e(e){this.getPropertyValue=re,this.setProperty=ie,this.removeProperty=oe,this.setSelector=ae,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,e&&Y.add(e),this.sheet=e;var t,n=this.sheet?this.sheet.options:{},r=n.media,i=n.meta,o=n.element;this.element=o||((t=document.createElement("style")).textContent="\n",t),this.element.setAttribute("data-jss",""),r&&this.element.setAttribute("media",r),i&&this.element.setAttribute("data-meta",i);var a=le();a&&this.element.setAttribute("nonce",a)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=function(e){var t=Y.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var i=function(e){for(var t=se(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else se().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){var e=this.element.parentNode;e&&e.removeChild(this.element)},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,i=n;return("conditional"!==e.type&&"keyframes"!==e.type||!1!==(i=ue(n,r.toString({children:!1}),t)))&&(this.insertRules(r.rules,i),i)}if(e.renderable&&e.renderable.parentStyleSheet===this.element.sheet)return e.renderable;var o=e.toString();if(!o)return!1;var a=ue(n,o,t);return!1!==a&&(this.hasInsertedRules=!0,e.renderable=a,a)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),!0)},t.indexOf=function(e){for(var t=this.element.sheet.cssRules,n=0;n<t.length;n++)if(e===t[n])return n;return-1},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),de=0,he=function(){function e(e){this.id=de++,this.version="10.1.1",this.plugins=new G,this.options={id:{minify:!1},createGenerateId:te,Renderer:i.Z?ce:null,plugins:[]},this.generateId=te({minify:!1});for(var t=0;t<Z.length;t++)this.plugins.use(Z[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=(0,r.Z)({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!=typeof n&&(n=0===Y.index?0:Y.index+1);var i=new K(e,(0,r.Z)({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(i),i},t.removeStyleSheet=function(e){return e.detach(),Y.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"==typeof e)return this.createRule(void 0,e,t);var i=(0,r.Z)({},n,{name:e,jss:this,Renderer:this.options.Renderer});i.generateId||(i.generateId=this.generateId),i.classes||(i.classes={}),i.keyframes||(i.keyframes={});var o=d(e,t,i);return o&&this.plugins.onProcessRule(o),o},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}();function fe(e){var t=null;for(var n in e){var r=e[n],i=typeof r;if("function"===i)t||(t={}),t[n]=r;else if("object"===i&&null!==r&&!Array.isArray(r)){var o=fe(r);o&&(t||(t={}),t[n]=o)}}return t}var pe="undefined"!=typeof CSS&&CSS&&"number"in CSS,me=function(e){return new he(e)};me()},2043:function(e,t,n){var r,i;!function(o,a){"use strict";void 0===(i="function"==typeof(r=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"];function i(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(r){return"debug"===r&&(r="log"),typeof console!==t&&("trace"===r&&n?o:void 0!==console[r]?i(console,r):void 0!==console.log?i(console,"log"):e)}function s(t,n){for(var i=0;i<r.length;i++){var o=r[i];this[o]=i<t?e:this.methodFactory(o,t,n)}this.log=this.debug}function l(e,n,r){return function(){typeof console!==t&&(s.call(this,n,r),this[e].apply(this,arguments))}}function u(e,t,n){return a(e)||l.apply(this,arguments)}function c(e,n,i){var o,a=this,l="loglevel";function c(){var e;if(typeof window!==t){try{e=window.localStorage[l]}catch(e){}if(typeof e===t)try{var n=window.document.cookie,r=n.indexOf(encodeURIComponent(l)+"=");-1!==r&&(e=/^([^;]+)/.exec(n.slice(r))[1])}catch(e){}return void 0===a.levels[e]&&(e=void 0),e}}e&&(l+=":"+e),a.name=e,a.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},a.methodFactory=i||u,a.getLevel=function(){return o},a.setLevel=function(n,i){if("string"==typeof n&&void 0!==a.levels[n.toUpperCase()]&&(n=a.levels[n.toUpperCase()]),!("number"==typeof n&&n>=0&&n<=a.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(o=n,!1!==i&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window!==t){try{return void(window.localStorage[l]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(l)+"="+n+";"}catch(e){}}}(n),s.call(a,n,e),typeof console===t&&n<a.levels.SILENT)return"No console available for logging"},a.setDefaultLevel=function(e){c()||a.setLevel(e,!1)},a.enableAll=function(e){a.setLevel(a.levels.TRACE,e)},a.disableAll=function(e){a.setLevel(a.levels.SILENT,e)};var d=c();null==d&&(d=null==n?"WARN":n),a.setLevel(d,!1)}var d=new c,h={};d.getLogger=function(e){if("string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=h[e];return t||(t=h[e]=new c(e,d.getLevel(),d.methodFactory)),t};var f=typeof window!==t?window.log:void 0;return d.noConflict=function(){return typeof window!==t&&window.log===d&&(window.log=f),d},d.getLoggers=function(){return h},d})?r.call(t,n,t,e):r)||(e.exports=i)}()},7418:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var a,s,l=i(e),u=1;u<arguments.length;u++){for(var c in a=Object(arguments[u]))n.call(a,c)&&(l[c]=a[c]);if(t){s=t(a);for(var d=0;d<s.length;d++)r.call(a,s[d])&&(l[s[d]]=a[s[d]])}}return l}},2703:(e,t,n)=>{"use strict";var r=n(414);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=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 s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4448:(e,t,n)=>{"use strict";var r=n(7294),i=n(7418),o=n(4142);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var s=new Set,l={};function u(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(l[e]=t,e=0;e<t.length;e++)s.add(t[e])}var d=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),h=/^[: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]*$/,f=Object.prototype.hasOwnProperty,p={},m={};function g(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){v[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];v[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){v[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){v[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){v[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){v[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){v[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){v[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){v[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function w(e,t,n,r){var i=v.hasOwnProperty(t)?v[t]:null;(null!==i?0===i.type:!r&&2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1]))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!f.call(m,e)||!f.call(p,e)&&(h.test(e)?m[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,b);v[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,b);v[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,b);v[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){v[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),v.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){v[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var E=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=60103,C=60106,S=60107,x=60108,T=60114,I=60109,k=60110,O=60112,P=60113,N=60120,A=60115,D=60116,R=60121,M=60128,L=60129,j=60130,F=60131;if("function"==typeof Symbol&&Symbol.for){var W=Symbol.for;_=W("react.element"),C=W("react.portal"),S=W("react.fragment"),x=W("react.strict_mode"),T=W("react.profiler"),I=W("react.provider"),k=W("react.context"),O=W("react.forward_ref"),P=W("react.suspense"),N=W("react.suspense_list"),A=W("react.memo"),D=W("react.lazy"),R=W("react.block"),W("react.scope"),M=W("react.opaque.id"),L=W("react.debug_trace_mode"),j=W("react.offscreen"),F=W("react.legacy_hidden")}var B,z="function"==typeof Symbol&&Symbol.iterator;function U(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=z&&e[z]||e["@@iterator"])?e:null}function V(e){if(void 0===B)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);B=t&&t[1]||""}return"\n"+B+e}var Z=!1;function $(e,t){if(!e||Z)return"";Z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var i=e.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s])return"\n"+i[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{Z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?V(e):""}function q(e){switch(e.tag){case 5:return V(e.type);case 16:return V("Lazy");case 13:return V("Suspense");case 19:return V("SuspenseList");case 0:case 2:case 15:return $(e.type,!1);case 11:return $(e.type.render,!1);case 22:return $(e.type._render,!1);case 1:return $(e.type,!0);default:return""}}function H(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case S:return"Fragment";case C:return"Portal";case T:return"Profiler";case x:return"StrictMode";case P:return"Suspense";case N:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case k:return(e.displayName||"Context")+".Consumer";case I:return(e._context.displayName||"Context")+".Provider";case O:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case A:return H(e.type);case R:return H(e._render);case D:t=e._payload,e=e._init;try{return H(e(t))}catch(e){}}return null}function K(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function G(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Q(e){e._valueTracker||(e._valueTracker=function(e){var t=G(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Y(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=G(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function X(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function J(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=K(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=K(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ie(e,t.type,n):t.hasOwnProperty("defaultValue")&&ie(e,t.type,K(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ie(e,t,n){"number"===t&&X(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function oe(e,t){return e=i({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+K(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function se(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function le(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:K(n)}}function ue(e,t){var n=K(t.value),r=K(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ce(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var de="http://www.w3.org/1999/xhtml";function he(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function fe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?he(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var pe,me,ge=(me=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((pe=pe||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=pe.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return me(e,t)}))}:me);function ve(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ye={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},be=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ye.hasOwnProperty(e)&&ye[e]?(""+t).trim():t+"px"}function Ee(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(ye).forEach((function(e){be.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ye[t]=ye[e]}))}));var _e=i({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 Ce(e,t){if(t){if(_e[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62))}}function Se(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function xe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Te=null,Ie=null,ke=null;function Oe(e){if(e=Jr(e)){if("function"!=typeof Te)throw Error(a(280));var t=e.stateNode;t&&(t=ti(t),Te(e.stateNode,e.type,t))}}function Pe(e){Ie?ke?ke.push(e):ke=[e]:Ie=e}function Ne(){if(Ie){var e=Ie,t=ke;if(ke=Ie=null,Oe(e),t)for(e=0;e<t.length;e++)Oe(t[e])}}function Ae(e,t){return e(t)}function De(e,t,n,r,i){return e(t,n,r,i)}function Re(){}var Me=Ae,Le=!1,je=!1;function Fe(){null===Ie&&null===ke||(Re(),Ne())}function We(e,t){var n=e.stateNode;if(null===n)return null;var r=ti(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var Be=!1;if(d)try{var ze={};Object.defineProperty(ze,"passive",{get:function(){Be=!0}}),window.addEventListener("test",ze,ze),window.removeEventListener("test",ze,ze)}catch(me){Be=!1}function Ue(e,t,n,r,i,o,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}var Ve=!1,Ze=null,$e=!1,qe=null,He={onError:function(e){Ve=!0,Ze=e}};function Ke(e,t,n,r,i,o,a,s,l){Ve=!1,Ze=null,Ue.apply(He,arguments)}function Ge(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Qe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function Ye(e){if(Ge(e)!==e)throw Error(a(188))}function Xe(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ge(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Ye(i),e;if(o===r)return Ye(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function Je(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var et,tt,nt,rt,it=!1,ot=[],at=null,st=null,lt=null,ut=new Map,ct=new Map,dt=[],ht="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 ft(e,t,n,r,i){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:i,targetContainers:[r]}}function pt(e,t){switch(e){case"focusin":case"focusout":at=null;break;case"dragenter":case"dragleave":st=null;break;case"mouseover":case"mouseout":lt=null;break;case"pointerover":case"pointerout":ut.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ct.delete(t.pointerId)}}function mt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e=ft(t,n,r,i,o),null!==t&&null!==(t=Jr(t))&&tt(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function gt(e){var t=Xr(e.target);if(null!==t){var n=Ge(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Qe(n)))return e.blockedOn=t,void rt(e.lanePriority,(function(){o.unstable_runWithPriority(e.priority,(function(){nt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function vt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Xt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Jr(n))&&tt(t),e.blockedOn=n,!1;t.shift()}return!0}function yt(e,t,n){vt(e)&&n.delete(t)}function bt(){for(it=!1;0<ot.length;){var e=ot[0];if(null!==e.blockedOn){null!==(e=Jr(e.blockedOn))&&et(e);break}for(var t=e.targetContainers;0<t.length;){var n=Xt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&ot.shift()}null!==at&&vt(at)&&(at=null),null!==st&&vt(st)&&(st=null),null!==lt&&vt(lt)&&(lt=null),ut.forEach(yt),ct.forEach(yt)}function wt(e,t){e.blockedOn===t&&(e.blockedOn=null,it||(it=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,bt)))}function Et(e){function t(t){return wt(t,e)}if(0<ot.length){wt(ot[0],e);for(var n=1;n<ot.length;n++){var r=ot[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==at&&wt(at,e),null!==st&&wt(st,e),null!==lt&&wt(lt,e),ut.forEach(t),ct.forEach(t),n=0;n<dt.length;n++)(r=dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<dt.length&&null===(n=dt[0]).blockedOn;)gt(n),null===n.blockedOn&&dt.shift()}function _t(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ct={animationend:_t("Animation","AnimationEnd"),animationiteration:_t("Animation","AnimationIteration"),animationstart:_t("Animation","AnimationStart"),transitionend:_t("Transition","TransitionEnd")},St={},xt={};function Tt(e){if(St[e])return St[e];if(!Ct[e])return e;var t,n=Ct[e];for(t in n)if(n.hasOwnProperty(t)&&t in xt)return St[e]=n[t];return e}d&&(xt=document.createElement("div").style,"AnimationEvent"in window||(delete Ct.animationend.animation,delete Ct.animationiteration.animation,delete Ct.animationstart.animation),"TransitionEvent"in window||delete Ct.transitionend.transition);var It=Tt("animationend"),kt=Tt("animationiteration"),Ot=Tt("animationstart"),Pt=Tt("transitionend"),Nt=new Map,At=new Map,Dt=["abort","abort",It,"animationEnd",kt,"animationIteration",Ot,"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",Pt,"transitionEnd","waiting","waiting"];function Rt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1];i="on"+(i[0].toUpperCase()+i.slice(1)),At.set(r,t),Nt.set(r,i),u(i,[r])}}(0,o.unstable_now)();var Mt=8;function Lt(e){if(0!=(1&e))return Mt=15,1;if(0!=(2&e))return Mt=14,2;if(0!=(4&e))return Mt=13,4;var t=24&e;return 0!==t?(Mt=12,t):0!=(32&e)?(Mt=11,32):0!=(t=192&e)?(Mt=10,t):0!=(256&e)?(Mt=9,256):0!=(t=3584&e)?(Mt=8,t):0!=(4096&e)?(Mt=7,4096):0!=(t=4186112&e)?(Mt=6,t):0!=(t=62914560&e)?(Mt=5,t):67108864&e?(Mt=4,67108864):0!=(134217728&e)?(Mt=3,134217728):0!=(t=805306368&e)?(Mt=2,t):0!=(1073741824&e)?(Mt=1,1073741824):(Mt=8,e)}function jt(e,t){var n=e.pendingLanes;if(0===n)return Mt=0;var r=0,i=0,o=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==o)r=o,i=Mt=15;else if(0!=(o=134217727&n)){var l=o&~a;0!==l?(r=Lt(l),i=Mt):0!=(s&=o)&&(r=Lt(s),i=Mt)}else 0!=(o=n&~a)?(r=Lt(o),i=Mt):0!==s&&(r=Lt(s),i=Mt);if(0===r)return 0;if(r=n&((0>(r=31-Vt(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0==(t&a)){if(Lt(t),i<=Mt)return t;Mt=i}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-Vt(t)),r|=e[n],t&=~i;return r}function Ft(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Wt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Bt(24&~t))?Wt(10,t):e;case 10:return 0===(e=Bt(192&~t))?Wt(8,t):e;case 8:return 0===(e=Bt(3584&~t))&&0===(e=Bt(4186112&~t))&&(e=512),e;case 2:return 0===(t=Bt(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function Bt(e){return e&-e}function zt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ut(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Vt(t)]=n}var Vt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Zt(e)/$t|0)|0},Zt=Math.log,$t=Math.LN2,qt=o.unstable_UserBlockingPriority,Ht=o.unstable_runWithPriority,Kt=!0;function Gt(e,t,n,r){Le||Re();var i=Yt,o=Le;Le=!0;try{De(i,e,t,n,r)}finally{(Le=o)||Fe()}}function Qt(e,t,n,r){Ht(qt,Yt.bind(null,e,t,n,r))}function Yt(e,t,n,r){var i;if(Kt)if((i=0==(4&t))&&0<ot.length&&-1<ht.indexOf(e))e=ft(null,e,t,n,r),ot.push(e);else{var o=Xt(e,t,n,r);if(null===o)i&&pt(e,r);else{if(i){if(-1<ht.indexOf(e))return e=ft(o,e,t,n,r),void ot.push(e);if(function(e,t,n,r,i){switch(t){case"focusin":return at=mt(at,e,t,n,r,i),!0;case"dragenter":return st=mt(st,e,t,n,r,i),!0;case"mouseover":return lt=mt(lt,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return ut.set(o,mt(ut.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,ct.set(o,mt(ct.get(o)||null,e,t,n,r,i)),!0}return!1}(o,e,t,n,r))return;pt(e,r)}Nr(e,t,r,null,n)}}}function Xt(e,t,n,r){var i=xe(r);if(null!==(i=Xr(i))){var o=Ge(i);if(null===o)i=null;else{var a=o.tag;if(13===a){if(null!==(i=Qe(o)))return i;i=null}else if(3===a){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return Nr(e,t,r,i,n),null}var Jt=null,en=null,tn=null;function nn(){if(tn)return tn;var e,t,n=en,r=n.length,i="value"in Jt?Jt.value:Jt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return tn=i.slice(e,1<t?1-t:void 0)}function rn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function on(){return!0}function an(){return!1}function sn(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?on:an,this.isPropagationStopped=an,this}return i(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=on)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=on)},persist:function(){},isPersistent:on}),t}var ln,un,cn,dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hn=sn(dn),fn=i({},dn,{view:0,detail:0}),pn=sn(fn),mn=i({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==cn&&(cn&&"mousemove"===e.type?(ln=e.screenX-cn.screenX,un=e.screenY-cn.screenY):un=ln=0,cn=e),ln)},movementY:function(e){return"movementY"in e?e.movementY:un}}),gn=sn(mn),vn=sn(i({},mn,{dataTransfer:0})),yn=sn(i({},fn,{relatedTarget:0})),bn=sn(i({},dn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=sn(i({},dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),En=sn(i({},dn,{data:0})),_n={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cn={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"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sn[e])&&!!t[e]}function Tn(){return xn}var In=sn(i({},fn,{key:function(e){if(e.key){var t=_n[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=rn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Cn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tn,charCode:function(e){return"keypress"===e.type?rn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?rn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),kn=sn(i({},mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),On=sn(i({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tn})),Pn=sn(i({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Nn=sn(i({},mn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),An=[9,13,27,32],Dn=d&&"CompositionEvent"in window,Rn=null;d&&"documentMode"in document&&(Rn=document.documentMode);var Mn=d&&"TextEvent"in window&&!Rn,Ln=d&&(!Dn||Rn&&8<Rn&&11>=Rn),jn=String.fromCharCode(32),Fn=!1;function Wn(e,t){switch(e){case"keyup":return-1!==An.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var zn=!1,Un={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 Vn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Un[e.type]:"textarea"===t}function Zn(e,t,n,r){Pe(r),0<(t=Dr(t,"onChange")).length&&(n=new hn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var $n=null,qn=null;function Hn(e){xr(e,0)}function Kn(e){if(Y(ei(e)))return e}function Gn(e,t){if("change"===e)return t}var Qn=!1;if(d){var Yn;if(d){var Xn="oninput"in document;if(!Xn){var Jn=document.createElement("div");Jn.setAttribute("oninput","return;"),Xn="function"==typeof Jn.oninput}Yn=Xn}else Yn=!1;Qn=Yn&&(!document.documentMode||9<document.documentMode)}function er(){$n&&($n.detachEvent("onpropertychange",tr),qn=$n=null)}function tr(e){if("value"===e.propertyName&&Kn(qn)){var t=[];if(Zn(t,qn,e,xe(e)),e=Hn,Le)e(t);else{Le=!0;try{Ae(e,t)}finally{Le=!1,Fe()}}}}function nr(e,t,n){"focusin"===e?(er(),qn=n,($n=t).attachEvent("onpropertychange",tr)):"focusout"===e&&er()}function rr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Kn(qn)}function ir(e,t){if("click"===e)return Kn(t)}function or(e,t){if("input"===e||"change"===e)return Kn(t)}var ar="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},sr=Object.prototype.hasOwnProperty;function lr(e,t){if(ar(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!sr.call(t,n[r])||!ar(e[n[r]],t[n[r]]))return!1;return!0}function ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cr(e,t){var n,r=ur(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ur(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=X();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=X((e=t.contentWindow).document)}return t}function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var pr=d&&"documentMode"in document&&11>=document.documentMode,mr=null,gr=null,vr=null,yr=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;yr||null==mr||mr!==X(r)||(r="selectionStart"in(r=mr)&&fr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},vr&&lr(vr,r)||(vr=r,0<(r=Dr(gr,"onSelect")).length&&(t=new hn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}Rt("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),Rt("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),Rt(Dt,2);for(var wr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Er=0;Er<wr.length;Er++)At.set(wr[Er],0);c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _r="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Cr=new Set("cancel close invalid load scroll toggle".split(" ").concat(_r));function Sr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,s,l,u){if(Ke.apply(this,arguments),Ve){if(!Ve)throw Error(a(198));var c=Ze;Ve=!1,Ze=null,$e||($e=!0,qe=c)}}(r,t,void 0,e),e.currentTarget=null}function xr(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;Sr(i,s,u),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,u=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;Sr(i,s,u),o=l}}}if($e)throw e=qe,$e=!1,qe=null,e}function Tr(e,t){var n=ni(t),r=e+"__bubble";n.has(r)||(Pr(t,e,2,!1),n.add(r))}var Ir="_reactListening"+Math.random().toString(36).slice(2);function kr(e){e[Ir]||(e[Ir]=!0,s.forEach((function(t){Cr.has(t)||Or(t,!1,e,null),Or(t,!0,e,null)})))}function Or(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=n;if("selectionchange"===e&&9!==n.nodeType&&(o=n.ownerDocument),null!==r&&!t&&Cr.has(e)){if("scroll"!==e)return;i|=2,o=r}var a=ni(o),s=e+"__"+(t?"capture":"bubble");a.has(s)||(t&&(i|=4),Pr(o,e,i,t),a.add(s))}function Pr(e,t,n,r){var i=At.get(t);switch(void 0===i?2:i){case 0:i=Gt;break;case 1:i=Qt;break;default:i=Yt}n=i.bind(null,t,n,e),i=void 0,!Be||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Nr(e,t,n,r,i){var o=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=Xr(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}!function(e,t,n){if(je)return e();je=!0;try{Me(e,t,n)}finally{je=!1,Fe()}}((function(){var r=o,i=xe(n),a=[];e:{var s=Nt.get(e);if(void 0!==s){var l=hn,u=e;switch(e){case"keypress":if(0===rn(n))break e;case"keydown":case"keyup":l=In;break;case"focusin":u="focus",l=yn;break;case"focusout":u="blur",l=yn;break;case"beforeblur":case"afterblur":l=yn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=gn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=vn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=On;break;case It:case kt:case Ot:l=bn;break;case Pt:l=Pn;break;case"scroll":l=pn;break;case"wheel":l=Nn;break;case"copy":case"cut":case"paste":l=wn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=kn}var c=0!=(4&t),d=!c&&"scroll"===e,h=c?null!==s?s+"Capture":null:s;c=[];for(var f,p=r;null!==p;){var m=(f=p).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==h&&null!=(m=We(p,h))&&c.push(Ar(p,m,f))),d)break;p=p.return}0<c.length&&(s=new l(s,u,null,n,i),a.push({event:s,listeners:c}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!=(16&t)||!(u=n.relatedTarget||n.fromElement)||!Xr(u)&&!u[Qr])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?Xr(u):null)&&(u!==(d=Ge(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=gn,m="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(c=kn,m="onPointerLeave",h="onPointerEnter",p="pointer"),d=null==l?s:ei(l),f=null==u?s:ei(u),(s=new c(m,p+"leave",l,n,i)).target=d,s.relatedTarget=f,m=null,Xr(i)===r&&((c=new c(h,p+"enter",u,n,i)).target=f,c.relatedTarget=d,m=c),d=m,l&&u)e:{for(h=u,p=0,f=c=l;f;f=Rr(f))p++;for(f=0,m=h;m;m=Rr(m))f++;for(;0<p-f;)c=Rr(c),p--;for(;0<f-p;)h=Rr(h),f--;for(;p--;){if(c===h||null!==h&&c===h.alternate)break e;c=Rr(c),h=Rr(h)}c=null}else c=null;null!==l&&Mr(a,s,l,c,!1),null!==u&&null!==d&&Mr(a,d,u,c,!0)}if("select"===(l=(s=r?ei(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Gn;else if(Vn(s))if(Qn)g=or;else{g=rr;var v=nr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=ir);switch(g&&(g=g(e,r))?Zn(a,g,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ie(s,"number",s.value)),v=r?ei(r):window,e){case"focusin":(Vn(v)||"true"===v.contentEditable)&&(mr=v,gr=r,vr=null);break;case"focusout":vr=gr=mr=null;break;case"mousedown":yr=!0;break;case"contextmenu":case"mouseup":case"dragend":yr=!1,br(a,n,i);break;case"selectionchange":if(pr)break;case"keydown":case"keyup":br(a,n,i)}var y;if(Dn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else zn?Wn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Ln&&"ko"!==n.locale&&(zn||"onCompositionStart"!==b?"onCompositionEnd"===b&&zn&&(y=nn()):(en="value"in(Jt=i)?Jt.value:Jt.textContent,zn=!0)),0<(v=Dr(r,b)).length&&(b=new En(b,e,null,n,i),a.push({event:b,listeners:v}),(y||null!==(y=Bn(n)))&&(b.data=y))),(y=Mn?function(e,t){switch(e){case"compositionend":return Bn(t);case"keypress":return 32!==t.which?null:(Fn=!0,jn);case"textInput":return(e=t.data)===jn&&Fn?null:e;default:return null}}(e,n):function(e,t){if(zn)return"compositionend"===e||!Dn&&Wn(e,t)?(e=nn(),tn=en=Jt=null,zn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ln&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))&&0<(r=Dr(r,"onBeforeInput")).length&&(i=new En("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=y)}xr(a,t)}))}function Ar(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Dr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=We(e,n))&&r.unshift(Ar(e,o,i)),null!=(o=We(e,t))&&r.push(Ar(e,o,i))),e=e.return}return r}function Rr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Mr(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==u&&(s=u,i?null!=(l=We(n,o))&&a.unshift(Ar(n,l,s)):i||null!=(l=We(n,o))&&a.push(Ar(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function Lr(){}var jr=null,Fr=null;function Wr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Br(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var zr="function"==typeof setTimeout?setTimeout:void 0,Ur="function"==typeof clearTimeout?clearTimeout:void 0;function Vr(e){(1===e.nodeType||9===e.nodeType&&null!=(e=e.body))&&(e.textContent="")}function Zr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function $r(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var qr=0,Hr=Math.random().toString(36).slice(2),Kr="__reactFiber$"+Hr,Gr="__reactProps$"+Hr,Qr="__reactContainer$"+Hr,Yr="__reactEvents$"+Hr;function Xr(e){var t=e[Kr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Qr]||n[Kr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=$r(e);null!==e;){if(n=e[Kr])return n;e=$r(e)}return t}n=(e=n).parentNode}return null}function Jr(e){return!(e=e[Kr]||e[Qr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ei(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function ti(e){return e[Gr]||null}function ni(e){var t=e[Yr];return void 0===t&&(t=e[Yr]=new Set),t}var ri=[],ii=-1;function oi(e){return{current:e}}function ai(e){0>ii||(e.current=ri[ii],ri[ii]=null,ii--)}function si(e,t){ii++,ri[ii]=e.current,e.current=t}var li={},ui=oi(li),ci=oi(!1),di=li;function hi(e,t){var n=e.type.contextTypes;if(!n)return li;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function fi(e){return null!=e.childContextTypes}function pi(){ai(ci),ai(ui)}function mi(e,t,n){if(ui.current!==li)throw Error(a(168));si(ui,t),si(ci,n)}function gi(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(a(108,H(t)||"Unknown",o));return i({},n,r)}function vi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||li,di=ui.current,si(ui,e),si(ci,ci.current),!0}function yi(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=gi(e,t,di),r.__reactInternalMemoizedMergedChildContext=e,ai(ci),ai(ui),si(ui,e)):ai(ci),si(ci,n)}var bi=null,wi=null,Ei=o.unstable_runWithPriority,_i=o.unstable_scheduleCallback,Ci=o.unstable_cancelCallback,Si=o.unstable_shouldYield,xi=o.unstable_requestPaint,Ti=o.unstable_now,Ii=o.unstable_getCurrentPriorityLevel,ki=o.unstable_ImmediatePriority,Oi=o.unstable_UserBlockingPriority,Pi=o.unstable_NormalPriority,Ni=o.unstable_LowPriority,Ai=o.unstable_IdlePriority,Di={},Ri=void 0!==xi?xi:function(){},Mi=null,Li=null,ji=!1,Fi=Ti(),Wi=1e4>Fi?Ti:function(){return Ti()-Fi};function Bi(){switch(Ii()){case ki:return 99;case Oi:return 98;case Pi:return 97;case Ni:return 96;case Ai:return 95;default:throw Error(a(332))}}function zi(e){switch(e){case 99:return ki;case 98:return Oi;case 97:return Pi;case 96:return Ni;case 95:return Ai;default:throw Error(a(332))}}function Ui(e,t){return e=zi(e),Ei(e,t)}function Vi(e,t,n){return e=zi(e),_i(e,t,n)}function Zi(){if(null!==Li){var e=Li;Li=null,Ci(e)}$i()}function $i(){if(!ji&&null!==Mi){ji=!0;var e=0;try{var t=Mi;Ui(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Mi=null}catch(t){throw null!==Mi&&(Mi=Mi.slice(e+1)),_i(ki,Zi),t}finally{ji=!1}}}var qi=E.ReactCurrentBatchConfig;function Hi(e,t){if(e&&e.defaultProps){for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Ki=oi(null),Gi=null,Qi=null,Yi=null;function Xi(){Yi=Qi=Gi=null}function Ji(e){var t=Ki.current;ai(Ki),e.type._context._currentValue=t}function eo(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function to(e,t){Gi=e,Yi=Qi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Da=!0),e.firstContext=null)}function no(e,t){if(Yi!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(Yi=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Qi){if(null===Gi)throw Error(a(308));Qi=t,Gi.dependencies={lanes:0,firstContext:t,responders:null}}else Qi=Qi.next=t;return e._currentValue}var ro=!1;function io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function oo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ao(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function so(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function lo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function uo(e,t,n,r){var o=e.updateQueue;ro=!1;var a=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(null!==l){o.shared.pending=null;var u=l,c=u.next;u.next=null,null===s?a=c:s.next=c,s=u;var d=e.alternate;if(null!==d){var h=(d=d.updateQueue).lastBaseUpdate;h!==s&&(null===h?d.firstBaseUpdate=c:h.next=c,d.lastBaseUpdate=u)}}if(null!==a){for(h=o.baseState,s=0,d=c=u=null;;){l=a.lane;var f=a.eventTime;if((r&l)===l){null!==d&&(d=d.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,m=a;switch(l=t,f=n,m.tag){case 1:if("function"==typeof(p=m.payload)){h=p.call(f,h,l);break e}h=p;break e;case 3:p.flags=-4097&p.flags|64;case 0:if(null==(l="function"==typeof(p=m.payload)?p.call(f,h,l):p))break e;h=i({},h,l);break e;case 2:ro=!0}}null!==a.callback&&(e.flags|=32,null===(l=o.effects)?o.effects=[a]:l.push(a))}else f={eventTime:f,lane:l,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===d?(c=d=f,u=h):d=d.next=f,s|=l;if(null===(a=a.next)){if(null===(l=o.shared.pending))break;a=l.next,l.next=null,o.lastBaseUpdate=l,o.shared.pending=null}}null===d&&(u=h),o.baseState=u,o.firstBaseUpdate=c,o.lastBaseUpdate=d,Ms|=s,e.lanes=s,e.memoizedState=h}}function co(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(a(191,i));i.call(r)}}}var ho=(new r.Component).refs;function fo(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:i({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var po={isMounted:function(e){return!!(e=e._reactInternals)&&Ge(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=al(),i=sl(e),o=ao(r,i);o.payload=t,null!=n&&(o.callback=n),so(e,o),ll(e,i,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=al(),i=sl(e),o=ao(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),so(e,o),ll(e,i,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=al(),r=sl(e),i=ao(n,r);i.tag=2,null!=t&&(i.callback=t),so(e,i),ll(e,r,n)}};function mo(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!(t.prototype&&t.prototype.isPureReactComponent&&lr(n,r)&&lr(i,o))}function go(e,t,n){var r=!1,i=li,o=t.contextType;return"object"==typeof o&&null!==o?o=no(o):(i=fi(t)?di:ui.current,o=(r=null!=(r=t.contextTypes))?hi(e,i):li),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=po,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function vo(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&po.enqueueReplaceState(t,t.state,null)}function yo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=ho,io(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=no(o):(o=fi(t)?di:ui.current,i.context=hi(e,o)),uo(e,n,i,r),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(fo(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&po.enqueueReplaceState(i,i.state,null),uo(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4)}var bo=Array.isArray;function wo(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=r.refs;t===ho&&(t=r.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Eo(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function _o(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Bl(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function s(t){return e&&null===t.alternate&&(t.flags=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Zl(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function u(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=wo(e,t,n),r.return=e,r):((r=zl(n.type,n.key,n.props,null,e.mode,r)).ref=wo(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=$l(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=Ul(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Zl(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case _:return(n=zl(t.type,t.key,t.props,null,e.mode,n)).ref=wo(e,null,t),n.return=e,n;case C:return(t=$l(t,e.mode,n)).return=e,t}if(bo(t)||U(t))return(t=Ul(t,e.mode,n,null)).return=e,t;Eo(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case _:return n.key===i?n.type===S?d(e,t,n.props.children,r,i):u(e,t,n,r):null;case C:return n.key===i?c(e,t,n,r):null}if(bo(n)||U(n))return null!==i?null:d(e,t,n,r,null);Eo(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case _:return e=e.get(null===r.key?n:r.key)||null,r.type===S?d(t,e,r.props.children,i,r.key):u(t,e,r,i);case C:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(bo(r)||U(r))return d(t,e=e.get(n)||null,r,i,null);Eo(t,r)}return null}function m(i,a,s,l){for(var u=null,c=null,d=a,m=a=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=f(i,d,s[m],l);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(i,d),a=o(v,a,m),null===c?u=v:c.sibling=v,c=v,d=g}if(m===s.length)return n(i,d),u;if(null===d){for(;m<s.length;m++)null!==(d=h(i,s[m],l))&&(a=o(d,a,m),null===c?u=d:c.sibling=d,c=d);return u}for(d=r(i,d);m<s.length;m++)null!==(g=p(d,i,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),a=o(g,a,m),null===c?u=g:c.sibling=g,c=g);return e&&d.forEach((function(e){return t(i,e)})),u}function g(i,s,l,u){var c=U(l);if("function"!=typeof c)throw Error(a(150));if(null==(l=c.call(l)))throw Error(a(151));for(var d=c=null,m=s,g=s=0,v=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var b=f(i,m,y.value,u);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(i,m),s=o(b,s,g),null===d?c=b:d.sibling=b,d=b,m=v}if(y.done)return n(i,m),c;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=h(i,y.value,u))&&(s=o(y,s,g),null===d?c=y:d.sibling=y,d=y);return c}for(m=r(i,m);!y.done;g++,y=l.next())null!==(y=p(m,i,g,y.value,u))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=o(y,s,g),null===d?c=y:d.sibling=y,d=y);return e&&m.forEach((function(e){return t(i,e)})),c}return function(e,r,o,l){var u="object"==typeof o&&null!==o&&o.type===S&&null===o.key;u&&(o=o.props.children);var c="object"==typeof o&&null!==o;if(c)switch(o.$$typeof){case _:e:{for(c=o.key,u=r;null!==u;){if(u.key===c){switch(u.tag){case 7:if(o.type===S){n(e,u.sibling),(r=i(u,o.props.children)).return=e,e=r;break e}break;default:if(u.elementType===o.type){n(e,u.sibling),(r=i(u,o.props)).ref=wo(e,u,o),r.return=e,e=r;break e}}n(e,u);break}t(e,u),u=u.sibling}o.type===S?((r=Ul(o.props.children,e.mode,l,o.key)).return=e,e=r):((l=zl(o.type,o.key,o.props,null,e.mode,l)).ref=wo(e,r,o),l.return=e,e=l)}return s(e);case C:e:{for(u=o.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=$l(o,e.mode,l)).return=e,e=r}return s(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=Zl(o,e.mode,l)).return=e,e=r),s(e);if(bo(o))return m(e,r,o,l);if(U(o))return g(e,r,o,l);if(c&&Eo(e,o),void 0===o&&!u)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,H(e.type)||"Component"))}return n(e,r)}}var Co=_o(!0),So=_o(!1),xo={},To=oi(xo),Io=oi(xo),ko=oi(xo);function Oo(e){if(e===xo)throw Error(a(174));return e}function Po(e,t){switch(si(ko,t),si(Io,e),si(To,xo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:fe(null,"");break;default:t=fe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ai(To),si(To,t)}function No(){ai(To),ai(Io),ai(ko)}function Ao(e){Oo(ko.current);var t=Oo(To.current),n=fe(t,e.type);t!==n&&(si(Io,e),si(To,n))}function Do(e){Io.current===e&&(ai(To),ai(Io))}var Ro=oi(0);function Mo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Lo=null,jo=null,Fo=!1;function Wo(e,t){var n=Fl(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Bo(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function zo(e){if(Fo){var t=jo;if(t){var n=t;if(!Bo(e,t)){if(!(t=Zr(n.nextSibling))||!Bo(e,t))return e.flags=-1025&e.flags|2,Fo=!1,void(Lo=e);Wo(Lo,n)}Lo=e,jo=Zr(t.firstChild)}else e.flags=-1025&e.flags|2,Fo=!1,Lo=e}}function Uo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Lo=e}function Vo(e){if(e!==Lo)return!1;if(!Fo)return Uo(e),Fo=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Br(t,e.memoizedProps))for(t=jo;t;)Wo(e,t),t=Zr(t.nextSibling);if(Uo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){jo=Zr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}jo=null}}else jo=Lo?Zr(e.stateNode.nextSibling):null;return!0}function Zo(){jo=Lo=null,Fo=!1}var $o=[];function qo(){for(var e=0;e<$o.length;e++)$o[e]._workInProgressVersionPrimary=null;$o.length=0}var Ho=E.ReactCurrentDispatcher,Ko=E.ReactCurrentBatchConfig,Go=0,Qo=null,Yo=null,Xo=null,Jo=!1,ea=!1;function ta(){throw Error(a(321))}function na(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ar(e[n],t[n]))return!1;return!0}function ra(e,t,n,r,i,o){if(Go=o,Qo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ho.current=null===e||null===e.memoizedState?Oa:Pa,e=n(r,i),ea){o=0;do{if(ea=!1,!(25>o))throw Error(a(301));o+=1,Xo=Yo=null,t.updateQueue=null,Ho.current=Na,e=n(r,i)}while(ea)}if(Ho.current=ka,t=null!==Yo&&null!==Yo.next,Go=0,Xo=Yo=Qo=null,Jo=!1,t)throw Error(a(300));return e}function ia(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Xo?Qo.memoizedState=Xo=e:Xo=Xo.next=e,Xo}function oa(){if(null===Yo){var e=Qo.alternate;e=null!==e?e.memoizedState:null}else e=Yo.next;var t=null===Xo?Qo.memoizedState:Xo.next;if(null!==t)Xo=t,Yo=e;else{if(null===e)throw Error(a(310));e={memoizedState:(Yo=e).memoizedState,baseState:Yo.baseState,baseQueue:Yo.baseQueue,queue:Yo.queue,next:null},null===Xo?Qo.memoizedState=Xo=e:Xo=Xo.next=e}return Xo}function aa(e,t){return"function"==typeof t?t(e):t}function sa(e){var t=oa(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=Yo,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var l=s=o=null,u=i;do{var c=u.lane;if((Go&c)===c)null!==l&&(l=l.next={lane:0,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),r=u.eagerReducer===e?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};null===l?(s=l=d,o=r):l=l.next=d,Qo.lanes|=c,Ms|=c}u=u.next}while(null!==u&&u!==i);null===l?o=r:l.next=s,ar(r,t.memoizedState)||(Da=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function la(e){var t=oa(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);ar(o,t.memoizedState)||(Da=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ua(e,t,n){var r=t._getVersion;r=r(t._source);var i=t._workInProgressVersionPrimary;if(null!==i?e=i===r:(e=e.mutableReadLanes,(e=(Go&e)===e)&&(t._workInProgressVersionPrimary=r,$o.push(t))),e)return n(t._source);throw $o.push(t),Error(a(350))}function ca(e,t,n,r){var i=Is;if(null===i)throw Error(a(349));var o=t._getVersion,s=o(t._source),l=Ho.current,u=l.useState((function(){return ua(i,t,n)})),c=u[1],d=u[0];u=Xo;var h=e.memoizedState,f=h.refs,p=f.getSnapshot,m=h.source;h=h.subscribe;var g=Qo;return e.memoizedState={refs:f,source:t,subscribe:r},l.useEffect((function(){f.getSnapshot=n,f.setSnapshot=c;var e=o(t._source);if(!ar(s,e)){e=n(t._source),ar(d,e)||(c(e),e=sl(g),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,a=e;0<a;){var l=31-Vt(a),u=1<<l;r[l]|=e,a&=~u}}}),[n,t,r]),l.useEffect((function(){return r(t._source,(function(){var e=f.getSnapshot,n=f.setSnapshot;try{n(e(t._source));var r=sl(g);i.mutableReadLanes|=r&i.pendingLanes}catch(e){n((function(){throw e}))}}))}),[t,r]),ar(p,n)&&ar(m,t)&&ar(h,r)||((e={pending:null,dispatch:null,lastRenderedReducer:aa,lastRenderedState:d}).dispatch=c=Ia.bind(null,Qo,e),u.queue=e,u.baseQueue=null,d=ua(i,t,n),u.memoizedState=u.baseState=d),d}function da(e,t,n){return ca(oa(),e,t,n)}function ha(e){var t=ia();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:aa,lastRenderedState:e}).dispatch=Ia.bind(null,Qo,e),[t.memoizedState,e]}function fa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Qo.updateQueue)?(t={lastEffect:null},Qo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function pa(e){return e={current:e},ia().memoizedState=e}function ma(){return oa().memoizedState}function ga(e,t,n,r){var i=ia();Qo.flags|=e,i.memoizedState=fa(1|t,n,void 0,void 0===r?null:r)}function va(e,t,n,r){var i=oa();r=void 0===r?null:r;var o=void 0;if(null!==Yo){var a=Yo.memoizedState;if(o=a.destroy,null!==r&&na(r,a.deps))return void fa(t,n,o,r)}Qo.flags|=e,i.memoizedState=fa(1|t,n,o,r)}function ya(e,t){return ga(516,4,e,t)}function ba(e,t){return va(516,4,e,t)}function wa(e,t){return va(4,2,e,t)}function Ea(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function _a(e,t,n){return n=null!=n?n.concat([e]):null,va(4,2,Ea.bind(null,t,e),n)}function Ca(){}function Sa(e,t){var n=oa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&na(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xa(e,t){var n=oa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&na(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ta(e,t){var n=Bi();Ui(98>n?98:n,(function(){e(!0)})),Ui(97<n?97:n,(function(){var n=Ko.transition;Ko.transition=1;try{e(!1),t()}finally{Ko.transition=n}}))}function Ia(e,t,n){var r=al(),i=sl(e),o={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?o.next=o:(o.next=a.next,a.next=o),t.pending=o,a=e.alternate,e===Qo||null!==a&&a===Qo)ea=Jo=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,l=a(s,n);if(o.eagerReducer=a,o.eagerState=l,ar(l,s))return}catch(e){}ll(e,i,r)}}var ka={readContext:no,useCallback:ta,useContext:ta,useEffect:ta,useImperativeHandle:ta,useLayoutEffect:ta,useMemo:ta,useReducer:ta,useRef:ta,useState:ta,useDebugValue:ta,useDeferredValue:ta,useTransition:ta,useMutableSource:ta,useOpaqueIdentifier:ta,unstable_isNewReconciler:!1},Oa={readContext:no,useCallback:function(e,t){return ia().memoizedState=[e,void 0===t?null:t],e},useContext:no,useEffect:ya,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ga(4,2,Ea.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ga(4,2,e,t)},useMemo:function(e,t){var n=ia();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ia();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Ia.bind(null,Qo,e),[r.memoizedState,e]},useRef:pa,useState:ha,useDebugValue:Ca,useDeferredValue:function(e){var t=ha(e),n=t[0],r=t[1];return ya((function(){var t=Ko.transition;Ko.transition=1;try{r(e)}finally{Ko.transition=t}}),[e]),n},useTransition:function(){var e=ha(!1),t=e[0];return pa(e=Ta.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=ia();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},ca(r,e,t,n)},useOpaqueIdentifier:function(){if(Fo){var e=!1,t=function(e){return{$$typeof:M,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(qr++).toString(36))),Error(a(355))})),n=ha(t)[1];return 0==(2&Qo.mode)&&(Qo.flags|=516,fa(5,(function(){n("r:"+(qr++).toString(36))}),void 0,null)),t}return ha(t="r:"+(qr++).toString(36)),t},unstable_isNewReconciler:!1},Pa={readContext:no,useCallback:Sa,useContext:no,useEffect:ba,useImperativeHandle:_a,useLayoutEffect:wa,useMemo:xa,useReducer:sa,useRef:ma,useState:function(){return sa(aa)},useDebugValue:Ca,useDeferredValue:function(e){var t=sa(aa),n=t[0],r=t[1];return ba((function(){var t=Ko.transition;Ko.transition=1;try{r(e)}finally{Ko.transition=t}}),[e]),n},useTransition:function(){var e=sa(aa)[0];return[ma().current,e]},useMutableSource:da,useOpaqueIdentifier:function(){return sa(aa)[0]},unstable_isNewReconciler:!1},Na={readContext:no,useCallback:Sa,useContext:no,useEffect:ba,useImperativeHandle:_a,useLayoutEffect:wa,useMemo:xa,useReducer:la,useRef:ma,useState:function(){return la(aa)},useDebugValue:Ca,useDeferredValue:function(e){var t=la(aa),n=t[0],r=t[1];return ba((function(){var t=Ko.transition;Ko.transition=1;try{r(e)}finally{Ko.transition=t}}),[e]),n},useTransition:function(){var e=la(aa)[0];return[ma().current,e]},useMutableSource:da,useOpaqueIdentifier:function(){return la(aa)[0]},unstable_isNewReconciler:!1},Aa=E.ReactCurrentOwner,Da=!1;function Ra(e,t,n,r){t.child=null===e?So(t,null,n,r):Co(t,e.child,n,r)}function Ma(e,t,n,r,i){n=n.render;var o=t.ref;return to(t,i),r=ra(e,t,n,r,o,i),null===e||Da?(t.flags|=1,Ra(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,Ja(e,t,i))}function La(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!=typeof a||Wl(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=zl(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,ja(e,t,a,r,i,o))}return a=e.child,0==(i&o)&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:lr)(i,r)&&e.ref===t.ref)?Ja(e,t,o):(t.flags|=1,(e=Bl(a,r)).ref=t.ref,e.return=t,t.child=e)}function ja(e,t,n,r,i,o){if(null!==e&&lr(e.memoizedProps,r)&&e.ref===t.ref){if(Da=!1,0==(o&i))return t.lanes=e.lanes,Ja(e,t,o);0!=(16384&e.flags)&&(Da=!0)}return Ba(e,t,n,r,o)}function Fa(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0==(4&t.mode))t.memoizedState={baseLanes:0},gl(0,n);else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},gl(0,e),null;t.memoizedState={baseLanes:0},gl(0,null!==o?o.baseLanes:n)}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,gl(0,r);return Ra(e,t,i,n),t.child}function Wa(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Ba(e,t,n,r,i){var o=fi(n)?di:ui.current;return o=hi(t,o),to(t,i),n=ra(e,t,n,r,o,i),null===e||Da?(t.flags|=1,Ra(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,Ja(e,t,i))}function za(e,t,n,r,i){if(fi(n)){var o=!0;vi(t)}else o=!1;if(to(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),go(t,n,r),yo(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;u="object"==typeof u&&null!==u?no(u):hi(t,u=fi(n)?di:ui.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==u)&&vo(t,a,r,u),ro=!1;var h=t.memoizedState;a.state=h,uo(t,r,a,i),l=t.memoizedState,s!==r||h!==l||ci.current||ro?("function"==typeof c&&(fo(t,n,c,r),l=t.memoizedState),(s=ro||mo(t,n,s,r,h,l,u))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4)):("function"==typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,oo(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Hi(t.type,s),a.props=u,d=t.pendingProps,h=a.context,l="object"==typeof(l=n.contextType)&&null!==l?no(l):hi(t,l=fi(n)?di:ui.current);var f=n.getDerivedStateFromProps;(c="function"==typeof f||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||h!==l)&&vo(t,a,r,l),ro=!1,h=t.memoizedState,a.state=h,uo(t,r,a,i);var p=t.memoizedState;s!==d||h!==p||ci.current||ro?("function"==typeof f&&(fo(t,n,f,r),p=t.memoizedState),(u=ro||mo(t,n,u,r,h,p,l))?(c||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=u):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),r=!1)}return Ua(e,t,n,r,o,i)}function Ua(e,t,n,r,i,o){Wa(e,t);var a=0!=(64&t.flags);if(!r&&!a)return i&&yi(t,n,!1),Ja(e,t,o);r=t.stateNode,Aa.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Co(t,e.child,null,o),t.child=Co(t,null,s,o)):Ra(e,t,s,o),t.memoizedState=r.state,i&&yi(t,n,!0),t.child}function Va(e){var t=e.stateNode;t.pendingContext?mi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&mi(0,t.context,!1),Po(e,t.containerInfo)}var Za,$a,qa,Ha={dehydrated:null,retryLane:0};function Ka(e,t,n){var r,i=t.pendingProps,o=Ro.current,a=!1;return(r=0!=(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!=(2&o)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(o|=1),si(Ro,1&o),null===e?(void 0!==i.fallback&&zo(t),e=i.children,o=i.fallback,a?(e=Ga(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Ha,e):"number"==typeof i.unstable_expectedLoadTime?(e=Ga(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Ha,t.lanes=33554432,e):((n=Vl({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(i=function(e,t,n,r,i){var o=t.mode,a=e.child;e=a.sibling;var s={mode:"hidden",children:n};return 0==(2&o)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Bl(a,s),null!==e?r=Bl(e,r):(r=Ul(r,o,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}(e,t,i.children,i.fallback,n),a=t.child,o=e.child.memoizedState,a.memoizedState=null===o?{baseLanes:n}:{baseLanes:o.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Ha,i):(n=function(e,t,n,r){var i=e.child;return e=i.sibling,n=Bl(i,{mode:"visible",children:n}),0==(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}(e,t,i.children,n),t.memoizedState=null,n))}function Ga(e,t,n,r){var i=e.mode,o=e.child;return t={mode:"hidden",children:t},0==(2&i)&&null!==o?(o.childLanes=0,o.pendingProps=t):o=Vl(t,i,0,null),n=Ul(n,i,r,null),o.return=e,n.return=e,o.sibling=n,e.child=o,n}function Qa(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),eo(e.return,t)}function Ya(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.lastEffect=o)}function Xa(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Ra(e,t,r.children,n),0!=(2&(r=Ro.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!=(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Qa(e,n);else if(19===e.tag)Qa(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(si(Ro,r),0==(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Mo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ya(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Mo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ya(t,!0,n,null,o,t.lastEffect);break;case"together":Ya(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Ja(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ms|=t.lanes,0!=(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Bl(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Bl(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function es(e,t){if(!Fo)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ts(e,t,n){var r=t.pendingProps;switch(t.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 fi(t.type)&&pi(),null;case 3:return No(),ai(ci),ai(ui),qo(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Vo(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:Do(t);var o=Oo(ko.current);if(n=t.type,null!==e&&null!=t.stateNode)$a(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Oo(To.current),Vo(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Kr]=t,r[Gr]=s,n){case"dialog":Tr("cancel",r),Tr("close",r);break;case"iframe":case"object":case"embed":Tr("load",r);break;case"video":case"audio":for(e=0;e<_r.length;e++)Tr(_r[e],r);break;case"source":Tr("error",r);break;case"img":case"image":case"link":Tr("error",r),Tr("load",r);break;case"details":Tr("toggle",r);break;case"input":ee(r,s),Tr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Tr("invalid",r);break;case"textarea":le(r,s),Tr("invalid",r)}for(var u in Ce(n,s),e=null,s)s.hasOwnProperty(u)&&(o=s[u],"children"===u?"string"==typeof o?r.textContent!==o&&(e=["children",o]):"number"==typeof o&&r.textContent!==""+o&&(e=["children",""+o]):l.hasOwnProperty(u)&&null!=o&&"onScroll"===u&&Tr("scroll",r));switch(n){case"input":Q(r),re(r,s,!0);break;case"textarea":Q(r),ce(r);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(r.onclick=Lr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(u=9===o.nodeType?o:o.ownerDocument,e===de&&(e=he(n)),e===de?"script"===n?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),"select"===n&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[Kr]=t,e[Gr]=r,Za(e,t),t.stateNode=e,u=Se(n,r),n){case"dialog":Tr("cancel",e),Tr("close",e),o=r;break;case"iframe":case"object":case"embed":Tr("load",e),o=r;break;case"video":case"audio":for(o=0;o<_r.length;o++)Tr(_r[o],e);o=r;break;case"source":Tr("error",e),o=r;break;case"img":case"image":case"link":Tr("error",e),Tr("load",e),o=r;break;case"details":Tr("toggle",e),o=r;break;case"input":ee(e,r),o=J(e,r),Tr("invalid",e);break;case"option":o=oe(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=i({},r,{value:void 0}),Tr("invalid",e);break;case"textarea":le(e,r),o=se(e,r),Tr("invalid",e);break;default:o=r}Ce(n,o);var c=o;for(s in c)if(c.hasOwnProperty(s)){var d=c[s];"style"===s?Ee(e,d):"dangerouslySetInnerHTML"===s?null!=(d=d?d.__html:void 0)&&ge(e,d):"children"===s?"string"==typeof d?("textarea"!==n||""!==d)&&ve(e,d):"number"==typeof d&&ve(e,""+d):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(l.hasOwnProperty(s)?null!=d&&"onScroll"===s&&Tr("scroll",e):null!=d&&w(e,s,d,u))}switch(n){case"input":Q(e),re(e,r,!1);break;case"textarea":Q(e),ce(e);break;case"option":null!=r.value&&e.setAttribute("value",""+K(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?ae(e,!!r.multiple,s,!1):null!=r.defaultValue&&ae(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=Lr)}Wr(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)qa(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));n=Oo(ko.current),Oo(To.current),Vo(t)?(r=t.stateNode,n=t.memoizedProps,r[Kr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Kr]=t,t.stateNode=r)}return null;case 13:return ai(Ro),r=t.memoizedState,0!=(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Vo(t):n=null!==e.memoizedState,r&&!n&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Ro.current)?0===As&&(As=3):(0!==As&&3!==As||(As=4),null===Is||0==(134217727&Ms)&&0==(134217727&Ls)||hl(Is,Os))),(r||n)&&(t.flags|=4),null);case 4:return No(),null===e&&kr(t.stateNode.containerInfo),null;case 10:return Ji(t),null;case 17:return fi(t.type)&&pi(),null;case 19:if(ai(Ro),null===(r=t.memoizedState))return null;if(s=0!=(64&t.flags),null===(u=r.rendering))if(s)es(r,!1);else{if(0!==As||null!==e&&0!=(64&e.flags))for(e=t.child;null!==e;){if(null!==(u=Mo(e))){for(t.flags|=64,es(r,!1),null!==(s=u.updateQueue)&&(t.updateQueue=s,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(u=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=u.childLanes,s.lanes=u.lanes,s.child=u.child,s.memoizedProps=u.memoizedProps,s.memoizedState=u.memoizedState,s.updateQueue=u.updateQueue,s.type=u.type,e=u.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return si(Ro,1&Ro.current|2),t.child}e=e.sibling}null!==r.tail&&Wi()>Bs&&(t.flags|=64,s=!0,es(r,!1),t.lanes=33554432)}else{if(!s)if(null!==(e=Mo(u))){if(t.flags|=64,s=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),es(r,!0),null===r.tail&&"hidden"===r.tailMode&&!u.alternate&&!Fo)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Wi()-r.renderingStartTime>Bs&&1073741824!==n&&(t.flags|=64,s=!0,es(r,!1),t.lanes=33554432);r.isBackwards?(u.sibling=t.child,t.child=u):(null!==(n=r.last)?n.sibling=u:t.child=u,r.last=u)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Wi(),n.sibling=null,t=Ro.current,si(Ro,s?1&t|2:1&t),n):null;case 23:case 24:return vl(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function ns(e){switch(e.tag){case 1:fi(e.type)&&pi();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(No(),ai(ci),ai(ui),qo(),0!=(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Do(e),null;case 13:return ai(Ro),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return ai(Ro),null;case 4:return No(),null;case 10:return Ji(e),null;case 23:case 24:return vl(),null;default:return null}}function rs(e,t){try{var n="",r=t;do{n+=q(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i}}function is(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}Za=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},$a=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Oo(To.current);var a,s=null;switch(n){case"input":o=J(e,o),r=J(e,r),s=[];break;case"option":o=oe(e,o),r=oe(e,r),s=[];break;case"select":o=i({},o,{value:void 0}),r=i({},r,{value:void 0}),s=[];break;case"textarea":o=se(e,o),r=se(e,r),s=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=Lr)}for(d in Ce(n,r),n=null,o)if(!r.hasOwnProperty(d)&&o.hasOwnProperty(d)&&null!=o[d])if("style"===d){var u=o[d];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==d&&"children"!==d&&"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&"autoFocus"!==d&&(l.hasOwnProperty(d)?s||(s=[]):(s=s||[]).push(d,null));for(d in r){var c=r[d];if(u=null!=o?o[d]:void 0,r.hasOwnProperty(d)&&c!==u&&(null!=c||null!=u))if("style"===d)if(u){for(a in u)!u.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&u[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(s||(s=[]),s.push(d,n)),n=c;else"dangerouslySetInnerHTML"===d?(c=c?c.__html:void 0,u=u?u.__html:void 0,null!=c&&u!==c&&(s=s||[]).push(d,c)):"children"===d?"string"!=typeof c&&"number"!=typeof c||(s=s||[]).push(d,""+c):"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&(l.hasOwnProperty(d)?(null!=c&&"onScroll"===d&&Tr("scroll",e),s||u===c||(s=[])):"object"==typeof c&&null!==c&&c.$$typeof===M?c.toString():(s=s||[]).push(d,c))}n&&(s=s||[]).push("style",n);var d=s;(t.updateQueue=d)&&(t.flags|=4)}},qa=function(e,t,n,r){n!==r&&(t.flags|=4)};var os="function"==typeof WeakMap?WeakMap:Map;function as(e,t,n){(n=ao(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Zs||(Zs=!0,$s=r),is(0,t)},n}function ss(e,t,n){(n=ao(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return is(0,t),r(i)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===qs?qs=new Set([this]):qs.add(this),is(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var ls="function"==typeof WeakSet?WeakSet:Set;function us(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Rl(e,t)}else t.current=null}function cs(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Hi(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Vr(t.stateNode.containerInfo));case 5:case 6:case 4:case 17:return}throw Error(a(163))}function ds(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;r=i.next,0!=(4&(i=i.tag))&&0!=(1&i)&&(Nl(n,e),Pl(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Hi(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&co(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}co(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&Wr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Et(n)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(a(163))}function hs(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"==typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var i=n.memoizedProps.style;i=null!=i&&i.hasOwnProperty("display")?i.display:null,r.style.display=we("display",i)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function fs(e,t){if(wi&&"function"==typeof wi.onCommitFiberUnmount)try{wi.onCommitFiberUnmount(bi,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!=(4&r))Nl(t,n);else{r=t;try{i()}catch(e){Rl(r,e)}}n=n.next}while(n!==e)}break;case 1:if(us(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){Rl(t,e)}break;case 5:us(t);break;case 4:bs(e,t)}}function ps(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function ms(e){return 5===e.tag||3===e.tag||4===e.tag}function gs(e){e:{for(var t=e.return;null!==t;){if(ms(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(ve(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||ms(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?vs(e,n,t):ys(e,n,t)}function vs(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Lr));else if(4!==r&&null!==(e=e.child))for(vs(e,t,n),e=e.sibling;null!==e;)vs(e,t,n),e=e.sibling}function ys(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ys(e,t,n),e=e.sibling;null!==e;)ys(e,t,n),e=e.sibling}function bs(e,t){for(var n,r,i=t,o=!1;;){if(!o){o=i.return;e:for(;;){if(null===o)throw Error(a(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}o=o.return}o=!0}if(5===i.tag||6===i.tag){e:for(var s=e,l=i,u=l;;)if(fs(s,u),null!==u.child&&4!==u.tag)u.child.return=u,u=u.child;else{if(u===l)break e;for(;null===u.sibling;){if(null===u.return||u.return===l)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}r?(s=n,l=i.stateNode,8===s.nodeType?s.parentNode.removeChild(l):s.removeChild(l)):n.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(fs(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function ws(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3==(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var i=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[Gr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),Se(e,i),t=Se(e,r),i=0;i<o.length;i+=2){var s=o[i],l=o[i+1];"style"===s?Ee(n,l):"dangerouslySetInnerHTML"===s?ge(n,l):"children"===s?ve(n,l):w(n,s,l,t)}switch(e){case"input":ne(n,r);break;case"textarea":ue(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(o=r.value)?ae(n,!!r.multiple,o,!1):e!==!!r.multiple&&(null!=r.defaultValue?ae(n,!!r.multiple,r.defaultValue,!0):ae(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,Et(n.containerInfo)));case 12:return;case 13:return null!==t.memoizedState&&(Ws=Wi(),hs(t.child,!0)),void Es(t);case 19:return void Es(t);case 17:return;case 23:case 24:return void hs(t,null!==t.memoizedState)}throw Error(a(163))}function Es(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new ls),t.forEach((function(t){var r=Ll.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function _s(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&null!==(t=t.memoizedState)&&null===t.dehydrated}var Cs=Math.ceil,Ss=E.ReactCurrentDispatcher,xs=E.ReactCurrentOwner,Ts=0,Is=null,ks=null,Os=0,Ps=0,Ns=oi(0),As=0,Ds=null,Rs=0,Ms=0,Ls=0,js=0,Fs=null,Ws=0,Bs=1/0;function zs(){Bs=Wi()+500}var Us,Vs=null,Zs=!1,$s=null,qs=null,Hs=!1,Ks=null,Gs=90,Qs=[],Ys=[],Xs=null,Js=0,el=null,tl=-1,nl=0,rl=0,il=null,ol=!1;function al(){return 0!=(48&Ts)?Wi():-1!==tl?tl:tl=Wi()}function sl(e){if(0==(2&(e=e.mode)))return 1;if(0==(4&e))return 99===Bi()?1:2;if(0===nl&&(nl=Rs),0!==qi.transition){0!==rl&&(rl=null!==Fs?Fs.pendingLanes:0),e=nl;var t=4186112&~rl;return 0==(t&=-t)&&0==(t=(e=4186112&~e)&-e)&&(t=8192),t}return e=Bi(),e=Wt(0!=(4&Ts)&&98===e?12:e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),nl)}function ll(e,t,n){if(50<Js)throw Js=0,el=null,Error(a(185));if(null===(e=ul(e,t)))return null;Ut(e,t,n),e===Is&&(Ls|=t,4===As&&hl(e,Os));var r=Bi();1===t?0!=(8&Ts)&&0==(48&Ts)?fl(e):(cl(e,n),0===Ts&&(zs(),Zi())):(0==(4&Ts)||98!==r&&99!==r||(null===Xs?Xs=new Set([e]):Xs.add(e)),cl(e,n)),Fs=e}function ul(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function cl(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var l=31-Vt(s),u=1<<l,c=o[l];if(-1===c){if(0==(u&r)||0!=(u&i)){c=t,Lt(u);var d=Mt;o[l]=10<=d?c+250:6<=d?c+5e3:-1}}else c<=t&&(e.expiredLanes|=u);s&=~u}if(r=jt(e,e===Is?Os:0),t=Mt,0===r)null!==n&&(n!==Di&&Ci(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Di&&Ci(n)}15===t?(n=fl.bind(null,e),null===Mi?(Mi=[n],Li=_i(ki,$i)):Mi.push(n),n=Di):n=14===t?Vi(99,fl.bind(null,e)):Vi(n=function(e){switch(e){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(a(358,e))}}(t),dl.bind(null,e)),e.callbackPriority=t,e.callbackNode=n}}function dl(e){if(tl=-1,rl=nl=0,0!=(48&Ts))throw Error(a(327));var t=e.callbackNode;if(Ol()&&e.callbackNode!==t)return null;var n=jt(e,e===Is?Os:0);if(0===n)return null;var r=n,i=Ts;Ts|=16;var o=wl();for(Is===e&&Os===r||(zs(),yl(e,r));;)try{Cl();break}catch(t){bl(e,t)}if(Xi(),Ss.current=o,Ts=i,null!==ks?r=0:(Is=null,Os=0,r=As),0!=(Rs&Ls))yl(e,0);else if(0!==r){if(2===r&&(Ts|=64,e.hydrate&&(e.hydrate=!1,Vr(e.containerInfo)),0!==(n=Ft(e))&&(r=El(e,n))),1===r)throw t=Ds,yl(e,0),hl(e,n),cl(e,Wi()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:Tl(e);break;case 3:if(hl(e,n),(62914560&n)===n&&10<(r=Ws+500-Wi())){if(0!==jt(e,0))break;if(((i=e.suspendedLanes)&n)!==n){al(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=zr(Tl.bind(null,e),r);break}Tl(e);break;case 4:if(hl(e,n),(4186112&n)===n)break;for(r=e.eventTimes,i=-1;0<n;){var s=31-Vt(n);o=1<<s,(s=r[s])>i&&(i=s),n&=~o}if(n=i,10<(n=(120>(n=Wi()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Cs(n/1960))-n)){e.timeoutHandle=zr(Tl.bind(null,e),n);break}Tl(e);break;case 5:Tl(e);break;default:throw Error(a(329))}}return cl(e,Wi()),e.callbackNode===t?dl.bind(null,e):null}function hl(e,t){for(t&=~js,t&=~Ls,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Vt(t),r=1<<n;e[n]=-1,t&=~r}}function fl(e){if(0!=(48&Ts))throw Error(a(327));if(Ol(),e===Is&&0!=(e.expiredLanes&Os)){var t=Os,n=El(e,t);0!=(Rs&Ls)&&(n=El(e,t=jt(e,t)))}else n=El(e,t=jt(e,0));if(0!==e.tag&&2===n&&(Ts|=64,e.hydrate&&(e.hydrate=!1,Vr(e.containerInfo)),0!==(t=Ft(e))&&(n=El(e,t))),1===n)throw n=Ds,yl(e,0),hl(e,t),cl(e,Wi()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Tl(e),cl(e,Wi()),null}function pl(e,t){var n=Ts;Ts|=1;try{return e(t)}finally{0===(Ts=n)&&(zs(),Zi())}}function ml(e,t){var n=Ts;Ts&=-2,Ts|=8;try{return e(t)}finally{0===(Ts=n)&&(zs(),Zi())}}function gl(e,t){si(Ns,Ps),Ps|=t,Rs|=t}function vl(){Ps=Ns.current,ai(Ns)}function yl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Ur(n)),null!==ks)for(n=ks.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&pi();break;case 3:No(),ai(ci),ai(ui),qo();break;case 5:Do(r);break;case 4:No();break;case 13:case 19:ai(Ro);break;case 10:Ji(r);break;case 23:case 24:vl()}n=n.return}Is=e,ks=Bl(e.current,null),Os=Ps=Rs=t,As=0,Ds=null,js=Ls=Ms=0}function bl(e,t){for(;;){var n=ks;try{if(Xi(),Ho.current=ka,Jo){for(var r=Qo.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}Jo=!1}if(Go=0,Xo=Yo=Qo=null,ea=!1,xs.current=null,null===n||null===n.return){As=1,Ds=t,ks=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=Os,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==l&&"object"==typeof l&&"function"==typeof l.then){var u=l;if(0==(2&s.mode)){var c=s.alternate;c?(s.updateQueue=c.updateQueue,s.memoizedState=c.memoizedState,s.lanes=c.lanes):(s.updateQueue=null,s.memoizedState=null)}var d=0!=(1&Ro.current),h=a;do{var f;if(f=13===h.tag){var p=h.memoizedState;if(null!==p)f=null!==p.dehydrated;else{var m=h.memoizedProps;f=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!d)}}if(f){var g=h.updateQueue;if(null===g){var v=new Set;v.add(u),h.updateQueue=v}else g.add(u);if(0==(2&h.mode)){if(h.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var y=ao(-1,1);y.tag=2,so(s,y)}s.lanes|=1;break e}l=void 0,s=t;var b=o.pingCache;if(null===b?(b=o.pingCache=new os,l=new Set,b.set(u,l)):void 0===(l=b.get(u))&&(l=new Set,b.set(u,l)),!l.has(s)){l.add(s);var w=Ml.bind(null,o,u,s);u.then(w,w)}h.flags|=4096,h.lanes=t;break e}h=h.return}while(null!==h);l=Error((H(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==As&&(As=2),l=rs(l,s),h=a;do{switch(h.tag){case 3:o=l,h.flags|=4096,t&=-t,h.lanes|=t,lo(h,as(0,o,t));break e;case 1:o=l;var E=h.type,_=h.stateNode;if(0==(64&h.flags)&&("function"==typeof E.getDerivedStateFromError||null!==_&&"function"==typeof _.componentDidCatch&&(null===qs||!qs.has(_)))){h.flags|=4096,t&=-t,h.lanes|=t,lo(h,ss(h,o,t));break e}}h=h.return}while(null!==h)}xl(n)}catch(e){t=e,ks===n&&null!==n&&(ks=n=n.return);continue}break}}function wl(){var e=Ss.current;return Ss.current=ka,null===e?ka:e}function El(e,t){var n=Ts;Ts|=16;var r=wl();for(Is===e&&Os===t||yl(e,t);;)try{_l();break}catch(t){bl(e,t)}if(Xi(),Ts=n,Ss.current=r,null!==ks)throw Error(a(261));return Is=null,Os=0,As}function _l(){for(;null!==ks;)Sl(ks)}function Cl(){for(;null!==ks&&!Si();)Sl(ks)}function Sl(e){var t=Us(e.alternate,e,Ps);e.memoizedProps=e.pendingProps,null===t?xl(e):ks=t,xs.current=null}function xl(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=ts(n,t,Ps)))return void(ks=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&Ps)||0==(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=ns(t)))return n.flags&=2047,void(ks=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(ks=t);ks=t=e}while(null!==t);0===As&&(As=5)}function Tl(e){var t=Bi();return Ui(99,Il.bind(null,e,t)),null}function Il(e,t){do{Ol()}while(null!==Ks);if(0!=(48&Ts))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,i=r,o=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var s=e.eventTimes,l=e.expirationTimes;0<o;){var u=31-Vt(o),c=1<<u;i[u]=0,s[u]=-1,l[u]=-1,o&=~c}if(null!==Xs&&0==(24&r)&&Xs.has(e)&&Xs.delete(e),e===Is&&(ks=Is=null,Os=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(i=Ts,Ts|=32,xs.current=null,jr=Kt,fr(s=hr())){if("selectionStart"in s)l={start:s.selectionStart,end:s.selectionEnd};else e:if(l=(l=s.ownerDocument)&&l.defaultView||window,(c=l.getSelection&&l.getSelection())&&0!==c.rangeCount){l=c.anchorNode,o=c.anchorOffset,u=c.focusNode,c=c.focusOffset;try{l.nodeType,u.nodeType}catch(e){l=null;break e}var d=0,h=-1,f=-1,p=0,m=0,g=s,v=null;t:for(;;){for(var y;g!==l||0!==o&&3!==g.nodeType||(h=d+o),g!==u||0!==c&&3!==g.nodeType||(f=d+c),3===g.nodeType&&(d+=g.nodeValue.length),null!==(y=g.firstChild);)v=g,g=y;for(;;){if(g===s)break t;if(v===l&&++p===o&&(h=d),v===u&&++m===c&&(f=d),null!==(y=g.nextSibling))break;v=(g=v).parentNode}g=y}l=-1===h||-1===f?null:{start:h,end:f}}else l=null;l=l||{start:0,end:0}}else l=null;Fr={focusedElem:s,selectionRange:l},Kt=!1,il=null,ol=!1,Vs=r;do{try{kl()}catch(e){if(null===Vs)throw Error(a(330));Rl(Vs,e),Vs=Vs.nextEffect}}while(null!==Vs);il=null,Vs=r;do{try{for(s=e;null!==Vs;){var b=Vs.flags;if(16&b&&ve(Vs.stateNode,""),128&b){var w=Vs.alternate;if(null!==w){var E=w.ref;null!==E&&("function"==typeof E?E(null):E.current=null)}}switch(1038&b){case 2:gs(Vs),Vs.flags&=-3;break;case 6:gs(Vs),Vs.flags&=-3,ws(Vs.alternate,Vs);break;case 1024:Vs.flags&=-1025;break;case 1028:Vs.flags&=-1025,ws(Vs.alternate,Vs);break;case 4:ws(Vs.alternate,Vs);break;case 8:bs(s,l=Vs);var _=l.alternate;ps(l),null!==_&&ps(_)}Vs=Vs.nextEffect}}catch(e){if(null===Vs)throw Error(a(330));Rl(Vs,e),Vs=Vs.nextEffect}}while(null!==Vs);if(E=Fr,w=hr(),b=E.focusedElem,s=E.selectionRange,w!==b&&b&&b.ownerDocument&&dr(b.ownerDocument.documentElement,b)){null!==s&&fr(b)&&(w=s.start,void 0===(E=s.end)&&(E=w),"selectionStart"in b?(b.selectionStart=w,b.selectionEnd=Math.min(E,b.value.length)):(E=(w=b.ownerDocument||document)&&w.defaultView||window).getSelection&&(E=E.getSelection(),l=b.textContent.length,_=Math.min(s.start,l),s=void 0===s.end?_:Math.min(s.end,l),!E.extend&&_>s&&(l=s,s=_,_=l),l=cr(b,_),o=cr(b,s),l&&o&&(1!==E.rangeCount||E.anchorNode!==l.node||E.anchorOffset!==l.offset||E.focusNode!==o.node||E.focusOffset!==o.offset)&&((w=w.createRange()).setStart(l.node,l.offset),E.removeAllRanges(),_>s?(E.addRange(w),E.extend(o.node,o.offset)):(w.setEnd(o.node,o.offset),E.addRange(w))))),w=[];for(E=b;E=E.parentNode;)1===E.nodeType&&w.push({element:E,left:E.scrollLeft,top:E.scrollTop});for("function"==typeof b.focus&&b.focus(),b=0;b<w.length;b++)(E=w[b]).element.scrollLeft=E.left,E.element.scrollTop=E.top}Kt=!!jr,Fr=jr=null,e.current=n,Vs=r;do{try{for(b=e;null!==Vs;){var C=Vs.flags;if(36&C&&ds(b,Vs.alternate,Vs),128&C){w=void 0;var S=Vs.ref;if(null!==S){var x=Vs.stateNode;switch(Vs.tag){case 5:w=x;break;default:w=x}"function"==typeof S?S(w):S.current=w}}Vs=Vs.nextEffect}}catch(e){if(null===Vs)throw Error(a(330));Rl(Vs,e),Vs=Vs.nextEffect}}while(null!==Vs);Vs=null,Ri(),Ts=i}else e.current=n;if(Hs)Hs=!1,Ks=e,Gs=t;else for(Vs=r;null!==Vs;)t=Vs.nextEffect,Vs.nextEffect=null,8&Vs.flags&&((C=Vs).sibling=null,C.stateNode=null),Vs=t;if(0===(r=e.pendingLanes)&&(qs=null),1===r?e===el?Js++:(Js=0,el=e):Js=0,n=n.stateNode,wi&&"function"==typeof wi.onCommitFiberRoot)try{wi.onCommitFiberRoot(bi,n,void 0,64==(64&n.current.flags))}catch(e){}if(cl(e,Wi()),Zs)throw Zs=!1,e=$s,$s=null,e;return 0!=(8&Ts)||Zi(),null}function kl(){for(;null!==Vs;){var e=Vs.alternate;ol||null===il||(0!=(8&Vs.flags)?Je(Vs,il)&&(ol=!0):13===Vs.tag&&_s(e,Vs)&&Je(Vs,il)&&(ol=!0));var t=Vs.flags;0!=(256&t)&&cs(e,Vs),0==(512&t)||Hs||(Hs=!0,Vi(97,(function(){return Ol(),null}))),Vs=Vs.nextEffect}}function Ol(){if(90!==Gs){var e=97<Gs?97:Gs;return Gs=90,Ui(e,Al)}return!1}function Pl(e,t){Qs.push(t,e),Hs||(Hs=!0,Vi(97,(function(){return Ol(),null})))}function Nl(e,t){Ys.push(t,e),Hs||(Hs=!0,Vi(97,(function(){return Ol(),null})))}function Al(){if(null===Ks)return!1;var e=Ks;if(Ks=null,0!=(48&Ts))throw Error(a(331));var t=Ts;Ts|=32;var n=Ys;Ys=[];for(var r=0;r<n.length;r+=2){var i=n[r],o=n[r+1],s=i.destroy;if(i.destroy=void 0,"function"==typeof s)try{s()}catch(e){if(null===o)throw Error(a(330));Rl(o,e)}}for(n=Qs,Qs=[],r=0;r<n.length;r+=2){i=n[r],o=n[r+1];try{var l=i.create;i.destroy=l()}catch(e){if(null===o)throw Error(a(330));Rl(o,e)}}for(l=e.current.firstEffect;null!==l;)e=l.nextEffect,l.nextEffect=null,8&l.flags&&(l.sibling=null,l.stateNode=null),l=e;return Ts=t,Zi(),!0}function Dl(e,t,n){so(e,t=as(0,t=rs(n,t),1)),t=al(),null!==(e=ul(e,1))&&(Ut(e,1,t),cl(e,t))}function Rl(e,t){if(3===e.tag)Dl(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Dl(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===qs||!qs.has(r))){var i=ss(n,e=rs(t,e),1);if(so(n,i),i=al(),null!==(n=ul(n,1)))Ut(n,1,i),cl(n,i);else if("function"==typeof r.componentDidCatch&&(null===qs||!qs.has(r)))try{r.componentDidCatch(t,e)}catch(e){}break}}n=n.return}}function Ml(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=al(),e.pingedLanes|=e.suspendedLanes&n,Is===e&&(Os&n)===n&&(4===As||3===As&&(62914560&Os)===Os&&500>Wi()-Ws?yl(e,0):js|=n),cl(e,t)}function Ll(e,t){var n=e.stateNode;null!==n&&n.delete(t),0==(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===Bi()?1:2:(0===nl&&(nl=Rs),0===(t=Bt(62914560&~nl))&&(t=4194304))),n=al(),null!==(e=ul(e,t))&&(Ut(e,t,n),cl(e,n))}function jl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Fl(e,t,n,r){return new jl(e,t,n,r)}function Wl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Bl(e,t){var n=e.alternate;return null===n?((n=Fl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function zl(e,t,n,r,i,o){var s=2;if(r=e,"function"==typeof e)Wl(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case S:return Ul(n.children,i,o,t);case L:s=8,i|=16;break;case x:s=8,i|=1;break;case T:return(e=Fl(12,n,t,8|i)).elementType=T,e.type=T,e.lanes=o,e;case P:return(e=Fl(13,n,t,i)).type=P,e.elementType=P,e.lanes=o,e;case N:return(e=Fl(19,n,t,i)).elementType=N,e.lanes=o,e;case j:return Vl(n,i,o,t);case F:return(e=Fl(24,n,t,i)).elementType=F,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case I:s=10;break e;case k:s=9;break e;case O:s=11;break e;case A:s=14;break e;case D:s=16,r=null;break e;case R:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Fl(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Ul(e,t,n,r){return(e=Fl(7,e,r,t)).lanes=n,e}function Vl(e,t,n,r){return(e=Fl(23,e,r,t)).elementType=j,e.lanes=n,e}function Zl(e,t,n){return(e=Fl(6,e,null,t)).lanes=n,e}function $l(e,t,n){return(t=Fl(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ql(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=zt(0),this.expirationTimes=zt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zt(0),this.mutableSourceEagerHydrationData=null}function Hl(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:C,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Kl(e,t,n,r){var i=t.current,o=al(),s=sl(i);e:if(n){t:{if(Ge(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(fi(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(a(171))}if(1===n.tag){var u=n.type;if(fi(u)){n=gi(n,u,l);break e}}n=l}else n=li;return null===t.context?t.context=n:t.pendingContext=n,(t=ao(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),so(i,t),ll(i,s,o),s}function Gl(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Ql(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Yl(e,t){Ql(e,t),(e=e.alternate)&&Ql(e,t)}function Xl(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new ql(e,t,null!=n&&!0===n.hydrate),t=Fl(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,io(t),e[Qr]=n.current,kr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var i=(t=r[e])._getVersion;i=i(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,i]:n.mutableSourceEagerHydrationData.push(t,i)}this._internalRoot=n}function Jl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function eu(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"==typeof i){var s=i;i=function(){var e=Gl(a);s.call(e)}}Kl(t,a,e,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Xl(e,0,t?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"==typeof i){var l=i;i=function(){var e=Gl(a);l.call(e)}}ml((function(){Kl(t,a,e,i)}))}return Gl(a)}function tu(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Jl(t))throw Error(a(200));return Hl(e,t,null,n)}Us=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||ci.current)Da=!0;else{if(0==(n&r)){switch(Da=!1,t.tag){case 3:Va(t),Zo();break;case 5:Ao(t);break;case 1:fi(t.type)&&vi(t);break;case 4:Po(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var i=t.type._context;si(Ki,i._currentValue),i._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!=(n&t.child.childLanes)?Ka(e,t,n):(si(Ro,1&Ro.current),null!==(t=Ja(e,t,n))?t.sibling:null);si(Ro,1&Ro.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(64&e.flags)){if(r)return Xa(e,t,n);t.flags|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),si(Ro,Ro.current),r)break;return null;case 23:case 24:return t.lanes=0,Fa(e,t,n)}return Ja(e,t,n)}Da=0!=(16384&e.flags)}else Da=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=hi(t,ui.current),to(t,n),i=ra(null,t,r,e,i,n),t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,fi(r)){var o=!0;vi(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,io(t);var s=r.getDerivedStateFromProps;"function"==typeof s&&fo(t,r,s,e),i.updater=po,t.stateNode=i,i._reactInternals=t,yo(t,r,e,n),t=Ua(null,t,r,!0,o,n)}else t.tag=0,Ra(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"==typeof e)return Wl(e)?1:0;if(null!=e){if((e=e.$$typeof)===O)return 11;if(e===A)return 14}return 2}(i),e=Hi(i,e),o){case 0:t=Ba(null,t,i,e,n);break e;case 1:t=za(null,t,i,e,n);break e;case 11:t=Ma(null,t,i,e,n);break e;case 14:t=La(null,t,i,Hi(i.type,e),r,n);break e}throw Error(a(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,Ba(e,t,r,i=t.elementType===r?i:Hi(r,i),n);case 1:return r=t.type,i=t.pendingProps,za(e,t,r,i=t.elementType===r?i:Hi(r,i),n);case 3:if(Va(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,oo(e,t),uo(t,r,null,n),(r=t.memoizedState.element)===i)Zo(),t=Ja(e,t,n);else{if((o=(i=t.stateNode).hydrate)&&(jo=Zr(t.stateNode.containerInfo.firstChild),Lo=t,o=Fo=!0),o){if(null!=(e=i.mutableSourceEagerHydrationData))for(i=0;i<e.length;i+=2)(o=e[i])._workInProgressVersionPrimary=e[i+1],$o.push(o);for(n=So(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Ra(e,t,r,n),Zo();t=t.child}return t;case 5:return Ao(t),null===e&&zo(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,Br(r,i)?s=null:null!==o&&Br(r,o)&&(t.flags|=16),Wa(e,t),Ra(e,t,s,n),t.child;case 6:return null===e&&zo(t),null;case 13:return Ka(e,t,n);case 4:return Po(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Co(t,null,r,n):Ra(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Ma(e,t,r,i=t.elementType===r?i:Hi(r,i),n);case 7:return Ra(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ra(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value;var l=t.type._context;if(si(Ki,l._currentValue),l._currentValue=o,null!==s)if(l=s.value,0==(o=ar(l,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(l,o):1073741823))){if(s.children===i.children&&!ci.current){t=Ja(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var u=l.dependencies;if(null!==u){s=l.child;for(var c=u.firstContext;null!==c;){if(c.context===r&&0!=(c.observedBits&o)){1===l.tag&&((c=ao(-1,n&-n)).tag=2,so(l,c)),l.lanes|=n,null!==(c=l.alternate)&&(c.lanes|=n),eo(l.return,n),u.lanes|=n;break}c=c.next}}else s=10===l.tag&&l.type===t.type?null:l.child;if(null!==s)s.return=l;else for(s=l;null!==s;){if(s===t){s=null;break}if(null!==(l=s.sibling)){l.return=s.return,s=l;break}s=s.return}l=s}Ra(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,to(t,n),r=r(i=no(i,o.unstable_observedBits)),t.flags|=1,Ra(e,t,r,n),t.child;case 14:return o=Hi(i=t.type,t.pendingProps),La(e,t,i,o=Hi(i.type,o),r,n);case 15:return ja(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Hi(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,fi(r)?(e=!0,vi(t)):e=!1,to(t,n),go(t,r,i),yo(t,r,i,n),Ua(null,t,r,!0,e,n);case 19:return Xa(e,t,n);case 23:case 24:return Fa(e,t,n)}throw Error(a(156,t.tag))},Xl.prototype.render=function(e){Kl(e,this._internalRoot,null,null)},Xl.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Kl(null,e,null,(function(){t[Qr]=null}))},et=function(e){13===e.tag&&(ll(e,4,al()),Yl(e,4))},tt=function(e){13===e.tag&&(ll(e,67108864,al()),Yl(e,67108864))},nt=function(e){if(13===e.tag){var t=al(),n=sl(e);ll(e,n,t),Yl(e,n)}},rt=function(e,t){return t()},Te=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ti(r);if(!i)throw Error(a(90));Y(r),ne(r,i)}}}break;case"textarea":ue(e,n);break;case"select":null!=(t=n.value)&&ae(e,!!n.multiple,t,!1)}},Ae=pl,De=function(e,t,n,r,i){var o=Ts;Ts|=4;try{return Ui(98,e.bind(null,t,n,r,i))}finally{0===(Ts=o)&&(zs(),Zi())}},Re=function(){0==(49&Ts)&&(function(){if(null!==Xs){var e=Xs;Xs=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,cl(e,Wi())}))}Zi()}(),Ol())},Me=function(e,t){var n=Ts;Ts|=2;try{return e(t)}finally{0===(Ts=n)&&(zs(),Zi())}};var nu={Events:[Jr,ei,ti,Pe,Ne,Ol,{current:!1}]},ru={findFiberByHostInstance:Xr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},iu={bundleType:ru.bundleType,version:ru.version,rendererPackageName:ru.rendererPackageName,rendererConfig:ru.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:E.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Xe(e))?null:e.stateNode},findFiberByHostInstance:ru.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ou=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ou.isDisabled&&ou.supportsFiber)try{bi=ou.inject(iu),wi=ou}catch(me){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nu,t.createPortal=tu,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return null===(e=Xe(t))?null:e.stateNode},t.flushSync=function(e,t){var n=Ts;if(0!=(48&n))return e(t);Ts|=1;try{if(e)return Ui(99,e.bind(null,t))}finally{Ts=n,Zi()}},t.hydrate=function(e,t,n){if(!Jl(t))throw Error(a(200));return eu(null,e,t,!0,n)},t.render=function(e,t,n){if(!Jl(t))throw Error(a(200));return eu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Jl(e))throw Error(a(40));return!!e._reactRootContainer&&(ml((function(){eu(null,null,e,!1,(function(){e._reactRootContainer=null,e[Qr]=null}))})),!0)},t.unstable_batchedUpdates=pl,t.unstable_createPortal=function(e,t){return tu(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Jl(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return eu(e,t,n,!1,r)},t.version="17.0.2"},3935:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(4448)},4203:(e,t)=>{"use strict";var n,r,i,o;if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,c=null,d=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(d,0),e}};n=function(e){null!==u?setTimeout(n,0,e):(u=e,setTimeout(d,0))},r=function(e,t){c=setTimeout(e,t)},i=function(){clearTimeout(c)},t.unstable_shouldYield=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var h=window.setTimeout,f=window.clearTimeout;if("undefined"!=typeof console){var p=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof p&&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 m=!1,g=null,v=-1,y=5,b=0;t.unstable_shouldYield=function(){return t.unstable_now()>=b},o=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):y=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,E=w.port2;w.port1.onmessage=function(){if(null!==g){var e=t.unstable_now();b=e+y;try{g(!0,e)?E.postMessage(null):(m=!1,g=null)}catch(e){throw E.postMessage(null),e}}else m=!1},n=function(e){g=e,m||(m=!0,E.postMessage(null))},r=function(e,n){v=h((function(){e(t.unstable_now())}),n)},i=function(){f(v),v=-1}}function _(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<x(i,t)))break e;e[r]=t,e[n]=i,n=r}}function C(e){return void 0===(e=e[0])?null:e}function S(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],s=o+1,l=e[s];if(void 0!==a&&0>x(a,n))void 0!==l&&0>x(l,a)?(e[r]=l,e[s]=n,r=s):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==l&&0>x(l,n)))break e;e[r]=l,e[s]=n,r=s}}}return t}return null}function x(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var T=[],I=[],k=1,O=null,P=3,N=!1,A=!1,D=!1;function R(e){for(var t=C(I);null!==t;){if(null===t.callback)S(I);else{if(!(t.startTime<=e))break;S(I),t.sortIndex=t.expirationTime,_(T,t)}t=C(I)}}function M(e){if(D=!1,R(e),!A)if(null!==C(T))A=!0,n(L);else{var t=C(I);null!==t&&r(M,t.startTime-e)}}function L(e,n){A=!1,D&&(D=!1,i()),N=!0;var o=P;try{for(R(n),O=C(T);null!==O&&(!(O.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=O.callback;if("function"==typeof a){O.callback=null,P=O.priorityLevel;var s=a(O.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?O.callback=s:O===C(T)&&S(T),R(n)}else S(T);O=C(T)}if(null!==O)var l=!0;else{var u=C(I);null!==u&&r(M,u.startTime-n),l=!1}return l}finally{O=null,P=o,N=!1}}var j=o;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(e){e.callback=null},t.unstable_continueExecution=function(){A||N||(A=!0,n(L))},t.unstable_getCurrentPriorityLevel=function(){return P},t.unstable_getFirstCallbackNode=function(){return C(T)},t.unstable_next=function(e){switch(P){case 1:case 2:case 3:var t=3;break;default:t=P}var n=P;P=t;try{return e()}finally{P=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=j,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=P;P=e;try{return t()}finally{P=n}},t.unstable_scheduleCallback=function(e,o,a){var s=t.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?s+a:s,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:k++,callback:o,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>s?(e.sortIndex=a,_(I,e),null===C(T)&&e===C(I)&&(D?i():D=!0,r(M,a-s))):(e.sortIndex=l,_(T,e),A||N||(A=!0,n(L))),e},t.unstable_wrapCallback=function(e){var t=P;return function(){var n=P;P=t;try{return e.apply(this,arguments)}finally{P=n}}}},4142:(e,t,n)=>{"use strict";e.exports=n(4203)},9921:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case o:case s:case a:case f:return e;default:switch(e=e&&e.$$typeof){case u:case h:case g:case m:case l:return e;default:return t}}case i:return t}}}function _(e){return E(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=h,t.Fragment=o,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return _(e)||E(e)===c},t.isConcurrentMode=_,t.isContextConsumer=function(e){return E(e)===u},t.isContextProvider=function(e){return E(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return E(e)===h},t.isFragment=function(e){return E(e)===o},t.isLazy=function(e){return E(e)===g},t.isMemo=function(e){return E(e)===m},t.isPortal=function(e){return E(e)===i},t.isProfiler=function(e){return E(e)===s},t.isStrictMode=function(e){return E(e)===a},t.isSuspense=function(e){return E(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===s||e===a||e===f||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===h||e.$$typeof===y||e.$$typeof===b||e.$$typeof===w||e.$$typeof===v)},t.typeOf=E},9864:(e,t,n)=>{"use strict";e.exports=n(9921)},525:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]])}return n},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=o(n(7294));n(542),t.default=function(e){var t=e.visible,n=void 0===t||t,o=e.color,s=void 0===o?"#333333":o,l=e.stroke,u=void 0===l?5:l,c=e.radius,d=void 0===c?40:c,h=i(e,["visible","color","stroke","radius"]);return n?a.createElement("div",r({},h,{className:"react-spinner-material",style:{width:d,height:d,borderColor:s,borderWidth:u}})):null}},542:()=>{"use strict";var e="\n.react-spinner-material {\n width: 80px;\n height: 80px;\n border-radius: 50%;\n border: 10px solid #333;\n box-sizing: border-box;\n -webkit-animation: rsm-sweep 1s linear alternate infinite, rsm-rotate 0.8s linear infinite;\n animation: rsm-sweep 1s linear alternate infinite, rsm-rotate 0.8s linear infinite;\n}\n\n@keyframes rsm-rotate {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n@-webkit-keyframes rsm-rotate {\n from {\n -webkit-transform: rotate(0deg);\n }\n to {\n -webkit-transform: rotate(360deg);\n }\n}\n\n@keyframes rsm-sweep {\n 0% {\n -webkit-clip-path: polygon(0% 0%, 0% 0%, 0% 0%, 50% 50%, 0% 0%, 0% 0%, 0% 0%);\n clip-path: polygon(0% 0%, 0% 0%, 0% 0%, 50% 50%, 0% 0%, 0% 0%, 0% 0%);\n }\n 50% {\n -webkit-clip-path: polygon(0% 0%, 0% 100%, 0% 100%, 50% 50%, 100% 0%, 100% 0%, 0% 0%);\n clip-path: polygon(0% 0%, 0% 100%, 0% 100%, 50% 50%, 100% 0%, 100% 0%, 0% 0%);\n }\n 100% {\n -webkit-clip-path: polygon(0% 0%, 0% 100%, 100% 100%, 50% 50%, 100% 100%, 100% 0%, 0% 0%);\n clip-path: polygon(0% 0%, 0% 100%, 100% 100%, 50% 50%, 100% 100%, 100% 0%, 0% 0%);\n }\n}\n\n@-webkit-keyframes rsm-sweep {\n 0% {\n -webkit-clip-path: polygon(0% 0%, 0% 0%, 0% 0%, 50% 50%, 0% 0%, 0% 0%, 0% 0%);\n }\n 50% {\n -webkit-clip-path: polygon(0% 0%, 0% 100%, 0% 100%, 50% 50%, 100% 0%, 100% 0%, 0% 0%);\n }\n 100% {\n -webkit-clip-path: polygon(0% 0%, 0% 100%, 100% 100%, 50% 50%, 100% 100%, 100% 0%, 0% 0%);\n }\n}\n",t="spinner_id_style";!function(){if("undefined"!=typeof window&&!document.getElementById(t)){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.id=t,r.type="text/css",r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e)),n&&n.appendChild(r)}}()},2666:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>m});var r=n(9756),i=n(1788),o=(n(5697),n(7294)),a=n(3935);var s=n(220),l="unmounted",u="exited",c="entering",d="entered",h="exiting",f=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=u,r.appearStatus=c):i=d:i=t.unmountOnExit||t.mountOnEnter?l:u,r.state={status:i},r.nextCallback=null,r}(0,i.Z)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===l?{status:u}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==c&&n!==d&&(t=c):n!==c&&n!==d||(t=h)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=a.findDOMNode(this);t===c?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===u&&this.setState({status:l})},n.performEnter=function(e,t){var n=this,r=this.props.enter,i=this.context?this.context.isMounting:t,o=this.getTimeouts(),a=i?o.appear:o.enter;t||r?(this.props.onEnter(e,i),this.safeSetState({status:c},(function(){n.props.onEntering(e,i),n.onTransitionEnd(e,a,(function(){n.safeSetState({status:d},(function(){n.props.onEntered(e,i)}))}))}))):this.safeSetState({status:d},(function(){n.props.onEntered(e)}))},n.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:h},(function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,(function(){t.safeSetState({status:u},(function(){t.props.onExited(e)}))}))}))):this.safeSetState({status:u},(function(){t.props.onExited(e)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;e&&!r?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===l)return null;var t=this.props,n=t.children,i=(0,r.Z)(t,["children"]);if(delete i.in,delete i.mountOnEnter,delete i.unmountOnExit,delete i.appear,delete i.enter,delete i.exit,delete i.timeout,delete i.addEndListener,delete i.onEnter,delete i.onEntering,delete i.onEntered,delete i.onExit,delete i.onExiting,delete i.onExited,"function"==typeof n)return o.createElement(s.Z.Provider,{value:null},n(e,i));var a=o.Children.only(n);return o.createElement(s.Z.Provider,{value:null},o.cloneElement(a,i))},t}(o.Component);function p(){}f.contextType=s.Z,f.propTypes={},f.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:p,onEntering:p,onEntered:p,onExit:p,onExiting:p,onExited:p},f.UNMOUNTED=0,f.EXITED=1,f.ENTERING=2,f.ENTERED=3,f.EXITING=4;const m=f},220:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=n(7294).createContext(null)},2408:(e,t,n)=>{"use strict";var r=n(7418),i=60103,o=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,l=60112;t.Suspense=60113;var u=60115,c=60116;if("function"==typeof Symbol&&Symbol.for){var d=Symbol.for;i=d("react.element"),o=d("react.portal"),t.Fragment=d("react.fragment"),t.StrictMode=d("react.strict_mode"),t.Profiler=d("react.profiler"),a=d("react.provider"),s=d("react.context"),l=d("react.forward_ref"),t.Suspense=d("react.suspense"),u=d("react.memo"),c=d("react.lazy")}var h="function"==typeof Symbol&&Symbol.iterator;function f(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m={};function g(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}function v(){}function y(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||p}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(f(85));this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=g.prototype;var b=y.prototype=new v;b.constructor=y,r(b,g.prototype),b.isPureReactComponent=!0;var w={current:null},E=Object.prototype.hasOwnProperty,_={key:!0,ref:!0,__self:!0,__source:!0};function C(e,t,n){var r,o={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)E.call(t,r)&&!_.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return{$$typeof:i,type:e,key:a,ref:s,props:o,_owner:w.current}}function S(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var x=/\/+/g;function T(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function I(e,t,n,r,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case i:case o:l=!0}}if(l)return a=a(l=e),e=""===r?"."+T(l,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(x,"$&/")+"/"),I(a,t,n,"",(function(e){return e}))):null!=a&&(S(a)&&(a=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(x,"$&/")+"/")+e)),t.push(a)),1;if(l=0,r=""===r?".":r+":",Array.isArray(e))for(var u=0;u<e.length;u++){var c=r+T(s=e[u],u);l+=I(s,t,n,c,a)}else if("function"==typeof(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=h&&e[h]||e["@@iterator"])?e:null}(e)))for(e=c.call(e),u=0;!(s=e.next()).done;)l+=I(s=s.value,t,n,c=r+T(s,u++),a);else if("object"===s)throw t=""+e,Error(f(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return l}function k(e,t,n){if(null==e)return e;var r=[],i=0;return I(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function O(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var P={current:null};function N(){var e=P.current;if(null===e)throw Error(f(321));return e}var A={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:k,forEach:function(e,t,n){k(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return k(e,(function(){t++})),t},toArray:function(e){return k(e,(function(e){return e}))||[]},only:function(e){if(!S(e))throw Error(f(143));return e}},t.Component=g,t.PureComponent=y,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=A,t.cloneElement=function(e,t,n){if(null==e)throw Error(f(267,e));var o=r({},e.props),a=e.key,s=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,l=w.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(c in t)E.call(t,c)&&!_.hasOwnProperty(c)&&(o[c]=void 0===t[c]&&void 0!==u?u[c]:t[c])}var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){u=Array(c);for(var d=0;d<c;d++)u[d]=arguments[d+2];o.children=u}return{$$typeof:i,type:e.type,key:a,ref:s,props:o,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=C,t.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=S,t.lazy=function(e){return{$$typeof:c,_payload:{_status:-1,_result:e},_init:O}},t.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return N().useCallback(e,t)},t.useContext=function(e,t){return N().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return N().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return N().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return N().useLayoutEffect(e,t)},t.useMemo=function(e,t){return N().useMemo(e,t)},t.useReducer=function(e,t,n){return N().useReducer(e,t,n)},t.useRef=function(e){return N().useRef(e)},t.useState=function(e){return N().useState(e)},t.version="17.0.2"},7294:(e,t,n)=>{"use strict";e.exports=n(2408)},825:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);t.default=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},7593:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return a.default}});var r=s(n(4922)),i=s(n(6964)),o=s(n(8509)),a=s(n(5669));function s(e){return e&&e.__esModule?e:{default:e}}},489:(e,t)=>{"use strict";function n(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function r(e,t,r,i,o,a){return n((s=n(n(t,e),n(i,a)))<<(l=o)|s>>>32-l,r);var s,l}function i(e,t,n,i,o,a,s){return r(t&n|~t&i,e,t,o,a,s)}function o(e,t,n,i,o,a,s){return r(t&i|n&~i,e,t,o,a,s)}function a(e,t,n,i,o,a,s){return r(t^n^i,e,t,o,a,s)}function s(e,t,n,i,o,a,s){return r(n^(t|~i),e,t,o,a,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Array(t.length);for(var r=0;r<t.length;r++)e[r]=t.charCodeAt(r)}return function(e){var t,n,r,i=[],o=32*e.length,a="0123456789abcdef";for(t=0;t<o;t+=8)n=e[t>>5]>>>t%32&255,r=parseInt(a.charAt(n>>>4&15)+a.charAt(15&n),16),i.push(r);return i}(function(e,t){var r,l,u,c,d;e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var h=1732584193,f=-271733879,p=-1732584194,m=271733878;for(r=0;r<e.length;r+=16)l=h,u=f,c=p,d=m,h=i(h,f,p,m,e[r],7,-680876936),m=i(m,h,f,p,e[r+1],12,-389564586),p=i(p,m,h,f,e[r+2],17,606105819),f=i(f,p,m,h,e[r+3],22,-1044525330),h=i(h,f,p,m,e[r+4],7,-176418897),m=i(m,h,f,p,e[r+5],12,1200080426),p=i(p,m,h,f,e[r+6],17,-1473231341),f=i(f,p,m,h,e[r+7],22,-45705983),h=i(h,f,p,m,e[r+8],7,1770035416),m=i(m,h,f,p,e[r+9],12,-1958414417),p=i(p,m,h,f,e[r+10],17,-42063),f=i(f,p,m,h,e[r+11],22,-1990404162),h=i(h,f,p,m,e[r+12],7,1804603682),m=i(m,h,f,p,e[r+13],12,-40341101),p=i(p,m,h,f,e[r+14],17,-1502002290),h=o(h,f=i(f,p,m,h,e[r+15],22,1236535329),p,m,e[r+1],5,-165796510),m=o(m,h,f,p,e[r+6],9,-1069501632),p=o(p,m,h,f,e[r+11],14,643717713),f=o(f,p,m,h,e[r],20,-373897302),h=o(h,f,p,m,e[r+5],5,-701558691),m=o(m,h,f,p,e[r+10],9,38016083),p=o(p,m,h,f,e[r+15],14,-660478335),f=o(f,p,m,h,e[r+4],20,-405537848),h=o(h,f,p,m,e[r+9],5,568446438),m=o(m,h,f,p,e[r+14],9,-1019803690),p=o(p,m,h,f,e[r+3],14,-187363961),f=o(f,p,m,h,e[r+8],20,1163531501),h=o(h,f,p,m,e[r+13],5,-1444681467),m=o(m,h,f,p,e[r+2],9,-51403784),p=o(p,m,h,f,e[r+7],14,1735328473),h=a(h,f=o(f,p,m,h,e[r+12],20,-1926607734),p,m,e[r+5],4,-378558),m=a(m,h,f,p,e[r+8],11,-2022574463),p=a(p,m,h,f,e[r+11],16,1839030562),f=a(f,p,m,h,e[r+14],23,-35309556),h=a(h,f,p,m,e[r+1],4,-1530992060),m=a(m,h,f,p,e[r+4],11,1272893353),p=a(p,m,h,f,e[r+7],16,-155497632),f=a(f,p,m,h,e[r+10],23,-1094730640),h=a(h,f,p,m,e[r+13],4,681279174),m=a(m,h,f,p,e[r],11,-358537222),p=a(p,m,h,f,e[r+3],16,-722521979),f=a(f,p,m,h,e[r+6],23,76029189),h=a(h,f,p,m,e[r+9],4,-640364487),m=a(m,h,f,p,e[r+12],11,-421815835),p=a(p,m,h,f,e[r+15],16,530742520),h=s(h,f=a(f,p,m,h,e[r+2],23,-995338651),p,m,e[r],6,-198630844),m=s(m,h,f,p,e[r+7],10,1126891415),p=s(p,m,h,f,e[r+14],15,-1416354905),f=s(f,p,m,h,e[r+5],21,-57434055),h=s(h,f,p,m,e[r+12],6,1700485571),m=s(m,h,f,p,e[r+3],10,-1894986606),p=s(p,m,h,f,e[r+10],15,-1051523),f=s(f,p,m,h,e[r+1],21,-2054922799),h=s(h,f,p,m,e[r+8],6,1873313359),m=s(m,h,f,p,e[r+15],10,-30611744),p=s(p,m,h,f,e[r+6],15,-1560198380),f=s(f,p,m,h,e[r+13],21,1309151649),h=s(h,f,p,m,e[r+4],6,-145523070),m=s(m,h,f,p,e[r+11],10,-1120210379),p=s(p,m,h,f,e[r+2],15,718787259),f=s(f,p,m,h,e[r+9],21,-343485551),h=n(h,l),f=n(f,u),p=n(p,c),m=n(m,d);return[h,f,p,m]}(function(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;var r=8*e.length;for(t=0;t<r;t+=8)n[t>>5]|=(255&e[t/8])<<t%32;return n}(e),8*e.length))}},6827:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!n)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(r)};var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),r=new Uint8Array(16)},3558:(e,t)=>{"use strict";function n(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}function r(e,t){return e<<t|e>>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){var t=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var o=unescape(encodeURIComponent(e));e=new Array(o.length);for(var a=0;a<o.length;a++)e[a]=o.charCodeAt(a)}e.push(128);var s=e.length/4+2,l=Math.ceil(s/16),u=new Array(l);for(a=0;a<l;a++){u[a]=new Array(16);for(var c=0;c<16;c++)u[a][c]=e[64*a+4*c]<<24|e[64*a+4*c+1]<<16|e[64*a+4*c+2]<<8|e[64*a+4*c+3]}for(u[l-1][14]=8*(e.length-1)/Math.pow(2,32),u[l-1][14]=Math.floor(u[l-1][14]),u[l-1][15]=8*(e.length-1)&4294967295,a=0;a<l;a++){for(var d=new Array(80),h=0;h<16;h++)d[h]=u[a][h];for(h=16;h<80;h++)d[h]=r(d[h-3]^d[h-8]^d[h-14]^d[h-16],1);var f=i[0],p=i[1],m=i[2],g=i[3],v=i[4];for(h=0;h<80;h++){var y=Math.floor(h/20),b=r(f,5)+n(y,p,m,g)+v+t[y]+d[h]>>>0;v=g,g=m,m=r(p,30)>>>0,p=f,f=b}i[0]=i[0]+f>>>0,i[1]=i[1]+p>>>0,i[2]=i[2]+m>>>0,i[3]=i[3]+g>>>0,i[4]=i[4]+v>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]}},4922:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i,o=s(n(6827)),a=s(n(825));function s(e){return e&&e.__esModule?e:{default:e}}var l=0,u=0;t.default=function(e,t,n){var s=t&&n||0,c=t||[],d=(e=e||{}).node||r,h=void 0!==e.clockseq?e.clockseq:i;if(null==d||null==h){var f=e.random||(e.rng||o.default)();null==d&&(d=r=[1|f[0],f[1],f[2],f[3],f[4],f[5]]),null==h&&(h=i=16383&(f[6]<<8|f[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:u+1,g=p-l+(m-u)/1e4;if(g<0&&void 0===e.clockseq&&(h=h+1&16383),(g<0||p>l)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=p,u=m,i=h;var v=(1e4*(268435455&(p+=122192928e5))+m)%4294967296;c[s++]=v>>>24&255,c[s++]=v>>>16&255,c[s++]=v>>>8&255,c[s++]=255&v;var y=p/4294967296*1e4&268435455;c[s++]=y>>>8&255,c[s++]=255&y,c[s++]=y>>>24&15|16,c[s++]=y>>>16&255,c[s++]=h>>>8|128,c[s++]=255&h;for(var b=0;b<6;++b)c[s+b]=d[b];return t||(0,a.default)(c)}},6964:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(9137)),i=o(n(489));function o(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)("v3",48,i.default);t.default=a},9137:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=function(e,r,o,a){var s=o&&a||0;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=new Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(e)),"string"==typeof r&&(r=function(e){var t=[];return e.replace(/[a-fA-F0-9]{2}/g,(function(e){t.push(parseInt(e,16))})),t}(r)),!Array.isArray(e))throw TypeError("value must be an array of bytes");if(!Array.isArray(r)||16!==r.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var l=n(r.concat(e));if(l[6]=15&l[6]|t,l[8]=63&l[8]|128,o)for(var u=0;u<16;++u)o[s+u]=l[u];return o||(0,i.default)(l)};try{r.name=e}catch(e){}return r.DNS=o,r.URL=a,r},t.URL=t.DNS=void 0;var r,i=(r=n(825))&&r.__esModule?r:{default:r};const o="6ba7b810-9dad-11d1-80b4-00c04fd430c8";t.DNS=o;const a="6ba7b811-9dad-11d1-80b4-00c04fd430c8";t.URL=a},8509:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(6827)),i=o(n(825));function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r.default)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||(0,i.default)(a)}},5669:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(9137)),i=o(n(3558));function o(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)("v5",80,i.default);t.default=a},4731:(e,t,n)=>{"use strict";const r=n(1316),i=e=>!(!e||e.length>255||r().test(e)||r.windowsNames().test(e)||/^\.\.?$/.test(e));e.exports=i,e.exports.default=i}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(2143)})();
|
||
//# sourceMappingURL=bundle.js.map |