/*! For license information please see vendors~element-web-app.js.LICENSE.txt */ (window.webpackJsonp=window.webpackJsonp||[]).push([[29],{1451:function(e,t,a){"use strict";(function(e){var t=a(136);if(e.__js_sdk_entrypoint)throw new Error("Multiple matrix-js-sdk entrypoints detected!");let n;e.__js_sdk_entrypoint=!0;try{n=e.indexedDB}catch(e){}n&&t.setCryptoStoreFactory((()=>new t.IndexedDBCryptoStore(n,"matrix-js-sdk:crypto")));e.matrixcs=t}).call(this,a(14))},1452:function(e,t,a){"use strict";var n=a(13),i=a.n(n),s=a(1),r=a(122),o=a(124),l=a(329);var c;!function(e){e.Online="online",e.Offline="offline",e.Unavailable="unavailable"}(c||(c={}));t.a=new class{constructor(){i()(this,"unavailableTimer",null),i()(this,"dispatcherRef",null),i()(this,"state",null),i()(this,"onAction",(e=>{var t;"user_activity"===e.action&&(this.setState(c.Online),null===(t=this.unavailableTimer)||void 0===t||t.restart())}))}async start(){for(this.unavailableTimer=new l.a(18e4),this.dispatcherRef=o.a.register(this.onAction);this.unavailableTimer;)try{await this.unavailableTimer.finished(),this.setState(c.Unavailable)}catch(e){}}stop(){this.dispatcherRef&&(o.a.unregister(this.dispatcherRef),this.dispatcherRef=null),this.unavailableTimer&&(this.unavailableTimer.abort(),this.unavailableTimer=null)}getState(){return this.state}async setState(e){if(e===this.state)return;const t=this.state;if(this.state=e,!r.a.get().isGuest())try{await r.a.get().setPresence({presence:this.state}),s.a.info("Presence:",e)}catch(e){s.a.error("Failed to set presence:",e),this.state=t}}}},1453:function(e,t){e.exports="fonts/Twemoji_Mozilla/TwemojiMozilla-colr.4d2d834.woff2"},1454:function(e,t){e.exports="fonts/Twemoji_Mozilla/TwemojiMozilla-sbix.b1b6461.woff2"},1455:function(e,t,a){"use strict";a.r(t),a.d(t,"Icon",(function(){return r}));var n,i=a(120);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const t=o.b.get().brand,a=Object(r.a)("%(brand)s now uses 3-5x less memory, by only loading information about other users when needed. Please wait whilst we resynchronise with the server!",{brand:t});return i.a.createElement(s.a,{hasCancelButton:!1,title:Object(r.a)("Updating %(brand)s",{brand:t}),description:i.a.createElement("div",null,a),button:Object(r.a)("OK"),onFinished:e.onFinished})}},1458:function(e,t,a){"use strict";var n=a(120),i=a.n(n),s=a(154),r=a(121),o=a(131);t.a=e=>{const t=o.b.get().brand,a=Object(r.a)("You've previously used %(brand)s on %(host)s with lazy loading of members enabled. In this version lazy loading is disabled. As the local cache is not compatible between these two settings, %(brand)s needs to resync your account.",{brand:t,host:e.host}),n=Object(r.a)("If the other version of %(brand)s is still open in another tab, please close it as using %(brand)s on the same host with both lazy loading enabled and disabled simultaneously will cause issues.",{brand:t});return i.a.createElement(s.a,{hasCancelButton:!1,title:Object(r.a)("Incompatible local cache"),description:i.a.createElement("div",null,i.a.createElement("p",null,a),i.a.createElement("p",null,n)),button:Object(r.a)("Clear cache and resync"),onFinished:e.onFinished})}},1459:function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(13),i=a.n(n),s=a(120),r=a.n(s),o=a(131),l=a(127),c=a(121),d=a(154),m=a(277),u=a(135),h=a(145);class p extends r.a.Component{constructor(){super(...arguments),i()(this,"sendBugReport",(()=>{l.b.createDialog(m.a,{error:this.props.error})})),i()(this,"onClearStorageClick",(()=>{l.b.createDialog(d.a,{title:Object(c.a)("Sign out"),description:r.a.createElement("div",null,Object(c.a)("Sign out and remove encryption keys?")),button:Object(c.a)("Sign out"),danger:!0,onFinished:this.props.onFinished})})),i()(this,"onRefreshClick",(()=>{window.location.reload()}))}render(){const e=o.b.get().brand,t=r.a.createElement("button",{onClick:this.onClearStorageClick,className:"danger"},Object(c.a)("Clear Storage and Sign Out"));let a;return a=o.b.get().bug_report_endpoint_url?r.a.createElement(h.a,{primaryButton:Object(c.a)("Send Logs"),onPrimaryButtonClick:this.sendBugReport,focus:!0,hasCancel:!1},t):r.a.createElement(h.a,{primaryButton:Object(c.a)("Refresh"),onPrimaryButtonClick:this.onRefreshClick,focus:!0,hasCancel:!1},t),r.a.createElement(u.a,{className:"mx_ErrorDialog",onFinished:this.props.onFinished,title:Object(c.a)("Unable to restore session"),contentId:"mx_Dialog_content",hasCancel:!1},r.a.createElement("div",{className:"mx_Dialog_content",id:"mx_Dialog_content"},r.a.createElement("p",null,Object(c.a)("We encountered an error trying to restore your previous session.")),r.a.createElement("p",null,Object(c.a)("If you have previously used a more recent version of %(brand)s, your session may be incompatible with this version. Close this window and return to the more recent version.",{brand:e})),r.a.createElement("p",null,Object(c.a)("Clearing your browser's storage may fix the problem, but will sign you out and cause any encrypted chat history to become unreadable."))),a)}}},1460:function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(13),i=a.n(n),s=a(120),r=a.n(s),o=a(131),l=a(127),c=a(121),d=a(135),m=a(145),u=a(277),h=a(123);class p extends r.a.Component{constructor(){super(...arguments),i()(this,"sendBugReport",(e=>{e.preventDefault(),l.b.createDialog(u.a,{})})),i()(this,"onSignOutClick",(()=>{this.props.onFinished(!0)}))}render(){let e;return o.b.get().bug_report_endpoint_url&&(e=Object(c.a)("To help us prevent this in future, please send us logs.",{},{a:e=>r.a.createElement(h.a,{kind:"link_inline",onClick:this.sendBugReport},e)})),r.a.createElement(d.a,{className:"mx_ErrorDialog",onFinished:this.props.onFinished,title:Object(c.a)("Missing session data"),contentId:"mx_Dialog_content",hasCancel:!1},r.a.createElement("div",{className:"mx_Dialog_content",id:"mx_Dialog_content"},r.a.createElement("p",null,Object(c.a)("Some session data, including encrypted message keys, is missing. Sign out and sign in to fix this, restoring keys from backup.")),r.a.createElement("p",null,Object(c.a)("Your browser likely removed this data when running low on disk space.")," ",e)),r.a.createElement(m.a,{primaryButton:Object(c.a)("Sign out"),onPrimaryButtonClick:this.onSignOutClick,focus:!0,hasCancel:!1}))}}},1461:function(e,t,a){"use strict";a.r(t),a.d(t,"Icon",(function(){return r}));var n,i=a(120);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t{this.warnInConsole()})),r()(this,"warnInConsole",Object(p.throttle)((()=>{const t=Object(R.a)("Wait!"),a=Object(R.a)("If someone told you to copy/paste something here, there is a high likelihood you're being scammed!"),n=Object(R.a)("If you know what you're doing, Element is open-source, be sure to check out our GitHub (https://github.com/vector-im/element-web/) and contribute!");e.mx_rage_logger.bypassRageshake("log",`%c${t}\n%c${a}\n%c${n}`,"font-size:50px; color:blue;","font-size:15px; color:red;","font-size:15px;")}),1e3)),r()(this,"onAction",(e=>{var t;if(null!==(t=f.a.get())&&void 0!==t&&t.isGuest()&&qe.includes(e.action))return _.a.dispatch({action:H.a.DoAfterSyncPrepared,deferred_action:e}),void _.a.dispatch({action:"require_registration"});switch(e.action){case"MatrixActions.accountData":if("m.identity_server"===e.event_type){const t=e.event_content?e.event_content.base_url:null;t?(f.a.get().setIdentityServerUrl(t),localStorage.removeItem("mx_is_access_token"),localStorage.setItem("mx_is_url",t)):(f.a.get().setIdentityServerUrl(null),localStorage.removeItem("mx_is_access_token"),localStorage.removeItem("mx_is_url")),_.a.dispatch({action:"id_server_changed"})}break;case"logout":Oe.b.instance.hangupAllCalls(),Promise.all([...[...Ie.a.instance.activeCalls].map((e=>e.disconnect())),Object(Ue.D)(this.stores)]).finally((()=>x.i()));break;case"require_registration":Object(N.b)(e);break;case"start_registration":if(x.g()){this.onSoftLogout();break}e.screenAfterLogin&&(this.screenAfterLogin=e.screenAfterLogin),this.startRegistration(e.params||{});break;case"start_login":if(x.g()){this.onSoftLogout();break}e.screenAfterLogin&&(this.screenAfterLogin=e.screenAfterLogin),this.viewLogin();break;case"start_password_recovery":this.setStateForNewView({view:ke.a.FORGOT_PASSWORD}),this.notifyNewScreen("forgot_password");break;case"start_chat":Object(j.b)({dmUserId:e.user_id});break;case"leave_room":this.leaveRoom(e.room_id);break;case"forget_room":this.forgetRoom(e.room_id);break;case"copy_room":this.copyRoom(e.room_id);break;case"reject_invite":w.b.createDialog(ie.a,{title:Object(R.a)("Reject invitation"),description:Object(R.a)("Are you sure you want to reject the invitation?"),onFinished:t=>{if(t){const t=w.b.createDialog(ne.a,void 0,"mx_Dialog_spinner");f.a.get().leave(e.room_id).then((()=>{t.close(),this.state.currentRoomId===e.room_id&&_.a.dispatch({action:H.a.ViewHomePage})}),(e=>{t.close(),w.b.createDialog(K.a,{title:Object(R.a)("Failed to reject invitation"),description:e.toString()})}))}}});break;case"view_user_info":this.viewUser(e.userId,e.subAction);break;case"MatrixActions.RoomState.events":{const t=e.event;t.getType()===c.EventType.RoomCanonicalAlias&&t.getRoomId()===this.state.currentRoomId&&this.viewRoom({action:H.a.ViewRoom,room_id:this.state.currentRoomId,metricsTrigger:void 0});break}case H.a.ViewRoom:{const t=this.viewRoom(e);e.deferred_action&&t.then((()=>{_.a.dispatch(e.deferred_action)}));break}case H.a.ViewUserDeviceSettings:Object(Le.a)(I.b.getValue("feature_new_device_manager"));break;case H.a.ViewUserSettings:{const t=e;w.b.createDialog(se.a,{initialTabId:t.initialTabId},null,!1,!0),this.viewSomethingBehindModal();break}case"view_create_room":this.createRoom(e.public,e.defaultName,e.type),this.viewSomethingBehindModal();break;case H.a.ViewRoomDirectory:w.b.createDialog(Be.b,{initialText:e.initialText,initialFilter:Be.a.PublicRooms},"mx_SpotlightDialog_wrapper",!1,!0),this.viewSomethingBehindModal();break;case"view_welcome_page":this.viewWelcome();break;case H.a.ViewHomePage:this.viewHome(e.justRegistered);break;case H.a.ViewStartChatOrReuse:this.chatCreateOrReuse(e.user_id);break;case"view_create_chat":Object(O.f)(e.initialText||""),this.viewSomethingBehindModal();break;case"view_invite":{const t=f.a.get().getRoom(e.roomId);null!=t&&t.isSpaceRoom()?Object(Ce.i)(t):Object(O.e)(e.roomId);break}case"view_last_screen":this.showScreenAfterLogin();break;case"hide_left_panel":this.setState({collapseLhs:!0},(()=>{this.state.resizeNotifier.notifyLeftHandleResized()}));break;case"show_left_panel":this.setState({collapseLhs:!1},(()=>{this.state.resizeNotifier.notifyLeftHandleResized()}));break;case H.a.OpenDialPad:w.b.createDialog(Q.a,{},"mx_Dialog_dialPadWrapper");break;case H.a.OnLoggedIn:this.stores.client=f.a.get(),this.tokenLogin||x.g()||this.state.view===ke.a.LOGIN||this.state.view===ke.a.REGISTER||this.state.view===ke.a.COMPLETE_SECURITY||this.state.view===ke.a.E2E_SETUP||this.state.view===ke.a.USE_CASE_SELECTION||this.onLoggedIn();break;case"on_client_not_viable":this.onSoftLogout();break;case H.a.OnLoggedOut:this.onLoggedOut();break;case"will_start_client":this.setState({ready:!1},(()=>{this.onWillStartClient()}));break;case"client_started":this.onClientStarted();break;case"send_event":this.onSendEvent(e.room_id,e.event);break;case"aria_hide_main_app":this.setState({hideToSRUsers:!0});break;case"aria_unhide_main_app":this.setState({hideToSRUsers:!1});break;case H.a.PseudonymousAnalyticsAccept:Object(z.b)(),I.b.setValue("pseudonymousAnalyticsOptIn",null,$.a.ACCOUNT,!0);break;case H.a.PseudonymousAnalyticsReject:Object(z.b)(),I.b.setValue("pseudonymousAnalyticsOptIn",null,$.a.ACCOUNT,!1);break;case H.a.ShowThread:{const{rootEvent:t,initialEvent:a,highlighted:n,scrollIntoView:i,push:s}=e,r={phase:Te.a.ThreadView,state:{threadHeadEvent:t,initialEvent:a,isInitialEventHighlighted:n,initialEventScrollIntoView:i}};null!=s&&s?Ne.a.instance.pushCard(r):Ne.a.instance.setCards([{phase:Te.a.ThreadPanel},r]),_.a.dispatch({action:H.a.FocusSendMessageComposer,context:De.a.Thread});break}}})),r()(this,"handleResize",(()=>{const e=1e3,t=fe.b.instance.windowWidth;this.prevWindowWidth=e&&_.a.dispatch({action:"show_left_panel"}),this.prevWindowWidth>=e&&t{this.showScreen("register")})),r()(this,"onLoginClick",(()=>{this.showScreen("login")})),r()(this,"onForgotPasswordClick",(()=>{this.showScreen("forgot_password")})),r()(this,"onRegisterFlowComplete",((e,t)=>this.onUserCompletedLoginFlow(e,t))),r()(this,"onUpdateStatusIndicator",((e,t)=>{const a=e.numUnreadStates;y.a.get()&&(y.a.get().setErrorStatus(t===d.b.Error),y.a.get().setNotificationCount(a)),this.subTitleStatus="",t===d.b.Error&&(this.subTitleStatus+=`[${Object(R.a)("Offline")}] `),a>0?this.subTitleStatus+=`[${a}]`:e.color>=He.a.Bold&&(this.subTitleStatus+="*"),this.setPageSubtitle()})),r()(this,"onServerConfigChange",(e=>{this.setState({serverConfig:e})})),r()(this,"makeRegistrationUrl",(e=>(this.props.startingFragmentQueryParams.referrer&&(e.referrer=this.props.startingFragmentQueryParams.referrer),this.props.makeRegistrationUrl(e)))),r()(this,"onUserCompletedLoginFlow",(async(e,t)=>{this.accountPassword=t,null!==this.accountPasswordTimer&&clearTimeout(this.accountPasswordTimer),this.accountPasswordTimer=window.setTimeout((()=>{this.accountPassword=null,this.accountPasswordTimer=null}),3e5),await x.k(e),await this.postLoginSetup(),be.b.instance.stop(be.a.LOGIN),be.b.instance.stop(be.a.REGISTER)})),r()(this,"onCompleteSecurityE2eSetupFinished",(()=>{this.onLoggedIn()})),this.stores=Ae.b.instance,this.stores.constructEagerStores(),this.state={view:ke.a.LOADING,collapseLhs:!1,hideToSRUsers:!1,syncError:null,resizeNotifier:new P.a,ready:!1},this.loggedInView=Object(o.createRef)(),E.b.put(this.props.config),this.firstSyncComplete=!1,this.firstSyncPromise=Object(u.l)(),this.props.config.sync_timeline_limit&&(f.a.opts.initialSyncLimit=this.props.config.sync_timeline_limit),this.screenAfterLogin=this.props.initialScreenAfterLogin,this.screenAfterLogin){const e=this.screenAfterLogin.params||{};if(this.screenAfterLogin.screen.startsWith("room/")&&e.signurl&&e.email){const t=this.screenAfterLogin.screen.substring("room/".length);Y.a.instance.storeInvite(t,e)}}this.prevWindowWidth=fe.b.instance.windowWidth||1e3,fe.b.instance.on(fe.a.Resize,this.handleResize),this.state.resizeNotifier.on("middlePanelResized",this.dispatchTimelineResize),q.a.instance.on(q.b,this.onUpdateStatusIndicator),x.g()&&x.h(),this.accountPassword=null,this.accountPasswordTimer=null,this.dispatcherRef=_.a.register(this.onAction),this.themeWatcher=new L.a,this.fontWatcher=new U.a,this.themeWatcher.start(),this.fontWatcher.start(),this.focusComposer=!1,this.subTitleStatus="",x.g()||x.a(this.props.realQueryParams,this.props.defaultDeviceDisplayName,this.getFragmentAfterLogin()).then((async e=>{var t;if(null!==(t=this.props.realQueryParams)&&void 0!==t&&t.loginToken&&this.props.onTokenLoginCompleted(),e)return this.tokenLogin=!0,await x.j({ignoreGuest:!0}),this.postLoginSetup();const a=this.screenAfterLogin?this.screenAfterLogin.screen:null;return!!await this.loadSession()||("login"!==a&&"register"!==a&&"forgot_password"!==a||this.showScreenAfterLogin(),!1)})),Object(we.a)(E.b.get("sentry"))}async postLoginSetup(){const e=f.a.get(),t=e.isCryptoEnabled();t||this.onLoggedIn();const a=[this.firstSyncPromise.promise];let n=!1;t&&a.push((async()=>{n=await e.userHasCrossSigningKeys()})()),this.setState({pendingInitialSync:!0}),await Promise.all(a),t?(n?!1===ae.a.SHOW_ENCRYPTION_SETUP_UI?this.onLoggedIn():this.setStateForNewView({view:ke.a.COMPLETE_SECURITY}):await e.doesServerSupportUnstableFeature("org.matrix.e2e_cross_signing")?this.setStateForNewView({view:ke.a.E2E_SETUP}):this.onLoggedIn(),this.setState({pendingInitialSync:!1})):this.setState({pendingInitialSync:!1})}setState(e,t){this.shouldTrackPageChange(this.state,Ge(Ge({},this.state),e))&&this.startPageChangeTimer(),super.setState(e,t)}componentDidMount(){window.addEventListener("resize",this.onWindowResized)}componentDidUpdate(e,t){if(this.shouldTrackPageChange(t,this.state)){const e=this.stopPageChangeTimer();v.b.instance.trackPageChange(this.state.view,this.state.page_type,e)}this.focusComposer&&(_.a.fire(H.a.FocusSendMessageComposer),this.focusComposer=!1)}componentWillUnmount(){x.m(),_.a.unregister(this.dispatcherRef),this.themeWatcher.stop(),this.fontWatcher.stop(),fe.b.destroy(),this.state.resizeNotifier.removeListener("middlePanelResized",this.dispatchTimelineResize),window.removeEventListener("resize",this.onWindowResized),null!==this.accountPasswordTimer&&clearTimeout(this.accountPasswordTimer),this.voiceBroadcastResumer&&this.voiceBroadcastResumer.destroy()}getFallbackHsUrl(){var e;return null!==(e=this.props.serverConfig)&&void 0!==e&&e.isDefault?this.props.config.fallback_hs_url:null}getServerProperties(){let e=this.state.serverConfig;return e||(e=this.props.serverConfig),e||(e=E.b.get("validated_server_config")),{serverConfig:e}}loadSession(){return Promise.resolve().then((()=>x.h({fragmentQueryParams:this.props.startingFragmentQueryParams,enableGuest:this.props.enableGuest,guestHsUrl:this.getServerProperties().serverConfig.hsUrl,guestIsUrl:this.getServerProperties().serverConfig.isUrl,defaultDeviceDisplayName:this.props.defaultDeviceDisplayName}))).then((e=>(e||(Y.a.instance.pickBestInvite()?_.a.dispatch({action:"start_registration"}):_.a.dispatch({action:"view_welcome_page"})),e)))}startPageChangeTimer(){be.b.instance.start(be.a.PAGE_CHANGE)}stopPageChangeTimer(){const e=be.b.instance;e.stop(be.a.PAGE_CHANGE);const t=e.getEntries({name:be.a.PAGE_CHANGE}).pop();return t?t.duration:null}shouldTrackPageChange(e,t){return e.currentRoomId!==t.currentRoomId||e.view!==t.view||e.page_type!==t.page_type}setStateForNewView(e){if(void 0===e.view)throw new Error("setStateForNewView with no view!");this.setState(Ge({currentUserId:void 0,justRegistered:!1},e))}setPage(e){this.setState({page_type:e})}async startRegistration(e){const t={view:ke.a.REGISTER};if(e.client_secret&&e.session_id&&e.hs_url&&e.is_url&&e.sid){t.serverConfig=await M.a.validateServerConfigWithStaticUrls(e.hs_url,e.is_url);const a=E.b.get("validated_server_config");a&&a.hsUrl===t.serverConfig.hsUrl&&(t.serverConfig.hsName=a.hsName,t.serverConfig.hsNameIsDifferent=a.hsNameIsDifferent,t.serverConfig.isDefault=a.isDefault,t.serverConfig.isNameResolvable=a.isNameResolvable),t.register_client_secret=e.client_secret,t.register_session_id=e.session_id,t.register_id_sid=e.sid}this.setStateForNewView(t),T.a.isLogin=!0,this.themeWatcher.recheck(),this.notifyNewScreen("register")}async viewRoom(e){if(this.focusComposer=!0,e.room_alias?h.a.log(`Switching to room alias ${e.room_alias} at event ${e.event_id}`):h.a.log(`Switching to room id ${e.room_id} at event ${e.event_id}`),!this.firstSyncComplete){if(!this.firstSyncPromise)return void h.a.warn("Cannot view a room before first sync. room_id:",e.room_id);await this.firstSyncPromise.promise}let t=e.room_alias||e.room_id;const a=f.a.get().getRoom(e.room_id);if(a){var n;a.decryptAllEvents();const e=C.b(a);e&&(t=e,Object(F.b)(e,a.roomId)),null===(n=localStorage)||void 0===n||n.setItem("mx_last_room_id",a.roomId)}let i="#"===t[0]&&e.room_id===this.state.currentRoomId;var s,r,o,l;(Object(Me.a)(this.state.currentRoomId)&&(i=!0),e.room_id===this.state.currentRoomId)&&(e.threepid_invite=null!==(s=e.threepid_invite)&&void 0!==s?s:this.state.threepidInvite,e.oob_data=null!==(r=e.oob_data)&&void 0!==r?r:this.state.roomOobData,e.forceTimeline=null!==(o=e.forceTimeline)&&void 0!==o?o:this.state.forceTimeline,e.justCreatedOpts=null!==(l=e.justCreatedOpts)&&void 0!==l?l:this.state.roomJustCreatedOpts);e.event_id&&e.highlighted&&(t+="/"+e.event_id),this.setState({view:ke.a.LOGGED_IN,currentRoomId:e.room_id||null,page_type:k.a.RoomView,threepidInvite:e.threepid_invite,roomOobData:e.oob_data,forceTimeline:e.forceTimeline,ready:!0,roomJustCreatedOpts:e.justCreatedOpts},(()=>{T.a.isLogin=!1,this.themeWatcher.recheck(),this.notifyNewScreen("room/"+t,i)}))}viewSomethingBehindModal(){this.state.view===ke.a.LOGGED_IN?this.state.currentRoomId||this.state.currentUserId||this.viewHome():this.viewWelcome()}viewWelcome(){if(Object(Z.b)(E.b.get()))return this.viewLogin();this.setStateForNewView({view:ke.a.WELCOME}),this.notifyNewScreen("welcome"),T.a.isLogin=!0,this.themeWatcher.recheck()}viewLogin(e){this.setStateForNewView(Ge({view:ke.a.LOGIN},e)),this.notifyNewScreen("login"),T.a.isLogin=!0,this.themeWatcher.recheck()}viewHome(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.setStateForNewView({view:ke.a.LOGGED_IN,justRegistered:e,currentRoomId:null}),this.setPage(k.a.HomePage),this.notifyNewScreen("home"),T.a.isLogin=!1,this.themeWatcher.recheck()}viewUser(e,t){(this.firstSyncPromise?this.firstSyncPromise.promise:Promise.resolve()).then((()=>{"chat"!==t?(this.notifyNewScreen("user/"+e),this.setState({currentUserId:e}),this.setPage(k.a.UserView)):this.chatCreateOrReuse(e)}))}async createRoom(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0;const n=w.b.createDialog(re.a,{type:a,defaultPublic:e,defaultName:t}),[i,s]=await n.finished;i&&Object(j.b)(s)}chatCreateOrReuse(e){const t=new je.a(this.props.config);if(f.a.get().isGuest())return e!==t.get("welcome_user_id")&&_.a.dispatch({action:H.a.DoAfterSyncPrepared,deferred_action:{action:H.a.ViewStartChatOrReuse,user_id:e}}),void _.a.dispatch({action:"require_registration",go_welcome_on_cancel:!0,screen_after:{screen:`user/${t.get("welcome_user_id")}`,params:{action:"chat"}}});const a=f.a.get(),n=Object(Ve.a)(a,e);n?_.a.dispatch({action:H.a.ViewRoom,room_id:n.roomId,metricsTrigger:"MessageUser"}):_.a.dispatch({action:"start_chat",user_id:e})}leaveRoomWarnings(e){const t=f.a.get().getRoom(e),a=null==t?void 0:t.isSpaceRoom(),n=[];if(1===t.currentState.getJoinedMemberCount())return n.push(l.a.createElement("span",{className:"warning",key:"only_member_warning"}," ",Object(R.a)("You are the only person here. If you leave, no one will be able to join in the future, including you."))),n;const i=t.currentState.getStateEvents("m.room.join_rules","");if(i){"public"!==i.getContent().join_rule&&n.push(l.a.createElement("span",{className:"warning",key:"non_public_warning"}," ",a?Object(R.a)("This space is not public. You will not be able to rejoin without an invite."):Object(R.a)("This room is not public. You will not be able to rejoin without an invite.")))}return n}leaveRoom(e){const t=f.a.get().getRoom(e),a=this.leaveRoomWarnings(e),n=null==t?void 0:t.isSpaceRoom();w.b.createDialog(ie.a,{title:n?Object(R.a)("Leave space"):Object(R.a)("Leave room"),description:l.a.createElement("span",null,n?Object(R.a)("Are you sure you want to leave the space '%(spaceName)s'?",{spaceName:t.name}):Object(R.a)("Are you sure you want to leave the room '%(roomName)s'?",{roomName:t.name}),a),button:Object(R.a)("Leave"),onFinished:t=>{t&&(Object(Re.a)(e),_.a.dispatch({action:H.a.AfterLeaveRoom,room_id:e}))}})}forgetRoom(e){const t=f.a.get().getRoom(e);f.a.get().forget(e).then((()=>{this.state.currentRoomId===e&&_.a.dispatch({action:H.a.ViewHomePage}),ee.c.instance.manualRoomUpdate(t,te.c.RoomRemoved)})).catch((e=>{const t=e.errcode||Object(R.c)("unknown error code");w.b.createDialog(K.a,{title:Object(R.a)("Failed to forget room %(errCode)s",{errCode:t}),description:e&&e.message?e.message:Object(R.a)("Operation failed")})}))}async copyRoom(e){const t=Object(Ee.h)(e);await Object(_e.b)(t)||w.b.createDialog(K.a,{title:Object(R.a)("Unable to copy room link"),description:Object(R.a)("Unable to copy a link to the room to the clipboard.")})}async startWelcomeUserChat(){let e;e=this.firstSyncComplete?Promise.resolve():this.firstSyncPromise.promise,await e;const t=new je.a(this.props.config);if(0===A.a.shared().getDMRoomsForUserId(t.get("welcome_user_id")).length){const e=await Object(j.b)({dmUserId:t.get("welcome_user_id"),andView:!this.state.currentRoomId,spinner:!1}),a=e=>{e.getType()===c.EventType.Direct&&e.getContent()[t.get("welcome_user_id")]&&(f.a.get().store.save(!0),f.a.get().removeListener(c.ClientEvent.AccountData,a))};return f.a.get().on(c.ClientEvent.AccountData,a),e}return null}async onLoggedIn(){if(T.a.isLogin=!1,this.themeWatcher.recheck(),V.f(),!f.a.currentUserIsJustRegistered()||null!==I.b.getValue("FTUE.useCaseSelection"))return this.onShowPostLoginScreen();this.setStateForNewView({view:ke.a.USE_CASE_SELECTION}),I.b.watchSetting("FTUE.useCaseSelection",null,((e,t,a,n,i)=>{null!==i&&this.state.view===ke.a.USE_CASE_SELECTION&&this.onShowPostLoginScreen()}))}async onShowPostLoginScreen(e){if(e&&(Se.a.instance.setProperty("ftueUseCaseSelection",e),I.b.setValue("FTUE.useCaseSelection",null,$.a.ACCOUNT,e)),this.setStateForNewView({view:ke.a.LOGGED_IN}),this.screenAfterLogin&&this.screenAfterLogin.screen)this.showScreen(this.screenAfterLogin.screen,this.screenAfterLogin.params),this.screenAfterLogin=null;else if(f.a.currentUserIsJustRegistered()){f.a.setJustRegisteredUserId(null);if(new je.a(this.props.config).get("welcome_user_id")&&Object(R.e)().startsWith("en")){null===await this.startWelcomeUserChat()&&_.a.dispatch({action:H.a.ViewHomePage,justRegistered:!0})}else if(Y.a.instance.pickBestInvite()){const e=Y.a.instance.pickBestInvite(),t=Y.a.instance.translateToWireFormat(e);this.showScreen(`room/${e.roomId}`,t)}else _.a.dispatch({action:H.a.ViewHomePage,justRegistered:!0})}else this.showScreenAfterLogin();E.b.get("mobile_guide_toast")&&Object(X.a)();const t=E.b.get("user_notice");if(t){const e="user_notice_"+t.title;t.show_once&&localStorage.getItem(e)||B.a.sharedInstance().addOrReplaceToast({key:e,title:t.title,props:{description:l.a.createElement(We.a,null,t.description),acceptLabel:Object(R.a)("OK"),onAccept:()=>{B.a.sharedInstance().dismissToast(e),localStorage.setItem(e,"1")}},component:Fe.a,className:"mx_AnalyticsToast",priority:100})}}initPosthogAnalyticsToast(){null===I.b.getValue("pseudonymousAnalyticsOptIn")&&Object(z.c)(),I.b.watchSetting("pseudonymousAnalyticsOptIn",null,((e,t,a,n,i)=>{null===i?Object(z.c)():Object(z.b)()}))}showScreenAfterLogin(){this.screenAfterLogin&&this.screenAfterLogin.screen?(this.showScreen(this.screenAfterLogin.screen,this.screenAfterLogin.params),this.screenAfterLogin=null):localStorage&&localStorage.getItem("mx_last_room_id")?this.viewLastRoom():f.a.get().isGuest()?_.a.dispatch({action:"view_welcome_page"}):_.a.dispatch({action:H.a.ViewHomePage})}viewLastRoom(){_.a.dispatch({action:H.a.ViewRoom,room_id:localStorage.getItem("mx_last_room_id"),metricsTrigger:void 0})}onLoggedOut(){this.viewLogin({ready:!1,collapseLhs:!1,currentRoomId:null}),this.subTitleStatus="",this.setPageSubtitle()}onSoftLogout(){this.notifyNewScreen("soft_logout"),this.setStateForNewView({view:ke.a.SOFT_LOGOUT,ready:!1,collapseLhs:!1,currentRoomId:null}),this.subTitleStatus="",this.setPageSubtitle()}onWillStartClient(){this.firstSyncComplete=!1,this.firstSyncPromise=Object(u.l)();const e=f.a.get();e.setCanResetTimelineCallback((e=>(h.a.log("Request to reset timeline in room ",e," viewing:",this.state.currentRoomId),e!==this.state.currentRoomId||(!this.loggedInView.current||this.loggedInView.current.canResetTimelineInRoom(e))))),e.on(c.ClientEvent.Sync,((e,t,a)=>{e===d.b.Error||e===d.b.Reconnecting?(a.error instanceof m.c&&x.d(a.error),this.setState({syncError:a.error})):this.state.syncError&&this.setState({syncError:null}),e===d.b.Syncing&&t===d.b.Syncing||(h.a.info("MatrixClient sync state => %s",e),e===d.b.Prepared&&(this.firstSyncComplete=!0,this.firstSyncPromise.resolve(),S.default.shouldShowPrompt()&&!f.a.userRegisteredWithinLastHours(24)&&Object(G.b)(!1),_.a.fire(H.a.FocusSendMessageComposer),this.setState({ready:!0})))})),e.on(c.HttpApiEvent.SessionLoggedOut,(function(e){if(!x.f()){if(w.b.closeCurrentModal("Session.logged_out"),401===e.httpStatus&&e.data&&e.data.soft_logout)return h.a.warn("Soft logout issued by server - avoiding data deletion"),void x.l();w.b.createDialog(K.a,{title:Object(R.a)("Signed Out"),description:Object(R.a)("For security, this session has been signed out. Please sign in again.")}),_.a.dispatch({action:"logout"})}})),e.on(c.HttpApiEvent.NoConsent,(function(t,a){w.b.createDialog(ie.a,{title:Object(R.a)("Terms and Conditions"),description:l.a.createElement("div",null,l.a.createElement("p",null," ",Object(R.a)("To continue using the %(homeserverDomain)s homeserver you must review and agree to our terms and conditions.",{homeserverDomain:e.getDomain()}))),button:Object(R.a)("Review terms and conditions"),cancelButton:Object(R.a)("Dismiss"),onFinished:e=>{if(e){window.open(a,"_blank").opener=null}}},null,!0)}));const t=b.a.instance;t.start(),e.on(c.HttpApiEvent.SessionLoggedOut,(()=>t.stop())),e.on(c.MatrixEventEvent.Decrypted,((e,a)=>t.eventDecrypted(e,a))),e.on(c.ClientEvent.Room,(e=>{if(f.a.get().isCryptoEnabled()){const t=I.b.getValueAt($.a.ROOM_DEVICE,"blacklistUnverifiedDevices",e.roomId,!0);e.setBlacklistUnverifiedDevices(t)}})),e.on(g.b.Warning,(e=>{if("CRYPTO_WARNING_OLD_VERSION_DETECTED"===e)w.b.createDialog(K.a,{title:Object(R.a)("Old cryptography data detected"),description:Object(R.a)("Data from an older version of %(brand)s has been detected. This will have caused end-to-end cryptography to malfunction in the older version. End-to-end encrypted messages exchanged recently whilst using the older version may not be decryptable in this version. This may also cause messages exchanged with this version to fail. If you experience problems, log out and back in again. To retain message history, export and re-import your keys.",{brand:E.b.get().brand})})})),e.on(g.b.KeyBackupFailed,(async e=>{let t,n;if(f.a.get().getKeyBackupEnabled())t=!0;else try{n=await f.a.get().getKeyBackupVersion(),null!==n&&(t=!0)}catch(e){return void h.a.error("Saw key backup error but failed to check backup version!",e)}t?w.b.createDialogAsync(a.e(39).then(a.bind(null,1560)),{newVersionInfo:n}):w.b.createDialogAsync(a.e(40).then(a.bind(null,1561)))})),e.on(g.b.KeySignatureUploadFailure,((e,t,a)=>{w.b.createDialog(oe.a,{failures:e,source:t,continuation:a})})),e.on(g.b.VerificationRequest,(e=>{e.verifier?w.b.createDialog(le.a,{verifier:e.verifier},null,!1,!0):e.pending&&B.a.sharedInstance().addOrReplaceToast({key:"verifreq_"+e.channel.transactionId,title:Object(R.a)("Verification requested"),icon:"verification",props:{request:e},component:ve.a,priority:90})})),this.voiceBroadcastResumer=new Ue.z(e)}onClientStarted(){const e=f.a.get();if(e.isCryptoEnabled()){const t=I.b.getValueAt($.a.DEVICE,"blacklistUnverifiedDevices");e.setGlobalBlacklistUnverifiedDevices(t),e.setGlobalErrorOnUnknownDevices(!1)}Se.a.instance.isEnabled()&&I.b.isLevelSupported($.a.ACCOUNT)&&this.initPosthogAnalyticsToast()}showScreen(e,t){const a=f.a.get();if(!a||a.isGuest()||!Ke.includes(e))if("register"===e)_.a.dispatch({action:"start_registration",params:t}),be.b.instance.start(be.a.REGISTER);else if("login"===e)_.a.dispatch({action:"start_login",params:t}),be.b.instance.start(be.a.LOGIN);else if("forgot_password"===e)_.a.dispatch({action:"start_password_recovery",params:t});else if("soft_logout"===e)a.getUserId()&&!x.g()?this.viewLastRoom():_.a.dispatch({action:"start_login",params:t});else if("new"===e)_.a.dispatch({action:"view_create_room"});else if("dm"===e)_.a.dispatch({action:"view_create_chat"});else if("settings"===e)_.a.fire(H.a.ViewUserSettings);else if("welcome"===e)_.a.dispatch({action:"view_welcome_page"});else if("home"===e)_.a.dispatch({action:H.a.ViewHomePage});else if("start"===e)this.showScreen("home"),_.a.dispatch({action:"require_registration"});else if("directory"===e)_.a.fire(H.a.ViewRoomDirectory);else if("start_sso"===e||"start_cas"===e){let t=f.a.get();if(!t){const{hsUrl:e,isUrl:a}=this.props.serverConfig;t=Object(c.createClient)({baseUrl:e,idBaseUrl:a})}const a="start_sso"===e?"sso":"cas";y.a.get().startSingleSignOn(t,a,this.getFragmentAfterLogin())}else if(0===e.indexOf("room/")){var n,i,s;const a=e.substring(5),r=a.indexOf(":")+1;let o=a.length;a.substring(r).indexOf("/")>-1&&(o=r+a.substring(r).indexOf("/"));const l=a.substring(0,o);let c,d=a.substring(o+1);if(d||(d=void 0),t.signurl&&t.email&&(c=Y.a.instance.storeInvite(l,t)),!c){c=Y.a.instance.getInvites().find((e=>e.roomId===l))}let m=[];t.via&&(m="string"==typeof t.via?[t.via]:t.via);const u={action:H.a.ViewRoom,event_id:d,via_servers:m,highlighted:Boolean(d),threepid_invite:c,oob_data:{name:null===(n=c)||void 0===n?void 0:n.roomName,avatarUrl:null===(i=c)||void 0===i?void 0:i.roomAvatarUrl,inviterName:null===(s=c)||void 0===s?void 0:s.inviterName},room_alias:void 0,room_id:void 0,metricsTrigger:void 0};"#"===l[0]?u.room_alias=l:u.room_id=l,_.a.dispatch(u)}else if(0===e.indexOf("user/")){const a=e.substring(5);_.a.dispatch({action:"view_user_info",userId:a,subAction:t.action})}else h.a.info("Ignoring showScreen for '%s'",e);else _.a.dispatch({action:H.a.ViewHomePage})}notifyNewScreen(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.props.onNewScreen&&this.props.onNewScreen(e,t),this.setPageSubtitle()}onLogoutClick(e){_.a.dispatch({action:"logout"}),e.stopPropagation(),e.preventDefault()}dispatchTimelineResize(){_.a.dispatch({action:"timeline_resize"})}onRegistered(e){return x.k(e)}onSendEvent(e,t){const a=f.a.get();a&&a.sendEvent(e,t.getType(),t.getContent()).then((()=>{_.a.dispatch({action:"message_sent"})}))}setPageSubtitle(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(this.state.currentRoomId){const t=f.a.get(),a=t&&t.getRoom(this.state.currentRoomId);a&&(e=`${this.subTitleStatus} | ${a.name} ${e}`)}else e=`${this.subTitleStatus} ${e}`;const t=`${E.b.get().brand} ${e}`;document.title!==t&&(document.title=t)}getFragmentAfterLogin(){let e="";const t=this.props.initialScreenAfterLogin;return t&&!["welcome","login","register","start_sso","start_cas"].includes(t.screen)&&(e=`/${t.screen}`),e}render(){const e=this.getFragmentAfterLogin();let t=null;if(this.state.view===ke.a.LOADING)t=l.a.createElement("div",{className:"mx_MatrixChat_splash"},l.a.createElement(ne.a,null));else if(this.state.view===ke.a.COMPLETE_SECURITY)t=l.a.createElement(ce.a,{onFinished:this.onCompleteSecurityE2eSetupFinished});else if(this.state.view===ke.a.E2E_SETUP)t=l.a.createElement(ue.a,{onFinished:this.onCompleteSecurityE2eSetupFinished,accountPassword:this.accountPassword,tokenLogin:!!this.tokenLogin});else if(this.state.view===ke.a.LOGGED_IN){const e=this.state.syncError&&this.state.syncError instanceof m.c;if(this.state.ready&&this.state.page_type&&!e)t=l.a.createElement(W.a,i()({},this.props,this.state,{ref:this.loggedInView,matrixClient:f.a.get(),onRegistered:this.onRegistered,currentRoomId:this.state.currentRoomId}));else{let a;this.state.syncError&&!e&&(a=l.a.createElement("div",{className:"mx_MatrixChat_syncError"},Object(D.b)(this.state.syncError))),t=l.a.createElement("div",{className:"mx_MatrixChat_splash"},a,l.a.createElement(ne.a,null),l.a.createElement("div",{className:"mx_MatrixChat_splashButtons"},l.a.createElement(xe.a,{kind:"link_inline",onClick:this.onLogoutClick},Object(R.a)("Logout"))))}}else if(this.state.view===ke.a.WELCOME)t=l.a.createElement(de.a,null);else if(this.state.view===ke.a.REGISTER&&I.b.getValue(J.b.Registration)){var a;const n=null===(a=Y.a.instance.pickBestInvite())||void 0===a?void 0:a.toEmail;t=l.a.createElement(he.a,i()({clientSecret:this.state.register_client_secret,sessionId:this.state.register_session_id,idSid:this.state.register_id_sid,email:n,brand:this.props.config.brand,makeRegistrationUrl:this.makeRegistrationUrl,onLoggedIn:this.onRegisterFlowComplete,onLoginClick:this.onLoginClick,onServerConfigChange:this.onServerConfigChange,defaultDeviceDisplayName:this.props.defaultDeviceDisplayName,fragmentAfterLogin:e},this.getServerProperties()))}else if(this.state.view===ke.a.FORGOT_PASSWORD&&I.b.getValue(J.b.PasswordReset))t=l.a.createElement(me.a,i()({onComplete:this.onLoginClick,onLoginClick:this.onLoginClick},this.getServerProperties()));else if(this.state.view===ke.a.LOGIN){const a=I.b.getValue(J.b.PasswordReset);t=l.a.createElement(pe.a,i()({isSyncing:this.state.pendingInitialSync,onLoggedIn:this.onUserCompletedLoginFlow,onRegisterClick:this.onRegisterClick,fallbackHsUrl:this.getFallbackHsUrl(),defaultDeviceDisplayName:this.props.defaultDeviceDisplayName,onForgotPasswordClick:a?this.onForgotPasswordClick:void 0,onServerConfigChange:this.onServerConfigChange,fragmentAfterLogin:e,defaultUsername:this.props.startingFragmentQueryParams.defaultUsername},this.getServerProperties()))}else this.state.view===ke.a.SOFT_LOGOUT?t=l.a.createElement(ye.a,{realQueryParams:this.props.realQueryParams,onTokenLoginCompleted:this.props.onTokenLoginCompleted,fragmentAfterLogin:e}):this.state.view===ke.a.USE_CASE_SELECTION?t=l.a.createElement(Pe.a,{onFinished:e=>this.onShowPostLoginScreen(e)}):h.a.error(`Unknown view ${this.state.view}`);return l.a.createElement(ge.a,null,l.a.createElement(Ae.a.Provider,{value:this.stores},t))}}r()($e,"displayName","MatrixChat"),r()($e,"defaultProps",{realQueryParams:{},startingFragmentQueryParams:{},config:{},onTokenLoginCompleted:()=>{}})}).call(this,a(14))},1463:function(e,t,a){!function(){"use strict";function e(e){var t=!0,a=!1,n=null,i={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 s(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function r(e){var t=e.type,a=e.tagName;return!("INPUT"!==a||!i[t]||e.readOnly)||"TEXTAREA"===a&&!e.readOnly||!!e.isContentEditable}function o(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function l(e){e.hasAttribute("data-focus-visible-added")&&(e.classList.remove("focus-visible"),e.removeAttribute("data-focus-visible-added"))}function c(a){a.metaKey||a.altKey||a.ctrlKey||(s(e.activeElement)&&o(e.activeElement),t=!0)}function d(e){t=!1}function m(e){s(e.target)&&(t||r(e.target))&&o(e.target)}function u(e){s(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(a=!0,window.clearTimeout(n),n=window.setTimeout((function(){a=!1}),100),l(e.target))}function h(e){"hidden"===document.visibilityState&&(a&&(t=!0),p())}function p(){document.addEventListener("mousemove",v),document.addEventListener("mousedown",v),document.addEventListener("mouseup",v),document.addEventListener("pointermove",v),document.addEventListener("pointerdown",v),document.addEventListener("pointerup",v),document.addEventListener("touchmove",v),document.addEventListener("touchstart",v),document.addEventListener("touchend",v)}function g(){document.removeEventListener("mousemove",v),document.removeEventListener("mousedown",v),document.removeEventListener("mouseup",v),document.removeEventListener("pointermove",v),document.removeEventListener("pointerdown",v),document.removeEventListener("pointerup",v),document.removeEventListener("touchmove",v),document.removeEventListener("touchstart",v),document.removeEventListener("touchend",v)}function v(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=!1,g())}document.addEventListener("keydown",c,!0),document.addEventListener("mousedown",d,!0),document.addEventListener("pointerdown",d,!0),document.addEventListener("touchstart",d,!0),document.addEventListener("visibilitychange",h,!0),p(),e.addEventListener("focus",m,!0),e.addEventListener("blur",u,!0),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if("undefined"!=typeof window&&"undefined"!=typeof document){var t;window.applyFocusVisiblePolyfill=e;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(e){(t=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}"undefined"!=typeof document&&e(document)}()},1464:function(e,t,a){var n;n=function(){return function(e){var t={};function a(n){if(t[n])return t[n].exports;var i=t[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,a),i.loaded=!0,i.exports}return a.m=e,a.c=t,a.p="",a(0)}([function(e,t){"use strict";e.exports=function(){if("undefined"==typeof document||"undefined"==typeof window)return{ask:function(){return"initial"},element:function(){return null},ignoreKeys:function(){},specificKeys:function(){},registerOnChange:function(){},unRegisterOnChange:function(){}};var e=document.documentElement,t=null,a="initial",n=a,i=Date.now(),s=!1,r=["button","input","select","textarea"],o=[],l=[16,17,18,91,93],c=[],d={keydown:"keyboard",keyup:"keyboard",mousedown:"mouse",mousemove:"mouse",MSPointerDown:"pointer",MSPointerMove:"pointer",pointerdown:"pointer",pointermove:"pointer",touchstart:"touch",touchend:"touch"},m=!1,u={x:null,y:null},h={2:"touch",3:"touch",4:"mouse"},p=!1;try{var g=Object.defineProperty({},"passive",{get:function(){p=!0}});window.addEventListener("test",null,g)}catch(e){}var v=function(){var e=!p||{passive:!0,capture:!0};document.addEventListener("DOMContentLoaded",b,!0),window.PointerEvent?(window.addEventListener("pointerdown",f,!0),window.addEventListener("pointermove",E,!0)):window.MSPointerEvent?(window.addEventListener("MSPointerDown",f,!0),window.addEventListener("MSPointerMove",E,!0)):(window.addEventListener("mousedown",f,!0),window.addEventListener("mousemove",E,!0),"ontouchstart"in window&&(window.addEventListener("touchstart",f,e),window.addEventListener("touchend",f,!0))),window.addEventListener(x(),E,e),window.addEventListener("keydown",f,!0),window.addEventListener("keyup",f,!0),window.addEventListener("focusin",_,!0),window.addEventListener("focusout",S,!0)},b=function(){if(s=!("false"===e.getAttribute("data-whatpersist")||"false"===document.body.getAttribute("data-whatpersist")))try{window.sessionStorage.getItem("what-input")&&(a=window.sessionStorage.getItem("what-input")),window.sessionStorage.getItem("what-intent")&&(n=window.sessionStorage.getItem("what-intent"))}catch(e){}y("input"),y("intent")},f=function(e){var t=e.which,i=d[e.type];"pointer"===i&&(i=O(e));var s=!c.length&&-1===l.indexOf(t),o=c.length&&-1!==c.indexOf(t),m="keyboard"===i&&t&&(s||o)||"mouse"===i||"touch"===i;if(C(i)&&(m=!1),m&&a!==i&&(w("input",a=i),y("input")),m&&n!==i){var u=document.activeElement;u&&u.nodeName&&(-1===r.indexOf(u.nodeName.toLowerCase())||"button"===u.nodeName.toLowerCase()&&!R(u,"form"))&&(w("intent",n=i),y("intent"))}},y=function(t){e.setAttribute("data-what"+t,"input"===t?a:n),k(t)},E=function(e){var t=d[e.type];"pointer"===t&&(t=O(e)),j(e),(!m&&!C(t)||m&&"wheel"===e.type||"mousewheel"===e.type||"DOMMouseScroll"===e.type)&&n!==t&&(w("intent",n=t),y("intent"))},_=function(a){a.target.nodeName?(t=a.target.nodeName.toLowerCase(),e.setAttribute("data-whatelement",t),a.target.classList&&a.target.classList.length&&e.setAttribute("data-whatclasses",a.target.classList.toString().replace(" ",","))):S()},S=function(){t=null,e.removeAttribute("data-whatelement"),e.removeAttribute("data-whatclasses")},w=function(e,t){if(s)try{window.sessionStorage.setItem("what-"+e,t)}catch(e){}},O=function(e){return"number"==typeof e.pointerType?h[e.pointerType]:"pen"===e.pointerType?"touch":e.pointerType},C=function(e){var t=Date.now(),n="mouse"===e&&"touch"===a&&t-i<200;return i=t,n},x=function(){return"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll"},k=function(e){for(var t=0,i=o.length;t=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,l=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return o=e.done,e},e:function(e){l=!0,r=e},f:function(){try{o||null==a.return||a.return()}finally{if(l)throw r}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a1&&void 0!==arguments[1]?arguments[1]:{withProps:!1};return e=e.filter((function(e){return!!e})),{getInitialState:function(){return o(this),t.withProps?this.constructor.calculateState(null,this.props):this.constructor.calculateState(null,void 0)},componentWillMount:function(){var a=this,n=!1,i=function(){n=!0};this._fluxMixinSubscriptions=e.map((function(e){return e.addListener(i)}));this._fluxMixinStoreGroup=new s(e,(function(){n&&a.setState((function(e){return t.withProps?a.constructor.calculateState(e,a.props):a.constructor.calculateState(e,void 0)})),n=!1}))},componentWillUnmount:function(){this._fluxMixinStoreGroup.release();var e,t=n(this._fluxMixinSubscriptions);try{for(t.s();!(e=t.n()).done;){e.value.remove()}}catch(e){t.e(e)}finally{t.f()}this._fluxMixinSubscriptions=[]}}}},1471:function(e,t,a){"use strict";function n(e,t){return n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}var i=a(889),s=a(1477),r=a(254),o=function(e){var t,a;function i(t){var a,n,i,s;return a=e.call(this,t)||this,n=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(a),s=void 0,(i="_state")in n?Object.defineProperty(n,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[i]=s,a._state=a.getInitialState(),a}a=e,(t=i).prototype=Object.create(a.prototype),t.prototype.constructor=t,n(t,a);var o=i.prototype;return o.getState=function(){return this._state},o.getInitialState=function(){return s("FluxReduceStore","getInitialState")},o.reduce=function(e,t){return s("FluxReduceStore","reduce")},o.areEqual=function(e,t){return e===t},o.__invokeOnDispatch=function(e){this.__changed=!1;var t=this._state,a=this.reduce(t,e);void 0===a&&r(!1),this.areEqual(t,a)||(this._state=a,this.__emitChange()),this.__changed&&this.__emitter.emit(this.__changeEvent)},i}(i);e.exports=o},1472:function(e,t,a){var n={EventEmitter:a(1473),EmitterSubscription:a(890)};e.exports=n},1473:function(e,t,a){"use strict";var n=a(890),i=a(1475),s=a(254),r=a(1476),o=function(){function e(){this._subscriber=new i,this._currentSubscription=null}var t=e.prototype;return t.addListener=function(e,t,a){return this._subscriber.addSubscription(e,new n(this._subscriber,t,a))},t.once=function(e,t,a){var n=this;return this.addListener(e,(function(){n.removeCurrentListener(),t.apply(a,arguments)}))},t.removeAllListeners=function(e){this._subscriber.removeAllSubscriptions(e)},t.removeCurrentListener=function(){this._currentSubscription||s(!1),this._subscriber.removeSubscription(this._currentSubscription)},t.listeners=function(e){var t=this._subscriber.getSubscriptionsForType(e);return t?t.filter(r.thatReturnsTrue).map((function(e){return e.listener})):[]},t.emit=function(e){var t=this._subscriber.getSubscriptionsForType(e);if(t){for(var a=Object.keys(t),n=0;n6e4&&(await this.updateState({lastRageshakeTime:n}),await Object(l.a)(o.b.get().bug_report_endpoint_url,{userText:`Auto-reporting decryption error (sender)\nRecipient rageshake: ${a}`,sendLogs:!0,labels:["Z-UISI","web","uisi-sender"],customApp:o.b.get().uisi_autorageshake_app,customFields:{recipient_rageshake:a,auto_uisi:JSON.stringify(t)}}))}async onReportKeyBackupNotEnabled(){m.b.getValue("automaticKeyBackNotEnabledReporting")&&await Object(l.a)(o.b.get().bug_report_endpoint_url,{userText:"Auto-reporting key backup not enabled",sendLogs:!0,labels:["web",u.a.ReportKeyBackupNotEnabled]})}}i()(v,"internalInstance",(()=>{const e=new v;return e.start(),e})()),window.mxAutoRageshakeStore=v.instance},1479:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(13),i=a.n(n),s=a(17),r=a(148);class o extends s.EventEmitter{constructor(){super(...arguments),i()(this,"_isResizing",!1),i()(this,"throttledMiddlePanel",Object(r.throttle)((()=>this.emit("middlePanelResized")),200))}get isResizing(){return this._isResizing}startResizing(){this._isResizing=!0,this.emit("isResizing",!0)}stopResizing(){this._isResizing=!1,this.emit("isResizing",!1)}noisyMiddlePanel(){this.emit("middlePanelResizedNoisy")}updateMiddlePanel(){this.throttledMiddlePanel(),this.noisyMiddlePanel()}notifyLeftHandleResized(){this.updateMiddlePanel()}notifyRightHandleResized(){this.updateMiddlePanel()}notifyTimelineHeightChanged(){this.updateMiddlePanel()}notifyWindowResized(){this.updateMiddlePanel()}}},1480:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(120);function i(e,t,a){Object(n.useEffect)((()=>{let n=null;const i=()=>{n=null,t(...a)};if(!1!==e)return n=window.setTimeout(i,100),()=>{n&&clearTimeout(n)}}),[e,t,a])}},1481:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(120),i=a(122),s=a(137),r=a(125);const o=()=>{const[e,t]=Object(n.useState)((()=>{const e=i.a.get();return r.b.getValue("SpotlightSearch.recentSearches",null).map((t=>e.getRoom(t))).filter(Boolean)}));return[e,()=>{r.b.setValue("SpotlightSearch.recentSearches",null,s.a.ACCOUNT,[]),t([])}]}},1482:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(120),i=a(122),s=a(632);const r=()=>{const[e,t]=Object(n.useState)(null),[a,r]=Object(n.useState)(!1),[o,l]=Object(s.a)(t);return{ready:!0,loading:a,profile:e,search:Object(n.useCallback)((async e=>{let{query:a}=e;if(o(a),null==a||!a.length||!a.startsWith("@")||!a.includes(":"))return t(null),!0;r(!0);try{const e=await i.a.get().getProfileInfo(a);return l(a,{user_id:a,avatar_url:e.avatar_url,display_name:e.displayname}),!0}catch(e){return console.error("Could not fetch profile info for params",{term:a},e),l(a,null),!1}finally{r(!1)}}),[o,l])}}},1483:function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(120),i=a(122),s=a(131),r=a(125),o=a(632),l=a(166);const c="ALL_ROOMS",d="mx_last_room_directory_server",m="mx_last_room_directory_instance";let u;const h="nsfw",p=e=>{var t,a;return!(null!==(t=e.name)&&void 0!==t&&t.toLocaleLowerCase().includes(h)||null!==(a=e.topic)&&void 0!==a&&a.toLocaleLowerCase().includes(h))},g=()=>{const[e,t]=Object(n.useState)([]),[a,h]=Object(n.useState)(void 0),[g,v]=Object(n.useState)(null),[b,f]=Object(n.useState)(!1),[y,E]=Object(n.useState)(!1),[_,S]=Object(o.a)(t),w=Object(l.b)("SpotlightSearch.showNsfwPublicRooms");const O=Object(n.useCallback)((async e=>{let{limit:t=20,query:n,roomTypes:s}=e;const r={limit:t};(null==a?void 0:a.roomServer)!=i.a.getHomeserverName()&&(r.server=null==a?void 0:a.roomServer),(null==a?void 0:a.instanceId)===c?r.include_all_networks=!0:null!=a&&a.instanceId&&(r.third_party_instance_id=a.instanceId),(n||s)&&(r.filter={generic_search_term:n,room_types:await i.a.get().doesServerSupportUnstableFeature("org.matrix.msc3827.stable")?Array.from(s):null}),_(r);try{E(!0);const{chunk:e}=await i.a.get().publicRooms(r);return S(r,w?e:e.filter(p)),!0}catch(e){return console.error("Could not fetch public rooms for params",r,e),S(r,[]),!1}finally{E(!1)}}),[a,_,S,w]);return Object(n.useEffect)((()=>{!async function(){if(i.a.get())if(u)v(u);else{const e=await i.a.get().getThirdpartyProtocols();u=e,v(e)}else f(!0)}()}),[]),Object(n.useEffect)((()=>{var e,t,a,n;if(null===g)return;const o=i.a.getHomeserverName(),l=localStorage.getItem(d),u=null!==(e=localStorage.getItem(m))&&void 0!==e?e:void 0;let p,v=o;(null!==(t=s.b.getObject("room_directory"))&&void 0!==t&&null!==(a=t.get("servers"))&&void 0!==a&&a.includes(l)||null!==(n=r.b.getValue("room_directory_servers"))&&void 0!==n&&n.includes(l))&&(v=l),v!==o||u!==c&&!Object.values(g).some((e=>{e.instances.some((e=>e.instance_id===u))}))||(p=u),f(!0),h({roomServer:v,instanceId:p})}),[g]),Object(n.useEffect)((()=>{localStorage.setItem(d,null==a?void 0:a.roomServer),null!=a&&a.instanceId?localStorage.setItem(m,null==a?void 0:a.instanceId):localStorage.removeItem(m)}),[a]),{ready:b,loading:y,publicRooms:e,protocols:g,config:a,search:O,setConfig:function(e){if(!b)throw new Error("public room configuration not initialised yet");h(e)}}}},1484:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(120),i=a(136),s=a(893),r=a(16),o=a(122);const l=(e,t)=>{var a;const[l,c]=Object(n.useState)([]),[d,m]=Object(n.useState)(),u=Object(n.useCallback)((()=>{m(e?new s.a(e,50):null)}),[e]);Object(n.useEffect)(u,[u]),Object(n.useEffect)((()=>{if(!e||!d)return;let t=!1;return(async()=>{for(;null!=d&&d.canLoadMore&&!t&&e===d.root;)await d.load(),d.canLoadMore&&d.load(),c(d.rooms)})(),()=>{t=!0}}),[e,d]);return[Object(n.useMemo)((()=>{const e=t.trim(),a=e.toLowerCase(),n=Object(r.z)(e),s=o.a.get();return null==l?void 0:l.filter((e=>{var t;return e.room_type!==i.RoomType.Space&&"join"!==(null===(t=s.getRoom(e.room_id))||void 0===t?void 0:t.getMyMembership())&&(Object(r.z)(e.name||"").includes(n)||(e.canonical_alias||"").includes(a))}))}),[l,t]),null!==(a=null==d?void 0:d.loading)&&void 0!==a&&a]}},1485:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(120),i=a(122),s=a(402),r=a(632);const o=()=>{const[e,t]=Object(n.useState)([]),[a,o]=Object(n.useState)(!1),[l,c]=Object(r.a)(t);return{ready:!0,loading:a,users:e,search:Object(n.useCallback)((async e=>{let{limit:a=20,query:n}=e;const r={limit:a,term:n};if(l(r),null==n||!n.length)return t([]),!0;try{o(!0);const{results:e}=await i.a.get().searchUserDirectory(r);return c(r,e.map((e=>new s.a(e)))),!0}catch(e){return console.error("Could not fetch user in user directory for params",{limit:a,term:n},e),c(r,[]),!1}finally{o(!1)}}),[l,c])}}},1486:function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(130),i=a.n(n),s=a(132),r=a.n(s),o=a(126),l=a.n(o),c=a(120),d=a.n(c),m=a(169),u=a(123);const h=["inputRef","children","endAdornment","className"],p=e=>{let{inputRef:t,children:a,endAdornment:n,className:s}=e,o=r()(e,h);const[c,p,g]=Object(m.i)(t);return d.a.createElement(u.a,i()({},o,{className:l()(s,"mx_SpotlightDialog_option"),onFocus:c,inputRef:g,tabIndex:-1,"aria-selected":p,role:"option"}),a,d.a.createElement("div",{className:"mx_SpotlightDialog_option--endAdornment"},d.a.createElement("kbd",{className:"mx_SpotlightDialog_enterPrompt","aria-hidden":!0},"↵"),n))}},1487:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(120),i=a.n(n),s=a(196),r=a(121),o=a(284);function l(e){var t,a,n;let{room:l,labelId:c,descriptionId:d,detailsId:m}=e,u=l.name||Object(o.a)(null!==(t=l.canonical_alias)&&void 0!==t?t:"",null!==(a=l.aliases)&&void 0!==a?a:[])||Object(r.a)("Unnamed room");u.length>80&&(u=`${u.substring(0,80)}...`);let h=l.topic||"";return h.length>800&&(h=`${h.substring(0,800)}...`),i.a.createElement("div",{className:"mx_SpotlightDialog_result_publicRoomDetails"},i.a.createElement("div",{className:"mx_SpotlightDialog_result_publicRoomHeader"},i.a.createElement("span",{id:c,className:"mx_SpotlightDialog_result_publicRoomName"},u),i.a.createElement("span",{id:d,className:"mx_SpotlightDialog_result_publicRoomAlias"},null!==(n=l.canonical_alias)&&void 0!==n?n:l.room_id)),i.a.createElement("div",{id:m,className:"mx_SpotlightDialog_result_publicRoomDescription"},i.a.createElement("span",{className:"mx_SpotlightDialog_result_publicRoomMemberCount"},Object(r.a)("%(count)s Members",{count:l.num_joined_members})),h&&i.a.createElement(i.a.Fragment,null," · ",i.a.createElement("span",{className:"mx_SpotlightDialog_result_publicRoomTopic",dangerouslySetInnerHTML:{__html:Object(s.g)(h)}}))))}},1488:function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(130),i=a.n(n),s=a(126),r=a.n(s),o=a(120),l=a.n(o),c=a(328),d=a(597),m=a(121),u=a(266),h=a(831),p=a(830),g=a(634),v=a(448);function b(e){let{room:t}=e;const[a]=Object(d.a)(t),[n,s]=Object(o.useState)(null),[b,f]=Object(o.useState)(null);let y,E;null!==n&&(y=t.isSpaceRoom()?l.a.createElement(g.a,i()({},Object(v.a)(n),{space:t,onFinished:()=>s(null)})):l.a.createElement(h.a,i()({},Object(v.a)(n),{room:t,onFinished:()=>s(null)}))),null!==b&&(E=l.a.createElement(p.a,i()({},Object(v.a)(b),{room:t,onFinished:()=>f(null)})));const _=r()("mx_SpotlightDialog_option--notifications",{mx_RoomNotificationContextMenu_iconBell:a===u.a.AllMessages,mx_RoomNotificationContextMenu_iconBellDot:a===u.a.AllMessagesLoud,mx_RoomNotificationContextMenu_iconBellMentions:a===u.a.MentionsOnly,mx_RoomNotificationContextMenu_iconBellCrossed:a===u.a.Mute});return l.a.createElement(o.Fragment,null,l.a.createElement(c.a,{className:"mx_SpotlightDialog_option--menu",onClick:e=>{e.preventDefault(),e.stopPropagation();const t=e.target;s(t.getBoundingClientRect())},title:t.isSpaceRoom()?Object(m.a)("Space options"):Object(m.a)("Room options"),isExpanded:null!==n}),!t.isSpaceRoom()&&l.a.createElement(c.a,{className:_,onClick:e=>{e.preventDefault(),e.stopPropagation();const t=e.target;f(t.getBoundingClientRect())},title:Object(m.a)("Notification options"),isExpanded:null!==b}),y,E)}},1489:function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(130),i=a.n(n),s=a(132),r=a.n(s),o=a(126),l=a.n(o),c=a(120),d=a.n(c),m=a(169),u=a(147);const h=["inputRef","className"],p=e=>{let{inputRef:t,className:a}=e,n=r()(e,h);const[s,o,c]=Object(m.i)(t);return d.a.createElement(u.a,i()({},n,{className:l()(a,"mx_SpotlightDialog_option"),onFocus:s,inputRef:c,tabIndex:-1,"aria-selected":o,role:"option"}))}},1490:function(e,t,a){"use strict";a.r(t),a.d(t,"Icon",(function(){return r}));var n,i=a(120);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t");return t.callbacks},t.setCallbacks=function(e){t.callbacks=e},t}r(t,e);var a=t.prototype;return a.componentDidMount=function(){this.unbind=b(window,[{eventName:"error",fn:this.onWindowError}])},a.componentDidCatch=function(e){if(!(e instanceof y))throw e;this.setState({})},a.componentWillUnmount=function(){this.unbind()},a.render=function(){return this.props.children(this.setCallbacks)},t}(s.Component),S=function(e){return e+1},w=function(e,t){var a=e.droppableId===t.droppableId,n=S(e.index),i=S(t.index);return a?"\n You have moved the item from position "+n+"\n to position "+i+"\n ":"\n You have moved the item from position "+n+"\n in list "+e.droppableId+"\n to list "+t.droppableId+"\n in position "+i+"\n "},O=function(e,t,a){return t.droppableId===a.droppableId?"\n The item "+e+"\n has been combined with "+a.draggableId:"\n The item "+e+"\n in list "+t.droppableId+"\n has been combined with "+a.draggableId+"\n in list "+a.droppableId+"\n "},C=function(e){return"\n The item has returned to its starting position\n of "+S(e.index)+"\n"},x="\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n",k=function(e){return"\n You have lifted an item in position "+S(e.source.index)+"\n"},j=function(e){var t=e.destination;if(t)return w(e.source,t);var a=e.combine;return a?O(e.draggableId,e.source,a):"You are over an area that cannot be dropped on"},R=function(e){if("CANCEL"===e.reason)return"\n Movement cancelled.\n "+C(e.source)+"\n ";var t=e.destination,a=e.combine;return t?"\n You have dropped the item.\n "+w(e.source,t)+"\n ":a?"\n You have dropped the item.\n "+O(e.draggableId,e.source,a)+"\n ":"\n The item has been dropped while not over a drop area.\n "+C(e.source)+"\n "},I={x:0,y:0},T=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},N=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},D=function(e,t){return e.x===t.x&&e.y===t.y},P=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},M=function(e,t,a){var n;return void 0===a&&(a=0),(n={})[e]=t,n["x"===e?"y":"x"]=a,n},A=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},L=function(e,t){return Math.min.apply(Math,t.map((function(t){return A(e,t)})))},U=function(e){return function(t){return{x:e(t.x),y:e(t.y)}}},F=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},B=function(e){return[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}]},V=function(e,t){return t&&t.shouldClipSubject?function(e,t){var a=m.getRect({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return a.width<=0||a.height<=0?null:a}(t.pageMarginBox,e):m.getRect(e)},W=function(e){var t=e.page,a=e.withPlaceholder,n=e.axis,i=e.frame,s=function(e,t){return t?F(e,t.scroll.diff.displacement):e}(t.marginBox,i),r=function(e,t,a){var n;return a&&a.increasedBy?o({},e,((n={})[t.end]=e[t.end]+a.increasedBy[t.line],n)):e}(s,n,a);return{page:t,withPlaceholder:a,active:V(r,i)}},H=function(e,t){e.frame||E(!1);var a=e.frame,n=N(t,a.scroll.initial),i=P(n),s=o({},a,{scroll:{initial:a.scroll.initial,current:t,diff:{value:n,displacement:i},max:a.scroll.max}}),r=W({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:s});return o({},e,{frame:s,subject:r})};function z(e){return Object.values?Object.values(e):Object.keys(e).map((function(t){return e[t]}))}function G(e,t){if(e.findIndex)return e.findIndex(t);for(var a=0;ae.bottom,o=n.lefte.right;return!(!r||!o)||(r&&s||o&&i)}},le=function(e){var t=re(e.top,e.bottom),a=re(e.left,e.right);return function(e){return t(e.top)&&t(e.bottom)&&a(e.left)&&a(e.right)}},ce={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},de={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},me=function(e){var t=e.target,a=e.destination,n=e.viewport,i=e.withDroppableDisplacement,s=e.isVisibleThroughFrameFn,r=i?function(e,t){var a=t.frame?t.frame.scroll.diff.displacement:I;return F(e,a)}(t,a):t;return function(e,t,a){return!!t.subject.active&&a(t.subject.active)(e)}(r,a,s)&&function(e,t,a){return a(t)(e)}(r,n,s)},ue=function(e){return me(o({},e,{isVisibleThroughFrameFn:oe}))},he=function(e){return me(o({},e,{isVisibleThroughFrameFn:le}))};function pe(e){var t=e.afterDragging,a=e.destination,n=e.displacedBy,i=e.viewport,s=e.forceShouldAnimate,r=e.last;return t.reduce((function(e,t){var o=function(e,t){var a=e.page.marginBox,n={top:t.point.y,right:0,bottom:0,left:t.point.x};return m.getRect(m.expand(a,n))}(t,n),l=t.descriptor.id;if(e.all.push(l),!ue({target:o,destination:a,viewport:i,withDroppableDisplacement:!0}))return e.invisible[t.descriptor.id]=!0,e;var c=function(e,t,a){if("boolean"==typeof a)return a;if(!t)return!0;var n=t.invisible,i=t.visible;if(n[e])return!1;var s=i[e];return!s||s.shouldAnimate}(l,r,s),d={draggableId:l,shouldAnimate:c};return e.visible[l]=d,e}),{all:[],visible:{},invisible:{}})}function ge(e){var t=e.insideDestination,a=e.inHomeList,n=e.displacedBy,i=e.destination,s=function(e,t){if(!e.length)return 0;var a=e[e.length-1].descriptor.index;return t.inHomeList?a:a+1}(t,{inHomeList:a});return{displaced:ie,displacedBy:n,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:s}}}}function ve(e){var t=e.draggable,a=e.insideDestination,n=e.destination,i=e.viewport,s=e.displacedBy,r=e.last,o=e.index,l=e.forceShouldAnimate,c=ae(t,n);if(null==o)return ge({insideDestination:a,inHomeList:c,displacedBy:s,destination:n});var d=K(a,(function(e){return e.descriptor.index===o}));if(!d)return ge({insideDestination:a,inHomeList:c,displacedBy:s,destination:n});var m=te(t,a),u=a.indexOf(d);return{displaced:pe({afterDragging:m.slice(u),destination:n,displacedBy:s,last:r,viewport:i.frame,forceShouldAnimate:l}),displacedBy:s,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:o}}}}function be(e,t){return Boolean(t.effected[e])}var fe=function(e){var t=e.isMovingForward,a=e.isInHomeList,n=e.draggable,i=e.draggables,s=e.destination,r=e.insideDestination,o=e.previousImpact,l=e.viewport,c=e.afterCritical,d=o.at;if(d||E(!1),"REORDER"===d.type){var m=function(e){var t=e.isMovingForward,a=e.isInHomeList,n=e.insideDestination,i=e.location;if(!n.length)return null;var s=i.index,r=t?s+1:s-1,o=n[0].descriptor.index,l=n[n.length-1].descriptor.index;return r(a?l:l+1)?null:r}({isMovingForward:t,isInHomeList:a,location:d.destination,insideDestination:r});return null==m?null:ve({draggable:n,insideDestination:r,destination:s,viewport:l,last:o.displaced,displacedBy:o.displacedBy,index:m})}var u=function(e){var t=e.isMovingForward,a=e.destination,n=e.draggables,i=e.combine,s=e.afterCritical;if(!a.isCombineEnabled)return null;var r=i.draggableId,o=n[r].descriptor.index;return be(r,s)?t?o:o-1:t?o+1:o}({isMovingForward:t,destination:s,displaced:o.displaced,draggables:i,combine:d.combine,afterCritical:c});return null==u?null:ve({draggable:n,insideDestination:r,destination:s,viewport:l,last:o.displaced,displacedBy:o.displacedBy,index:u})},ye=function(e){var t=e.afterCritical,a=e.impact,n=e.draggables,i=ee(a);i||E(!1);var s=i.draggableId,r=n[s].page.borderBox.center,o=function(e){var t=e.displaced,a=e.afterCritical,n=e.combineWith,i=e.displacedBy,s=Boolean(t.visible[n]||t.invisible[n]);return be(n,a)?s?I:P(i.point):s?i.point:I}({displaced:a.displaced,afterCritical:t,combineWith:s,displacedBy:a.displacedBy});return T(r,o)},Ee=function(e,t){return t.margin[e.start]+t.borderBox[e.size]/2},_e=function(e,t,a){return t[e.crossAxisStart]+a.margin[e.crossAxisStart]+a.borderBox[e.crossAxisSize]/2},Se=function(e){var t=e.axis,a=e.moveRelativeTo,n=e.isMoving;return M(t.line,a.marginBox[t.end]+Ee(t,n),_e(t,a.marginBox,n))},we=function(e){var t=e.axis,a=e.moveRelativeTo,n=e.isMoving;return M(t.line,a.marginBox[t.start]-function(e,t){return t.margin[e.end]+t.borderBox[e.size]/2}(t,n),_e(t,a.marginBox,n))},Oe=function(e){var t=e.impact,a=e.draggable,n=e.draggables,i=e.droppable,s=e.afterCritical,r=X(i.descriptor.id,n),o=a.page,l=i.axis;if(!r.length)return function(e){var t=e.axis,a=e.moveInto,n=e.isMoving;return M(t.line,a.contentBox[t.start]+Ee(t,n),_e(t,a.contentBox,n))}({axis:l,moveInto:i.page,isMoving:o});var c=t.displaced,d=t.displacedBy,u=c.all[0];if(u){var h=n[u];if(be(u,s))return we({axis:l,moveRelativeTo:h.page,isMoving:o});var p=m.offset(h.page,d.point);return we({axis:l,moveRelativeTo:p,isMoving:o})}var g=r[r.length-1];if(g.descriptor.id===a.descriptor.id)return o.borderBox.center;if(be(g.descriptor.id,s)){var v=m.offset(g.page,P(s.displacedBy.point));return Se({axis:l,moveRelativeTo:v,isMoving:o})}return Se({axis:l,moveRelativeTo:g.page,isMoving:o})},Ce=function(e,t){var a=e.frame;return a?T(t,a.scroll.diff.displacement):t},xe=function(e){var t=function(e){var t=e.impact,a=e.draggable,n=e.droppable,i=e.draggables,s=e.afterCritical,r=a.page.borderBox.center,o=t.at;return n&&o?"REORDER"===o.type?Oe({impact:t,draggable:a,draggables:i,droppable:n,afterCritical:s}):ye({impact:t,draggables:i,afterCritical:s}):r}(e),a=e.droppable;return a?Ce(a,t):t},ke=function(e,t){var a=N(t,e.scroll.initial),n=P(a);return{frame:m.getRect({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:a,displacement:n}}}};function je(e,t){return e.map((function(e){return t[e]}))}var Re=function(e){var t=e.pageBorderBoxCenter,a=e.draggable,n=function(e,t){return T(e.scroll.diff.displacement,t)}(e.viewport,t),i=N(n,a.page.borderBox.center);return T(a.client.borderBox.center,i)},Ie=function(e){var t=e.draggable,a=e.destination,n=e.newPageBorderBoxCenter,i=e.viewport,s=e.withDroppableDisplacement,r=e.onlyOnMainAxis,l=void 0!==r&&r,c=N(n,t.page.borderBox.center),d={target:F(t.page.borderBox,c),destination:a,withDroppableDisplacement:s,viewport:i};return l?function(e){return me(o({},e,{isVisibleThroughFrameFn:(t=e.destination.axis,function(e){var a=re(e.top,e.bottom),n=re(e.left,e.right);return function(e){return t===ce?a(e.top)&&a(e.bottom):n(e.left)&&n(e.right)}})}));var t}(d):he(d)},Te=function(e){var t=e.isMovingForward,a=e.draggable,n=e.destination,i=e.draggables,s=e.previousImpact,r=e.viewport,l=e.previousPageBorderBoxCenter,c=e.previousClientSelection,d=e.afterCritical;if(!n.isEnabled)return null;var m=X(n.descriptor.id,i),u=ae(a,n),h=function(e){var t=e.isMovingForward,a=e.draggable,n=e.destination,i=e.insideDestination,s=e.previousImpact;if(!n.isCombineEnabled)return null;if(!Z(s))return null;function r(e){var t={type:"COMBINE",combine:{draggableId:e,droppableId:n.descriptor.id}};return o({},s,{at:t})}var l=s.displaced.all,c=l.length?l[0]:null;if(t)return c?r(c):null;var d=te(a,i);if(!c)return d.length?r(d[d.length-1].descriptor.id):null;var m=G(d,(function(e){return e.descriptor.id===c}));-1===m&&E(!1);var u=m-1;return u<0?null:r(d[u].descriptor.id)}({isMovingForward:t,draggable:a,destination:n,insideDestination:m,previousImpact:s})||fe({isMovingForward:t,isInHomeList:u,draggable:a,draggables:i,destination:n,insideDestination:m,previousImpact:s,viewport:r,afterCritical:d});if(!h)return null;var p=xe({impact:h,draggable:a,droppable:n,draggables:i,afterCritical:d});if(Ie({draggable:a,destination:n,newPageBorderBoxCenter:p,viewport:r.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:Re({pageBorderBoxCenter:p,draggable:a,viewport:r}),impact:h,scrollJumpRequest:null};var g=N(p,l),v=function(e){var t=e.impact,a=e.viewport,n=e.destination,i=e.draggables,s=e.maxScrollChange,r=ke(a,T(a.scroll.current,s)),l=n.frame?H(n,T(n.frame.scroll.current,s)):n,c=t.displaced,d=pe({afterDragging:je(c.all,i),destination:n,displacedBy:t.displacedBy,viewport:r.frame,last:c,forceShouldAnimate:!1}),m=pe({afterDragging:je(c.all,i),destination:l,displacedBy:t.displacedBy,viewport:a.frame,last:c,forceShouldAnimate:!1}),u={},h={},p=[c,d,m];return c.all.forEach((function(e){var t=function(e,t){for(var a=0;a1?d.sort((function(e,t){return Ne(e)[o.start]-Ne(t)[o.start]}))[0]:c.sort((function(e,t){var n=L(a,B(Ne(e))),i=L(a,B(Ne(t)));return n!==i?n-i:Ne(e)[o.start]-Ne(t)[o.start]}))[0]}({isMovingForward:t,pageBorderBoxCenter:a,source:i,droppables:r,viewport:o});if(!c)return null;var d=X(c.descriptor.id,s),m=function(e){var t=e.pageBorderBoxCenter,a=e.viewport,n=e.destination,i=e.insideDestination,s=e.afterCritical,r=i.filter((function(e){return he({target:Pe(e,s),destination:n,viewport:a.frame,withDroppableDisplacement:!0})})).sort((function(e,a){var i=A(t,Ce(n,De(e,s))),r=A(t,Ce(n,De(a,s)));return in.left&&a.topn.top))return!1;if(We(i)(t.center))return!0;var s=e.axis,r=i.center[s.crossAxisLine],o=t[s.crossAxisStart],l=t[s.crossAxisEnd],c=re(i[s.crossAxisStart],i[s.crossAxisEnd]),d=c(o),m=c(l);return!d&&!m||(d?or)}));return i.length?1===i.length?i[0].descriptor.id:function(e){var t=e.pageBorderBox,a=e.draggable,n=e.candidates,i=a.page.borderBox.center,s=n.map((function(e){var a=e.axis,n=M(e.axis.line,t.center[a.line],e.page.borderBox.center[a.crossAxisLine]);return{id:e.descriptor.id,distance:A(i,n)}})).sort((function(e,t){return t.distance-e.distance}));return s[0]?s[0].id:null}({pageBorderBox:t,draggable:a,candidates:i}):null}var ze=function(e,t){return m.getRect(F(e,t))};function Ge(e){var t=e.displaced,a=e.id;return Boolean(t.visible[a]||t.invisible[a])}var Ke=function(e){var t=e.pageOffset,a=e.draggable,n=e.draggables,i=e.droppables,s=e.previousImpact,r=e.viewport,o=e.afterCritical,l=ze(a.page.borderBox,t),c=He({pageBorderBox:l,draggable:a,droppables:i});if(!c)return se;var d=i[c],m=X(d.descriptor.id,n),u=function(e,t){var a=e.frame;return a?ze(t,a.scroll.diff.value):t}(d,l);return function(e){var t=e.draggable,a=e.pageBorderBoxWithDroppableScroll,n=e.previousImpact,i=e.destination,s=e.insideDestination,r=e.afterCritical;if(!i.isCombineEnabled)return null;var o=i.axis,l=Me(i.axis,t.displaceBy),c=l.value,d=a[o.start],m=a[o.end],u=K(te(t,s),(function(e){var t=e.descriptor.id,a=e.page.borderBox,i=a[o.size]/4,s=be(t,r),l=Ge({displaced:n.displaced,id:t});return s?l?m>a[o.start]+i&&ma[o.start]-c+i&&da[o.start]+c+i&&ma[o.start]+i&&dt.descriptor.index?a.descriptor.index-1:a.descriptor.index:null}({draggable:a,closest:K(te(a,i),(function(e){var t=e.descriptor.id,a=e.page.borderBox.center[l.line],n=be(t,o),i=Ge({displaced:s,id:t});return n?i?u<=a:m=1500)return It;var s=Rt+Tt*(i/1500);return Number(("CANCEL"===n?.6*s:s).toFixed(2))}({current:i.current.client.offset,destination:b,reason:s});a(function(e){return{type:"DROP_ANIMATE",payload:e}}({newHomeClientOffset:b,dropDuration:y,completed:f}))}else a(ft({completed:f}))}}else a(function(e){return{type:"DROP_PENDING",payload:e}}({reason:s}))}else e(n)}}},Dt=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function Pt(e){var t=e.onWindowScroll;var a=h((function(){t(Dt())})),n=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(t){t.target!==window&&t.target!==window.document||e()}}}(a),i=v;function s(){return i!==v}return{start:function(){s()&&E(!1),i=b(window,[n])},stop:function(){s()||E(!1),a.cancel(),i(),i=v},isActive:s}}var Mt=function(e){var t=Pt({onWindowScroll:function(t){e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return function(e){return function(a){t.isActive()||"INITIAL_PUBLISH"!==a.type||t.start(),t.isActive()&&function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(a)&&t.stop(),e(a)}}},At=function(){var e=[];return{add:function(t){var a=setTimeout((function(){return function(t){var a=G(e,(function(e){return e.timerId===t}));-1===a&&E(!1),e.splice(a,1)[0].callback()}(a)})),n={timerId:a,callback:t};e.push(n)},flush:function(){if(e.length){var t=[].concat(e);e.length=0,t.forEach((function(e){clearTimeout(e.timerId),e.callback()}))}}}},Lt=function(e,t){et(),t(),tt()},Ut=function(e,t){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t}},Ft=function(e,t,a,n){if(e){var i=function(e){var t=!1,a=!1,n=setTimeout((function(){a=!0})),i=function(i){t||a||(t=!0,e(i),clearTimeout(n))};return i.wasCalled=function(){return t},i}(a);e(t,{announce:i}),i.wasCalled()||a(n(t))}else a(n(t))},Bt=function(e,t){var a=function(e,t){var a=At(),n=null,i=function(a){n||E(!1),n=null,Lt(0,(function(){return Ft(e().onDragEnd,a,t,R)}))};return{beforeCapture:function(t,a){n&&E(!1),Lt(0,(function(){var n=e().onBeforeCapture;n&&n({draggableId:t,mode:a})}))},beforeStart:function(t,a){n&&E(!1),Lt(0,(function(){var n=e().onBeforeDragStart;n&&n(Ut(t,a))}))},start:function(i,s){n&&E(!1);var r=Ut(i,s);n={mode:s,lastCritical:i,lastLocation:r.source,lastCombine:null},a.add((function(){Lt(0,(function(){return Ft(e().onDragStart,r,t,k)}))}))},update:function(i,s){var r=Z(s),l=ee(s);n||E(!1);var c=!function(e,t){if(e===t)return!0;var a=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,n=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return a&&n}(i,n.lastCritical);c&&(n.lastCritical=i);var d,m,u=(m=r,!(null==(d=n.lastLocation)&&null==m||null!=d&&null!=m&&d.droppableId===m.droppableId&&d.index===m.index));u&&(n.lastLocation=r);var h=!function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId}(n.lastCombine,l);if(h&&(n.lastCombine=l),c||u||h){var p=o({},Ut(i,n.mode),{combine:l,destination:r});a.add((function(){Lt(0,(function(){return Ft(e().onDragUpdate,p,t,j)}))}))}},flush:function(){n||E(!1),a.flush()},drop:i,abort:function(){if(n){var e=o({},Ut(n.lastCritical,n.mode),{combine:null,destination:null,reason:"CANCEL"});i(e)}}}}(e,t);return function(e){return function(t){return function(n){if("BEFORE_INITIAL_CAPTURE"!==n.type){if("INITIAL_PUBLISH"===n.type){var i=n.payload.critical;return a.beforeStart(i,n.payload.movementMode),t(n),void a.start(i,n.payload.movementMode)}if("DROP_COMPLETE"===n.type){var s=n.payload.completed.result;return a.flush(),t(n),void a.drop(s)}if(t(n),"FLUSH"!==n.type){var r=e.getState();"DRAGGING"===r.phase&&a.update(r.critical,r.impact)}else a.abort()}else a.beforeCapture(n.payload.draggableId,n.payload.movementMode)}}}},Vt=function(e){return function(t){return function(a){if("DROP_ANIMATION_FINISHED"===a.type){var n=e.getState();"DROP_ANIMATING"!==n.phase&&E(!1),e.dispatch(ft({completed:n.completed}))}else t(a)}}},Wt=function(e){var t=null,a=null;return function(n){return function(i){if("FLUSH"!==i.type&&"DROP_COMPLETE"!==i.type&&"DROP_ANIMATION_FINISHED"!==i.type||(a&&(cancelAnimationFrame(a),a=null),t&&(t(),t=null)),n(i),"DROP_ANIMATE"===i.type){var s={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};a=requestAnimationFrame((function(){a=null,t=b(window,[s])}))}}}},Ht=function(e){return function(t){return function(a){if(t(a),"PUBLISH_WHILE_DRAGGING"===a.type){var n=e.getState();"DROP_PENDING"===n.phase&&(n.isWaiting||e.dispatch(yt({reason:n.reason})))}}}},zt=l.compose,Gt=function(e){var t,a=e.dimensionMarshal,n=e.focusMarshal,i=e.styleMarshal,s=e.getResponders,r=e.announce,o=e.autoScroller;return l.createStore(ot,zt(l.applyMiddleware((t=i,function(){return function(e){return function(a){"INITIAL_PUBLISH"===a.type&&t.dragging(),"DROP_ANIMATE"===a.type&&t.dropping(a.payload.completed.result.reason),"FLUSH"!==a.type&&"DROP_COMPLETE"!==a.type||t.resting(),e(a)}}}),function(e){return function(){return function(t){return function(a){"DROP_COMPLETE"!==a.type&&"FLUSH"!==a.type&&"DROP_ANIMATE"!==a.type||e.stopPublishing(),t(a)}}}}(a),function(e){return function(t){var a=t.getState,n=t.dispatch;return function(t){return function(i){if("LIFT"===i.type){var s=i.payload,r=s.id,o=s.clientSelection,l=s.movementMode,c=a();"DROP_ANIMATING"===c.phase&&n(ft({completed:c.completed})),"IDLE"!==a().phase&&E(!1),n({type:"FLUSH",payload:null}),n({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:r,movementMode:l}});var d={draggableId:r,scrollOptions:{shouldPublishImmediately:"SNAP"===l}},m=e.startPublishing(d),u=m.critical,h=m.dimensions,p=m.viewport;n({type:"INITIAL_PUBLISH",payload:{critical:u,dimensions:h,clientSelection:o,movementMode:l,viewport:p}})}else t(i)}}}}(a),Nt,Vt,Wt,Ht,function(e){return function(t){return function(a){return function(n){if(function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(n))return e.stop(),void a(n);if("INITIAL_PUBLISH"===n.type){a(n);var i=t.getState();return"DRAGGING"!==i.phase&&E(!1),void e.start(i)}a(n),e.scroll(t.getState())}}}}(o),Mt,function(e){var t=!1;return function(){return function(a){return function(n){if("INITIAL_PUBLISH"===n.type)return t=!0,e.tryRecordFocus(n.payload.critical.draggable.id),a(n),void e.tryRestoreFocusRecorded();if(a(n),t){if("FLUSH"===n.type)return t=!1,void e.tryRestoreFocusRecorded();if("DROP_COMPLETE"===n.type){t=!1;var i=n.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}}(n),Bt(s,r))))};var Kt=function(e){var t=e.scrollHeight,a=e.scrollWidth,n=e.height,i=e.width,s=N({x:a,y:t},{x:i,y:n});return{x:Math.max(0,s.x),y:Math.max(0,s.y)}},qt=function(){var e=document.documentElement;return e||E(!1),e},$t=function(){var e=qt();return Kt({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},Yt=function(e){var t=e.critical,a=e.scrollOptions,n=e.registry;et();var i=function(){var e=Dt(),t=$t(),a=e.y,n=e.x,i=qt(),s=n+i.clientWidth,r=a+i.clientHeight;return{frame:m.getRect({top:a,left:n,right:s,bottom:r}),scroll:{initial:e,current:e,max:t,diff:{value:I,displacement:I}}}}(),s=i.scroll.current,r=t.droppable,o=n.droppable.getAllByType(r.type).map((function(e){return e.callbacks.getDimensionAndWatchScroll(s,a)})),l=n.draggable.getAllByType(t.draggable.type).map((function(e){return e.getDimension(s)})),c={draggables:Y(l),droppables:$(o)};return tt(),{dimensions:c,critical:t,viewport:i}};function Jt(e,t,a){return a.descriptor.id!==t.id&&(a.descriptor.type===t.type&&"virtual"===e.droppable.getById(a.descriptor.droppableId).descriptor.mode)}var Qt,Xt,Zt=function(e,t){var a=null,n=function(e){var t=e.registry,a=e.callbacks,n={additions:{},removals:{},modified:{}},i=null,s=function(){i||(a.collectionStarting(),i=requestAnimationFrame((function(){i=null,et();var e=n,s=e.additions,r=e.removals,o=e.modified,l=Object.keys(s).map((function(e){return t.draggable.getById(e).getDimension(I)})).sort((function(e,t){return e.descriptor.index-t.descriptor.index})),c=Object.keys(o).map((function(e){return{droppableId:e,scroll:t.droppable.getById(e).callbacks.getScrollWhileDragging()}})),d={additions:l,removals:Object.keys(r),modified:c};n={additions:{},removals:{},modified:{}},tt(),a.publish(d)})))};return{add:function(e){var t=e.descriptor.id;n.additions[t]=e,n.modified[e.descriptor.droppableId]=!0,n.removals[t]&&delete n.removals[t],s()},remove:function(e){var t=e.descriptor;n.removals[t.id]=!0,n.modified[t.droppableId]=!0,n.additions[t.id]&&delete n.additions[t.id],s()},stop:function(){i&&(cancelAnimationFrame(i),i=null,n={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(t){a||E(!1);var i=a.critical.draggable;"ADDITION"===t.type&&Jt(e,i,t.value)&&n.add(t.value),"REMOVAL"===t.type&&Jt(e,i,t.value)&&n.remove(t.value)},s={updateDroppableIsEnabled:function(n,i){e.droppable.exists(n)||E(!1),a&&t.updateDroppableIsEnabled({id:n,isEnabled:i})},updateDroppableIsCombineEnabled:function(n,i){a&&(e.droppable.exists(n)||E(!1),t.updateDroppableIsCombineEnabled({id:n,isCombineEnabled:i}))},scrollDroppable:function(t,n){a&&e.droppable.getById(t).callbacks.scroll(n)},updateDroppableScroll:function(n,i){a&&(e.droppable.exists(n)||E(!1),t.updateDroppableScroll({id:n,newScroll:i}))},startPublishing:function(t){a&&E(!1);var n=e.draggable.getById(t.draggableId),s=e.droppable.getById(n.descriptor.droppableId),r={draggable:n.descriptor,droppable:s.descriptor},o=e.subscribe(i);return a={critical:r,unsubscribe:o},Yt({critical:r,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:function(){if(a){n.stop();var t=a.critical.droppable;e.droppable.getAllByType(t.type).forEach((function(e){return e.callbacks.dragStopped()})),a.unsubscribe(),a=null}}};return s},ea=function(e,t){return"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason)},ta=function(e){window.scrollBy(e.x,e.y)},aa=u((function(e){return J(e).filter((function(e){return!!e.isEnabled&&!!e.frame}))})),na=function(e){var t=e.center,a=e.destination,n=e.droppables;if(a){var i=n[a];return i.frame?i:null}var s=function(e,t){var a=K(aa(t),(function(t){return t.frame||E(!1),We(t.frame.pageMarginBox)(e)}));return a}(t,n);return s},ia=.25,sa=.05,ra=28,oa=function(e){return Math.pow(e,2)},la={stopDampeningAt:1200,accelerateAt:360},ca=function(e){var t=e.startOfRange,a=e.endOfRange,n=e.current,i=a-t;return 0===i?0:(n-t)/i},da=la.accelerateAt,ma=la.stopDampeningAt,ua=function(e){var t=e.distanceToEdge,a=e.thresholds,n=e.dragStartTime,i=e.shouldUseTimeDampening,s=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return ra;if(e===t.startScrollingFrom)return 1;var a=ca({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),n=ra*oa(1-a);return Math.ceil(n)}(t,a);return 0===s?0:i?Math.max(function(e,t){var a=t,n=ma,i=Date.now()-a;if(i>=ma)return e;if(it.height,s=a.width>t.width;return s||i?s&&i?null:{x:s?0:n.x,y:i?0:n.y}:n}({container:a,subject:n,proposedScroll:c});return d?D(d,I)?null:d:null},va=U((function(e){return 0===e?0:e>0?1:-1})),ba=(Qt=function(e,t){return e<0?e:e>t?e-t:0},function(e){var t=e.current,a=e.max,n=e.change,i=T(t,n),s={x:Qt(i.x,a.x),y:Qt(i.y,a.y)};return D(s,I)?null:s}),fa=function(e){var t=e.max,a=e.current,n=e.change,i={x:Math.max(a.x,t.x),y:Math.max(a.y,t.y)},s=va(n),r=ba({max:i,current:a,change:s});return!r||(0!==s.x&&0===r.x||0!==s.y&&0===r.y)},ya=function(e,t){return fa({current:e.scroll.current,max:e.scroll.max,change:t})},Ea=function(e,t){var a=e.frame;return!!a&&fa({current:a.scroll.current,max:a.scroll.max,change:t})},_a=function(e){var t=e.state,a=e.dragStartTime,n=e.shouldUseTimeDampening,i=e.scrollWindow,s=e.scrollDroppable,r=t.current.page.borderBoxCenter,o=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){var l=function(e){var t=e.viewport,a=e.subject,n=e.center,i=e.dragStartTime,s=e.shouldUseTimeDampening,r=ga({dragStartTime:i,container:t.frame,subject:a,center:n,shouldUseTimeDampening:s});return r&&ya(t,r)?r:null}({dragStartTime:a,viewport:t.viewport,subject:o,center:r,shouldUseTimeDampening:n});if(l)return void i(l)}var c=na({center:r,destination:Fe(t.impact),droppables:t.dimensions.droppables});if(c){var d=function(e){var t=e.droppable,a=e.subject,n=e.center,i=e.dragStartTime,s=e.shouldUseTimeDampening,r=t.frame;if(!r)return null;var o=ga({dragStartTime:i,container:r.pageMarginBox,subject:a,center:n,shouldUseTimeDampening:s});return o&&Ea(t,o)?o:null}({dragStartTime:a,droppable:c,subject:o,center:r,shouldUseTimeDampening:n});d&&s(c.descriptor.id,d)}},Sa=function(e){var t=e.move,a=e.scrollDroppable,n=e.scrollWindow,i=function(e,t){if(!Ea(e,t))return t;var n=function(e,t){var a=e.frame;return a&&Ea(e,t)?ba({current:a.scroll.current,max:a.scroll.max,change:t}):null}(e,t);if(!n)return a(e.descriptor.id,t),null;var i=N(t,n);return a(e.descriptor.id,i),N(t,i)},s=function(e,t,a){if(!e)return a;if(!ya(t,a))return a;var i=function(e,t){if(!ya(e,t))return null;var a=e.scroll.max,n=e.scroll.current;return ba({current:n,max:a,change:t})}(t,a);if(!i)return n(a),null;var s=N(a,i);return n(s),N(a,s)};return function(e){var a=e.scrollJumpRequest;if(a){var n=Fe(e.impact);n||E(!1);var r=i(e.dimensions.droppables[n],a);if(r){var o=e.viewport,l=s(e.isWindowScrollAllowed,o,r);l&&function(e,a){var n=T(e.current.client.selection,a);t({client:n})}(e,l)}}}},wa=function(e){var t=e.scrollDroppable,a=e.scrollWindow,n=e.move,i=function(e){var t=e.scrollWindow,a=e.scrollDroppable,n=h(t),i=h(a),s=null,r=function(e){s||E(!1);var t=s,a=t.shouldUseTimeDampening,r=t.dragStartTime;_a({state:e,scrollWindow:n,scrollDroppable:i,dragStartTime:r,shouldUseTimeDampening:a})};return{start:function(e){et(),s&&E(!1);var t=Date.now(),a=!1,n=function(){a=!0};_a({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:n,scrollDroppable:n}),s={dragStartTime:t,shouldUseTimeDampening:a},tt(),a&&r(e)},stop:function(){s&&(n.cancel(),i.cancel(),s=null)},scroll:r}}({scrollWindow:a,scrollDroppable:t}),s=Sa({move:n,scrollWindow:a,scrollDroppable:t});return{scroll:function(e){"DRAGGING"===e.phase&&("FLUID"!==e.movementMode?e.scrollJumpRequest&&s(e):i.scroll(e))},start:i.start,stop:i.stop}},Oa={base:Xt="data-rbd-drag-handle",draggableId:Xt+"-draggable-id",contextId:Xt+"-context-id"},Ca=function(){var e="data-rbd-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),xa=function(){var e="data-rbd-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),ka={contextId:"data-rbd-scroll-container-context-id"},ja=function(e,t){return e.map((function(e){var a=e.styles[t];return a?e.selector+" { "+a+" }":""})).join(" ")},Ra="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?i.useLayoutEffect:i.useEffect,Ia=function(){var e=document.querySelector("head");return e||E(!1),e},Ta=function(e){var t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function Na(e,t){var a=d.useMemo((function(){return function(e){var t,a,n,i=(t=e,function(e){return"["+e+'="'+t+'"]'}),s=(a="\n cursor: -webkit-grab;\n cursor: grab;\n ",{selector:i(Oa.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:a,dragging:"pointer-events: none;",dropAnimating:a}}),r=[(n="\n transition: "+Ct.outOfTheWay+";\n ",{selector:i(Ca.contextId),styles:{dragging:n,dropAnimating:n,userCancel:n}}),s,{selector:i(xa.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:ja(r,"always"),resting:ja(r,"resting"),dragging:ja(r,"dragging"),dropAnimating:ja(r,"dropAnimating"),userCancel:ja(r,"userCancel")}}(e)}),[e]),n=i.useRef(null),s=i.useRef(null),r=d.useCallback(u((function(e){var t=s.current;t||E(!1),t.textContent=e})),[]),o=d.useCallback((function(e){var t=n.current;t||E(!1),t.textContent=e}),[]);Ra((function(){(n.current||s.current)&&E(!1);var i=Ta(t),l=Ta(t);return n.current=i,s.current=l,i.setAttribute("data-rbd-always",e),l.setAttribute("data-rbd-dynamic",e),Ia().appendChild(i),Ia().appendChild(l),o(a.always),r(a.resting),function(){var e=function(e){var t=e.current;t||E(!1),Ia().removeChild(t),e.current=null};e(n),e(s)}}),[t,o,r,a.always,a.resting,e]);var l=d.useCallback((function(){return r(a.dragging)}),[r,a.dragging]),c=d.useCallback((function(e){r("DROP"!==e?a.userCancel:a.dropAnimating)}),[r,a.dropAnimating,a.userCancel]),m=d.useCallback((function(){s.current&&r(a.resting)}),[r,a.resting]);return d.useMemo((function(){return{dragging:l,dropping:c,resting:m}}),[l,c,m])}var Da=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Pa(e){return e instanceof Da(e).HTMLElement}function Ma(e,t){var a="["+Oa.contextId+'="'+e+'"]',n=q(document.querySelectorAll(a));if(!n.length)return null;var i=K(n,(function(e){return e.getAttribute(Oa.draggableId)===t}));return i&&Pa(i)?i:null}function Aa(){var e={draggables:{},droppables:{}},t=[];function a(e){t.length&&t.forEach((function(t){return t(e)}))}function n(t){return e.draggables[t]||null}function i(t){return e.droppables[t]||null}return{draggable:{register:function(t){e.draggables[t.descriptor.id]=t,a({type:"ADDITION",value:t})},update:function(t,a){var n=e.draggables[a.descriptor.id];n&&n.uniqueId===t.uniqueId&&(delete e.draggables[a.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:function(t){var i=t.descriptor.id,s=n(i);s&&t.uniqueId===s.uniqueId&&(delete e.draggables[i],a({type:"REMOVAL",value:t}))},getById:function(e){var t=n(e);return t||E(!1),t},findById:n,exists:function(e){return Boolean(n(e))},getAllByType:function(t){return z(e.draggables).filter((function(e){return e.descriptor.type===t}))}},droppable:{register:function(t){e.droppables[t.descriptor.id]=t},unregister:function(t){var a=i(t.descriptor.id);a&&t.uniqueId===a.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){var t=i(e);return t||E(!1),t},findById:i,exists:function(e){return Boolean(i(e))},getAllByType:function(t){return z(e.droppables).filter((function(e){return e.descriptor.type===t}))}},subscribe:function(e){return t.push(e),function(){var a=t.indexOf(e);-1!==a&&t.splice(a,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var La=s.createContext(null),Ua=function(){var e=document.body;return e||E(!1),e},Fa={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};var Ba=0,Va={separator:"::"};function Wa(e,t){return void 0===t&&(t=Va),d.useMemo((function(){return""+e+t.separator+Ba++}),[t.separator,e])}var Ha=s.createContext(null);function za(e){0}function Ga(e,t){za()}function Ka(){Ga()}function qa(e){var t=i.useRef(e);return i.useEffect((function(){t.current=e})),t}var $a,Ya=(($a={})[13]=!0,$a[9]=!0,$a),Ja=function(e){Ya[e.keyCode]&&e.preventDefault()},Qa=function(){var e="visibilitychange";return"undefined"==typeof document?e:K([e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],(function(e){return"on"+e in document}))||e}();var Xa,Za={type:"IDLE"};function en(e){var t=e.cancel,a=e.completed,n=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(e){var t=e.button,a=e.clientX,s=e.clientY;if(0===t){var r={x:a,y:s},o=n();if("DRAGGING"===o.type)return e.preventDefault(),void o.actions.move(r);"PENDING"!==o.type&&E(!1);var l=o.point;if(c=l,d=r,Math.abs(d.x-c.x)>=5||Math.abs(d.y-c.y)>=5){var c,d;e.preventDefault();var m=o.actions.fluidLift(r);i({type:"DRAGGING",actions:m})}}}},{eventName:"mouseup",fn:function(e){var i=n();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),a()):t()}},{eventName:"mousedown",fn:function(e){"DRAGGING"===n().type&&e.preventDefault(),t()}},{eventName:"keydown",fn:function(e){if("PENDING"!==n().type)return 27===e.keyCode?(e.preventDefault(),void t()):void Ja(e);t()}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){"PENDING"===n().type&&t()}},{eventName:"webkitmouseforcedown",fn:function(e){var a=n();"IDLE"===a.type&&E(!1),a.actions.shouldRespectForcePress()?t():e.preventDefault()}},{eventName:Qa,fn:t}]}function tn(e){var t=i.useRef(Za),a=i.useRef(v),n=d.useMemo((function(){return{eventName:"mousedown",fn:function(t){if(!t.defaultPrevented&&0===t.button&&!(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)){var n=e.findClosestDraggableId(t);if(n){var i=e.tryGetLock(n,o,{sourceEvent:t});if(i){t.preventDefault();var s={x:t.clientX,y:t.clientY};a.current(),m(i,s)}}}}}}),[e]),s=d.useMemo((function(){return{eventName:"webkitmouseforcewillbegin",fn:function(t){if(!t.defaultPrevented){var a=e.findClosestDraggableId(t);if(a){var n=e.findOptionsForDraggable(a);n&&(n.shouldRespectForcePress||e.canGetLock(a)&&t.preventDefault())}}}}}),[e]),r=d.useCallback((function(){a.current=b(window,[s,n],{passive:!1,capture:!0})}),[s,n]),o=d.useCallback((function(){"IDLE"!==t.current.type&&(t.current=Za,a.current(),r())}),[r]),l=d.useCallback((function(){var e=t.current;o(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[o]),c=d.useCallback((function(){var e=en({cancel:l,completed:o,getPhase:function(){return t.current},setPhase:function(e){t.current=e}});a.current=b(window,e,{capture:!0,passive:!1})}),[l,o]),m=d.useCallback((function(e,a){"IDLE"!==t.current.type&&E(!1),t.current={type:"PENDING",point:a,actions:e},c()}),[c]);Ra((function(){return r(),function(){a.current()}}),[r])}function an(){}var nn=((Xa={})[34]=!0,Xa[33]=!0,Xa[36]=!0,Xa[35]=!0,Xa);function sn(e,t){function a(){t(),e.cancel()}return[{eventName:"keydown",fn:function(n){return 27===n.keyCode?(n.preventDefault(),void a()):32===n.keyCode?(n.preventDefault(),t(),void e.drop()):40===n.keyCode?(n.preventDefault(),void e.moveDown()):38===n.keyCode?(n.preventDefault(),void e.moveUp()):39===n.keyCode?(n.preventDefault(),void e.moveRight()):37===n.keyCode?(n.preventDefault(),void e.moveLeft()):void(nn[n.keyCode]?n.preventDefault():Ja(n))}},{eventName:"mousedown",fn:a},{eventName:"mouseup",fn:a},{eventName:"click",fn:a},{eventName:"touchstart",fn:a},{eventName:"resize",fn:a},{eventName:"wheel",fn:a,options:{passive:!0}},{eventName:Qa,fn:a}]}function rn(e){var t=i.useRef(an),a=d.useMemo((function(){return{eventName:"keydown",fn:function(a){if(!a.defaultPrevented&&32===a.keyCode){var i=e.findClosestDraggableId(a);if(i){var s=e.tryGetLock(i,l,{sourceEvent:a});if(s){a.preventDefault();var r=!0,o=s.snapLift();t.current(),t.current=b(window,sn(o,l),{capture:!0,passive:!1})}}}function l(){r||E(!1),r=!1,t.current(),n()}}}}),[e]),n=d.useCallback((function(){t.current=b(window,[a],{passive:!1,capture:!0})}),[a]);Ra((function(){return n(),function(){t.current()}}),[n])}var on={type:"IDLE"};function ln(e){var t=i.useRef(on),a=i.useRef(v),n=d.useCallback((function(){return t.current}),[]),s=d.useCallback((function(e){t.current=e}),[]),r=d.useMemo((function(){return{eventName:"touchstart",fn:function(t){if(!t.defaultPrevented){var n=e.findClosestDraggableId(t);if(n){var i=e.tryGetLock(n,l,{sourceEvent:t});if(i){var s=t.touches[0],r={x:s.clientX,y:s.clientY};a.current(),h(i,r)}}}}}}),[e]),o=d.useCallback((function(){a.current=b(window,[r],{capture:!0,passive:!1})}),[r]),l=d.useCallback((function(){var e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),s(on),a.current(),o())}),[o,s]),c=d.useCallback((function(){var e=t.current;l(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[l]),m=d.useCallback((function(){var e={capture:!0,passive:!1},t={cancel:c,completed:l,getPhase:n},i=b(window,function(e){var t=e.cancel,a=e.completed,n=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(e){var a=n();if("DRAGGING"===a.type){a.hasMoved=!0;var i=e.touches[0],s={x:i.clientX,y:i.clientY};e.preventDefault(),a.actions.move(s)}else t()}},{eventName:"touchend",fn:function(e){var i=n();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),a()):t()}},{eventName:"touchcancel",fn:function(e){"DRAGGING"===n().type?(e.preventDefault(),t()):t()}},{eventName:"touchforcechange",fn:function(e){var a=n();"IDLE"===a.type&&E(!1);var i=e.touches[0];if(i&&i.force>=.15){var s=a.actions.shouldRespectForcePress();if("PENDING"!==a.type)return s?a.hasMoved?void e.preventDefault():void t():void e.preventDefault();s&&t()}}},{eventName:Qa,fn:t}]}(t),e),s=b(window,function(e){var t=e.cancel,a=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){"DRAGGING"===a().type?(27===e.keyCode&&e.preventDefault(),t()):t()}},{eventName:Qa,fn:t}]}(t),e);a.current=function(){i(),s()}}),[c,n,l]),u=d.useCallback((function(){var e=n();"PENDING"!==e.type&&E(!1);var t=e.actions.fluidLift(e.point);s({type:"DRAGGING",actions:t,hasMoved:!1})}),[n,s]),h=d.useCallback((function(e,t){"IDLE"!==n().type&&E(!1);var a=setTimeout(u,120);s({type:"PENDING",point:t,actions:e,longPressTimerId:a}),m()}),[m,n,s,u]);Ra((function(){return o(),function(){a.current();var e=n();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),s(on))}}),[n,o,s]),Ra((function(){return b(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}])}),[])}var cn={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function dn(e,t){if(null==t)return!1;if(Boolean(cn[t.tagName.toLowerCase()]))return!0;var a=t.getAttribute("contenteditable");return"true"===a||""===a||t!==e&&dn(e,t.parentElement)}function mn(e,t){var a=t.target;return!!Pa(a)&&dn(e,a)}var un=function(e){return m.getRect(e.getBoundingClientRect()).center};var hn=function(){var e="matches";return"undefined"==typeof document?e:K([e,"msMatchesSelector","webkitMatchesSelector"],(function(e){return e in Element.prototype}))||e}();function pn(e,t){return null==e?null:e[hn](t)?e:pn(e.parentElement,t)}function gn(e,t){return e.closest?e.closest(t):pn(e,t)}function vn(e,t){var a,n=t.target;if(!((a=n)instanceof Da(a).Element))return null;var i=function(e){return"["+Oa.contextId+'="'+e+'"]'}(e),s=gn(n,i);return s&&Pa(s)?s:null}function bn(e){e.preventDefault()}function fn(e){var t=e.expected,a=e.phase,n=e.isLockActive;e.shouldWarn;return!!n()&&t===a}function yn(e){var t=e.lockAPI,a=e.store,n=e.registry,i=e.draggableId;if(t.isClaimed())return!1;var s=n.draggable.findById(i);return!!s&&(!!s.options.isEnabled&&!!ea(a.getState(),i))}function En(e){var t=e.lockAPI,a=e.contextId,n=e.store,i=e.registry,s=e.draggableId,r=e.forceSensorStop,l=e.sourceEvent;if(!yn({lockAPI:t,store:n,registry:i,draggableId:s}))return null;var c=i.draggable.getById(s),d=function(e,t){var a="["+Ca.contextId+'="'+e+'"]',n=K(q(document.querySelectorAll(a)),(function(e){return e.getAttribute(Ca.id)===t}));return n&&Pa(n)?n:null}(a,c.descriptor.id);if(!d)return null;if(l&&!c.options.canDragInteractiveElements&&mn(d,l))return null;var m=t.claim(r||v),u="PRE_DRAG";function p(){return c.options.shouldRespectForcePress}function g(){return t.isActive(m)}var f=function(e,t){fn({expected:e,phase:u,isLockActive:g,shouldWarn:!0})&&n.dispatch(t())}.bind(null,"DRAGGING");function y(e){function a(){t.release(),u="COMPLETED"}function i(t,i){if(void 0===i&&(i={shouldBlockNextClick:!1}),e.cleanup(),i.shouldBlockNextClick){var s=b(window,[{eventName:"click",fn:bn,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(s)}a(),n.dispatch(yt({reason:t}))}return"PRE_DRAG"!==u&&(a(),"PRE_DRAG"!==u&&E(!1)),n.dispatch(function(e){return{type:"LIFT",payload:e}}(e.liftActionArgs)),u="DRAGGING",o({isActive:function(){return fn({expected:"DRAGGING",phase:u,isLockActive:g,shouldWarn:!1})},shouldRespectForcePress:p,drop:function(e){return i("DROP",e)},cancel:function(e){return i("CANCEL",e)}},e.actions)}return{isActive:function(){return fn({expected:"PRE_DRAG",phase:u,isLockActive:g,shouldWarn:!1})},shouldRespectForcePress:p,fluidLift:function(e){var t=h((function(e){f((function(){return ht({client:e})}))})),a=y({liftActionArgs:{id:s,clientSelection:e,movementMode:"FLUID"},cleanup:function(){return t.cancel()},actions:{move:t}});return o({},a,{move:t})},snapLift:function(){var e={moveUp:function(){return f(pt)},moveRight:function(){return f(vt)},moveDown:function(){return f(gt)},moveLeft:function(){return f(bt)}};return y({liftActionArgs:{id:s,clientSelection:un(d),movementMode:"SNAP"},cleanup:v,actions:e})},abort:function(){fn({expected:"PRE_DRAG",phase:u,isLockActive:g,shouldWarn:!0})&&t.release()}}}var _n=[tn,rn,ln];function Sn(e){var t=e.contextId,a=e.store,n=e.registry,s=e.customSensors,r=e.enableDefaultSensors,o=[].concat(r?_n:[],s||[]),l=i.useState((function(){return function(){var e=null;function t(){e||E(!1),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&E(!1);var a={abandon:t};return e=a,a},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}()}))[0],c=d.useCallback((function(e,t){e.isDragging&&!t.isDragging&&l.tryAbandon()}),[l]);Ra((function(){var e=a.getState();return a.subscribe((function(){var t=a.getState();c(e,t),e=t}))}),[l,a,c]),Ra((function(){return l.tryAbandon}),[l.tryAbandon]);var m=d.useCallback((function(e){return yn({lockAPI:l,registry:n,store:a,draggableId:e})}),[l,n,a]),u=d.useCallback((function(e,i,s){return En({lockAPI:l,registry:n,contextId:t,store:a,draggableId:e,forceSensorStop:i,sourceEvent:s&&s.sourceEvent?s.sourceEvent:null})}),[t,l,n,a]),h=d.useCallback((function(e){return function(e,t){var a=vn(e,t);return a?a.getAttribute(Oa.draggableId):null}(t,e)}),[t]),p=d.useCallback((function(e){var t=n.draggable.findById(e);return t?t.options:null}),[n.draggable]),g=d.useCallback((function(){l.isClaimed()&&(l.tryAbandon(),"IDLE"!==a.getState().phase&&a.dispatch({type:"FLUSH",payload:null}))}),[l,a]),v=d.useCallback(l.isClaimed,[l]),b=d.useMemo((function(){return{canGetLock:m,tryGetLock:u,findClosestDraggableId:h,findOptionsForDraggable:p,tryReleaseLock:g,isLockClaimed:v}}),[m,u,h,p,g,v]);za();for(var f=0;f=0;n--){var i=t[n](e);if(i)return i}return function(t,n){throw new Error("Invalid value of type "+typeof e+" for "+a+" argument when connecting component "+n.wrappedComponentName+".")}}function p(e,t){return e===t}function g(e){var t=void 0===e?{}:e,a=t.connectHOC,n=void 0===a?r.default:a,g=t.mapStateToPropsFactories,v=void 0===g?c.default:g,b=t.mapDispatchToPropsFactories,f=void 0===b?l.default:b,y=t.mergePropsFactories,E=void 0===y?d.default:y,_=t.selectorFactory,S=void 0===_?m.default:_;return function(e,t,a,r){void 0===r&&(r={});var l=r,c=l.pure,d=void 0===c||c,m=l.areStatesEqual,g=void 0===m?p:m,b=l.areOwnPropsEqual,y=void 0===b?o.default:b,_=l.areStatePropsEqual,w=void 0===_?o.default:_,O=l.areMergedPropsEqual,C=void 0===O?o.default:O,x=(0,s.default)(l,u),k=h(e,v,"mapStateToProps"),j=h(t,f,"mapDispatchToProps"),R=h(a,E,"mergeProps");return n(S,(0,i.default)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:k,initMapDispatchToProps:j,initMergeProps:R,pure:d,areStatesEqual:g,areOwnPropsEqual:y,areStatePropsEqual:w,areMergedPropsEqual:C},x))}}var v=g();t.default=v},1503:function(e,t,a){"use strict";var n=a(172).default;t.__esModule=!0,t.default=void 0,t.whenMapDispatchToPropsIsFunction=r,t.whenMapDispatchToPropsIsMissing=o,t.whenMapDispatchToPropsIsObject=l;var i=n(a(1504)),s=a(899);function r(e){return"function"==typeof e?(0,s.wrapMapToPropsFunc)(e,"mapDispatchToProps"):void 0}function o(e){return e?void 0:(0,s.wrapMapToPropsConstant)((function(e){return{dispatch:e}}))}function l(e){return e&&"object"==typeof e?(0,s.wrapMapToPropsConstant)((function(t){return(0,i.default)(e,t)})):void 0}var c=[r,o,l];t.default=c},1504:function(e,t,a){"use strict";t.__esModule=!0,t.default=function(e,t){var a={},n=function(n){var i=e[n];"function"==typeof i&&(a[n]=function(){return t(i.apply(void 0,arguments))})};for(var i in e)n(i);return a}},1505:function(e,t,a){"use strict";t.__esModule=!0,t.default=function(e){if("object"!=typeof e||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var a=t;for(;null!==Object.getPrototypeOf(a);)a=Object.getPrototypeOf(a);return t===a}},1506:function(e,t,a){"use strict";t.__esModule=!0,t.default=void 0,t.whenMapStateToPropsIsFunction=i,t.whenMapStateToPropsIsMissing=s;var n=a(899);function i(e){return"function"==typeof e?(0,n.wrapMapToPropsFunc)(e,"mapStateToProps"):void 0}function s(e){return e?void 0:(0,n.wrapMapToPropsConstant)((function(){return{}}))}var r=[i,s];t.default=r},1507:function(e,t,a){"use strict";var n=a(172).default;t.__esModule=!0,t.default=void 0,t.defaultMergeProps=s,t.whenMergePropsIsFunction=o,t.whenMergePropsIsOmitted=l,t.wrapMergePropsFunc=r;var i=n(a(130));n(a(900));function s(e,t,a){return(0,i.default)({},a,e,t)}function r(e){return function(t,a){a.displayName;var n,i=a.pure,s=a.areMergedPropsEqual,r=!1;return function(t,a,o){var l=e(t,a,o);return r?i&&s(l,n)||(n=l):(r=!0,n=l),n}}}function o(e){return"function"==typeof e?r(e):void 0}function l(e){return e?void 0:function(){return s}}var c=[o,l];t.default=c},1508:function(e,t,a){"use strict";var n=a(172).default;t.__esModule=!0,t.default=function(e,t){var a=t.initMapStateToProps,n=t.initMapDispatchToProps,l=t.initMergeProps,c=(0,i.default)(t,s),d=a(e,c),m=n(e,c),u=l(e,c);0;return(c.pure?o:r)(d,m,u,e,c)},t.impureFinalPropsSelectorFactory=r,t.pureFinalPropsSelectorFactory=o;var i=n(a(405)),s=(n(a(1509)),["initMapStateToProps","initMapDispatchToProps","initMergeProps"]);function r(e,t,a,n){return function(i,s){return a(e(i,s),t(n,s),s)}}function o(e,t,a,n,i){var s,r,o,l,c,d=i.areStatesEqual,m=i.areOwnPropsEqual,u=i.areStatePropsEqual,h=!1;function p(i,h){var p,g,v=!m(h,r),b=!d(i,s,h,r);return s=i,r=h,v&&b?(o=e(s,r),t.dependsOnOwnProps&&(l=t(n,r)),c=a(o,l,r)):v?(e.dependsOnOwnProps&&(o=e(s,r)),t.dependsOnOwnProps&&(l=t(n,r)),c=a(o,l,r)):b?(p=e(s,r),g=!u(p,o),o=p,g&&(c=a(o,l,r)),c):c}return function(i,d){return h?p(i,d):(o=e(s=i,r=d),l=t(n,r),c=a(o,l,r),h=!0,c)}}},1509:function(e,t,a){"use strict";var n=a(172).default;t.__esModule=!0,t.default=function(e,t,a,n){s(e,"mapStateToProps",n),s(t,"mapDispatchToProps",n),s(a,"mergeProps",n)};var i=n(a(901));function s(e,t,a){if(!e)throw new Error("Unexpected value for "+t+" in "+a+".");"mapStateToProps"!==t&&"mapDispatchToProps"!==t||Object.prototype.hasOwnProperty.call(e,"dependsOnOwnProps")||(0,i.default)("The selector for "+t+" of "+a+" did not specify a value for dependsOnOwnProps.")}},1510:function(e,t,a){"use strict";t.__esModule=!0,t.createDispatchHook=s,t.useDispatch=void 0;var n=a(313),i=a(902);function s(e){void 0===e&&(e=n.ReactReduxContext);var t=e===n.ReactReduxContext?i.useStore:(0,i.createStoreHook)(e);return function(){return t().dispatch}}var r=s();t.useDispatch=r},1511:function(e,t,a){"use strict";t.__esModule=!0,t.createSelectorHook=c,t.useSelector=void 0;var n=a(120),i=a(903),s=a(636),r=a(637),o=a(313),l=function(e,t){return e===t};function c(e){void 0===e&&(e=o.ReactReduxContext);var t=e===o.ReactReduxContext?i.useReduxContext:function(){return(0,n.useContext)(e)};return function(e,a){void 0===a&&(a=l);var i=t(),o=function(e,t,a,i){var o,l=(0,n.useReducer)((function(e){return e+1}),0)[1],c=(0,n.useMemo)((function(){return(0,s.createSubscription)(a,i)}),[a,i]),d=(0,n.useRef)(),m=(0,n.useRef)(),u=(0,n.useRef)(),h=(0,n.useRef)(),p=a.getState();try{if(e!==m.current||p!==u.current||d.current){var g=e(p);o=void 0!==h.current&&t(g,h.current)?h.current:g}else o=h.current}catch(e){throw d.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+d.current.stack+"\n\n"),e}return(0,r.useIsomorphicLayoutEffect)((function(){m.current=e,u.current=p,h.current=o,d.current=void 0})),(0,r.useIsomorphicLayoutEffect)((function(){function e(){try{var e=a.getState();if(e===u.current)return;var n=m.current(e);if(t(n,h.current))return;h.current=n,u.current=e}catch(e){d.current=e}l()}return c.onStateChange=e,c.trySubscribe(),e(),function(){return c.tryUnsubscribe()}}),[a,c]),o}(e,a,i.store,i.subscription);return(0,n.useDebugValue)(o),o}}var d=c();t.useSelector=d},1512:function(e,t,a){"use strict";t.__esModule=!0,t.unstable_batchedUpdates=void 0;var n=a(185);t.unstable_batchedUpdates=n.unstable_batchedUpdates},1513:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(120);function i(e,t){var a=n.useState((function(){return{inputs:t,result:e()}}))[0],i=n.useRef(!0),s=n.useRef(a),r=i.current||Boolean(t&&s.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var a=0;a. Exported by at %(exportDate)s.",{exportDate:u},{roomName:()=>r.a.createElement("b",null,this.room.name),exporterDetails:()=>r.a.createElement("a",{href:`https://matrix.to/#/${g}`,target:"_blank",rel:"noopener noreferrer"},v?r.a.createElement(r.a.Fragment,null,r.a.createElement("b",null,v)," ("+g+")"):r.a.createElement("b",null,g))}))),S=f?Object(y.a)("Topic: %(topic)s",{topic:f}):"",w=Object(d.renderToStaticMarkup)(0!==t?r.a.createElement("div",{style:{textAlign:"center"}},r.a.createElement("a",{href:`./messages${1===t?"":t}.html`,style:{fontWeight:"bold"}},"Previous group of messages")):r.a.createElement(r.a.Fragment,null)),O=Object(d.renderToStaticMarkup)(t\n \n \n \n \n \n \n