aiware-js 1.0.0-master.475 → 1.0.0-master.477
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/js-core.esm.js +5 -5
- package/js-core.esm.js.gz +0 -0
- package/js-core.esm41.js +1 -1
- package/js-core.esm41.js.gz +0 -0
- package/js-core.esm45.js +1 -1
- package/js-core.esm45.js.gz +0 -0
- package/js-core.esm46.js +1 -1
- package/js-core.esm46.js.gz +0 -0
- package/js-core.esm48.js +1 -1
- package/js-core.esm48.js.gz +0 -0
- package/js-core.esm49.js +1 -1
- package/js-core.esm49.js.gz +0 -0
- package/js-core.esm51.js +1 -1
- package/js-core.esm51.js.gz +0 -0
- package/js-core.esm52.js +1 -1
- package/js-core.esm52.js.gz +0 -0
- package/js-core.esm53.js +1 -1
- package/js-core.esm53.js.gz +0 -0
- package/js-core.esm54.js +37 -1
- package/js-core.esm54.js.gz +0 -0
- package/js-core.esm55.js +1 -37
- package/js-core.esm55.js.gz +0 -0
- package/js-core.esm56.js +1 -1
- package/js-core.esm56.js.gz +0 -0
- package/js-core.esm57.js +1 -1
- package/js-core.esm57.js.gz +0 -0
- package/js-core.esm58.js +1 -1
- package/js-core.esm58.js.gz +0 -0
- package/js-core.esm59.js +1 -1
- package/js-core.esm59.js.gz +0 -0
- package/js-core.esm60.js +31 -1
- package/js-core.esm60.js.gz +0 -0
- package/js-core.esm61.js +32 -31
- package/js-core.esm61.js.gz +0 -0
- package/js-core.esm62.js +80 -27
- package/js-core.esm62.js.gz +0 -0
- package/js-core.esm63.js +1 -85
- package/js-core.esm63.js.gz +0 -0
- package/js-core.esm64.js +1 -1
- package/js-core.esm64.js.gz +0 -0
- package/js-core.esm65.js +56 -1
- package/js-core.esm65.js.gz +0 -0
- package/js-core.esm66.js +116 -48
- package/js-core.esm66.js.gz +0 -0
- package/js-core.esm67.js +150 -107
- package/js-core.esm67.js.gz +0 -0
- package/js-core.esm68.js +57 -149
- package/js-core.esm68.js.gz +0 -0
- package/js-core.esm69.js +15 -75
- package/js-core.esm69.js.gz +0 -0
- package/js-core.esm70.js +1 -15
- package/js-core.esm70.js.gz +0 -0
- package/js-core.esm71.js +1 -1
- package/js-core.esm71.js.gz +0 -0
- package/js-core.esm72.js +121 -1
- package/js-core.esm72.js.gz +0 -0
- package/js-core.esm73.js +14 -103
- package/js-core.esm73.js.gz +0 -0
- package/js-core.esm74.js +15 -27
- package/js-core.esm74.js.gz +0 -0
- package/js-core.esm75.js +13 -19
- package/js-core.esm75.js.gz +0 -0
- package/js-core.esm76.js +33 -12
- package/js-core.esm76.js.gz +0 -0
- package/js-core.esm77.js +36 -28
- package/js-core.esm77.js.gz +0 -0
- package/js-core.esm78.js +1 -43
- package/js-core.esm78.js.gz +0 -0
- package/js-core.esm79.js +35 -1
- package/js-core.esm79.js.gz +0 -0
- package/js-core.esm80.js +1 -35
- package/js-core.esm80.js.gz +0 -0
- package/js-core.esm81.js +1 -1
- package/js-core.esm81.js.gz +0 -0
- package/js-core.esm82.js +1 -1
- package/js-core.esm82.js.gz +0 -0
- package/js-core.esm83.js +1 -1
- package/js-core.esm83.js.gz +0 -0
- package/js-core.esm84.js +1 -1
- package/js-core.esm84.js.gz +0 -0
- package/js-core.esm85.js +1 -1
- package/js-core.esm85.js.gz +0 -0
- package/js-core.esm86.js +1 -1
- package/js-core.esm86.js.gz +0 -0
- package/js-core.esm87.js +1 -1
- package/js-core.esm87.js.gz +0 -0
- package/js-core.umd.js +31 -31
- package/js-core.umd.js.gz +0 -0
- package/locales/es.json +1 -1
- package/locales/fr.json +1 -1
- package/package.json +1 -1
- package/js-core.esm88.js +0 -1
- package/js-core.esm88.js.gz +0 -0
package/js-core.esm.js
CHANGED
|
@@ -989,7 +989,7 @@ createScheduledJob(input:{
|
|
|
989
989
|
contentType
|
|
990
990
|
createdDateTime
|
|
991
991
|
}
|
|
992
|
-
}`,variables:e,graphEndpoint:t,token:s})}catch(e){return{success:!1}}}),aiwareEvent="AIWARE_JS_SYSTEM_EVENT",namespace$8="snackbar",initialState$a={message:{},duration:3e3},snackbarSlice=createSlice({name:namespace$8,initialState:initialState$a,reducers:{showMessage(e,t){e.message=Object.assign({key:(new Date).getTime()},t.payload)},clearMessage:
|
|
992
|
+
}`,variables:e,graphEndpoint:t,token:s})}catch(e){return{success:!1}}}),aiwareEvent="AIWARE_JS_SYSTEM_EVENT",namespace$8="snackbar",initialState$a={message:{},duration:3e3},snackbarSlice=createSlice({name:namespace$8,initialState:initialState$a,reducers:{showMessage(e,t){e.message=Object.assign({key:(new Date).getTime()},t.payload)},clearMessage:()=>initialState$a,setDuration(e,t){e.duration=t.payload},resetDuration(e){e.duration=initialState$a.duration}}}),{showMessage,clearMessage,setDuration,resetDuration}=snackbarSlice.actions,snackbarReducer=snackbarSlice.reducer,snackbarSelector=e=>(null==e?void 0:e[namespace$8])||{};function getSnackbarModule(){return{id:namespace$8,reducerMap:{[namespace$8]:snackbarReducer},sagas:[],initialActions:[]}}!function(e){e.Success="success",e.Info="info",e.Warning="warning",e.Error="error"}(MessageSeverity=MessageSeverity||{});let _$1=e=>e,_t$1;function goToPage$1(e){window.location.href=e}let subscriptionTask$1;class SubscriptionAttemptsLimiter{constructor(e){this.limit=e&&0<e&&e<=5?e:5,this.attempts=0}recordAttempt(){this.attempts+=1}canRetry(){return this.recordAttempt(),!(this.attempts>this.limit)}}const wsAttemptsLimiter=new SubscriptionAttemptsLimiter;function*websocketInitChannel$1(){if(wsAttemptsLimiter.canRetry()){var e=yield select(authSelector);const i=null==e?void 0:e.userId,o=yield select(sessionTokenSelector),s=(yield select(configSelector))["graphEndpointWS"],l=yield select(loginUrlSelector),c=yield select(logoutRedirectUrlSelector);return eventChannel(a=>{const e=[],t=[];var n=gql(_t$1=_t$1||_$1`
|
|
993
993
|
subscription {
|
|
994
994
|
notificationPosted(notificationMailboxId:"${0}") {
|
|
995
995
|
id
|
|
@@ -1067,7 +1067,7 @@ createScheduledJob(input:{
|
|
|
1067
1067
|
mutation logout($token: String!) {
|
|
1068
1068
|
userLogout(token: $token )
|
|
1069
1069
|
}
|
|
1070
|
-
`,variables:e,graphEndpoint:n,token:t})}catch(e){return{success:!1}}});let _authWindow=null,_authWindowListener=null,_OAuthToken=null;const _POLL_TIME=500,cleanupAuthWindow=()=>{_authWindow&&_authWindow.close&&_authWindow.close(),_authWindow=null},removeAuthWindowListener=()=>{_authWindowListener&&(window.removeEventListener("message",_authWindowListener),_authWindowListener=null)},createAuthWindowListener=(e,r,i)=>(removeAuthWindowListener(),function(e){var t,n=new URL(window.location.href);null!=(t=e.origin)&&t.startsWith(n.protocol+"//"+n.hostname)&&(null!=(t=e.data)&&t.error?(removeAuthWindowListener(),cleanupAuthWindow(),i(new Error("Veritone OAuth2 Error: "+t.error))):null!=t&&t.OAuthToken&&(_OAuthToken=t.OAuthToken,removeAuthWindowListener(),cleanupAuthWindow(),r({OAuthToken:_OAuthToken})))}),askOAuthServerForToken=(e,t,n)=>{setTimeout(()=>{_OAuthToken||(_authWindow&&_authWindow.postMessage("getOAuthToken","*"),_authWindow&&!_authWindow.closed?askOAuthServerForToken(e,t,n):_authWindow&&_authWindow.closed?(_authWindow=null,n(new Error("User cancelled OAuth flow"))):(removeAuthWindowListener(),cleanupAuthWindow()))},_POLL_TIME)},login=n=>__awaiter$7(void 0,void 0,void 0,function*(){if(n)return _OAuthToken&&(yield logout()),window.location.replace(n),new Promise((e,t)=>{_authWindowListener=createAuthWindowListener(n,e,t),window.addEventListener("message",_authWindowListener),askOAuthServerForToken(n,e,t)});throw new Error("Missing parameter: Need to include the backend OAuth2 URI")}),logout=()=>__awaiter$7(void 0,void 0,void 0,function*(){return new Promise(e=>{removeAuthWindowListener(),cleanupAuthWindow(),e(!(_OAuthToken=null))})}),handleImplicitRedirect=(e=window.location.hash||"",t=window.opener)=>{let n,r,i;try{n=e.match(/access_token=(.+)$/)[1].split("&")[0]}catch(e){}if(!n)try{r=e.match(/error=(.+)$/)[1].split("&")[0],i=e.match(/error_description=(.+)$/)[1].split("&")[0]}catch(e){}t.postMessage({OAuthToken:n,error:r,errorDescription:i},window.origin)};function*handleFetchUserSaga(){var e=yield select(rootApiSelector);if(e){var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),e=yield call$7(handleFetchUserRequest,e,n),t=yield call$7(getUserRightRequest,t,n);if(e)if(null!=e&&e.errors||t.errors)yield put(fetchUserError());else{var r=null==(i=null==(i=null==(i=null==t?void 0:t.data)?void 0:i.me)?void 0:i.roles)?void 0:i.map(e=>e.appName).filter((e,t,n)=>n.indexOf(e)===t);if(r.includes("admin"))for(const a of null==(i=null==(i=null==t?void 0:t.data)?void 0:i.myRights)?void 0:i.operations)if(a.includes("superadmin")){r.push("superadmin");break}var i=null==(i=null==(i=null==t?void 0:t.data)?void 0:i.me)?void 0:i.userSettings.find(e=>"preferredLanguage"===e.key),o=null==(o=null==(o=null==t?void 0:t.data)?void 0:o.me)?void 0:o.userSettings.find(e=>"recentApplications"===e.key),i=null==i?void 0:i.value,o=null==o?void 0:o.value;e.preferredLanguage=i||"en",e.recentApplications=o||"",yield put(fetchUserSuccess(Object.assign(Object.assign({},e),{roles:r,token:e.token||n,myRights:null==(o=null==(i=null==t?void 0:t.data)?void 0:i.myRights)?void 0:o.operations}))),yield put(subscribeToEventsWebsocket())}else yield put(fetchUserError())}else yield take(getConfigSuccess.type),yield put(fetchUserRequest())}function*logoutHelper(e){var t=yield select(graphEndpointSelector),n=yield select(authSelector);yield call$7(postNotificationApi,t,null==n?void 0:n.userId,{eventType:aiwareEvent,command:null===notificationCommands||void 0===notificationCommands?void 0:notificationCommands.setCallLogout,value:!0,ephemeral:!0,contentType:"json"},!0,"json",aiwareEvent,e)}function*handleRefreshTokenSaga(e){var t=yield select(graphEndpointSelector),e=e.payload["token"];try{var n,r,i=yield call$7(handleRefreshTokenRequest,e,t);null!=i&&i.errors?(n=yield select(preferredLanguageSelector),r=AIWareFormatMessage(n),((null==i?void 0:i.errors)||[]).find(e=>{return((null==(e=null==e?void 0:e.data)?void 0:e.serviceMessage)||"").includes("40")})?(yield put(setDuration(1e4)),yield put(showMessage({content:r({id:"shared-redux.refresh-token-failure.4xx",defaultMessage:[{type:0,value:"Could not refresh session"}]}),severity:MessageSeverity.Error})),yield delay$1(10001),yield*logoutHelper(e)):yield put(showMessage({content:r({id:"shared-redux.refresh-token-failure.non-4xx",defaultMessage:[{type:0,value:"Could not refresh session. Service temporarily unavailable"}]}),severity:MessageSeverity.Error}))):(yield put(refreshTokenSuccess(Object.assign({},i.data))),yield put(fetchUserRequest()))}catch(e){console.log(e)}}function*handleExtendTokenSaga(t){t=t.payload.token;try{var n=yield select(rootApiSelector),r=yield call$7(handleExtendTokenRequest,t,n);null!=r&&r.errors||(yield put(extendTokenSuccess({token:r.token})))}catch(e){n=yield select(preferredLanguageSelector),r=AIWareFormatMessage(n);e instanceof CustomError&&e.isAuthErr?(yield put(setDuration(1e4)),yield put(showMessage({content:r({id:"shared-redux.extend-token-failure.4xx",defaultMessage:[{type:0,value:"Could not extend session"}]}),severity:MessageSeverity.Error})),yield delay$1(10001),yield*logoutHelper(t)):yield put(showMessage({content:r({id:"shared-redux.extend-token-failure.non-4xx",defaultMessage:[{type:0,value:"Could not extend session. Service temporarily unavailable"}]}),severity:MessageSeverity.Error}))}}function*handleLogoutSaga(e){var t=yield select(graphEndpointSelector),e=e.payload["token"],e=yield call$7(handleLogoutRequest,e,t);null!=e&&e.errors?yield put(logoutError()):yield put(logoutSuccess())}function*handleUpdateSessionToken(e){e=e.payload.token;e&&"string"==typeof e?yield put(updateTokenSuccess({token:e})):yield put(updateTokenError())}function*handleUpdateUserLanguage(e){var t=yield select(preferredLanguageSelector),t=AIWareFormatMessage(t);try{var n,r,i=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=(yield select(userSelector$2))["userId"];a?(n=e.payload,r=yield call$7(updateUserSettingsApi,i,o,a,"preferredLanguage",n),sdkEventManager.dispatch(SdkEvents.languageChange,null,{preferredLanguage:r}),yield put(updateUserLanguageSuccess(r))):(sdkEventManager.dispatch(SdkEvents.languageChange,new SdkError("Changing user preferred language failed, user id is required"),null),yield put(showMessage({content:t({id:"shared-redux.snackbar.languageSelectionError",defaultMessage:[{type:0,value:"Something went wrong while updating preferred language"}]}),severity:MessageSeverity.Error})))}catch(e){sdkEventManager.dispatch(SdkEvents.languageChange,new SdkError("Changing user preferred language failed"),null),yield put(showMessage({content:t({id:"shared-redux.snackbar.languageSelectionChangeError",defaultMessage:[{type:0,value:"Something went wrong while updating preferred language"}]}),severity:MessageSeverity.Error})),console.log(e)}}function*handleResetPasswordSaga(e){var t,n,r=yield select(preferredLanguageSelector),r=AIWareFormatMessage(r);try{var{resetToken:i,password:o,username:a,organizationInviteId:s}=e.payload,l=yield select(rootApiSelector),c=yield call$7(handleResetPasswordApi,l,{resetToken:i,username:a,password:o,organizationInviteId:s});if(null!=c&&c.success)yield put(resetPasswordSuccess());else{let e=r({id:"os-auth.reset-password.internalServerError",defaultMessage:[{type:0,value:"An error has occurred."}]});401===c.status&&"PasswordResetTokenExpired"===(null==(t=c.result)?void 0:t.errorCode)?e=r({id:"os-auth.reset-password.expireMessageDescriptive",defaultMessage:[{type:0,value:'The password reset link you used has expired. Please click the "Forgot Password" link on the login page to generate a new link.'}]}):403===c.status?e=(null==(n=c.result)?void 0:n.message)||e:404===c.status&&(e=r({id:"os-auth.reset-password.expireMessage",defaultMessage:[{type:0,value:"An error has occurred. The reset link might be expired."}]})),yield put(resetPasswordError({message:e}))}}catch(e){console.log(e),yield put(resetPasswordError({message:r({id:"os-auth.reset-password.internalError",defaultMessage:[{type:0,value:"Could not reset your password."}]})}))}}function*requestOAuthGrant(e){var t=yield select(appIdSelector),n=(yield select(selectApiConfigs$1))["apiRoot"],r=yield select(sessionTokenSelector),i=yield select(oauthRedirectUriSelector);if(r)yield put(oAuthGrantSuccess(r));else try{r=(yield call$7(login,n+`/v1/admin/oauth/authorize?response_type=token&client_id=${t}&redirect_uri=${i}&scope=all`)).OAuthToken;yield put(oAuthGrantSuccess(r))}catch(e){console.log("oauth flow error",e),yield put(oAuthGrantFailure())}}function*callSdkInitCompleteCallbackOnError(){var e,t=yield select(initialConfigSelector),n=yield select(preferredLanguageSelector),n=AIWareFormatMessage(n);null!=(e=null==t?void 0:t.onComplete)&&e.call(t,n({id:"shared-redux.auth-saga.sdk-init-error-message",defaultMessage:[{type:0,value:"An error occurred during initialization."}]}))}function*watchOAuthReadiness(){for(;;){yield take([oAuthGrantReadyToStart.type,fetchUserSuccess.type,fetchUserError.type]);var e=yield select(oAuthStatusSelector),t=yield select(authStatusSelector);if(t!==Status.loading&&e===Status.ready)switch(t){case Status.success:yield put(oAuthGrantSkip());break;case Status.failure:yield put(oAuthGrantStart())}}}function*handleUpdateUserRecentApplications(e){var t=yield select(preferredLanguageSelector),t=AIWareFormatMessage(t);try{var n,r,i=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=(yield select(userSelector$2))["userId"],s=yield select(userRecentApplicationsSelector);a?(n=slice$2(uniq([e.payload,...s]),0,6),r=yield call$7(updateUserSettingsApi,i,o,a,"recentApplications",JSON.stringify(n)),yield put(updateUserRecentApplicationsSuccess(r))):yield put(showMessage({content:t({id:"shared-redux.snackbar.updateRecentApplicationsError",defaultMessage:[{type:0,value:"Something went wrong while updating recent applications"}]}),severity:MessageSeverity.Error}))}catch(e){yield put(showMessage({content:t({id:"shared-redux.snackbar.updatingRecentApplicationsChangeError",defaultMessage:[{type:0,value:"Something went wrong while updating recent applications"}]}),severity:MessageSeverity.Error})),console.log(e)}}function*watchInitAndAuthStatus(){for(var e,t,n;;){yield take([oAuthGrantSuccess.type,oAuthGrantSkip.type,oAuthGrantFailure.type,sdkInitSuccess.type,fetchUserSuccess.type,fetchUserError.type]);var r=yield select(initialConfigSelector),i=yield select(oAuthTokenSelector),o=yield select(oAuthStatusSelector),a=yield select(initStatusSelector),s=yield select(authStatusSelector),l=yield select(sessionTokenSelector),c=yield select(preferredLanguageSelector),u=AIWareFormatMessage(c);if(s!==Status.loading)if(s===Status.success)switch(o){case Status.loading:null!=(e=null==r?void 0:r.onComplete)&&e.call(r,null,l),yield put(oAuthGrantSuccess(l));break;case Status.skipped:null!=(e=null==r?void 0:r.onComplete)&&e.call(r,null,l)}else if(a===Status.success)switch(o){case Status.skipped:null!=(t=null==r?void 0:r.onComplete)&&t.call(r,null,l);break;case Status.success:null!=(t=null==r?void 0:r.onComplete)&&t.call(r,null,i),s===Status.failure&&(yield put(fetchUserRequest()));break;case Status.failure:null!=(n=null==r?void 0:r.onComplete)&&n.call(r,u({id:"shared-redux.auth-saga.oauth-error-message",defaultMessage:[{type:0,value:"An error occurred during authentication."}]}))}}}function*authSaga(){yield all([takeLatest$1(fetchUserRequest.type,handleFetchUserSaga),takeLatest$1(updateTokenRequest.type,handleUpdateSessionToken),takeLatest$1(resetPasswordRequest.type,handleResetPasswordSaga),takeEvery$1(refreshTokenRequest.type,handleRefreshTokenSaga),takeEvery$1(extendTokenRequest.type,handleExtendTokenSaga),takeEvery$1(logoutRequest.type,handleLogoutSaga),takeEvery$1(updateUserLanguageStart.type,handleUpdateUserLanguage),takeEvery$1(oAuthGrantStart.type,requestOAuthGrant),takeEvery$1(sdkInitFailure.type,callSdkInitCompleteCallbackOnError),takeEvery$1(updateUserRecentApplicationsStart.type,handleUpdateUserRecentApplications),watchOAuthReadiness(),watchInitAndAuthStatus()])}function getAuthModule(){return{id:namespace$3$1,reducerMap:{[namespace$3$1]:authReducer},sagas:[authSaga],initialActions:[fetchUserRequest()]}}var NotificationFlag,CreateModes,TabId,EUserStatus,AvailableWidgets,AvailablePanels,AvailableComponents,userActivityEvents={records:[{id:"ff9272fe-5e98-4ffb-96b6-5df2918d9b2b",event:"login_succeeded",userId:"10ffa55a-d68b-494b-83df-49ce2d008e6d",userName:"sys_graphql_citest_superadmin@veritone.com",organizationId:"7682",applicationId:"123",createdDateTime:"2020-10-26T06:40:12.928Z",payload:{organizationId:12333,organizationName:"name",userName:"user",userId:"10ffa55a-d68b-494b-83df-49ce2d008e6d"}}]},mockData={userActivityEvents:userActivityEvents};const fakeAPI=()=>new Promise((e,t)=>{setTimeout(()=>e({success:!0,data:mockData}),500)}),getActivityApi=()=>__awaiter$7(void 0,void 0,void 0,function*(){try{var{success:e,data:t}=yield fakeAPI();return e&&t.userActivityEvents?{data:t.userActivityEvents,success:!0}:{success:!1,data:null}}catch(e){return{success:!1,data:null,message:e}}}),getApplicationsApi=(e,t)=>__awaiter$7(void 0,void 0,void 0,function*(){try{return(yield fetch(e+"/v1/admin/current-user/applications",{method:"GET",headers:Object.assign({"Content-Type":"application/json"},t&&{Authorization:"Bearer "+t}),credentials:"include"})).json()}catch(e){console.error(e)}}),getApplicationLogo=(r,i)=>__awaiter$7(void 0,void 0,void 0,function*(){var e=`query ($limit: Int $owned: Boolean) {
|
|
1070
|
+
`,variables:e,graphEndpoint:n,token:t})}catch(e){return{success:!1}}});let _authWindow=null,_authWindowListener=null,_OAuthToken=null;const _POLL_TIME=500,cleanupAuthWindow=()=>{_authWindow&&_authWindow.close&&_authWindow.close(),_authWindow=null},removeAuthWindowListener=()=>{_authWindowListener&&(window.removeEventListener("message",_authWindowListener),_authWindowListener=null)},createAuthWindowListener=(e,r,i)=>(removeAuthWindowListener(),function(e){var t,n=new URL(window.location.href);null!=(t=e.origin)&&t.startsWith(n.protocol+"//"+n.hostname)&&(null!=(t=e.data)&&t.error?(removeAuthWindowListener(),cleanupAuthWindow(),i(new Error("Veritone OAuth2 Error: "+t.error))):null!=t&&t.OAuthToken&&(_OAuthToken=t.OAuthToken,removeAuthWindowListener(),cleanupAuthWindow(),r({OAuthToken:_OAuthToken})))}),askOAuthServerForToken=(e,t,n)=>{setTimeout(()=>{_OAuthToken||(_authWindow&&_authWindow.postMessage("getOAuthToken","*"),_authWindow&&!_authWindow.closed?askOAuthServerForToken(e,t,n):_authWindow&&_authWindow.closed?(_authWindow=null,n(new Error("User cancelled OAuth flow"))):(removeAuthWindowListener(),cleanupAuthWindow()))},_POLL_TIME)},login=n=>__awaiter$7(void 0,void 0,void 0,function*(){if(n)return _OAuthToken&&(yield logout()),window.location.replace(n),new Promise((e,t)=>{_authWindowListener=createAuthWindowListener(n,e,t),window.addEventListener("message",_authWindowListener),askOAuthServerForToken(n,e,t)});throw new Error("Missing parameter: Need to include the backend OAuth2 URI")}),logout=()=>__awaiter$7(void 0,void 0,void 0,function*(){return new Promise(e=>{removeAuthWindowListener(),cleanupAuthWindow(),e(!(_OAuthToken=null))})}),handleImplicitRedirect=(e=window.location.hash||"",t=window.opener)=>{let n,r,i;try{n=e.match(/access_token=(.+)$/)[1].split("&")[0]}catch(e){}if(!n)try{r=e.match(/error=(.+)$/)[1].split("&")[0],i=e.match(/error_description=(.+)$/)[1].split("&")[0]}catch(e){}t.postMessage({OAuthToken:n,error:r,errorDescription:i},window.origin)};function*handleFetchUserSaga(){var e=yield select(rootApiSelector);if(e){var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),e=yield call$7(handleFetchUserRequest,e,n),t=yield call$7(getUserRightRequest,t,n);if(e)if(null!=e&&e.errors||t.errors)yield put(fetchUserError());else{var r=null==(i=null==(i=null==(i=null==t?void 0:t.data)?void 0:i.me)?void 0:i.roles)?void 0:i.map(e=>e.appName).filter((e,t,n)=>n.indexOf(e)===t);if(r.includes("admin"))for(const a of null==(i=null==(i=null==t?void 0:t.data)?void 0:i.myRights)?void 0:i.operations)if(a.includes("superadmin")){r.push("superadmin");break}var i=null==(i=null==(i=null==t?void 0:t.data)?void 0:i.me)?void 0:i.userSettings.find(e=>"preferredLanguage"===e.key),o=null==(o=null==(o=null==t?void 0:t.data)?void 0:o.me)?void 0:o.userSettings.find(e=>"recentApplications"===e.key),i=null==i?void 0:i.value,o=null==o?void 0:o.value;e.preferredLanguage=i||"en",e.recentApplications=o||"",yield put(fetchUserSuccess(Object.assign(Object.assign({},e),{roles:r,token:e.token||n,myRights:null==(o=null==(i=null==t?void 0:t.data)?void 0:i.myRights)?void 0:o.operations}))),yield put(subscribeToEventsWebsocket())}else yield put(fetchUserError())}else yield take(getConfigSuccess.type),yield put(fetchUserRequest())}function*logoutHelper(e){var t=yield select(graphEndpointSelector),n=yield select(authSelector);yield call$7(postNotificationApi,t,null==n?void 0:n.userId,{eventType:aiwareEvent,command:null===notificationCommands||void 0===notificationCommands?void 0:notificationCommands.setCallLogout,value:!0,ephemeral:!0,contentType:"json"},!0,"json",aiwareEvent,e)}function*handleRefreshTokenSaga(e){var t=yield select(graphEndpointSelector),e=e.payload["token"];try{var n,r,i=yield call$7(handleRefreshTokenRequest,e,t);null!=i&&i.errors?(n=yield select(preferredLanguageSelector),r=AIWareFormatMessage(n),((null==i?void 0:i.errors)||[]).find(e=>{return((null==(e=null==e?void 0:e.data)?void 0:e.serviceMessage)||"").includes("40")})?(yield put(setDuration(1e4)),yield put(showMessage({content:r({id:"shared-redux.refresh-token-failure.4xx",defaultMessage:[{type:0,value:"Could not refresh session"}]}),severity:MessageSeverity.Error})),yield delay$1(10001),yield*logoutHelper(e)):yield put(showMessage({content:r({id:"shared-redux.refresh-token-failure.non-4xx",defaultMessage:[{type:0,value:"Could not refresh session. Service temporarily unavailable"}]}),severity:MessageSeverity.Error}))):(yield put(refreshTokenSuccess(Object.assign({},i.data))),yield put(fetchUserRequest()))}catch(e){console.log(e)}}function*handleExtendTokenSaga(t){t=t.payload.token;try{var n=yield select(rootApiSelector),r=yield call$7(handleExtendTokenRequest,t,n);null!=r&&r.errors||(yield put(extendTokenSuccess({token:r.token})))}catch(e){n=yield select(preferredLanguageSelector),r=AIWareFormatMessage(n);e instanceof CustomError&&e.isAuthErr?(yield put(setDuration(1e4)),yield put(showMessage({content:r({id:"shared-redux.extend-token-failure.4xx",defaultMessage:[{type:0,value:"Could not extend session"}]}),severity:MessageSeverity.Error})),yield delay$1(10001),yield*logoutHelper(t)):yield put(showMessage({content:r({id:"shared-redux.extend-token-failure.non-4xx",defaultMessage:[{type:0,value:"Could not extend session. Service temporarily unavailable"}]}),severity:MessageSeverity.Error}))}}function*handleLogoutSaga(e){var t=yield select(graphEndpointSelector),e=e.payload["token"],e=yield call$7(handleLogoutRequest,e,t);null!=e&&e.errors?yield put(logoutError()):yield put(logoutSuccess())}function*handleUpdateSessionToken(e){e=e.payload.token;e&&"string"==typeof e?yield put(updateTokenSuccess({token:e})):yield put(updateTokenError())}function*handleUpdateUserLanguage(e){var t=yield select(preferredLanguageSelector),t=AIWareFormatMessage(t);try{var n,r,i=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=(yield select(userSelector$2))["userId"];a?(n=e.payload,r=yield call$7(updateUserSettingsApi,i,o,a,"preferredLanguage",n),sdkEventManager.dispatch(SdkEvents.languageChange,null,{preferredLanguage:r}),yield put(updateUserLanguageSuccess(r))):(sdkEventManager.dispatch(SdkEvents.languageChange,new SdkError("Changing user preferred language failed, user id is required"),null),yield put(showMessage({content:t({id:"shared-redux.snackbar.languageSelectionError",defaultMessage:[{type:0,value:"Something went wrong while updating preferred language"}]}),severity:MessageSeverity.Error})))}catch(e){sdkEventManager.dispatch(SdkEvents.languageChange,new SdkError("Changing user preferred language failed"),null),yield put(showMessage({content:t({id:"shared-redux.snackbar.languageSelectionChangeError",defaultMessage:[{type:0,value:"Something went wrong while updating preferred language"}]}),severity:MessageSeverity.Error})),console.log(e)}}function*handleResetPasswordSaga(e){var t,n,r=yield select(preferredLanguageSelector),r=AIWareFormatMessage(r);try{var{resetToken:i,password:o,username:a,organizationInviteId:s}=e.payload,l=yield select(rootApiSelector),c=yield call$7(handleResetPasswordApi,l,{resetToken:i,username:a,password:o,organizationInviteId:s});if(null!=c&&c.success)yield put(resetPasswordSuccess());else{let e=r({id:"os-auth.reset-password.internalServerError",defaultMessage:[{type:0,value:"An error has occurred."}]});401===c.status&&"PasswordResetTokenExpired"===(null==(t=c.result)?void 0:t.errorCode)?e=r({id:"os-auth.reset-password.expireMessageDescriptive",defaultMessage:[{type:0,value:'The password reset link you used has expired. Please click the "Forgot Password" link on the login page to generate a new link.'}]}):403===c.status?e=(null==(n=c.result)?void 0:n.message)||e:404===c.status&&(e=r({id:"os-auth.reset-password.expireMessage",defaultMessage:[{type:0,value:"An error has occurred. The reset link might be expired."}]})),yield put(resetPasswordError({message:e}))}}catch(e){console.log(e),yield put(resetPasswordError({message:r({id:"os-auth.reset-password.internalError",defaultMessage:[{type:0,value:"Could not reset your password."}]})}))}}function*requestOAuthGrant(){var e=yield select(appIdSelector),t=(yield select(selectApiConfigs$1))["apiRoot"],n=yield select(sessionTokenSelector),r=yield select(oauthRedirectUriSelector);if(n)yield put(oAuthGrantSuccess(n));else try{n=(yield call$7(login,t+`/v1/admin/oauth/authorize?response_type=token&client_id=${e}&redirect_uri=${r}&scope=all`)).OAuthToken;yield put(oAuthGrantSuccess(n))}catch(e){console.log("oauth flow error",e),yield put(oAuthGrantFailure())}}function*callSdkInitCompleteCallbackOnError(){var e,t=yield select(initialConfigSelector),n=yield select(preferredLanguageSelector),n=AIWareFormatMessage(n);null!=(e=null==t?void 0:t.onComplete)&&e.call(t,n({id:"shared-redux.auth-saga.sdk-init-error-message",defaultMessage:[{type:0,value:"An error occurred during initialization."}]}))}function*watchOAuthReadiness(){for(;;){yield take([oAuthGrantReadyToStart.type,fetchUserSuccess.type,fetchUserError.type]);var e=yield select(oAuthStatusSelector),t=yield select(authStatusSelector);if(t!==Status.loading&&e===Status.ready)switch(t){case Status.success:yield put(oAuthGrantSkip());break;case Status.failure:yield put(oAuthGrantStart())}}}function*handleUpdateUserRecentApplications(e){var t=yield select(preferredLanguageSelector),t=AIWareFormatMessage(t);try{var n,r,i=yield select(graphEndpointSelector),o=yield select(sessionTokenSelector),a=(yield select(userSelector$2))["userId"],s=yield select(userRecentApplicationsSelector);a?(n=slice$2(uniq([e.payload,...s]),0,6),r=yield call$7(updateUserSettingsApi,i,o,a,"recentApplications",JSON.stringify(n)),yield put(updateUserRecentApplicationsSuccess(r))):yield put(showMessage({content:t({id:"shared-redux.snackbar.updateRecentApplicationsError",defaultMessage:[{type:0,value:"Something went wrong while updating recent applications"}]}),severity:MessageSeverity.Error}))}catch(e){yield put(showMessage({content:t({id:"shared-redux.snackbar.updatingRecentApplicationsChangeError",defaultMessage:[{type:0,value:"Something went wrong while updating recent applications"}]}),severity:MessageSeverity.Error})),console.log(e)}}function*watchInitAndAuthStatus(){for(var e,t,n;;){yield take([oAuthGrantSuccess.type,oAuthGrantSkip.type,oAuthGrantFailure.type,sdkInitSuccess.type,fetchUserSuccess.type,fetchUserError.type]);var r=yield select(initialConfigSelector),i=yield select(oAuthTokenSelector),o=yield select(oAuthStatusSelector),a=yield select(initStatusSelector),s=yield select(authStatusSelector),l=yield select(sessionTokenSelector),c=yield select(preferredLanguageSelector),u=AIWareFormatMessage(c);if(s!==Status.loading)if(s===Status.success)switch(o){case Status.loading:null!=(e=null==r?void 0:r.onComplete)&&e.call(r,null,l),yield put(oAuthGrantSuccess(l));break;case Status.skipped:null!=(e=null==r?void 0:r.onComplete)&&e.call(r,null,l)}else if(a===Status.success)switch(o){case Status.skipped:null!=(t=null==r?void 0:r.onComplete)&&t.call(r,null,l);break;case Status.success:null!=(t=null==r?void 0:r.onComplete)&&t.call(r,null,i),s===Status.failure&&(yield put(fetchUserRequest()));break;case Status.failure:null!=(n=null==r?void 0:r.onComplete)&&n.call(r,u({id:"shared-redux.auth-saga.oauth-error-message",defaultMessage:[{type:0,value:"An error occurred during authentication."}]}))}}}function*authSaga(){yield all([takeLatest$1(fetchUserRequest.type,handleFetchUserSaga),takeLatest$1(updateTokenRequest.type,handleUpdateSessionToken),takeLatest$1(resetPasswordRequest.type,handleResetPasswordSaga),takeEvery$1(refreshTokenRequest.type,handleRefreshTokenSaga),takeEvery$1(extendTokenRequest.type,handleExtendTokenSaga),takeEvery$1(logoutRequest.type,handleLogoutSaga),takeEvery$1(updateUserLanguageStart.type,handleUpdateUserLanguage),takeEvery$1(oAuthGrantStart.type,requestOAuthGrant),takeEvery$1(sdkInitFailure.type,callSdkInitCompleteCallbackOnError),takeEvery$1(updateUserRecentApplicationsStart.type,handleUpdateUserRecentApplications),watchOAuthReadiness(),watchInitAndAuthStatus()])}function getAuthModule(){return{id:namespace$3$1,reducerMap:{[namespace$3$1]:authReducer},sagas:[authSaga],initialActions:[fetchUserRequest()]}}var NotificationFlag,CreateModes,TabId,EUserStatus,AvailableWidgets,AvailablePanels,AvailableComponents,userActivityEvents={records:[{id:"ff9272fe-5e98-4ffb-96b6-5df2918d9b2b",event:"login_succeeded",userId:"10ffa55a-d68b-494b-83df-49ce2d008e6d",userName:"sys_graphql_citest_superadmin@veritone.com",organizationId:"7682",applicationId:"123",createdDateTime:"2020-10-26T06:40:12.928Z",payload:{organizationId:12333,organizationName:"name",userName:"user",userId:"10ffa55a-d68b-494b-83df-49ce2d008e6d"}}]},mockData={userActivityEvents:userActivityEvents};const fakeAPI=()=>new Promise((e,t)=>{setTimeout(()=>e({success:!0,data:mockData}),500)}),getActivityApi=()=>__awaiter$7(void 0,void 0,void 0,function*(){try{var{success:e,data:t}=yield fakeAPI();return e&&t.userActivityEvents?{data:t.userActivityEvents,success:!0}:{success:!1,data:null}}catch(e){return{success:!1,data:null,message:e}}}),getApplicationsApi=(e,t)=>__awaiter$7(void 0,void 0,void 0,function*(){try{return(yield fetch(e+"/v1/admin/current-user/applications",{method:"GET",headers:Object.assign({"Content-Type":"application/json"},t&&{Authorization:"Bearer "+t}),credentials:"include"})).json()}catch(e){console.error(e)}}),getApplicationLogo=(r,i)=>__awaiter$7(void 0,void 0,void 0,function*(){var e=`query ($limit: Int $owned: Boolean) {
|
|
1071
1071
|
applications (limit: $limit owned: $owned) {
|
|
1072
1072
|
records {
|
|
1073
1073
|
id
|
|
@@ -1147,7 +1147,7 @@ createScheduledJob(input:{
|
|
|
1147
1147
|
title
|
|
1148
1148
|
contentType
|
|
1149
1149
|
}
|
|
1150
|
-
}`,o),t=createApolloWs(s,a,o);const n=createApolloClient(t),i=n.subscribe({query:e}).subscribe({next(e){var t,n;"json"!==(null==(t=null==(t=null==e?void 0:e.data)?void 0:t.notificationPosted)?void 0:t.contentType)&&({title:t,body:n}=e.data.notificationPosted,t===MARK_ALL_NOTIFICATIONS_SEEN&&n===o?r(markAllNotificationsSeenSuccess()):r(pushDefaultMailBox(e.data.notificationPosted)))}});return()=>{i.unsubscribe(),n.stop()}})}function*websocketSagas(){subscriptionTask&&(yield cancel(subscriptionTask)),subscriptionTask=yield fork(function*(){for(var e=yield call$7(websocketInitChannel);;)yield put(yield take(e))})}function*defaultMailboxSagas(){mailboxSubscription&&(yield cancel(mailboxSubscription)),mailboxSubscription=yield fork(function*(){for(var e=yield call$7(defaultMailboxChannel);;)yield put(yield take(e))})}function*updateMailboxSetting(){yield websocketSagas()}function*updateUnseenCountSaga(e){var t,n=yield select(graphEndpointSelector),r=yield select(sessionTokenSelector),i=(yield select(panelSelector)).find(e=>e.panelId===notificationPanelId);try{i&&(yield delay$1(1e3),yield markAllNotificationsSeenSaga()),yield delay$1(2e3);var o=yield call$7(getUnseenCountApi,n,r),a=e.payload["mailboxId"];yield put(updateUnseenCount({notificationMailboxes:null==(t=null==o?void 0:o.data)?void 0:t.notificationMailboxes,mailboxId:a}))}catch(e){yield put(markAllNotificationsSeenFail())}}function*markAllNotificationsSeenSaga(){var e=yield select(mailboxIdSelector),t=(yield select(userSelector$2))["userId"],n=yield select(graphEndpointSelector),r=yield select(sessionTokenSelector);if(0<(null==e?void 0:e.length))try{(yield call$7(handleMarkAllNotificationsSeen,e,n,r)).error?yield put(markAllNotificationsSeenFail()):(yield put(markAllNotificationsSeenSuccess()),yield call$7(pushDefaultMailboxNotification,t,MARK_ALL_NOTIFICATIONS_SEEN,n,r))}catch(e){yield put(markAllNotificationsSeenFail())}}function*mailboxSaga(){yield all([takeLatest$1(requestSubscriber.type,subscriberSaga),takeLatest$1(setMailboxData.type,websocketSagas),takeLatest$1("UPDATE_MAILBOX_SETTING",updateMailboxSetting),takeEvery$1(pushNotification.type,updateUnseenCountSaga),takeEvery$1(subscribeDefaultMailboxRequest.type,defaultMailboxSagas),takeLatest$1(markAllNotificationsSeenRequest.type,markAllNotificationsSeenSaga)])}function getNotificationModule$1(){return{id:"mailbox-subscription",reducerMap:{[nameSpace$4]:mailboxReducer},sagas:[mailboxSaga],initialActions:[requestSubscriber(),subscribeDefaultMailboxRequest()]}}var mui={},tssReact={},cssAndCx={},classnames$1={},assert$1={};function assert(e,t){if(!e)throw new Error(t)}Object.defineProperty(assert$1,"__esModule",{value:!0}),assert$1.assert=void 0,assert$1.assert=assert;var typeGuard$1={};function typeGuard(e,t){return t}function murmur2(e){for(var t,n=0,r=0,i=e.length;4<=i;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}Object.defineProperty(typeGuard$1,"__esModule",{value:!0}),typeGuard$1.typeGuard=void 0,typeGuard$1.typeGuard=typeGuard,function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.classnames=void 0;const s=assert$1,l=typeGuard$1;a.classnames=e=>{var t=e.length;let n=0,r="";for(;n<t;n++){var i=e[n];if(null!=i){let e;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))e=(0,a.classnames)(i);else{(0,s.assert)(!(0,l.typeGuard)(i,!1)),e="";for(const o in i)i[o]&&o&&(e&&(e+=" "),e+=o)}break;default:e=i}e&&(r&&(r+=" "),r+=e)}}return r}}(classnames$1);var unitlessKeys={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},hyphenateRegex=/[A-Z]|^ms/g,animationRegex=/_EMO_([^_]+?)_([^]*?)_EMO_/g,isCustomProperty=function(e){return 45===e.charCodeAt(1)},isProcessableValue=function(e){return null!=e&&"boolean"!=typeof e},processStyleName=memoize$4(function(e){return isCustomProperty(e)?e:e.replace(hyphenateRegex,"-$&").toLowerCase()}),processStyleValue=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(animationRegex,function(e,t,n){return cursor={name:t,styles:n,next:cursor},t})}return 1===unitlessKeys[e]||isCustomProperty(e)||"number"!=typeof t||0===t?t:t+"px"},noComponentSelectorMessage="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function handleInterpolation(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return cursor={name:n.name,styles:n.styles,next:cursor},n.name;if(void 0===n.styles)return createStringFromObject(e,t,n);var r=n.next;if(void 0!==r)for(;void 0!==r;)cursor={name:r.name,styles:r.styles,next:cursor},r=r.next;return n.styles+";";case"function":var i,o;if(void 0!==e)return i=cursor,o=n(e),cursor=i,handleInterpolation(e,t,o)}var a;return null!=t&&void 0!==(a=t[n])?a:n}function createStringFromObject(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=handleInterpolation(e,t,n[i])+";";else for(var o in n){var a=n[o];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=o+"{"+t[a]+"}":isProcessableValue(a)&&(r+=processStyleName(o)+":"+processStyleValue(o,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=handleInterpolation(e,t,a);switch(o){case"animation":case"animationName":r+=processStyleName(o)+":"+s+";";break;default:r+=o+"{"+s+"}"}}else for(var l=0;l<a.length;l++)isProcessableValue(a[l])&&(r+=processStyleName(o)+":"+processStyleValue(o,a[l])+";")}return r}var cursor,labelPattern=/label:\s*([^\s;\n{]+)\s*(;|$)/g,serializeStyles=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="",o=(cursor=void 0,e[0]);null==o||void 0===o.raw?(r=!1,i+=handleInterpolation(n,t,o)):i+=o[0];for(var a=1;a<e.length;a++)i+=handleInterpolation(n,t,e[a]),r&&(i+=o[a]);labelPattern.lastIndex=0;for(var s,l="";null!==(s=labelPattern.exec(i));)l+="-"+s[1];return{name:murmur2(i)+l,styles:i,next:cursor}},emotionSerialize_browser_esm=Object.freeze({__proto__:null,serializeStyles:serializeStyles}),isBrowser=!0;function getRegisteredStyles(t,n,e){var r="";return e.split(" ").forEach(function(e){void 0!==t[e]?n.push(t[e]+";"):r+=e+" "}),r}var registerStyles=function(e,t,n){var r=e.key+"-"+t.name;!1!==n&&!1!==isBrowser||void 0!==e.registered[r]||(e.registered[r]=t.styles)},insertStyles=function(e,t,n){registerStyles(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name])for(var i=t;e.insert(t===i?"."+r:"",i,e.sheet,!0),void 0!==(i=i.next););},emotionUtils_browser_esm=Object.freeze({__proto__:null,getRegisteredStyles:getRegisteredStyles,insertStyles:insertStyles,registerStyles:registerStyles}),useGuaranteedMemo$1={};Object.defineProperty(useGuaranteedMemo$1,"__esModule",{value:!0}),useGuaranteedMemo$1.useGuaranteedMemo=void 0;const react_1$4=react.exports;function useGuaranteedMemo(e,n){var t=(0,react_1$4.useRef)();return(!t.current||n.length!==t.current.prevDeps.length||0<=t.current.prevDeps.map((e,t)=>e===n[t]).indexOf(!1))&&(t.current={v:e(),prevDeps:[...n]}),t.current.v}useGuaranteedMemo$1.useGuaranteedMemo=useGuaranteedMemo;var cache={},__importDefault=commonjsGlobal$1&&commonjsGlobal$1.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cache,"__esModule",{value:!0}),cache.TssCacheProvider=cache.useTssEmotionCache=cache.getTssDefaultEmotionCache=cache.getDoExistsTssDefaultEmotionCacheMemoizedValue=void 0;const jsx_runtime_1$2=jsxRuntime.exports,react_1$3=react.exports,cache_1$1=__importDefault(createCache$1),{getDoExistsTssDefaultEmotionCacheMemoizedValue,getTssDefaultEmotionCache,reactContext}=(()=>{var e,t,n=react_1$3.createContext;let r=n["__tss-react_context"];return void 0===r&&({getTssDefaultEmotionCache:e,getDoExistsTssDefaultEmotionCacheMemoizedValue:t}=(()=>{let t=void 0;return{getTssDefaultEmotionCache:function(e){var{doReset:e=!1}=null!=e?e:{};return t=void 0===(t=e?void 0:t)?(0,cache_1$1.default)({key:"tss"}):t},getDoExistsTssDefaultEmotionCacheMemoizedValue:()=>void 0!==t}})(),r={getTssDefaultEmotionCache:e,getDoExistsTssDefaultEmotionCacheMemoizedValue:t,reactContext:(0,react_1$3.createContext)(void 0)},Object.defineProperty(n,"__tss-react_context",{configurable:!1,enumerable:!1,writable:!1,value:r})),r})();function useTssEmotionCache(){var e=(0,react_1$3.useContext)(reactContext);return null!=e?e:getTssDefaultEmotionCache()}function TssCacheProvider(e){var{children:e,value:t}=e;return(0,jsx_runtime_1$2.jsx)(reactContext.Provider,Object.assign({value:t},{children:e}))}cache.getDoExistsTssDefaultEmotionCacheMemoizedValue=getDoExistsTssDefaultEmotionCacheMemoizedValue,cache.getTssDefaultEmotionCache=getTssDefaultEmotionCache,cache.useTssEmotionCache=useTssEmotionCache,cache.TssCacheProvider=TssCacheProvider;var types={};function matchCSSObject(e){return!(!(e instanceof Object)||"styles"in e||"length"in e||"__emotion_styles"in e)}Object.defineProperty(types,"__esModule",{value:!0}),types.matchCSSObject=void 0,types.matchCSSObject=matchCSSObject,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.useCssAndCx=r.createCssAndCx=void 0;const a=classnames$1,n=emotionSerialize_browser_esm,s=emotionUtils_browser_esm,i=useGuaranteedMemo$1,o=cache,l=types;r.createCssAndCx=function(e){const i=e["cache"],o=(...e)=>{var t=(0,n.serializeStyles)(e,i.registered),t=((0,s.insertStyles)(i,t,!1),i.key+"-"+t.name),e=e[0];return(0,l.matchCSSObject)(e)&&c.saveClassNameCSSObjectMapping(i,t,e),t};return{css:o,cx:(...e)=>{var t,n,r,e=(0,a.classnames)(e),e=c.fixClassName(i,e,o);return t=i.registered,n=o,e=e,r=[],t=(0,s.getRegisteredStyles)(t,r,e),r.length<2?e:t+n(r)}}},r.useCssAndCx=function(){const e=(0,o.useTssEmotionCache)();var{css:t,cx:n}=(0,i.useGuaranteedMemo)(()=>(0,r.createCssAndCx)({cache:e}),[e]);return{css:t,cx:n}};const c=(()=>{const i=new WeakMap;return{saveClassNameCSSObjectMapping:(e,t,n)=>{let r=i.get(e);void 0===r&&(r=new Map,i.set(e,r)),r.set(t,n)},fixClassName:(e,t,n)=>{const r=i.get(e);return(0,a.classnames)(function(e){let i=!1;return e.map(([e,t])=>{if(void 0===t)return e;let n;if(i)n={"&&":t};else{n=e;for(const r in t)if(r.startsWith("@media")){i=!0;break}}return n})}(t.split(" ").map(e=>[e,null===r||void 0===r?void 0:r.get(e)])).map(e=>"string"==typeof e?e:n(e)))}}})()}(cssAndCx);var mergeClasses$1={},objectKeys$4={};function objectKeys$3(e){return Object.keys(e)}Object.defineProperty(objectKeys$4,"__esModule",{value:!0}),objectKeys$4.objectKeys=void 0,objectKeys$4.objectKeys=objectKeys$3;var getDependencyArrayRef$1={};function getDependencyArrayRef(e){if(!(e instanceof Object)||"function"==typeof e)return e;var t=[];for(const i in e){var n=e[i],r=typeof n;if("string"!=r&&("number"!=r||isNaN(n))&&"boolean"!=r&&null!=n)return e;t.push(i+`:${r}_`+n)}return"xSqLiJdLMd9s"+t.join("|")}Object.defineProperty(getDependencyArrayRef$1,"__esModule",{value:!0}),getDependencyArrayRef$1.getDependencyArrayRef=void 0,getDependencyArrayRef$1.getDependencyArrayRef=getDependencyArrayRef,Object.defineProperty(mergeClasses$1,"__esModule",{value:!0}),mergeClasses$1.useMergedClasses=mergeClasses$1.mergeClasses=void 0;const objectKeys_1$1=objectKeys$4,getDependencyArrayRef_1$1=getDependencyArrayRef$1,cssAndCx_1$1=cssAndCx,react_1$2=react.exports;function mergeClasses(n,r,t){if(!(r instanceof Object))return n;const i={};return(0,objectKeys_1$1.objectKeys)(n).forEach(e=>i[e]=t(n[e],r[e])),(0,objectKeys_1$1.objectKeys)(r).forEach(e=>{var t;e in n||"string"==typeof(t=r[e])&&(i[e]=t)}),i}function useMergedClasses(e,t){const n=(0,cssAndCx_1$1.useCssAndCx)()["cx"];return(0,react_1$2.useMemo)(()=>mergeClasses(e,t,n),[e,(0,getDependencyArrayRef_1$1.getDependencyArrayRef)(t),n])}mergeClasses$1.mergeClasses=mergeClasses,mergeClasses$1.useMergedClasses=useMergedClasses;var makeStyles$1={},Object_fromEntries={};Object.defineProperty(Object_fromEntries,"__esModule",{value:!0}),Object_fromEntries.objectFromEntries=void 0,Object_fromEntries.objectFromEntries=Object.fromEntries||(n=>{if(!n||!n[Symbol.iterator])throw new Error("Object.fromEntries() requires a single iterable argument");const r={};return Object.keys(n).forEach(e=>{var[e,t]=n[e];r[e]=t}),r}),Object.defineProperty(makeStyles$1,"__esModule",{value:!0}),makeStyles$1.createMakeStyles=void 0;const react_1$1=react.exports,Object_fromEntries_1=Object_fromEntries,objectKeys_1=objectKeys$4,cssAndCx_1=cssAndCx,getDependencyArrayRef_1=getDependencyArrayRef$1,typeGuard_1=typeGuard$1,cache_1=cache,assert_1=assert$1,mergeClasses_1=mergeClasses$1,getCounter=(()=>{let e=0;return()=>e++})();function createMakeStyles(e){const h=e["useTheme"];return{makeStyles:function(e){const f="object"!=typeof(e=(null!=e?e:{}).name)?e:Object.keys(e)[0];return function(e){const d="function"==typeof e?e:()=>e,p=getCounter();return function(i,o){var e,t;const a=h(),{css:s,cx:n}=(0,cssAndCx_1.useCssAndCx)(),l=(0,cache_1.useTssEmotionCache)();let c=(0,react_1$1.useMemo)(()=>{const n={};var e="undefined"!=typeof Proxy&&new Proxy({},{get:(e,t)=>("symbol"==typeof t&&(0,assert_1.assert)(!1),n[t]=`${l.key}-${p}${void 0!==f?"-"+f:""}-${t}-ref`)});const r=d(a,i,e||{}),t=(0,Object_fromEntries_1.objectFromEntries)((0,objectKeys_1.objectKeys)(r).map(e=>{var t=r[e];return t.label||(t.label=(void 0!==f?f+"-":"")+e),[e,""+s(t)+((0,typeGuard_1.typeGuard)(e,e in n)?" "+n[e]:"")]}));return(0,objectKeys_1.objectKeys)(n).forEach(e=>{e in t||(t[e]=n[e])}),t},[l,s,n,a,(0,getDependencyArrayRef_1.getDependencyArrayRef)(i)]);const r=null==o?void 0:o.props.classes;c=(0,react_1$1.useMemo)(()=>(0,mergeClasses_1.mergeClasses)(c,r,n),[c,(0,getDependencyArrayRef_1.getDependencyArrayRef)(r),n]);{let r=void 0;try{r=void 0===f||null==(t=null==(e=a.components)?void 0:e[f])?void 0:t.styleOverrides}catch(e){}const u=(0,react_1$1.useMemo)(()=>{if(r){var e={};for(const n in r){var t=r[n];t instanceof Object&&(e[n]=s("function"==typeof t?t(Object.assign({theme:a,ownerState:null==o?void 0:o.ownerState},null==o?void 0:o.props)):t))}return e}},[void 0===r?void 0:JSON.stringify(r),(0,getDependencyArrayRef_1.getDependencyArrayRef)(null==o?void 0:o.props),(0,getDependencyArrayRef_1.getDependencyArrayRef)(null==o?void 0:o.ownerState),s]);c=(0,react_1$1.useMemo)(()=>(0,mergeClasses_1.mergeClasses)(c,u,n),[c,u,n])}return{classes:c,theme:a,css:s,cx:n}}}},useStyles:function(){var e=h(),{css:t,cx:n}=(0,cssAndCx_1.useCssAndCx)();return{theme:e,css:t,cx:n}}}}makeStyles$1.createMakeStyles=createMakeStyles;var withStyles$1={},capitalize$1={};function capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)}Object.defineProperty(capitalize$1,"__esModule",{value:!0}),capitalize$1.capitalize=void 0,capitalize$1.capitalize=capitalize;var __rest$3=commonjsGlobal$1&&commonjsGlobal$1.__rest||function(e,t){var n={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n};Object.defineProperty(withStyles$1,"__esModule",{value:!0}),withStyles$1.createWithStyles=void 0;const jsx_runtime_1$1=jsxRuntime.exports,react_1=react.exports,makeStyles_1=makeStyles$1,capitalize_1=capitalize$1;function createWithStyles(e){e=e.useTheme;const n=(0,makeStyles_1.createMakeStyles)({useTheme:e})["makeStyles"];return{withStyles:function(o,r,e){const a="string"==typeof o?(()=>{const n=o;function e(e){var t=e["children"],e=__rest$3(e,["children"]);return(0,react_1.createElement)(n,e,t)}return Object.defineProperty(e,"name",{value:(0,capitalize_1.capitalize)(n)}),e})():o;var t="string"==typeof(t=a.name)?t:void 0;const s=n(void 0!==(null==e?void 0:e.name)?e:{name:t})("function"==typeof r?(e,t,n)=>incorporateMediaQueries(r(e,t,n)):incorporateMediaQueries(r));return e=(0,react_1.forwardRef)(function(e,t){var n=e["className"],r=__rest$3(e,["className","classes"]),{classes:e,cx:i}=s(e,{props:e});return(0,jsx_runtime_1$1.jsx)(a,Object.assign({ref:t,className:i(e.root,n)},"string"==typeof o?{}:{classes:e},r))}),void 0!==t&&Object.defineProperty(e,"name",{value:t+"WithStyles"}),e}}}function incorporateMediaQueries(t){const i={},o={};return Object.keys(t).forEach(e=>(e.startsWith("@media")?o:i)[e]=t[e]),Object.keys(o).forEach(n=>{const r=o[n];Object.keys(r).forEach(e=>{var t;return i[e]=Object.assign(Object.assign({},null!=(t=i[e])?t:{}),{[n]:r[e]})})}),i}withStyles$1.createWithStyles=createWithStyles;var makeStyles,withStyles,_a,EApplicationConfigValue,EApplicationConfigLevel,GlobalStyles$1={},__createBinding=commonjsGlobal$1&&commonjsGlobal$1.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&("get"in i?t.__esModule:!i.writable&&!i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){e[r=void 0===r?n:r]=t[n]}),__setModuleDefault=commonjsGlobal$1&&commonjsGlobal$1.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=commonjsGlobal$1&&commonjsGlobal$1.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&__createBinding(t,e,n);return __setModuleDefault(t,e),t};Object.defineProperty(GlobalStyles$1,"__esModule",{value:!0}),GlobalStyles$1.GlobalStyles=void 0;const jsx_runtime_1=jsxRuntime.exports,reactEmotion=__importStar(emotionReact_browser_esm);function GlobalStyles(e){e=e.styles;return(0,jsx_runtime_1.jsx)(reactEmotion.Global,{styles:reactEmotion.css(e)})}GlobalStyles$1.GlobalStyles=GlobalStyles,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMakeAndWithStyles=e.TssCacheProvider=e.getTssDefaultEmotionCache=e.GlobalStyles=e.keyframes=e.createWithStyles=e.createMakeStyles=e.useMergedClasses=e.useCssAndCx=void 0;var t=cssAndCx,n=(Object.defineProperty(e,"useCssAndCx",{enumerable:!0,get:function(){return t.useCssAndCx}}),mergeClasses$1);Object.defineProperty(e,"useMergedClasses",{enumerable:!0,get:function(){return n.useMergedClasses}});const r=makeStyles$1,i=(Object.defineProperty(e,"createMakeStyles",{enumerable:!0,get:function(){return r.createMakeStyles}}),withStyles$1);Object.defineProperty(e,"createWithStyles",{enumerable:!0,get:function(){return i.createWithStyles}});var o=emotionReact_browser_esm,a=(Object.defineProperty(e,"keyframes",{enumerable:!0,get:function(){return o.keyframes}}),GlobalStyles$1),s=(Object.defineProperty(e,"GlobalStyles",{enumerable:!0,get:function(){return a.GlobalStyles}}),cache);Object.defineProperty(e,"getTssDefaultEmotionCache",{enumerable:!0,get:function(){return s.getTssDefaultEmotionCache}}),Object.defineProperty(e,"TssCacheProvider",{enumerable:!0,get:function(){return s.TssCacheProvider}}),e.createMakeAndWithStyles=function(e){return Object.assign(Object.assign({},(0,r.createMakeStyles)(e)),(0,i.createWithStyles)(e))}}(tssReact),Object.defineProperty(mui,"__esModule",{value:!0}),mui.useStyles=withStyles=mui.withStyles=makeStyles=mui.makeStyles=void 0;const styles_1=styles$5,index_1=tssReact;function __awaiter$4(e,a,s,l){return new(s=s||Promise)(function(n,t){function r(e){try{o(l.next(e))}catch(e){t(e)}}function i(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((l=l.apply(e,a||[])).next())})}_a=(0,index_1.createMakeAndWithStyles)({useTheme:styles_1.useTheme}),makeStyles=mui.makeStyles=_a.makeStyles,withStyles=mui.withStyles=_a.withStyles,mui.useStyles=_a.useStyles;const SLICE_NAME="userApplicationSettings",formatLabel=(!function(e){e.String="String",e.Boolean="Boolean",e.Date="Date",e.Integer="Integer",e.JSON="JSON",e.Float="Float"}(EApplicationConfigValue=EApplicationConfigValue||{}),!function(e){e.Organization="Organization",e.User="User"}(EApplicationConfigLevel=EApplicationConfigLevel||{}),(e="")=>lodash.exports.startCase(e)),getFieldErrorMessage=e=>{var{value:e,required:t,configType:n}=e;return t&&lodash.exports.isEmpty(e)?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-admin-center-user-application-settings-empty-error-message",defaultMessage:"Please enter value",description:"Empty error message"}):n===EApplicationConfigValue.Integer&&Number(e)-Math.floor(Number(e))!=0?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-admin-center-user-application-settings-integer-vaue-error-message",defaultMessage:"The value has to to be Integer'",description:"Integer value error message"}):""},useStyles$2$5=makeStyles()(e=>({outerContainer:{margin:"0 30px"},formControlWrapper:{marginTop:15,width:"100%"},inputLabel:{fontFamily:"Nunito",fontWeight:600,display:"block",fontSize:"16px",lineHeight:"22px",color:"#2A323C",marginBottom:4},inputLabelError:{color:e.palette.error.main},description:{fontWeight:400,marginBottom:9}})),useStyles$1$5=makeStyles()(e=>({field:{width:"100%"}})),TxtField=({id:e,type:t,required:n,value:r,onChange:i,error:o=!1,multiline:a=!1})=>{var s=useStyles$1$5()["classes"];return jsxRuntime.exports.jsx(TextField$1,{id:e,"data-testid":e,InputLabelProps:{shrink:!0},autoComplete:"off",required:n,value:r,type:t,rows:4,className:s.field,onChange:i,size:"small",multiline:a,error:o})},ComponentLoader=({fields:e,onChange:l,toggleSaveButton:c})=>{const u=useStyles$2$5()["classes"];return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:null==(e=e)?void 0:e.map((n,e)=>{var t,r=formatLabel(""+(null==n?void 0:n.configKey)||""),i=`configuration-input--${null==n?void 0:n.applicationId}-idx-`+e,o=!!getFieldErrorMessage(n),a=e=>{var t;(null==n?void 0:n.configType)===EApplicationConfigValue.Boolean?(l({fieldName:null==n?void 0:n.configKey,fieldValue:String(e.target.checked)}),c(!1)):(l({fieldName:null==n?void 0:n.configKey,fieldValue:e.target.value}),t=!0,t=!(null==n||!n.required||e.target.value)||""!==getFieldErrorMessage(n),c(t))};let s;switch(null==n?void 0:n.configType){case EApplicationConfigValue.String:s=jsxRuntime.exports.jsx(TxtField,{id:i,label:r,required:null==n?void 0:n.required,type:"text",value:(null==n?void 0:n.value)||"",onChange:a,error:o});break;case EApplicationConfigValue.Boolean:s=jsxRuntime.exports.jsx(Switch$1,{id:i,required:null==n?void 0:n.required,onChange:a,checked:"true"===(null==(t=null==n?void 0:n.value)?void 0:t.toLowerCase())});break;case EApplicationConfigValue.Date:s=jsxRuntime.exports.jsx(TxtField,{id:i,label:r,required:null==n?void 0:n.required,type:"date",value:(null==(t=null==n?void 0:n.value)?void 0:t.substring(0,10))||"",onChange:a,error:o});break;case EApplicationConfigValue.Integer:s=jsxRuntime.exports.jsx(TxtField,{id:i,label:r,required:null==n?void 0:n.required,value:(null==n?void 0:n.value)||"",type:"number",onChange:a,error:o});break;case EApplicationConfigValue.JSON:s=jsxRuntime.exports.jsx(TxtField,{id:i,label:r,required:null==n?void 0:n.required,value:(null==n?void 0:n.value)||"",multiline:!0,type:"text",onChange:a,error:o});break;case EApplicationConfigValue.Float:s=jsxRuntime.exports.jsx(TxtField,{id:i,label:r,required:null==n?void 0:n.required,value:(null==n?void 0:n.value)||"",type:"number",onChange:a,error:o});break;default:return null}return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("div",Object.assign({className:u.outerContainer},{children:jsxRuntime.exports.jsxs(FormControl$1,Object.assign({error:o,size:"small",className:u.formControlWrapper},{children:[jsxRuntime.exports.jsxs("label",Object.assign({htmlFor:i,className:u.inputLabel+" "+(o&&u.inputLabelError)},{children:[r,null!=n&&n.required?"(Required)":""]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:u.description,"data-testid":"os-admin-center-user-application-settings-config-description"},{children:null==n?void 0:n.description})),s,o&&jsxRuntime.exports.jsx(FormHelperText$2,{children:getFieldErrorMessage(n)})]}),`${null==n?void 0:n.applicationId}-idx-`+e)})),jsxRuntime.exports.jsx(Divider$1,{sx:{opacity:.9,mt:4}})]})})})},useStyles$j=makeStyles()(e=>({settingsList:{display:"flex",flexDirection:"column",overflow:"scroll",height:"calc(100% - 115px)"},subtitle:{fontWeight:400,margin:"0 30px 15px"},footerBtnContainer:{margin:"0 30px 30px 30px",position:"absolute",right:0,bottom:0,"& button":{flex:1,height:"36px",marginLeft:"20px"}}})),formattedMessages=e=>({cancelButton:e.formatMessage({id:"os-admin-center-user-application-settings-cancel-button-text",defaultMessage:[{type:0,value:"Cancel"}]}),saveSettingsButton:e.formatMessage({id:"os-admin-center-user-application-settings-save-settings-button-text",defaultMessage:[{type:0,value:"Save Settings"}]})}),namespace$1$2="userApplicationSettings",initialState$1$2={applicationConfig:[],status:"idle"},userApplicationSettingsSlice=createSlice({name:SLICE_NAME+"/"+namespace$1$2,initialState:initialState$1$2,reducers:{fetchApplicationConfigStart(e,t){e.status="loading"},fetchApplicationConfigSuccess(e,t){e.status="success",e.applicationConfig=t.payload},fetchApplicationConfigFailure(e){e.status="failure"},updateApplicationConfigStart(e,t){e.status="loading"},updateApplicationConfigSuccess(e,n){e.status="success";var t=e.applicationConfig.map(t=>n.payload.some(({configKey:e})=>e==t.configKey)?Object.assign(Object.assign({},t),n.payload.find(({configKey:e})=>e==t.configKey)):t);e.applicationConfig=t},updateApplicationConfigFailure(e){e.status="failure"}}}),actions$1=userApplicationSettingsSlice.actions;var applicationConfig_state=userApplicationSettingsSlice.reducer;const namespace$7=SLICE_NAME,initialState$8={[namespace$1$2]:initialState$1$2},actions$2={[namespace$1$2]:actions$1},rootReducer=combineReducers({[namespace$1$2]:applicationConfig_state}),selectApplicationConfig=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1$2])?void 0:e.applicationConfig};function fetchApplicationConfig(n,{appId:r}){return __awaiter$4(this,void 0,void 0,function*(){var e="fetchApplicationConfig",t="applicationConfig";return(yield baseGraphQLApiWithError(Object.assign({query:`
|
|
1150
|
+
}`,o),t=createApolloWs(s,a,o);const n=createApolloClient(t),i=n.subscribe({query:e}).subscribe({next(e){var t,n;"json"!==(null==(t=null==(t=null==e?void 0:e.data)?void 0:t.notificationPosted)?void 0:t.contentType)&&({title:t,body:n}=e.data.notificationPosted,t===MARK_ALL_NOTIFICATIONS_SEEN&&n===o?r(markAllNotificationsSeenSuccess()):r(pushDefaultMailBox(e.data.notificationPosted)))}});return()=>{i.unsubscribe(),n.stop()}})}function*websocketSagas(){subscriptionTask&&(yield cancel(subscriptionTask)),subscriptionTask=yield fork(function*(){for(var e=yield call$7(websocketInitChannel);;)yield put(yield take(e))})}function*defaultMailboxSagas(){mailboxSubscription&&(yield cancel(mailboxSubscription)),mailboxSubscription=yield fork(function*(){for(var e=yield call$7(defaultMailboxChannel);;)yield put(yield take(e))})}function*updateMailboxSetting(){yield websocketSagas()}function*updateUnseenCountSaga(e){var t,n=yield select(graphEndpointSelector),r=yield select(sessionTokenSelector),i=(yield select(panelSelector)).find(e=>e.panelId===notificationPanelId);try{i&&(yield delay$1(1e3),yield markAllNotificationsSeenSaga()),yield delay$1(2e3);var o=yield call$7(getUnseenCountApi,n,r),a=e.payload["mailboxId"];yield put(updateUnseenCount({notificationMailboxes:null==(t=null==o?void 0:o.data)?void 0:t.notificationMailboxes,mailboxId:a}))}catch(e){yield put(markAllNotificationsSeenFail())}}function*markAllNotificationsSeenSaga(){var e=yield select(mailboxIdSelector),t=(yield select(userSelector$2))["userId"],n=yield select(graphEndpointSelector),r=yield select(sessionTokenSelector);if(0<(null==e?void 0:e.length))try{(yield call$7(handleMarkAllNotificationsSeen,e,n,r)).error?yield put(markAllNotificationsSeenFail()):(yield put(markAllNotificationsSeenSuccess()),yield call$7(pushDefaultMailboxNotification,t,MARK_ALL_NOTIFICATIONS_SEEN,n,r))}catch(e){yield put(markAllNotificationsSeenFail())}}function*mailboxSaga(){yield all([takeLatest$1(requestSubscriber.type,subscriberSaga),takeLatest$1(setMailboxData.type,websocketSagas),takeLatest$1("UPDATE_MAILBOX_SETTING",updateMailboxSetting),takeEvery$1(pushNotification.type,updateUnseenCountSaga),takeEvery$1(subscribeDefaultMailboxRequest.type,defaultMailboxSagas),takeLatest$1(markAllNotificationsSeenRequest.type,markAllNotificationsSeenSaga)])}function getNotificationModule$1(){return{id:"mailbox-subscription",reducerMap:{[nameSpace$4]:mailboxReducer},sagas:[mailboxSaga],initialActions:[requestSubscriber(),subscribeDefaultMailboxRequest()]}}var mui={},tssReact={},cssAndCx={},classnames$1={},assert$1={};function assert(e,t){if(!e)throw new Error(t)}Object.defineProperty(assert$1,"__esModule",{value:!0}),assert$1.assert=void 0,assert$1.assert=assert;var typeGuard$1={};function typeGuard(e,t){return t}function murmur2(e){for(var t,n=0,r=0,i=e.length;4<=i;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}Object.defineProperty(typeGuard$1,"__esModule",{value:!0}),typeGuard$1.typeGuard=void 0,typeGuard$1.typeGuard=typeGuard,function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.classnames=void 0;const s=assert$1,l=typeGuard$1;a.classnames=e=>{var t=e.length;let n=0,r="";for(;n<t;n++){var i=e[n];if(null!=i){let e;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))e=(0,a.classnames)(i);else{(0,s.assert)(!(0,l.typeGuard)(i,!1)),e="";for(const o in i)i[o]&&o&&(e&&(e+=" "),e+=o)}break;default:e=i}e&&(r&&(r+=" "),r+=e)}}return r}}(classnames$1);var unitlessKeys={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},hyphenateRegex=/[A-Z]|^ms/g,animationRegex=/_EMO_([^_]+?)_([^]*?)_EMO_/g,isCustomProperty=function(e){return 45===e.charCodeAt(1)},isProcessableValue=function(e){return null!=e&&"boolean"!=typeof e},processStyleName=memoize$4(function(e){return isCustomProperty(e)?e:e.replace(hyphenateRegex,"-$&").toLowerCase()}),processStyleValue=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(animationRegex,function(e,t,n){return cursor={name:t,styles:n,next:cursor},t})}return 1===unitlessKeys[e]||isCustomProperty(e)||"number"!=typeof t||0===t?t:t+"px"},noComponentSelectorMessage="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function handleInterpolation(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return cursor={name:n.name,styles:n.styles,next:cursor},n.name;if(void 0===n.styles)return createStringFromObject(e,t,n);var r=n.next;if(void 0!==r)for(;void 0!==r;)cursor={name:r.name,styles:r.styles,next:cursor},r=r.next;return n.styles+";";case"function":var i,o;if(void 0!==e)return i=cursor,o=n(e),cursor=i,handleInterpolation(e,t,o)}var a;return null!=t&&void 0!==(a=t[n])?a:n}function createStringFromObject(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=handleInterpolation(e,t,n[i])+";";else for(var o in n){var a=n[o];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=o+"{"+t[a]+"}":isProcessableValue(a)&&(r+=processStyleName(o)+":"+processStyleValue(o,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=handleInterpolation(e,t,a);switch(o){case"animation":case"animationName":r+=processStyleName(o)+":"+s+";";break;default:r+=o+"{"+s+"}"}}else for(var l=0;l<a.length;l++)isProcessableValue(a[l])&&(r+=processStyleName(o)+":"+processStyleValue(o,a[l])+";")}return r}var cursor,labelPattern=/label:\s*([^\s;\n{]+)\s*(;|$)/g,serializeStyles=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="",o=(cursor=void 0,e[0]);null==o||void 0===o.raw?(r=!1,i+=handleInterpolation(n,t,o)):i+=o[0];for(var a=1;a<e.length;a++)i+=handleInterpolation(n,t,e[a]),r&&(i+=o[a]);labelPattern.lastIndex=0;for(var s,l="";null!==(s=labelPattern.exec(i));)l+="-"+s[1];return{name:murmur2(i)+l,styles:i,next:cursor}},emotionSerialize_browser_esm=Object.freeze({__proto__:null,serializeStyles:serializeStyles}),isBrowser=!0;function getRegisteredStyles(t,n,e){var r="";return e.split(" ").forEach(function(e){void 0!==t[e]?n.push(t[e]+";"):r+=e+" "}),r}var registerStyles=function(e,t,n){var r=e.key+"-"+t.name;!1!==n&&!1!==isBrowser||void 0!==e.registered[r]||(e.registered[r]=t.styles)},insertStyles=function(e,t,n){registerStyles(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name])for(var i=t;e.insert(t===i?"."+r:"",i,e.sheet,!0),void 0!==(i=i.next););},emotionUtils_browser_esm=Object.freeze({__proto__:null,getRegisteredStyles:getRegisteredStyles,insertStyles:insertStyles,registerStyles:registerStyles}),useGuaranteedMemo$1={};Object.defineProperty(useGuaranteedMemo$1,"__esModule",{value:!0}),useGuaranteedMemo$1.useGuaranteedMemo=void 0;const react_1$4=react.exports;function useGuaranteedMemo(e,n){var t=(0,react_1$4.useRef)();return(!t.current||n.length!==t.current.prevDeps.length||0<=t.current.prevDeps.map((e,t)=>e===n[t]).indexOf(!1))&&(t.current={v:e(),prevDeps:[...n]}),t.current.v}useGuaranteedMemo$1.useGuaranteedMemo=useGuaranteedMemo;var cache={},__importDefault=commonjsGlobal$1&&commonjsGlobal$1.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cache,"__esModule",{value:!0}),cache.TssCacheProvider=cache.useTssEmotionCache=cache.getTssDefaultEmotionCache=cache.getDoExistsTssDefaultEmotionCacheMemoizedValue=void 0;const jsx_runtime_1$2=jsxRuntime.exports,react_1$3=react.exports,cache_1$1=__importDefault(createCache$1),{getDoExistsTssDefaultEmotionCacheMemoizedValue,getTssDefaultEmotionCache,reactContext}=(()=>{var e,t,n=react_1$3.createContext;let r=n["__tss-react_context"];return void 0===r&&({getTssDefaultEmotionCache:e,getDoExistsTssDefaultEmotionCacheMemoizedValue:t}=(()=>{let t=void 0;return{getTssDefaultEmotionCache:function(e){var{doReset:e=!1}=null!=e?e:{};return t=void 0===(t=e?void 0:t)?(0,cache_1$1.default)({key:"tss"}):t},getDoExistsTssDefaultEmotionCacheMemoizedValue:()=>void 0!==t}})(),r={getTssDefaultEmotionCache:e,getDoExistsTssDefaultEmotionCacheMemoizedValue:t,reactContext:(0,react_1$3.createContext)(void 0)},Object.defineProperty(n,"__tss-react_context",{configurable:!1,enumerable:!1,writable:!1,value:r})),r})();function useTssEmotionCache(){var e=(0,react_1$3.useContext)(reactContext);return null!=e?e:getTssDefaultEmotionCache()}function TssCacheProvider(e){var{children:e,value:t}=e;return(0,jsx_runtime_1$2.jsx)(reactContext.Provider,Object.assign({value:t},{children:e}))}cache.getDoExistsTssDefaultEmotionCacheMemoizedValue=getDoExistsTssDefaultEmotionCacheMemoizedValue,cache.getTssDefaultEmotionCache=getTssDefaultEmotionCache,cache.useTssEmotionCache=useTssEmotionCache,cache.TssCacheProvider=TssCacheProvider;var types={};function matchCSSObject(e){return!(!(e instanceof Object)||"styles"in e||"length"in e||"__emotion_styles"in e)}Object.defineProperty(types,"__esModule",{value:!0}),types.matchCSSObject=void 0,types.matchCSSObject=matchCSSObject,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.useCssAndCx=r.createCssAndCx=void 0;const a=classnames$1,n=emotionSerialize_browser_esm,s=emotionUtils_browser_esm,i=useGuaranteedMemo$1,o=cache,l=types;r.createCssAndCx=function(e){const i=e["cache"],o=(...e)=>{var t=(0,n.serializeStyles)(e,i.registered),t=((0,s.insertStyles)(i,t,!1),i.key+"-"+t.name),e=e[0];return(0,l.matchCSSObject)(e)&&c.saveClassNameCSSObjectMapping(i,t,e),t};return{css:o,cx:(...e)=>{var t,n,r,e=(0,a.classnames)(e),e=c.fixClassName(i,e,o);return t=i.registered,n=o,e=e,r=[],t=(0,s.getRegisteredStyles)(t,r,e),r.length<2?e:t+n(r)}}},r.useCssAndCx=function(){const e=(0,o.useTssEmotionCache)();var{css:t,cx:n}=(0,i.useGuaranteedMemo)(()=>(0,r.createCssAndCx)({cache:e}),[e]);return{css:t,cx:n}};const c=(()=>{const i=new WeakMap;return{saveClassNameCSSObjectMapping:(e,t,n)=>{let r=i.get(e);void 0===r&&(r=new Map,i.set(e,r)),r.set(t,n)},fixClassName:(e,t,n)=>{const r=i.get(e);return(0,a.classnames)(function(e){let i=!1;return e.map(([e,t])=>{if(void 0===t)return e;let n;if(i)n={"&&":t};else{n=e;for(const r in t)if(r.startsWith("@media")){i=!0;break}}return n})}(t.split(" ").map(e=>[e,null===r||void 0===r?void 0:r.get(e)])).map(e=>"string"==typeof e?e:n(e)))}}})()}(cssAndCx);var mergeClasses$1={},objectKeys$4={};function objectKeys$3(e){return Object.keys(e)}Object.defineProperty(objectKeys$4,"__esModule",{value:!0}),objectKeys$4.objectKeys=void 0,objectKeys$4.objectKeys=objectKeys$3;var getDependencyArrayRef$1={};function getDependencyArrayRef(e){if(!(e instanceof Object)||"function"==typeof e)return e;var t=[];for(const i in e){var n=e[i],r=typeof n;if("string"!=r&&("number"!=r||isNaN(n))&&"boolean"!=r&&null!=n)return e;t.push(i+`:${r}_`+n)}return"xSqLiJdLMd9s"+t.join("|")}Object.defineProperty(getDependencyArrayRef$1,"__esModule",{value:!0}),getDependencyArrayRef$1.getDependencyArrayRef=void 0,getDependencyArrayRef$1.getDependencyArrayRef=getDependencyArrayRef,Object.defineProperty(mergeClasses$1,"__esModule",{value:!0}),mergeClasses$1.useMergedClasses=mergeClasses$1.mergeClasses=void 0;const objectKeys_1$1=objectKeys$4,getDependencyArrayRef_1$1=getDependencyArrayRef$1,cssAndCx_1$1=cssAndCx,react_1$2=react.exports;function mergeClasses(n,r,t){if(!(r instanceof Object))return n;const i={};return(0,objectKeys_1$1.objectKeys)(n).forEach(e=>i[e]=t(n[e],r[e])),(0,objectKeys_1$1.objectKeys)(r).forEach(e=>{var t;e in n||"string"==typeof(t=r[e])&&(i[e]=t)}),i}function useMergedClasses(e,t){const n=(0,cssAndCx_1$1.useCssAndCx)()["cx"];return(0,react_1$2.useMemo)(()=>mergeClasses(e,t,n),[e,(0,getDependencyArrayRef_1$1.getDependencyArrayRef)(t),n])}mergeClasses$1.mergeClasses=mergeClasses,mergeClasses$1.useMergedClasses=useMergedClasses;var makeStyles$1={},Object_fromEntries={};Object.defineProperty(Object_fromEntries,"__esModule",{value:!0}),Object_fromEntries.objectFromEntries=void 0,Object_fromEntries.objectFromEntries=Object.fromEntries||(n=>{if(!n||!n[Symbol.iterator])throw new Error("Object.fromEntries() requires a single iterable argument");const r={};return Object.keys(n).forEach(e=>{var[e,t]=n[e];r[e]=t}),r}),Object.defineProperty(makeStyles$1,"__esModule",{value:!0}),makeStyles$1.createMakeStyles=void 0;const react_1$1=react.exports,Object_fromEntries_1=Object_fromEntries,objectKeys_1=objectKeys$4,cssAndCx_1=cssAndCx,getDependencyArrayRef_1=getDependencyArrayRef$1,typeGuard_1=typeGuard$1,cache_1=cache,assert_1=assert$1,mergeClasses_1=mergeClasses$1,getCounter=(()=>{let e=0;return()=>e++})();function createMakeStyles(e){const h=e["useTheme"];return{makeStyles:function(e){const f="object"!=typeof(e=(null!=e?e:{}).name)?e:Object.keys(e)[0];return function(e){const d="function"==typeof e?e:()=>e,p=getCounter();return function(i,o){var e,t;const a=h(),{css:s,cx:n}=(0,cssAndCx_1.useCssAndCx)(),l=(0,cache_1.useTssEmotionCache)();let c=(0,react_1$1.useMemo)(()=>{const n={};var e="undefined"!=typeof Proxy&&new Proxy({},{get:(e,t)=>("symbol"==typeof t&&(0,assert_1.assert)(!1),n[t]=`${l.key}-${p}${void 0!==f?"-"+f:""}-${t}-ref`)});const r=d(a,i,e||{}),t=(0,Object_fromEntries_1.objectFromEntries)((0,objectKeys_1.objectKeys)(r).map(e=>{var t=r[e];return t.label||(t.label=(void 0!==f?f+"-":"")+e),[e,""+s(t)+((0,typeGuard_1.typeGuard)(e,e in n)?" "+n[e]:"")]}));return(0,objectKeys_1.objectKeys)(n).forEach(e=>{e in t||(t[e]=n[e])}),t},[l,s,n,a,(0,getDependencyArrayRef_1.getDependencyArrayRef)(i)]);const r=null==o?void 0:o.props.classes;c=(0,react_1$1.useMemo)(()=>(0,mergeClasses_1.mergeClasses)(c,r,n),[c,(0,getDependencyArrayRef_1.getDependencyArrayRef)(r),n]);{let r=void 0;try{r=void 0===f||null==(t=null==(e=a.components)?void 0:e[f])?void 0:t.styleOverrides}catch(e){}const u=(0,react_1$1.useMemo)(()=>{if(r){var e={};for(const n in r){var t=r[n];t instanceof Object&&(e[n]=s("function"==typeof t?t(Object.assign({theme:a,ownerState:null==o?void 0:o.ownerState},null==o?void 0:o.props)):t))}return e}},[void 0===r?void 0:JSON.stringify(r),(0,getDependencyArrayRef_1.getDependencyArrayRef)(null==o?void 0:o.props),(0,getDependencyArrayRef_1.getDependencyArrayRef)(null==o?void 0:o.ownerState),s]);c=(0,react_1$1.useMemo)(()=>(0,mergeClasses_1.mergeClasses)(c,u,n),[c,u,n])}return{classes:c,theme:a,css:s,cx:n}}}},useStyles:function(){var e=h(),{css:t,cx:n}=(0,cssAndCx_1.useCssAndCx)();return{theme:e,css:t,cx:n}}}}makeStyles$1.createMakeStyles=createMakeStyles;var withStyles$1={},capitalize$1={};function capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)}Object.defineProperty(capitalize$1,"__esModule",{value:!0}),capitalize$1.capitalize=void 0,capitalize$1.capitalize=capitalize;var __rest$3=commonjsGlobal$1&&commonjsGlobal$1.__rest||function(e,t){var n={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n};Object.defineProperty(withStyles$1,"__esModule",{value:!0}),withStyles$1.createWithStyles=void 0;const jsx_runtime_1$1=jsxRuntime.exports,react_1=react.exports,makeStyles_1=makeStyles$1,capitalize_1=capitalize$1;function createWithStyles(e){e=e.useTheme;const n=(0,makeStyles_1.createMakeStyles)({useTheme:e})["makeStyles"];return{withStyles:function(o,r,e){const a="string"==typeof o?(()=>{const n=o;function e(e){var t=e["children"],e=__rest$3(e,["children"]);return(0,react_1.createElement)(n,e,t)}return Object.defineProperty(e,"name",{value:(0,capitalize_1.capitalize)(n)}),e})():o;var t="string"==typeof(t=a.name)?t:void 0;const s=n(void 0!==(null==e?void 0:e.name)?e:{name:t})("function"==typeof r?(e,t,n)=>incorporateMediaQueries(r(e,t,n)):incorporateMediaQueries(r));return e=(0,react_1.forwardRef)(function(e,t){var n=e["className"],r=__rest$3(e,["className","classes"]),{classes:e,cx:i}=s(e,{props:e});return(0,jsx_runtime_1$1.jsx)(a,Object.assign({ref:t,className:i(e.root,n)},"string"==typeof o?{}:{classes:e},r))}),void 0!==t&&Object.defineProperty(e,"name",{value:t+"WithStyles"}),e}}}function incorporateMediaQueries(t){const i={},o={};return Object.keys(t).forEach(e=>(e.startsWith("@media")?o:i)[e]=t[e]),Object.keys(o).forEach(n=>{const r=o[n];Object.keys(r).forEach(e=>{var t;return i[e]=Object.assign(Object.assign({},null!=(t=i[e])?t:{}),{[n]:r[e]})})}),i}withStyles$1.createWithStyles=createWithStyles;var makeStyles,withStyles,_a,EApplicationConfigValue,EApplicationConfigLevel,GlobalStyles$1={},__createBinding=commonjsGlobal$1&&commonjsGlobal$1.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&("get"in i?t.__esModule:!i.writable&&!i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){e[r=void 0===r?n:r]=t[n]}),__setModuleDefault=commonjsGlobal$1&&commonjsGlobal$1.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=commonjsGlobal$1&&commonjsGlobal$1.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&__createBinding(t,e,n);return __setModuleDefault(t,e),t};Object.defineProperty(GlobalStyles$1,"__esModule",{value:!0}),GlobalStyles$1.GlobalStyles=void 0;const jsx_runtime_1=jsxRuntime.exports,reactEmotion=__importStar(emotionReact_browser_esm);function GlobalStyles(e){e=e.styles;return(0,jsx_runtime_1.jsx)(reactEmotion.Global,{styles:reactEmotion.css(e)})}GlobalStyles$1.GlobalStyles=GlobalStyles,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMakeAndWithStyles=e.TssCacheProvider=e.getTssDefaultEmotionCache=e.GlobalStyles=e.keyframes=e.createWithStyles=e.createMakeStyles=e.useMergedClasses=e.useCssAndCx=void 0;var t=cssAndCx,n=(Object.defineProperty(e,"useCssAndCx",{enumerable:!0,get:function(){return t.useCssAndCx}}),mergeClasses$1);Object.defineProperty(e,"useMergedClasses",{enumerable:!0,get:function(){return n.useMergedClasses}});const r=makeStyles$1,i=(Object.defineProperty(e,"createMakeStyles",{enumerable:!0,get:function(){return r.createMakeStyles}}),withStyles$1);Object.defineProperty(e,"createWithStyles",{enumerable:!0,get:function(){return i.createWithStyles}});var o=emotionReact_browser_esm,a=(Object.defineProperty(e,"keyframes",{enumerable:!0,get:function(){return o.keyframes}}),GlobalStyles$1),s=(Object.defineProperty(e,"GlobalStyles",{enumerable:!0,get:function(){return a.GlobalStyles}}),cache);Object.defineProperty(e,"getTssDefaultEmotionCache",{enumerable:!0,get:function(){return s.getTssDefaultEmotionCache}}),Object.defineProperty(e,"TssCacheProvider",{enumerable:!0,get:function(){return s.TssCacheProvider}}),e.createMakeAndWithStyles=function(e){return Object.assign(Object.assign({},(0,r.createMakeStyles)(e)),(0,i.createWithStyles)(e))}}(tssReact),Object.defineProperty(mui,"__esModule",{value:!0}),mui.useStyles=withStyles=mui.withStyles=makeStyles=mui.makeStyles=void 0;const styles_1=styles$5,index_1=tssReact;function __awaiter$4(e,a,s,l){return new(s=s||Promise)(function(n,t){function r(e){try{o(l.next(e))}catch(e){t(e)}}function i(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((l=l.apply(e,a||[])).next())})}_a=(0,index_1.createMakeAndWithStyles)({useTheme:styles_1.useTheme}),makeStyles=mui.makeStyles=_a.makeStyles,withStyles=mui.withStyles=_a.withStyles,mui.useStyles=_a.useStyles;const SLICE_NAME="userApplicationSettings",formatLabel=(!function(e){e.String="String",e.Boolean="Boolean",e.Date="Date",e.Integer="Integer",e.JSON="JSON",e.Float="Float"}(EApplicationConfigValue=EApplicationConfigValue||{}),!function(e){e.Organization="Organization",e.User="User"}(EApplicationConfigLevel=EApplicationConfigLevel||{}),(e="")=>lodash.exports.startCase(e)),getFieldErrorMessage=e=>{var{value:e,required:t,configType:n}=e;return t&&lodash.exports.isEmpty(e)?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-admin-center-user-application-settings-empty-error-message",defaultMessage:"Please enter value",description:"Empty error message"}):n===EApplicationConfigValue.Integer&&Number(e)-Math.floor(Number(e))!=0?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-admin-center-user-application-settings-integer-vaue-error-message",defaultMessage:"The value has to to be Integer'",description:"Integer value error message"}):""},useStyles$2$5=makeStyles()(e=>({outerContainer:{margin:"0 30px"},formControlWrapper:{marginTop:15,width:"100%"},inputLabel:{fontFamily:"Nunito",fontWeight:600,display:"block",fontSize:"16px",lineHeight:"22px",color:"#2A323C",marginBottom:4},inputLabelError:{color:e.palette.error.main},description:{fontWeight:400,marginBottom:9}})),useStyles$1$5=makeStyles()(e=>({field:{width:"100%"}})),TxtField=({id:e,type:t,required:n,value:r,onChange:i,error:o=!1,multiline:a=!1})=>{var s=useStyles$1$5()["classes"];return jsxRuntime.exports.jsx(TextField$1,{id:e,"data-testid":e,InputLabelProps:{shrink:!0},autoComplete:"off",required:n,value:r,type:t,rows:4,className:s.field,onChange:i,size:"small",multiline:a,error:o})},ComponentLoader=({fields:e,onChange:l,toggleSaveButton:c})=>{const u=useStyles$2$5()["classes"];return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:null==(e=e)?void 0:e.map((n,e)=>{var t,r=formatLabel(""+(null==n?void 0:n.configKey)||""),i=`configuration-input--${null==n?void 0:n.applicationId}-idx-`+e,o=!!getFieldErrorMessage(n),a=e=>{var t;(null==n?void 0:n.configType)===EApplicationConfigValue.Boolean?(l({fieldName:null==n?void 0:n.configKey,fieldValue:String(e.target.checked)}),c(!1)):(l({fieldName:null==n?void 0:n.configKey,fieldValue:e.target.value}),t=!0,t=!(null==n||!n.required||e.target.value)||""!==getFieldErrorMessage(n),c(t))};let s;switch(null==n?void 0:n.configType){case EApplicationConfigValue.String:s=jsxRuntime.exports.jsx(TxtField,{id:i,label:r,required:null==n?void 0:n.required,type:"text",value:(null==n?void 0:n.value)||"",onChange:a,error:o});break;case EApplicationConfigValue.Boolean:s=jsxRuntime.exports.jsx(Switch$1,{id:i,required:null==n?void 0:n.required,onChange:a,checked:"true"===(null==(t=null==n?void 0:n.value)?void 0:t.toLowerCase())});break;case EApplicationConfigValue.Date:s=jsxRuntime.exports.jsx(TxtField,{id:i,label:r,required:null==n?void 0:n.required,type:"date",value:(null==(t=null==n?void 0:n.value)?void 0:t.substring(0,10))||"",onChange:a,error:o});break;case EApplicationConfigValue.Integer:s=jsxRuntime.exports.jsx(TxtField,{id:i,label:r,required:null==n?void 0:n.required,value:(null==n?void 0:n.value)||"",type:"number",onChange:a,error:o});break;case EApplicationConfigValue.JSON:s=jsxRuntime.exports.jsx(TxtField,{id:i,label:r,required:null==n?void 0:n.required,value:(null==n?void 0:n.value)||"",multiline:!0,type:"text",onChange:a,error:o});break;case EApplicationConfigValue.Float:s=jsxRuntime.exports.jsx(TxtField,{id:i,label:r,required:null==n?void 0:n.required,value:(null==n?void 0:n.value)||"",type:"number",onChange:a,error:o});break;default:return null}return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("div",Object.assign({className:u.outerContainer},{children:jsxRuntime.exports.jsxs(FormControl$1,Object.assign({error:o,size:"small",className:u.formControlWrapper},{children:[jsxRuntime.exports.jsxs("label",Object.assign({htmlFor:i,className:u.inputLabel+" "+(o&&u.inputLabelError)},{children:[r,null!=n&&n.required?"(Required)":""]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:u.description,"data-testid":"os-admin-center-user-application-settings-config-description"},{children:null==n?void 0:n.description})),s,o&&jsxRuntime.exports.jsx(FormHelperText$2,{children:getFieldErrorMessage(n)})]}),`${null==n?void 0:n.applicationId}-idx-`+e)})),jsxRuntime.exports.jsx(Divider$1,{sx:{opacity:.9,mt:4}})]})})})},useStyles$j=makeStyles()(e=>({settingsList:{display:"flex",flexDirection:"column",overflow:"scroll",height:"calc(100% - 115px)"},subtitle:{fontWeight:400,margin:"0 30px 15px"},footerBtnContainer:{margin:"0 30px 30px 30px",position:"absolute",right:0,bottom:0,"& button":{flex:1,height:"36px",marginLeft:"20px"}}})),formattedMessages=e=>({cancelButton:e.formatMessage({id:"os-admin-center-user-application-settings-cancel-button-text",defaultMessage:[{type:0,value:"Cancel"}]}),saveSettingsButton:e.formatMessage({id:"os-admin-center-user-application-settings-save-settings-button-text",defaultMessage:[{type:0,value:"Save Settings"}]})}),namespace$1$2="userApplicationSettings",initialState$1$2={applicationConfig:[],status:"idle"},userApplicationSettingsSlice=createSlice({name:SLICE_NAME+"/"+namespace$1$2,initialState:initialState$1$2,reducers:{fetchApplicationConfigStart(e,t){e.status="loading"},fetchApplicationConfigSuccess(e,t){e.status="success",e.applicationConfig=t.payload},fetchApplicationConfigFailure(e){e.status="failure"},updateApplicationConfigStart(e,t){e.status="loading"},updateApplicationConfigSuccess(e,n){e.status="success";var t=e.applicationConfig.map(t=>n.payload.some(({configKey:e})=>e===t.configKey)?Object.assign(Object.assign({},t),n.payload.find(({configKey:e})=>e===t.configKey)):t);e.applicationConfig=t},updateApplicationConfigFailure(e){e.status="failure"}}}),actions$1=userApplicationSettingsSlice.actions;var applicationConfig_state=userApplicationSettingsSlice.reducer;const namespace$7=SLICE_NAME,initialState$8={[namespace$1$2]:initialState$1$2},actions$2={[namespace$1$2]:actions$1},rootReducer=combineReducers({[namespace$1$2]:applicationConfig_state}),selectApplicationConfig=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1$2])?void 0:e.applicationConfig};function fetchApplicationConfig(n,{appId:r}){return __awaiter$4(this,void 0,void 0,function*(){var e="fetchApplicationConfig",t="applicationConfig";return(yield baseGraphQLApiWithError(Object.assign({query:`
|
|
1151
1151
|
query ${e} {
|
|
1152
1152
|
${t} (
|
|
1153
1153
|
appId: "${r}",
|
|
@@ -1272,7 +1272,7 @@ createScheduledJob(input:{
|
|
|
1272
1272
|
unreadCount
|
|
1273
1273
|
}
|
|
1274
1274
|
}
|
|
1275
|
-
`,variables:e,graphEndpoint:n,token:r})}catch(e){return{success:!1}}});function*refetchNotificationSetting(){yield put(getNotification(0,30))}function*getNotificationListByMailBoxSaga(e){const{status:t,mailBoxIds:n,mailbox:r}=yield select(mailBoxSelector);var{limit:e,offset:i,callback:o}=e.payload,a=yield select(graphEndpointSelector),s=yield select(sessionTokenSelector),l="success"===t||"failure"===t;if(0!==Object.keys(r).length||l){yield put(getNotificationStart(i,e));l=yield call$7(handleNotificationListByMailBox,a,s,n,i,e);if(null!=o&&o(),0<(null==(a=null==l?void 0:l.errors)?void 0:a.length))yield put(getNotificationListByMailBoxFail());else{let n=0;a=null==(o=null==(s=null==l?void 0:l.data)?void 0:s.notificationMailboxes)?void 0:o.map(t=>{var e;return 0<(null==(e=null==t?void 0:t.notifications)?void 0:e.count)?(e=null==(e=null==(e=null==t?void 0:t.notifications)?void 0:e.records)?void 0:e.map(e=>Object.assign(Object.assign({},e),{mailboxId:t.id})),n++,e):[]}),l=((null==a?void 0:a.flat())||[]).map(t=>{var e,n=r.find(e=>e.id===t.mailboxId);return Object.assign(Object.assign({},t),{appId:(null==(e=null==n?void 0:n.application)?void 0:e.applicationId)||"",appName:(null==(e=null==n?void 0:n.application)?void 0:e.name)||"",eventNames:(null==(e=null==n?void 0:n.eventFilter)?void 0:e.eventNames)||[],icon:(null==(e=null==n?void 0:n.application)?void 0:e.icon)||"",title:t.title||""})});yield put(getNotificationListByMailBoxSuccess({offset:i,limit:e,availableMailBoxes:n,data:l}))}}else yield take(subscriberSuccess({}).type)}function*listenToPushNotificationSaga(e){var t=(yield select(mailBoxSelector))["mailbox"];const n=e["payload"];e=t.find(e=>e.id===n.mailboxId);yield put(updateNotificationList(Object.assign(Object.assign({},n),{appId:(null==(t=null==e?void 0:e.application)?void 0:t.applicationId)||"",appName:(null==(t=null==e?void 0:e.application)?void 0:t.name)||"",icon:(null==(t=null==e?void 0:e.application)?void 0:t.icon)||""})))}function*updateNotificationReadSaga(e){var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector);try{var r=yield call$7(handleUpdateNotificationRead,t,n,e.payload);null!=r&&r.error?yield put(updateNotificationReadFail()):yield put(updateNotificationReadSuccess(Object.assign({},r)))}catch(e){yield put(updateNotificationReadFail())}}function*updateMarkAllReadNotificationSaga(){var e=(yield select(mailBoxSelector))["mailBoxIds"],t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector);if(0<(null==e?void 0:e.length))try{(yield call$7(handleMarkAllReadNotification,e,t,n)).error?yield put(markAllReadNotificationFail()):yield put(markAllReadNotificationSuccess())}catch(e){yield put(markAllReadNotificationFail())}}function*getNotificationActionSaga(e){var t,n,{eventType:r,appId:i,eventName:o}=yield select(notificationDetailSelector(e.payload)),a=yield select(graphEndpointSelector),s=yield select(sessionTokenSelector);try{var l,c=yield call$7(handleGetNotificationAction,o,r,i,a,s);c.error?yield put(getNotificationActionError()):(l=(null==(n=null==(t=null==c?void 0:c.data)?void 0:t.notificationActions)?void 0:n.records)||[],yield put(getNotificationActionSuccess(e.payload,l)))}catch(e){yield put(getNotificationActionError())}}function*notificationSaga(){yield all([takeEvery$1(getNotification.type,getNotificationListByMailBoxSaga),takeLatest$1(updateUtilitySetting.type,refetchNotificationSetting),takeEvery$1(getNotificationListByMailBoxRequest.type,getNotificationListByMailBoxSaga),takeEvery$1("mailbox/PUSH_NOTIFICATION",listenToPushNotificationSaga),takeEvery$1(updateNotificationReadRequest.type,updateNotificationReadSaga),takeEvery$1(GET_NOTIFICATION_ACTION_REQUEST,getNotificationActionSaga),takeLatest$1(markAllReadNotificationRequest.type,updateMarkAllReadNotificationSaga)])}function getNotificationModule(){return{id:"os-notification-panel",reducerMap:{[nameSpace$3]:notificationReducer},sagas:[notificationSaga],initialActions:[],retained:!0}}const useStyles$b$1=makeStyles()((e,{msg:t})=>({root:{width:"100%",height:"100%"},noData:{paddingTop:66,display:"flex",justifyContent:"center"},iconNoData:{width:235,height:235,display:"flex",justifyContent:"center",borderRadius:"50%",padding:"20px",border:"20px solid #FFFF"},noDataDescription:{display:"flex",justifyContent:"center",marginTop:66},noDataDescriptionText:{fontSize:"18px",lineHeight:"23px",textTransform:"uppercase",color:e.palette.secondary.main,textAlign:"center",width:t?"250px":""}})),NotificationContent=({msg:e})=>{var t=useStyles$b$1({msg:e})["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:t.root,"data-testid":"notification-content"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:t.noData},{children:jsxRuntime.exports.jsx("div",Object.assign({className:t.iconNoData},{children:jsxRuntime.exports.jsx("img",{src:img,draggable:"false",alt:"noNotification"})}))})),jsxRuntime.exports.jsx("div",Object.assign({className:t.noDataDescription},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1","data-test":"no-notification",className:t.noDataDescriptionText},{children:e?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.select-product",defaultMessage:"No notifications for the selected product",description:"Notification panel: no notification message for select product"}):jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.pBrbyj",defaultMessage:"You don’t have any notifications",description:"Notification panel: no notification message"})}))}))]}))},useStyles$a$1=makeStyles()(e=>({cardContainer:{width:"100%","&:hover":{backgroundColor:"#EEF3F9"}},rootCard:{padding:e.spacing(4,6),display:"flex",cursor:"pointer"},unreadCard:{padding:e.spacing(4,6),display:"flex",cursor:"pointer",paddingLeft:e.spacing(2)},iconCard:{marginTop:e.spacing(-.4)},leftContent:{width:"345px",padding:e.spacing(0,6,0,3)},titleCard:{display:"flex"},appsCard:{fontSize:"14px",fontWeight:600},timestampCard:{fontSize:"12px",paddingLeft:e.spacing(3),color:e.palette.text.secondary},contentCard:{lineHeight:"150%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:e.palette.text.secondary},dividerCard:{margin:e.spacing(0,6),height:"0.5px"},notificationIcon:{width:24,height:24},unread:{width:"auto",marginRight:e.spacing(2.4),fontSize:"unset"},unreadIcon:{width:8,height:8,color:e.palette.primary.main},appName:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"calc(100% - 85px)"}})),NotificationCard=react.exports.forwardRef(({data:e,onViewDetail:t},n)=>{var r=useStyles$a$1()["classes"];const i=useDispatch(),[o,a]=react.exports.useState(!1);const{createdDateTime:s,icon:l,title:c,appName:u,body:d,id:p,flags:f}=e;return jsxRuntime.exports.jsxs("div",Object.assign({ref:n,className:r.cardContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({onClick:t,className:null!=f&&f.includes(NotificationFlag.unread)?r.unreadCard:r.rootCard},{children:[(null==f?void 0:f.includes(NotificationFlag.unread))&&jsxRuntime.exports.jsx(Icon$1,{"data-test":"notification-unread-icon","data-testid":"notification-unread-icon",className:r.unread,children:jsxRuntime.exports.jsx(default_1$4,{className:r.unreadIcon}),onClick:function(e){e.stopPropagation(),i(updateNotificationReadRequest(p))}}),jsxRuntime.exports.jsx("div",Object.assign({className:r.iconCard},{children:l&&!o?jsxRuntime.exports.jsx("img",{src:l,className:r.notificationIcon,draggable:"false",alt:"notification-card-icon",onError:function(){a(!0)}}):jsxRuntime.exports.jsx(Notifications,{})})),jsxRuntime.exports.jsxs("div",Object.assign({className:r.leftContent},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:r.titleCard},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.appName},{children:null!=f&&f.includes(NotificationFlag.unread)?jsxRuntime.exports.jsx("strong",{children:u}):u})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.timestampCard},{children:jsxRuntime.exports.jsx(FormattedRelativeTime$1,{value:getRelativeValue(s),unit:"minute",updateIntervalInSeconds:60,children:e=>e.includes("seconds")?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.mvPoLJ",defaultMessage:"Just now",description:"the time label of notification that received on 1 minute"}):react.exports.createElement("span",{},e)})}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.contentCard},{children:convertHTMLEntities(c||d)}))})]}))]})),jsxRuntime.exports.jsx(Divider$1,{className:r.dividerCard})]}))}),useStyles$9$1=makeStyles()(e=>({header:{opacity:.9,display:"flex",justifyContent:"space-between",padding:e.spacing(3.5,6,4,6),position:"sticky",width:"fit-content",fontSize:"14px",fontWeight:400,top:0},scrollContent:{overflow:"hidden"},infinityLoading:{display:"flex",justifyContent:"center",padding:e.spacing(4)}}));function NotificationList({title:e,data:n,loading:t,handleGetNotification:r,onOpenNotificationDetail:i}){var o=useStyles$9$1()["classes"];const a=react.exports.useRef(),s=react.exports.useCallback(e=>{t||(a.current&&a.current.disconnect(),a.current=new IntersectionObserver(e=>{e[0].isIntersecting&&r()}),e&&a.current.observe(e))},[r,t]);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("div",Object.assign({className:o.header},{children:e.toUpperCase()})),jsxRuntime.exports.jsxs("div",Object.assign({className:o.scrollContent},{children:[0<(null==n?void 0:n.length)?n.map((e,t)=>n.length===t+1?jsxRuntime.exports.jsx(NotificationCard,{ref:s,onViewDetail:()=>null==i?void 0:i(e),data:e},t):jsxRuntime.exports.jsx(NotificationCard,{onViewDetail:()=>null==i?void 0:i(e),data:e},t)):jsxRuntime.exports.jsx(NotificationContent,{msg:!0}),t&&jsxRuntime.exports.jsx("div",Object.assign({className:o.infinityLoading},{children:jsxRuntime.exports.jsx(CircularProgress$1,{size:30})}))]}))]})}const useStyles$8$1=makeStyles()(e=>({loadingContainer:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},filterContainer:{position:"absolute",top:e.spacing(12.4),right:0,paddingTop:e.spacing(3),paddingRight:e.spacing(6),paddingBottom:e.spacing(2),width:"100%",display:"flex",justifyContent:"flex-end",backgroundColor:e.palette.background.default},markAllReadButton:{cursor:"pointer",marginRight:e.spacing(4),backgroundColor:e.palette.background.default,textTransform:"capitalize"}})),NotificationPanel=()=>{const r=useDispatch();var e=useStyles$8$1()["classes"],t=useSelector(applicationFilterSelector)||[];const[n,i]=react.exports.useState(!1),o=useSelector(mailboxIdSelector);var a=useSelector(notificationWithFilterSelector);const{filter:s,status:l,notifications:c,availableMailBoxes:u,offset:d,limit:p}=useSelector(notificationSelector),f=e=>Math.max(Math.ceil(50/e),5);react.exports.useEffect(()=>{var e=(null===o||void 0===o?void 0:o.length)||0;0<e&&0===p&&(e=f(e),r(getNotification(0,e)))},[r,p,o]);var h=react.exports.useCallback(()=>{var e;0<u&&(i(!0),e=f(u),r(getNotification(d+p,e,()=>{i(!1)})))},[u,r,p,d]);return jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getNotificationModule()]},{children:0===a.length&&"success"!==l&&"failure"!==l&&0<o.length?jsxRuntime.exports.jsx("div",Object.assign({className:e.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})):0<(null==c?void 0:c.length)?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:e.filterContainer,id:"notification-list-header"},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:function(){r(markAllReadNotificationRequest())},className:e.markAllReadButton,"data-test":"notification-mark-all-read-button","data-testid":"notification-mark-all-read-button"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"caption",color:"primary"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.PtPIns",defaultMessage:"Mark All Read",description:"label of Mark All Read button"})}))})),jsxRuntime.exports.jsx(Filter,{data:[...filters$3,...t],filter:s,onFilter:function(e){e=e.target.value,r(updateFilterValue(e))}})]})),jsxRuntime.exports.jsx(NotificationList,{title:"All time",onOpenNotificationDetail:function(e){var t="DETAIL_PANEL_ID",n={name:"NOTIFICATION_DETAIL",config:{mode:"actionable",id:e.id,data:Object.assign({},e),actionIconButtons:null!=(n=e.actions)?n:[],onClose:()=>{console.log("onClose")}}};r(unmountPanel$1(t)),r(mountPanel$1({panelId:t,microFrontend:n,panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:413,width:420,header:{title:"Notification detail"},dimmed:0,parentPanelId:"NOTIFICATION_PANEL_ID"}})),r(updateNotificationReadRequest(e.id))},data:a,loading:n,handleGetNotification:h})]}):jsxRuntime.exports.jsx(NotificationContent,{})}))})};function CustomWorkFlow(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center","data-testid":"custom-workflow-box"},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.1+8+OX",defaultMessage:"Custom Workflows",description:"custom-workflows"})}),jsxRuntime.exports.jsx(Button$1,{variant:"outlined",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.gAFAOA",defaultMessage:"Create New",description:"creat-new-btn"}),color:"primary"})]})),jsxRuntime.exports.jsx(Typography$1,{style:{fontSize:14,marginTop:20},children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.9+Qhjr",defaultMessage:"You don’t have any custom workflows yet. Get started by clicking the Create New button above!",description:"text"})})]})}const useStyles$7$1=makeStyles()(e=>({dividerSmallMargin:{marginTop:e.spacing(3.6),marginBottom:e.spacing(4)},utilityItem:{padding:0,cursor:"pointer"},utilityItemHover:{padding:e.spacing(2,0),"&:hover":{backgroundColor:e.palette.background.paper}},utilityDetail:{fontSize:12}}));function NotificationSettingItem(e){const{imgSrc:t,primaryText:n,secondaryText:r,bigSize:i,onOpenUtility:o,onOpenApplication:a,hideDivider:s,applicationId:l,applicationTitle:c,utilityId:u="",utilityTitle:d="Finder",disabled:p,isHover:f}=e;e=useStyles$7$1().classes;return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs(ListItem$1,Object.assign({className:classNames(e.utilityItem,f?e.utilityItemHover:""),onClick:function(){null!==o&&void 0!==o&&o(u,d),null!==a&&void 0!==a&&a(l,c)},disabled:p,"data-testid":"notification-setting-item"},{children:[jsxRuntime.exports.jsx(ListItemAvatar$1,{children:jsxRuntime.exports.jsx(Avatar$1,{style:{width:i?60:40,height:i?60:40,borderRadius:"50%",marginRight:19},src:t})}),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(Typography$1,{variant:i?"h3":"body2",children:n}),secondary:jsxRuntime.exports.jsx(Typography$1,{variant:i?"body2":"caption",children:r})})]})),!s&&jsxRuntime.exports.jsx(Divider$1,{className:f?"":e.dividerSmallMargin})]})}const useStyles$6$1=makeStyles()(e=>({notificationTypeItemBox:{background:e.palette.background.paper,borderRadius:e.shape.borderRadius,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",padding:e.spacing(4,1,1),height:"100%",fontSize:10,lineHeight:"16px",justifyContent:"center"},disableType:{color:e.palette.grey[500]}}));function NotificationTypeItem(e){const{notificationTypeIcon:t,notificationTypeName:n,defaultSelected:r,onSelectNotificationType:i,notificationTypeId:o,isDisabled:a}=e,[s,l]=react.exports.useState(r);e=useStyles$6$1().classes;return jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(e.notificationTypeItemBox,a?e.disableType:""),"data-testid":"notification-type-item"},{children:[jsxRuntime.exports.jsx("div",{children:"string"==typeof t?jsxRuntime.exports.jsx("img",{src:t,alt:"icon",draggable:"false"}):t}),jsxRuntime.exports.jsx("div",{children:n}),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Checkbox$1,{icon:jsxRuntime.exports.jsx("img",{src:img$1m,alt:"uncheck icon",draggable:"false"}),checkedIcon:jsxRuntime.exports.jsx("img",{src:img$1l,alt:"checked icon",draggable:"false"}),checked:s,onChange:function(){l(e=>(null!==i&&void 0!==i&&i(o,!e),!e))},disabled:!!a})})]}))}const useStyles$5$1=makeStyles()(e=>({notificationTypeBox:{paddingBottom:e.spacing(0)},notificationTypeHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:16,lineHeight:"22px",fontWeight:600,marginBottom:e.spacing(2)},notificationList:{display:"inline-grid",gridColumnGap:e.spacing(2.8),gridTemplateColumns:"1fr 1fr 1fr",width:"100%",marginBottom:e.spacing(4.4)},divider:{marginTop:e.spacing(4),marginBottom:e.spacing(4.4)},dividerWithoutDescription:{marginBottom:e.spacing(3)}})),defaultNotificationTypeList=[{id:INotificationType.EMAIL,notificationTypeIcon:jsxRuntime.exports.jsx(Email,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.rTFvFj",defaultMessage:"Email",description:"allow notification types: email"}),isSelected:!0},{id:INotificationType.NOTIFICATION_CENTER,notificationTypeIcon:jsxRuntime.exports.jsx(HelpCenter$1,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.SmyvFq",defaultMessage:"Notification Center",description:"allow notification types: Notification Center"}),isSelected:!0},{id:INotificationType.BANNER,notificationTypeIcon:jsxRuntime.exports.jsx(Banner,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.r7Whww",defaultMessage:"Banners",description:"allow notification types: Banners"}),isSelected:!0}];function NotificationType(e){const{notificationTypeTitle:t,children:n,description:r,allowTypes:i=[],allowNotification:o,onChangeAllowType:a,hideDivider:s,onChangeNotificationType:l,disabledTypes:c=[]}=e,[u,d]=react.exports.useState(!!o),[p,f]=react.exports.useState(defaultNotificationTypeList);var e=useStyles$5$1()["classes"],h=[...i];const[m,g]=react.exports.useState(i);var v=t||"Allow Notifications";return react.exports.useEffect(()=>{var e=defaultNotificationTypeList.map(t=>{var e=-1!==m.findIndex(e=>e===t.id),n=-1!==c.findIndex(e=>e===t.id);return Object.assign(Object.assign({},t),{isSelected:e,isDisabled:n})});f(e)},[h.join(", "),m]),react.exports.useEffect(()=>{null!==a&&void 0!==a&&a(u),u?0===m.length&&u&&g([INotificationType.EMAIL]):g([])},[u]),jsxRuntime.exports.jsxs("div",Object.assign({className:e.notificationTypeBox},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:e.notificationTypeHeader},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.8Z0yyD",defaultMessage:"{title}",description:"notification setting: allow notification types",values:{title:v}})}),jsxRuntime.exports.jsx(Switch$1,{checked:u,onChange:function(){d(e=>!e)},color:"primary",name:"notificationTypeChecked","data-testid":"notification-type-switch"})]})),n,jsxRuntime.exports.jsx("div",Object.assign({className:e.notificationList},{children:p.map(t=>{var e=-1!==c.findIndex(e=>e===t.id)||!u;return jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(NotificationTypeItem,{notificationTypeIcon:t.notificationTypeIcon,notificationTypeName:t.notificationTypeName,defaultSelected:t.isSelected,onSelectNotificationType:l,notificationTypeId:t.id,isDisabled:e})},t.id+"-"+t.isSelected)})})),r,!s&&jsxRuntime.exports.jsx(Divider$1,{className:r?e.divider:e.dividerWithoutDescription})]}))}const useStyles$4$1=makeStyles()(e=>({tableCell:{padding:0,"& > span":{paddingLeft:0,paddingRight:0}},itemCell:{padding:0,"& > span":{padding:e.spacing(0,2)}},eventNameContainer:{display:"flex",alignItems:"center"},tableRowCheckbox:{marginRight:e.spacing(2)},rowCheckbox:{paddingLeft:0},customLineHeight:{lineHeight:e.spacing(8)},disabledCheckBox:{"& svg":{color:"green"}}}));function NotificationUtilityActionItem(e){const{events:t,disabled:n}=e,r=useStyles$4$1()["classes"],i=[{type:INotificationType.EMAIL,iconUrl:img$1p},{type:INotificationType.NOTIFICATION_CENTER,iconUrl:img$1o},{type:INotificationType.BANNER,iconUrl:img$1n}];return jsxRuntime.exports.jsx(TableContainer$1,{children:jsxRuntime.exports.jsxs(Table$1,Object.assign({"aria-label":"customized table"},{children:[jsxRuntime.exports.jsx(TableHead$1,{children:jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsx(TableCell$1,Object.assign({className:r.tableCell},{children:jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.KVIpaj",defaultMessage:"Events",description:"allow-notification"})})})),i.map(e=>jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:r.itemCell},{children:jsxRuntime.exports.jsx("img",{src:e.iconUrl,alt:e.type})}),e.type))]})}),jsxRuntime.exports.jsx(TableBody$1,{children:null==t?void 0:t.map(t=>jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsxs(TableCell$1,Object.assign({className:classNames(r.eventNameContainer,r.tableCell)},{children:[jsxRuntime.exports.jsx(Checkbox$1,{id:t.id,disabled:n,className:r.tableRowCheckbox}),jsxRuntime.exports.jsx(ListItemText$1,{children:jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.VNVmyk",defaultMessage:"{defaultMessage}",description:"Finder notifications: {defaultMessage}",values:{defaultMessage:t.title,id:t.id}})})})]})),i.map(e=>jsxRuntime.exports.jsx(TableCell$1,Object.assign({className:r.itemCell},{children:jsxRuntime.exports.jsx(Checkbox$1,{id:"checkbox-"+t.id,icon:jsxRuntime.exports.jsx(default_1$3,{}),checkedIcon:jsxRuntime.exports.jsx(CheckCircle,{})})}),e.type+"-type"))]},t.id))})]}))})}const useStyles$3$2=makeStyles()(e=>({finderNotification:{padding:e.spacing(4,6),maxHeight:"100%",overflow:"auto"},buttonBox:{display:"flex",justifyContent:"flex-end",marginTop:e.spacing(8)},buttonLeft:{marginRight:e.spacing(4)},settingItem:{marginBottom:e.spacing(6)},sharedItem:{padding:0}}));function NotificationUtilityPanel(e){const t=e["dataId"];e=useStyles$3$2().classes;const n=useSelector(notificationSelector).settings;var r=n.utility,r=null==r?void 0:r.find(e=>e.id===t);const[i,o]=react.exports.useState(r||{}),a=[];return[INotificationType.EMAIL,INotificationType.NOTIFICATION_CENTER,INotificationType.BANNER].forEach(t=>{-1===n.allowType.findIndex(e=>e===t)&&a.push(t)}),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:e.finderNotification},{children:[jsxRuntime.exports.jsx(NotificationType,{allowTypes:null==i?void 0:i.allowType,allowNotification:null==i?void 0:i.allow,onChangeAllowType:function(r){o(e=>{var t=r?[...e.allowType]:[],n=r?[...e.action]:[...e.action].map(e=>Object.assign(Object.assign({},e),{allow:!1}));return Object.assign(Object.assign({},e),{allow:r,allowType:t,action:n})})},onChangeNotificationType:function(r,i){o(e=>{var t=[...e.allowType],n=t.indexOf(r);return-1===n||i?t.push(r):t.splice(n,1),Object.assign(Object.assign({},e),{allowType:t})})},disabledTypes:a,children:jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:(null==i?void 0:i.iconUrl)||"",primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.ubNxKs",defaultMessage:"{utilityTitle}",description:"title of notification utility: {utilityTitle}",values:{id:null==i?void 0:i.id,utilityTitle:null==i?void 0:i.title}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.XkH621",defaultMessage:"Chose which events you’d like to be notified about.",description:"content of notification utility description"}),bigSize:!0}),description:jsxRuntime.exports.jsx(Typography$1,{variant:"caption",children:"Banner previews are being set at the parent level"})}),jsxRuntime.exports.jsx(NotificationUtilityActionItem,{events:null==i?void 0:i.action,onSelectAction:function(r){o(e=>{var t=[...e.action],n=t.findIndex(e=>e.id===r.id);return t[n]=r,Object.assign(Object.assign({},e),{action:t})})},disabled:!i.allow}),jsxRuntime.exports.jsx(Divider$1,{style:{marginBottom:20,marginTop:15}}),jsxRuntime.exports.jsx(CustomWorkFlow,{})]}))})}const useStyles$2$3=makeStyles()(e=>({notificationSetting:{padding:e.spacing(3,6,4.4),overflowY:"scroll",height:"100%"},appAllowTitle:{paddingTop:e.spacing(2.4)},dividerBigMargin:{marginTop:e.spacing(2.4),marginBottom:e.spacing(3)},notificationSettingItem:{padding:0},bannerStyleLabel:{fontWeight:"normal"}}));function NotificationSetting(e){var t=useStyles$2$3()["classes"];const i=useDispatch(),[n,r]=react.exports.useState(!0),[o,a]=react.exports.useState(!0);var s=useSelector(notificationSettingSelector);const[l,c]=react.exports.useState(s.bannerStyle);var u=useSelector(notificationUtilitiesSelector);const d=useSelector(notificationApplicationsSelector),[p,f]=react.exports.useState(null==s?void 0:s.allow),[h,m]=react.exports.useState(s);var s=-1!==(null==(s=null===h||void 0===h?void 0:h.allowType)?void 0:s.findIndex(e=>e===INotificationType.BANNER));const[g,v]=react.exports.useState(s);function y(e,t){var n={name:"NOTIFICATION_UTILITY",config:{mode:"actionable",onClose:()=>{console.log("onClose")}}},r={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:472,width:413,zIndex:1002,header:{divider:!0,title:"finder notifications"}};i(mountPanel$1({panelId:e||"",microFrontend:n,panelConfig:r}))}function x(e,t){var n={name:"NOTIFICATION_APPLICATION",config:{mode:"actionable",onClose:()=>{console.log("onClose")}}},r={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:472,width:413,zIndex:1002,header:{divider:!0,title:"app notifications"}};i(mountPanel$1({panelId:e||"",microFrontend:n,panelConfig:r}))}return react.exports.useEffect(()=>{i(updateNotificationSetting(h))},[h,i]),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:t.notificationSetting},{children:[jsxRuntime.exports.jsx(NotificationType,{allowTypes:null===h||void 0===h?void 0:h.allowType,allowNotification:null===h||void 0===h?void 0:h.allow,onChangeAllowType:function(n){f(n),n||(r(n),a(n)),m(e=>{var t=n?[...e.allowType]:[];return Object.assign(Object.assign({},e),{allow:n,allowType:t})})},hideDivider:g,onChangeNotificationType:function(r,i){r===INotificationType.BANNER&&v(i),m(e=>{var t=[...e.allowType],n=t.indexOf(r);return-1===n||i?t.push(r):t.splice(n,1),Object.assign(Object.assign({},e),{allowType:t})})}}),p&&g&&jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:"Banner Style"}),jsxRuntime.exports.jsx(FormControl$1,Object.assign({component:"fieldset"},{children:jsxRuntime.exports.jsxs(RadioGroup$1,Object.assign({"aria-label":"bannerStyle",name:"bannerStyle",value:l,onChange:e=>{c(e.target.value),i(updateBannerStyle(e.target.value))},row:!0},{children:[jsxRuntime.exports.jsx(FormControlLabel$1,{value:"temporary",control:jsxRuntime.exports.jsx(Radio$2,{}),label:jsxRuntime.exports.jsx("span",{children:jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:"Temporary"})})}),jsxRuntime.exports.jsx(FormControlLabel$1,{value:"persistent",control:jsxRuntime.exports.jsx(Radio$2,{}),label:jsxRuntime.exports.jsx("span",{children:jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:"Persistent"})})})]}))})),jsxRuntime.exports.jsx(Divider$1,{className:t.dividerBigMargin})]}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center"},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.qJ0Sxo",defaultMessage:"Allow Utility Notifications",description:"allow-utility-notification"})}),jsxRuntime.exports.jsx(Switch$1,{checked:n,onChange:e=>{e=e.target.checked;r(e)},color:"primary",name:"enableUtilityNotification",disabled:!p})]})),jsxRuntime.exports.jsx(List$2,Object.assign({className:t.notificationSettingItem},{children:null==u?void 0:u.map(e=>jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:e.iconUrl,isHover:!0,primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.tadsU0",defaultMessage:"{defaultMessage}",description:"title of notification utility: {defaultMessage}",values:{id:e.id,defaultMessage:e.title}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.AgAM0k",defaultMessage:"{defaultMessage}",description:"allowed types of notification utility: {defaultMessage}",values:{id:e.id,defaultMessage:e.allowType.join(", ")}}),onOpenUtility:y,utilityId:e.id,utilityTitle:e.title,disabled:!n},e.id))}))]}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center",className:t.appAllowTitle},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.swIpqY",defaultMessage:"Allow Application Notifications",description:"allow-application-notification"})}),jsxRuntime.exports.jsx(Switch$1,{checked:o,onChange:e=>{e=e.target.checked;a(e)},color:"primary",name:"checkedB",disabled:!p})]})),jsxRuntime.exports.jsx(List$2,Object.assign({className:t.notificationSettingItem},{children:null==(s=null===d||void 0===d?void 0:d.allIds)?void 0:s.map(e=>jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:null===d||void 0===d?void 0:d.byId[e].iconUrl,isHover:!0,primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.JvsYLn",defaultMessage:"{defaultMessage}",description:"title of notification application: {defaultMessage}",values:{idMessage:e,defaultMessage:null===d||void 0===d?void 0:d.byId[e].name}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.AgAM0k",defaultMessage:"{defaultMessage}",description:"allowed types of notification utility: {defaultMessage}",values:{id:e,defaultMessage:null===d||void 0===d?void 0:d.byId[e].allowType.join(", ")}}),onOpenApplication:x,applicationId:e,applicationTitle:null===d||void 0===d?void 0:d.byId[e].name,disabled:!o},e))}))]})]}))})}const useStyles$1$3=makeStyles()(e=>({appNoti:{padding:e.spacing(6),paddingTop:e.spacing(4.4),overflowY:"scroll",height:"100%"}})),useStyles$h=makeStyles()(e=>({tableCell:{padding:0,"& > span":{paddingLeft:0,paddingRight:0}},tableRowCheckbox:{marginRight:e.spacing(2)},rowCheckbox:{paddingLeft:0,paddingTop:0,paddingBottom:0,height:"20px"},disabledCheckBox:{"& svg":{color:"green"}},firstColumn:{paddingRight:e.spacing(2)},secondColumn:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},thirdColumn:{paddingLeft:e.spacing(2)}}));function NotificationAllowCell(e){const{id:t,type:n,allowType:r,currentApplicationAllowType:i,isLineEnable:o,onChangeAppAction:a}=e,s=useStyles$h()["classes"];e=(e,t)=>{switch(t){case"email":return e.includes(INotificationType.EMAIL);case"banners":return e.includes(INotificationType.BANNER);case"notification-center":return e.includes(INotificationType.NOTIFICATION_CENTER)}};return jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:s.tableCell+" "+(()=>{switch(t){case"email":return s.firstColumn;case"notification-center":return s.secondColumn;case"banners":return s.thirdColumn;default:return""}})()},{children:jsxRuntime.exports.jsx(Checkbox$1,{id:"checkbox-"+t,checked:e(r,t),disabled:!e(i,t)||!o,icon:jsxRuntime.exports.jsx(default_1$3,{}),checkedIcon:jsxRuntime.exports.jsx(CheckCircle,{color:e(i,t)&&o?"primary":"disabled"}),onChange:e=>{a(e,n)}})}))}function NotificationAllowRow(e){const{allowNotificationTitle:t,checked:n,allowType:r,appId:i,id:o}=e;e=useStyles$h().classes;const a=useDispatch();var s=useSelector(notificationApplicationSelector(i));const[l,c]=react.exports.useState(n),u=null==s?void 0:s.allowType,[d,p]=react.exports.useState(r);s=[{id:"email",type:INotificationType.EMAIL},{id:"notification-center",type:INotificationType.NOTIFICATION_CENTER},{id:"banners",type:INotificationType.BANNER}];const f=(e,t)=>{let n;n=e.currentTarget.checked?[...d,t]:d.filter(e=>e!==t),p(n),a(updateAppActionAllowNotification(i,o,n,"allowType"))};return jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsx(TableCell$1,Object.assign({component:"th",scope:"row",className:e.tableCell},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex"},{children:[jsxRuntime.exports.jsx(Checkbox$1,{"data-test":"row-check-"+o,"data-testid":"row-check-"+o,className:e.rowCheckbox,checked:l,onChange:e=>{e=e.currentTarget.checked;c(e),a(updateAppActionAllowNotification(i,o,e,"allow"))}}),jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.tSG+Bv",defaultMessage:"{text}",description:"allow-notification-table-{text}",values:{text:t}})})]}))})),s.map(e=>jsxRuntime.exports.jsx(NotificationAllowCell,{id:e.id,type:e.type,allowType:r,currentApplicationAllowType:u,isLineEnable:l,onChangeAppAction:f},e.id))]})}function NotificationAllowTable(e){const{action:n,appId:r}=e;var e=useStyles$h()["classes"],t=classNames(e.tableCell,e.firstColumn),i=classNames(e.tableCell,e.secondColumn),o=classNames(e.tableCell,e.thirdColumn);return jsxRuntime.exports.jsx(TableContainer$1,{children:jsxRuntime.exports.jsxs(Table$1,Object.assign({"aria-label":"notification-table"},{children:[jsxRuntime.exports.jsx(TableHead$1,{children:jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsx(TableCell$1,Object.assign({className:e.tableCell},{children:jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.KVIpaj",defaultMessage:"Events",description:"allow-notification"})})})),jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:t},{children:jsxRuntime.exports.jsx("img",{src:img$1p,alt:"img-icon"})})),jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:i},{children:jsxRuntime.exports.jsx("img",{src:img$1o,alt:"img-icon"})})),jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:o},{children:jsxRuntime.exports.jsx("img",{src:img$1n,alt:"img-icon"})}))]})}),jsxRuntime.exports.jsx(TableBody$1,{children:null==(e=null===n||void 0===n?void 0:n.allIds)?void 0:e.map(e=>{var t;return jsxRuntime.exports.jsx(NotificationAllowRow,{allowNotificationTitle:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.title,checked:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.allow,allowType:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.allowType,appId:r,id:e},e)})})]}))})}function NotificationApplication(e){const o=e["dataId"];var e=useStyles$1$3()["classes"];const t=useDispatch();var n=useSelector(notificationApplicationsSelector);const[r,a]=react.exports.useState(n),i=useSelector(notificationSelector).settings;var s=useSelector(notificationApplicationSelector(o));react.exports.useEffect(()=>{t(updateApplicationSetting(r))},[r]);var l=[INotificationType.EMAIL,INotificationType.NOTIFICATION_CENTER,INotificationType.BANNER];const c=[];l.forEach(t=>{-1===(null===i||void 0===i?void 0:i.allowType.findIndex(e=>e===t))&&c.push(t)});return jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:e.appNoti},{children:[jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(NotificationType,{notificationTypeTitle:"Allow Notifications",allowNotification:null==n?void 0:n.byId[o].allow,allowTypes:null==(l=null==n?void 0:n.byId[o])?void 0:l.allowType,disabledTypes:c,children:jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:(null==(e=null==n?void 0:n.byId[o])?void 0:e.iconUrl)||"",primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.OR1ivL",defaultMessage:"{text}",description:"notification-app-id",values:{text:null==s?void 0:s.name}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.QgzNQa",defaultMessage:"{text}",description:"notification application detail text",values:{text:null==s?void 0:s.description}}),bigSize:!0}),description:jsxRuntime.exports.jsx(Typography$1,{variant:"caption",children:"Banner previews are being set at the parent level"}),onChangeNotificationType:function(r,i){a(e=>{var t=[...e.byId[o].allowType],n=t.indexOf(r);return i&&-1===n?t.push(r):t.splice(n,1),Object.assign(Object.assign({},e),{byId:Object.assign(Object.assign({},e.byId),{[o]:Object.assign(Object.assign({},e.byId[o]),{allowType:t})})})})},onChangeAllowType:e=>{t(updateAppAllowNotification(o,e))}})}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(NotificationAllowTable,{action:null==(l=null==n?void 0:n.byId[o])?void 0:l.action,appId:o}),jsxRuntime.exports.jsx(Divider$1,{style:{marginBottom:20,marginTop:15}})]}),jsxRuntime.exports.jsx(CustomWorkFlow,{})]}))})}var index_esm$2=Object.freeze({__proto__:null,NotificationApplication:NotificationApplication,NotificationDetailPanel:NotificationDetailPanel,NotificationPanel:NotificationPanel,NotificationSetting:NotificationSetting,NotificationUtilityPanel:NotificationUtilityPanel,initNotificationAction:initNotificationAction,onNotificationActionClicked:onNotificationActionClicked}),REGEX=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function validate(e){return"string"==typeof e&®EX.test(e)}var Search={},_interopRequireDefault$2=interopRequireDefault.exports,default_1$2=(Object.defineProperty(Search,"__esModule",{value:!0}),Search.default=void 0),_createSvgIcon$2=_interopRequireDefault$2(createSvgIcon),_jsxRuntime$2=jsxRuntime.exports,_default$2=(0,_createSvgIcon$2.default)((0,_jsxRuntime$2.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");function formatProdErrorMessage(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var default_1$2=Search.default=_default$2,$$observable="function"==typeof Symbol&&Symbol.observable||"@@observable",randomString=function(){return Math.random().toString(36).substring(7).split("").join(".")},ActionTypes={INIT:"@@redux/INIT"+randomString(),REPLACE:"@@redux/REPLACE"+randomString(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+randomString()}};function isPlainObject(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function createStore$1(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(formatProdErrorMessage(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(formatProdErrorMessage(1));return n(createStore$1)(e,t)}if("function"!=typeof e)throw new Error(formatProdErrorMessage(2));var i=e,o=t,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function u(){if(l)throw new Error(formatProdErrorMessage(3));return o}function d(t){if("function"!=typeof t)throw new Error(formatProdErrorMessage(4));if(l)throw new Error(formatProdErrorMessage(5));var n=!0;return c(),s.push(t),function(){if(n){if(l)throw new Error(formatProdErrorMessage(6));n=!1,c();var e=s.indexOf(t);s.splice(e,1),a=null}}}function p(e){if(!isPlainObject(e))throw new Error(formatProdErrorMessage(7));if(void 0===e.type)throw new Error(formatProdErrorMessage(8));if(l)throw new Error(formatProdErrorMessage(9));try{l=!0,o=i(o,e)}finally{l=!1}for(var t=a=s,n=0;n<t.length;n++)(0,t[n])();return e}return p({type:ActionTypes.INIT}),(r={dispatch:p,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(formatProdErrorMessage(10));i=e,p({type:ActionTypes.REPLACE})}})[$$observable]=function(){var n=d,e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(formatProdErrorMessage(11));function t(){e.next&&e.next(u())}return t(),{unsubscribe:n(t)}}};return e[$$observable]=function(){return this},e},r}function bindActionCreator(e,t){return function(){return t(e.apply(this,arguments))}}function bindActionCreators$1(e,t){if("function"==typeof e)return bindActionCreator(e,t);if("object"!=typeof e||null===e)throw new Error(formatProdErrorMessage(16));var n,r={};for(n in e){var i=e[n];"function"==typeof i&&(r[n]=bindActionCreator(i,t))}return r}function compose(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}function applyMiddleware(){for(var e=arguments.length,o=new Array(e),t=0;t<e;t++)o[t]=arguments[t];return function(i){return function(){var e=i.apply(void 0,arguments),t=function(){throw new Error(formatProdErrorMessage(15))},n={getState:e.getState,dispatch:function(){return t.apply(void 0,arguments)}},r=o.filter(Boolean).map(function(e){return e(n)}),t=compose.apply(void 0,r)(e.dispatch);return _objectSpread2(_objectSpread2({},e),{},{dispatch:t})}}}var ReactReduxContext=React.createContext(null);function defaultNoopBatch(e){e()}var batch=defaultNoopBatch,setBatch=function(e){return batch=e},getBatch=function(){return batch};function createListenerCollection(){var e=getBatch(),r=null,i=null;return{clear:function(){i=r=null},notify:function(){e(function(){for(var e=r;e;)e.callback(),e=e.next})},get:function(){for(var e=[],t=r;t;)e.push(t),t=t.next;return e},subscribe:function(e){var t=!0,n=i={callback:e,next:null,prev:i};return n.prev?n.prev.next=n:r=n,function(){t&&null!==r&&(t=!1,n.next?n.next.prev=n.prev:i=n.prev,n.prev?n.prev.next=n.next:r=n.next)}}}}var nullListeners={notify:function(){},get:function(){return[]}};function createSubscription(e,t){var n,r=nullListeners;function i(){a.onStateChange&&a.onStateChange()}function o(){n||(n=t?t.addNestedSub(i):e.subscribe(i),r=createListenerCollection())}var a={addNestedSub:function(e){return o(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:i,isSubscribed:function(){return Boolean(n)},trySubscribe:o,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=nullListeners)},getListeners:function(){return r}};return a}var useIsomorphicLayoutEffect$1="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?react.exports.useLayoutEffect:react.exports.useEffect;function Provider(e){var t=e.store,n=e.context,e=e.children,r=react.exports.useMemo(function(){var e=createSubscription(t);return{store:t,subscription:e}},[t]),i=react.exports.useMemo(function(){return t.getState()},[t]),n=(useIsomorphicLayoutEffect$1(function(){var e=r.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),i!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}},[r,i]),n||ReactReduxContext);return React.createElement(n.Provider,{value:r},e)}var _excluded$3=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],_excluded2=["reactReduxForwardedRef"],EMPTY_ARRAY=[],NO_SUBSCRIPTION_ARRAY=[null,null];function storeStateUpdatesReducer(e,t){e=e[1];return[t.payload,e+1]}function useIsomorphicLayoutEffectWithArgs(e,t,n){useIsomorphicLayoutEffect$1(function(){return e.apply(void 0,t)},n)}function captureWrapperProps(e,t,n,r,i,o,a){e.current=r,t.current=i,n.current=!1,o.current&&(o.current=null,a())}function subscribeUpdates(e,r,t,i,o,a,s,l,c,u){var d,p;if(e)return d=!1,p=null,t.onStateChange=e=function(){if(!d){var e,t,n=r.getState();try{e=i(n,o.current)}catch(e){p=t=e}t||(p=null),e===a.current?s.current||c():(a.current=e,l.current=e,s.current=!0,u({type:"STORE_UPDATED",payload:{error:t}}))}},t.trySubscribe(),e(),function(){if(d=!0,t.tryUnsubscribe(),t.onStateChange=null,p)throw p}}var initStateUpdates=function(){return[null,0]};function connectAdvanced(w,e){var e=e=void 0===e?{}:e,t=e.getDisplayName,i=void 0===t?function(e){return"ConnectAdvanced("+e+")"}:t,t=e.methodName,o=void 0===t?"connectAdvanced":t,t=e.renderCountProp,a=void 0===t?void 0:t,t=e.shouldHandleStateChanges,S=void 0===t||t,t=e.storeKey,s=void 0===t?"store":t,t=(e.withRef,e.forwardRef),l=void 0!==t&&t,t=e.context,t=void 0===t?ReactReduxContext:t,c=_objectWithoutPropertiesLoose$2(e,_excluded$3),E=t;return function(b){var e=b.displayName||b.name||"Component",t=i(e),C=_extends({},c,{getDisplayName:i,methodName:o,renderCountProp:a,shouldHandleStateChanges:S,storeKey:s,displayName:t,wrappedComponentName:e,WrappedComponent:b}),e=c.pure;var $=e?react.exports.useMemo:function(e){return e()};function n(n){var e=react.exports.useMemo(function(){var e=n.reactReduxForwardedRef,t=_objectWithoutPropertiesLoose$2(n,_excluded2);return[n.context,e,t]},[n]),t=e[0],r=e[1],i=e[2],o=react.exports.useMemo(function(){return t&&t.Consumer&&reactIs.exports.isContextConsumer(React.createElement(t.Consumer,null))?t:E},[t,E]),a=react.exports.useContext(o),s=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch),l=(Boolean(a)&&Boolean(a.store),(s?n:a).store),c=react.exports.useMemo(function(){return w(l.dispatch,C)},[l]),e=react.exports.useMemo(function(){var e,t;return S?(t=(e=createSubscription(l,s?null:a.subscription)).notifyNestedSubs.bind(e),[e,t]):NO_SUBSCRIPTION_ARRAY},[l,s,a]),u=e[0],e=e[1],d=react.exports.useMemo(function(){return s?a:_extends({},a,{subscription:u})},[s,a,u]),p=react.exports.useReducer(storeStateUpdatesReducer,EMPTY_ARRAY,initStateUpdates),f=p[0][0],p=p[1];if(f&&f.error)throw f.error;var h=react.exports.useRef(),m=react.exports.useRef(i),g=react.exports.useRef(),v=react.exports.useRef(!1),y=$(function(){return g.current&&i===m.current?g.current:c(l.getState(),i)},[l,f,i]),x=(useIsomorphicLayoutEffectWithArgs(captureWrapperProps,[m,h,v,i,y,g,e]),useIsomorphicLayoutEffectWithArgs(subscribeUpdates,[S,l,u,c,m,h,v,g,e,p],[l,u,c]),react.exports.useMemo(function(){return React.createElement(b,_extends({},y,{ref:r}))},[r,b,y]));return react.exports.useMemo(function(){return S?React.createElement(o.Provider,{value:d},x):x},[o,x,d])}var r=e?React.memo(n):n;return r.WrappedComponent=b,r.displayName=n.displayName=t,l?((e=React.forwardRef(function(e,t){return React.createElement(r,_extends({},e,{reactReduxForwardedRef:t}))})).displayName=t,e.WrappedComponent=b,hoistNonReactStatics_cjs(e,b)):hoistNonReactStatics_cjs(r,b)}}function is(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function shallowEqual(e,t){if(!is(e,t)){if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!is(e[n[i]],t[n[i]]))return!1}return!0}function bindActionCreators(n,r){var e,i={};for(e in n)!function(e){var t=n[e];"function"==typeof t&&(i[e]=function(){return r(t.apply(void 0,arguments))})}(e);return i}function wrapMapToPropsConstant(i){return function(e,t){var n=i(e,t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function getDependsOnOwnProps(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function wrapMapToPropsFunc(i,e){return function(e,t){t.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(e,t){r.mapToProps=i,r.dependsOnOwnProps=getDependsOnOwnProps(i);var n=r(e,t);return"function"==typeof n&&(r.mapToProps=n,r.dependsOnOwnProps=getDependsOnOwnProps(n),n=r(e,t)),n},r}}function whenMapDispatchToPropsIsFunction(e){return"function"==typeof e?wrapMapToPropsFunc(e):void 0}function whenMapDispatchToPropsIsMissing(e){return e?void 0:wrapMapToPropsConstant(function(e){return{dispatch:e}})}function whenMapDispatchToPropsIsObject(t){return t&&"object"==typeof t?wrapMapToPropsConstant(function(e){return bindActionCreators(t,e)}):void 0}var defaultMapDispatchToPropsFactories=[whenMapDispatchToPropsIsFunction,whenMapDispatchToPropsIsMissing,whenMapDispatchToPropsIsObject];function whenMapStateToPropsIsFunction(e){return"function"==typeof e?wrapMapToPropsFunc(e):void 0}function whenMapStateToPropsIsMissing(e){return e?void 0:wrapMapToPropsConstant(function(){return{}})}var defaultMapStateToPropsFactories=[whenMapStateToPropsIsFunction,whenMapStateToPropsIsMissing];function defaultMergeProps(e,t,n){return _extends({},n,e,t)}function wrapMergePropsFunc(s){return function(e,t){t.displayName;var r,i=t.pure,o=t.areMergedPropsEqual,a=!1;return function(e,t,n){e=s(e,t,n);return a?i&&o(e,r)||(r=e):(a=!0,r=e),r}}}function whenMergePropsIsFunction(e){return"function"==typeof e?wrapMergePropsFunc(e):void 0}function whenMergePropsIsOmitted(e){return e?void 0:function(){return defaultMergeProps}}var defaultMergePropsFactories=[whenMergePropsIsFunction,whenMergePropsIsOmitted],_excluded$2=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function impureFinalPropsSelectorFactory(n,r,i,o){return function(e,t){return i(n(e,t),r(o,t),t)}}function pureFinalPropsSelectorFactory(i,o,a,s,e){var l,c,u,d,p,f=e.areStatesEqual,h=e.areOwnPropsEqual,m=e.areStatePropsEqual,n=!1;function r(e,t){var n=!h(t,c),r=!f(e,l,t,c);return l=e,c=t,n&&r?(u=i(l,c),o.dependsOnOwnProps&&(d=o(s,c)),p=a(u,d,c)):n?(i.dependsOnOwnProps&&(u=i(l,c)),o.dependsOnOwnProps&&(d=o(s,c)),p=a(u,d,c)):r?(e=i(l,c),t=!m(e,u),u=e,p=t?a(u,d,c):p):p}return function(e,t){return n?r(e,t):(u=i(l=e,c=t),d=o(s,c),p=a(u,d,c),n=!0,p)}}function finalPropsSelectorFactory(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,i=t.initMergeProps,t=_objectWithoutPropertiesLoose$2(t,_excluded$2),n=n(e,t),r=r(e,t),i=i(e,t);return(t.pure?pureFinalPropsSelectorFactory:impureFinalPropsSelectorFactory)(n,r,i,e,t)}var _excluded$1=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function match$2(n,e,r){for(var t=e.length-1;0<=t;t--){var i=e[t](n);if(i)return i}return function(e,t){throw new Error("Invalid value of type "+typeof n+" for "+r+" argument when connecting component "+t.wrappedComponentName+".")}}function strictEqual(e,t){return e===t}function createConnect(e){var e=void 0===e?{}:e,t=e.connectHOC,u=void 0===t?connectAdvanced:t,t=e.mapStateToPropsFactories,d=void 0===t?defaultMapStateToPropsFactories:t,t=e.mapDispatchToPropsFactories,p=void 0===t?defaultMapDispatchToPropsFactories:t,t=e.mergePropsFactories,f=void 0===t?defaultMergePropsFactories:t,t=e.selectorFactory,h=void 0===t?finalPropsSelectorFactory:t;return function(e,t,n,r){var r=r=void 0===r?{}:r,i=r.pure,i=void 0===i||i,o=r.areStatesEqual,o=void 0===o?strictEqual:o,a=r.areOwnPropsEqual,a=void 0===a?shallowEqual:a,s=r.areStatePropsEqual,s=void 0===s?shallowEqual:s,l=r.areMergedPropsEqual,l=void 0===l?shallowEqual:l,r=_objectWithoutPropertiesLoose$2(r,_excluded$1),c=match$2(e,d,"mapStateToProps"),t=match$2(t,p,"mapDispatchToProps"),n=match$2(n,f,"mergeProps");return u(h,_extends({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:c,initMapDispatchToProps:t,initMergeProps:n,pure:i,areStatesEqual:o,areOwnPropsEqual:a,areStatePropsEqual:s,areMergedPropsEqual:l},r))}}var connect=createConnect();function areInputsEqual$1(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function useMemoOne(e,t){var n=react.exports.useState(function(){return{inputs:t,result:e()}})[0],r=react.exports.useRef(!0),i=react.exports.useRef(n),o=r.current||Boolean(t&&i.current.inputs&&areInputsEqual$1(t,i.current.inputs))?i.current:{inputs:t,result:e()};return react.exports.useEffect(function(){r.current=!1,i.current=o},[o]),o.result}function useCallbackOne(e,t){return useMemoOne(function(){return e},t)}setBatch(reactDom.exports.unstable_batchedUpdates);var useMemo=useMemoOne,useCallback=useCallbackOne,isProduction=!0,prefix$2="Invariant failed";function invariant$1(e,t){if(!e){if(isProduction)throw new Error(prefix$2);e="function"==typeof t?t():t,t=e?"".concat(prefix$2,": ").concat(e):prefix$2;throw new Error(t)}}var getRect=function(e){var t=e.top,n=e.right,r=e.bottom,e=e.left;return{top:t,right:n,bottom:r,left:e,width:n-e,height:r-t,x:e,y:t,center:{x:(n+e)/2,y:(r+t)/2}}},expand=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},shrink=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},shift=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},noSpacing$1={top:0,right:0,bottom:0,left:0},createBox=function(e){var t=e.borderBox,n=e.margin,n=void 0===n?noSpacing$1:n,r=e.border,r=void 0===r?noSpacing$1:r,e=e.padding,e=void 0===e?noSpacing$1:e,i=getRect(expand(t,n)),o=getRect(shrink(t,r)),a=getRect(shrink(o,e));return{marginBox:i,borderBox:getRect(t),paddingBox:o,contentBox:a,margin:n,border:r,padding:e}},parse$1=function(e){var t=e.slice(0,-2);return"px"!==e.slice(-2)?0:(e=Number(t),isNaN(e)&&invariant$1(!1),e)},getWindowScroll$1=function(){return{x:window.pageXOffset,y:window.pageYOffset}},offset$1=function(e,t){var n=e.borderBox,r=e.border,i=e.margin,e=e.padding,n=shift(n,t);return createBox({borderBox:n,border:r,margin:i,padding:e})},withScroll=function(e,t){return void 0===t&&(t=getWindowScroll$1()),offset$1(e,t)},calculateBox=function(e,t){var n={top:parse$1(t.marginTop),right:parse$1(t.marginRight),bottom:parse$1(t.marginBottom),left:parse$1(t.marginLeft)},r={top:parse$1(t.paddingTop),right:parse$1(t.paddingRight),bottom:parse$1(t.paddingBottom),left:parse$1(t.paddingLeft)},t={top:parse$1(t.borderTopWidth),right:parse$1(t.borderRightWidth),bottom:parse$1(t.borderBottomWidth),left:parse$1(t.borderLeftWidth)};return createBox({borderBox:e,margin:n,padding:r,border:t})},getBox=function(e){var t=e.getBoundingClientRect(),e=window.getComputedStyle(e);return calculateBox(t,e)},safeIsNaN=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function isEqual$2(e,t){return e===t||!(!safeIsNaN(e)||!safeIsNaN(t))}function areInputsEqual(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!isEqual$2(e[n],t[n]))return!1;return!0}function memoizeOne(n,r){void 0===r&&(r=areInputsEqual);var i,o,a=[],s=!1;return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s&&i===this&&r(e,a)||(o=n.apply(this,e),s=!0,i=this,a=e),o}}var rafSchd=function(r){function e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];i=t,o=o||requestAnimationFrame(function(){o=null,r.apply(void 0,i)})}var i,o=null;return e.cancel=function(){o&&(cancelAnimationFrame(o),o=null)},e},rafSchd$1=rafSchd;function log(e,t){}function noop(){}function getOptions(e,t){return _extends({},e,{},t)}function bindEvents(n,e,r){var t=e.map(function(e){var t=getOptions(r,e.options);return n.addEventListener(e.eventName,e.fn,t),function(){n.removeEventListener(e.eventName,e.fn,t)}});return function(){t.forEach(function(e){e()})}}log.bind(null,"warn"),log.bind(null,"error");var prefix="Invariant failed";function RbdInvariant(e){this.message=e}function invariant(e,t){if(!e)throw new RbdInvariant(prefix)}RbdInvariant.prototype.toString=function(){return this.message};var ErrorBoundary=function(i){function e(){for(var n,e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(n=i.call.apply(i,[this].concat(t))||this).callbacks=null,n.unbind=noop,n.onWindowError=function(e){var t=n.getCallbacks();t.isDragging()&&t.tryAbort(),e.error instanceof RbdInvariant&&e.preventDefault()},n.getCallbacks=function(){if(n.callbacks)return n.callbacks;throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>")},n.setCallbacks=function(e){n.callbacks=e},n}_inheritsLoose$2(e,i);var t=e.prototype;return t.componentDidMount=function(){this.unbind=bindEvents(window,[{eventName:"error",fn:this.onWindowError}])},t.componentDidCatch=function(e){if(!(e instanceof RbdInvariant))throw e;this.setState({})},t.componentWillUnmount=function(){this.unbind()},t.render=function(){return this.props.children(this.setCallbacks)},e}(React.Component),dragHandleUsageInstructions="\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",position=function(e){return e+1},onDragStart=function(e){return"\n You have lifted an item in position "+position(e.source.index)+"\n"},withLocation=function(e,t){var n=e.droppableId===t.droppableId,r=position(e.index),i=position(t.index);return n?"\n You have moved the item from position "+r+"\n to position "+i+"\n ":"\n You have moved the item from position "+r+"\n in list "+e.droppableId+"\n to list "+t.droppableId+"\n in position "+i+"\n "},withCombine=function(e,t,n){return t.droppableId===n.droppableId?"\n The item "+e+"\n has been combined with "+n.draggableId:"\n The item "+e+"\n in list "+t.droppableId+"\n has been combined with "+n.draggableId+"\n in list "+n.droppableId+"\n "},onDragUpdate=function(e){var t=e.destination;return t?withLocation(e.source,t):(t=e.combine)?withCombine(e.draggableId,e.source,t):"You are over an area that cannot be dropped on"},returnedToStart=function(e){return"\n The item has returned to its starting position\n of "+position(e.index)+"\n"},onDragEnd=function(e){var t,n;return"CANCEL"===e.reason?"\n Movement cancelled.\n "+returnedToStart(e.source)+"\n ":(t=e.destination,n=e.combine,t?"\n You have dropped the item.\n "+withLocation(e.source,t)+"\n ":n?"\n You have dropped the item.\n "+withCombine(e.draggableId,e.source,n)+"\n ":"\n The item has been dropped while not over a drop area.\n "+returnedToStart(e.source)+"\n ")},preset={dragHandleUsageInstructions:dragHandleUsageInstructions,onDragStart:onDragStart,onDragUpdate:onDragUpdate,onDragEnd:onDragEnd},origin={x:0,y:0},add=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},subtract=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},isEqual=function(e,t){return e.x===t.x&&e.y===t.y},negate=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},patch=function(e,t,n){var r;return void 0===n&&(n=0),(r={})[e]=t,r["x"===e?"y":"x"]=n,r},distance=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},closest=function(t,e){return Math.min.apply(Math,e.map(function(e){return distance(t,e)}))},apply=function(t){return function(e){return{x:t(e.x),y:t(e.y)}}},executeClip=function(e,t){t=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 t.width<=0||t.height<=0?null:t},offsetByPosition=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},getCorners=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}]},noSpacing={top:0,right:0,bottom:0,left:0},scroll=function(e,t){return t?offsetByPosition(e,t.scroll.diff.displacement):e},increase=function(e,t,n){var r;return n&&n.increasedBy?_extends({},e,((r={})[t.end]=e[t.end]+n.increasedBy[t.line],r)):e},clip=function(e,t){return t&&t.shouldClipSubject?executeClip(t.pageMarginBox,e):getRect(e)},getSubject=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,e=e.frame,i=scroll(t.marginBox,e),i=increase(i,r,n);return{page:t,withPlaceholder:n,active:clip(i,e)}},scrollDroppable=function(e,t){e.frame||invariant(!1);var n=e.frame,r=subtract(t,n.scroll.initial),i=negate(r),t=_extends({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}});return _extends({},e,{frame:t,subject:getSubject({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:t})})};function values$1(t){return Object.values?Object.values(t):Object.keys(t).map(function(e){return t[e]})}function findIndex(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function find(e,t){return e.find?e.find(t):-1!==(t=findIndex(e,t))?e[t]:void 0}function toArray(e){return Array.prototype.slice.call(e)}var toDroppableMap=memoizeOne(function(e){return e.reduce(function(e,t){return e[t.descriptor.id]=t,e},{})}),toDraggableMap=memoizeOne(function(e){return e.reduce(function(e,t){return e[t.descriptor.id]=t,e},{})}),toDroppableList=memoizeOne(function(e){return values$1(e)}),toDraggableList=memoizeOne(function(e){return values$1(e)}),getDraggablesInsideDroppable=memoizeOne(function(t,e){return toDraggableList(e).filter(function(e){return t===e.descriptor.droppableId}).sort(function(e,t){return e.descriptor.index-t.descriptor.index})});function tryGetDestination(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function tryGetCombine(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var removeDraggableFromList=memoizeOne(function(t,e){return e.filter(function(e){return e.descriptor.id!==t.descriptor.id})}),moveToNextCombine=function(e){var t,n=e.isMovingForward,r=e.draggable,i=e.destination,o=e.insideDestination,a=e.previousImpact;return i.isCombineEnabled&&tryGetDestination(a)?(e=a.displaced.all,t=e.length?e[0]:null,n?t?s(t):null:(e=removeDraggableFromList(r,o),t?(-1===(n=findIndex(e,function(e){return e.descriptor.id===t}))&&invariant(!1),(r=n-1)<0?null:s(e[r].descriptor.id)):e.length?s(e[e.length-1].descriptor.id):null)):null;function s(e){e={type:"COMBINE",combine:{draggableId:e,droppableId:i.descriptor.id}};return _extends({},a,{at:e})}},isHomeOf=function(e,t){return e.descriptor.droppableId===t.descriptor.id},noDisplacedBy={point:origin,value:0},emptyGroups={invisible:{},visible:{},all:[]},noImpact={displaced:emptyGroups,displacedBy:noDisplacedBy,at:null},isWithin=function(t,n){return function(e){return t<=e&&e<=n}},isPartiallyVisibleThroughFrame=function(i){var o=isWithin(i.top,i.bottom),a=isWithin(i.left,i.right);return function(e){var t,n,r;return!!(o(e.top)&&o(e.bottom)&&a(e.left)&&a(e.right))||(t=o(e.top)||o(e.bottom),n=a(e.left)||a(e.right),!(!t||!n))||(r=e.top<i.top&&e.bottom>i.bottom,e=e.left<i.left&&e.right>i.right,r&&e)||r&&n||e&&t}},isTotallyVisibleThroughFrame=function(e){var t=isWithin(e.top,e.bottom),n=isWithin(e.left,e.right);return function(e){return t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)}},vertical={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},horizontal={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},isTotallyVisibleThroughFrameOnAxis=function(r){return function(e){var t=isWithin(e.top,e.bottom),n=isWithin(e.left,e.right);return function(e){return r===vertical?t(e.top)&&t(e.bottom):n(e.left)&&n(e.right)}}},getDroppableDisplaced=function(e,t){t=t.frame?t.frame.scroll.diff.displacement:origin;return offsetByPosition(e,t)},isVisibleInDroppable=function(e,t,n){return!!t.subject.active&&n(t.subject.active)(e)},isVisibleInViewport=function(e,t,n){return n(t)(e)},isVisible=function(e){var t=e.target,n=e.destination,r=e.viewport,i=e.withDroppableDisplacement,e=e.isVisibleThroughFrameFn,i=i?getDroppableDisplaced(t,n):t;return isVisibleInDroppable(i,n,e)&&isVisibleInViewport(i,r,e)},isPartiallyVisible=function(e){return isVisible(_extends({},e,{isVisibleThroughFrameFn:isPartiallyVisibleThroughFrame}))},isTotallyVisible=function(e){return isVisible(_extends({},e,{isVisibleThroughFrameFn:isTotallyVisibleThroughFrame}))},isTotallyVisibleOnAxis=function(e){return isVisible(_extends({},e,{isVisibleThroughFrameFn:isTotallyVisibleThroughFrameOnAxis(e.destination.axis)}))},getShouldAnimate=function(e,t,n){return"boolean"==typeof n?n:!t||(n=t.invisible,t=t.visible,!n[e]&&(!(n=t[e])||n.shouldAnimate))};function getTarget(e,t){e=e.page.marginBox,t={top:t.point.y,right:0,bottom:0,left:t.point.x};return getRect(expand(e,t))}function getDisplacementGroups(e){var t=e.afterDragging,i=e.destination,o=e.displacedBy,a=e.viewport,s=e.forceShouldAnimate,l=e.last;return t.reduce(function(e,t){var n=getTarget(t,o),r=t.descriptor.id;return e.all.push(r),isPartiallyVisible({target:n,destination:i,viewport:a,withDroppableDisplacement:!0})?(n=getShouldAnimate(r,l,s),e.visible[r]={draggableId:r,shouldAnimate:n}):e.invisible[t.descriptor.id]=!0,e},{all:[],visible:{},invisible:{}})}function getIndexOfLastItem(e,t){return e.length?(e=e[e.length-1].descriptor.index,t.inHomeList?e:e+1):0}function goAtEnd(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,e=e.destination,t=getIndexOfLastItem(t,{inHomeList:n});return{displaced:emptyGroups,displacedBy:r,at:{type:"REORDER",destination:{droppableId:e.descriptor.id,index:t}}}}function calculateReorderImpact(e){var t,n=e.draggable,r=e.insideDestination,i=e.destination,o=e.viewport,a=e.displacedBy,s=e.last,l=e.index,e=e.forceShouldAnimate,c=isHomeOf(n,i);return null!=l&&(t=find(r,function(e){return e.descriptor.index===l}))?(n=removeDraggableFromList(n,r),t=r.indexOf(t),{displaced:getDisplacementGroups({afterDragging:n.slice(t),destination:i,displacedBy:a,last:s,viewport:o.frame,forceShouldAnimate:e}),displacedBy:a,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:l}}}):goAtEnd({insideDestination:r,inHomeList:c,displacedBy:a,destination:i})}function didStartAfterCritical(e,t){return Boolean(t.effected[e])}var fromCombine=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,i=e.combine,e=e.afterCritical;return n.isCombineEnabled?(r=r[n=i.draggableId].descriptor.index,didStartAfterCritical(n,e)?t?r:r-1:t?r+1:r):null},fromReorder=function(e){var t,n=e.isMovingForward,r=e.isInHomeList,i=e.insideDestination,e=e.location;return!i.length||(e=e.index,t=i[0].descriptor.index,i=i[i.length-1].descriptor.index,(n=n?e+1:e-1)<t)||(r?i:i+1)<n?null:n},moveToNextIndex=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,o=e.destination,a=e.insideDestination,s=e.previousImpact,l=e.viewport,e=e.afterCritical,c=s.at;return c||invariant(!1),"REORDER"===c.type?null==(n=fromReorder({isMovingForward:t,isInHomeList:n,location:c.destination,insideDestination:a}))?null:calculateReorderImpact({draggable:r,insideDestination:a,destination:o,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:n}):null==(n=fromCombine({isMovingForward:t,destination:o,displaced:s.displaced,draggables:i,combine:c.combine,afterCritical:e}))?null:calculateReorderImpact({draggable:r,insideDestination:a,destination:o,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:n})},getCombinedItemDisplacement=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,e=e.displacedBy,t=Boolean(t.visible[r]||t.invisible[r]);return didStartAfterCritical(r,n)?t?origin:negate(e.point):t?e.point:origin},whenCombining=function(e){var t=e.afterCritical,n=e.impact,e=e.draggables,r=tryGetCombine(n),r=(r||invariant(!1),r.draggableId),e=e[r].page.borderBox.center,t=getCombinedItemDisplacement({displaced:n.displaced,afterCritical:t,combineWith:r,displacedBy:n.displacedBy});return add(e,t)},distanceFromStartToBorderBoxCenter=function(e,t){return t.margin[e.start]+t.borderBox[e.size]/2},distanceFromEndToBorderBoxCenter=function(e,t){return t.margin[e.end]+t.borderBox[e.size]/2},getCrossAxisBorderBoxCenter=function(e,t,n){return t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2},goAfter=function(e){var t=e.axis,n=e.moveRelativeTo,e=e.isMoving;return patch(t.line,n.marginBox[t.end]+distanceFromStartToBorderBoxCenter(t,e),getCrossAxisBorderBoxCenter(t,n.marginBox,e))},goBefore=function(e){var t=e.axis,n=e.moveRelativeTo,e=e.isMoving;return patch(t.line,n.marginBox[t.start]-distanceFromEndToBorderBoxCenter(t,e),getCrossAxisBorderBoxCenter(t,n.marginBox,e))},goIntoStart=function(e){var t=e.axis,n=e.moveInto,e=e.isMoving;return patch(t.line,n.contentBox[t.start]+distanceFromStartToBorderBoxCenter(t,e),getCrossAxisBorderBoxCenter(t,n.contentBox,e))},whenReordering=function(e){var t,n=e.impact,r=e.draggable,i=e.draggables,o=e.droppable,e=e.afterCritical,a=getDraggablesInsideDroppable(o.descriptor.id,i),s=r.page,l=o.axis;return a.length?(t=n.displaced,n=n.displacedBy,(t=t.all[0])?(i=i[t],didStartAfterCritical(t,e)?goBefore({axis:l,moveRelativeTo:i.page,isMoving:s}):(t=offset$1(i.page,n.point),goBefore({axis:l,moveRelativeTo:t,isMoving:s}))):(i=a[a.length-1]).descriptor.id===r.descriptor.id?s.borderBox.center:didStartAfterCritical(i.descriptor.id,e)?(n=offset$1(i.page,negate(e.displacedBy.point)),goAfter({axis:l,moveRelativeTo:n,isMoving:s})):goAfter({axis:l,moveRelativeTo:i.page,isMoving:s})):goIntoStart({axis:l,moveInto:o.page,isMoving:s})},withDroppableDisplacement=function(e,t){e=e.frame;return e?add(t,e.scroll.diff.displacement):t},getResultWithoutDroppableDisplacement=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,e=e.afterCritical,o=n.page.borderBox.center,a=t.at;return r&&a?"REORDER"===a.type?whenReordering({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:e}):whenCombining({impact:t,draggables:i,afterCritical:e}):o},getPageBorderBoxCenterFromImpact=function(e){var t=getResultWithoutDroppableDisplacement(e),e=e.droppable;return e?withDroppableDisplacement(e,t):t},scrollViewport=function(e,t){var n=subtract(t,e.scroll.initial),r=negate(n);return{frame: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:n,displacement:r}}}};function getDraggables(e,t){return e.map(function(e){return t[e]})}function tryGetVisible(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}var speculativelyIncrease=function(e){var t=e.impact,n=e.viewport,r=e.destination,i=e.draggables,e=e.maxScrollChange,o=scrollViewport(n,add(n.scroll.current,e)),e=r.frame?scrollDroppable(r,add(r.frame.scroll.current,e)):r,a=t.displaced,r=getDisplacementGroups({afterDragging:getDraggables(a.all,i),destination:r,displacedBy:t.displacedBy,viewport:o.frame,last:a,forceShouldAnimate:!1}),o=getDisplacementGroups({afterDragging:getDraggables(a.all,i),destination:e,displacedBy:t.displacedBy,viewport:n.frame,last:a,forceShouldAnimate:!1}),s={},l={},c=[a,r,o];return a.all.forEach(function(e){var t=tryGetVisible(e,c);t?l[e]=t:s[e]=!0}),_extends({},t,{displaced:{all:a.all,invisible:s,visible:l}})},withViewportDisplacement=function(e,t){return add(e.scroll.diff.displacement,t)},getClientFromPageBorderBoxCenter=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,e=e.viewport,e=withViewportDisplacement(e,t),t=subtract(e,n.page.borderBox.center);return add(n.client.borderBox.center,t)},isTotallyVisibleInNewLocation=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,i=e.viewport,o=e.withDroppableDisplacement,e=e.onlyOnMainAxis,e=void 0!==e&&e,r=subtract(r,t.page.borderBox.center),t={target:offsetByPosition(t.page.borderBox,r),destination:n,withDroppableDisplacement:o,viewport:i};return(e?isTotallyVisibleOnAxis:isTotallyVisible)(t)},moveToNextPlace=function(e){var t,n,r=e.isMovingForward,i=e.draggable,o=e.destination,a=e.draggables,s=e.previousImpact,l=e.viewport,c=e.previousPageBorderBoxCenter,u=e.previousClientSelection,e=e.afterCritical;return o.isEnabled&&(n=getDraggablesInsideDroppable(o.descriptor.id,a),t=isHomeOf(i,o),r=moveToNextCombine({isMovingForward:r,draggable:i,destination:o,insideDestination:n,previousImpact:s})||moveToNextIndex({isMovingForward:r,isInHomeList:t,draggable:i,draggables:a,destination:o,insideDestination:n,previousImpact:s,viewport:l,afterCritical:e}))?(t=getPageBorderBoxCenterFromImpact({impact:r,draggable:i,droppable:o,draggables:a,afterCritical:e}),isTotallyVisibleInNewLocation({draggable:i,destination:o,newPageBorderBoxCenter:t,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?{clientSelection:getClientFromPageBorderBoxCenter({pageBorderBoxCenter:t,draggable:i,viewport:l}),impact:r,scrollJumpRequest:null}:(n=subtract(t,c),{clientSelection:u,impact:speculativelyIncrease({impact:r,viewport:l,destination:o,draggables:a,maxScrollChange:n}),scrollJumpRequest:n})):null},getKnownActive=function(e){e=e.subject.active;return e||invariant(!1),e},getBestCrossAxisDroppable=function(e){var i,n,r=e.isMovingForward,o=e.pageBorderBoxCenter,t=e.source,a=e.droppables,s=e.viewport,l=t.subject.active;return l&&(i=t.axis,n=isWithin(l[i.start],l[i.end]),(e=toDroppableList(a).filter(function(e){return e!==t}).filter(function(e){return e.isEnabled}).filter(function(e){return Boolean(e.subject.active)}).filter(function(e){return isPartiallyVisibleThroughFrame(s.frame)(getKnownActive(e))}).filter(function(e){e=getKnownActive(e);return r?l[i.crossAxisEnd]<e[i.crossAxisEnd]:e[i.crossAxisStart]<l[i.crossAxisStart]}).filter(function(e){var e=getKnownActive(e),t=isWithin(e[i.start],e[i.end]);return n(e[i.start])||n(e[i.end])||t(l[i.start])||t(l[i.end])}).sort(function(e,t){e=getKnownActive(e)[i.crossAxisStart],t=getKnownActive(t)[i.crossAxisStart];return r?e-t:t-e}).filter(function(e,t,n){return getKnownActive(e)[i.crossAxisStart]===getKnownActive(n[0])[i.crossAxisStart]})).length)?(1===e.length?e:1===(a=e.filter(function(e){return isWithin(getKnownActive(e)[i.start],getKnownActive(e)[i.end])(o[i.line])})).length?a:1<a.length?a.sort(function(e,t){return getKnownActive(e)[i.start]-getKnownActive(t)[i.start]}):e.sort(function(e,t){var n=closest(o,getCorners(getKnownActive(e))),r=closest(o,getCorners(getKnownActive(t)));return n!==r?n-r:getKnownActive(e)[i.start]-getKnownActive(t)[i.start]}))[0]:null},getCurrentPageBorderBoxCenter=function(e,t){var n=e.page.borderBox.center;return didStartAfterCritical(e.descriptor.id,t)?subtract(n,t.displacedBy.point):n},getCurrentPageBorderBox=function(e,t){var n=e.page.borderBox;return didStartAfterCritical(e.descriptor.id,t)?offsetByPosition(n,negate(t.displacedBy.point)):n},getClosestDraggable=function(e){var i=e.pageBorderBoxCenter,t=e.viewport,o=e.destination,n=e.insideDestination,a=e.afterCritical;return n.filter(function(e){return isTotallyVisible({target:getCurrentPageBorderBox(e,a),destination:o,viewport:t.frame,withDroppableDisplacement:!0})}).sort(function(e,t){var n=distance(i,withDroppableDisplacement(o,getCurrentPageBorderBoxCenter(e,a))),r=distance(i,withDroppableDisplacement(o,getCurrentPageBorderBoxCenter(t,a)));return n<r?-1:r<n?1:e.descriptor.index-t.descriptor.index})[0]||null},getDisplacedBy=memoizeOne(function(e,t){t=t[e.line];return{value:t,point:patch(e.line,t)}}),getRequiredGrowthForPlaceholder=function(e,t,n){var r,i=e.axis;return"virtual"===e.descriptor.mode?patch(i.line,t[i.line]):(r=e.subject.page.contentBox[i.size],(e=getDraggablesInsideDroppable(e.descriptor.id,n).reduce(function(e,t){return e+t.client.marginBox[i.size]},0)+t[i.line]-r)<=0?null:patch(i.line,e))},withMaxScroll=function(e,t){return _extends({},e,{scroll:_extends({},e.scroll,{max:t})})},addPlaceholder=function(e,t,n){var r=e.frame,t=(isHomeOf(t,e)&&invariant(!1),e.subject.withPlaceholder&&invariant(!1),getDisplacedBy(e.axis,t.displaceBy).point),n=getRequiredGrowthForPlaceholder(e,t,n),t={placeholderSize:t,increasedBy:n,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};return r?(n=n?add(r.scroll.max,n):r.scroll.max,r=withMaxScroll(r,n),_extends({},e,{subject:getSubject({page:e.subject.page,withPlaceholder:t,axis:e.axis,frame:r}),frame:r})):_extends({},e,{subject:getSubject({page:e.subject.page,withPlaceholder:t,axis:e.axis,frame:e.frame})})},removePlaceholder=function(e){var t=e.subject.withPlaceholder,n=(t||invariant(!1),e.frame);return n?((t=t.oldFrameMaxScroll)||invariant(!1),n=withMaxScroll(n,t),_extends({},e,{subject:getSubject({page:e.subject.page,axis:e.axis,frame:n,withPlaceholder:null}),frame:n})):_extends({},e,{subject:getSubject({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null})})},moveToNewDroppable=function(e){var t,n=e.previousPageBorderBoxCenter,r=e.moveRelativeTo,i=e.insideDestination,o=e.draggable,a=e.draggables,s=e.destination,l=e.viewport,e=e.afterCritical;return r?(n=Boolean(n[s.axis.line]<=r.page.borderBox.center[s.axis.line]),t=r.descriptor.index,r=r.descriptor.id===o.descriptor.id||n?t:t+1,n=getDisplacedBy(s.axis,o.displaceBy),calculateReorderImpact({draggable:o,insideDestination:i,destination:s,viewport:l,displacedBy:n,last:emptyGroups,index:r})):!i.length&&(t={displaced:emptyGroups,displacedBy:noDisplacedBy,at:{type:"REORDER",destination:{droppableId:s.descriptor.id,index:0}}},n=getPageBorderBoxCenterFromImpact({impact:t,draggable:o,droppable:s,draggables:a,afterCritical:e}),r=isHomeOf(o,s)?s:addPlaceholder(s,o,a),isTotallyVisibleInNewLocation({draggable:o,destination:r,newPageBorderBoxCenter:n,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))?t:null},moveCrossAxis=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,i=e.isOver,o=e.draggables,a=e.droppables,s=e.viewport,e=e.afterCritical,t=getBestCrossAxisDroppable({isMovingForward:t,pageBorderBoxCenter:n,source:i,droppables:a,viewport:s});return t&&(i=getDraggablesInsideDroppable(t.descriptor.id,o),a=getClosestDraggable({pageBorderBoxCenter:n,viewport:s,destination:t,insideDestination:i,afterCritical:e}),n=moveToNewDroppable({previousPageBorderBoxCenter:n,destination:t,draggable:r,draggables:o,moveRelativeTo:a,insideDestination:i,viewport:s,afterCritical:e}))?(a=getPageBorderBoxCenterFromImpact({impact:n,draggable:r,droppable:t,draggables:o,afterCritical:e}),{clientSelection:getClientFromPageBorderBoxCenter({pageBorderBoxCenter:a,draggable:r,viewport:s}),impact:n,scrollJumpRequest:null}):null},whatIsDraggedOver=function(e){e=e.at;return e?("REORDER"===e.type?e.destination:e.combine).droppableId:null},getDroppableOver=function(e,t){e=whatIsDraggedOver(e);return e?t[e]:null},moveInDirection=function(e){var t,n,r,i=e.state,e=e.type,o=getDroppableOver(i.impact,i.dimensions.droppables),a=Boolean(o),s=i.dimensions.droppables[i.critical.droppable.id],o=o||s,s=o.axis.direction,s="vertical"===s&&("MOVE_UP"===e||"MOVE_DOWN"===e)||"horizontal"===s&&("MOVE_LEFT"===e||"MOVE_RIGHT"===e);return s&&!a?null:(a="MOVE_DOWN"===e||"MOVE_RIGHT"===e,e=i.dimensions.draggables[i.critical.draggable.id],t=i.current.page.borderBoxCenter,n=(r=i.dimensions).draggables,r=r.droppables,s?moveToNextPlace({isMovingForward:a,previousPageBorderBoxCenter:t,draggable:e,destination:o,draggables:n,viewport:i.viewport,previousClientSelection:i.current.client.selection,previousImpact:i.impact,afterCritical:i.afterCritical}):moveCrossAxis({isMovingForward:a,previousPageBorderBoxCenter:t,draggable:e,isOver:o,draggables:n,droppables:r,viewport:i.viewport,afterCritical:i.afterCritical}))};function isMovementAllowed(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function isPositionInFrame(e){var t=isWithin(e.top,e.bottom),n=isWithin(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}function getHasOverlap(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function getFurthestAway(e){var n=e.pageBorderBox,t=e.draggable,e=e.candidates,r=t.page.borderBox.center,t=e.map(function(e){var t=e.axis,t=patch(e.axis.line,n.center[t.line],e.page.borderBox.center[t.crossAxisLine]);return{id:e.descriptor.id,distance:distance(r,t)}}).sort(function(e,t){return t.distance-e.distance});return t[0]?t[0].id:null}function getDroppableOver$1(e){var o=e.pageBorderBox,t=e.draggable,e=e.droppables,e=toDroppableList(e).filter(function(e){var t,n,r,i;return!!e.isEnabled&&!!(i=e.subject.active)&&!(!getHasOverlap(o,i)||!isPositionInFrame(i)(o.center)&&(e=e.axis,t=i.center[e.crossAxisLine],n=o[e.crossAxisStart],r=o[e.crossAxisEnd],e=(i=isWithin(i[e.crossAxisStart],i[e.crossAxisEnd]))(n),i=i(r),e||i)&&!(e?n<t:t<r))});return e.length?1===e.length?e[0].descriptor.id:getFurthestAway({pageBorderBox:o,draggable:t,candidates:e}):null}var offsetRectByPosition=function(e,t){return getRect(offsetByPosition(e,t))},withDroppableScroll=function(e,t){e=e.frame;return e?offsetRectByPosition(t,e.scroll.diff.value):t};function getIsDisplaced(e){var t=e.displaced,e=e.id;return Boolean(t.visible[e]||t.invisible[e])}function atIndex(e){var t=e.draggable,n=e.closest,e=e.inHomeList;return n?e&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}var getReorderImpact=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.last,a=e.viewport,s=e.afterCritical,l=r.axis,e=getDisplacedBy(r.axis,n.displaceBy),c=e.value,u=t[l.start],d=t[l.end],t=atIndex({draggable:n,closest:find(removeDraggableFromList(n,i),function(e){var t=e.descriptor.id,e=e.page.borderBox.center[l.line],n=didStartAfterCritical(t,s),t=getIsDisplaced({displaced:o,id:t});return n?t?d<=e:u<e-c:t?d<=e+c:u<e}),inHomeList:isHomeOf(n,r)});return calculateReorderImpact({draggable:n,insideDestination:i,destination:r,viewport:a,last:o,displacedBy:e,index:t})},combineThresholdDivisor=4,getCombineImpact=function(e){var i,o,a,s,t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,l=e.previousImpact,r=e.destination,c=e.insideDestination,u=e.afterCritical;return r.isCombineEnabled&&(i=r.axis,e=getDisplacedBy(r.axis,t.displaceBy),o=e.value,a=n[i.start],s=n[i.end],n=find(removeDraggableFromList(t,c),function(e){var t=e.descriptor.id,e=e.page.borderBox,n=e[i.size]/combineThresholdDivisor,r=didStartAfterCritical(t,u),t=getIsDisplaced({displaced:l.displaced,id:t});return r?t?s>e[i.start]+n&&s<e[i.end]-n:a>e[i.start]-o+n&&a<e[i.end]-o-n:t?s>e[i.start]+o+n&&s<e[i.end]+o-n:a>e[i.start]+n&&a<e[i.end]-n}))?{displacedBy:e,displaced:l.displaced,at:{type:"COMBINE",combine:{draggableId:n.descriptor.id,droppableId:r.descriptor.id}}}:null},getDragImpact=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,i=e.droppables,o=e.previousImpact,a=e.viewport,e=e.afterCritical,t=offsetRectByPosition(n.page.borderBox,t),s=getDroppableOver$1({pageBorderBox:t,draggable:n,droppables:i});return s?(i=i[s],s=getDraggablesInsideDroppable(i.descriptor.id,r),r=withDroppableScroll(i,t),getCombineImpact({pageBorderBoxWithDroppableScroll:r,draggable:n,previousImpact:o,destination:i,insideDestination:s,afterCritical:e})||getReorderImpact({pageBorderBoxWithDroppableScroll:r,draggable:n,destination:i,insideDestination:s,last:o.displaced,viewport:a,afterCritical:e})):noImpact},patchDroppableMap=function(e,t){return _extends({},e,((e={})[t.descriptor.id]=t,e))},clearUnusedPlaceholder=function(e){var t=e.previousImpact,n=e.impact,e=e.droppables,t=whatIsDraggedOver(t),n=whatIsDraggedOver(n);return t&&t!==n&&(n=e[t]).subject.withPlaceholder?(t=removePlaceholder(n),patchDroppableMap(e,t)):e},recomputePlaceholders=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,i=e.previousImpact,e=e.impact,i=clearUnusedPlaceholder({previousImpact:i,impact:e,droppables:r}),e=whatIsDraggedOver(e);return!e||(r=r[e],isHomeOf(t,r))||r.subject.withPlaceholder?i:(e=addPlaceholder(r,t,n),patchDroppableMap(i,e))},update=function(e){var t,n=e.state,r=e.clientSelection,i=e.dimensions,o=e.viewport,a=e.impact,e=e.scrollJumpRequest,o=o||n.viewport,i=i||n.dimensions,r=r||n.current.client.selection,s=subtract(r,n.initial.client.selection),r={offset:s,selection:r,borderBoxCenter:add(n.initial.client.borderBoxCenter,s)},s={selection:add(r.selection,o.scroll.current),borderBoxCenter:add(r.borderBoxCenter,o.scroll.current),offset:add(r.offset,o.scroll.diff.value)},r={client:r,page:s};return"COLLECTING"===n.phase?_extends({phase:"COLLECTING"},n,{dimensions:i,viewport:o,current:r}):(t=i.draggables[n.critical.draggable.id],a=a||getDragImpact({pageOffset:s.offset,draggable:t,draggables:i.draggables,droppables:i.droppables,previousImpact:n.impact,viewport:o,afterCritical:n.afterCritical}),s=recomputePlaceholders({draggable:t,impact:a,previousImpact:n.impact,draggables:i.draggables,droppables:i.droppables}),_extends({},n,{current:r,dimensions:{draggables:i.draggables,droppables:s},impact:a,viewport:o,scrollJumpRequest:e||null,forceShouldAnimate:!e&&null}))};function getDraggables$1(e,t){return e.map(function(e){return t[e]})}var recompute=function(e){var t=e.impact,n=e.viewport,r=e.draggables,i=e.destination,e=e.forceShouldAnimate,o=t.displaced;return _extends({},t,{displaced:getDisplacementGroups({afterDragging:getDraggables$1(o.all,r),destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:e,last:o})})},getClientBorderBoxCenter=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.viewport,e=e.afterCritical,t=getPageBorderBoxCenterFromImpact({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:e});return getClientFromPageBorderBoxCenter({pageBorderBoxCenter:t,draggable:n,viewport:o})},refreshSnap=function(e){var t=e.state,n=e.dimensions,e=e.viewport,r=("SNAP"!==t.movementMode&&invariant(!1),t.impact),e=e||t.viewport,n=n||t.dimensions,i=n.draggables,o=n.droppables,a=i[t.critical.draggable.id],s=whatIsDraggedOver(r),o=(s||invariant(!1),o[s]),s=recompute({impact:r,viewport:e,destination:o,draggables:i}),r=getClientBorderBoxCenter({impact:s,draggable:a,droppable:o,draggables:i,viewport:e,afterCritical:t.afterCritical});return update({impact:s,clientSelection:r,state:t,dimensions:n,viewport:e})},getHomeLocation=function(e){return{index:e.index,droppableId:e.droppableId}},getLiftEffect=function(e){var t=e.draggable,n=e.home,r=e.draggables,e=e.viewport,i=getDisplacedBy(n.axis,t.displaceBy),r=getDraggablesInsideDroppable(n.descriptor.id,r),o=r.indexOf(t),r=(-1===o&&invariant(!1),r.slice(o+1)),o=r.reduce(function(e,t){return e[t.descriptor.id]=!0,e},{}),o={inVirtualList:"virtual"===n.descriptor.mode,displacedBy:i,effected:o};return{impact:{displaced:getDisplacementGroups({afterDragging:r,destination:n,displacedBy:i,last:null,viewport:e.frame,forceShouldAnimate:!1}),displacedBy:i,at:{type:"REORDER",destination:getHomeLocation(t.descriptor)}},afterCritical:o}},patchDimensionMap=function(e,t){return{draggables:e.draggables,droppables:patchDroppableMap(e.droppables,t)}},offsetDraggable=function(e){var t=e.draggable,n=e.offset,e=e.initialWindowScroll,n=offset$1(t.client,n),e=withScroll(n,e);return _extends({},t,{placeholder:_extends({},t.placeholder,{client:n}),client:n,page:e})},getFrame=function(e){e=e.frame;return e||invariant(!1),e},adjustAdditionsForScrollChanges=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,i=r.scroll.diff.value;return t.map(function(e){var t=e.descriptor.droppableId,t=n[t],t=getFrame(t).scroll.diff.value,t=add(i,t);return offsetDraggable({draggable:e,offset:t,initialWindowScroll:r.scroll.initial})})},publishWhileDraggingInVirtual=function(e){var n=e.state,e=e.published,t=e.modified.map(function(e){var t=n.dimensions.droppables[e.droppableId];return scrollDroppable(t,e.scroll)}),t=_extends({},n.dimensions.droppables,{},toDroppableMap(t)),r=toDraggableMap(adjustAdditionsForScrollChanges({additions:e.additions,updatedDroppables:t,viewport:n.viewport})),i=_extends({},n.dimensions.draggables,{},r),r=(e.removals.forEach(function(e){delete i[e]}),{droppables:t,draggables:i}),e=whatIsDraggedOver(n.impact),t=e?r.droppables[e]:null,e=r.draggables[n.critical.draggable.id],o=r.droppables[n.critical.droppable.id],e=getLiftEffect({draggable:e,home:o,draggables:i,viewport:n.viewport}),o=e.impact,e=e.afterCritical,t=t&&t.isCombineEnabled?n.impact:o,t=getDragImpact({pageOffset:n.current.page.offset,draggable:r.draggables[n.critical.draggable.id],draggables:r.draggables,droppables:r.droppables,previousImpact:t,viewport:n.viewport,afterCritical:e}),t=_extends({phase:"DRAGGING"},n,{phase:"DRAGGING",impact:t,onLiftImpact:o,dimensions:r,afterCritical:e,forceShouldAnimate:!1});return"COLLECTING"===n.phase?t:_extends({phase:"DROP_PENDING"},t,{phase:"DROP_PENDING",reason:n.reason,isWaiting:!1})},isSnapping=function(e){return"SNAP"===e.movementMode},postDroppableChange=function(e,t,n){t=patchDimensionMap(e.dimensions,t);return(!isSnapping(e)||n?update:refreshSnap)({state:e,dimensions:t})};function removeScrollJumpRequest(e){return e.isDragging&&"SNAP"===e.movementMode?_extends({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var idle={phase:"IDLE",completed:null,shouldFlush:!1},reducer$1=function(e,t){if(void 0===e&&(e=idle),"FLUSH"===t.type)return _extends({},idle,{shouldFlush:!0});if("INITIAL_PUBLISH"===t.type)return"IDLE"!==e.phase&&invariant(!1),l=(n=t.payload).critical,a=n.clientSelection,s=n.viewport,o=n.dimensions,n=n.movementMode,r=o.draggables[l.draggable.id],i=o.droppables[l.droppable.id],{phase:"DRAGGING",isDragging:!0,critical:l,movementMode:n,dimensions:o,initial:n={client:l={selection:a,borderBoxCenter:r.client.borderBox.center,offset:origin},page:{selection:add(l.selection,s.scroll.initial),borderBoxCenter:add(l.selection,s.scroll.initial),offset:add(l.selection,s.scroll.diff.value)}},current:n,isWindowScrollAllowed:toDroppableList(o.droppables).every(function(e){return!e.isFixedOnPage}),impact:l=(a=getLiftEffect({draggable:r,home:i,draggables:o.draggables,viewport:s})).impact,afterCritical:a.afterCritical,onLiftImpact:l,viewport:s,scrollJumpRequest:null,forceShouldAnimate:null};if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&invariant(!1),_extends({phase:"COLLECTING"},e,{phase:"COLLECTING"}));if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&invariant(!1),publishWhileDraggingInVirtual({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;isMovementAllowed(e)||invariant(!1);var n=t.payload.client;return isEqual(n,e.current.client.selection)?e:update({state:e,clientSelection:n,impact:isSnapping(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return removeScrollJumpRequest(e);if("COLLECTING"===e.phase)return removeScrollJumpRequest(e);isMovementAllowed(e)||invariant(!1);var r=t.payload,i=r.id,o=r.newScroll,a=e.dimensions.droppables[i];return a?(l=scrollDroppable(a,o),postDroppableChange(e,l,!1)):e}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;isMovementAllowed(e)||invariant(!1);var s=t.payload,n=s.id,r=s.isEnabled,i=e.dimensions.droppables[n],a=(i||invariant(!1),i.isEnabled===r&&invariant(!1),_extends({},i,{isEnabled:r}));return postDroppableChange(e,a,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;isMovementAllowed(e)||invariant(!1);var o=t.payload,l=o.id,s=o.isCombineEnabled,n=e.dimensions.droppables[l],i=(n||invariant(!1),n.isCombineEnabled===s&&invariant(!1),_extends({},n,{isCombineEnabled:s}));return postDroppableChange(e,i,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;isMovementAllowed(e)||invariant(!1),e.isWindowScrollAllowed||invariant(!1);r=t.payload.newScroll;return isEqual(e.viewport.scroll.current,r)?removeScrollJumpRequest(e):(a=scrollViewport(e.viewport,r),(isSnapping(e)?refreshSnap:update)({state:e,viewport:a}))}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type)return!isMovementAllowed(e)||(o=t.payload.maxScroll,isEqual(o,e.viewport.scroll.max))?e:(l=_extends({},e.viewport,{scroll:_extends({},e.viewport.scroll,{max:o})}),_extends({phase:"DRAGGING"},e,{viewport:l}));if("MOVE_UP"!==t.type&&"MOVE_DOWN"!==t.type&&"MOVE_LEFT"!==t.type&&"MOVE_RIGHT"!==t.type)return"DROP_PENDING"===t.type?(n=t.payload.reason,"COLLECTING"!==e.phase&&invariant(!1),_extends({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:n})):"DROP_ANIMATE"===t.type?(i=(s=t.payload).completed,r=s.dropDuration,a=s.newHomeClientOffset,"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&invariant(!1),{phase:"DROP_ANIMATING",completed:i,dropDuration:r,newHomeClientOffset:a,dimensions:e.dimensions}):"DROP_COMPLETE"===t.type?{phase:"IDLE",completed:t.payload.completed,shouldFlush:!1}:e;if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&invariant(!1);o=moveInDirection({state:e,type:t.type});return o?update({state:e,impact:o.impact,clientSelection:o.clientSelection,scrollJumpRequest:o.scrollJumpRequest}):e},beforeInitialCapture=function(e){return{type:"BEFORE_INITIAL_CAPTURE",payload:e}},lift=function(e){return{type:"LIFT",payload:e}},initialPublish=function(e){return{type:"INITIAL_PUBLISH",payload:e}},publishWhileDragging=function(e){return{type:"PUBLISH_WHILE_DRAGGING",payload:e}},collectionStarting=function(){return{type:"COLLECTION_STARTING",payload:null}},updateDroppableScroll=function(e){return{type:"UPDATE_DROPPABLE_SCROLL",payload:e}},updateDroppableIsEnabled=function(e){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}},updateDroppableIsCombineEnabled=function(e){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}},move=function(e){return{type:"MOVE",payload:e}},moveByWindowScroll=function(e){return{type:"MOVE_BY_WINDOW_SCROLL",payload:e}},updateViewportMaxScroll=function(e){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}},moveUp=function(){return{type:"MOVE_UP",payload:null}},moveDown=function(){return{type:"MOVE_DOWN",payload:null}},moveRight=function(){return{type:"MOVE_RIGHT",payload:null}},moveLeft=function(){return{type:"MOVE_LEFT",payload:null}},flush=function(){return{type:"FLUSH",payload:null}},animateDrop=function(e){return{type:"DROP_ANIMATE",payload:e}},completeDrop=function(e){return{type:"DROP_COMPLETE",payload:e}},drop=function(e){return{type:"DROP",payload:e}},dropPending=function(e){return{type:"DROP_PENDING",payload:e}},dropAnimationFinished=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},lift$1=function(l){return function(e){var a=e.getState,s=e.dispatch;return function(o){return function(e){var t,n,r,i;"LIFT"!==e.type?o(e):(n=(e=e.payload).id,t=e.clientSelection,e=e.movementMode,"DROP_ANIMATING"===(i=a()).phase&&s(completeDrop({completed:i.completed})),"IDLE"!==a().phase&&invariant(!1),s(flush()),s(beforeInitialCapture({draggableId:n,movementMode:e})),n=(i=l.startPublishing({draggableId:n,scrollOptions:{shouldPublishImmediately:"SNAP"===e}})).critical,r=i.dimensions,i=i.viewport,s(initialPublish({critical:n,dimensions:r,clientSelection:t,movementMode:e,viewport:i})))}}}},style=function(n){return function(){return function(t){return function(e){"INITIAL_PUBLISH"===e.type&&n.dragging(),"DROP_ANIMATE"===e.type&&n.dropping(e.payload.completed.result.reason),"FLUSH"!==e.type&&"DROP_COMPLETE"!==e.type||n.resting(),t(e)}}}},curves={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},combine={opacity:{drop:0,combining:.7},scale:{drop:.75}},timings={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},outOfTheWayTiming=timings.outOfTheWay+"s "+curves.outOfTheWay,transitions={fluid:"opacity "+outOfTheWayTiming,snap:"transform "+outOfTheWayTiming+", opacity "+outOfTheWayTiming,drop:function(e){e=e+"s "+curves.drop;return"transform "+e+", opacity "+e},outOfTheWay:"transform "+outOfTheWayTiming,placeholder:"height "+outOfTheWayTiming+", width "+outOfTheWayTiming+", margin "+outOfTheWayTiming},moveTo=function(e){return isEqual(e,origin)?null:"translate("+e.x+"px, "+e.y+"px)"},transforms={moveTo:moveTo,drop:function(e,t){e=moveTo(e);return e?t?e+" scale("+combine.scale.drop+")":e:null}},minDropTime=timings.minDropTime,maxDropTime=timings.maxDropTime,dropTimeRange=maxDropTime-minDropTime,maxDropTimeAtDistance=1500,cancelDropModifier=.6,getDropDuration=function(e){var t=e.current,n=e.destination,e=e.reason,t=distance(t,n);return t<=0?minDropTime:maxDropTimeAtDistance<=t?maxDropTime:(n=minDropTime+dropTimeRange*(t/maxDropTimeAtDistance),Number(("CANCEL"===e?n*cancelDropModifier:n).toFixed(2)))},getNewHomeClientOffset=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,i=e.viewport,e=e.afterCritical,o=r.draggables,r=r.droppables,a=whatIsDraggedOver(t),a=a?r[a]:null,r=r[n.descriptor.droppableId],t=getClientBorderBoxCenter({impact:t,draggable:n,draggables:o,afterCritical:e,droppable:a||r,viewport:i});return subtract(t,n.client.borderBox.center)},getDropImpact=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,i=e.home,o=e.viewport,e=e.onLiftImpact;return r.at&&"DROP"===n?"REORDER"===r.at.type?{impact:r,didDropInsideDroppable:!0}:{impact:_extends({},r,{displaced:emptyGroups}),didDropInsideDroppable:!0}:{impact:recompute({draggables:t,impact:e,destination:i,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1}},drop$1=function(e){var c=e.getState,u=e.dispatch;return function(l){return function(e){var t,n,r,i,o,a,s;"DROP"!==e.type?l(e):(t=c(),e=e.payload.reason,"COLLECTING"===t.phase?u(dropPending({reason:e})):"IDLE"!==t.phase&&("DROP_PENDING"===t.phase&&t.isWaiting&&invariant(!1),"DRAGGING"!==t.phase&&"DROP_PENDING"!==t.phase&&invariant(!1),i=t.critical,s=(n=t.dimensions).draggables[t.critical.draggable.id],r=(a=getDropImpact({reason:e,lastImpact:t.impact,afterCritical:t.afterCritical,onLiftImpact:t.onLiftImpact,home:t.dimensions.droppables[t.critical.droppable.id],viewport:t.viewport,draggables:t.dimensions.draggables})).impact,o=(a=a.didDropInsideDroppable)?tryGetDestination(r):null,a=a?tryGetCombine(r):null,i={index:i.draggable.index,droppableId:i.droppable.id},i={draggableId:s.descriptor.id,type:s.descriptor.type,source:i,reason:e,mode:t.movementMode,destination:o,combine:a},o=getNewHomeClientOffset({impact:r,draggable:s,dimensions:n,viewport:t.viewport,afterCritical:t.afterCritical}),a={critical:t.critical,afterCritical:t.afterCritical,result:i,impact:r},!isEqual(t.current.client.offset,o)||Boolean(i.combine)?(s=getDropDuration({current:t.current.client.offset,destination:o,reason:e}),u(animateDrop({newHomeClientOffset:o,dropDuration:s,completed:a}))):u(completeDrop({completed:a}))))}}},getWindowScroll=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function getWindowScrollBinding(t){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(e){e.target!==window&&e.target!==window.document||t()}}}function getScrollListener(e){var t=e.onWindowScroll;var n=rafSchd$1(function(){t(getWindowScroll())}),r=getWindowScrollBinding(n),i=noop;function o(){return i!==noop}return{start:function(){o()&&invariant(!1),i=bindEvents(window,[r])},stop:function(){o()||invariant(!1),n.cancel(),i(),i=noop},isActive:o}}var shouldEnd=function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type},scrollListener=function(t){var n=getScrollListener({onWindowScroll:function(e){t.dispatch(moveByWindowScroll({newScroll:e}))}});return function(t){return function(e){n.isActive()||"INITIAL_PUBLISH"!==e.type||n.start(),n.isActive()&&shouldEnd(e)&&n.stop(),t(e)}}},getExpiringAnnounce=function(t){function e(e){n||r||(n=!0,t(e),clearTimeout(i))}var n=!1,r=!1,i=setTimeout(function(){r=!0});return e.wasCalled=function(){return n},e},getAsyncMarshal=function(){var r=[];return{add:function(e){var n=setTimeout(function(){return t=n,-1===(e=findIndex(r,function(e){return e.timerId===t}))&&invariant(!1),void r.splice(e,1)[0].callback();var t,e});r.push({timerId:n,callback:e})},flush:function(){var e;r.length&&(e=[].concat(r),r.length=0,e.forEach(function(e){clearTimeout(e.timerId),e.callback()}))}}},areLocationsEqual=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.droppableId===t.droppableId&&e.index===t.index},isCombineEqual=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId},isCriticalEqual=function(e,t){var n;return e===t||(n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,e=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type,n&&e)},withTimings=function(e,t){t()},getDragStart=function(e,t){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t}},execute=function(e,t,n,r){e&&(e(t,{announce:e=getExpiringAnnounce(n)}),e.wasCalled())||n(r(t))},getPublisher=function(s,l){function t(e){u||invariant(!1),u=null,withTimings("onDragEnd",function(){return execute(s().onDragEnd,e,l,preset.onDragEnd)})}var c=getAsyncMarshal(),u=null;return{beforeCapture:function(t,n){u&&invariant(!1),withTimings("onBeforeCapture",function(){var e=s().onBeforeCapture;e&&e({draggableId:t,mode:n})})},beforeStart:function(t,n){u&&invariant(!1),withTimings("onBeforeDragStart",function(){var e=s().onBeforeDragStart;e&&e(getDragStart(t,n))})},start:function(e,t){u&&invariant(!1);var n=getDragStart(e,t);u={mode:t,lastCritical:e,lastLocation:n.source,lastCombine:null},c.add(function(){withTimings("onDragStart",function(){return execute(s().onDragStart,n,l,preset.onDragStart)})})},update:function(e,t){var n,r=tryGetDestination(t),t=tryGetCombine(t),i=(u||invariant(!1),!isCriticalEqual(e,u.lastCritical)),o=(i&&(u.lastCritical=e),!areLocationsEqual(u.lastLocation,r)),a=(o&&(u.lastLocation=r),!isCombineEqual(u.lastCombine,t));a&&(u.lastCombine=t),(i||o||a)&&(n=_extends({},getDragStart(e,u.mode),{combine:t,destination:r}),c.add(function(){withTimings("onDragUpdate",function(){return execute(s().onDragUpdate,n,l,preset.onDragUpdate)})}))},flush:function(){u||invariant(!1),c.flush()},drop:t,abort:function(){var e;u&&(e=_extends({},getDragStart(u.lastCritical,u.mode),{combine:null,destination:null,reason:"CANCEL"}),t(e))}}},responders=function(e,t){var i=getPublisher(e,t);return function(r){return function(n){return function(e){var t;"BEFORE_INITIAL_CAPTURE"===e.type?i.beforeCapture(e.payload.draggableId,e.payload.movementMode):"INITIAL_PUBLISH"===e.type?(t=e.payload.critical,i.beforeStart(t,e.payload.movementMode),n(e),i.start(t,e.payload.movementMode)):"DROP_COMPLETE"===e.type?(t=e.payload.completed.result,i.flush(),n(e),i.drop(t)):(n(e),"FLUSH"===e.type?i.abort():"DRAGGING"===(t=r.getState()).phase&&i.update(t.critical,t.impact))}}}},dropAnimationFinish=function(n){return function(t){return function(e){"DROP_ANIMATION_FINISHED"!==e.type?t(e):("DROP_ANIMATING"!==(e=n.getState()).phase&&invariant(!1),n.dispatch(completeDrop({completed:e.completed})))}}},dropAnimationFlushOnScroll=function(r){var i=null,o=null;return function(n){return function(e){var t;"FLUSH"!==e.type&&"DROP_COMPLETE"!==e.type&&"DROP_ANIMATION_FINISHED"!==e.type||(o&&(cancelAnimationFrame(o),o=null),i&&(i(),i=null)),n(e),"DROP_ANIMATE"===e.type&&(t={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===r.getState().phase&&r.dispatch(dropAnimationFinished())}},o=requestAnimationFrame(function(){o=null,i=bindEvents(window,[t])}))}}},dimensionMarshalStopper=function(n){return function(){return function(t){return function(e){"DROP_COMPLETE"!==e.type&&"FLUSH"!==e.type&&"DROP_ANIMATE"!==e.type||n.stopPublishing(),t(e)}}}},focus=function(n){var r=!1;return function(){return function(t){return function(e){"INITIAL_PUBLISH"===e.type?(r=!0,n.tryRecordFocus(e.payload.critical.draggable.id),t(e),n.tryRestoreFocusRecorded()):(t(e),r&&("FLUSH"===e.type?(r=!1,n.tryRestoreFocusRecorded()):"DROP_COMPLETE"===e.type&&(r=!1,(e=e.payload.completed.result).combine&&n.tryShiftRecord(e.draggableId,e.combine.draggableId),n.tryRestoreFocusRecorded())))}}}},shouldStop=function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type},autoScroll=function(i){return function(r){return function(n){return function(e){var t;shouldStop(e)?(i.stop(),n(e)):"INITIAL_PUBLISH"===e.type?(n(e),"DRAGGING"!==(t=r.getState()).phase&&invariant(!1),i.start(t)):(n(e),i.scroll(r.getState()))}}}},pendingDrop=function(n){return function(t){return function(e){t(e),"PUBLISH_WHILE_DRAGGING"!==e.type||"DROP_PENDING"!==(e=n.getState()).phase||e.isWaiting||n.dispatch(drop({reason:e.reason}))}}},composeEnhancers=compose,createStore=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,i=e.getResponders,o=e.announce,e=e.autoScroller;return createStore$1(reducer$1,composeEnhancers(applyMiddleware(style(r),dimensionMarshalStopper(t),lift$1(t),drop$1,dropAnimationFinish,dropAnimationFlushOnScroll,pendingDrop,autoScroll(e),scrollListener,focus(n),responders(i,o))))},clean$1=function(){return{additions:{},removals:{},modified:{}}};function createPublisher(e){function n(){a||(i.collectionStarting(),a=requestAnimationFrame(function(){a=null;var e=o,t=e.additions,n=e.removals,e=e.modified,t=Object.keys(t).map(function(e){return r.draggable.getById(e).getDimension(origin)}).sort(function(e,t){return e.descriptor.index-t.descriptor.index}),e=Object.keys(e).map(function(e){return{droppableId:e,scroll:r.droppable.getById(e).callbacks.getScrollWhileDragging()}}),t={additions:t,removals:Object.keys(n),modified:e};o=clean$1(),i.publish(t)}))}var r=e.registry,i=e.callbacks,o=clean$1(),a=null;return{add:function(e){var t=e.descriptor.id;o.additions[t]=e,o.modified[e.descriptor.droppableId]=!0,o.removals[t]&&delete o.removals[t],n()},remove:function(e){e=e.descriptor;o.removals[e.id]=!0,o.modified[e.droppableId]=!0,o.additions[e.id]&&delete o.additions[e.id],n()},stop:function(){a&&(cancelAnimationFrame(a),a=null,o=clean$1())}}}var getMaxScroll=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,e=e.width,n=subtract({x:n,y:t},{x:e,y:r});return{x:Math.max(0,n.x),y:Math.max(0,n.y)}},getDocumentElement=function(){var e=document.documentElement;return e||invariant(!1),e},getMaxWindowScroll=function(){var e=getDocumentElement();return getMaxScroll({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},getViewport=function(){var e=getWindowScroll(),t=getMaxWindowScroll(),n=e.y,r=e.x,i=getDocumentElement(),o=i.clientWidth,i=i.clientHeight;return{frame:getRect({top:n,left:r,right:r+o,bottom:n+i}),scroll:{initial:e,current:e,max:t,diff:{value:origin,displacement:origin}}}},getInitialPublish=function(e){var t=e.critical,n=e.scrollOptions,e=e.registry,r=getViewport(),i=r.scroll.current,o=t.droppable,o=e.droppable.getAllByType(o.type).map(function(e){return e.callbacks.getDimensionAndWatchScroll(i,n)}),e=e.draggable.getAllByType(t.draggable.type).map(function(e){return e.getDimension(i)});return{dimensions:{draggables:toDraggableMap(e),droppables:toDroppableMap(o)},critical:t,viewport:r}};function shouldPublishUpdate(e,t,n){return n.descriptor.id!==t.id&&n.descriptor.type===t.type&&"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode}var createDimensionMarshal=function(r,n){function i(e){o||invariant(!1);var t=o.critical.draggable;"ADDITION"===e.type&&shouldPublishUpdate(r,t,e.value)&&a.add(e.value),"REMOVAL"===e.type&&shouldPublishUpdate(r,t,e.value)&&a.remove(e.value)}var o=null,a=createPublisher({callbacks:{publish:n.publishWhileDragging,collectionStarting:n.collectionStarting},registry:r});return{updateDroppableIsEnabled:function(e,t){r.droppable.exists(e)||invariant(!1),o&&n.updateDroppableIsEnabled({id:e,isEnabled:t})},updateDroppableIsCombineEnabled:function(e,t){o&&(r.droppable.exists(e)||invariant(!1),n.updateDroppableIsCombineEnabled({id:e,isCombineEnabled:t}))},scrollDroppable:function(e,t){o&&r.droppable.getById(e).callbacks.scroll(t)},updateDroppableScroll:function(e,t){o&&(r.droppable.exists(e)||invariant(!1),n.updateDroppableScroll({id:e,newScroll:t}))},startPublishing:function(e){o&&invariant(!1);var t=r.draggable.getById(e.draggableId),n=r.droppable.getById(t.descriptor.droppableId),t={draggable:t.descriptor,droppable:n.descriptor},n=r.subscribe(i);return o={critical:t,unsubscribe:n},getInitialPublish({critical:t,registry:r,scrollOptions:e.scrollOptions})},stopPublishing:function(){var e;o&&(a.stop(),e=o.critical.droppable,r.droppable.getAllByType(e.type).forEach(function(e){return e.callbacks.dragStopped()}),o.unsubscribe(),o=null)}}},canStartDrag=function(e,t){return"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason},scrollWindow=function(e){window.scrollBy(e.x,e.y)},getScrollableDroppables=memoizeOne(function(e){return toDroppableList(e).filter(function(e){return!!e.isEnabled&&!!e.frame})}),getScrollableDroppableOver=function(t,e){return find(getScrollableDroppables(e),function(e){return e.frame||invariant(!1),isPositionInFrame(e.frame.pageMarginBox)(t)})},getBestScrollableDroppable=function(e){var t=e.center,n=e.destination,e=e.droppables;return n?(n=e[n]).frame?n:null:getScrollableDroppableOver(t,e)},config$1={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(e){return Math.pow(e,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},getDistanceThresholds=function(e,t){return{startScrollingFrom:e[t.size]*config$1.startFromPercentage,maxScrollValueAt:e[t.size]*config$1.maxScrollAtPercentage}},getPercentage=function(e){var t=e.startOfRange,n=e.endOfRange,e=e.current,n=n-t;return 0==n?0:(e-t)/n},minScroll=1,getValueFromDistance=function(e,t){return e>t.startScrollingFrom?0:e<=t.maxScrollValueAt?config$1.maxPixelScroll:e===t.startScrollingFrom?minScroll:(t=getPercentage({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),e=config$1.maxPixelScroll*config$1.ease(1-t),Math.ceil(e))},accelerateAt=config$1.durationDampening.accelerateAt,stopAt=config$1.durationDampening.stopDampeningAt,dampenValueByTime=function(e,t){var n=stopAt,t=Date.now()-t;return stopAt<=t?e:t<accelerateAt?minScroll:(n=getPercentage({startOfRange:accelerateAt,endOfRange:n,current:t}),t=e*config$1.ease(n),Math.ceil(t))},getValue=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,e=e.shouldUseTimeDampening,t=getValueFromDistance(t,n);return 0===t?0:e?Math.max(dampenValueByTime(t,r),minScroll):t},getScrollOnAxis=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,i=e.axis,e=e.shouldUseTimeDampening,t=getDistanceThresholds(t,i);return n[i.end]<n[i.start]?getValue({distanceToEdge:n[i.end],thresholds:t,dragStartTime:r,shouldUseTimeDampening:e}):-1*getValue({distanceToEdge:n[i.start],thresholds:t,dragStartTime:r,shouldUseTimeDampening:e})},adjustForSizeLimits=function(e){var t=e.container,n=e.subject,e=e.proposedScroll,r=n.height>t.height,n=n.width>t.width;return n||r?n&&r?null:{x:n?0:e.x,y:r?0:e.y}:e},clean$2=apply(function(e){return 0===e?0:e}),getScroll=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,i=e.center,e=e.shouldUseTimeDampening,i={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},o=getScrollOnAxis({container:n,distanceToEdges:i,dragStartTime:t,axis:vertical,shouldUseTimeDampening:e}),i=getScrollOnAxis({container:n,distanceToEdges:i,dragStartTime:t,axis:horizontal,shouldUseTimeDampening:e}),t=clean$2({x:i,y:o});return isEqual(t,origin)||!(e=adjustForSizeLimits({container:n,subject:r,proposedScroll:t}))||isEqual(e,origin)?null:e},smallestSigned=apply(function(e){return 0===e?0:0<e?1:-1}),getOverlap=function(){function r(e,t){return e<0?e:t<e?e-t:0}return function(e){var t=e.current,n=e.max,e=e.change,t=add(t,e),e={x:r(t.x,n.x),y:r(t.y,n.y)};return isEqual(e,origin)?null:e}}(),canPartiallyScroll=function(e){var t=e.max,n=e.current,e=e.change,t={x:Math.max(n.x,t.x),y:Math.max(n.y,t.y)},e=smallestSigned(e),t=getOverlap({max:t,current:n,change:e});return!t||0!==e.x&&0===t.x||0!==e.y&&0===t.y},canScrollWindow=function(e,t){return canPartiallyScroll({current:e.scroll.current,max:e.scroll.max,change:t})},getWindowOverlap=function(e,t){var n;return canScrollWindow(e,t)?(n=e.scroll.max,e=e.scroll.current,getOverlap({current:e,max:n,change:t})):null},canScrollDroppable=function(e,t){e=e.frame;return!!e&&canPartiallyScroll({current:e.scroll.current,max:e.scroll.max,change:t})},getDroppableOverlap=function(e,t){var n=e.frame;return n&&canScrollDroppable(e,t)?getOverlap({current:n.scroll.current,max:n.scroll.max,change:t}):null},getWindowScrollChange=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,e=e.shouldUseTimeDampening,i=getScroll({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:e});return i&&canScrollWindow(t,i)?i:null},getDroppableScrollChange=function(e){var t=e.droppable,n=e.subject,r=e.center,i=e.dragStartTime,e=e.shouldUseTimeDampening,o=t.frame;return o&&(i=getScroll({dragStartTime:i,container:o.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:e}))&&canScrollDroppable(t,i)?i:null},scroll$1=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,e=e.scrollDroppable,o=t.current.page.borderBoxCenter,a=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){var s=t.viewport,s=getWindowScrollChange({dragStartTime:n,viewport:s,subject:a,center:o,shouldUseTimeDampening:r});if(s)return void i(s)}i=getBestScrollableDroppable({center:o,destination:whatIsDraggedOver(t.impact),droppables:t.dimensions.droppables});i&&(s=getDroppableScrollChange({dragStartTime:n,droppable:i,subject:a,center:o,shouldUseTimeDampening:r}))&&e(i.descriptor.id,s)},createFluidScroller=function(e){function i(e){a||invariant(!1);var t=a.shouldUseTimeDampening,n=(n=a).dragStartTime;scroll$1({state:e,scrollWindow:r,scrollDroppable:o,dragStartTime:n,shouldUseTimeDampening:t})}var t=e.scrollWindow,e=e.scrollDroppable,r=rafSchd$1(t),o=rafSchd$1(e),a=null;return{start:function(e){a&&invariant(!1);function t(){r=!0}var n=Date.now(),r=!1;scroll$1({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:t,scrollDroppable:t}),a={dragStartTime:n,shouldUseTimeDampening:r},r&&i(e)},stop:function(){a&&(r.cancel(),o.cancel(),a=null)},scroll:i}},createJumpScroller=function(e){var o=e.move,a=e.scrollDroppable,s=e.scrollWindow;return function(e){var t,n,r,i=e.scrollJumpRequest;i&&((r=whatIsDraggedOver(e.impact))||invariant(!1),r=e.dimensions.droppables[r],t=canScrollDroppable(r,i=i)?(t=getDroppableOverlap(r,i))?(t=subtract(i,t),a(r.descriptor.id,t),subtract(i,t)):(a(r.descriptor.id,i),null):i)&&(r=e.viewport,i=e.isWindowScrollAllowed,r=r,n=t,i=i&&canScrollWindow(r,n)?(i=getWindowOverlap(r,n))?(r=subtract(n,i),s(r),subtract(n,r)):(s(n),null):n)&&(r=add((r=e).current.client.selection,i),o({client:r}))}},createAutoScroller=function(e){var t=e.scrollDroppable,n=e.scrollWindow,e=e.move,r=createFluidScroller({scrollWindow:n,scrollDroppable:t}),i=createJumpScroller({move:e,scrollWindow:n,scrollDroppable:t});return{scroll:function(e){"DRAGGING"===e.phase&&("FLUID"===e.movementMode?r.scroll(e):e.scrollJumpRequest&&i(e))},start:r.start,stop:r.stop}},prefix$1="data-rbd",dragHandle=function(){var e=prefix$1+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),draggable=function(){var e=prefix$1+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),droppable=function(){var e=prefix$1+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),scrollContainer={contextId:prefix$1+"-scroll-container-context-id"},makeGetSelector=function(t){return function(e){return"["+e+'="'+t+'"]'}},getStyles=function(e,n){return e.map(function(e){var t=e.styles[n];return t?e.selector+" { "+t+" }":""}).join(" ")},noPointerEvents="pointer-events: none;",getStyles$1=function(e){var e=makeGetSelector(e),t=(t="\n cursor: -webkit-grab;\n cursor: grab;\n ",{selector:e(dragHandle.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:t,dragging:noPointerEvents,dropAnimating:t}});n="\n transition: "+transitions.outOfTheWay+";\n ";var n=[{selector:e(draggable.contextId),styles:{dragging:n,dropAnimating:n,userCancel:n}},t,{selector:e(droppable.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:getStyles(n,"always"),resting:getStyles(n,"resting"),dragging:getStyles(n,"dragging"),dropAnimating:getStyles(n,"dropAnimating"),userCancel:getStyles(n,"userCancel")}},useIsomorphicLayoutEffect="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?react.exports.useLayoutEffect:react.exports.useEffect,getHead=function(){var e=document.querySelector("head");return e||invariant(!1),e},createStyleEl=function(e){var t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function useStyleMarshal(n,r){var i=useMemo(function(){return getStyles$1(n)},[n]),o=react.exports.useRef(null),a=react.exports.useRef(null),s=useCallback(memoizeOne(function(e){var t=a.current;t||invariant(!1),t.textContent=e}),[]),l=useCallback(function(e){var t=o.current;t||invariant(!1),t.textContent=e},[]),e=(useIsomorphicLayoutEffect(function(){(o.current||a.current)&&invariant(!1);var e=createStyleEl(r),t=createStyleEl(r);return o.current=e,a.current=t,e.setAttribute(prefix$1+"-always",n),t.setAttribute(prefix$1+"-dynamic",n),getHead().appendChild(e),getHead().appendChild(t),l(i.always),s(i.resting),function(){function e(e){var t=e.current;t||invariant(!1),getHead().removeChild(t),e.current=null}e(o),e(a)}},[r,l,s,i.always,i.resting,n]),useCallback(function(){return s(i.dragging)},[s,i.dragging])),t=useCallback(function(e){s("DROP"===e?i.dropAnimating:i.userCancel)},[s,i.dropAnimating,i.userCancel]),c=useCallback(function(){a.current&&s(i.resting)},[s,i.resting]);return useMemo(function(){return{dragging:e,dropping:t,resting:c}},[e,t,c])}var getWindowFromEl=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function isHtmlElement(e){return e instanceof getWindowFromEl(e).HTMLElement}function findDragHandle(e,t){var e="["+dragHandle.contextId+'="'+e+'"]',e=toArray(document.querySelectorAll(e));return e.length&&(e=find(e,function(e){return e.getAttribute(dragHandle.draggableId)===t}))&&isHtmlElement(e)?e:null}function useFocusMarshal(t){var r=react.exports.useRef({}),n=react.exports.useRef(null),i=react.exports.useRef(null),o=react.exports.useRef(!1),e=useCallback(function(t,e){var n={id:t,focus:e};return r.current[t]=n,function(){var e=r.current;e[t]!==n&&delete e[t]}},[]),a=useCallback(function(e){e=findDragHandle(t,e);e&&e!==document.activeElement&&e.focus()},[t]),s=useCallback(function(e,t){n.current===e&&(n.current=t)},[]),l=useCallback(function(){i.current||o.current&&(i.current=requestAnimationFrame(function(){i.current=null;var e=n.current;e&&a(e)}))},[a]),c=useCallback(function(e){n.current=null;var t=document.activeElement;t&&t.getAttribute(dragHandle.draggableId)===e&&(n.current=e)},[]);return useIsomorphicLayoutEffect(function(){return o.current=!0,function(){o.current=!1;var e=i.current;e&&cancelAnimationFrame(e)}},[]),useMemo(function(){return{register:e,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}},[e,c,l,s])}function createRegistry(){var r={draggables:{},droppables:{}},n=[];function i(t){n.length&&n.forEach(function(e){return e(t)})}function o(e){return r.draggables[e]||null}function a(e){return r.droppables[e]||null}return{draggable:{register:function(e){i({type:"ADDITION",value:r.draggables[e.descriptor.id]=e})},update:function(e,t){var n=r.draggables[t.descriptor.id];n&&n.uniqueId===e.uniqueId&&(delete r.draggables[t.descriptor.id],r.draggables[e.descriptor.id]=e)},unregister:function(e){var t=e.descriptor.id,n=o(t);n&&e.uniqueId===n.uniqueId&&(delete r.draggables[t],i({type:"REMOVAL",value:e}))},getById:function(e){return(e=o(e))||invariant(!1),e},findById:o,exists:function(e){return Boolean(o(e))},getAllByType:function(t){return values$1(r.draggables).filter(function(e){return e.descriptor.type===t})}},droppable:{register:function(e){r.droppables[e.descriptor.id]=e},unregister:function(e){var t=a(e.descriptor.id);t&&e.uniqueId===t.uniqueId&&delete r.droppables[e.descriptor.id]},getById:function(e){return(e=a(e))||invariant(!1),e},findById:a,exists:function(e){return Boolean(a(e))},getAllByType:function(t){return values$1(r.droppables).filter(function(e){return e.descriptor.type===t})}},subscribe:function(t){return n.push(t),function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}},clean:function(){r.draggables={},r.droppables={},n.length=0}}}function useRegistry(){var e=useMemo(createRegistry,[]);return react.exports.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var StoreContext=React.createContext(null),getBodyElement=function(){var e=document.body;return e||invariant(!1),e},visuallyHidden={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},getId=function(e){return"rbd-announcement-"+e};function useAnnouncer(e){var n=useMemo(function(){return getId(e)},[e]),r=react.exports.useRef(null);return react.exports.useEffect(function(){var t=document.createElement("div");return(r.current=t).id=n,t.setAttribute("aria-live","assertive"),t.setAttribute("aria-atomic","true"),_extends(t.style,visuallyHidden),getBodyElement().appendChild(t),function(){setTimeout(function(){var e=getBodyElement();e.contains(t)&&e.removeChild(t),t===r.current&&(r.current=null)})}},[n]),useCallback(function(e){var t=r.current;t&&(t.textContent=e)},[])}var count=0,defaults={separator:"::"};function useUniqueId(e,t){return useMemo(function(){return""+e+t.separator+count++},[(t=void 0===t?defaults:t).separator,e])}function getElementId(e){return"rbd-hidden-text-"+e.contextId+"-"+e.uniqueId}function useHiddenTextElement(e){var t=e.contextId,n=e.text,r=useUniqueId("hidden-text",{separator:"-"}),i=useMemo(function(){return getElementId({contextId:t,uniqueId:r})},[r,t]);return react.exports.useEffect(function(){var t=document.createElement("div");return t.id=i,t.textContent=n,t.style.display="none",getBodyElement().appendChild(t),function(){var e=getBodyElement();e.contains(t)&&e.removeChild(t)}},[i,n]),i}var AppContext=React.createContext(null);function usePrevious(e){var t=react.exports.useRef(e);return react.exports.useEffect(function(){t.current=e}),t}function create$2(){var t=null;function e(){t||invariant(!1),t=null}return{isClaimed:function(){return Boolean(t)},isActive:function(e){return e===t},claim:function(e){return t&&invariant(!1),t=e={abandon:e}},release:e,tryAbandon:function(){t&&(t.abandon(),e())}}}var _preventedKeys,tab=9,enter=13,escape$1=27,space=32,pageUp=33,pageDown=34,end=35,home=36,arrowLeft=37,arrowUp=38,arrowRight=39,arrowDown=40,preventedKeys=((_preventedKeys={})[enter]=!0,_preventedKeys[tab]=!0,_preventedKeys),preventStandardKeyEvents=function(e){preventedKeys[e.keyCode]&&e.preventDefault()},supportedEventName=function(){var e="visibilitychange";return"undefined"!=typeof document&&find([e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],function(e){return"on"+e in document})||e}(),primaryButton=0,sloppyClickThreshold=5;function isSloppyClickThresholdExceeded(e,t){return Math.abs(t.x-e.x)>=sloppyClickThreshold||Math.abs(t.y-e.y)>=sloppyClickThreshold}var _scrollJumpKeys,idle$1={type:"IDLE"};function getCaptureBindings(e){var n=e.cancel,r=e.completed,i=e.getPhase,o=e.setPhase;return[{eventName:"mousemove",fn:function(e){var t=e.button,n=e.clientX,r=e.clientY;t===primaryButton&&(t={x:n,y:r},"DRAGGING"===(n=i()).type?(e.preventDefault(),n.actions.move(t)):("PENDING"!==n.type&&invariant(!1),isSloppyClickThresholdExceeded(n.point,t)&&(e.preventDefault(),r=n.actions.fluidLift(t),o({type:"DRAGGING",actions:r}))))}},{eventName:"mouseup",fn:function(e){var t=i();("DRAGGING"!==t.type?n:(e.preventDefault(),t.actions.drop({shouldBlockNextClick:!0}),r))()}},{eventName:"mousedown",fn:function(e){"DRAGGING"===i().type&&e.preventDefault(),n()}},{eventName:"keydown",fn:function(e){"PENDING"===i().type?n():e.keyCode===escape$1?(e.preventDefault(),n()):preventStandardKeyEvents(e)}},{eventName:"resize",fn:n},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){"PENDING"===i().type&&n()}},{eventName:"webkitmouseforcedown",fn:function(e){var t=i();"IDLE"===t.type&&invariant(!1),t.actions.shouldRespectForcePress()?n():e.preventDefault()}},{eventName:supportedEventName,fn:n}]}function useMouseSensor(r){var n=react.exports.useRef(idle$1),i=react.exports.useRef(noop),e=useMemo(function(){return{eventName:"mousedown",fn:function(e){var t;e.defaultPrevented||e.button!==primaryButton||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||(t=r.findClosestDraggableId(e))&&(t=r.tryGetLock(t,a,{sourceEvent:e}))&&(e.preventDefault(),e={x:e.clientX,y:e.clientY},i.current(),c(t,e))}}},[r]),t=useMemo(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(e){var t,n;e.defaultPrevented||(t=r.findClosestDraggableId(e))&&(n=r.findOptionsForDraggable(t))&&!n.shouldRespectForcePress&&r.canGetLock(t)&&e.preventDefault()}}},[r]),o=useCallback(function(){i.current=bindEvents(window,[t,e],{passive:!1,capture:!0})},[t,e]),a=useCallback(function(){"IDLE"!==n.current.type&&(n.current=idle$1,i.current(),o())},[o]),s=useCallback(function(){var e=n.current;a(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[a]),l=useCallback(function(){var e=getCaptureBindings({cancel:s,completed:a,getPhase:function(){return n.current},setPhase:function(e){n.current=e}});i.current=bindEvents(window,e,{capture:!0,passive:!1})},[s,a]),c=useCallback(function(e,t){"IDLE"!==n.current.type&&invariant(!1),n.current={type:"PENDING",point:t,actions:e},l()},[l]);useIsomorphicLayoutEffect(function(){return o(),function(){i.current()}},[o])}function noop$1(){}(_scrollJumpKeys={})[pageDown]=!0,_scrollJumpKeys[pageUp]=!0,_scrollJumpKeys[home]=!0,_scrollJumpKeys[end]=!0;var scrollJumpKeys=_scrollJumpKeys;function getDraggingBindings(t,n){function r(){n(),t.cancel()}return[{eventName:"keydown",fn:function(e){e.keyCode===escape$1?(e.preventDefault(),r()):e.keyCode===space?(e.preventDefault(),n(),t.drop()):e.keyCode===arrowDown?(e.preventDefault(),t.moveDown()):e.keyCode===arrowUp?(e.preventDefault(),t.moveUp()):e.keyCode===arrowRight?(e.preventDefault(),t.moveRight()):e.keyCode===arrowLeft?(e.preventDefault(),t.moveLeft()):scrollJumpKeys[e.keyCode]?e.preventDefault():preventStandardKeyEvents(e)}},{eventName:"mousedown",fn:r},{eventName:"mouseup",fn:r},{eventName:"click",fn:r},{eventName:"touchstart",fn:r},{eventName:"resize",fn:r},{eventName:"wheel",fn:r,options:{passive:!0}},{eventName:supportedEventName,fn:r}]}function useKeyboardSensor(i){var o=react.exports.useRef(noop$1),e=useMemo(function(){return{eventName:"keydown",fn:function(e){var t,n;function r(){n||invariant(!1),n=!1,o.current(),a()}e.defaultPrevented||e.keyCode===space&&(t=i.findClosestDraggableId(e))&&(t=i.tryGetLock(t,r,{sourceEvent:e}))&&(e.preventDefault(),n=!0,e=t.snapLift(),o.current(),o.current=bindEvents(window,getDraggingBindings(e,r),{capture:!0,passive:!1}))}}},[i]),a=useCallback(function(){o.current=bindEvents(window,[e],{passive:!1,capture:!0})},[e]);useIsomorphicLayoutEffect(function(){return a(),function(){o.current()}},[a])}var idle$2={type:"IDLE"},timeForLongPress=120,forcePressThreshold=.15;function getWindowBindings(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){"DRAGGING"!==n().type||e.keyCode===escape$1&&e.preventDefault(),t()}},{eventName:supportedEventName,fn:t}]}function getHandleBindings(e){var r=e.cancel,n=e.completed,i=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(e){var t,n=i();"DRAGGING"!==n.type?r():(n.hasMoved=!0,t={x:(t=e.touches[0]).clientX,y:t.clientY},e.preventDefault(),n.actions.move(t))}},{eventName:"touchend",fn:function(e){var t=i();("DRAGGING"!==t.type?r:(e.preventDefault(),t.actions.drop({shouldBlockNextClick:!0}),n))()}},{eventName:"touchcancel",fn:function(e){"DRAGGING"!==i().type||e.preventDefault(),r()}},{eventName:"touchforcechange",fn:function(e){var t=i(),n=("IDLE"===t.type&&invariant(!1),e.touches[0]);if(n&&n.force>=forcePressThreshold){n=t.actions.shouldRespectForcePress();if("PENDING"!==t.type)return!n||t.hasMoved?void e.preventDefault():void r();n&&r()}}},{eventName:supportedEventName,fn:r}]}function useTouchSensor(n){var t=react.exports.useRef(idle$2),i=react.exports.useRef(noop),o=useCallback(function(){return t.current},[]),r=useCallback(function(e){t.current=e},[]),e=useMemo(function(){return{eventName:"touchstart",fn:function(e){var t;e.defaultPrevented||(t=n.findClosestDraggableId(e))&&(t=n.tryGetLock(t,s,{sourceEvent:e}))&&(e={x:(e=e.touches[0]).clientX,y:e.clientY},i.current(),d(t,e))}}},[n]),a=useCallback(function(){i.current=bindEvents(window,[e],{capture:!0,passive:!1})},[e]),s=useCallback(function(){var e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),r(idle$2),i.current(),a())},[a,r]),l=useCallback(function(){var e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[s]),c=useCallback(function(){var e={capture:!0,passive:!1},t={cancel:l,completed:s,getPhase:o},n=bindEvents(window,getHandleBindings(t),e),r=bindEvents(window,getWindowBindings(t),e);i.current=function(){n(),r()}},[l,o,s]),u=useCallback(function(){var e=o(),e=("PENDING"!==e.type&&invariant(!1),e.actions.fluidLift(e.point));r({type:"DRAGGING",actions:e,hasMoved:!1})},[o,r]),d=useCallback(function(e,t){"IDLE"!==o().type&&invariant(!1);var n=setTimeout(u,timeForLongPress);r({type:"PENDING",point:t,actions:e,longPressTimerId:n}),c()},[c,o,r,u]);useIsomorphicLayoutEffect(function(){return a(),function(){i.current();var e=o();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),r(idle$2))}},[o,a,r]),useIsomorphicLayoutEffect(function(){return bindEvents(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}])},[])}var interactiveTagNames={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function isAnInteractiveElement(e,t){var n;return null!=t&&(!!Boolean(interactiveTagNames[t.tagName.toLowerCase()])||"true"===(n=t.getAttribute("contenteditable"))||""===n||t!==e&&isAnInteractiveElement(e,t.parentElement))}function isEventInInteractiveElement(e,t){t=t.target;return!!isHtmlElement(t)&&isAnInteractiveElement(e,t)}var getBorderBoxCenterPosition=function(e){return getRect(e.getBoundingClientRect()).center};function isElement(e){return e instanceof getWindowFromEl(e).Element}var supportedMatchesName=function(){var e="matches";return"undefined"!=typeof document&&find([e,"msMatchesSelector","webkitMatchesSelector"],function(e){return e in Element.prototype})||e}();function closestPonyfill(e,t){return null==e?null:e[supportedMatchesName](t)?e:closestPonyfill(e.parentElement,t)}function closest$1(e,t){return e.closest?e.closest(t):closestPonyfill(e,t)}function getSelector(e){return"["+dragHandle.contextId+'="'+e+'"]'}function findClosestDragHandleFromEvent(e,t){var t=t.target;return isElement(t)&&(t=closest$1(t,getSelector(e)))&&isHtmlElement(t)?t:null}function tryGetClosestDraggableIdFromEvent(e,t){e=findClosestDragHandleFromEvent(e,t);return e?e.getAttribute(dragHandle.draggableId):null}function findDraggable(e,t){e="["+draggable.contextId+'="'+e+'"]',e=find(toArray(document.querySelectorAll(e)),function(e){return e.getAttribute(draggable.id)===t});return e&&isHtmlElement(e)?e:null}function preventDefault(e){e.preventDefault()}function _isActive(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!!r()&&t===n}function canStart(e){var t=e.lockAPI,n=e.store,r=e.registry,e=e.draggableId;return!(t.isClaimed()||!(t=r.draggable.findById(e))||!t.options.isEnabled||!canStartDrag(n.getState(),e))}function tryStart(e){var t,n,r,i,o,a=e.lockAPI,s=e.contextId,l=e.store,c=e.registry,u=e.draggableId,d=e.forceSensorStop,e=e.sourceEvent;return!canStart({lockAPI:a,store:l,registry:c,draggableId:u})||(t=c.draggable.getById(u),!(n=findDraggable(s,t.descriptor.id)))||e&&!t.options.canDragInteractiveElements&&isEventInInteractiveElement(n,e)?null:(r=a.claim(d||noop),i="PRE_DRAG",o=function(e,t){_isActive({expected:e,phase:i,isLockActive:f,shouldWarn:!0})&&l.dispatch(t())}.bind(null,"DRAGGING"),{isActive:function(){return _isActive({expected:"PRE_DRAG",phase:i,isLockActive:f,shouldWarn:!1})},shouldRespectForcePress:p,fluidLift:function(e){var t=rafSchd$1(function(e){o(function(){return move({client:e})})});return _extends({},h({liftActionArgs:{id:u,clientSelection:e,movementMode:"FLUID"},cleanup:function(){return t.cancel()},actions:{move:t}}),{move:t})},snapLift:function(){var e={moveUp:function(){return o(moveUp)},moveRight:function(){return o(moveRight)},moveDown:function(){return o(moveDown)},moveLeft:function(){return o(moveLeft)}};return h({liftActionArgs:{id:u,clientSelection:getBorderBoxCenterPosition(n),movementMode:"SNAP"},cleanup:noop,actions:e})},abort:function(){_isActive({expected:"PRE_DRAG",phase:i,isLockActive:f,shouldWarn:!0})&&a.release()}});function p(){return t.options.shouldRespectForcePress}function f(){return a.isActive(r)}function h(n){function r(){a.release(),i="COMPLETED"}function t(e,t){void 0===t&&(t={shouldBlockNextClick:!1}),n.cleanup(),t.shouldBlockNextClick&&(t=bindEvents(window,[{eventName:"click",fn:preventDefault,options:{once:!0,passive:!1,capture:!0}}]),setTimeout(t)),r(),l.dispatch(drop({reason:e}))}return"PRE_DRAG"!==i&&(r(),"PRE_DRAG"!==i)&&invariant(!1),l.dispatch(lift(n.liftActionArgs)),i="DRAGGING",_extends({isActive:function(){return _isActive({expected:"DRAGGING",phase:i,isLockActive:f,shouldWarn:!1})},shouldRespectForcePress:p,drop:function(e){return t("DROP",e)},cancel:function(e){return t("CANCEL",e)}},n.actions)}}var defaultSensors=[useMouseSensor,useKeyboardSensor,useTouchSensor];function useSensorMarshal(e){for(var r=e.contextId,i=e.store,o=e.registry,t=e.customSensors,e=e.enableDefaultSensors,n=[].concat(e?defaultSensors:[],t||[]),a=react.exports.useState(function(){return create$2()})[0],s=useCallback(function(e,t){e.isDragging&&!t.isDragging&&a.tryAbandon()},[a]),l=(useIsomorphicLayoutEffect(function(){var t=i.getState();return i.subscribe(function(){var e=i.getState();s(t,e),t=e})},[a,i,s]),useIsomorphicLayoutEffect(function(){return a.tryAbandon},[a.tryAbandon]),useCallback(function(e){return canStart({lockAPI:a,registry:o,store:i,draggableId:e})},[a,o,i])),c=useCallback(function(e,t,n){return tryStart({lockAPI:a,registry:o,contextId:r,store:i,draggableId:e,forceSensorStop:t,sourceEvent:n&&n.sourceEvent?n.sourceEvent:null})},[r,a,o,i]),u=useCallback(function(e){return tryGetClosestDraggableIdFromEvent(r,e)},[r]),d=useCallback(function(e){e=o.draggable.findById(e);return e?e.options:null},[o.draggable]),p=useCallback(function(){a.isClaimed()&&(a.tryAbandon(),"IDLE"!==i.getState().phase)&&i.dispatch(flush())},[a,i]),f=useCallback(a.isClaimed,[a]),h=useMemo(function(){return{canGetLock:l,tryGetLock:c,findClosestDraggableId:u,findOptionsForDraggable:d,tryReleaseLock:p,isLockClaimed:f}},[l,c,u,d,p,f]),m=0;m<n.length;m++)n[m](h)}var createResponders=function(e){return{onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}};function getStore(e){return e.current||invariant(!1),e.current}function App$1(e){var t=e.contextId,n=e.setCallbacks,r=e.sensors,i=e.nonce,o=e.dragHandleUsageInstructions,a=react.exports.useRef(null),s=usePrevious(e),l=useCallback(function(){return createResponders(s.current)},[s]),c=useAnnouncer(t),u=useHiddenTextElement({contextId:t,text:o}),d=useStyleMarshal(t,i),p=useCallback(function(e){getStore(a).dispatch(e)},[]),f=useMemo(function(){return bindActionCreators$1({publishWhileDragging:publishWhileDragging,updateDroppableScroll:updateDroppableScroll,updateDroppableIsEnabled:updateDroppableIsEnabled,updateDroppableIsCombineEnabled:updateDroppableIsCombineEnabled,collectionStarting:collectionStarting},p)},[p]),h=useRegistry(),m=useMemo(function(){return createDimensionMarshal(h,f)},[h,f]),g=useMemo(function(){return createAutoScroller(_extends({scrollWindow:scrollWindow,scrollDroppable:m.scrollDroppable},bindActionCreators$1({move:move},p)))},[m.scrollDroppable,p]),v=useFocusMarshal(t),o=useMemo(function(){return createStore({announce:c,autoScroller:g,dimensionMarshal:m,focusMarshal:v,getResponders:l,styleMarshal:d})},[c,g,m,v,l,d]),y=(a.current=o,useCallback(function(){var e=getStore(a);"IDLE"!==e.getState().phase&&e.dispatch(flush())},[])),x=useCallback(function(){var e=getStore(a).getState();return e.isDragging||"DROP_ANIMATING"===e.phase},[]),b=(n(useMemo(function(){return{isDragging:x,tryAbort:y}},[x,y])),useCallback(function(e){return canStartDrag(getStore(a).getState(),e)},[])),C=useCallback(function(){return isMovementAllowed(getStore(a).getState())},[]),i=useMemo(function(){return{marshal:m,focus:v,contextId:t,canLift:b,isMovementAllowed:C,dragHandleUsageInstructionsId:u,registry:h}},[t,m,u,v,b,C,h]);return useSensorMarshal({contextId:t,store:o,registry:h,customSensors:r,enableDefaultSensors:!1!==e.enableDefaultSensors}),react.exports.useEffect(function(){return y},[y]),React.createElement(AppContext.Provider,{value:i},React.createElement(Provider,{context:StoreContext,store:o},e.children))}var count$1=0;function useInstanceCount(){return useMemo(function(){return""+count$1++},[])}function DragDropContext(t){var n=useInstanceCount(),r=t.dragHandleUsageInstructions||preset.dragHandleUsageInstructions;return React.createElement(ErrorBoundary,null,function(e){return React.createElement(App$1,{nonce:t.nonce,contextId:n,setCallbacks:e,dragHandleUsageInstructions:r,enableDefaultSensors:t.enableDefaultSensors,sensors:t.sensors,onBeforeCapture:t.onBeforeCapture,onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragUpdate:t.onDragUpdate,onDragEnd:t.onDragEnd},t.children)})}var isEqual$1=function(t){return function(e){return t===e}},isScroll=isEqual$1("scroll"),isAuto=isEqual$1("auto"),isEither=function(e,t){return t(e.overflowX)||t(e.overflowY)},isElementScrollable=function(e){e=window.getComputedStyle(e),e={overflowX:e.overflowX,overflowY:e.overflowY};return isEither(e,isScroll)||isEither(e,isAuto)},isBodyScrollable=function(){return!1},getClosestScrollable=function e(t){return null==t?null:t===document.body?isBodyScrollable()?t:null:t===document.documentElement?null:isElementScrollable(t)?t:e(t.parentElement)},getScroll$1=function(e){return{x:e.scrollLeft,y:e.scrollTop}},getIsFixed=function e(t){return!!t&&("fixed"===window.getComputedStyle(t).position||e(t.parentElement))},getEnv=function(e){return{closestScrollable:getClosestScrollable(e),isFixedOnPage:getIsFixed(e)}},getDroppableDimension=function(e){var t,n=e.descriptor,r=e.isEnabled,i=e.isCombineEnabled,o=e.isFixedOnPage,a=e.direction,s=e.client,l=e.page,e=e.closest,c=e?(u=e.scrollSize,c=e.client,t=getMaxScroll({scrollHeight:u.scrollHeight,scrollWidth:u.scrollWidth,height:c.paddingBox.height,width:c.paddingBox.width}),{pageMarginBox:e.page.marginBox,frameClient:c,scrollSize:u,shouldClipSubject:e.shouldClipSubject,scroll:{initial:e.scroll,current:e.scroll,max:t,diff:{value:origin,displacement:origin}}}):null,u="vertical"===a?vertical:horizontal;return{descriptor:n,isCombineEnabled:i,isFixedOnPage:o,axis:u,isEnabled:r,client:s,page:l,frame:c,subject:getSubject({page:l,withPlaceholder:null,axis:u,frame:c})}},getClient=function(e,t){var n,r,i=getBox(e);return!t||e!==t?i:(e=i.paddingBox.top-t.scrollTop,n=i.paddingBox.left-t.scrollLeft,r=e+t.scrollHeight,t=n+t.scrollWidth,e=expand({top:e,right:t,bottom:r,left:n},i.border),createBox({borderBox:e,margin:i.margin,border:i.border,padding:i.padding}))},getDimension=function(e){var t,n=e.ref,r=e.descriptor,i=e.env,o=e.windowScroll,a=e.direction,s=e.isDropDisabled,l=e.isCombineEnabled,e=e.shouldClipSubject,c=i.closestScrollable,n=getClient(n,c),u=withScroll(n,o),d=c?(d=getBox(c),t={scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth},{client:d,page:withScroll(d,o),scroll:getScroll$1(c),scrollSize:t,shouldClipSubject:e}):null;return getDroppableDimension({descriptor:r,isEnabled:!s,isCombineEnabled:l,isFixedOnPage:i.isFixedOnPage,direction:a,client:n,page:u,closest:d})},immediate={passive:!1},delayed={passive:!0},getListenerOptions=function(e){return e.shouldPublishImmediately?immediate:delayed};function useRequiredContext(e){e=react.exports.useContext(e);return e||invariant(!1),e}var getClosestScrollableFromDrag=function(e){return e&&e.env.closestScrollable||null};function useDroppablePublisher(e){var o=react.exports.useRef(null),a=useRequiredContext(AppContext),t=useUniqueId("droppable"),n=a.registry,r=a.marshal,s=usePrevious(e),l=useMemo(function(){return{id:e.droppableId,type:e.type,mode:e.mode}},[e.droppableId,e.mode,e.type]),i=react.exports.useRef(l),c=useMemo(function(){return memoizeOne(function(e,t){o.current||invariant(!1),r.updateDroppableScroll(l.id,{x:e,y:t})})},[l.id,r]),u=useCallback(function(){var e=o.current;return e&&e.env.closestScrollable?getScroll$1(e.env.closestScrollable):origin},[]),d=useCallback(function(){var e=u();c(e.x,e.y)},[u,c]),p=useMemo(function(){return rafSchd$1(d)},[d]),f=useCallback(function(){var e=o.current,t=getClosestScrollableFromDrag(e);e&&t||invariant(!1),(e.scrollOptions.shouldPublishImmediately?d:p)()},[p,d]),h=useCallback(function(e,t){o.current&&invariant(!1);var n=s.current,r=n.getDroppableRef(),i=(r||invariant(!1),getEnv(r)),t={ref:r,descriptor:l,env:i,scrollOptions:t},r=(o.current=t,getDimension({ref:r,descriptor:l,env:i,windowScroll:e,direction:n.direction,isDropDisabled:n.isDropDisabled,isCombineEnabled:n.isCombineEnabled,shouldClipSubject:!n.ignoreContainerClipping})),e=i.closestScrollable;return e&&(e.setAttribute(scrollContainer.contextId,a.contextId),e.addEventListener("scroll",f,getListenerOptions(t.scrollOptions))),r},[a.contextId,l,f,s]),m=useCallback(function(){var e=o.current,t=getClosestScrollableFromDrag(e);return e&&t||invariant(!1),getScroll$1(t)},[]),g=useCallback(function(){var e=o.current,t=(e||invariant(!1),getClosestScrollableFromDrag(e));o.current=null,t&&(p.cancel(),t.removeAttribute(scrollContainer.contextId),t.removeEventListener("scroll",f,getListenerOptions(e.scrollOptions)))},[f,p]),v=useCallback(function(e){var t=o.current,t=(t||invariant(!1),getClosestScrollableFromDrag(t));t||invariant(!1),t.scrollTop+=e.y,t.scrollLeft+=e.x},[]),y=useMemo(function(){return{getDimensionAndWatchScroll:h,getScrollWhileDragging:m,dragStopped:g,scroll:v}},[g,h,m,v]),x=useMemo(function(){return{uniqueId:t,descriptor:l,callbacks:y}},[y,l,t]);useIsomorphicLayoutEffect(function(){return i.current=x.descriptor,n.droppable.register(x),function(){o.current&&g(),n.droppable.unregister(x)}},[y,l,g,x,r,n.droppable]),useIsomorphicLayoutEffect(function(){o.current&&r.updateDroppableIsEnabled(i.current.id,!e.isDropDisabled)},[e.isDropDisabled,r]),useIsomorphicLayoutEffect(function(){o.current&&r.updateDroppableIsCombineEnabled(i.current.id,e.isCombineEnabled)},[e.isCombineEnabled,r])}function noop$2(){}var empty={width:0,height:0,margin:noSpacing},getSize=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,e=e.animate;return t||"close"===e?empty:{height:n.client.borderBox.height,width:n.client.borderBox.width,margin:n.client.margin}},getStyle=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,e=e.animate,t=getSize({isAnimatingOpenOnMount:t,placeholder:n,animate:e});return{display:n.display,boxSizing:"border-box",width:t.width,height:t.height,marginTop:t.margin.top,marginRight:t.margin.right,marginBottom:t.margin.bottom,marginLeft:t.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==e?transitions.placeholder:null}};function Placeholder(e){var t=react.exports.useRef(null),n=useCallback(function(){t.current&&(clearTimeout(t.current),t.current=null)},[]),r=e.animate,i=e.onTransitionEnd,o=e.onClose,a=e.contextId,s=react.exports.useState("open"===e.animate),l=s[0],c=s[1],s=(react.exports.useEffect(function(){return l?"open"!==r?(n(),c(!1),noop$2):t.current?noop$2:(t.current=setTimeout(function(){t.current=null,c(!1)}),n):noop$2},[r,l,n]),useCallback(function(e){"height"===e.propertyName&&(i(),"close"===r)&&o()},[r,o,i])),u=getStyle({isAnimatingOpenOnMount:l,animate:e.animate,placeholder:e.placeholder});return React.createElement(e.placeholder.tagName,{style:u,"data-rbd-placeholder-context-id":a,onTransitionEnd:s,ref:e.innerRef})}var Placeholder$1=React.memo(Placeholder),DroppableContext=React.createContext(null),AnimateInOut=function(i){function e(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=i.call.apply(i,[this].concat(n))||this).state={isVisible:Boolean(e.props.on),data:e.props.on,animate:e.props.shouldAnimate&&e.props.on?"open":"none"},e.onClose=function(){"close"===e.state.animate&&e.setState({isVisible:!1})},e}return _inheritsLoose$2(e,i),e.getDerivedStateFromProps=function(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}},e.prototype.render=function(){var e;return this.state.isVisible?(e={onClose:this.onClose,data:this.state.data,animate:this.state.animate},this.props.children(e)):null},e}(React.PureComponent),zIndexOptions={dragging:5e3,dropAnimating:4500},getDraggingTransition=function(e,t){return t?transitions.drop(t.duration):e?transitions.snap:transitions.fluid},getDraggingOpacity=function(e,t){return e?t?combine.opacity.drop:combine.opacity.combining:null},getShouldDraggingAnimate=function(e){return null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode};function getDraggingStyle(e){var t=e.dimension.client,n=e.offset,r=e.combineWith,i=e.dropping,r=Boolean(r),e=getShouldDraggingAnimate(e),o=Boolean(i),n=o?transforms.drop(n,r):transforms.moveTo(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:getDraggingTransition(e,i),transform:n,opacity:getDraggingOpacity(r,o),zIndex:o?zIndexOptions.dropAnimating:zIndexOptions.dragging,pointerEvents:"none"}}function getSecondaryStyle(e){return{transform:transforms.moveTo(e.offset),transition:e.shouldAnimateDisplacement?null:"none"}}function getStyle$1(e){return("DRAGGING"===e.type?getDraggingStyle:getSecondaryStyle)(e)}function getDimension$1(e,t,n){void 0===n&&(n=origin);var r=window.getComputedStyle(t),i=t.getBoundingClientRect(),i=calculateBox(i,r),n=withScroll(i,n);return{descriptor:e,placeholder:{client:i,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:n}}function useDraggablePublisher(e){var t=useUniqueId("draggable"),n=e.descriptor,r=e.registry,i=e.getDraggableRef,o=e.canDragInteractiveElements,a=e.shouldRespectForcePress,s=e.isEnabled,l=useMemo(function(){return{canDragInteractiveElements:o,shouldRespectForcePress:a,isEnabled:s}},[o,s,a]),c=useCallback(function(e){var t=i();return t||invariant(!1),getDimension$1(n,t,e)},[n,i]),u=useMemo(function(){return{uniqueId:t,descriptor:n,options:l,getDimension:c}},[n,c,l,t]),d=react.exports.useRef(u),p=react.exports.useRef(!0);useIsomorphicLayoutEffect(function(){return r.draggable.register(d.current),function(){return r.draggable.unregister(d.current)}},[r.draggable]),useIsomorphicLayoutEffect(function(){var e;p.current?p.current=!1:(e=d.current,d.current=u,r.draggable.update(u,e))},[u,r.draggable])}function preventHtml5Dnd(e){e.preventDefault()}function Draggable(e){var t=react.exports.useRef(null),n=useCallback(function(e){t.current=e},[]),r=useCallback(function(){return t.current},[]),i=useRequiredContext(AppContext),o=i.contextId,a=i.dragHandleUsageInstructionsId,s=i.registry,i=useRequiredContext(DroppableContext),l=i.type,c=i.droppableId,u=useMemo(function(){return{id:e.draggableId,index:e.index,type:l,droppableId:c}},[e.draggableId,e.index,l,c]),i=e.children,d=e.draggableId,p=e.isEnabled,f=e.shouldRespectForcePress,h=e.canDragInteractiveElements,m=e.isClone,g=e.mapped,v=e.dropAnimationFinished,y=(m||useDraggablePublisher(useMemo(function(){return{descriptor:u,registry:s,getDraggableRef:r,canDragInteractiveElements:h,shouldRespectForcePress:f,isEnabled:p}},[u,s,r,h,f,p])),useMemo(function(){return p?{tabIndex:0,role:"button","aria-describedby":a,"data-rbd-drag-handle-draggable-id":d,"data-rbd-drag-handle-context-id":o,draggable:!1,onDragStart:preventHtml5Dnd}:null},[o,a,d,p])),x=useCallback(function(e){"DRAGGING"===g.type&&g.dropping&&"transform"===e.propertyName&&v()},[v,g]),m=useMemo(function(){var e=getStyle$1(g),t="DRAGGING"===g.type&&g.dropping?x:null;return{innerRef:n,draggableProps:{"data-rbd-draggable-context-id":o,"data-rbd-draggable-id":d,style:e,onTransitionEnd:t},dragHandleProps:y}},[o,y,d,g,x,n]),b=useMemo(function(){return{draggableId:u.id,type:u.type,source:{index:u.index,droppableId:u.droppableId}}},[u.droppableId,u.id,u.index,u.type]);return i(m,g.snapshot,b)}var isStrictEqual=function(e,t){return e===t},whatIsDraggedOverFromResult=function(e){var t=e.combine,e=e.destination;return e?e.droppableId:t?t.droppableId:null},getCombineWithFromResult=function(e){return e.combine?e.combine.draggableId:null},getCombineWithFromImpact=function(e){return e.at&&"COMBINE"===e.at.type?e.at.combine.draggableId:null};function getDraggableSelector(){var s=memoizeOne(function(e,t){return{x:e,y:t}}),l=memoizeOne(function(e,t,n,r,i){return{isDragging:!0,isClone:t,isDropAnimating:Boolean(i),dropAnimation:i,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null}}),c=memoizeOne(function(e,t,n,r,i,o,a){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:o,mode:t,offset:e,dimension:n,forceShouldAnimate:a,snapshot:l(t,r,i,o,null)}}});return function(e,t){var n,r,i,o,a;return e.isDragging?e.critical.draggable.id!==t.draggableId?null:(o=e.current.client.offset,n=e.dimensions.draggables[t.draggableId],r=whatIsDraggedOver(e.impact),a=getCombineWithFromImpact(e.impact),i=e.forceShouldAnimate,c(s(o.x,o.y),e.movementMode,n,t.isClone,r,a,i)):"DROP_ANIMATING"!==e.phase||(o=e.completed).result.draggableId!==t.draggableId?null:(n=t.isClone,r=e.dimensions.draggables[t.draggableId],i=(a=o.result).mode,t=whatIsDraggedOverFromResult(a),o=getCombineWithFromResult(a),a={duration:e.dropDuration,curve:curves.drop,moveTo:e.newHomeClientOffset,opacity:o?combine.opacity.drop:null,scale:o?combine.scale.drop:null},{mapped:{type:"DRAGGING",offset:e.newHomeClientOffset,dimension:r,dropping:a,draggingOver:t,combineWith:o,mode:i,forceShouldAnimate:null,snapshot:l(i,n,t,o,a)}})}}function getSecondarySnapshot(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var atRest={mapped:{type:"SECONDARY",offset:origin,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:getSecondarySnapshot(null)}};function getSecondarySelector(){function n(e,t,n,r){var i=n.displaced.visible[e],o=Boolean(r.inVirtualList&&r.effected[e]),a=(a=tryGetCombine(n))&&a.draggableId===e?t:null;return i?o?c(a):(t=n.displacedBy.point,t=s(t.x,t.y),l(t,a,i.shouldAnimate)):o?n.displaced.invisible[e]?null:(t=negate(r.displacedBy.point),i=s(t.x,t.y),l(i,a,!0)):c(a)}var s=memoizeOne(function(e,t){return{x:e,y:t}}),r=memoizeOne(getSecondarySnapshot),l=memoizeOne(function(e,t,n){return{mapped:{type:"SECONDARY",offset:e,combineTargetFor:t=void 0===t?null:t,shouldAnimateDisplacement:n,snapshot:r(t)}}}),c=function(e){return e?l(origin,e,!0):null};return function(e,t){return e.isDragging?e.critical.draggable.id===t.draggableId?null:n(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical):"DROP_ANIMATING"!==e.phase||(e=e.completed).result.draggableId===t.draggableId?null:n(t.draggableId,e.result.draggableId,e.impact,e.afterCritical)}}var makeMapStateToProps=function(){var n=getDraggableSelector(),r=getSecondarySelector();return function(e,t){return n(e,t)||r(e,t)||atRest}},mapDispatchToProps={dropAnimationFinished:dropAnimationFinished},ConnectedDraggable=connect(makeMapStateToProps,mapDispatchToProps,null,{context:StoreContext,pure:!0,areStatePropsEqual:isStrictEqual})(Draggable);function PrivateDraggable(e){return useRequiredContext(DroppableContext).isUsingCloneFor!==e.draggableId||e.isClone?React.createElement(ConnectedDraggable,e):null}function PublicDraggable(e){var t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return React.createElement(PrivateDraggable,_extends({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}function Droppable(e){var n,r,t=react.exports.useContext(AppContext),i=(t||invariant(!1),t.contextId),o=t.isMovementAllowed,a=react.exports.useRef(null),s=react.exports.useRef(null),t=e.children,l=e.droppableId,c=e.type,u=e.mode,d=e.direction,p=e.ignoreContainerClipping,f=e.isDropDisabled,h=e.isCombineEnabled,m=e.snapshot,g=e.useClone,v=e.updateViewportMaxScroll,y=e.getContainerForClone,x=useCallback(function(){return a.current},[]),b=useCallback(function(e){a.current=e},[]),C=(useCallback(function(){return s.current},[]),useCallback(function(e){s.current=e},[])),$=useCallback(function(){o()&&v({maxScroll:getMaxWindowScroll()})},[o,v]),w=(useDroppablePublisher({droppableId:l,type:c,mode:u,direction:d,isDropDisabled:f,isCombineEnabled:h,ignoreContainerClipping:p,getDroppableRef:x}),React.createElement(AnimateInOut,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(e){var t=e.onClose,n=e.data,e=e.animate;return React.createElement(Placeholder$1,{placeholder:n,onClose:t,innerRef:C,animate:e,contextId:i,onTransitionEnd:$})})),u=useMemo(function(){return{innerRef:b,placeholder:w,droppableProps:{"data-rbd-droppable-id":l,"data-rbd-droppable-context-id":i}}},[i,l,w,b]),S=g?g.dragging.draggableId:null,d=useMemo(function(){return{droppableId:l,type:c,isUsingCloneFor:S}},[l,S,c]);return React.createElement(DroppableContext.Provider,{value:d},t(u,m),g?(n=g.dragging,r=g.render,f=React.createElement(PrivateDraggable,{draggableId:n.draggableId,index:n.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(e,t){return r(e,t,n)}),ReactDOM.createPortal(f,y())):null)}var isMatchingType=function(e,t){return e===t.droppable.type},getDraggable=function(e,t){return t.draggables[e.draggable.id]},makeMapStateToProps$1=function(){var s={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},l=_extends({},s,{shouldAnimatePlaceholder:!1}),c=memoizeOne(function(e){return{draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}}}),u=memoizeOne(function(e,t,n,r,i,o){var a=i.descriptor.id;return i.descriptor.droppableId===e?(e=o?{render:o,dragging:c(i.descriptor)}:null,{placeholder:i.placeholder,shouldAnimatePlaceholder:!1,snapshot:{isDraggingOver:n,draggingOverWith:n?a:null,draggingFromThisWith:a,isUsingPlaceholder:!0},useClone:e}):t?r?{placeholder:i.placeholder,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:n,draggingOverWith:a,draggingFromThisWith:null,isUsingPlaceholder:!0},useClone:null}:s:l});return function(e,t){var n,r,i=t.droppableId,o=t.type,a=!t.isDropDisabled,t=t.renderClone;return e.isDragging?(r=e.critical,isMatchingType(o,r)?(r=getDraggable(r,e.dimensions),n=whatIsDraggedOver(e.impact)===i,u(i,a,n,n,r,t)):l):"DROP_ANIMATING"===e.phase?(n=e.completed,isMatchingType(o,n.critical)?(r=getDraggable(n.critical,e.dimensions),u(i,a,whatIsDraggedOverFromResult(n.result)===i,whatIsDraggedOver(n.impact)===i,r,t)):l):"IDLE"===e.phase&&e.completed&&!e.shouldFlush&&(a=e.completed,isMatchingType(o,a.critical))?(n=whatIsDraggedOver(a.impact)===i,r=Boolean(a.impact.at&&"COMBINE"===a.impact.at.type),t=a.critical.droppable.id===i,n?r?s:l:t?s:l):l}},mapDispatchToProps$1={updateViewportMaxScroll:updateViewportMaxScroll};function getBody(){return document.body||invariant(!1),document.body}var defaultProps={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:getBody},ConnectedDroppable=connect(makeMapStateToProps$1,mapDispatchToProps$1,null,{context:StoreContext,pure:!0,areStatePropsEqual:isStrictEqual})(Droppable),naturalDragAnimationRbdnd=(ConnectedDroppable.defaultProps=defaultProps,{exports:{}}),NaturalDragAnimation=(!function(){function i(e){var t;return(o[e]||(t=o[e]={i:e,l:!1,exports:{}},r[e].call(t.exports,t,t.exports,i),t.l=!0,t)).exports}var n,r,o;window,naturalDragAnimationRbdnd.exports=(n=react.exports,r=[function(e,t,n){e.exports=n(4)()},function(e,t){e.exports=n},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var l,r=n(1),i=n.n(r),o=n(0),n=n.n(o);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach(function(e){m(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t,n=h(r);return e=i?(e=h(this).constructor,Reflect.construct(n,arguments,e)):n.apply(this,arguments),n=this,!(t=e)||"object"!==a(t)&&"function"!=typeof t?f(n):t}}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}var g={transform:null,prevX:0,rotation:0},o=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e);var o=p(s);function s(){var a,e=this,t=s;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return m(f(a=o.call.apply(o,[this].concat(r))),"state",c({},g)),m(f(a),"patchTransform",function(){var e,t=a.props,n=t.snapshot.isDragging,r=t.style,i=t.animationRotationFade,o=t.rotationMultiplier,t=t.sigmoidFunction;n&&r.transform?(e=(n=r.transform.match(/translate\(.{1,}\)/g)[0].match(/-?[0-9]{1,}/g)[0])-a.state.prevX,i=a.state.rotation*i+t(e)*o,t="".concat(r.transform," rotate(").concat(i,"deg)"),Math.abs(i)<.01&&(i=0),a.setState({transform:t,prevX:n,rotation:i},function(){l=requestAnimationFrame(a.patchTransform)})):l=requestAnimationFrame(a.patchTransform)}),a}return t=[{key:"getDerivedStateFromProps",value:function(e,t){return e.snapshot.dropAnimation&&t.transform?c({},g):null}}],u((e=s).prototype,[{key:"componentDidMount",value:function(){this.props.snapshot.isDragging&&(l=requestAnimationFrame(this.patchTransform))}},{key:"componentDidUpdate",value:function(e){!e.snapshot.isDragging&&this.props.snapshot.isDragging&&(l=requestAnimationFrame(this.patchTransform)),e.snapshot.isDragging&&!this.props.snapshot.isDragging&&cancelAnimationFrame(l)}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(l)}},{key:"render",value:function(){var e=this.props.snapshot,t=e.isDragging,e=e.dropAnimation,t=t&&!e?c(c({},this.props.style),{},{transform:this.state.transform}):this.props.style;return i.a.createElement(r.Fragment,null,this.props.children(t))}}]),u(e,t),s}(r.Component);m(o,"propTypes",{snapshot:n.a.shape({isDragging:n.a.bool.isRequired,dropAnimation:n.a.shape()}).isRequired,style:n.a.shape().isRequired,children:n.a.func.isRequired,animationRotationFade:n.a.number,rotationMultiplier:n.a.number,sigmoidFunction:n.a.func}),m(o,"defaultProps",{animationRotationFade:.9,rotationMultiplier:1.3,sigmoidFunction:function(e){return e/(1+Math.abs(e))}}),t.default=o},function(e,t,n){var a=n(5);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,o){if(o!==a)throw(o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")).name="Invariant Violation",o}function t(){return e}var n={array:e.isRequired=e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n}},function(e,t,n){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}],o={},i.m=r,i.c=o,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i(i.s=2))}(),getDefaultExportFromCjs(naturalDragAnimationRbdnd.exports));function getLoadingButtonUtilityClass(e){return generateUtilityClass("MuiLoadingButton",e)}const loadingButtonClasses=generateUtilityClasses("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]);var loadingButtonClasses$1=loadingButtonClasses;const _excluded=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],useUtilityClasses=e=>{var{loading:e,loadingPosition:t,classes:n}=e;return _extends({},n,composeClasses({root:["root",e&&"loading"],startIcon:[e&&"startIconLoading"+capitalize$2(t)],endIcon:[e&&"endIconLoading"+capitalize$2(t)],loadingIndicator:["loadingIndicator",e&&"loadingIndicator"+capitalize$2(t)]},getLoadingButtonUtilityClass,n))},rootShouldForwardProp=e=>"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e&&"classes"!==e,LoadingButtonRoot=styled$1(Button$1,{shouldForwardProp:e=>rootShouldForwardProp(e)||"classes"===e,name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{["& ."+loadingButtonClasses$1.startIconLoadingStart]:t.startIconLoadingStart},t.endIconLoadingEnd&&{["& ."+loadingButtonClasses$1.endIconLoadingEnd]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>_extends({[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},"center"===e.loadingPosition&&{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),["&."+loadingButtonClasses$1.loading]:{color:"transparent"}},"start"===e.loadingPosition&&e.fullWidth&&{[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},"end"===e.loadingPosition&&e.fullWidth&&{[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),LoadingButtonLoadingIndicator=styled$1("div",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{e=e.ownerState;return[t.loadingIndicator,t["loadingIndicator"+capitalize$2(e.loadingPosition)]]}})(({theme:e,ownerState:t})=>_extends({position:"absolute",visibility:"visible",display:"flex"},"start"===t.loadingPosition&&("outlined"===t.variant||"contained"===t.variant)&&{left:"small"===t.size?10:14},"start"===t.loadingPosition&&"text"===t.variant&&{left:6},"center"===t.loadingPosition&&{left:"50%",transform:"translate(-50%)",color:e.palette.action.disabled},"end"===t.loadingPosition&&("outlined"===t.variant||"contained"===t.variant)&&{right:"small"===t.size?10:14},"end"===t.loadingPosition&&"text"===t.variant&&{right:6},"start"===t.loadingPosition&&t.fullWidth&&{position:"relative",left:-10},"end"===t.loadingPosition&&t.fullWidth&&{position:"relative",right:-10})),LoadingButton=react.exports.forwardRef(function(e,t){var e=useThemeProps({props:e,name:"MuiLoadingButton"}),{children:n,disabled:r=!1,id:i,loading:o=!1,loadingIndicator:a,loadingPosition:s="center",variant:l="text"}=e,c=_objectWithoutPropertiesLoose$2(e,_excluded),i=useId(i),a=null!=a?a:jsxRuntime.exports.jsx(CircularProgress$1,{"aria-labelledby":i,color:"inherit",size:16}),e=_extends({},e,{disabled:r,loading:o,loadingIndicator:a,loadingPosition:s,variant:l}),s=useUtilityClasses(e);return jsxRuntime.exports.jsx(LoadingButtonRoot,_extends({disabled:r||o,id:i,ref:t},c,{variant:l,classes:s,ownerState:e,children:"end"===e.loadingPosition?jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[n,o&&jsxRuntime.exports.jsx(LoadingButtonLoadingIndicator,{className:s.loadingIndicator,ownerState:e,children:a})]}):jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[o&&jsxRuntime.exports.jsx(LoadingButtonLoadingIndicator,{className:s.loadingIndicator,ownerState:e,children:a}),n]})}))});var LoadingButton$1=LoadingButton,Link={},_interopRequireDefault$1=interopRequireDefault.exports,default_1$1=(Object.defineProperty(Link,"__esModule",{value:!0}),Link.default=void 0),_createSvgIcon$1=_interopRequireDefault$1(createSvgIcon),_jsxRuntime$1=jsxRuntime.exports,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"}),"Link"),default_1$1=Link.default=_default$1,cropper={exports:{}},Cropper=(!function(){function N(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function P(r){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?N(Object(i),!0).forEach(function(e){var t,n;t=r,n=i[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):N(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}function D(e){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function V(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function F(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?r(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(e){return"number"==typeof e&&!ie(e)}function i(e){return void 0===e}function o(e){return"object"===D(e)&&null!==e}function f(e){if(!o(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&ae.call(n,"isPrototypeOf")}catch(e){return!1}}function c(e){return"function"==typeof e}function H(e){return Array.from?Array.from(e):se.call(e)}function E(n,r){return n&&c(r)&&(Array.isArray(n)||p(n.length)?H(n).forEach(function(e,t){r.call(n,e,t,n)}):o(n)&&Object.keys(n).forEach(function(e){r.call(n,n[e],e,n)})),n}function j(e,t){var n=1<arguments.length&&void 0!==t?t:1e11;return le.test(e)?Math.round(e*n)/n:e}function h(e,t){var n=e.style;E(t,function(e,t){ce.test(t)&&p(e)&&(e="".concat(e,"px")),n[t]=e})}function u(e,t){var n;t&&(p(e.length)?E(e,function(e){u(e,t)}):e.classList?e.classList.add(t):(n=e.className.trim())?n.indexOf(t)<0&&(e.className="".concat(n," ").concat(t)):e.className=t)}function _(e,t){t&&(p(e.length)?E(e,function(e){_(e,t)}):e.classList?e.classList.remove(t):0<=e.className.indexOf(t)&&(e.className=e.className.replace(t,"")))}function a(e,t,n){t&&(p(e.length)?E(e,function(e){a(e,t,n)}):(n?u:_)(e,t))}function s(e){return e.replace(ue,"$1-$2").toLowerCase()}function B(e,t){return o(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(s(t)))}function d(e,t,n){o(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat(s(t)),n)}function l(n,e,r,t){var i=3<arguments.length&&void 0!==t?t:{},o=r;e.trim().split(de).forEach(function(e){var t;pe||(t=n.listeners)&&t[e]&&t[e][r]&&(o=t[e][r],delete t[e][r],0===Object.keys(t[e]).length&&delete t[e],0===Object.keys(t).length)&&delete n.listeners,n.removeEventListener(e,o,i)})}function m(o,e,a,t){var s=3<arguments.length&&void 0!==t?t:{},l=a;e.trim().split(de).forEach(function(r){var e,i;s.once&&!pe&&(e=o.listeners,l=function(){delete i[r][a],o.removeEventListener(r,l,s);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];a.apply(o,t)},(i=void 0===e?{}:e)[r]||(i[r]={}),i[r][a]&&o.removeEventListener(r,i[r][a],s),i[r][a]=l,o.listeners=i),o.addEventListener(r,l,s)})}function g(e,t,n){var r;return c(Event)&&c(CustomEvent)?r=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0}):(r=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,n),e.dispatchEvent(r)}function U(e){e=e.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}function Z(e){e=e.match(fe);return null!==e&&(e[1]!==t.protocol||e[2]!==t.hostname||e[3]!==t.port)}function W(e){var t="timestamp=".concat((new Date).getTime());return e+(-1===e.indexOf("?")?"?":"&")+t}function v(e){var t=e.rotate,n=e.scaleX,r=e.scaleY,i=e.translateX,e=e.translateY,o=[],i=(p(i)&&0!==i&&o.push("translateX(".concat(i,"px)")),p(e)&&0!==e&&o.push("translateY(".concat(e,"px)")),p(t)&&0!==t&&o.push("rotate(".concat(t,"deg)")),p(n)&&1!==n&&o.push("scaleX(".concat(n,")")),p(r)&&1!==r&&o.push("scaleY(".concat(r,")")),o.length?o.join(" "):"none");return{WebkitTransform:i,msTransform:i,transform:i}}function y(e,t){var n=e.pageX,e=e.pageY,r={endX:n,endY:e};return t?r:P({startX:n,startY:e},r)}function I(e,t){var n,r=e.aspectRatio,i=e.height,o=e.width,a=1<arguments.length&&void 0!==t?t:"contain",s=oe(o),l=oe(i);return s&&l?(n=i*r,"contain"===a&&o<n||"cover"===a&&n<o?i=o/r:o=i*r):s?i=o/r:l&&(o=i*r),{width:o,height:i}}var x,b,C,$,z,T,G,q,w,S,R,O,L,M,A,K,Y,Q,X,J,ee,te,ne,re,ie,oe,ae,se,k,le,ce,ue,de,pe,t,fe,he,me,e,n,ge,ve,ye,xe,be,Ce;cropper.exports=(x="undefined"!=typeof window&&void 0!==window.document,b=x?window:{},n=!(!x||!b.document.documentElement)&&"ontouchstart"in b.document.documentElement,e=x&&"PointerEvent"in b,$="".concat(C="cropper","-crop"),z="".concat(C,"-disabled"),T="".concat(C,"-hidden"),G="".concat(C,"-hide"),q="".concat(C,"-invisible"),w="".concat(C,"-modal"),S="".concat(C,"-move"),R="".concat(C,"Action"),O="".concat(C,"Preview"),L="cropend",M="cropmove",A="cropstart",K=e?"pointerdown":n?"touchstart":"mousedown",Y=e?"pointermove":n?"touchmove":"mousemove",Q=e?"pointerup pointercancel":n?"touchend touchcancel":"mouseup",X="image/jpeg",J=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,ee=/^data:/,te=/^data:image\/jpeg;base64,/,ne=/^img|canvas$/i,re={viewMode:0,dragMode:"crop",initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},ie=Number.isNaN||b.isNaN,oe=function(e){return 0<e&&e<1/0},ae=Object.prototype.hasOwnProperty,se=Array.prototype.slice,k=Object.assign||function(n){for(var e=arguments.length,t=new Array(1<e?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return o(n)&&0<t.length&&t.forEach(function(t){o(t)&&Object.keys(t).forEach(function(e){n[e]=t[e]})}),n},le=/\.\d*(?:0|9){12}\d*$/,ce=/^width|height|left|top|marginLeft|marginTop$/,ue=/([a-z\d])([A-Z])/g,de=/\s\s*/,pe=function(){var t,e,n,r=!1;return x&&(t=!1,e=function(){},n=Object.defineProperty({},"once",{get:function(){return r=!0,t},set:function(e){t=e}}),b.addEventListener("test",e,n),b.removeEventListener("test",e,n)),r}(),t=b.location,fe=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i,he=String.fromCharCode,me=/^data:.*,/,e={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var e=this.element,t=this.options,n=this.container,r=this.cropper,i=Number(t.minContainerWidth),t=Number(t.minContainerHeight),i=(u(r,T),_(e,T),{width:Math.max(n.offsetWidth,0<=i?i:200),height:Math.max(n.offsetHeight,0<=t?t:100)});h(r,{width:(this.containerData=i).width,height:i.height}),u(e,T),_(r,T)},initCanvas:function(){var e=this.containerData,t=this.imageData,n=this.options.viewMode,r=Math.abs(t.rotate)%180==90,i=r?t.naturalHeight:t.naturalWidth,r=r?t.naturalWidth:t.naturalHeight,t=i/r,o=e.width,a=e.height,t=(e.height*t>e.width?3===n?o=e.height*t:a=e.width/t:3===n?a=e.width/t:o=e.height*t,{aspectRatio:t,naturalWidth:i,naturalHeight:r,width:o,height:a});this.canvasData=t,this.limited=1===n||2===n,this.limitCanvas(!0,!0),t.width=Math.min(Math.max(t.width,t.minWidth),t.maxWidth),t.height=Math.min(Math.max(t.height,t.minHeight),t.maxHeight),t.left=(e.width-t.width)/2,t.top=(e.height-t.height)/2,t.oldLeft=t.left,t.oldTop=t.top,this.initialCanvasData=k({},t)},limitCanvas:function(e,t){var n=this.options,r=this.containerData,i=this.canvasData,o=this.cropBoxData,a=n.viewMode,s=i.aspectRatio,l=this.cropped&&o;e&&(e=Number(n.minCanvasWidth)||0,n=Number(n.minCanvasHeight)||0,1<a?(e=Math.max(e,r.width),n=Math.max(n,r.height),3===a&&(e<n*s?e=n*s:n=e/s)):0<a&&(e?e=Math.max(e,l?o.width:0):n?n=Math.max(n,l?o.height:0):l&&((e=o.width)<(n=o.height)*s?e=n*s:n=e/s)),e=(s=I({aspectRatio:s,width:e,height:n})).width,n=s.height,i.minWidth=e,i.minHeight=n,i.maxWidth=1/0,i.maxHeight=1/0),t&&((l?0:1)<a?(s=r.width-i.width,e=r.height-i.height,i.minLeft=Math.min(0,s),i.minTop=Math.min(0,e),i.maxLeft=Math.max(0,s),i.maxTop=Math.max(0,e),l&&this.limited&&(i.minLeft=Math.min(o.left,o.left+(o.width-i.width)),i.minTop=Math.min(o.top,o.top+(o.height-i.height)),i.maxLeft=o.left,i.maxTop=o.top,2===a)&&(i.width>=r.width&&(i.minLeft=Math.min(0,s),i.maxLeft=Math.max(0,s)),i.height>=r.height)&&(i.minTop=Math.min(0,e),i.maxTop=Math.max(0,e))):(i.minLeft=-i.width,i.minTop=-i.height,i.maxLeft=r.width,i.maxTop=r.height))},renderCanvas:function(e,t){var n,r,i=this.canvasData,o=this.imageData;t&&(o=(t=function(e){var t=e.width,n=e.height,e=e.degree;if(90==(e=Math.abs(e)%180))return{width:n,height:t};var r=e%90*Math.PI/180,i=Math.sin(r),r=Math.cos(r),o=t*r+n*i,t=t*i+n*r;return 90<e?{width:t,height:o}:{width:o,height:t}}({width:o.naturalWidth*Math.abs(o.scaleX||1),height:o.naturalHeight*Math.abs(o.scaleY||1),degree:o.rotate||0})).width,t=t.height,n=i.width*(o/i.naturalWidth),r=i.height*(t/i.naturalHeight),i.left-=(n-i.width)/2,i.top-=(r-i.height)/2,i.width=n,i.height=r,i.aspectRatio=o/t,i.naturalWidth=o,i.naturalHeight=t,this.limitCanvas(!0,!1)),(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,h(this.canvas,k({width:i.width,height:i.height},v({translateX:i.left,translateY:i.top}))),this.renderImage(e),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(e){var t=this.canvasData,n=this.imageData,r=n.naturalWidth*(t.width/t.naturalWidth),i=n.naturalHeight*(t.height/t.naturalHeight);k(n,{width:r,height:i,left:(t.width-r)/2,top:(t.height-i)/2}),h(this.image,k({width:n.width,height:n.height},v(k({translateX:n.left,translateY:n.top},n)))),e&&this.output()},initCropBox:function(){var e=this.options,t=this.canvasData,n=e.aspectRatio||e.initialAspectRatio,e=Number(e.autoCropArea)||.8,r={width:t.width,height:t.height};n&&(t.height*n>t.width?r.height=r.width/n:r.width=r.height*n),this.cropBoxData=r,this.limitCropBox(!0,!0),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),r.width=Math.max(r.minWidth,r.width*e),r.height=Math.max(r.minHeight,r.height*e),r.left=t.left+(t.width-r.width)/2,r.top=t.top+(t.height-r.height)/2,r.oldLeft=r.left,r.oldTop=r.top,this.initialCropBoxData=k({},r)},limitCropBox:function(e,t){var n,r,i=this.options,o=this.containerData,a=this.canvasData,s=this.cropBoxData,l=this.limited,c=i.aspectRatio;e&&(e=Number(i.minCropBoxWidth)||0,i=Number(i.minCropBoxHeight)||0,n=l?Math.min(o.width,a.width,a.width+a.left,o.width-a.left):o.width,r=l?Math.min(o.height,a.height,a.height+a.top,o.height-a.top):o.height,e=Math.min(e,o.width),i=Math.min(i,o.height),c&&(e&&i?e<i*c?i=e/c:e=i*c:e?i=e/c:i&&(e=i*c),n<r*c?r=n/c:n=r*c),s.minWidth=Math.min(e,n),s.minHeight=Math.min(i,r),s.maxWidth=n,s.maxHeight=r),t&&(l?(s.minLeft=Math.max(0,a.left),s.minTop=Math.max(0,a.top),s.maxLeft=Math.min(o.width,a.left+a.width)-s.width,s.maxTop=Math.min(o.height,a.top+a.height)-s.height):(s.minLeft=0,s.minTop=0,s.maxLeft=o.width-s.width,s.maxTop=o.height-s.height))},renderCropBox:function(){var e=this.options,t=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCropBox(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,e.movable&&e.cropBoxMovable&&d(this.face,R,n.width>=t.width&&n.height>=t.height?"move":"all"),h(this.cropBox,k({width:n.width,height:n.height},v({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),g(this.element,"crop",this.getData())}},n={initPreview:function(){var e=this.element,n=this.crossOrigin,t=this.options.preview,r=n?this.crossOriginUrl:this.url,i=e.alt||"The image to preview",o=document.createElement("img");n&&(o.crossOrigin=n),o.src=r,o.alt=i,this.viewBox.appendChild(o),this.viewBoxImage=o,t&&("string"==typeof(o=t)?o=e.ownerDocument.querySelectorAll(t):t.querySelector&&(o=[t]),E(this.previews=o,function(e){var t=document.createElement("img");d(e,O,{width:e.offsetWidth,height:e.offsetHeight,html:e.innerHTML}),n&&(t.crossOrigin=n),t.src=r,t.alt=i,t.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',e.innerHTML="",e.appendChild(t)}))},resetPreview:function(){E(this.previews,function(t){var n=B(t,O),n=(h(t,{width:n.width,height:n.height}),t.innerHTML=n.html,t),t=O;if(o(n[t]))try{delete n[t]}catch(e){n[t]=void 0}else if(n.dataset)try{delete n.dataset[t]}catch(e){n.dataset[t]=void 0}else n.removeAttribute("data-".concat(s(t)))})},preview:function(){var a=this.imageData,e=this.canvasData,t=this.cropBoxData,s=t.width,l=t.height,c=a.width,u=a.height,d=t.left-e.left-a.left,p=t.top-e.top-a.top;this.cropped&&!this.disabled&&(h(this.viewBoxImage,k({width:c,height:u},v(k({translateX:-d,translateY:-p},a)))),E(this.previews,function(e){var t=B(e,O),n=t.width,t=t.height,r=n,i=t,o=1;s&&(i=l*(o=n/s)),l&&t<i&&(r=s*(o=t/l),i=t),h(e,{width:r,height:i}),h(e.getElementsByTagName("img")[0],k({width:c*o,height:u*o},v(k({translateX:-d*o,translateY:-p*o},a))))}))}},ge={bind:function(){var e=this.element,t=this.options,n=this.cropper;c(t.cropstart)&&m(e,A,t.cropstart),c(t.cropmove)&&m(e,M,t.cropmove),c(t.cropend)&&m(e,L,t.cropend),c(t.crop)&&m(e,"crop",t.crop),c(t.zoom)&&m(e,"zoom",t.zoom),m(n,K,this.onCropStart=this.cropStart.bind(this)),t.zoomable&&t.zoomOnWheel&&m(n,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&m(n,"dblclick",this.onDblclick=this.dblclick.bind(this)),m(e.ownerDocument,Y,this.onCropMove=this.cropMove.bind(this)),m(e.ownerDocument,Q,this.onCropEnd=this.cropEnd.bind(this)),t.responsive&&m(window,"resize",this.onResize=this.resize.bind(this))},unbind:function(){var e=this.element,t=this.options,n=this.cropper;c(t.cropstart)&&l(e,A,t.cropstart),c(t.cropmove)&&l(e,M,t.cropmove),c(t.cropend)&&l(e,L,t.cropend),c(t.crop)&&l(e,"crop",t.crop),c(t.zoom)&&l(e,"zoom",t.zoom),l(n,K,this.onCropStart),t.zoomable&&t.zoomOnWheel&&l(n,"wheel",this.onWheel,{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&l(n,"dblclick",this.onDblclick),l(e.ownerDocument,Y,this.onCropMove),l(e.ownerDocument,Q,this.onCropEnd),t.responsive&&l(window,"resize",this.onResize)}},ve={resize:function(){var e,t,n,r,i,o,a;this.disabled||(e=this.options,r=this.container,t=this.containerData,n=r.offsetWidth/t.width,r=r.offsetHeight/t.height,1!=(i=Math.abs(n-1)>Math.abs(r-1)?n:r)&&(e.restore&&(o=this.getCanvasData(),a=this.getCropBoxData()),this.render(),e.restore)&&(this.setCanvasData(E(o,function(e,t){o[t]=e*i})),this.setCropBoxData(E(a,function(e,t){a[t]=e*i}))))},dblclick:function(){var e,t;this.disabled||"none"===this.options.dragMode||this.setDragMode((e=this.dragBox,t=$,(e.classList?e.classList.contains(t):-1<e.className.indexOf(t))?"move":"crop"))},wheel:function(e){var t=this,n=Number(this.options.wheelZoomRatio)||.1,r=1;this.disabled||(e.preventDefault(),this.wheeling)||(this.wheeling=!0,setTimeout(function(){t.wheeling=!1},50),e.deltaY?r=0<e.deltaY?1:-1:e.wheelDelta?r=-e.wheelDelta/120:e.detail&&(r=0<e.detail?1:-1),this.zoom(-r*n,e))},cropStart:function(e){var t,n=e.buttons,r=e.button;this.disabled||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(p(n)&&1!==n||p(r)&&0!==r||e.ctrlKey)||(n=this.options,t=this.pointers,e.changedTouches?E(e.changedTouches,function(e){t[e.identifier]=y(e)}):t[e.pointerId||0]=y(e),r=1<Object.keys(t).length&&n.zoomable&&n.zoomOnTouch?"zoom":B(e.target,R),J.test(r)&&!1!==g(this.element,A,{originalEvent:e,action:r})&&(e.preventDefault(),this.action=r,this.cropping=!1,"crop"===r)&&(this.cropping=!0,u(this.dragBox,w)))},cropMove:function(e){var t,n=this.action;!this.disabled&&n&&(t=this.pointers,e.preventDefault(),!1!==g(this.element,M,{originalEvent:e,action:n}))&&(e.changedTouches?E(e.changedTouches,function(e){k(t[e.identifier]||{},y(e,!0))}):k(t[e.pointerId||0]||{},y(e,!0)),this.change(e))},cropEnd:function(e){var t,n;this.disabled||(t=this.action,n=this.pointers,e.changedTouches?E(e.changedTouches,function(e){delete n[e.identifier]}):delete n[e.pointerId||0],t&&(e.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,a(this.dragBox,w,this.cropped&&this.options.modal)),g(this.element,L,{originalEvent:e,action:t})))}},ye={change:function(e){function t(e){switch(e){case"e":g+S.x>b&&(S.x=b-g);break;case"w":p+S.x<y&&(S.x=y-p);break;case"n":f+S.y<x&&(S.y=x-f);break;case"s":v+S.y>C&&(S.y=C-v)}}var n,r,o,i=this.options,a=this.canvasData,s=this.containerData,l=this.cropBoxData,c=this.pointers,u=this.action,d=i.aspectRatio,p=l.left,f=l.top,h=l.width,m=l.height,g=p+h,v=f+m,y=0,x=0,b=s.width,C=s.height,$=!0,w=(!d&&e.shiftKey&&(d=h&&m?h/m:1),this.limited&&(y=l.minLeft,x=l.minTop,b=y+Math.min(s.width,a.width,a.left+a.width),C=x+Math.min(s.height,a.height,a.top+a.height)),c[Object.keys(c)[0]]),S={x:w.endX-w.startX,y:w.endY-w.startY};switch(u){case"all":p+=S.x,f+=S.y;break;case"e":0<=S.x&&(b<=g||d&&(f<=x||C<=v))?$=!1:(t("e"),(h+=S.x)<0&&(u="w",p-=h=-h),d&&(f+=(l.height-(m=h/d))/2));break;case"n":S.y<=0&&(f<=x||d&&(p<=y||b<=g))?$=!1:(t("n"),m-=S.y,f+=S.y,m<0&&(u="s",f-=m=-m),d&&(p+=(l.width-(h=m*d))/2));break;case"w":S.x<=0&&(p<=y||d&&(f<=x||C<=v))?$=!1:(t("w"),h-=S.x,p+=S.x,h<0&&(u="e",p-=h=-h),d&&(f+=(l.height-(m=h/d))/2));break;case"s":0<=S.y&&(C<=v||d&&(p<=y||b<=g))?$=!1:(t("s"),(m+=S.y)<0&&(u="n",f-=m=-m),d&&(p+=(l.width-(h=m*d))/2));break;case"ne":if(d){if(S.y<=0&&(f<=x||b<=g)){$=!1;break}t("n"),m-=S.y,f+=S.y,h=m*d}else t("n"),t("e"),!(0<=S.x)||g<b?h+=S.x:S.y<=0&&f<=x&&($=!1),(!(S.y<=0)||x<f)&&(m-=S.y,f+=S.y);h<0&&m<0?(u="sw",f-=m=-m,p-=h=-h):h<0?(u="nw",p-=h=-h):m<0&&(u="se",f-=m=-m);break;case"nw":if(d){if(S.y<=0&&(f<=x||p<=y)){$=!1;break}t("n"),m-=S.y,f+=S.y,p+=l.width-(h=m*d)}else t("n"),t("w"),!(S.x<=0)||y<p?(h-=S.x,p+=S.x):S.y<=0&&f<=x&&($=!1),(!(S.y<=0)||x<f)&&(m-=S.y,f+=S.y);h<0&&m<0?(u="se",f-=m=-m,p-=h=-h):h<0?(u="ne",p-=h=-h):m<0&&(u="sw",f-=m=-m);break;case"sw":if(d){if(S.x<=0&&(p<=y||C<=v)){$=!1;break}t("w"),h-=S.x,p+=S.x,m=h/d}else t("s"),t("w"),!(S.x<=0)||y<p?(h-=S.x,p+=S.x):0<=S.y&&C<=v&&($=!1),(!(0<=S.y)||v<C)&&(m+=S.y);h<0&&m<0?(u="ne",f-=m=-m,p-=h=-h):h<0?(u="se",p-=h=-h):m<0&&(u="nw",f-=m=-m);break;case"se":if(d){if(0<=S.x&&(b<=g||C<=v)){$=!1;break}t("e"),m=(h+=S.x)/d}else t("s"),t("e"),!(0<=S.x)||g<b?h+=S.x:0<=S.y&&C<=v&&($=!1),(!(0<=S.y)||v<C)&&(m+=S.y);h<0&&m<0?(u="nw",f-=m=-m,p-=h=-h):h<0?(u="sw",p-=h=-h):m<0&&(u="ne",f-=m=-m);break;case"move":this.move(S.x,S.y),$=!1;break;case"zoom":this.zoom((r=P({},n=c),o=0,E(n,function(i,e){delete r[e],E(r,function(e){var t=Math.abs(i.startX-e.startX),n=Math.abs(i.startY-e.startY),r=Math.abs(i.endX-e.endX),e=Math.abs(i.endY-e.endY),t=Math.sqrt(t*t+n*n),n=(Math.sqrt(r*r+e*e)-t)/t;Math.abs(n)>Math.abs(o)&&(o=n)})}),o),e),$=!1;break;case"crop":S.x&&S.y?(n=U(this.cropper),p=w.startX-n.left,f=w.startY-n.top,h=l.minWidth,m=l.minHeight,0<S.x?u=0<S.y?"se":"ne":S.x<0&&(p-=h,u=0<S.y?"sw":"nw"),S.y<0&&(f-=m),this.cropped||(_(this.cropBox,T),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))):$=!1}$&&(l.width=h,l.height=m,l.left=p,l.top=f,this.action=u,this.renderCropBox()),E(c,function(e){e.startX=e.endX,e.startY=e.endY})}},xe={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&u(this.dragBox,w),_(this.cropBox,T),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=k({},this.initialImageData),this.canvasData=k({},this.initialCanvasData),this.cropBoxData=k({},this.initialCropBoxData),this.renderCanvas(),this.cropped)&&this.renderCropBox(),this},clear:function(){return this.cropped&&!this.disabled&&(k(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),_(this.dragBox,w),u(this.cropBox,T)),this},replace:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,E(this.previews,function(e){e.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,_(this.cropper,z)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,u(this.cropper,z)),this},destroy:function(){var e=this.element;return e[C]&&(e[C]=void 0,this.isImg&&this.replaced&&(e.src=this.originalUrl),this.uncreate()),this},move:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=this.canvasData,r=n.left,n=n.top;return this.moveTo(i(e)?e:r+Number(e),i(t)?t:n+Number(t))},moveTo:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=this.canvasData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.movable&&(p(e)&&(n.left=e,r=!0),p(t)&&(n.top=t,r=!0),r)&&this.renderCanvas(!0),this},zoom:function(e,t){var n=this.canvasData;return e=Number(e),this.zoomTo(n.width*(e=e<0?1/(1-e):1+e)/n.naturalWidth,null,t)},zoomTo:function(e,t,n){var r,i,o,a=this.options,s=this.canvasData,l=s.width,c=s.height,u=s.naturalWidth,d=s.naturalHeight;if(0<=(e=Number(e))&&this.ready&&!this.disabled&&a.zoomable){a=u*e,d=d*e;if(!1===g(this.element,"zoom",{ratio:e,oldRatio:l/u,originalEvent:n}))return this;n?(e=this.pointers,u=U(this.cropper),e=e&&Object.keys(e).length?(o=i=r=0,E(e,function(e){var t=e.startX,e=e.startY;r+=t,i+=e,o+=1}),{pageX:r/=o,pageY:i/=o}):{pageX:n.pageX,pageY:n.pageY},s.left-=(a-l)*((e.pageX-u.left-s.left)/l),s.top-=(d-c)*((e.pageY-u.top-s.top)/c)):f(t)&&p(t.x)&&p(t.y)?(s.left-=(a-l)*((t.x-s.left)/l),s.top-=(d-c)*((t.y-s.top)/c)):(s.left-=(a-l)/2,s.top-=(d-c)/2),s.width=a,s.height=d,this.renderCanvas(!0)}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e))},rotateTo:function(e){return p(e=Number(e))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=e%360,this.renderCanvas(!0,!0)),this},scaleX:function(e){var t=this.imageData.scaleY;return this.scale(e,p(t)?t:1)},scaleY:function(e){var t=this.imageData.scaleX;return this.scale(p(t)?t:1,e)},scale:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=this.imageData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.scalable&&(p(e)&&(n.scaleX=e,r=!0),p(t)&&(n.scaleY=t,r=!0),r)&&this.renderCanvas(!0,!0),this},getData:function(){var n,r,e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=this.options,i=this.imageData,o=this.canvasData,a=this.cropBoxData;return this.ready&&this.cropped?(n={x:a.left-o.left,y:a.top-o.top,width:a.width,height:a.height},r=i.width/i.naturalWidth,E(n,function(e,t){n[t]=e/r}),e&&(o=Math.round(n.y+n.height),a=Math.round(n.x+n.width),n.x=Math.round(n.x),n.y=Math.round(n.y),n.width=a-n.x,n.height=o-n.y)):n={x:0,y:0,width:0,height:0},t.rotatable&&(n.rotate=i.rotate||0),t.scalable&&(n.scaleX=i.scaleX||1,n.scaleY=i.scaleY||1),n},setData:function(e){var t,n=this.options,r=this.imageData,i=this.canvasData,o={};return this.ready&&!this.disabled&&f(e)&&(t=!1,n.rotatable&&p(e.rotate)&&e.rotate!==r.rotate&&(r.rotate=e.rotate,t=!0),n.scalable&&(p(e.scaleX)&&e.scaleX!==r.scaleX&&(r.scaleX=e.scaleX,t=!0),p(e.scaleY))&&e.scaleY!==r.scaleY&&(r.scaleY=e.scaleY,t=!0),t&&this.renderCanvas(!0,!0),n=r.width/r.naturalWidth,p(e.x)&&(o.left=e.x*n+i.left),p(e.y)&&(o.top=e.y*n+i.top),p(e.width)&&(o.width=e.width*n),p(e.height)&&(o.height=e.height*n),this.setCropBoxData(o)),this},getContainerData:function(){return this.ready?k({},this.containerData):{}},getImageData:function(){return this.sized?k({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,n={};return this.ready&&E(["left","top","width","height","naturalWidth","naturalHeight"],function(e){n[e]=t[e]}),n},setCanvasData:function(e){var t=this.canvasData,n=t.aspectRatio;return this.ready&&!this.disabled&&f(e)&&(p(e.left)&&(t.left=e.left),p(e.top)&&(t.top=e.top),p(e.width)?(t.width=e.width,t.height=e.width/n):p(e.height)&&(t.height=e.height,t.width=e.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var e,t=this.cropBoxData;return(e=this.ready&&this.cropped?{left:t.left,top:t.top,width:t.width,height:t.height}:e)||{}},setCropBoxData:function(e){var t,n,r=this.cropBoxData,i=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&f(e)&&(p(e.left)&&(r.left=e.left),p(e.top)&&(r.top=e.top),p(e.width)&&e.width!==r.width&&(t=!0,r.width=e.width),p(e.height)&&e.height!==r.height&&(n=!0,r.height=e.height),i&&(t?r.height=r.width/i:n&&(r.width=r.height*i)),this.renderCropBox()),this},getCroppedCanvas:function(){var e,t,n,r,i,o,a,s,l,c,u,d,p,f,h,m,g,v,y,x,b,C,$,w,S,E,_,T=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return this.ready&&window.HTMLCanvasElement?(E=this.canvasData,h=this.image,d=this.imageData,r=E,v=T,m=d.aspectRatio,t=d.naturalWidth,i=d.naturalHeight,c=void 0===(c=d.rotate)?0:c,u=void 0===(u=d.scaleX)?1:u,d=void 0===(d=d.scaleY)?1:d,n=r.aspectRatio,s=r.naturalWidth,r=r.naturalHeight,a=void 0===(a=v.fillColor)?"transparent":a,p=void 0===(p=v.imageSmoothingEnabled)||p,f=void 0===(f=v.imageSmoothingQuality)?"low":f,o=void 0===(o=v.maxWidth)?1/0:o,_=void 0===(_=v.maxHeight)?1/0:_,e=void 0===(e=v.minWidth)?0:e,v=void 0===(v=v.minHeight)?0:v,y=document.createElement("canvas"),g=y.getContext("2d"),l=I({aspectRatio:n,width:o,height:_}),n=I({aspectRatio:n,width:e,height:v},"cover"),s=Math.min(l.width,Math.max(n.width,s)),l=Math.min(l.height,Math.max(n.height,r)),n=I({aspectRatio:m,width:o,height:_}),r=I({aspectRatio:m,width:e,height:v},"cover"),o=Math.min(n.width,Math.max(r.width,t)),_=Math.min(n.height,Math.max(r.height,i)),m=[-o/2,-_/2,o,_],y.width=j(s),y.height=j(l),g.fillStyle=a,g.fillRect(0,0,s,l),g.save(),g.translate(s/2,l/2),g.rotate(c*Math.PI/180),g.scale(u,d),g.imageSmoothingEnabled=p,g.imageSmoothingQuality=f,g.drawImage.apply(g,[h].concat(F(m.map(function(e){return Math.floor(j(e))})))),g.restore(),e=y,this.cropped?(t=(v=this.getData()).x,n=v.y,r=v.width,i=v.height,1!=(o=e.width/Math.floor(E.naturalWidth))&&(t*=o,n*=o,r*=o,i*=o),a=I({aspectRatio:_=r/i,width:T.maxWidth||1/0,height:T.maxHeight||1/0}),s=I({aspectRatio:_,width:T.minWidth||0,height:T.minHeight||0},"cover"),c=(l=I({aspectRatio:_,width:T.width||(1!=o?e.width:r),height:T.height||(1!=o?e.height:i)})).width,u=l.height,c=Math.min(a.width,Math.max(s.width,c)),u=Math.min(a.height,Math.max(s.height,u)),p=(d=document.createElement("canvas")).getContext("2d"),d.width=j(c),d.height=j(u),p.fillStyle=T.fillColor||"transparent",p.fillRect(0,0,c,u),f=T.imageSmoothingEnabled,h=T.imageSmoothingQuality,p.imageSmoothingEnabled=void 0===f||f,h&&(p.imageSmoothingQuality=h),m=e.width,g=e.height,y=n,(v=t)<=-r||m<v?w=C=x=v=0:v<=0?(C=-v,v=0,w=x=Math.min(m,r+v)):v<=m&&(C=0,w=x=Math.min(r,m-v)),x<=0||y<=-i||g<y?S=$=b=y=0:y<=0?($=-y,y=0,S=b=Math.min(g,i+y)):y<=g&&($=0,S=b=Math.min(i,g-y)),E=[v,y,x,b],0<w&&0<S&&E.push(C*(_=c/r),$*_,w*_,S*_),p.drawImage.apply(p,[e].concat(F(E.map(function(e){return Math.floor(j(e))})))),d):e):null},setAspectRatio:function(e){var t=this.options;return this.disabled||i(e)||(t.aspectRatio=Math.max(0,e)||NaN,this.ready&&(this.initCropBox(),this.cropped)&&this.renderCropBox()),this},setDragMode:function(e){var t,n,r=this.options,i=this.dragBox,o=this.face;return this.ready&&!this.disabled&&(n=r.movable&&"move"===e,r.dragMode=e=(t="crop"===e)||n?e:"none",d(i,R,e),a(i,$,t),a(i,S,n),r.cropBoxMovable||(d(o,R,e),a(o,$,t),a(o,S,n))),this}},be=b.Cropper,Ce=function(){function i(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=this,r=i;if(!(n instanceof r))throw new TypeError("Cannot call a class as a function");if(!e||!ne.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=k({},re,f(t)&&t),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}var e=i,t=[{key:"init",value:function(){var e,t=this.element,n=t.tagName.toLowerCase();if(!t[C]){if(t[C]=this,"img"===n){if(this.isImg=!0,e=t.getAttribute("src")||"",!(this.originalUrl=e))return;e=t.src}else"canvas"===n&&window.HTMLCanvasElement&&(e=t.toDataURL());this.load(e)}}},{key:"load",value:function(e){var t,n,r,i,o,a,s=this;e&&(this.url=e,this.imageData={},t=this.element,(n=this.options).rotatable||n.scalable||(n.checkOrientation=!1),n.checkOrientation&&window.ArrayBuffer?ee.test(e)?te.test(e)?this.read((a=(a=e).replace(me,""),r=atob(a),a=new ArrayBuffer(r.length),E(i=new Uint8Array(a),function(e,t){i[t]=r.charCodeAt(t)}),a)):this.clone():(o=new XMLHttpRequest,a=this.clone.bind(this),this.reloading=!0,(this.xhr=o).onabort=a,o.onerror=a,o.ontimeout=a,o.onprogress=function(){o.getResponseHeader("content-type")!==X&&o.abort()},o.onload=function(){s.read(o.response)},o.onloadend=function(){s.reloading=!1,s.xhr=null},n.checkCrossOrigin&&Z(e)&&t.crossOrigin&&(e=W(e)),o.open("GET",e,!0),o.responseType="arraybuffer",o.withCredentials="use-credentials"===t.crossOrigin,o.send()):this.clone())}},{key:"read",value:function(e){var t=this.options,n=this.imageData,r=function(e){var t,n,r,i,o,a,s=new DataView(e);try{if(255===s.getUint8(0)&&216===s.getUint8(1))for(var l=s.byteLength,c=2;c+1<l;){if(255===s.getUint8(c)&&225===s.getUint8(c+1)){r=c;break}c+=1}var u,d,p;if(i=r&&(u=r+10,"Exif"===function(e,t,n){var r="";n+=t;for(var i=t;i<n;i+=1)r+=he(e.getUint8(i));return r}(s,r+4,4))&&(d=s.getUint16(u),(n=18761===d)||19789===d)&&42===s.getUint16(u+2,n)&&8<=(p=s.getUint32(u+4,n))?u+p:i){var f=s.getUint16(i,n);for(a=0;a<f;a+=1)if(o=i+12*a+2,274===s.getUint16(o,n)){o+=8,t=s.getUint16(o,n),s.setUint16(o,1,n);break}}}catch(e){t=1}return t}(e),i=0,o=1,a=1;1<r&&(this.url=function(e,t){var n=[],r=new Uint8Array(e);for(;0<r.length;)n.push(he.apply(null,H(r.subarray(0,8192)))),r=r.subarray(8192);return"data:".concat(t,";base64,").concat(btoa(n.join("")))}(e,X),i=(e=function(e){var t=0,n=1,r=1;switch(e){case 2:n=-1;break;case 3:t=-180;break;case 4:r=-1;break;case 5:t=90,r=-1;break;case 6:t=90;break;case 7:t=90,n=-1;break;case 8:t=-90}return{rotate:t,scaleX:n,scaleY:r}}(r)).rotate,o=e.scaleX,a=e.scaleY),t.rotatable&&(n.rotate=i),t.scalable&&(n.scaleX=o,n.scaleY=a),this.clone()}},{key:"clone",value:function(){var e=this.element,t=this.url,n=e.crossOrigin,r=t,i=(this.options.checkCrossOrigin&&Z(t)&&(n=n||"anonymous",r=W(t)),this.crossOrigin=n,this.crossOriginUrl=r,document.createElement("img"));n&&(i.crossOrigin=n),i.src=r||t,i.alt=e.alt||"The image to crop",(this.image=i).onload=this.start.bind(this),i.onerror=this.stop.bind(this),u(i,G),e.parentNode.insertBefore(i,e.nextSibling)}},{key:"start",value:function(){function e(e,t){k(r.imageData,{naturalWidth:e,naturalHeight:t,aspectRatio:e/t}),r.initialImageData=k({},r.imageData),r.sizing=!1,r.sized=!0,r.build()}var t,n,r=this,i=this.image,o=(i.onload=null,i.onerror=null,this.sizing=!0,b.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(b.navigator.userAgent));i.naturalWidth&&!o?e(i.naturalWidth,i.naturalHeight):(t=document.createElement("img"),n=document.body||document.documentElement,(this.sizingImage=t).onload=function(){e(t.width,t.height),o||n.removeChild(t)},t.src=i.src,o||(t.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",n.appendChild(t)))}},{key:"stop",value:function(){var e=this.image;e.onload=null,e.onerror=null,e.parentNode.removeChild(e),this.image=null}},{key:"build",value:function(){var e,t,n,r,i,o,a,s,l;this.sized&&!this.ready&&(e=this.element,t=this.options,n=this.image,r=e.parentNode,(i=document.createElement("div")).innerHTML='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',o=(i=i.querySelector(".".concat(C,"-container"))).querySelector(".".concat(C,"-canvas")),a=i.querySelector(".".concat(C,"-drag-box")),l=(s=i.querySelector(".".concat(C,"-crop-box"))).querySelector(".".concat(C,"-face")),this.container=r,this.cropper=i,this.canvas=o,this.dragBox=a,this.cropBox=s,this.viewBox=i.querySelector(".".concat(C,"-view-box")),this.face=l,o.appendChild(n),u(e,T),r.insertBefore(i,e.nextSibling),_(n,G),this.initPreview(),this.bind(),t.initialAspectRatio=Math.max(0,t.initialAspectRatio)||NaN,t.aspectRatio=Math.max(0,t.aspectRatio)||NaN,t.viewMode=Math.max(0,Math.min(3,Math.round(t.viewMode)))||0,u(s,T),t.guides||u(s.getElementsByClassName("".concat(C,"-dashed")),T),t.center||u(s.getElementsByClassName("".concat(C,"-center")),T),t.background&&u(i,"".concat(C,"-bg")),t.highlight||u(l,q),t.cropBoxMovable&&(u(l,S),d(l,R,"all")),t.cropBoxResizable||(u(s.getElementsByClassName("".concat(C,"-line")),T),u(s.getElementsByClassName("".concat(C,"-point")),T)),this.render(),this.ready=!0,this.setDragMode(t.dragMode),t.autoCrop&&this.crop(),this.setData(t.data),c(t.ready)&&m(e,"ready",t.ready,{once:!0}),g(e,"ready"))}},{key:"unbuild",value:function(){var e;this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),(e=this.cropper.parentNode)&&e.removeChild(this.cropper),_(this.element,T))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],n=[{key:"noConflict",value:function(){return window.Cropper=be,i}},{key:"setDefaults",value:function(e){k(re,f(e)&&e)}}];return t&&V(e.prototype,t),n&&V(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(),k(Ce.prototype,e,n,ge,ve,ye,xe),Ce)}(),cropper.exports),__assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function __rest$1(e,t){var n={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n}var AuthStatus,applyDefaultOptions=function(e,t){var n=(t=void 0===t?{}:t).enable,r=t.scaleX,r=void 0===r?1:r,i=t.scaleY,i=void 0===i?1:i,o=t.zoomTo,o=void 0===o?0:o,t=t.rotateTo;void 0===n||n?e.enable():e.disable(),e.scaleX(r),e.scaleY(i),void 0!==t&&e.rotateTo(t),0<o&&e.zoomTo(o)},useCombinedRefs=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=react.exports.useRef(null);return React.useEffect(function(){e.forEach(function(e){e&&("function"==typeof e?e(n.current):e.current=n.current)})},[e]),n},ReactCropper=React.forwardRef(function(e,t){var e=__rest$1(e,[]),n=e.dragMode,r=void 0===n?"crop":n,i=e.src,n=e.style,o=e.className,a=e.crossOrigin,s=e.scaleX,l=e.scaleY,c=e.enable,u=e.zoomTo,d=e.rotateTo,p=e.alt,p=void 0===p?"picture":p,f=e.ready,h=e.onInitialized,m=__rest$1(e,["dragMode","src","style","className","crossOrigin","scaleX","scaleY","enable","zoomTo","rotateTo","alt","ready","onInitialized"]),g={scaleY:l,scaleX:s,enable:c,zoomTo:u,rotateTo:d},l=react.exports.useRef(null),v=useCombinedRefs(t,l);return react.exports.useEffect(function(){var e;null!=(e=v.current)&&e.cropper&&"number"==typeof u&&v.current.cropper.zoomTo(u)},[e.zoomTo]),react.exports.useEffect(function(){var e;null!=(e=v.current)&&e.cropper&&void 0!==i&&v.current.cropper.reset().clear().replace(i)},[i]),react.exports.useEffect(function(){var e;return null!==v.current&&(e=new Cropper(v.current,__assign(__assign({dragMode:r},m),{ready:function(e){null!==e.currentTarget&&applyDefaultOptions(e.currentTarget.cropper,g),f&&f(e)}})),h)&&h(e),function(){var e;null!=(e=null==(e=v.current)?void 0:e.cropper)&&e.destroy()}},[v]),React.createElement("div",{style:n,className:o},React.createElement("img",{crossOrigin:a,src:i,alt:p,style:{opacity:0,maxWidth:"100%"},ref:v}))});const namespace$4="users",userSelector$1=e=>{return null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$4]},userAuthStatusSelector=e=>{return null==(e=null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$4])?void 0:e.authStatus},GET_CURRENT_USER$1=`os-app-bar-panel/${namespace$4}/get current user`,GET_CURRENT_USER_SUCCESS$1=`os-app-bar-panel/${namespace$4}/get current user success`,RESET_BIOMETRIC=`os-app-bar-panel/${namespace$4}/reset biometric`,RESET_PASSWORD=`os-app-bar-panel/${namespace$4}/reset password`,RESET_PASSWORD_FAIL=`os-app-bar-panel/${namespace$4}/reset password fail`,UPDATE_PROFILE=`os-app-bar-panel/${namespace$4}/update profile`,UPDATE_PROFILE_FAIL=`os-app-bar-panel/${namespace$4}/update profile fail`,UPLOAD__AVATAR=`os-app-bar-panel/${namespace$4}/upload avatar`,UPDATE__AVATAR=`os-app-bar-panel/${namespace$4}/update avatar`,LOGOUT_USER=`os-app-bar-panel/${namespace$4}/logout`,LOGOUT_SUCCESS=`os-app-bar-panel/${namespace$4}/logout success`,LOGOUT_FAIL=`os-app-bar-panel/${namespace$4}/logout fail`,UPLOADING_AVATAR=`os-app-bar-panel/${namespace$4}/uploading`,UPDATE_ACTIVITY=`os-app-bar-panel/${namespace$4}/updateActivityStatus`;function getCurrentUser$1(){return{type:GET_CURRENT_USER$1}}function getCurrentUserSuccess$1(e){return{type:GET_CURRENT_USER_SUCCESS$1,payload:e}}function resetBiometric(){return{type:RESET_BIOMETRIC}}function resetPassword(e){return{type:RESET_PASSWORD,payload:e}}function resetPasswordFail(){return{type:RESET_PASSWORD_FAIL}}function updateProfile(e){return{type:UPDATE_PROFILE,payload:e}}function updateProfileFail(){return{type:UPDATE_PROFILE_FAIL}}function uploadAvatar(e){return{type:UPLOAD__AVATAR,payload:e}}function updateAvatar(e){return{type:UPDATE__AVATAR,payload:e}}function logoutUserSuccess(){return{type:LOGOUT_SUCCESS}}function logoutUserFail(){return{type:LOGOUT_FAIL}}function uploadingAvatar(e){return{type:UPLOADING_AVATAR,payload:e}}!function(e){e.AUTHENTICATED="authenticated",e.LOGGING_OUT="logging_out",e.LOGGED_OUT="logged_out"}(AuthStatus=AuthStatus||{});const initialState$4={currentUser:{},status:"idle",authStatus:AuthStatus.AUTHENTICATED};function userReducer$1(e,t){return void 0===e?initialState$4:t.type===GET_CURRENT_USER_SUCCESS$1?Object.assign(Object.assign({},e),{currentUser:t.payload,status:"success"}):t.type===UPLOADING_AVATAR?Object.assign(Object.assign({},e),{loading:t.payload}):t.type===LOGOUT_USER?Object.assign(Object.assign({},e),{authStatus:AuthStatus.LOGGING_OUT}):t.type===LOGOUT_SUCCESS?Object.assign(Object.assign({},e),{authStatus:AuthStatus.LOGGED_OUT}):t.type===LOGOUT_FAIL?Object.assign(Object.assign({},e),{authStatus:AuthStatus.AUTHENTICATED}):e}var luxon={};function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function _construct(e,t,n){return(_construct=_isNativeReflectConstruct()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);t=new(Function.bind.apply(e,r));return n&&_setPrototypeOf(t,n.prototype),t}).apply(null,arguments)}function _isNativeFunction(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _wrapNativeSuper(e){var n="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(t,e)})(e)}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};for(var n,r={},i=Object.keys(e),o=0;o<i.length;o++)n=i[o],0<=t.indexOf(n)||(r[n]=e[n]);return r}function _unsupportedIterableToArray(e,t){var n;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _createForOfIteratorHelperLoose(e){var t=0;if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator])return(t=e[Symbol.iterator]()).next.bind(t);if(Array.isArray(e)||(e=_unsupportedIterableToArray(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Object.defineProperty(luxon,"__esModule",{value:!0});var LuxonError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(_wrapNativeSuper(Error)),InvalidDateTimeError=function(t){function e(e){return t.call(this,"Invalid DateTime: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidIntervalError=function(t){function e(e){return t.call(this,"Invalid Interval: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidDurationError=function(t){function e(e){return t.call(this,"Invalid Duration: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),ConflictingSpecificationError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(LuxonError),InvalidUnitError=function(t){function e(e){return t.call(this,"Invalid unit "+e)||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidArgumentError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(LuxonError),ZoneIsAbstractError=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return _inheritsLoose(t,e),t}(LuxonError),n="numeric",s="short",l$1="long",DATE_SHORT={year:n,month:n,day:n},DATE_MED={year:n,month:s,day:n},DATE_MED_WITH_WEEKDAY={year:n,month:s,day:n,weekday:s},DATE_FULL={year:n,month:l$1,day:n},DATE_HUGE={year:n,month:l$1,day:n,weekday:l$1},TIME_SIMPLE={hour:n,minute:n},TIME_WITH_SECONDS={hour:n,minute:n,second:n},TIME_WITH_SHORT_OFFSET={hour:n,minute:n,second:n,timeZoneName:s},TIME_WITH_LONG_OFFSET={hour:n,minute:n,second:n,timeZoneName:l$1},TIME_24_SIMPLE={hour:n,minute:n,hour12:!1},TIME_24_WITH_SECONDS={hour:n,minute:n,second:n,hour12:!1},TIME_24_WITH_SHORT_OFFSET={hour:n,minute:n,second:n,hour12:!1,timeZoneName:s},TIME_24_WITH_LONG_OFFSET={hour:n,minute:n,second:n,hour12:!1,timeZoneName:l$1},DATETIME_SHORT={year:n,month:n,day:n,hour:n,minute:n},DATETIME_SHORT_WITH_SECONDS={year:n,month:n,day:n,hour:n,minute:n,second:n},DATETIME_MED={year:n,month:s,day:n,hour:n,minute:n},DATETIME_MED_WITH_SECONDS={year:n,month:s,day:n,hour:n,minute:n,second:n},DATETIME_MED_WITH_WEEKDAY={year:n,month:s,day:n,weekday:s,hour:n,minute:n},DATETIME_FULL={year:n,month:l$1,day:n,hour:n,minute:n,timeZoneName:s},DATETIME_FULL_WITH_SECONDS={year:n,month:l$1,day:n,hour:n,minute:n,second:n,timeZoneName:s},DATETIME_HUGE={year:n,month:l$1,day:n,weekday:l$1,hour:n,minute:n,timeZoneName:l$1},DATETIME_HUGE_WITH_SECONDS={year:n,month:l$1,day:n,weekday:l$1,hour:n,minute:n,second:n,timeZoneName:l$1};function isUndefined(e){return void 0===e}function isNumber(e){return"number"==typeof e}function isInteger(e){return"number"==typeof e&&e%1==0}function isString(e){return"string"==typeof e}function isDate(e){return"[object Date]"===Object.prototype.toString.call(e)}function hasIntl(){try{return"undefined"!=typeof Intl&&Intl.DateTimeFormat}catch(e){return!1}}function hasFormatToParts(){return!isUndefined(Intl.DateTimeFormat.prototype.formatToParts)}function hasRelative(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function maybeArray(e){return Array.isArray(e)?e:[e]}function bestBy(e,n,r){if(0!==e.length)return e.reduce(function(e,t){t=[n(t),t];return e&&r(e[0],t[0])===e[0]?e:t},null)[1]}function pick(n,e){return e.reduce(function(e,t){return e[t]=n[t],e},{})}function hasOwnProperty$1(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function integerBetween(e,t,n){return isInteger(e)&&t<=e&&e<=n}function floorMod(e,t){return e-t*Math.floor(e/t)}function padStart(e,t){void 0===t&&(t=2);var n=e<0?"-":"",e=n?-1*e:e,t=e.toString().length<t?("0".repeat(t)+e).slice(-t):e.toString();return n+t}function parseInteger(e){if(!isUndefined(e)&&null!==e&&""!==e)return parseInt(e,10)}function parseMillis(e){if(!isUndefined(e)&&null!==e&&""!==e)return e=1e3*parseFloat("0."+e),Math.floor(e)}function roundTo(e,t,n){void 0===n&&(n=!1);t=Math.pow(10,t);return(n?Math.trunc:Math.round)(e*t)/t}function isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}function daysInYear(e){return isLeapYear(e)?366:365}function daysInMonth(e,t){var n=floorMod(t-1,12)+1;return 2===n?isLeapYear(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function objToLocalTS(e){var t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&0<=e.year&&(t=new Date(t)).setUTCFullYear(t.getUTCFullYear()-1900),+t}function weeksInWeekYear(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,e=e-1,e=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7;return 4==t||3==e?53:52}function untruncateYear(e){return 99<e?e:60<e?1900+e:2e3+e}function parseZoneInfo(e,t,n,r){void 0===r&&(r=null);var i,e=new Date(e),o={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"},r=(r&&(o.timeZone=r),Object.assign({timeZoneName:t},o)),t=hasIntl();return t&&hasFormatToParts()?(i=new Intl.DateTimeFormat(n,r).formatToParts(e).find(function(e){return"timezonename"===e.type.toLowerCase()}))?i.value:null:t?(i=new Intl.DateTimeFormat(n,o).format(e),new Intl.DateTimeFormat(n,r).format(e).substring(i.length).replace(/^[, \u200e]+/,"")):null}function signedOffset(e,t){e=parseInt(e,10),Number.isNaN(e)&&(e=0),t=parseInt(t,10)||0;return 60*e+(e<0||Object.is(e,-0)?-t:t)}function asNumber(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new InvalidArgumentError("Invalid unit value "+e);return t}function normalizeObject(e,t,n){var r,i,o={};for(r in e)!hasOwnProperty$1(e,r)||0<=n.indexOf(r)||null!=(i=e[r])&&(o[t(r)]=asNumber(i));return o}function formatOffset(e,t){var n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=0<=e?"+":"-";switch(t){case"short":return i+padStart(n,2)+":"+padStart(r,2);case"narrow":return i+n+(0<r?":"+r:"");case"techie":return i+padStart(n,2)+padStart(r,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function timeObject(e){return pick(e,["hour","minute","second","millisecond"])}var ianaRegex=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function stringify(e){return JSON.stringify(e,Object.keys(e).sort())}var monthsLong=["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthsNarrow=["J","F","M","A","M","J","J","A","S","O","N","D"];function months(e){switch(e){case"narrow":return[].concat(monthsNarrow);case"short":return[].concat(monthsShort);case"long":return[].concat(monthsLong);case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var weekdaysLong=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],weekdaysShort=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],weekdaysNarrow=["M","T","W","T","F","S","S"];function weekdays(e){switch(e){case"narrow":return[].concat(weekdaysNarrow);case"short":return[].concat(weekdaysShort);case"long":return[].concat(weekdaysLong);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var meridiems=["AM","PM"],erasLong=["Before Christ","Anno Domini"],erasShort=["BC","AD"],erasNarrow=["B","A"];function eras(e){switch(e){case"narrow":return[].concat(erasNarrow);case"short":return[].concat(erasShort);case"long":return[].concat(erasLong);default:return null}}function meridiemForDateTime(e){return meridiems[e.hour<12?0:1]}function weekdayForDateTime(e,t){return weekdays(t)[e.weekday-1]}function monthForDateTime(e,t){return months(t)[e.month-1]}function eraForDateTime(e,t){return eras(t)[e.year<0?0:1]}function formatRelativeTime(e,t,n,r){void 0===n&&(n="always"),void 0===r&&(r=!1);var i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&o){var a="days"===e;switch(t){case 1:return a?"tomorrow":"next "+i[e][0];case-1:return a?"yesterday":"last "+i[e][0];case 0:return a?"today":"this "+i[e][0]}}var n=Object.is(t,-0)||t<0,o=Math.abs(t),t=1===o,s=i[e],r=r?!t&&s[2]||s[1]:t?i[e][0]:e;return n?o+" "+r+" ago":"in "+o+" "+r}function formatString(e){var t="EEEE, LLLL d, yyyy, h:mm a";switch(stringify(pick(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]))){case stringify(DATE_SHORT):return"M/d/yyyy";case stringify(DATE_MED):return"LLL d, yyyy";case stringify(DATE_MED_WITH_WEEKDAY):return"EEE, LLL d, yyyy";case stringify(DATE_FULL):return"LLLL d, yyyy";case stringify(DATE_HUGE):return"EEEE, LLLL d, yyyy";case stringify(TIME_SIMPLE):return"h:mm a";case stringify(TIME_WITH_SECONDS):return"h:mm:ss a";case stringify(TIME_WITH_SHORT_OFFSET):case stringify(TIME_WITH_LONG_OFFSET):return"h:mm a";case stringify(TIME_24_SIMPLE):return"HH:mm";case stringify(TIME_24_WITH_SECONDS):return"HH:mm:ss";case stringify(TIME_24_WITH_SHORT_OFFSET):case stringify(TIME_24_WITH_LONG_OFFSET):return"HH:mm";case stringify(DATETIME_SHORT):return"M/d/yyyy, h:mm a";case stringify(DATETIME_MED):return"LLL d, yyyy, h:mm a";case stringify(DATETIME_FULL):return"LLLL d, yyyy, h:mm a";case stringify(DATETIME_HUGE):return t;case stringify(DATETIME_SHORT_WITH_SECONDS):return"M/d/yyyy, h:mm:ss a";case stringify(DATETIME_MED_WITH_SECONDS):return"LLL d, yyyy, h:mm:ss a";case stringify(DATETIME_MED_WITH_WEEKDAY):return"EEE, d LLL yyyy, h:mm a";case stringify(DATETIME_FULL_WITH_SECONDS):return"LLLL d, yyyy, h:mm:ss a";case stringify(DATETIME_HUGE_WITH_SECONDS):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return t}}function stringifyTokens(e,t){for(var n="",r=_createForOfIteratorHelperLoose(e);!(i=r()).done;){var i=i.value;i.literal?n+=i.val:n+=t(i.val)}return n}var _macroTokenToFormatOpts={D:DATE_SHORT,DD:DATE_MED,DDD:DATE_FULL,DDDD:DATE_HUGE,t:TIME_SIMPLE,tt:TIME_WITH_SECONDS,ttt:TIME_WITH_SHORT_OFFSET,tttt:TIME_WITH_LONG_OFFSET,T:TIME_24_SIMPLE,TT:TIME_24_WITH_SECONDS,TTT:TIME_24_WITH_SHORT_OFFSET,TTTT:TIME_24_WITH_LONG_OFFSET,f:DATETIME_SHORT,ff:DATETIME_MED,fff:DATETIME_FULL,ffff:DATETIME_HUGE,F:DATETIME_SHORT_WITH_SECONDS,FF:DATETIME_MED_WITH_SECONDS,FFF:DATETIME_FULL_WITH_SECONDS,FFFF:DATETIME_HUGE_WITH_SECONDS},Formatter=function(){function p(e,t){this.opts=t,this.loc=e,this.systemLoc=null}p.create=function(e,t){return new p(e,t=void 0===t?{}:t)},p.parseFormat=function(e){for(var t=null,n="",r=!1,i=[],o=0;o<e.length;o++){var a=e.charAt(o);"'"===a?(0<n.length&&i.push({literal:r,val:n}),t=null,n="",r=!r):r||a===t?n+=a:(0<n.length&&i.push({literal:!1,val:n}),t=n=a)}return 0<n.length&&i.push({literal:r,val:n}),i},p.macroTokenToFormatOpts=function(e){return _macroTokenToFormatOpts[e]};var e=p.prototype;return e.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,Object.assign({},this.opts,t)).format()},e.formatDateTime=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).format()},e.formatDateTimeParts=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).formatToParts()},e.resolvedOptions=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).resolvedOptions()},e.num=function(e,t){var n;return void 0===t&&(t=0),this.opts.forceSimple?padStart(e,t):(n=Object.assign({},this.opts),0<t&&(n.padTo=t),this.loc.numberFormatter(n).format(e))},e.formatDateTimeFromString=function(n,e){var r=this,i="en"===this.loc.listingMode(),t=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&hasFormatToParts(),o=function(e,t){return r.loc.extract(n,e,t)},a=function(e){return n.isOffsetFixed&&0===n.offset&&e.allowZ?"Z":n.isValid?n.zone.formatOffset(n.ts,e.format):""},s=function(){return i?meridiemForDateTime(n):o({hour:"numeric",hour12:!0},"dayperiod")},l=function(e,t){return i?monthForDateTime(n,e):o(t?{month:e}:{month:e,day:"numeric"},"month")},c=function(e,t){return i?weekdayForDateTime(n,e):o(t?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},u=function(e){var t=p.macroTokenToFormatOpts(e);return t?r.formatWithSystemDefault(n,t):e},d=function(e){return i?eraForDateTime(n,e):o({era:e},"era")};return stringifyTokens(p.parseFormat(e),function(e){switch(e){case"S":return r.num(n.millisecond);case"u":case"SSS":return r.num(n.millisecond,3);case"s":return r.num(n.second);case"ss":return r.num(n.second,2);case"m":return r.num(n.minute);case"mm":return r.num(n.minute,2);case"h":return r.num(n.hour%12==0?12:n.hour%12);case"hh":return r.num(n.hour%12==0?12:n.hour%12,2);case"H":return r.num(n.hour);case"HH":return r.num(n.hour,2);case"Z":return a({format:"narrow",allowZ:r.opts.allowZ});case"ZZ":return a({format:"short",allowZ:r.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:r.opts.allowZ});case"ZZZZ":return n.zone.offsetName(n.ts,{format:"short",locale:r.loc.locale});case"ZZZZZ":return n.zone.offsetName(n.ts,{format:"long",locale:r.loc.locale});case"z":return n.zoneName;case"a":return s();case"d":return t?o({day:"numeric"},"day"):r.num(n.day);case"dd":return t?o({day:"2-digit"},"day"):r.num(n.day,2);case"c":return r.num(n.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return r.num(n.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return t?o({month:"numeric",day:"numeric"},"month"):r.num(n.month);case"LL":return t?o({month:"2-digit",day:"numeric"},"month"):r.num(n.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return t?o({month:"numeric"},"month"):r.num(n.month);case"MM":return t?o({month:"2-digit"},"month"):r.num(n.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return t?o({year:"numeric"},"year"):r.num(n.year);case"yy":return t?o({year:"2-digit"},"year"):r.num(n.year.toString().slice(-2),2);case"yyyy":return t?o({year:"numeric"},"year"):r.num(n.year,4);case"yyyyyy":return t?o({year:"numeric"},"year"):r.num(n.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return r.num(n.weekYear.toString().slice(-2),2);case"kkkk":return r.num(n.weekYear,4);case"W":return r.num(n.weekNumber);case"WW":return r.num(n.weekNumber,2);case"o":return r.num(n.ordinal);case"ooo":return r.num(n.ordinal,3);case"q":return r.num(n.quarter);case"qq":return r.num(n.quarter,2);case"X":return r.num(Math.floor(n.ts/1e3));case"x":return r.num(n.ts);default:return u(e)}})},e.formatDurationFromString=function(e,t){var n,r=this,i=function(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},t=p.parseFormat(t),o=t.reduce(function(e,t){var n=t.literal,t=t.val;return n?e:e.concat(t)},[]),e=e.shiftTo.apply(e,o.map(i).filter(function(e){return e}));return stringifyTokens(t,(n=e,function(e){var t=i(e);return t?r.num(n.get(t),e.length):e}))},p}(),Invalid=function(){function e(e,t){this.reason=e,this.explanation=t}return e.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Zone=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new ZoneIsAbstractError},t.formatOffset=function(e,t){throw new ZoneIsAbstractError},t.offset=function(e){throw new ZoneIsAbstractError},t.equals=function(e){throw new ZoneIsAbstractError},_createClass(e,[{key:"type",get:function(){throw new ZoneIsAbstractError}},{key:"name",get:function(){throw new ZoneIsAbstractError}},{key:"universal",get:function(){throw new ZoneIsAbstractError}},{key:"isValid",get:function(){throw new ZoneIsAbstractError}}]),e}(),singleton=null,LocalZone=function(e){function t(){return e.apply(this,arguments)||this}_inheritsLoose(t,e);var n=t.prototype;return n.offsetName=function(e,t){return parseZoneInfo(e,t.format,t.locale)},n.formatOffset=function(e,t){return formatOffset(this.offset(e),t)},n.offset=function(e){return-new Date(e).getTimezoneOffset()},n.equals=function(e){return"local"===e.type},_createClass(t,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return hasIntl()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return singleton=null===singleton?new t:singleton}}]),t}(Zone),matchingRegex=RegExp("^"+ianaRegex.source+"$"),dtfCache={};function makeDTF(e){return dtfCache[e]||(dtfCache[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),dtfCache[e]}var typeToPos={year:0,month:1,day:2,hour:3,minute:4,second:5};function hackyOffset(e,t){var e=e.format(t).replace(/\u200E/g,""),t=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e),e=t[1],n=t[2];return[t[3],e,n,t[4],t[5],t[6]]}function partsOffset(e,t){for(var n=e.formatToParts(t),r=[],i=0;i<n.length;i++){var o=n[i],a=o.type,o=o.value,a=typeToPos[a];isUndefined(a)||(r[a]=parseInt(o,10))}return r}var ianaZoneCache={},IANAZone=function(n){function r(e){var t=n.call(this)||this;return t.zoneName=e,t.valid=r.isValidZone(e),t}_inheritsLoose(r,n),r.create=function(e){return ianaZoneCache[e]||(ianaZoneCache[e]=new r(e)),ianaZoneCache[e]},r.resetCache=function(){ianaZoneCache={},dtfCache={}},r.isValidSpecifier=function(e){return!(!e||!e.match(matchingRegex))},r.isValidZone=function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}},r.parseGMTOffset=function(e){if(e){e=e.match(/^Etc\/GMT(0|[+-]\d{1,2})$/i);if(e)return-60*parseInt(e[1])}return null};var e=r.prototype;return e.offsetName=function(e,t){return parseZoneInfo(e,t.format,t.locale,this.name)},e.formatOffset=function(e,t){return formatOffset(this.offset(e),t)},e.offset=function(e){var t,n,r,e=new Date(e);return isNaN(e)?NaN:(r=(n=+e)%1e3,(objToLocalTS({year:(t=((t=makeDTF(this.name)).formatToParts?partsOffset:hackyOffset)(t,e))[0],month:t[1],day:t[2],hour:24===(e=t[3])?0:e,minute:t[4],second:t[5],millisecond:0})-(n-=0<=r?r:1e3+r))/6e4)},e.equals=function(e){return"iana"===e.type&&e.name===this.name},_createClass(r,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),r}(Zone),singleton$1=null,FixedOffsetZone=function(n){function t(e){var t=n.call(this)||this;return t.fixed=e,t}_inheritsLoose(t,n),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){e=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new t(signedOffset(e[1],e[2]))}return null},_createClass(t,null,[{key:"utcInstance",get:function(){return singleton$1=null===singleton$1?new t(0):singleton$1}}]);var e=t.prototype;return e.offsetName=function(){return this.name},e.formatOffset=function(e,t){return formatOffset(this.fixed,t)},e.offset=function(){return this.fixed},e.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},_createClass(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+formatOffset(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),t}(Zone),InvalidZone=function(n){function e(e){var t=n.call(this)||this;return t.zoneName=e,t}_inheritsLoose(e,n);var t=e.prototype;return t.offsetName=function(){return null},t.formatOffset=function(){return""},t.offset=function(){return NaN},t.equals=function(){return!1},_createClass(e,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),e}(Zone);function normalizeZone(e,t){var n;return isUndefined(e)||null===e?t:e instanceof Zone?e:isString(e)?"local"===(n=e.toLowerCase())?t:"utc"===n||"gmt"===n?FixedOffsetZone.utcInstance:null!=(t=IANAZone.parseGMTOffset(e))?FixedOffsetZone.instance(t):IANAZone.isValidSpecifier(n)?IANAZone.create(e):FixedOffsetZone.parseSpecifier(n)||new InvalidZone(e):isNumber(e)?FixedOffsetZone.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new InvalidZone(e)}var now=function(){return Date.now()},defaultZone=null,defaultLocale$1=null,defaultNumberingSystem=null,defaultOutputCalendar=null,throwOnInvalid=!1,Settings=function(){function e(){}return e.resetCaches=function(){Locale.resetCache(),IANAZone.resetCache()},_createClass(e,null,[{key:"now",get:function(){return now},set:function(e){now=e}},{key:"defaultZoneName",get:function(){return e.defaultZone.name},set:function(e){defaultZone=e?normalizeZone(e):null}},{key:"defaultZone",get:function(){return defaultZone||LocalZone.instance}},{key:"defaultLocale",get:function(){return defaultLocale$1},set:function(e){defaultLocale$1=e}},{key:"defaultNumberingSystem",get:function(){return defaultNumberingSystem},set:function(e){defaultNumberingSystem=e}},{key:"defaultOutputCalendar",get:function(){return defaultOutputCalendar},set:function(e){defaultOutputCalendar=e}},{key:"throwOnInvalid",get:function(){return throwOnInvalid},set:function(e){throwOnInvalid=e}}]),e}(),intlDTCache={};function getCachedDTF(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=intlDTCache[n];return r||(r=new Intl.DateTimeFormat(e,t),intlDTCache[n]=r),r}var intlNumCache={};function getCachedINF(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=intlNumCache[n];return r||(r=new Intl.NumberFormat(e,t),intlNumCache[n]=r),r}var intlRelCache={};function getCachedRTF(e,t){var n=t=void 0===t?{}:t,n=(n.base,_objectWithoutPropertiesLoose(n,["base"])),n=JSON.stringify([e,n]),r=intlRelCache[n];return r||(r=new Intl.RelativeTimeFormat(e,t),intlRelCache[n]=r),r}var sysLocaleCache=null;function systemLocale(){var e;return sysLocaleCache=sysLocaleCache||(hasIntl()&&(e=(new Intl.DateTimeFormat).resolvedOptions().locale)&&"und"!==e?e:"en-US")}function parseLocaleString(e){var t=e.indexOf("-u-");if(-1===t)return[e];var n,t=e.substring(0,t);try{n=getCachedDTF(e).resolvedOptions()}catch(e){n=getCachedDTF(t).resolvedOptions()}e=n;return[t,e.numberingSystem,e.calendar]}function intlConfigString(e,t,n){return hasIntl()?((n||t)&&(e+="-u",n&&(e+="-ca-"+n),t)&&(e+="-nu-"+t),e):[]}function mapMonths(e){for(var t=[],n=1;n<=12;n++){var r=DateTime.utc(2016,n,1);t.push(e(r))}return t}function mapWeekdays(e){for(var t=[],n=1;n<=7;n++){var r=DateTime.utc(2016,11,13+n);t.push(e(r))}return t}function listStuff(e,t,n,r,i){e=e.listingMode(n);return"error"===e?null:("en"===e?r:i)(t)}function supportsFastNumbers(e){return(!e.numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||hasIntl()&&"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)}var PolyNumberFormatter=function(){function e(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1,!t&&hasIntl()&&(t={useGrouping:!1},0<n.padTo&&(t.minimumIntegerDigits=n.padTo),this.inf=getCachedINF(e,t))}return e.prototype.format=function(e){var t;return this.inf?(t=this.floor?Math.floor(e):e,this.inf.format(t)):padStart(this.floor?Math.floor(e):roundTo(e,3),this.padTo)},e}(),PolyDateFormatter=function(){function e(e,t,n){var r,i,o;this.opts=n,this.hasIntl=hasIntl(),e.zone.universal&&this.hasIntl?(i=e.offset/60*-1,o=IANAZone.isValidZone(i=0<=i?"Etc/GMT+"+i:"Etc/GMT"+i),0!==e.offset&&o?(r=i,this.dt=e):(r="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:DateTime.fromMillis(e.ts+60*e.offset*1e3))):"local"===e.zone.type?this.dt=e:r=(this.dt=e).zone.name,this.hasIntl&&(o=Object.assign({},this.opts),r&&(o.timeZone=r),this.dtf=getCachedDTF(t,o))}var t=e.prototype;return t.format=function(){var e,t;return this.hasIntl?this.dtf.format(this.dt.toJSDate()):(e=formatString(this.opts),t=Locale.create("en-US"),Formatter.create(t).formatDateTimeFromString(this.dt,e))},t.formatToParts=function(){return this.hasIntl&&hasFormatToParts()?this.dtf.formatToParts(this.dt.toJSDate()):[]},t.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},e}(),PolyRelFormatter=function(){function e(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&hasRelative()&&(this.rtf=getCachedRTF(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):formatRelativeTime(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),Locale=function(){function i(e,t,n,r){var e=parseLocaleString(e),i=e[0],o=e[1],e=e[2];this.locale=i,this.numberingSystem=t||o||null,this.outputCalendar=n||e||null,this.intl=intlConfigString(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}i.fromOpts=function(e){return i.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)},i.create=function(e,t,n,r){void 0===r&&(r=!1);e=e||Settings.defaultLocale;return new i(e||(r?"en-US":systemLocale()),t||Settings.defaultNumberingSystem,n||Settings.defaultOutputCalendar,e)},i.resetCache=function(){sysLocaleCache=null,intlDTCache={},intlNumCache={},intlRelCache={}},i.fromObject=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.outputCalendar;return i.create(t,n,e)};var e=i.prototype;return e.listingMode=function(e){void 0===e&&(e=!0);var t=hasIntl()&&hasFormatToParts(),n=this.isEnglish(),r=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t||n&&r||e?!t||n&&r?"en":"intl":"error"},e.clone=function(e){return e&&0!==Object.getOwnPropertyNames(e).length?i.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1):this},e.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!0}))},e.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!1}))},e.months=function(n,r,e){var i=this;return void 0===r&&(r=!1),listStuff(this,n,e=void 0===e?!0:e,months,function(){var t=r?{month:n,day:"numeric"}:{month:n},e=r?"format":"standalone";return i.monthsCache[e][n]||(i.monthsCache[e][n]=mapMonths(function(e){return i.extract(e,t,"month")})),i.monthsCache[e][n]})},e.weekdays=function(n,r,e){var i=this;return void 0===r&&(r=!1),listStuff(this,n,e=void 0===e?!0:e,weekdays,function(){var t=r?{weekday:n,year:"numeric",month:"long",day:"numeric"}:{weekday:n},e=r?"format":"standalone";return i.weekdaysCache[e][n]||(i.weekdaysCache[e][n]=mapWeekdays(function(e){return i.extract(e,t,"weekday")})),i.weekdaysCache[e][n]})},e.meridiems=function(e){var n=this;return listStuff(this,void 0,e=void 0===e?!0:e,function(){return meridiems},function(){var t;return n.meridiemCache||(t={hour:"numeric",hour12:!0},n.meridiemCache=[DateTime.utc(2016,11,13,9),DateTime.utc(2016,11,13,19)].map(function(e){return n.extract(e,t,"dayperiod")})),n.meridiemCache})},e.eras=function(e,t){var n=this;return listStuff(this,e,t=void 0===t?!0:t,eras,function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[DateTime.utc(-40,1,1),DateTime.utc(2017,1,1)].map(function(e){return n.extract(e,t,"era")})),n.eraCache[e]})},e.extract=function(e,t,n){e=this.dtFormatter(e,t).formatToParts().find(function(e){return e.type.toLowerCase()===n});return e?e.value:null},e.numberFormatter=function(e){return new PolyNumberFormatter(this.intl,(e=void 0===e?{}:e).forceSimple||this.fastNumbers,e)},e.dtFormatter=function(e,t){return new PolyDateFormatter(e,this.intl,t=void 0===t?{}:t)},e.relFormatter=function(e){return void 0===e&&(e={}),new PolyRelFormatter(this.intl,this.isEnglish(),e)},e.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||hasIntl()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},e.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},_createClass(i,[{key:"fastNumbers",get:function(){return null==this.fastNumbersCached&&(this.fastNumbersCached=supportsFastNumbers(this)),this.fastNumbersCached}}]),i}();function combineRegexes(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.reduce(function(e,t){return e+t.source},"");return RegExp("^"+r+"$")}function combineExtractors(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(o){return t.reduce(function(e,t){var n=e[0],r=e[1],e=e[2],t=t(o,e),e=t[0],i=t[1],t=t[2];return[Object.assign(n,e),r||i,t]},[{},null,1]).slice(0,2)}}function parse(e){if(null!=e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i],s=a[0],a=a[1],s=s.exec(e);if(s)return a(s)}}return[null,null]}function simpleParse(){for(var e=arguments.length,i=new Array(e),t=0;t<e;t++)i[t]=arguments[t];return function(e,t){for(var n={},r=0;r<i.length;r++)n[i[r]]=parseInteger(e[t+r]);return[n,null,t+r]}}var offsetRegex=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,isoTimeBaseRegex=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,isoTimeRegex=RegExp(""+isoTimeBaseRegex.source+offsetRegex.source+"?"),isoTimeExtensionRegex=RegExp("(?:T"+isoTimeRegex.source+")?"),isoYmdRegex=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,isoWeekRegex=/(\d{4})-?W(\d\d)(?:-?(\d))?/,isoOrdinalRegex=/(\d{4})-?(\d{3})/,extractISOWeekData=simpleParse("weekYear","weekNumber","weekDay"),extractISOOrdinalData=simpleParse("year","ordinal"),sqlYmdRegex=/(\d{4})-(\d\d)-(\d\d)/,sqlTimeRegex=RegExp(isoTimeBaseRegex.source+" ?(?:"+offsetRegex.source+"|("+ianaRegex.source+"))?"),sqlTimeExtensionRegex=RegExp("(?: "+sqlTimeRegex.source+")?");function int(e,t,n){e=e[t];return isUndefined(e)?n:parseInteger(e)}function extractISOYmd(e,t){return[{year:int(e,t),month:int(e,t+1,1),day:int(e,t+2,1)},null,t+3]}function extractISOTime(e,t){return[{hours:int(e,t,0),minutes:int(e,t+1,0),seconds:int(e,t+2,0),milliseconds:parseMillis(e[t+3])},null,t+4]}function extractISOOffset(e,t){var n=!e[t]&&!e[t+1],e=signedOffset(e[t+1],e[t+2]);return[{},n?null:FixedOffsetZone.instance(e),t+3]}function extractIANAZone(e,t){return[{},e[t]?IANAZone.create(e[t]):null,t+1]}var isoTimeOnly=RegExp("^T?"+isoTimeBaseRegex.source+"$"),isoDuration=/^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function extractISODuration(e){function t(e,t){return void 0===t&&(t=!1),void 0!==e&&(t||e&&u)?-e:e}var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],e=e[8],u="-"===n[0],n=c&&"-"===c[0];return[{years:t(parseInteger(r)),months:t(parseInteger(i)),weeks:t(parseInteger(o)),days:t(parseInteger(a)),hours:t(parseInteger(s)),minutes:t(parseInteger(l)),seconds:t(parseInteger(c),"-0"===c),milliseconds:t(parseMillis(e),n)}]}var obsOffsets={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function fromStrings(e,t,n,r,i,o,a){t={year:2===t.length?untruncateYear(parseInteger(t)):parseInteger(t),month:monthsShort.indexOf(n)+1,day:parseInteger(r),hour:parseInteger(i),minute:parseInteger(o)};return a&&(t.second=parseInteger(a)),e&&(t.weekday=3<e.length?weekdaysLong.indexOf(e)+1:weekdaysShort.indexOf(e)+1),t}var rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function extractRFC2822(e){var t=e[1],n=e[2],r=e[3],i=e[4],o=e[5],a=e[6],s=e[7],l=e[8],c=e[9],u=e[10],e=e[11],t=fromStrings(t,i,r,n,o,a,s),i=l?obsOffsets[l]:c?0:signedOffset(u,e);return[t,new FixedOffsetZone(i)]}function preprocessRFC2822(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var rfc1123=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,rfc850=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,ascii=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function extractRFC1123Or850(e){var t=e[1],n=e[2],r=e[3];return[fromStrings(t,e[4],r,n,e[5],e[6],e[7]),FixedOffsetZone.utcInstance]}function extractASCII(e){var t=e[1],n=e[2],r=e[3],i=e[4],o=e[5],a=e[6];return[fromStrings(t,e[7],n,r,i,o,a),FixedOffsetZone.utcInstance]}var isoYmdWithTimeExtensionRegex=combineRegexes(isoYmdRegex,isoTimeExtensionRegex),isoWeekWithTimeExtensionRegex=combineRegexes(isoWeekRegex,isoTimeExtensionRegex),isoOrdinalWithTimeExtensionRegex=combineRegexes(isoOrdinalRegex,isoTimeExtensionRegex),isoTimeCombinedRegex=combineRegexes(isoTimeRegex),extractISOYmdTimeAndOffset=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset),extractISOWeekTimeAndOffset=combineExtractors(extractISOWeekData,extractISOTime,extractISOOffset),extractISOOrdinalDateAndTime=combineExtractors(extractISOOrdinalData,extractISOTime,extractISOOffset),extractISOTimeAndOffset=combineExtractors(extractISOTime,extractISOOffset);function parseISODate(e){return parse(e,[isoYmdWithTimeExtensionRegex,extractISOYmdTimeAndOffset],[isoWeekWithTimeExtensionRegex,extractISOWeekTimeAndOffset],[isoOrdinalWithTimeExtensionRegex,extractISOOrdinalDateAndTime],[isoTimeCombinedRegex,extractISOTimeAndOffset])}function parseRFC2822Date(e){return parse(preprocessRFC2822(e),[rfc2822,extractRFC2822])}function parseHTTPDate(e){return parse(e,[rfc1123,extractRFC1123Or850],[rfc850,extractRFC1123Or850],[ascii,extractASCII])}function parseISODuration(e){return parse(e,[isoDuration,extractISODuration])}var extractISOTimeOnly=combineExtractors(extractISOTime);function parseISOTimeOnly(e){return parse(e,[isoTimeOnly,extractISOTimeOnly])}var sqlYmdWithTimeExtensionRegex=combineRegexes(sqlYmdRegex,sqlTimeExtensionRegex),sqlTimeCombinedRegex=combineRegexes(sqlTimeRegex),extractISOYmdTimeOffsetAndIANAZone=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset,extractIANAZone),extractISOTimeOffsetAndIANAZone=combineExtractors(extractISOTime,extractISOOffset,extractIANAZone);function parseSQL(e){return parse(e,[sqlYmdWithTimeExtensionRegex,extractISOYmdTimeOffsetAndIANAZone],[sqlTimeCombinedRegex,extractISOTimeOffsetAndIANAZone])}var INVALID="Invalid Duration",lowOrderMatrix={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},casualMatrix=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},lowOrderMatrix),daysInYearAccurate=365.2425,daysInMonthAccurate=30.436875,accurateMatrix=Object.assign({years:{quarters:4,months:12,weeks:daysInYearAccurate/7,days:daysInYearAccurate,hours:24*daysInYearAccurate,minutes:24*daysInYearAccurate*60,seconds:24*daysInYearAccurate*60*60,milliseconds:24*daysInYearAccurate*60*60*1e3},quarters:{months:3,weeks:daysInYearAccurate/28,days:daysInYearAccurate/4,hours:24*daysInYearAccurate/4,minutes:24*daysInYearAccurate*60/4,seconds:24*daysInYearAccurate*60*60/4,milliseconds:24*daysInYearAccurate*60*60*1e3/4},months:{weeks:daysInMonthAccurate/7,days:daysInMonthAccurate,hours:24*daysInMonthAccurate,minutes:24*daysInMonthAccurate*60,seconds:24*daysInMonthAccurate*60*60,milliseconds:24*daysInMonthAccurate*60*60*1e3}},lowOrderMatrix),orderedUnits=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],reverseUnits=orderedUnits.slice(0).reverse();function clone(e,t,n){n={values:(n=void 0===n?!1:n)?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new Duration(n)}function antiTrunc(e){return e<0?Math.floor(e):Math.ceil(e)}function convert(e,t,n,r,i){var e=e[i][n],o=t[n]/e,o=!(Math.sign(o)===Math.sign(r[i]))&&0!==r[i]&&Math.abs(o)<=1?antiTrunc(o):Math.trunc(o);r[i]+=o,t[n]-=o*e}function normalizeValues(n,r){reverseUnits.reduce(function(e,t){return isUndefined(r[t])?e:(e&&convert(n,r,e,r,t),t)},null)}var Duration=function(){function h(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||Locale.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?accurateMatrix:casualMatrix,this.isLuxonDuration=!0}h.fromMillis=function(e,t){return h.fromObject(Object.assign({milliseconds:e},t))},h.fromObject=function(e){if(null==e||"object"!=typeof e)throw new InvalidArgumentError("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new h({values:normalizeObject(e,h.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:Locale.fromObject(e),conversionAccuracy:e.conversionAccuracy})},h.fromISO=function(e,t){var n=parseISODuration(e)[0];return n?(n=Object.assign(n,t),h.fromObject(n)):h.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},h.fromISOTime=function(e,t){var n=parseISOTimeOnly(e)[0];return n?(n=Object.assign(n,t),h.fromObject(n)):h.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},h.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the Duration is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDurationError(e);return new h({invalid:e})},h.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(t)return t;throw new InvalidUnitError(e)},h.isDuration=function(e){return e&&e.isLuxonDuration||!1};var e=h.prototype;return e.toFormat=function(e,t){void 0===t&&(t={});t=Object.assign({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Formatter.create(this.loc,t).formatDurationFromString(this,e):INVALID},e.toObject=function(e){var t;return void 0===e&&(e={}),this.isValid?(t=Object.assign({},this.values),e.includeConfig&&(t.conversionAccuracy=this.conversionAccuracy,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t):{}},e.toISO=function(){var e;return this.isValid?(e="P",0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=roundTo(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e):null},e.toISOTime=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=this.toMillis();if(t<0||864e5<=t)return null;e=Object.assign({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e);var t=this.shiftTo("hours","minutes","seconds","milliseconds"),n="basic"===e.format?"hhmm":"hh:mm",t=(e.suppressSeconds&&0===t.seconds&&0===t.milliseconds||(n+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===t.milliseconds)||(n+=".SSS"),t.toFormat(n));return t=e.includePrefix?"T"+t:t},e.toJSON=function(){return this.toISO()},e.toString=function(){return this.toISO()},e.toMillis=function(){return this.as("milliseconds")},e.valueOf=function(){return this.toMillis()},e.plus=function(e){if(!this.isValid)return this;for(var t=friendlyDuration(e),n={},r=_createForOfIteratorHelperLoose(orderedUnits);!(i=r()).done;){var i=i.value;(hasOwnProperty$1(t.values,i)||hasOwnProperty$1(this.values,i))&&(n[i]=t.get(i)+this.get(i))}return clone(this,{values:n},!0)},e.minus=function(e){return this.isValid?(e=friendlyDuration(e),this.plus(e.negate())):this},e.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,r=Object.keys(this.values);n<r.length;n++){var i=r[n];t[i]=asNumber(e(this.values[i],i))}return clone(this,{values:t},!0)},e.get=function(e){return this[h.normalizeUnit(e)]},e.set=function(e){return this.isValid?clone(this,{values:Object.assign(this.values,normalizeObject(e,h.normalizeUnit,[]))}):this},e.reconfigure=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.conversionAccuracy,t={loc:this.loc.clone({locale:t,numberingSystem:n})};return e&&(t.conversionAccuracy=e),clone(this,t)},e.as=function(e){return this.isValid?this.shiftTo(e).get(e):NaN},e.normalize=function(){var e;return this.isValid?(e=this.toObject(),normalizeValues(this.matrix,e),clone(this,{values:e},!0)):this},e.shiftTo=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!this.isValid)return this;if(0===t.length)return this;for(var r,t=t.map(function(e){return h.normalizeUnit(e)}),i={},o={},a=this.toObject(),s=_createForOfIteratorHelperLoose(orderedUnits);!(f=s()).done;){var l=f.value;if(0<=t.indexOf(l)){var c,u=l,d=0;for(c in o)d+=this.matrix[c][l]*o[c],o[c]=0;isNumber(a[l])&&(d+=a[l]);var p,f=Math.trunc(d);for(p in o[l]=d-(i[l]=f),a)orderedUnits.indexOf(p)>orderedUnits.indexOf(l)&&convert(this.matrix,a,p,i,l)}else isNumber(a[l])&&(o[l]=a[l])}for(r in o)0!==o[r]&&(i[u]+=r===u?o[r]:o[r]/this.matrix[u][r]);return clone(this,{values:i},!0).normalize()},e.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);t<n.length;t++){var r=n[t];e[r]=-this.values[r]}return clone(this,{values:e},!0)},e.equals=function(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(var t,n=_createForOfIteratorHelperLoose(orderedUnits);!(r=n()).done;){var r=r.value;if(t=this.values[r],r=e.values[r],!(void 0===t||0===t?void 0===r||0===r:t===r))return!1}return!0},_createClass(h,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),h}();function friendlyDuration(e){if(isNumber(e))return Duration.fromMillis(e);if(Duration.isDuration(e))return e;if("object"==typeof e)return Duration.fromObject(e);throw new InvalidArgumentError("Unknown duration argument "+e+" of type "+typeof e)}var INVALID$1="Invalid Interval";function validateStartEnd(e,t){return e&&e.isValid?t&&t.isValid?t<e?Interval.invalid("end before start","The end of an interval must be after its start, but you had start="+e.toISO()+" and end="+t.toISO()):null:Interval.invalid("missing or invalid end"):Interval.invalid("missing or invalid start")}var Interval=function(){function c(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}c.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the Interval is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidIntervalError(e);return new c({invalid:e})},c.fromDateTimes=function(e,t){var e=friendlyDateTime(e),t=friendlyDateTime(t),n=validateStartEnd(e,t);return null==n?new c({start:e,end:t}):n},c.after=function(e,t){t=friendlyDuration(t),e=friendlyDateTime(e);return c.fromDateTimes(e,e.plus(t))},c.before=function(e,t){t=friendlyDuration(t),e=friendlyDateTime(e);return c.fromDateTimes(e.minus(t),e)},c.fromISO=function(e,t){var n,r,i,o=(e||"").split("/",2),a=o[0],s=o[1];if(a&&s){try{l=(n=DateTime.fromISO(a,t)).isValid}catch(s){l=!1}try{i=(r=DateTime.fromISO(s,t)).isValid}catch(s){i=!1}if(l&&i)return c.fromDateTimes(n,r);if(l){o=Duration.fromISO(s,t);if(o.isValid)return c.after(n,o)}else if(i){var l=Duration.fromISO(a,t);if(l.isValid)return c.before(r,l)}}return c.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},c.isInterval=function(e){return e&&e.isLuxonInterval||!1};var e=c.prototype;return e.length=function(e){return void 0===e&&(e="milliseconds"),this.isValid?this.toDuration.apply(this,[e]).get(e):NaN},e.count=function(e){var t,n;return void 0===e&&(e="milliseconds"),this.isValid?(t=this.start.startOf(e),n=this.end.startOf(e),Math.floor(n.diff(t,e).get(e))+1):NaN},e.hasSame=function(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))},e.isEmpty=function(){return this.s.valueOf()===this.e.valueOf()},e.isAfter=function(e){return!!this.isValid&&this.s>e},e.isBefore=function(e){return!!this.isValid&&this.e<=e},e.contains=function(e){return!!this.isValid&&this.s<=e&&this.e>e},e.set=function(e){var e=void 0===e?{}:e,t=e.start,e=e.end;return this.isValid?c.fromDateTimes(t||this.s,e||this.e):this},e.splitAt=function(){var t=this;if(!this.isValid)return[];for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];for(var i=n.map(friendlyDateTime).filter(function(e){return t.contains(e)}).sort(),o=[],a=this.s,s=0;a<this.e;){var l=i[s]||this.e,l=+l>+this.e?this.e:l;o.push(c.fromDateTimes(a,l)),a=l,s+=1}return o},e.splitBy=function(e){var t=friendlyDuration(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];for(var n=this.s,r=1,i=[];n<this.e;){var o=this.start.plus(t.mapUnits(function(e){return e*r})),o=+o>+this.e?this.e:o;i.push(c.fromDateTimes(n,o)),n=o,r+=1}return i},e.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},e.overlaps=function(e){return this.e>e.s&&this.s<e.e},e.abutsStart=function(e){return!!this.isValid&&+this.e==+e.s},e.abutsEnd=function(e){return!!this.isValid&&+e.e==+this.s},e.engulfs=function(e){return!!this.isValid&&this.s<=e.s&&this.e>=e.e},e.equals=function(e){return!(!this.isValid||!e.isValid)&&this.s.equals(e.s)&&this.e.equals(e.e)},e.intersection=function(e){var t;return this.isValid?(t=(this.s>e.s?this:e).s,(e=(this.e<e.e?this:e).e)<=t?null:c.fromDateTimes(t,e)):this},e.union=function(e){var t;return this.isValid?(t=(this.s<e.s?this:e).s,e=(this.e>e.e?this:e).e,c.fromDateTimes(t,e)):this},c.merge=function(e){var e=e.sort(function(e,t){return e.s-t.s}).reduce(function(e,t){var n=e[0],e=e[1];return e?e.overlaps(t)||e.abutsStart(t)?[n,e.union(t)]:[n.concat([e]),t]:[n,t]},[[],null]),t=e[0],e=e[1];return e&&t.push(e),t},c.xor=function(e){for(var t,n=null,r=0,i=[],e=e.map(function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]}),o=_createForOfIteratorHelperLoose((t=Array.prototype).concat.apply(t,e).sort(function(e,t){return e.time-t.time}));!(a=o()).done;)var a=a.value,n=1===(r+="s"===a.type?1:-1)?a.time:(n&&+n!=+a.time&&i.push(c.fromDateTimes(n,a.time)),null);return c.merge(i)},e.difference=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return c.xor([this].concat(n)).map(function(e){return t.intersection(e)}).filter(function(e){return e&&!e.isEmpty()})},e.toString=function(){return this.isValid?"["+this.s.toISO()+" – "+this.e.toISO()+")":INVALID$1},e.toISO=function(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):INVALID$1},e.toISODate=function(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():INVALID$1},e.toISOTime=function(e){return this.isValid?this.s.toISOTime(e)+"/"+this.e.toISOTime(e):INVALID$1},e.toFormat=function(e,t){t=(void 0===t?{}:t).separator,t=void 0===t?" – ":t;return this.isValid?""+this.s.toFormat(e)+t+this.e.toFormat(e):INVALID$1},e.toDuration=function(e,t){return this.isValid?this.e.diff(this.s,e,t):Duration.invalid(this.invalidReason)},e.mapEndpoints=function(e){return c.fromDateTimes(e(this.s),e(this.e))},_createClass(c,[{key:"start",get:function(){return this.isValid?this.s:null}},{key:"end",get:function(){return this.isValid?this.e:null}},{key:"isValid",get:function(){return null===this.invalidReason}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),c}(),Info=function(){function e(){}return e.hasDST=function(e){void 0===e&&(e=Settings.defaultZone);var t=DateTime.now().setZone(e).set({month:12});return!e.universal&&t.offset!==t.set({month:6}).offset},e.isValidIANAZone=function(e){return IANAZone.isValidSpecifier(e)&&IANAZone.isValidZone(e)},e.normalizeZone=function(e){return normalizeZone(e,Settings.defaultZone)},e.months=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,i=t.locObj,i=void 0===i?null:i,t=t.outputCalendar;return(i||Locale.create(void 0===n?null:n,void 0===r?null:r,void 0===t?"gregory":t)).months(e)},e.monthsFormat=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,i=t.locObj,i=void 0===i?null:i,t=t.outputCalendar;return(i||Locale.create(void 0===n?null:n,void 0===r?null:r,void 0===t?"gregory":t)).months(e,!0)},e.weekdays=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,t=t.locObj;return((void 0===t?null:t)||Locale.create(void 0===n?null:n,void 0===r?null:r,null)).weekdays(e)},e.weekdaysFormat=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,t=t.locObj;return((void 0===t?null:t)||Locale.create(void 0===n?null:n,void 0===r?null:r,null)).weekdays(e,!0)},e.meridiems=function(e){e=(void 0===e?{}:e).locale;return Locale.create(void 0===e?null:e).meridiems()},e.eras=function(e,t){void 0===e&&(e="short");t=(void 0===t?{}:t).locale;return Locale.create(void 0===t?null:t,null,"gregory").eras(e)},e.features=function(){var e=!1,t=!1,n=!1,r=!1;if(hasIntl()){e=!0,t=hasFormatToParts(),r=hasRelative();try{n="America/New_York"===new Intl.DateTimeFormat("en",{timeZone:"America/New_York"}).resolvedOptions().timeZone}catch(e){n=!1}}return{intl:e,intlTokens:t,zones:n,relative:r}},e}();function dayDiff(e,t){function n(e){return e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()}t=n(t)-n(e);return Math.floor(Duration.fromMillis(t).as("days"))}function highOrderDiffs(e,t,n){for(var r={},i=0,o=[["years",function(e,t){return t.year-e.year}],["quarters",function(e,t){return t.quarter-e.quarter}],["months",function(e,t){return t.month-e.month+12*(t.year-e.year)}],["weeks",function(e,t){e=dayDiff(e,t);return(e-e%7)/7}],["days",dayDiff]];i<o.length;i++){var a,s,l,c=o[i],u=c[0],c=c[1];0<=n.indexOf(u)&&(a=u,c=c(e,t),t<(l=e.plus(((s={})[u]=c,s)))?(e=e.plus(((s={})[u]=c-1,s)),--c):e=l,r[u]=c)}return[e,r,l,a]}function _diff(e,t,n,r){var e=highOrderDiffs(e,t,n),i=e[0],o=e[1],a=e[2],e=e[3],s=t-i,n=n.filter(function(e){return 0<=["hours","minutes","seconds","milliseconds"].indexOf(e)}),t=(0===n.length&&(a=a<t?i.plus(((t={})[e]=1,t)):a)!==i&&(o[e]=(o[e]||0)+s/(a-i)),Duration.fromObject(Object.assign(o,r)));return 0<n.length?(e=Duration.fromMillis(s,r)).shiftTo.apply(e,n).plus(t):t}var numberingSystems={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},numberingSystemsUTF16={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},hanidecChars=numberingSystems.hanidec.replace(/[\[|\]]/g,"").split("");function parseDigits(e){var t=parseInt(e,10);if(isNaN(t)){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);if(-1!==e[n].search(numberingSystems.hanidec))t+=hanidecChars.indexOf(e[n]);else for(var i in numberingSystemsUTF16){var i=numberingSystemsUTF16[i],o=i[0],i=i[1];o<=r&&r<=i&&(t+=r-o)}}return parseInt(t,10)}return t}function digitRegex(e,t){e=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+numberingSystems[e||"latn"]+t)}var MISSING_FTP="missing Intl.DateTimeFormat.formatToParts support";function intUnit(e,t){return void 0===t&&(t=function(e){return e}),{regex:e,deser:function(e){e=e[0];return t(parseDigits(e))}}}var NBSP=String.fromCharCode(160),spaceOrNBSP="( |"+NBSP+")",spaceOrNBSPRegExp=new RegExp(spaceOrNBSP,"g");function fixListRegex(e){return e.replace(/\./g,"\\.?").replace(spaceOrNBSPRegExp,spaceOrNBSP)}function stripInsensitivities(e){return e.replace(/\./g,"").replace(spaceOrNBSPRegExp," ").toLowerCase()}function oneOf(n,r){return null===n?null:{regex:RegExp(n.map(fixListRegex).join("|")),deser:function(e){var t=e[0];return n.findIndex(function(e){return stripInsensitivities(t)===stripInsensitivities(e)})+r}}}function offset(e,t){return{regex:e,deser:function(e){return signedOffset(e[1],e[2])},groups:t}}function simple(e){return{regex:e,deser:function(e){return e[0]}}}function escapeToken(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function unitForToken(t,n){function r(e){return{regex:RegExp(escapeToken(e.val)),deser:function(e){return e[0]},literal:!0}}var i=digitRegex(n),o=digitRegex(n,"{2}"),a=digitRegex(n,"{3}"),s=digitRegex(n,"{4}"),l=digitRegex(n,"{6}"),c=digitRegex(n,"{1,2}"),u=digitRegex(n,"{1,3}"),d=digitRegex(n,"{1,6}"),p=digitRegex(n,"{1,9}"),f=digitRegex(n,"{2,4}"),h=digitRegex(n,"{4,6}"),e=function(e){if(t.literal)return r(e);switch(e.val){case"G":return oneOf(n.eras("short",!1),0);case"GG":return oneOf(n.eras("long",!1),0);case"y":return intUnit(d);case"yy":return intUnit(f,untruncateYear);case"yyyy":return intUnit(s);case"yyyyy":return intUnit(h);case"yyyyyy":return intUnit(l);case"M":return intUnit(c);case"MM":return intUnit(o);case"MMM":return oneOf(n.months("short",!0,!1),1);case"MMMM":return oneOf(n.months("long",!0,!1),1);case"L":return intUnit(c);case"LL":return intUnit(o);case"LLL":return oneOf(n.months("short",!1,!1),1);case"LLLL":return oneOf(n.months("long",!1,!1),1);case"d":return intUnit(c);case"dd":return intUnit(o);case"o":return intUnit(u);case"ooo":return intUnit(a);case"HH":return intUnit(o);case"H":return intUnit(c);case"hh":return intUnit(o);case"h":return intUnit(c);case"mm":return intUnit(o);case"m":case"q":return intUnit(c);case"qq":return intUnit(o);case"s":return intUnit(c);case"ss":return intUnit(o);case"S":return intUnit(u);case"SSS":return intUnit(a);case"u":return simple(p);case"a":return oneOf(n.meridiems(),0);case"kkkk":return intUnit(s);case"kk":return intUnit(f,untruncateYear);case"W":return intUnit(c);case"WW":return intUnit(o);case"E":case"c":return intUnit(i);case"EEE":return oneOf(n.weekdays("short",!1,!1),1);case"EEEE":return oneOf(n.weekdays("long",!1,!1),1);case"ccc":return oneOf(n.weekdays("short",!0,!1),1);case"cccc":return oneOf(n.weekdays("long",!0,!1),1);case"Z":case"ZZ":return offset(new RegExp("([+-]"+c.source+")(?::("+o.source+"))?"),2);case"ZZZ":return offset(new RegExp("([+-]"+c.source+")("+o.source+")?"),2);case"z":return simple(/[a-z_+-/]{1,256}?/i);default:return r(e)}}(t)||{invalidReason:MISSING_FTP};return e.token=t,e}var partTypeStyleToTokenVal={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function tokenForPart(e,t,n){var r=e.type,e=e.value;return"literal"===r?{literal:!0,val:e}:(e=n[r],(n="object"==typeof(n=partTypeStyleToTokenVal[r])?n[e]:n)?{literal:!1,val:n}:void 0)}function buildRegex(e){return["^"+e.map(function(e){return e.regex}).reduce(function(e,t){return e+"("+t.source+")"},"")+"$",e]}function match$1(e,t,n){var r=e.match(t);if(r){var i,o,a,s={},l=1;for(i in n)hasOwnProperty$1(n,i)&&(a=(o=n[i]).groups?o.groups+1:1,!o.literal&&o.token&&(s[o.token.val[0]]=o.deser(r.slice(l,l+a))),l+=a);return[r,s]}return[r,{}]}function dateTimeFromMatches(r){var e=isUndefined(r.Z)?isUndefined(r.z)?null:IANAZone.create(r.z):new FixedOffsetZone(r.Z);return isUndefined(r.q)||(r.M=3*(r.q-1)+1),isUndefined(r.h)||(r.h<12&&1===r.a?r.h+=12:12===r.h&&0===r.a&&(r.h=0)),0===r.G&&r.y&&(r.y=-r.y),isUndefined(r.u)||(r.S=parseMillis(r.u)),[Object.keys(r).reduce(function(e,t){var n=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(t);return n&&(e[n]=r[t]),e},{}),e]}var dummyDateTimeCache=null;function getDummyDateTime(){return dummyDateTimeCache=dummyDateTimeCache||DateTime.fromMillis(1555555555555)}function maybeExpandMacroToken(e,t){var n,r;return e.literal||!(n=Formatter.macroTokenToFormatOpts(e.val))||(r=Formatter.create(t,n).formatDateTimeParts(getDummyDateTime()).map(function(e){return tokenForPart(e,t,n)})).includes(void 0)?e:r}function expandMacroTokens(e,t){var n;return(n=Array.prototype).concat.apply(n,e.map(function(e){return maybeExpandMacroToken(e,t)}))}function explainFromTokens(t,e,n){var n=expandMacroTokens(Formatter.parseFormat(n),t),r=n.map(function(e){return unitForToken(e,t)}),i=r.find(function(e){return e.invalidReason});if(i)return{input:e,tokens:n,invalidReason:i.invalidReason};var i=buildRegex(r),r=i[0],i=i[1],r=RegExp(r,"i"),i=match$1(e,r,i),o=i[0],i=i[1],a=i?dateTimeFromMatches(i):[null,null],s=a[0],a=a[1];if(hasOwnProperty$1(i,"a")&&hasOwnProperty$1(i,"H"))throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:n,regex:r,rawMatches:o,matches:i,result:s,zone:a}}function parseFromTokens(e,t,n){e=explainFromTokens(e,t,n);return[e.result,e.zone,e.invalidReason]}var nonLeapLadder=[0,31,59,90,120,151,181,212,243,273,304,334],leapLadder=[0,31,60,91,121,152,182,213,244,274,305,335];function unitOutOfRange(e,t){return new Invalid("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function dayOfWeek(e,t,n){e=new Date(Date.UTC(e,t-1,n)).getUTCDay();return 0===e?7:e}function computeOrdinal(e,t,n){return n+(isLeapYear(e)?leapLadder:nonLeapLadder)[t-1]}function uncomputeOrdinal(e,t){var e=isLeapYear(e)?leapLadder:nonLeapLadder,n=e.findIndex(function(e){return e<t});return{month:n+1,day:t-e[n]}}function gregorianToWeek(e){var t,n=e.year,r=e.month,i=e.day,o=computeOrdinal(n,r,i),r=dayOfWeek(n,r,i),i=Math.floor((o-r+10)/7);return i<1?i=weeksInWeekYear(t=n-1):i>weeksInWeekYear(n)?(t=n+1,i=1):t=n,Object.assign({weekYear:t,weekNumber:i,weekday:r},timeObject(e))}function weekToGregorian(e){var t,n=e.weekYear,r=e.weekNumber,i=e.weekday,o=dayOfWeek(n,1,4),a=daysInYear(n),r=7*r+i-o-3,i=(r<1?r+=daysInYear(t=n-1):a<r?(t=n+1,r-=daysInYear(n)):t=n,uncomputeOrdinal(t,r)),o=i.month,a=i.day;return Object.assign({year:t,month:o,day:a},timeObject(e))}function gregorianToOrdinal(e){var t=e.year,n=computeOrdinal(t,e.month,e.day);return Object.assign({year:t,ordinal:n},timeObject(e))}function ordinalToGregorian(e){var t=e.year,n=uncomputeOrdinal(t,e.ordinal),r=n.month,n=n.day;return Object.assign({year:t,month:r,day:n},timeObject(e))}function hasInvalidWeekData(e){var t=isInteger(e.weekYear),n=integerBetween(e.weekNumber,1,weeksInWeekYear(e.weekYear)),r=integerBetween(e.weekday,1,7);return t?n?!r&&unitOutOfRange("weekday",e.weekday):unitOutOfRange("week",e.week):unitOutOfRange("weekYear",e.weekYear)}function hasInvalidOrdinalData(e){var t=isInteger(e.year),n=integerBetween(e.ordinal,1,daysInYear(e.year));return t?!n&&unitOutOfRange("ordinal",e.ordinal):unitOutOfRange("year",e.year)}function hasInvalidGregorianData(e){var t=isInteger(e.year),n=integerBetween(e.month,1,12),r=integerBetween(e.day,1,daysInMonth(e.year,e.month));return t?n?!r&&unitOutOfRange("day",e.day):unitOutOfRange("month",e.month):unitOutOfRange("year",e.year)}function hasInvalidTimeData(e){var t=e.hour,n=e.minute,r=e.second,e=e.millisecond,i=integerBetween(t,0,23)||24===t&&0===n&&0===r&&0===e,o=integerBetween(n,0,59),a=integerBetween(r,0,59),s=integerBetween(e,0,999);return i?o?a?!s&&unitOutOfRange("millisecond",e):unitOutOfRange("second",r):unitOutOfRange("minute",n):unitOutOfRange("hour",t)}var INVALID$2="Invalid DateTime",MAX_DATE=864e13;function unsupportedZone(e){return new Invalid("unsupported zone",'the zone "'+e.name+'" is not supported')}function possiblyCachedWeekData(e){return null===e.weekData&&(e.weekData=gregorianToWeek(e.c)),e.weekData}function clone$1(e,t){e={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new DateTime(Object.assign({},e,t,{old:e}))}function fixOffset(e,t,n){var r=e-60*t*1e3,i=n.offset(r);return t===i?[r,t]:i===(n=n.offset(r-=60*(i-t)*1e3))?[r,i]:[e-60*Math.min(i,n)*1e3,Math.max(i,n)]}function tsToObj(e,t){e+=60*t*1e3;t=new Date(e);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function objToTS(e,t,n){return fixOffset(objToLocalTS(e),t,n)}function adjustTime(e,t){var n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),r=Object.assign({},e.c,{year:r,month:i,day:Math.min(e.c.day,daysInMonth(r,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),i=Duration.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),t=fixOffset(objToLocalTS(r),n,e.zone),r=t[0],n=t[1];return 0!==i&&(n=e.zone.offset(r+=i)),{ts:r,o:n}}function parseDataToDateTime(e,t,n,r,i){var o=n.setZone,a=n.zone;return e&&0!==Object.keys(e).length?(e=DateTime.fromObject(Object.assign(e,n,{zone:t||a,setZone:void 0})),o?e:e.setZone(a)):DateTime.invalid(new Invalid("unparsable",'the input "'+i+"\" can't be parsed as "+r))}function toTechFormat(e,t,n){return void 0===n&&(n=!0),e.isValid?Formatter.create(Locale.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function toTechTimeFormat(e,t){var n=t.suppressSeconds,r=t.suppressMilliseconds,i=t.includeOffset,o=t.includePrefix,o=void 0!==o&&o,a=t.includeZone,a=void 0!==a&&a,s=t.spaceZone,t=t.format,t=void 0===t?"extended":t,l="basic"===t?"HHmm":"HH:mm",n=(void 0!==n&&n&&0===e.second&&0===e.millisecond||(l+="basic"===t?"ss":":ss",void 0!==r&&r&&0===e.millisecond)||(l+=".SSS"),(a||i)&&(void 0!==s&&s)&&(l+=" "),a?l+="z":i&&(l+="basic"===t?"ZZZ":"ZZ"),toTechFormat(e,l));return n=o?"T"+n:n}var defaultUnitValues={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},defaultWeekUnitValues={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},defaultOrdinalUnitValues={ordinal:1,hour:0,minute:0,second:0,millisecond:0},orderedUnits$1=["year","month","day","hour","minute","second","millisecond"],orderedWeekUnits=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],orderedOrdinalUnits=["year","ordinal","hour","minute","second","millisecond"];function normalizeUnit(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(t)return t;throw new InvalidUnitError(e)}function quickDT(e,t){for(var n=_createForOfIteratorHelperLoose(orderedUnits$1);!(r=n()).done;){var r=r.value;isUndefined(e[r])&&(e[r]=defaultUnitValues[r])}var i,o=hasInvalidGregorianData(e)||hasInvalidTimeData(e);return o?DateTime.invalid(o):(o=Settings.now(),i=(o=objToTS(e,t.offset(o),t))[0],o=o[1],new DateTime({ts:i,zone:t,o:o}))}function diffRelative(t,n,r){function e(e,t){return e=roundTo(e,o||r.calendary?0:2,!0),n.loc.clone(r).relFormatter(r).format(e,t)}function i(e){return r.calendary?n.hasSame(t,e)?0:n.startOf(e).diff(t.startOf(e),e).get(e):n.diff(t,e).get(e)}var o=!!isUndefined(r.round)||r.round;if(r.unit)return e(i(r.unit),r.unit);for(var a=_createForOfIteratorHelperLoose(r.units);!(s=a()).done;){var s=s.value,l=i(s);if(1<=Math.abs(l))return e(l,s)}return e(n<t?-0:0,r.units[r.units.length-1])}var DateTime=function(){function g(e){var t,n=e.zone||Settings.defaultZone,r=e.invalid||(Number.isNaN(e.ts)?new Invalid("invalid input"):null)||(n.isValid?null:unsupportedZone(n)),i=(this.ts=isUndefined(e.ts)?Settings.now():e.ts,null),o=null;r||(o=e.old&&e.old.ts===this.ts&&e.old.zone.equals(n)?(i=(t=[e.old.c,e.old.o])[0],t[1]):(t=n.offset(this.ts),i=tsToObj(this.ts,t),i=(r=Number.isNaN(i.year)?new Invalid("invalid input"):null)?null:i,r?null:t)),this._zone=n,this.loc=e.loc||Locale.create(),this.invalid=r,this.weekData=null,this.c=i,this.o=o,this.isLuxonDateTime=!0}g.now=function(){return new g({})},g.local=function(e,t,n,r,i,o,a){return isUndefined(e)?g.now():quickDT({year:e,month:t,day:n,hour:r,minute:i,second:o,millisecond:a},Settings.defaultZone)},g.utc=function(e,t,n,r,i,o,a){return isUndefined(e)?new g({ts:Settings.now(),zone:FixedOffsetZone.utcInstance}):quickDT({year:e,month:t,day:n,hour:r,minute:i,second:o,millisecond:a},FixedOffsetZone.utcInstance)},g.fromJSDate=function(e,t){void 0===t&&(t={});var n,e=isDate(e)?e.valueOf():NaN;return Number.isNaN(e)?g.invalid("invalid input"):(n=normalizeZone(t.zone,Settings.defaultZone)).isValid?new g({ts:e,zone:n,loc:Locale.fromObject(t)}):g.invalid(unsupportedZone(n))},g.fromMillis=function(e,t){if(void 0===t&&(t={}),isNumber(e))return e<-MAX_DATE||MAX_DATE<e?g.invalid("Timestamp out of range"):new g({ts:e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)});throw new InvalidArgumentError("fromMillis requires a numerical input, but received a "+typeof e+" with value "+e)},g.fromSeconds=function(e,t){if(void 0===t&&(t={}),isNumber(e))return new g({ts:1e3*e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)});throw new InvalidArgumentError("fromSeconds requires a numerical input")},g.fromObject=function(e){var t=normalizeZone(e.zone,Settings.defaultZone);if(!t.isValid)return g.invalid(unsupportedZone(t));var n=Settings.now(),r=t.offset(n),i=normalizeObject(e,normalizeUnit,["zone","locale","outputCalendar","numberingSystem"]),o=!isUndefined(i.ordinal),a=!isUndefined(i.year),s=!isUndefined(i.month)||!isUndefined(i.day),a=a||s,l=i.weekYear||i.weekNumber,c=Locale.fromObject(e);if((a||o)&&l)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&o)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");for(var u,s=l||i.weekday&&!a,d=tsToObj(n,r),p=(s?(m=orderedWeekUnits,u=defaultWeekUnitValues,d=gregorianToWeek(d)):o?(m=orderedOrdinalUnits,u=defaultOrdinalUnitValues,d=gregorianToOrdinal(d)):(m=orderedUnits$1,u=defaultUnitValues),!1),f=_createForOfIteratorHelperLoose(m);!(h=f()).done;){var h=h.value;isUndefined(i[h])?i[h]=(p?u:d)[h]:p=!0}var m,l=(s?hasInvalidWeekData:o?hasInvalidOrdinalData:hasInvalidGregorianData)(i)||hasInvalidTimeData(i);return l?g.invalid(l):(m=new g({ts:(n=objToTS(s?weekToGregorian(i):o?ordinalToGregorian(i):i,r,t))[0],zone:t,o:n[1],loc:c}),i.weekday&&a&&e.weekday!==m.weekday?g.invalid("mismatched weekday","you can't specify both a weekday of "+i.weekday+" and a date of "+m.toISO()):m)},g.fromISO=function(e,t){void 0===t&&(t={});var n=parseISODate(e);return parseDataToDateTime(n[0],n[1],t,"ISO 8601",e)},g.fromRFC2822=function(e,t){void 0===t&&(t={});var n=parseRFC2822Date(e);return parseDataToDateTime(n[0],n[1],t,"RFC 2822",e)},g.fromHTTP=function(e,t){void 0===t&&(t={});e=parseHTTPDate(e);return parseDataToDateTime(e[0],e[1],t,"HTTP",t)},g.fromFormat=function(e,t,n){if(void 0===n&&(n={}),isUndefined(e)||isUndefined(t))throw new InvalidArgumentError("fromFormat requires an input string and a format");var r=n,i=r.locale,r=r.numberingSystem,i=parseFromTokens(Locale.fromOpts({locale:void 0===i?null:i,numberingSystem:void 0===r?null:r,defaultToEN:!0}),e,t),r=i[0],o=i[1],i=i[2];return i?g.invalid(i):parseDataToDateTime(r,o,n,"format "+t,e)},g.fromString=function(e,t,n){return g.fromFormat(e,t,n=void 0===n?{}:n)},g.fromSQL=function(e,t){void 0===t&&(t={});var n=parseSQL(e);return parseDataToDateTime(n[0],n[1],t,"SQL",e)},g.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the DateTime is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDateTimeError(e);return new g({invalid:e})},g.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var e=g.prototype;return e.get=function(e){return this[e]},e.resolvedLocaleOpts=function(e){e=Formatter.create(this.loc.clone(e=void 0===e?{}:e),e).resolvedOptions(this);return{locale:e.locale,numberingSystem:e.numberingSystem,outputCalendar:e.calendar}},e.toUTC=function(e,t){return void 0===t&&(t={}),this.setZone(FixedOffsetZone.instance(e=void 0===e?0:e),t)},e.toLocal=function(){return this.setZone(Settings.defaultZone)},e.setZone=function(e,t){var n,t=void 0===t?{}:t,r=t.keepLocalTime,r=void 0!==r&&r,t=t.keepCalendarTime,t=void 0!==t&&t;return(e=normalizeZone(e,Settings.defaultZone)).equals(this.zone)?this:e.isValid?(n=this.ts,(r||t)&&(r=e.offset(this.ts),n=objToTS(this.toObject(),r,e)[0]),clone$1(this,{ts:n,zone:e})):g.invalid(unsupportedZone(e))},e.reconfigure=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.outputCalendar,t=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:e});return clone$1(this,{loc:t})},e.setLocale=function(e){return this.reconfigure({locale:e})},e.set=function(e){if(!this.isValid)return this;var t,e=normalizeObject(e,normalizeUnit,[]),n=!isUndefined(e.weekYear)||!isUndefined(e.weekNumber)||!isUndefined(e.weekday),r=!isUndefined(e.ordinal),i=!isUndefined(e.year),o=!isUndefined(e.month)||!isUndefined(e.day),a=e.weekYear||e.weekNumber;if((i||o||r)&&a)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&r)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");n?t=weekToGregorian(Object.assign(gregorianToWeek(this.c),e)):isUndefined(e.ordinal)?(t=Object.assign(this.toObject(),e),isUndefined(e.day)&&(t.day=Math.min(daysInMonth(t.year,t.month),t.day))):t=ordinalToGregorian(Object.assign(gregorianToOrdinal(this.c),e));i=objToTS(t,this.o,this.zone);return clone$1(this,{ts:i[0],o:i[1]})},e.plus=function(e){return this.isValid?clone$1(this,adjustTime(this,friendlyDuration(e))):this},e.minus=function(e){return this.isValid?clone$1(this,adjustTime(this,friendlyDuration(e).negate())):this},e.startOf=function(e){if(!this.isValid)return this;var t={},e=Duration.normalizeUnit(e);switch(e){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}return"weeks"===e&&(t.weekday=1),"quarters"===e&&(e=Math.ceil(this.month/3),t.month=3*(e-1)+1),this.set(t)},e.endOf=function(e){var t;return this.isValid?this.plus(((t={})[e]=1,t)).startOf(e).minus(1):this},e.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?Formatter.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):INVALID$2},e.toLocaleString=function(e){return void 0===e&&(e=DATE_SHORT),this.isValid?Formatter.create(this.loc.clone(e),e).formatDateTime(this):INVALID$2},e.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?Formatter.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},e.toISO=function(e){return void 0===e&&(e={}),this.isValid?this.toISODate(e)+"T"+this.toISOTime(e):null},e.toISODate=function(e){e=(void 0===e?{}:e).format,e="basic"===(void 0===e?"extended":e)?"yyyyMMdd":"yyyy-MM-dd";return toTechFormat(this,e=9999<this.year?"+"+e:e)},e.toISOWeekDate=function(){return toTechFormat(this,"kkkk-'W'WW-c")},e.toISOTime=function(e){var e=void 0===e?{}:e,t=e.suppressMilliseconds,n=e.suppressSeconds,r=e.includeOffset,i=e.includePrefix,e=e.format;return toTechTimeFormat(this,{suppressSeconds:void 0!==n&&n,suppressMilliseconds:void 0!==t&&t,includeOffset:void 0===r||r,includePrefix:void 0!==i&&i,format:void 0===e?"extended":e})},e.toRFC2822=function(){return toTechFormat(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},e.toHTTP=function(){return toTechFormat(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},e.toSQLDate=function(){return toTechFormat(this,"yyyy-MM-dd")},e.toSQLTime=function(e){var e=void 0===e?{}:e,t=e.includeOffset,e=e.includeZone;return toTechTimeFormat(this,{includeOffset:void 0===t||t,includeZone:void 0!==e&&e,spaceZone:!0})},e.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},e.toString=function(){return this.isValid?this.toISO():INVALID$2},e.valueOf=function(){return this.toMillis()},e.toMillis=function(){return this.isValid?this.ts:NaN},e.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},e.toJSON=function(){return this.toISO()},e.toBSON=function(){return this.toJSDate()},e.toObject=function(e){var t;return void 0===e&&(e={}),this.isValid?(t=Object.assign({},this.c),e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t):{}},e.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},e.diff=function(e,t,n){var r;return void 0===t&&(t="milliseconds"),void 0===n&&(n={}),this.isValid&&e.isValid?(n=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),t=maybeArray(t).map(Duration.normalizeUnit),t=_diff((r=e.valueOf()>this.valueOf())?this:e,r?e:this,t,n),r?t.negate():t):Duration.invalid(this.invalid||e.invalid,"created by diffing an invalid DateTime")},e.diffNow=function(e,t){return void 0===e&&(e="milliseconds"),void 0===t&&(t={}),this.diff(g.now(),e,t)},e.until=function(e){return this.isValid?Interval.fromDateTimes(this,e):this},e.hasSame=function(e,t){var n;return!!this.isValid&&(n=e.valueOf(),(e=this.setZone(e.zone,{keepLocalTime:!0})).startOf(t)<=n)&&n<=e.endOf(t)},e.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},e.toRelative=function(e){var t,n,r,i;return this.isValid?(t=(e=void 0===e?{}:e).base||g.fromObject({zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0,r=["years","months","days","hours","minutes","seconds"],i=e.unit,Array.isArray(e.unit)&&(r=e.unit,i=void 0),diffRelative(t,this.plus(n),Object.assign(e,{numeric:"always",units:r,unit:i}))):null},e.toRelativeCalendar=function(e){return void 0===e&&(e={}),this.isValid?diffRelative(e.base||g.fromObject({zone:this.zone}),this,Object.assign(e,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},g.min=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.every(g.isDateTime))return bestBy(t,function(e){return e.valueOf()},Math.min);throw new InvalidArgumentError("min requires all arguments be DateTimes")},g.max=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.every(g.isDateTime))return bestBy(t,function(e){return e.valueOf()},Math.max);throw new InvalidArgumentError("max requires all arguments be DateTimes")},g.fromFormatExplain=function(e,t,n){var n=n=void 0===n?{}:n,r=n.locale,n=n.numberingSystem;return explainFromTokens(Locale.fromOpts({locale:void 0===r?null:r,numberingSystem:void 0===n?null:n,defaultToEN:!0}),e,t)},g.fromStringExplain=function(e,t,n){return g.fromFormatExplain(e,t,n=void 0===n?{}:n)},_createClass(g,[{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function(){return this._zone}},{key:"zoneName",get:function(){return this.isValid?this.zone.name:null}},{key:"year",get:function(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function(){return this.isValid?this.c.month:NaN}},{key:"day",get:function(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function(){return this.isValid?possiblyCachedWeekData(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?possiblyCachedWeekData(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?possiblyCachedWeekData(this).weekday:NaN}},{key:"ordinal",get:function(){return this.isValid?gregorianToOrdinal(this.c).ordinal:NaN}},{key:"monthShort",get:function(){return this.isValid?Info.months("short",{locObj:this.loc})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?Info.months("long",{locObj:this.loc})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?Info.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?Info.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}},{key:"offset",get:function(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function(){return this.isValid?this.zone.universal:null}},{key:"isInDST",get:function(){return!this.isOffsetFixed&&(this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return isLeapYear(this.year)}},{key:"daysInMonth",get:function(){return daysInMonth(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?daysInYear(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?weeksInWeekYear(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return DATE_SHORT}},{key:"DATE_MED",get:function(){return DATE_MED}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return DATE_MED_WITH_WEEKDAY}},{key:"DATE_FULL",get:function(){return DATE_FULL}},{key:"DATE_HUGE",get:function(){return DATE_HUGE}},{key:"TIME_SIMPLE",get:function(){return TIME_SIMPLE}},{key:"TIME_WITH_SECONDS",get:function(){return TIME_WITH_SECONDS}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return TIME_WITH_SHORT_OFFSET}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return TIME_WITH_LONG_OFFSET}},{key:"TIME_24_SIMPLE",get:function(){return TIME_24_SIMPLE}},{key:"TIME_24_WITH_SECONDS",get:function(){return TIME_24_WITH_SECONDS}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return TIME_24_WITH_SHORT_OFFSET}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return TIME_24_WITH_LONG_OFFSET}},{key:"DATETIME_SHORT",get:function(){return DATETIME_SHORT}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return DATETIME_SHORT_WITH_SECONDS}},{key:"DATETIME_MED",get:function(){return DATETIME_MED}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return DATETIME_MED_WITH_SECONDS}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return DATETIME_MED_WITH_WEEKDAY}},{key:"DATETIME_FULL",get:function(){return DATETIME_FULL}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return DATETIME_FULL_WITH_SECONDS}},{key:"DATETIME_HUGE",get:function(){return DATETIME_HUGE}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return DATETIME_HUGE_WITH_SECONDS}}]),g}();function friendlyDateTime(e){if(DateTime.isDateTime(e))return e;if(e&&e.valueOf&&isNumber(e.valueOf()))return DateTime.fromJSDate(e);if(e&&"object"==typeof e)return DateTime.fromObject(e);throw new InvalidArgumentError("Unknown datetime argument: "+e+", of type "+typeof e)}var VERSION="1.28.1",DateTime_1=luxon.DateTime=DateTime;luxon.Duration=Duration,luxon.FixedOffsetZone=FixedOffsetZone,luxon.IANAZone=IANAZone,luxon.Info=Info,luxon.Interval=Interval,luxon.InvalidZone=InvalidZone,luxon.LocalZone=LocalZone,luxon.Settings=Settings,luxon.VERSION=VERSION,luxon.Zone=Zone;const useStyles$f=makeStyles()(()=>({root:{padding:"15px 30px"},title:{display:"flex"},action:{fontWeight:600},time:{fontSize:"12px",paddingLeft:"15px",lineHeight:"21px"},description:{lineHeight:"150%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},divider:{margin:"0 30px",backgroundColor:"#D5DFE9",height:"0.5px"}})),ActivityCard=({longFormatTime:e=!1,data:{createdDateTime:t,event:n,description:r}})=>{var i=useStyles$f()["classes"];return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:i.root,"data-testid":"activity-card"},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:i.title},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:i.action},{children:n})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:i.time},{children:e?DateTime_1.fromISO(t||"").toFormat("F"):DateTime_1.fromISO(t||"").toFormat("tt")}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({placement:"top-start",title:r||""},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:i.description},{children:r}))}))})]})),jsxRuntime.exports.jsx(Divider$1,{className:i.divider})]})},useStyles$e=makeStyles()(e=>({root:{width:"100%",height:"100%"},header:{opacity:.9,display:"flex",justifyContent:"space-between",padding:e.spacing(4,6),position:"relative"},title:{opacity:.9,padding:e.spacing(4,6,2,6)},titleText:{textTransform:"uppercase",color:e.palette.secondary.main},scrollContent:{overflowY:"auto",height:"calc(100% - 65px)"}})),filters$2=[{value:"all",title:"All Activities"},{value:"today",title:"Activities today"}],today$1=DateTime_1.local().startOf("day"),yesterday=DateTime_1.local().plus({days:-1}).startOf("day"),ActivityPanel=({data:e,filter:t,onChangeFilter:n})=>{var r=useStyles$e()["classes"],i=null==e?void 0:e.filter(e=>DateTime_1.fromISO(e.createdDateTime||"").hasSame(today$1,"day")),o=null==e?void 0:e.filter(e=>DateTime_1.fromISO(e.createdDateTime||"").hasSame(yesterday,"day")),e=null==e?void 0:e.filter(e=>DateTime_1.fromISO(e.createdDateTime||"").startOf("day")<yesterday);return jsxRuntime.exports.jsxs("div",Object.assign({className:r.root},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:r.header},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.titleText},{children:"Today"})),jsxRuntime.exports.jsx(Filter,{data:filters$2,filter:t,onFilter:e=>{n(null==(e=null==e?void 0:e.target)?void 0:e.value)}})]})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.scrollContent},{children:[jsxRuntime.exports.jsx(Box$1,{children:null==i?void 0:i.map((e,t)=>jsxRuntime.exports.jsx(ActivityCard,{longFormatTime:!1,data:e},t))}),"all"===t&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[0<(null==o?void 0:o.length)&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.title,"data-testid":"filter-all-box"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.titleText},{children:"Yesterday"}))})),jsxRuntime.exports.jsx(Box$1,{children:o.map((e,t)=>jsxRuntime.exports.jsx(ActivityCard,{longFormatTime:!1,data:e},t))})]}),0<(null==e?void 0:e.length)&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.title},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.titleText},{children:"Older"}))})),jsxRuntime.exports.jsx(Box$1,{children:e.map((e,t)=>jsxRuntime.exports.jsx(ActivityCard,{longFormatTime:!0,data:e},t))})]})]})]}))]}))},useStyles$d=makeStyles()((e,{appListV2:t,type:n},r)=>({listItem:{display:"flex",cursor:"pointer",alignItems:"center",height:t?"unset":70,width:"100%",padding:t?0:e.spacing(0,6),"&:hover":{backgroundColor:"#EEF3F9"},["& ."+r.appName]:{marginLeft:e.spacing(3)}},iconButton:{borderRadius:4,textAlign:"center",width:"94px",height:"110px",cursor:"pointer",["& ."+r.appName]:{marginBottom:e.spacing(3)}},appName:{textAlign:"center",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",textTransform:"capitalize",width:"switcherGrid"===n?"80%":"unset",margin:"switcherGrid"===n?"auto":"unset"},image:{display:"flex",justifyContent:"center",alignItems:"center",margin:t?"10px":e.spacing(3.8,0)},bounding:{padding:"17px 27px 19px 27px"},img:{width:40,height:40},switcherGrid:{borderRadius:4,textAlign:"center",padding:"20px 0 20px 0",cursor:"pointer","&:hover":{backgroundColor:"#EEF3F9"}},dialogTitle:{fontSize:"18px",fontFamily:"Nunito",fontStyle:"normal",lineHeight:"24px",letterSpacing:"-1.30385e-09px",fontWeight:400,cursor:"default"}})),namespace$3="user-app-group",initialState$3={appGroups:[],uiStatus:Status.idle,appGroupsRootFolderId:""},appGroupSlice=createSlice({name:namespace$3,initialState:initialState$3,reducers:{fetchUserAppGroupsStart(e){e.uiStatus=Status.loading},fetchUserAppGroupSuccess(e,t){e.uiStatus=Status.success,e.appGroups=t.payload},fetchUserAppGroupsFailed(e){e.uiStatus=Status.failure},addAppToGroup(e,t){const{destination:n,appId:r}=t.payload;var t=(e.appGroups||[]).findIndex(e=>e.id===n),i=(((e.appGroups||[])[t]||{}).apps||[]).find(e=>e===r);-1===t||i||(e.appGroups||[])[t].apps.push(r)},removeAppFromGroup(e,t){const{source:n,appId:r}=t.payload;t=(e.appGroups||[]).findIndex(e=>e.id===n);-1!==t&&((e.appGroups||[])[t].apps=(e.appGroups||[])[t].apps.filter(e=>e!==r))},updateGroupPriority(e,t){var n=[...e.appGroups||[]];const{groupId:r,newPriority:i}=t.payload,o=n.find(e=>e.id===r);o&&(i>o.priority?(n.forEach(e=>{e.priority<=i&&e.priority>o.priority&&--e.priority}),o.priority=i):i<o.priority&&(n.forEach(e=>{e.priority>=i&&e.priority<o.priority&&(e.priority+=1)}),o.priority=i),n.sort((e,t)=>e.priority-t.priority),e.appGroups=n)},createNewAppGroupPlaceholder(e){var t;e.appGroups.find(e=>e.isNew)||((t=[...e.appGroups]).forEach(e=>e.priority+=1),t.unshift({groupName:"",id:"new-group-placeholder",treeObjectId:"",isNew:!0,apps:[],priority:0,expanded:!0,isEdited:!0}),e.appGroups=t)},removeNewAppGroupPlaceholder(e){e.appGroups=(e.appGroups||[]).filter(e=>!e.isNew&&(--e.priority,!0))},createNewAppGroupStart(e,t){return e},editAppGroup(e,t){const{edit:n,groupId:r,newGroupName:i}=t.payload;if(n&&(e.appGroups||[]).find(e=>e.isEdited))return;var o,t=(e.appGroups||[]).findIndex(e=>e.id===r);-1!==t&&(!((o=[...e.appGroups||[]])[t].isEdited=n)&&i&&(o[t].groupName=i),e.appGroups=o)},deleteAppGroup(e,t){return e},expandCollapse(e,t){var n,r=(e.appGroups||[]).findIndex(e=>e.id===t.payload);-1!==r&&(n=(e.appGroups||[])[r].isExpanded,(e.appGroups||[])[r].isExpanded=!n&&void 0!==n)},fetchUserAppGroupsRootFolderIdSuccess(e,t){e.appGroupsRootFolderId=t.payload}}}),{addAppToGroup,removeAppFromGroup,updateGroupPriority,removeNewAppGroupPlaceholder,createNewAppGroupStart,editAppGroup,deleteAppGroup,expandCollapse,fetchUserAppGroupsStart,fetchUserAppGroupSuccess,fetchUserAppGroupsFailed,fetchUserAppGroupsRootFolderIdSuccess}=appGroupSlice.actions,appGroupReducer=appGroupSlice.reducer;function __awaiter$1(e,a,s,l){return new(s=s||Promise)(function(n,t){function r(e){try{o(l.next(e))}catch(e){t(e)}}function i(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((l=l.apply(e,a||[])).next())})}const fetchUserAppGroupsRootFolderIdApi=(e,t)=>__awaiter$1(void 0,void 0,void 0,function*(){return(yield baseGraphQLApiWithError({query:`
|
|
1275
|
+
`,variables:e,graphEndpoint:n,token:r})}catch(e){return{success:!1}}});function*refetchNotificationSetting(){yield put(getNotification(0,30))}function*getNotificationListByMailBoxSaga(e){const{status:t,mailBoxIds:n,mailbox:r}=yield select(mailBoxSelector);var{limit:e,offset:i,callback:o}=e.payload,a=yield select(graphEndpointSelector),s=yield select(sessionTokenSelector),l="success"===t||"failure"===t;if(0!==Object.keys(r).length||l){yield put(getNotificationStart(i,e));l=yield call$7(handleNotificationListByMailBox,a,s,n,i,e);if(null!=o&&o(),0<(null==(a=null==l?void 0:l.errors)?void 0:a.length))yield put(getNotificationListByMailBoxFail());else{let n=0;a=null==(o=null==(s=null==l?void 0:l.data)?void 0:s.notificationMailboxes)?void 0:o.map(t=>{var e;return 0<(null==(e=null==t?void 0:t.notifications)?void 0:e.count)?(e=null==(e=null==(e=null==t?void 0:t.notifications)?void 0:e.records)?void 0:e.map(e=>Object.assign(Object.assign({},e),{mailboxId:t.id})),n++,e):[]}),l=((null==a?void 0:a.flat())||[]).map(t=>{var e,n=r.find(e=>e.id===t.mailboxId);return Object.assign(Object.assign({},t),{appId:(null==(e=null==n?void 0:n.application)?void 0:e.applicationId)||"",appName:(null==(e=null==n?void 0:n.application)?void 0:e.name)||"",eventNames:(null==(e=null==n?void 0:n.eventFilter)?void 0:e.eventNames)||[],icon:(null==(e=null==n?void 0:n.application)?void 0:e.icon)||"",title:t.title||""})});yield put(getNotificationListByMailBoxSuccess({offset:i,limit:e,availableMailBoxes:n,data:l}))}}else yield take(subscriberSuccess({}).type)}function*listenToPushNotificationSaga(e){var t=(yield select(mailBoxSelector))["mailbox"];const n=e["payload"];e=t.find(e=>e.id===n.mailboxId);yield put(updateNotificationList(Object.assign(Object.assign({},n),{appId:(null==(t=null==e?void 0:e.application)?void 0:t.applicationId)||"",appName:(null==(t=null==e?void 0:e.application)?void 0:t.name)||"",icon:(null==(t=null==e?void 0:e.application)?void 0:t.icon)||""})))}function*updateNotificationReadSaga(e){var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector);try{var r=yield call$7(handleUpdateNotificationRead,t,n,e.payload);null!=r&&r.error?yield put(updateNotificationReadFail()):yield put(updateNotificationReadSuccess(Object.assign({},r)))}catch(e){yield put(updateNotificationReadFail())}}function*updateMarkAllReadNotificationSaga(){var e=(yield select(mailBoxSelector))["mailBoxIds"],t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector);if(0<(null==e?void 0:e.length))try{(yield call$7(handleMarkAllReadNotification,e,t,n)).error?yield put(markAllReadNotificationFail()):yield put(markAllReadNotificationSuccess())}catch(e){yield put(markAllReadNotificationFail())}}function*getNotificationActionSaga(e){var t,n,{eventType:r,appId:i,eventName:o}=yield select(notificationDetailSelector(e.payload)),a=yield select(graphEndpointSelector),s=yield select(sessionTokenSelector);try{var l,c=yield call$7(handleGetNotificationAction,o,r,i,a,s);c.error?yield put(getNotificationActionError()):(l=(null==(n=null==(t=null==c?void 0:c.data)?void 0:t.notificationActions)?void 0:n.records)||[],yield put(getNotificationActionSuccess(e.payload,l)))}catch(e){yield put(getNotificationActionError())}}function*notificationSaga(){yield all([takeEvery$1(getNotification.type,getNotificationListByMailBoxSaga),takeLatest$1(updateUtilitySetting.type,refetchNotificationSetting),takeEvery$1(getNotificationListByMailBoxRequest.type,getNotificationListByMailBoxSaga),takeEvery$1("mailbox/PUSH_NOTIFICATION",listenToPushNotificationSaga),takeEvery$1(updateNotificationReadRequest.type,updateNotificationReadSaga),takeEvery$1(GET_NOTIFICATION_ACTION_REQUEST,getNotificationActionSaga),takeLatest$1(markAllReadNotificationRequest.type,updateMarkAllReadNotificationSaga)])}function getNotificationModule(){return{id:"os-notification-panel",reducerMap:{[nameSpace$3]:notificationReducer},sagas:[notificationSaga],initialActions:[],retained:!0}}const useStyles$b$1=makeStyles()((e,{msg:t})=>({root:{width:"100%",height:"100%"},noData:{paddingTop:66,display:"flex",justifyContent:"center"},iconNoData:{width:235,height:235,display:"flex",justifyContent:"center",borderRadius:"50%",padding:"20px",border:"20px solid #FFFF"},noDataDescription:{display:"flex",justifyContent:"center",marginTop:66},noDataDescriptionText:{fontSize:"18px",lineHeight:"23px",textTransform:"uppercase",color:e.palette.secondary.main,textAlign:"center",width:t?"250px":""}})),NotificationContent=({msg:e})=>{var t=useStyles$b$1({msg:e})["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:t.root,"data-testid":"notification-content"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:t.noData},{children:jsxRuntime.exports.jsx("div",Object.assign({className:t.iconNoData},{children:jsxRuntime.exports.jsx("img",{src:img,draggable:"false",alt:"noNotification"})}))})),jsxRuntime.exports.jsx("div",Object.assign({className:t.noDataDescription},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1","data-test":"no-notification",className:t.noDataDescriptionText},{children:e?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.select-product",defaultMessage:"No notifications for the selected product",description:"Notification panel: no notification message for select product"}):jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.pBrbyj",defaultMessage:"You don’t have any notifications",description:"Notification panel: no notification message"})}))}))]}))},useStyles$a$1=makeStyles()(e=>({cardContainer:{width:"100%","&:hover":{backgroundColor:"#EEF3F9"}},rootCard:{padding:e.spacing(4,6),display:"flex",cursor:"pointer"},unreadCard:{padding:e.spacing(4,6),display:"flex",cursor:"pointer",paddingLeft:e.spacing(2)},iconCard:{marginTop:e.spacing(-.4)},leftContent:{width:"345px",padding:e.spacing(0,6,0,3)},titleCard:{display:"flex"},appsCard:{fontSize:"14px",fontWeight:600},timestampCard:{fontSize:"12px",paddingLeft:e.spacing(3),color:e.palette.text.secondary},contentCard:{lineHeight:"150%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:e.palette.text.secondary},dividerCard:{margin:e.spacing(0,6),height:"0.5px"},notificationIcon:{width:24,height:24},unread:{width:"auto",marginRight:e.spacing(2.4),fontSize:"unset"},unreadIcon:{width:8,height:8,color:e.palette.primary.main},appName:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"calc(100% - 85px)"}})),NotificationCard=react.exports.forwardRef(({data:e,onViewDetail:t},n)=>{var r=useStyles$a$1()["classes"];const i=useDispatch(),[o,a]=react.exports.useState(!1);const{createdDateTime:s,icon:l,title:c,appName:u,body:d,id:p,flags:f}=e;return jsxRuntime.exports.jsxs("div",Object.assign({ref:n,className:r.cardContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({onClick:t,className:null!=f&&f.includes(NotificationFlag.unread)?r.unreadCard:r.rootCard},{children:[(null==f?void 0:f.includes(NotificationFlag.unread))&&jsxRuntime.exports.jsx(Icon$1,{"data-test":"notification-unread-icon","data-testid":"notification-unread-icon",className:r.unread,children:jsxRuntime.exports.jsx(default_1$4,{className:r.unreadIcon}),onClick:function(e){e.stopPropagation(),i(updateNotificationReadRequest(p))}}),jsxRuntime.exports.jsx("div",Object.assign({className:r.iconCard},{children:l&&!o?jsxRuntime.exports.jsx("img",{src:l,className:r.notificationIcon,draggable:"false",alt:"notification-card-icon",onError:function(){a(!0)}}):jsxRuntime.exports.jsx(Notifications,{})})),jsxRuntime.exports.jsxs("div",Object.assign({className:r.leftContent},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:r.titleCard},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.appName},{children:null!=f&&f.includes(NotificationFlag.unread)?jsxRuntime.exports.jsx("strong",{children:u}):u})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.timestampCard},{children:jsxRuntime.exports.jsx(FormattedRelativeTime$1,{value:getRelativeValue(s),unit:"minute",updateIntervalInSeconds:60,children:e=>e.includes("seconds")?jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.mvPoLJ",defaultMessage:"Just now",description:"the time label of notification that received on 1 minute"}):react.exports.createElement("span",{},e)})}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.contentCard},{children:convertHTMLEntities(c||d)}))})]}))]})),jsxRuntime.exports.jsx(Divider$1,{className:r.dividerCard})]}))}),useStyles$9$1=makeStyles()(e=>({header:{opacity:.9,display:"flex",justifyContent:"space-between",padding:e.spacing(3.5,6,4,6),position:"sticky",width:"fit-content",fontSize:"14px",fontWeight:400,top:0},scrollContent:{overflow:"hidden"},infinityLoading:{display:"flex",justifyContent:"center",padding:e.spacing(4)}}));function NotificationList({title:e,data:n,loading:t,handleGetNotification:r,onOpenNotificationDetail:i}){var o=useStyles$9$1()["classes"];const a=react.exports.useRef(),s=react.exports.useCallback(e=>{t||(a.current&&a.current.disconnect(),a.current=new IntersectionObserver(e=>{e[0].isIntersecting&&r()}),e&&a.current.observe(e))},[r,t]);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("div",Object.assign({className:o.header},{children:e.toUpperCase()})),jsxRuntime.exports.jsxs("div",Object.assign({className:o.scrollContent},{children:[0<(null==n?void 0:n.length)?n.map((e,t)=>n.length===t+1?jsxRuntime.exports.jsx(NotificationCard,{ref:s,onViewDetail:()=>null==i?void 0:i(e),data:e},t):jsxRuntime.exports.jsx(NotificationCard,{onViewDetail:()=>null==i?void 0:i(e),data:e},t)):jsxRuntime.exports.jsx(NotificationContent,{msg:!0}),t&&jsxRuntime.exports.jsx("div",Object.assign({className:o.infinityLoading},{children:jsxRuntime.exports.jsx(CircularProgress$1,{size:30})}))]}))]})}const useStyles$8$1=makeStyles()(e=>({loadingContainer:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},filterContainer:{position:"absolute",top:e.spacing(12.4),right:0,paddingTop:e.spacing(3),paddingRight:e.spacing(6),paddingBottom:e.spacing(2),width:"100%",display:"flex",justifyContent:"flex-end",backgroundColor:e.palette.background.default},markAllReadButton:{cursor:"pointer",marginRight:e.spacing(4),backgroundColor:e.palette.background.default,textTransform:"capitalize"}})),NotificationPanel=()=>{const r=useDispatch();var e=useStyles$8$1()["classes"],t=useSelector(applicationFilterSelector)||[];const[n,i]=react.exports.useState(!1),o=useSelector(mailboxIdSelector);var a=useSelector(notificationWithFilterSelector);const{filter:s,status:l,notifications:c,availableMailBoxes:u,offset:d,limit:p}=useSelector(notificationSelector),f=e=>Math.max(Math.ceil(50/e),5);react.exports.useEffect(()=>{var e=(null===o||void 0===o?void 0:o.length)||0;0<e&&0===p&&(e=f(e),r(getNotification(0,e)))},[r,p,o]);var h=react.exports.useCallback(()=>{var e;0<u&&(i(!0),e=f(u),r(getNotification(d+p,e,()=>{i(!1)})))},[u,r,p,d]);return jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getNotificationModule()]},{children:0===a.length&&"success"!==l&&"failure"!==l&&0<o.length?jsxRuntime.exports.jsx("div",Object.assign({className:e.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})):0<(null==c?void 0:c.length)?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:e.filterContainer,id:"notification-list-header"},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:function(){r(markAllReadNotificationRequest())},className:e.markAllReadButton,"data-test":"notification-mark-all-read-button","data-testid":"notification-mark-all-read-button"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"caption",color:"primary"},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.PtPIns",defaultMessage:"Mark All Read",description:"label of Mark All Read button"})}))})),jsxRuntime.exports.jsx(Filter,{data:[...filters$3,...t],filter:s,onFilter:function(e){e=e.target.value,r(updateFilterValue(e))}})]})),jsxRuntime.exports.jsx(NotificationList,{title:"All time",onOpenNotificationDetail:function(e){var t="DETAIL_PANEL_ID",n={name:"NOTIFICATION_DETAIL",config:{mode:"actionable",id:e.id,data:Object.assign({},e),actionIconButtons:null!=(n=e.actions)?n:[],onClose:()=>{console.log("onClose")}}};r(unmountPanel$1(t)),r(mountPanel$1({panelId:t,microFrontend:n,panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:413,width:420,header:{title:"Notification detail"},dimmed:0,parentPanelId:"NOTIFICATION_PANEL_ID"}})),r(updateNotificationReadRequest(e.id))},data:a,loading:n,handleGetNotification:h})]}):jsxRuntime.exports.jsx(NotificationContent,{})}))})};function CustomWorkFlow(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center","data-testid":"custom-workflow-box"},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.1+8+OX",defaultMessage:"Custom Workflows",description:"custom-workflows"})}),jsxRuntime.exports.jsx(Button$1,{variant:"outlined",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.gAFAOA",defaultMessage:"Create New",description:"creat-new-btn"}),color:"primary"})]})),jsxRuntime.exports.jsx(Typography$1,{style:{fontSize:14,marginTop:20},children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.9+Qhjr",defaultMessage:"You don’t have any custom workflows yet. Get started by clicking the Create New button above!",description:"text"})})]})}const useStyles$7$1=makeStyles()(e=>({dividerSmallMargin:{marginTop:e.spacing(3.6),marginBottom:e.spacing(4)},utilityItem:{padding:0,cursor:"pointer"},utilityItemHover:{padding:e.spacing(2,0),"&:hover":{backgroundColor:e.palette.background.paper}},utilityDetail:{fontSize:12}}));function NotificationSettingItem(e){const{imgSrc:t,primaryText:n,secondaryText:r,bigSize:i,onOpenUtility:o,onOpenApplication:a,hideDivider:s,applicationId:l,applicationTitle:c,utilityId:u="",utilityTitle:d="Finder",disabled:p,isHover:f}=e;e=useStyles$7$1().classes;return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs(ListItem$1,Object.assign({className:classNames(e.utilityItem,f?e.utilityItemHover:""),onClick:function(){null!==o&&void 0!==o&&o(u,d),null!==a&&void 0!==a&&a(l,c)},disabled:p,"data-testid":"notification-setting-item"},{children:[jsxRuntime.exports.jsx(ListItemAvatar$1,{children:jsxRuntime.exports.jsx(Avatar$1,{style:{width:i?60:40,height:i?60:40,borderRadius:"50%",marginRight:19},src:t})}),jsxRuntime.exports.jsx(ListItemText$1,{primary:jsxRuntime.exports.jsx(Typography$1,{variant:i?"h3":"body2",children:n}),secondary:jsxRuntime.exports.jsx(Typography$1,{variant:i?"body2":"caption",children:r})})]})),!s&&jsxRuntime.exports.jsx(Divider$1,{className:f?"":e.dividerSmallMargin})]})}const useStyles$6$1=makeStyles()(e=>({notificationTypeItemBox:{background:e.palette.background.paper,borderRadius:e.shape.borderRadius,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",padding:e.spacing(4,1,1),height:"100%",fontSize:10,lineHeight:"16px",justifyContent:"center"},disableType:{color:e.palette.grey[500]}}));function NotificationTypeItem(e){const{notificationTypeIcon:t,notificationTypeName:n,defaultSelected:r,onSelectNotificationType:i,notificationTypeId:o,isDisabled:a}=e,[s,l]=react.exports.useState(r);e=useStyles$6$1().classes;return jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(e.notificationTypeItemBox,a?e.disableType:""),"data-testid":"notification-type-item"},{children:[jsxRuntime.exports.jsx("div",{children:"string"==typeof t?jsxRuntime.exports.jsx("img",{src:t,alt:"icon",draggable:"false"}):t}),jsxRuntime.exports.jsx("div",{children:n}),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Checkbox$1,{icon:jsxRuntime.exports.jsx("img",{src:img$1m,alt:"uncheck icon",draggable:"false"}),checkedIcon:jsxRuntime.exports.jsx("img",{src:img$1l,alt:"checked icon",draggable:"false"}),checked:s,onChange:function(){l(e=>(null!==i&&void 0!==i&&i(o,!e),!e))},disabled:!!a})})]}))}const useStyles$5$1=makeStyles()(e=>({notificationTypeBox:{paddingBottom:e.spacing(0)},notificationTypeHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:16,lineHeight:"22px",fontWeight:600,marginBottom:e.spacing(2)},notificationList:{display:"inline-grid",gridColumnGap:e.spacing(2.8),gridTemplateColumns:"1fr 1fr 1fr",width:"100%",marginBottom:e.spacing(4.4)},divider:{marginTop:e.spacing(4),marginBottom:e.spacing(4.4)},dividerWithoutDescription:{marginBottom:e.spacing(3)}})),defaultNotificationTypeList=[{id:INotificationType.EMAIL,notificationTypeIcon:jsxRuntime.exports.jsx(Email,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.rTFvFj",defaultMessage:"Email",description:"allow notification types: email"}),isSelected:!0},{id:INotificationType.NOTIFICATION_CENTER,notificationTypeIcon:jsxRuntime.exports.jsx(HelpCenter$1,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.SmyvFq",defaultMessage:"Notification Center",description:"allow notification types: Notification Center"}),isSelected:!0},{id:INotificationType.BANNER,notificationTypeIcon:jsxRuntime.exports.jsx(Banner,{}),notificationTypeName:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.r7Whww",defaultMessage:"Banners",description:"allow notification types: Banners"}),isSelected:!0}];function NotificationType(e){const{notificationTypeTitle:t,children:n,description:r,allowTypes:i=[],allowNotification:o,onChangeAllowType:a,hideDivider:s,onChangeNotificationType:l,disabledTypes:c=[]}=e,[u,d]=react.exports.useState(!!o),[p,f]=react.exports.useState(defaultNotificationTypeList);var e=useStyles$5$1()["classes"],h=[...i];const[m,g]=react.exports.useState(i);var v=t||"Allow Notifications";return react.exports.useEffect(()=>{var e=defaultNotificationTypeList.map(t=>{var e=-1!==m.findIndex(e=>e===t.id),n=-1!==c.findIndex(e=>e===t.id);return Object.assign(Object.assign({},t),{isSelected:e,isDisabled:n})});f(e)},[h.join(", "),m]),react.exports.useEffect(()=>{null!==a&&void 0!==a&&a(u),u?0===m.length&&u&&g([INotificationType.EMAIL]):g([])},[u]),jsxRuntime.exports.jsxs("div",Object.assign({className:e.notificationTypeBox},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:e.notificationTypeHeader},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.8Z0yyD",defaultMessage:"{title}",description:"notification setting: allow notification types",values:{title:v}})}),jsxRuntime.exports.jsx(Switch$1,{checked:u,onChange:function(){d(e=>!e)},color:"primary",name:"notificationTypeChecked","data-testid":"notification-type-switch"})]})),n,jsxRuntime.exports.jsx("div",Object.assign({className:e.notificationList},{children:p.map(t=>{var e=-1!==c.findIndex(e=>e===t.id)||!u;return jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(NotificationTypeItem,{notificationTypeIcon:t.notificationTypeIcon,notificationTypeName:t.notificationTypeName,defaultSelected:t.isSelected,onSelectNotificationType:l,notificationTypeId:t.id,isDisabled:e})},t.id+"-"+t.isSelected)})})),r,!s&&jsxRuntime.exports.jsx(Divider$1,{className:r?e.divider:e.dividerWithoutDescription})]}))}const useStyles$4$1=makeStyles()(e=>({tableCell:{padding:0,"& > span":{paddingLeft:0,paddingRight:0}},itemCell:{padding:0,"& > span":{padding:e.spacing(0,2)}},eventNameContainer:{display:"flex",alignItems:"center"},tableRowCheckbox:{marginRight:e.spacing(2)},rowCheckbox:{paddingLeft:0},customLineHeight:{lineHeight:e.spacing(8)},disabledCheckBox:{"& svg":{color:"green"}}}));function NotificationUtilityActionItem(e){const{events:t,disabled:n}=e,r=useStyles$4$1()["classes"],i=[{type:INotificationType.EMAIL,iconUrl:img$1p},{type:INotificationType.NOTIFICATION_CENTER,iconUrl:img$1o},{type:INotificationType.BANNER,iconUrl:img$1n}];return jsxRuntime.exports.jsx(TableContainer$1,{children:jsxRuntime.exports.jsxs(Table$1,Object.assign({"aria-label":"customized table"},{children:[jsxRuntime.exports.jsx(TableHead$1,{children:jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsx(TableCell$1,Object.assign({className:r.tableCell},{children:jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.KVIpaj",defaultMessage:"Events",description:"allow-notification"})})})),i.map(e=>jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:r.itemCell},{children:jsxRuntime.exports.jsx("img",{src:e.iconUrl,alt:e.type})}),e.type))]})}),jsxRuntime.exports.jsx(TableBody$1,{children:null==t?void 0:t.map(t=>jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsxs(TableCell$1,Object.assign({className:classNames(r.eventNameContainer,r.tableCell)},{children:[jsxRuntime.exports.jsx(Checkbox$1,{id:t.id,disabled:n,className:r.tableRowCheckbox}),jsxRuntime.exports.jsx(ListItemText$1,{children:jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.VNVmyk",defaultMessage:"{defaultMessage}",description:"Finder notifications: {defaultMessage}",values:{defaultMessage:t.title,id:t.id}})})})]})),i.map(e=>jsxRuntime.exports.jsx(TableCell$1,Object.assign({className:r.itemCell},{children:jsxRuntime.exports.jsx(Checkbox$1,{id:"checkbox-"+t.id,icon:jsxRuntime.exports.jsx(default_1$3,{}),checkedIcon:jsxRuntime.exports.jsx(CheckCircle,{})})}),e.type+"-type"))]},t.id))})]}))})}const useStyles$3$2=makeStyles()(e=>({finderNotification:{padding:e.spacing(4,6),maxHeight:"100%",overflow:"auto"},buttonBox:{display:"flex",justifyContent:"flex-end",marginTop:e.spacing(8)},buttonLeft:{marginRight:e.spacing(4)},settingItem:{marginBottom:e.spacing(6)},sharedItem:{padding:0}}));function NotificationUtilityPanel(e){const t=e["dataId"];e=useStyles$3$2().classes;const n=useSelector(notificationSelector).settings;var r=n.utility,r=null==r?void 0:r.find(e=>e.id===t);const[i,o]=react.exports.useState(r||{}),a=[];return[INotificationType.EMAIL,INotificationType.NOTIFICATION_CENTER,INotificationType.BANNER].forEach(t=>{-1===n.allowType.findIndex(e=>e===t)&&a.push(t)}),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:e.finderNotification},{children:[jsxRuntime.exports.jsx(NotificationType,{allowTypes:null==i?void 0:i.allowType,allowNotification:null==i?void 0:i.allow,onChangeAllowType:function(r){o(e=>{var t=r?[...e.allowType]:[],n=r?[...e.action]:[...e.action].map(e=>Object.assign(Object.assign({},e),{allow:!1}));return Object.assign(Object.assign({},e),{allow:r,allowType:t,action:n})})},onChangeNotificationType:function(r,i){o(e=>{var t=[...e.allowType],n=t.indexOf(r);return-1===n||i?t.push(r):t.splice(n,1),Object.assign(Object.assign({},e),{allowType:t})})},disabledTypes:a,children:jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:(null==i?void 0:i.iconUrl)||"",primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.ubNxKs",defaultMessage:"{utilityTitle}",description:"title of notification utility: {utilityTitle}",values:{id:null==i?void 0:i.id,utilityTitle:null==i?void 0:i.title}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.XkH621",defaultMessage:"Chose which events you’d like to be notified about.",description:"content of notification utility description"}),bigSize:!0}),description:jsxRuntime.exports.jsx(Typography$1,{variant:"caption",children:"Banner previews are being set at the parent level"})}),jsxRuntime.exports.jsx(NotificationUtilityActionItem,{events:null==i?void 0:i.action,onSelectAction:function(r){o(e=>{var t=[...e.action],n=t.findIndex(e=>e.id===r.id);return t[n]=r,Object.assign(Object.assign({},e),{action:t})})},disabled:!i.allow}),jsxRuntime.exports.jsx(Divider$1,{style:{marginBottom:20,marginTop:15}}),jsxRuntime.exports.jsx(CustomWorkFlow,{})]}))})}const useStyles$2$3=makeStyles()(e=>({notificationSetting:{padding:e.spacing(3,6,4.4),overflowY:"scroll",height:"100%"},appAllowTitle:{paddingTop:e.spacing(2.4)},dividerBigMargin:{marginTop:e.spacing(2.4),marginBottom:e.spacing(3)},notificationSettingItem:{padding:0},bannerStyleLabel:{fontWeight:"normal"}}));function NotificationSetting(){var e=useStyles$2$3()["classes"];const r=useDispatch(),[t,i]=react.exports.useState(!0),[n,o]=react.exports.useState(!0);var a=useSelector(notificationSettingSelector);const[s,l]=react.exports.useState(a.bannerStyle);var c=useSelector(notificationUtilitiesSelector);const u=useSelector(notificationApplicationsSelector),[d,p]=react.exports.useState(null==a?void 0:a.allow),[f,h]=react.exports.useState(a);var a=-1!==(null==(a=null===f||void 0===f?void 0:f.allowType)?void 0:a.findIndex(e=>e===INotificationType.BANNER));const[m,g]=react.exports.useState(a);function v(e){var t={name:"NOTIFICATION_UTILITY",config:{mode:"actionable",onClose:()=>{console.log("onClose")}}},n={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:472,width:413,zIndex:1002,header:{divider:!0,title:"finder notifications"}};r(mountPanel$1({panelId:e||"",microFrontend:t,panelConfig:n}))}function y(e){var t={name:"NOTIFICATION_APPLICATION",config:{mode:"actionable",onClose:()=>{console.log("onClose")}}},n={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:472,width:413,zIndex:1002,header:{divider:!0,title:"app notifications"}};r(mountPanel$1({panelId:e||"",microFrontend:t,panelConfig:n}))}return react.exports.useEffect(()=>{r(updateNotificationSetting(f))},[f,r]),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:e.notificationSetting},{children:[jsxRuntime.exports.jsx(NotificationType,{allowTypes:null===f||void 0===f?void 0:f.allowType,allowNotification:null===f||void 0===f?void 0:f.allow,onChangeAllowType:function(n){p(n),n||(i(n),o(n)),h(e=>{var t=n?[...e.allowType]:[];return Object.assign(Object.assign({},e),{allow:n,allowType:t})})},hideDivider:m,onChangeNotificationType:function(r,i){r===INotificationType.BANNER&&g(i),h(e=>{var t=[...e.allowType],n=t.indexOf(r);return-1===n||i?t.push(r):t.splice(n,1),Object.assign(Object.assign({},e),{allowType:t})})}}),d&&m&&jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:"Banner Style"}),jsxRuntime.exports.jsx(FormControl$1,Object.assign({component:"fieldset"},{children:jsxRuntime.exports.jsxs(RadioGroup$1,Object.assign({"aria-label":"bannerStyle",name:"bannerStyle",value:s,onChange:e=>{l(e.target.value),r(updateBannerStyle(e.target.value))},row:!0},{children:[jsxRuntime.exports.jsx(FormControlLabel$1,{value:"temporary",control:jsxRuntime.exports.jsx(Radio$2,{}),label:jsxRuntime.exports.jsx("span",{children:jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:"Temporary"})})}),jsxRuntime.exports.jsx(FormControlLabel$1,{value:"persistent",control:jsxRuntime.exports.jsx(Radio$2,{}),label:jsxRuntime.exports.jsx("span",{children:jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:"Persistent"})})})]}))})),jsxRuntime.exports.jsx(Divider$1,{className:e.dividerBigMargin})]}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center"},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.qJ0Sxo",defaultMessage:"Allow Utility Notifications",description:"allow-utility-notification"})}),jsxRuntime.exports.jsx(Switch$1,{checked:t,onChange:e=>{e=e.target.checked;i(e)},color:"primary",name:"enableUtilityNotification",disabled:!d})]})),jsxRuntime.exports.jsx(List$2,Object.assign({className:e.notificationSettingItem},{children:null==c?void 0:c.map(e=>jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:e.iconUrl,isHover:!0,primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.tadsU0",defaultMessage:"{defaultMessage}",description:"title of notification utility: {defaultMessage}",values:{id:e.id,defaultMessage:e.title}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.AgAM0k",defaultMessage:"{defaultMessage}",description:"allowed types of notification utility: {defaultMessage}",values:{id:e.id,defaultMessage:e.allowType.join(", ")}}),onOpenUtility:v,utilityId:e.id,utilityTitle:e.title,disabled:!t},e.id))}))]}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex",justifyContent:"space-between",alignItems:"center",className:e.appAllowTitle},{children:[jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.swIpqY",defaultMessage:"Allow Application Notifications",description:"allow-application-notification"})}),jsxRuntime.exports.jsx(Switch$1,{checked:n,onChange:e=>{e=e.target.checked;o(e)},color:"primary",name:"checkedB",disabled:!d})]})),jsxRuntime.exports.jsx(List$2,Object.assign({className:e.notificationSettingItem},{children:null==(a=null===u||void 0===u?void 0:u.allIds)?void 0:a.map(e=>jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:null===u||void 0===u?void 0:u.byId[e].iconUrl,isHover:!0,primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.JvsYLn",defaultMessage:"{defaultMessage}",description:"title of notification application: {defaultMessage}",values:{idMessage:e,defaultMessage:null===u||void 0===u?void 0:u.byId[e].name}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.AgAM0k",defaultMessage:"{defaultMessage}",description:"allowed types of notification utility: {defaultMessage}",values:{id:e,defaultMessage:null===u||void 0===u?void 0:u.byId[e].allowType.join(", ")}}),onOpenApplication:y,applicationId:e,applicationTitle:null===u||void 0===u?void 0:u.byId[e].name,disabled:!n},e))}))]})]}))})}const useStyles$1$3=makeStyles()(e=>({appNoti:{padding:e.spacing(6),paddingTop:e.spacing(4.4),overflowY:"scroll",height:"100%"}})),useStyles$h=makeStyles()(e=>({tableCell:{padding:0,"& > span":{paddingLeft:0,paddingRight:0}},tableRowCheckbox:{marginRight:e.spacing(2)},rowCheckbox:{paddingLeft:0,paddingTop:0,paddingBottom:0,height:"20px"},disabledCheckBox:{"& svg":{color:"green"}},firstColumn:{paddingRight:e.spacing(2)},secondColumn:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},thirdColumn:{paddingLeft:e.spacing(2)}}));function NotificationAllowCell(e){const{id:t,type:n,allowType:r,currentApplicationAllowType:i,isLineEnable:o,onChangeAppAction:a}=e,s=useStyles$h()["classes"];e=(e,t)=>{switch(t){case"email":return e.includes(INotificationType.EMAIL);case"banners":return e.includes(INotificationType.BANNER);case"notification-center":return e.includes(INotificationType.NOTIFICATION_CENTER)}};return jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:s.tableCell+" "+(()=>{switch(t){case"email":return s.firstColumn;case"notification-center":return s.secondColumn;case"banners":return s.thirdColumn;default:return""}})()},{children:jsxRuntime.exports.jsx(Checkbox$1,{id:"checkbox-"+t,checked:e(r,t),disabled:!e(i,t)||!o,icon:jsxRuntime.exports.jsx(default_1$3,{}),checkedIcon:jsxRuntime.exports.jsx(CheckCircle,{color:e(i,t)&&o?"primary":"disabled"}),onChange:e=>{a(e,n)}})}))}function NotificationAllowRow(e){const{allowNotificationTitle:t,checked:n,allowType:r,appId:i,id:o}=e;e=useStyles$h().classes;const a=useDispatch();var s=useSelector(notificationApplicationSelector(i));const[l,c]=react.exports.useState(n),u=null==s?void 0:s.allowType,[d,p]=react.exports.useState(r);s=[{id:"email",type:INotificationType.EMAIL},{id:"notification-center",type:INotificationType.NOTIFICATION_CENTER},{id:"banners",type:INotificationType.BANNER}];const f=(e,t)=>{let n;n=e.currentTarget.checked?[...d,t]:d.filter(e=>e!==t),p(n),a(updateAppActionAllowNotification(i,o,n,"allowType"))};return jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsx(TableCell$1,Object.assign({component:"th",scope:"row",className:e.tableCell},{children:jsxRuntime.exports.jsxs(Box$1,Object.assign({display:"flex"},{children:[jsxRuntime.exports.jsx(Checkbox$1,{"data-test":"row-check-"+o,"data-testid":"row-check-"+o,className:e.rowCheckbox,checked:l,onChange:e=>{e=e.currentTarget.checked;c(e),a(updateAppActionAllowNotification(i,o,e,"allow"))}}),jsxRuntime.exports.jsx(Typography$1,{variant:"body2",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.tSG+Bv",defaultMessage:"{text}",description:"allow-notification-table-{text}",values:{text:t}})})]}))})),s.map(e=>jsxRuntime.exports.jsx(NotificationAllowCell,{id:e.id,type:e.type,allowType:r,currentApplicationAllowType:u,isLineEnable:l,onChangeAppAction:f},e.id))]})}function NotificationAllowTable(e){const{action:n,appId:r}=e;var e=useStyles$h()["classes"],t=classNames(e.tableCell,e.firstColumn),i=classNames(e.tableCell,e.secondColumn),o=classNames(e.tableCell,e.thirdColumn);return jsxRuntime.exports.jsx(TableContainer$1,{children:jsxRuntime.exports.jsxs(Table$1,Object.assign({"aria-label":"notification-table"},{children:[jsxRuntime.exports.jsx(TableHead$1,{children:jsxRuntime.exports.jsxs(TableRow$1,{children:[jsxRuntime.exports.jsx(TableCell$1,Object.assign({className:e.tableCell},{children:jsxRuntime.exports.jsx(Typography$1,{variant:"h3",children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.KVIpaj",defaultMessage:"Events",description:"allow-notification"})})})),jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:t},{children:jsxRuntime.exports.jsx("img",{src:img$1p,alt:"img-icon"})})),jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:i},{children:jsxRuntime.exports.jsx("img",{src:img$1o,alt:"img-icon"})})),jsxRuntime.exports.jsx(TableCell$1,Object.assign({align:"center",className:o},{children:jsxRuntime.exports.jsx("img",{src:img$1n,alt:"img-icon"})}))]})}),jsxRuntime.exports.jsx(TableBody$1,{children:null==(e=null===n||void 0===n?void 0:n.allIds)?void 0:e.map(e=>{var t;return jsxRuntime.exports.jsx(NotificationAllowRow,{allowNotificationTitle:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.title,checked:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.allow,allowType:null==(t=null===n||void 0===n?void 0:n.byId[e])?void 0:t.allowType,appId:r,id:e},e)})})]}))})}function NotificationApplication(e){const o=e["dataId"];var e=useStyles$1$3()["classes"];const t=useDispatch();var n=useSelector(notificationApplicationsSelector);const[r,a]=react.exports.useState(n),i=useSelector(notificationSelector).settings;var s=useSelector(notificationApplicationSelector(o));react.exports.useEffect(()=>{t(updateApplicationSetting(r))},[r]);var l=[INotificationType.EMAIL,INotificationType.NOTIFICATION_CENTER,INotificationType.BANNER];const c=[];l.forEach(t=>{-1===(null===i||void 0===i?void 0:i.allowType.findIndex(e=>e===t))&&c.push(t)});return jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:e.appNoti},{children:[jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(NotificationType,{notificationTypeTitle:"Allow Notifications",allowNotification:null==n?void 0:n.byId[o].allow,allowTypes:null==(l=null==n?void 0:n.byId[o])?void 0:l.allowType,disabledTypes:c,children:jsxRuntime.exports.jsx(NotificationSettingItem,{imgSrc:(null==(e=null==n?void 0:n.byId[o])?void 0:e.iconUrl)||"",primaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.OR1ivL",defaultMessage:"{text}",description:"notification-app-id",values:{text:null==s?void 0:s.name}}),secondaryText:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-notification-panel.QgzNQa",defaultMessage:"{text}",description:"notification application detail text",values:{text:null==s?void 0:s.description}}),bigSize:!0}),description:jsxRuntime.exports.jsx(Typography$1,{variant:"caption",children:"Banner previews are being set at the parent level"}),onChangeNotificationType:function(r,i){a(e=>{var t=[...e.byId[o].allowType],n=t.indexOf(r);return i&&-1===n?t.push(r):t.splice(n,1),Object.assign(Object.assign({},e),{byId:Object.assign(Object.assign({},e.byId),{[o]:Object.assign(Object.assign({},e.byId[o]),{allowType:t})})})})},onChangeAllowType:e=>{t(updateAppAllowNotification(o,e))}})}),jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(NotificationAllowTable,{action:null==(l=null==n?void 0:n.byId[o])?void 0:l.action,appId:o}),jsxRuntime.exports.jsx(Divider$1,{style:{marginBottom:20,marginTop:15}})]}),jsxRuntime.exports.jsx(CustomWorkFlow,{})]}))})}var index_esm$2=Object.freeze({__proto__:null,NotificationApplication:NotificationApplication,NotificationDetailPanel:NotificationDetailPanel,NotificationPanel:NotificationPanel,NotificationSetting:NotificationSetting,NotificationUtilityPanel:NotificationUtilityPanel,initNotificationAction:initNotificationAction,onNotificationActionClicked:onNotificationActionClicked}),REGEX=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function validate(e){return"string"==typeof e&®EX.test(e)}var Search={},_interopRequireDefault$2=interopRequireDefault.exports,default_1$2=(Object.defineProperty(Search,"__esModule",{value:!0}),Search.default=void 0),_createSvgIcon$2=_interopRequireDefault$2(createSvgIcon),_jsxRuntime$2=jsxRuntime.exports,_default$2=(0,_createSvgIcon$2.default)((0,_jsxRuntime$2.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");function formatProdErrorMessage(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var default_1$2=Search.default=_default$2,$$observable="function"==typeof Symbol&&Symbol.observable||"@@observable",randomString=function(){return Math.random().toString(36).substring(7).split("").join(".")},ActionTypes={INIT:"@@redux/INIT"+randomString(),REPLACE:"@@redux/REPLACE"+randomString(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+randomString()}};function isPlainObject(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function createStore$1(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(formatProdErrorMessage(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(formatProdErrorMessage(1));return n(createStore$1)(e,t)}if("function"!=typeof e)throw new Error(formatProdErrorMessage(2));var i=e,o=t,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function u(){if(l)throw new Error(formatProdErrorMessage(3));return o}function d(t){if("function"!=typeof t)throw new Error(formatProdErrorMessage(4));if(l)throw new Error(formatProdErrorMessage(5));var n=!0;return c(),s.push(t),function(){if(n){if(l)throw new Error(formatProdErrorMessage(6));n=!1,c();var e=s.indexOf(t);s.splice(e,1),a=null}}}function p(e){if(!isPlainObject(e))throw new Error(formatProdErrorMessage(7));if(void 0===e.type)throw new Error(formatProdErrorMessage(8));if(l)throw new Error(formatProdErrorMessage(9));try{l=!0,o=i(o,e)}finally{l=!1}for(var t=a=s,n=0;n<t.length;n++)(0,t[n])();return e}return p({type:ActionTypes.INIT}),(r={dispatch:p,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(formatProdErrorMessage(10));i=e,p({type:ActionTypes.REPLACE})}})[$$observable]=function(){var n=d,e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(formatProdErrorMessage(11));function t(){e.next&&e.next(u())}return t(),{unsubscribe:n(t)}}};return e[$$observable]=function(){return this},e},r}function bindActionCreator(e,t){return function(){return t(e.apply(this,arguments))}}function bindActionCreators$1(e,t){if("function"==typeof e)return bindActionCreator(e,t);if("object"!=typeof e||null===e)throw new Error(formatProdErrorMessage(16));var n,r={};for(n in e){var i=e[n];"function"==typeof i&&(r[n]=bindActionCreator(i,t))}return r}function compose(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}function applyMiddleware(){for(var e=arguments.length,o=new Array(e),t=0;t<e;t++)o[t]=arguments[t];return function(i){return function(){var e=i.apply(void 0,arguments),t=function(){throw new Error(formatProdErrorMessage(15))},n={getState:e.getState,dispatch:function(){return t.apply(void 0,arguments)}},r=o.filter(Boolean).map(function(e){return e(n)}),t=compose.apply(void 0,r)(e.dispatch);return _objectSpread2(_objectSpread2({},e),{},{dispatch:t})}}}var ReactReduxContext=React.createContext(null);function defaultNoopBatch(e){e()}var batch=defaultNoopBatch,setBatch=function(e){return batch=e},getBatch=function(){return batch};function createListenerCollection(){var e=getBatch(),r=null,i=null;return{clear:function(){i=r=null},notify:function(){e(function(){for(var e=r;e;)e.callback(),e=e.next})},get:function(){for(var e=[],t=r;t;)e.push(t),t=t.next;return e},subscribe:function(e){var t=!0,n=i={callback:e,next:null,prev:i};return n.prev?n.prev.next=n:r=n,function(){t&&null!==r&&(t=!1,n.next?n.next.prev=n.prev:i=n.prev,n.prev?n.prev.next=n.next:r=n.next)}}}}var nullListeners={notify:function(){},get:function(){return[]}};function createSubscription(e,t){var n,r=nullListeners;function i(){a.onStateChange&&a.onStateChange()}function o(){n||(n=t?t.addNestedSub(i):e.subscribe(i),r=createListenerCollection())}var a={addNestedSub:function(e){return o(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:i,isSubscribed:function(){return Boolean(n)},trySubscribe:o,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=nullListeners)},getListeners:function(){return r}};return a}var useIsomorphicLayoutEffect$1="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?react.exports.useLayoutEffect:react.exports.useEffect;function Provider(e){var t=e.store,n=e.context,e=e.children,r=react.exports.useMemo(function(){var e=createSubscription(t);return{store:t,subscription:e}},[t]),i=react.exports.useMemo(function(){return t.getState()},[t]),n=(useIsomorphicLayoutEffect$1(function(){var e=r.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),i!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}},[r,i]),n||ReactReduxContext);return React.createElement(n.Provider,{value:r},e)}var _excluded$3=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],_excluded2=["reactReduxForwardedRef"],EMPTY_ARRAY=[],NO_SUBSCRIPTION_ARRAY=[null,null];function storeStateUpdatesReducer(e,t){e=e[1];return[t.payload,e+1]}function useIsomorphicLayoutEffectWithArgs(e,t,n){useIsomorphicLayoutEffect$1(function(){return e.apply(void 0,t)},n)}function captureWrapperProps(e,t,n,r,i,o,a){e.current=r,t.current=i,n.current=!1,o.current&&(o.current=null,a())}function subscribeUpdates(e,r,t,i,o,a,s,l,c,u){var d,p;if(e)return d=!1,p=null,t.onStateChange=e=function(){if(!d){var e,t,n=r.getState();try{e=i(n,o.current)}catch(e){p=t=e}t||(p=null),e===a.current?s.current||c():(a.current=e,l.current=e,s.current=!0,u({type:"STORE_UPDATED",payload:{error:t}}))}},t.trySubscribe(),e(),function(){if(d=!0,t.tryUnsubscribe(),t.onStateChange=null,p)throw p}}var initStateUpdates=function(){return[null,0]};function connectAdvanced(w,e){var e=e=void 0===e?{}:e,t=e.getDisplayName,i=void 0===t?function(e){return"ConnectAdvanced("+e+")"}:t,t=e.methodName,o=void 0===t?"connectAdvanced":t,t=e.renderCountProp,a=void 0===t?void 0:t,t=e.shouldHandleStateChanges,S=void 0===t||t,t=e.storeKey,s=void 0===t?"store":t,t=(e.withRef,e.forwardRef),l=void 0!==t&&t,t=e.context,t=void 0===t?ReactReduxContext:t,c=_objectWithoutPropertiesLoose$2(e,_excluded$3),E=t;return function(b){var e=b.displayName||b.name||"Component",t=i(e),C=_extends({},c,{getDisplayName:i,methodName:o,renderCountProp:a,shouldHandleStateChanges:S,storeKey:s,displayName:t,wrappedComponentName:e,WrappedComponent:b}),e=c.pure;var $=e?react.exports.useMemo:function(e){return e()};function n(n){var e=react.exports.useMemo(function(){var e=n.reactReduxForwardedRef,t=_objectWithoutPropertiesLoose$2(n,_excluded2);return[n.context,e,t]},[n]),t=e[0],r=e[1],i=e[2],o=react.exports.useMemo(function(){return t&&t.Consumer&&reactIs.exports.isContextConsumer(React.createElement(t.Consumer,null))?t:E},[t,E]),a=react.exports.useContext(o),s=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch),l=(Boolean(a)&&Boolean(a.store),(s?n:a).store),c=react.exports.useMemo(function(){return w(l.dispatch,C)},[l]),e=react.exports.useMemo(function(){var e,t;return S?(t=(e=createSubscription(l,s?null:a.subscription)).notifyNestedSubs.bind(e),[e,t]):NO_SUBSCRIPTION_ARRAY},[l,s,a]),u=e[0],e=e[1],d=react.exports.useMemo(function(){return s?a:_extends({},a,{subscription:u})},[s,a,u]),p=react.exports.useReducer(storeStateUpdatesReducer,EMPTY_ARRAY,initStateUpdates),f=p[0][0],p=p[1];if(f&&f.error)throw f.error;var h=react.exports.useRef(),m=react.exports.useRef(i),g=react.exports.useRef(),v=react.exports.useRef(!1),y=$(function(){return g.current&&i===m.current?g.current:c(l.getState(),i)},[l,f,i]),x=(useIsomorphicLayoutEffectWithArgs(captureWrapperProps,[m,h,v,i,y,g,e]),useIsomorphicLayoutEffectWithArgs(subscribeUpdates,[S,l,u,c,m,h,v,g,e,p],[l,u,c]),react.exports.useMemo(function(){return React.createElement(b,_extends({},y,{ref:r}))},[r,b,y]));return react.exports.useMemo(function(){return S?React.createElement(o.Provider,{value:d},x):x},[o,x,d])}var r=e?React.memo(n):n;return r.WrappedComponent=b,r.displayName=n.displayName=t,l?((e=React.forwardRef(function(e,t){return React.createElement(r,_extends({},e,{reactReduxForwardedRef:t}))})).displayName=t,e.WrappedComponent=b,hoistNonReactStatics_cjs(e,b)):hoistNonReactStatics_cjs(r,b)}}function is(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function shallowEqual(e,t){if(!is(e,t)){if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!is(e[n[i]],t[n[i]]))return!1}return!0}function bindActionCreators(n,r){var e,i={};for(e in n)!function(e){var t=n[e];"function"==typeof t&&(i[e]=function(){return r(t.apply(void 0,arguments))})}(e);return i}function wrapMapToPropsConstant(i){return function(e,t){var n=i(e,t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function getDependsOnOwnProps(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function wrapMapToPropsFunc(i,e){return function(e,t){t.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(e,t){r.mapToProps=i,r.dependsOnOwnProps=getDependsOnOwnProps(i);var n=r(e,t);return"function"==typeof n&&(r.mapToProps=n,r.dependsOnOwnProps=getDependsOnOwnProps(n),n=r(e,t)),n},r}}function whenMapDispatchToPropsIsFunction(e){return"function"==typeof e?wrapMapToPropsFunc(e):void 0}function whenMapDispatchToPropsIsMissing(e){return e?void 0:wrapMapToPropsConstant(function(e){return{dispatch:e}})}function whenMapDispatchToPropsIsObject(t){return t&&"object"==typeof t?wrapMapToPropsConstant(function(e){return bindActionCreators(t,e)}):void 0}var defaultMapDispatchToPropsFactories=[whenMapDispatchToPropsIsFunction,whenMapDispatchToPropsIsMissing,whenMapDispatchToPropsIsObject];function whenMapStateToPropsIsFunction(e){return"function"==typeof e?wrapMapToPropsFunc(e):void 0}function whenMapStateToPropsIsMissing(e){return e?void 0:wrapMapToPropsConstant(function(){return{}})}var defaultMapStateToPropsFactories=[whenMapStateToPropsIsFunction,whenMapStateToPropsIsMissing];function defaultMergeProps(e,t,n){return _extends({},n,e,t)}function wrapMergePropsFunc(s){return function(e,t){t.displayName;var r,i=t.pure,o=t.areMergedPropsEqual,a=!1;return function(e,t,n){e=s(e,t,n);return a?i&&o(e,r)||(r=e):(a=!0,r=e),r}}}function whenMergePropsIsFunction(e){return"function"==typeof e?wrapMergePropsFunc(e):void 0}function whenMergePropsIsOmitted(e){return e?void 0:function(){return defaultMergeProps}}var defaultMergePropsFactories=[whenMergePropsIsFunction,whenMergePropsIsOmitted],_excluded$2=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function impureFinalPropsSelectorFactory(n,r,i,o){return function(e,t){return i(n(e,t),r(o,t),t)}}function pureFinalPropsSelectorFactory(i,o,a,s,e){var l,c,u,d,p,f=e.areStatesEqual,h=e.areOwnPropsEqual,m=e.areStatePropsEqual,n=!1;function r(e,t){var n=!h(t,c),r=!f(e,l,t,c);return l=e,c=t,n&&r?(u=i(l,c),o.dependsOnOwnProps&&(d=o(s,c)),p=a(u,d,c)):n?(i.dependsOnOwnProps&&(u=i(l,c)),o.dependsOnOwnProps&&(d=o(s,c)),p=a(u,d,c)):r?(e=i(l,c),t=!m(e,u),u=e,p=t?a(u,d,c):p):p}return function(e,t){return n?r(e,t):(u=i(l=e,c=t),d=o(s,c),p=a(u,d,c),n=!0,p)}}function finalPropsSelectorFactory(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,i=t.initMergeProps,t=_objectWithoutPropertiesLoose$2(t,_excluded$2),n=n(e,t),r=r(e,t),i=i(e,t);return(t.pure?pureFinalPropsSelectorFactory:impureFinalPropsSelectorFactory)(n,r,i,e,t)}var _excluded$1=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function match$2(n,e,r){for(var t=e.length-1;0<=t;t--){var i=e[t](n);if(i)return i}return function(e,t){throw new Error("Invalid value of type "+typeof n+" for "+r+" argument when connecting component "+t.wrappedComponentName+".")}}function strictEqual(e,t){return e===t}function createConnect(e){var e=void 0===e?{}:e,t=e.connectHOC,u=void 0===t?connectAdvanced:t,t=e.mapStateToPropsFactories,d=void 0===t?defaultMapStateToPropsFactories:t,t=e.mapDispatchToPropsFactories,p=void 0===t?defaultMapDispatchToPropsFactories:t,t=e.mergePropsFactories,f=void 0===t?defaultMergePropsFactories:t,t=e.selectorFactory,h=void 0===t?finalPropsSelectorFactory:t;return function(e,t,n,r){var r=r=void 0===r?{}:r,i=r.pure,i=void 0===i||i,o=r.areStatesEqual,o=void 0===o?strictEqual:o,a=r.areOwnPropsEqual,a=void 0===a?shallowEqual:a,s=r.areStatePropsEqual,s=void 0===s?shallowEqual:s,l=r.areMergedPropsEqual,l=void 0===l?shallowEqual:l,r=_objectWithoutPropertiesLoose$2(r,_excluded$1),c=match$2(e,d,"mapStateToProps"),t=match$2(t,p,"mapDispatchToProps"),n=match$2(n,f,"mergeProps");return u(h,_extends({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:c,initMapDispatchToProps:t,initMergeProps:n,pure:i,areStatesEqual:o,areOwnPropsEqual:a,areStatePropsEqual:s,areMergedPropsEqual:l},r))}}var connect=createConnect();function areInputsEqual$1(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function useMemoOne(e,t){var n=react.exports.useState(function(){return{inputs:t,result:e()}})[0],r=react.exports.useRef(!0),i=react.exports.useRef(n),o=r.current||Boolean(t&&i.current.inputs&&areInputsEqual$1(t,i.current.inputs))?i.current:{inputs:t,result:e()};return react.exports.useEffect(function(){r.current=!1,i.current=o},[o]),o.result}function useCallbackOne(e,t){return useMemoOne(function(){return e},t)}setBatch(reactDom.exports.unstable_batchedUpdates);var useMemo=useMemoOne,useCallback=useCallbackOne,isProduction=!0,prefix$2="Invariant failed";function invariant$1(e,t){if(!e){if(isProduction)throw new Error(prefix$2);e="function"==typeof t?t():t,t=e?"".concat(prefix$2,": ").concat(e):prefix$2;throw new Error(t)}}var getRect=function(e){var t=e.top,n=e.right,r=e.bottom,e=e.left;return{top:t,right:n,bottom:r,left:e,width:n-e,height:r-t,x:e,y:t,center:{x:(n+e)/2,y:(r+t)/2}}},expand=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},shrink=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},shift=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},noSpacing$1={top:0,right:0,bottom:0,left:0},createBox=function(e){var t=e.borderBox,n=e.margin,n=void 0===n?noSpacing$1:n,r=e.border,r=void 0===r?noSpacing$1:r,e=e.padding,e=void 0===e?noSpacing$1:e,i=getRect(expand(t,n)),o=getRect(shrink(t,r)),a=getRect(shrink(o,e));return{marginBox:i,borderBox:getRect(t),paddingBox:o,contentBox:a,margin:n,border:r,padding:e}},parse$1=function(e){var t=e.slice(0,-2);return"px"!==e.slice(-2)?0:(e=Number(t),isNaN(e)&&invariant$1(!1),e)},getWindowScroll$1=function(){return{x:window.pageXOffset,y:window.pageYOffset}},offset$1=function(e,t){var n=e.borderBox,r=e.border,i=e.margin,e=e.padding,n=shift(n,t);return createBox({borderBox:n,border:r,margin:i,padding:e})},withScroll=function(e,t){return void 0===t&&(t=getWindowScroll$1()),offset$1(e,t)},calculateBox=function(e,t){var n={top:parse$1(t.marginTop),right:parse$1(t.marginRight),bottom:parse$1(t.marginBottom),left:parse$1(t.marginLeft)},r={top:parse$1(t.paddingTop),right:parse$1(t.paddingRight),bottom:parse$1(t.paddingBottom),left:parse$1(t.paddingLeft)},t={top:parse$1(t.borderTopWidth),right:parse$1(t.borderRightWidth),bottom:parse$1(t.borderBottomWidth),left:parse$1(t.borderLeftWidth)};return createBox({borderBox:e,margin:n,padding:r,border:t})},getBox=function(e){var t=e.getBoundingClientRect(),e=window.getComputedStyle(e);return calculateBox(t,e)},safeIsNaN=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function isEqual$2(e,t){return e===t||!(!safeIsNaN(e)||!safeIsNaN(t))}function areInputsEqual(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!isEqual$2(e[n],t[n]))return!1;return!0}function memoizeOne(n,r){void 0===r&&(r=areInputsEqual);var i,o,a=[],s=!1;return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s&&i===this&&r(e,a)||(o=n.apply(this,e),s=!0,i=this,a=e),o}}var rafSchd=function(r){function e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];i=t,o=o||requestAnimationFrame(function(){o=null,r.apply(void 0,i)})}var i,o=null;return e.cancel=function(){o&&(cancelAnimationFrame(o),o=null)},e},rafSchd$1=rafSchd;function log(e,t){}function noop(){}function getOptions(e,t){return _extends({},e,{},t)}function bindEvents(n,e,r){var t=e.map(function(e){var t=getOptions(r,e.options);return n.addEventListener(e.eventName,e.fn,t),function(){n.removeEventListener(e.eventName,e.fn,t)}});return function(){t.forEach(function(e){e()})}}log.bind(null,"warn"),log.bind(null,"error");var prefix="Invariant failed";function RbdInvariant(e){this.message=e}function invariant(e,t){if(!e)throw new RbdInvariant(prefix)}RbdInvariant.prototype.toString=function(){return this.message};var ErrorBoundary=function(i){function e(){for(var n,e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(n=i.call.apply(i,[this].concat(t))||this).callbacks=null,n.unbind=noop,n.onWindowError=function(e){var t=n.getCallbacks();t.isDragging()&&t.tryAbort(),e.error instanceof RbdInvariant&&e.preventDefault()},n.getCallbacks=function(){if(n.callbacks)return n.callbacks;throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>")},n.setCallbacks=function(e){n.callbacks=e},n}_inheritsLoose$2(e,i);var t=e.prototype;return t.componentDidMount=function(){this.unbind=bindEvents(window,[{eventName:"error",fn:this.onWindowError}])},t.componentDidCatch=function(e){if(!(e instanceof RbdInvariant))throw e;this.setState({})},t.componentWillUnmount=function(){this.unbind()},t.render=function(){return this.props.children(this.setCallbacks)},e}(React.Component),dragHandleUsageInstructions="\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",position=function(e){return e+1},onDragStart=function(e){return"\n You have lifted an item in position "+position(e.source.index)+"\n"},withLocation=function(e,t){var n=e.droppableId===t.droppableId,r=position(e.index),i=position(t.index);return n?"\n You have moved the item from position "+r+"\n to position "+i+"\n ":"\n You have moved the item from position "+r+"\n in list "+e.droppableId+"\n to list "+t.droppableId+"\n in position "+i+"\n "},withCombine=function(e,t,n){return t.droppableId===n.droppableId?"\n The item "+e+"\n has been combined with "+n.draggableId:"\n The item "+e+"\n in list "+t.droppableId+"\n has been combined with "+n.draggableId+"\n in list "+n.droppableId+"\n "},onDragUpdate=function(e){var t=e.destination;return t?withLocation(e.source,t):(t=e.combine)?withCombine(e.draggableId,e.source,t):"You are over an area that cannot be dropped on"},returnedToStart=function(e){return"\n The item has returned to its starting position\n of "+position(e.index)+"\n"},onDragEnd=function(e){var t,n;return"CANCEL"===e.reason?"\n Movement cancelled.\n "+returnedToStart(e.source)+"\n ":(t=e.destination,n=e.combine,t?"\n You have dropped the item.\n "+withLocation(e.source,t)+"\n ":n?"\n You have dropped the item.\n "+withCombine(e.draggableId,e.source,n)+"\n ":"\n The item has been dropped while not over a drop area.\n "+returnedToStart(e.source)+"\n ")},preset={dragHandleUsageInstructions:dragHandleUsageInstructions,onDragStart:onDragStart,onDragUpdate:onDragUpdate,onDragEnd:onDragEnd},origin={x:0,y:0},add=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},subtract=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},isEqual=function(e,t){return e.x===t.x&&e.y===t.y},negate=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},patch=function(e,t,n){var r;return void 0===n&&(n=0),(r={})[e]=t,r["x"===e?"y":"x"]=n,r},distance=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},closest=function(t,e){return Math.min.apply(Math,e.map(function(e){return distance(t,e)}))},apply=function(t){return function(e){return{x:t(e.x),y:t(e.y)}}},executeClip=function(e,t){t=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 t.width<=0||t.height<=0?null:t},offsetByPosition=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},getCorners=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}]},noSpacing={top:0,right:0,bottom:0,left:0},scroll=function(e,t){return t?offsetByPosition(e,t.scroll.diff.displacement):e},increase=function(e,t,n){var r;return n&&n.increasedBy?_extends({},e,((r={})[t.end]=e[t.end]+n.increasedBy[t.line],r)):e},clip=function(e,t){return t&&t.shouldClipSubject?executeClip(t.pageMarginBox,e):getRect(e)},getSubject=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,e=e.frame,i=scroll(t.marginBox,e),i=increase(i,r,n);return{page:t,withPlaceholder:n,active:clip(i,e)}},scrollDroppable=function(e,t){e.frame||invariant(!1);var n=e.frame,r=subtract(t,n.scroll.initial),i=negate(r),t=_extends({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}});return _extends({},e,{frame:t,subject:getSubject({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:t})})};function values$1(t){return Object.values?Object.values(t):Object.keys(t).map(function(e){return t[e]})}function findIndex(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function find(e,t){return e.find?e.find(t):-1!==(t=findIndex(e,t))?e[t]:void 0}function toArray(e){return Array.prototype.slice.call(e)}var toDroppableMap=memoizeOne(function(e){return e.reduce(function(e,t){return e[t.descriptor.id]=t,e},{})}),toDraggableMap=memoizeOne(function(e){return e.reduce(function(e,t){return e[t.descriptor.id]=t,e},{})}),toDroppableList=memoizeOne(function(e){return values$1(e)}),toDraggableList=memoizeOne(function(e){return values$1(e)}),getDraggablesInsideDroppable=memoizeOne(function(t,e){return toDraggableList(e).filter(function(e){return t===e.descriptor.droppableId}).sort(function(e,t){return e.descriptor.index-t.descriptor.index})});function tryGetDestination(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function tryGetCombine(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var removeDraggableFromList=memoizeOne(function(t,e){return e.filter(function(e){return e.descriptor.id!==t.descriptor.id})}),moveToNextCombine=function(e){var t,n=e.isMovingForward,r=e.draggable,i=e.destination,o=e.insideDestination,a=e.previousImpact;return i.isCombineEnabled&&tryGetDestination(a)?(e=a.displaced.all,t=e.length?e[0]:null,n?t?s(t):null:(e=removeDraggableFromList(r,o),t?(-1===(n=findIndex(e,function(e){return e.descriptor.id===t}))&&invariant(!1),(r=n-1)<0?null:s(e[r].descriptor.id)):e.length?s(e[e.length-1].descriptor.id):null)):null;function s(e){e={type:"COMBINE",combine:{draggableId:e,droppableId:i.descriptor.id}};return _extends({},a,{at:e})}},isHomeOf=function(e,t){return e.descriptor.droppableId===t.descriptor.id},noDisplacedBy={point:origin,value:0},emptyGroups={invisible:{},visible:{},all:[]},noImpact={displaced:emptyGroups,displacedBy:noDisplacedBy,at:null},isWithin=function(t,n){return function(e){return t<=e&&e<=n}},isPartiallyVisibleThroughFrame=function(i){var o=isWithin(i.top,i.bottom),a=isWithin(i.left,i.right);return function(e){var t,n,r;return!!(o(e.top)&&o(e.bottom)&&a(e.left)&&a(e.right))||(t=o(e.top)||o(e.bottom),n=a(e.left)||a(e.right),!(!t||!n))||(r=e.top<i.top&&e.bottom>i.bottom,e=e.left<i.left&&e.right>i.right,r&&e)||r&&n||e&&t}},isTotallyVisibleThroughFrame=function(e){var t=isWithin(e.top,e.bottom),n=isWithin(e.left,e.right);return function(e){return t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)}},vertical={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},horizontal={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},isTotallyVisibleThroughFrameOnAxis=function(r){return function(e){var t=isWithin(e.top,e.bottom),n=isWithin(e.left,e.right);return function(e){return r===vertical?t(e.top)&&t(e.bottom):n(e.left)&&n(e.right)}}},getDroppableDisplaced=function(e,t){t=t.frame?t.frame.scroll.diff.displacement:origin;return offsetByPosition(e,t)},isVisibleInDroppable=function(e,t,n){return!!t.subject.active&&n(t.subject.active)(e)},isVisibleInViewport=function(e,t,n){return n(t)(e)},isVisible=function(e){var t=e.target,n=e.destination,r=e.viewport,i=e.withDroppableDisplacement,e=e.isVisibleThroughFrameFn,i=i?getDroppableDisplaced(t,n):t;return isVisibleInDroppable(i,n,e)&&isVisibleInViewport(i,r,e)},isPartiallyVisible=function(e){return isVisible(_extends({},e,{isVisibleThroughFrameFn:isPartiallyVisibleThroughFrame}))},isTotallyVisible=function(e){return isVisible(_extends({},e,{isVisibleThroughFrameFn:isTotallyVisibleThroughFrame}))},isTotallyVisibleOnAxis=function(e){return isVisible(_extends({},e,{isVisibleThroughFrameFn:isTotallyVisibleThroughFrameOnAxis(e.destination.axis)}))},getShouldAnimate=function(e,t,n){return"boolean"==typeof n?n:!t||(n=t.invisible,t=t.visible,!n[e]&&(!(n=t[e])||n.shouldAnimate))};function getTarget(e,t){e=e.page.marginBox,t={top:t.point.y,right:0,bottom:0,left:t.point.x};return getRect(expand(e,t))}function getDisplacementGroups(e){var t=e.afterDragging,i=e.destination,o=e.displacedBy,a=e.viewport,s=e.forceShouldAnimate,l=e.last;return t.reduce(function(e,t){var n=getTarget(t,o),r=t.descriptor.id;return e.all.push(r),isPartiallyVisible({target:n,destination:i,viewport:a,withDroppableDisplacement:!0})?(n=getShouldAnimate(r,l,s),e.visible[r]={draggableId:r,shouldAnimate:n}):e.invisible[t.descriptor.id]=!0,e},{all:[],visible:{},invisible:{}})}function getIndexOfLastItem(e,t){return e.length?(e=e[e.length-1].descriptor.index,t.inHomeList?e:e+1):0}function goAtEnd(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,e=e.destination,t=getIndexOfLastItem(t,{inHomeList:n});return{displaced:emptyGroups,displacedBy:r,at:{type:"REORDER",destination:{droppableId:e.descriptor.id,index:t}}}}function calculateReorderImpact(e){var t,n=e.draggable,r=e.insideDestination,i=e.destination,o=e.viewport,a=e.displacedBy,s=e.last,l=e.index,e=e.forceShouldAnimate,c=isHomeOf(n,i);return null!=l&&(t=find(r,function(e){return e.descriptor.index===l}))?(n=removeDraggableFromList(n,r),t=r.indexOf(t),{displaced:getDisplacementGroups({afterDragging:n.slice(t),destination:i,displacedBy:a,last:s,viewport:o.frame,forceShouldAnimate:e}),displacedBy:a,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:l}}}):goAtEnd({insideDestination:r,inHomeList:c,displacedBy:a,destination:i})}function didStartAfterCritical(e,t){return Boolean(t.effected[e])}var fromCombine=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,i=e.combine,e=e.afterCritical;return n.isCombineEnabled?(r=r[n=i.draggableId].descriptor.index,didStartAfterCritical(n,e)?t?r:r-1:t?r+1:r):null},fromReorder=function(e){var t,n=e.isMovingForward,r=e.isInHomeList,i=e.insideDestination,e=e.location;return!i.length||(e=e.index,t=i[0].descriptor.index,i=i[i.length-1].descriptor.index,(n=n?e+1:e-1)<t)||(r?i:i+1)<n?null:n},moveToNextIndex=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,o=e.destination,a=e.insideDestination,s=e.previousImpact,l=e.viewport,e=e.afterCritical,c=s.at;return c||invariant(!1),"REORDER"===c.type?null==(n=fromReorder({isMovingForward:t,isInHomeList:n,location:c.destination,insideDestination:a}))?null:calculateReorderImpact({draggable:r,insideDestination:a,destination:o,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:n}):null==(n=fromCombine({isMovingForward:t,destination:o,displaced:s.displaced,draggables:i,combine:c.combine,afterCritical:e}))?null:calculateReorderImpact({draggable:r,insideDestination:a,destination:o,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:n})},getCombinedItemDisplacement=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,e=e.displacedBy,t=Boolean(t.visible[r]||t.invisible[r]);return didStartAfterCritical(r,n)?t?origin:negate(e.point):t?e.point:origin},whenCombining=function(e){var t=e.afterCritical,n=e.impact,e=e.draggables,r=tryGetCombine(n),r=(r||invariant(!1),r.draggableId),e=e[r].page.borderBox.center,t=getCombinedItemDisplacement({displaced:n.displaced,afterCritical:t,combineWith:r,displacedBy:n.displacedBy});return add(e,t)},distanceFromStartToBorderBoxCenter=function(e,t){return t.margin[e.start]+t.borderBox[e.size]/2},distanceFromEndToBorderBoxCenter=function(e,t){return t.margin[e.end]+t.borderBox[e.size]/2},getCrossAxisBorderBoxCenter=function(e,t,n){return t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2},goAfter=function(e){var t=e.axis,n=e.moveRelativeTo,e=e.isMoving;return patch(t.line,n.marginBox[t.end]+distanceFromStartToBorderBoxCenter(t,e),getCrossAxisBorderBoxCenter(t,n.marginBox,e))},goBefore=function(e){var t=e.axis,n=e.moveRelativeTo,e=e.isMoving;return patch(t.line,n.marginBox[t.start]-distanceFromEndToBorderBoxCenter(t,e),getCrossAxisBorderBoxCenter(t,n.marginBox,e))},goIntoStart=function(e){var t=e.axis,n=e.moveInto,e=e.isMoving;return patch(t.line,n.contentBox[t.start]+distanceFromStartToBorderBoxCenter(t,e),getCrossAxisBorderBoxCenter(t,n.contentBox,e))},whenReordering=function(e){var t,n=e.impact,r=e.draggable,i=e.draggables,o=e.droppable,e=e.afterCritical,a=getDraggablesInsideDroppable(o.descriptor.id,i),s=r.page,l=o.axis;return a.length?(t=n.displaced,n=n.displacedBy,(t=t.all[0])?(i=i[t],didStartAfterCritical(t,e)?goBefore({axis:l,moveRelativeTo:i.page,isMoving:s}):(t=offset$1(i.page,n.point),goBefore({axis:l,moveRelativeTo:t,isMoving:s}))):(i=a[a.length-1]).descriptor.id===r.descriptor.id?s.borderBox.center:didStartAfterCritical(i.descriptor.id,e)?(n=offset$1(i.page,negate(e.displacedBy.point)),goAfter({axis:l,moveRelativeTo:n,isMoving:s})):goAfter({axis:l,moveRelativeTo:i.page,isMoving:s})):goIntoStart({axis:l,moveInto:o.page,isMoving:s})},withDroppableDisplacement=function(e,t){e=e.frame;return e?add(t,e.scroll.diff.displacement):t},getResultWithoutDroppableDisplacement=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,e=e.afterCritical,o=n.page.borderBox.center,a=t.at;return r&&a?"REORDER"===a.type?whenReordering({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:e}):whenCombining({impact:t,draggables:i,afterCritical:e}):o},getPageBorderBoxCenterFromImpact=function(e){var t=getResultWithoutDroppableDisplacement(e),e=e.droppable;return e?withDroppableDisplacement(e,t):t},scrollViewport=function(e,t){var n=subtract(t,e.scroll.initial),r=negate(n);return{frame: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:n,displacement:r}}}};function getDraggables(e,t){return e.map(function(e){return t[e]})}function tryGetVisible(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}var speculativelyIncrease=function(e){var t=e.impact,n=e.viewport,r=e.destination,i=e.draggables,e=e.maxScrollChange,o=scrollViewport(n,add(n.scroll.current,e)),e=r.frame?scrollDroppable(r,add(r.frame.scroll.current,e)):r,a=t.displaced,r=getDisplacementGroups({afterDragging:getDraggables(a.all,i),destination:r,displacedBy:t.displacedBy,viewport:o.frame,last:a,forceShouldAnimate:!1}),o=getDisplacementGroups({afterDragging:getDraggables(a.all,i),destination:e,displacedBy:t.displacedBy,viewport:n.frame,last:a,forceShouldAnimate:!1}),s={},l={},c=[a,r,o];return a.all.forEach(function(e){var t=tryGetVisible(e,c);t?l[e]=t:s[e]=!0}),_extends({},t,{displaced:{all:a.all,invisible:s,visible:l}})},withViewportDisplacement=function(e,t){return add(e.scroll.diff.displacement,t)},getClientFromPageBorderBoxCenter=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,e=e.viewport,e=withViewportDisplacement(e,t),t=subtract(e,n.page.borderBox.center);return add(n.client.borderBox.center,t)},isTotallyVisibleInNewLocation=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,i=e.viewport,o=e.withDroppableDisplacement,e=e.onlyOnMainAxis,e=void 0!==e&&e,r=subtract(r,t.page.borderBox.center),t={target:offsetByPosition(t.page.borderBox,r),destination:n,withDroppableDisplacement:o,viewport:i};return(e?isTotallyVisibleOnAxis:isTotallyVisible)(t)},moveToNextPlace=function(e){var t,n,r=e.isMovingForward,i=e.draggable,o=e.destination,a=e.draggables,s=e.previousImpact,l=e.viewport,c=e.previousPageBorderBoxCenter,u=e.previousClientSelection,e=e.afterCritical;return o.isEnabled&&(n=getDraggablesInsideDroppable(o.descriptor.id,a),t=isHomeOf(i,o),r=moveToNextCombine({isMovingForward:r,draggable:i,destination:o,insideDestination:n,previousImpact:s})||moveToNextIndex({isMovingForward:r,isInHomeList:t,draggable:i,draggables:a,destination:o,insideDestination:n,previousImpact:s,viewport:l,afterCritical:e}))?(t=getPageBorderBoxCenterFromImpact({impact:r,draggable:i,droppable:o,draggables:a,afterCritical:e}),isTotallyVisibleInNewLocation({draggable:i,destination:o,newPageBorderBoxCenter:t,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?{clientSelection:getClientFromPageBorderBoxCenter({pageBorderBoxCenter:t,draggable:i,viewport:l}),impact:r,scrollJumpRequest:null}:(n=subtract(t,c),{clientSelection:u,impact:speculativelyIncrease({impact:r,viewport:l,destination:o,draggables:a,maxScrollChange:n}),scrollJumpRequest:n})):null},getKnownActive=function(e){e=e.subject.active;return e||invariant(!1),e},getBestCrossAxisDroppable=function(e){var i,n,r=e.isMovingForward,o=e.pageBorderBoxCenter,t=e.source,a=e.droppables,s=e.viewport,l=t.subject.active;return l&&(i=t.axis,n=isWithin(l[i.start],l[i.end]),(e=toDroppableList(a).filter(function(e){return e!==t}).filter(function(e){return e.isEnabled}).filter(function(e){return Boolean(e.subject.active)}).filter(function(e){return isPartiallyVisibleThroughFrame(s.frame)(getKnownActive(e))}).filter(function(e){e=getKnownActive(e);return r?l[i.crossAxisEnd]<e[i.crossAxisEnd]:e[i.crossAxisStart]<l[i.crossAxisStart]}).filter(function(e){var e=getKnownActive(e),t=isWithin(e[i.start],e[i.end]);return n(e[i.start])||n(e[i.end])||t(l[i.start])||t(l[i.end])}).sort(function(e,t){e=getKnownActive(e)[i.crossAxisStart],t=getKnownActive(t)[i.crossAxisStart];return r?e-t:t-e}).filter(function(e,t,n){return getKnownActive(e)[i.crossAxisStart]===getKnownActive(n[0])[i.crossAxisStart]})).length)?(1===e.length?e:1===(a=e.filter(function(e){return isWithin(getKnownActive(e)[i.start],getKnownActive(e)[i.end])(o[i.line])})).length?a:1<a.length?a.sort(function(e,t){return getKnownActive(e)[i.start]-getKnownActive(t)[i.start]}):e.sort(function(e,t){var n=closest(o,getCorners(getKnownActive(e))),r=closest(o,getCorners(getKnownActive(t)));return n!==r?n-r:getKnownActive(e)[i.start]-getKnownActive(t)[i.start]}))[0]:null},getCurrentPageBorderBoxCenter=function(e,t){var n=e.page.borderBox.center;return didStartAfterCritical(e.descriptor.id,t)?subtract(n,t.displacedBy.point):n},getCurrentPageBorderBox=function(e,t){var n=e.page.borderBox;return didStartAfterCritical(e.descriptor.id,t)?offsetByPosition(n,negate(t.displacedBy.point)):n},getClosestDraggable=function(e){var i=e.pageBorderBoxCenter,t=e.viewport,o=e.destination,n=e.insideDestination,a=e.afterCritical;return n.filter(function(e){return isTotallyVisible({target:getCurrentPageBorderBox(e,a),destination:o,viewport:t.frame,withDroppableDisplacement:!0})}).sort(function(e,t){var n=distance(i,withDroppableDisplacement(o,getCurrentPageBorderBoxCenter(e,a))),r=distance(i,withDroppableDisplacement(o,getCurrentPageBorderBoxCenter(t,a)));return n<r?-1:r<n?1:e.descriptor.index-t.descriptor.index})[0]||null},getDisplacedBy=memoizeOne(function(e,t){t=t[e.line];return{value:t,point:patch(e.line,t)}}),getRequiredGrowthForPlaceholder=function(e,t,n){var r,i=e.axis;return"virtual"===e.descriptor.mode?patch(i.line,t[i.line]):(r=e.subject.page.contentBox[i.size],(e=getDraggablesInsideDroppable(e.descriptor.id,n).reduce(function(e,t){return e+t.client.marginBox[i.size]},0)+t[i.line]-r)<=0?null:patch(i.line,e))},withMaxScroll=function(e,t){return _extends({},e,{scroll:_extends({},e.scroll,{max:t})})},addPlaceholder=function(e,t,n){var r=e.frame,t=(isHomeOf(t,e)&&invariant(!1),e.subject.withPlaceholder&&invariant(!1),getDisplacedBy(e.axis,t.displaceBy).point),n=getRequiredGrowthForPlaceholder(e,t,n),t={placeholderSize:t,increasedBy:n,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};return r?(n=n?add(r.scroll.max,n):r.scroll.max,r=withMaxScroll(r,n),_extends({},e,{subject:getSubject({page:e.subject.page,withPlaceholder:t,axis:e.axis,frame:r}),frame:r})):_extends({},e,{subject:getSubject({page:e.subject.page,withPlaceholder:t,axis:e.axis,frame:e.frame})})},removePlaceholder=function(e){var t=e.subject.withPlaceholder,n=(t||invariant(!1),e.frame);return n?((t=t.oldFrameMaxScroll)||invariant(!1),n=withMaxScroll(n,t),_extends({},e,{subject:getSubject({page:e.subject.page,axis:e.axis,frame:n,withPlaceholder:null}),frame:n})):_extends({},e,{subject:getSubject({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null})})},moveToNewDroppable=function(e){var t,n=e.previousPageBorderBoxCenter,r=e.moveRelativeTo,i=e.insideDestination,o=e.draggable,a=e.draggables,s=e.destination,l=e.viewport,e=e.afterCritical;return r?(n=Boolean(n[s.axis.line]<=r.page.borderBox.center[s.axis.line]),t=r.descriptor.index,r=r.descriptor.id===o.descriptor.id||n?t:t+1,n=getDisplacedBy(s.axis,o.displaceBy),calculateReorderImpact({draggable:o,insideDestination:i,destination:s,viewport:l,displacedBy:n,last:emptyGroups,index:r})):!i.length&&(t={displaced:emptyGroups,displacedBy:noDisplacedBy,at:{type:"REORDER",destination:{droppableId:s.descriptor.id,index:0}}},n=getPageBorderBoxCenterFromImpact({impact:t,draggable:o,droppable:s,draggables:a,afterCritical:e}),r=isHomeOf(o,s)?s:addPlaceholder(s,o,a),isTotallyVisibleInNewLocation({draggable:o,destination:r,newPageBorderBoxCenter:n,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))?t:null},moveCrossAxis=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,i=e.isOver,o=e.draggables,a=e.droppables,s=e.viewport,e=e.afterCritical,t=getBestCrossAxisDroppable({isMovingForward:t,pageBorderBoxCenter:n,source:i,droppables:a,viewport:s});return t&&(i=getDraggablesInsideDroppable(t.descriptor.id,o),a=getClosestDraggable({pageBorderBoxCenter:n,viewport:s,destination:t,insideDestination:i,afterCritical:e}),n=moveToNewDroppable({previousPageBorderBoxCenter:n,destination:t,draggable:r,draggables:o,moveRelativeTo:a,insideDestination:i,viewport:s,afterCritical:e}))?(a=getPageBorderBoxCenterFromImpact({impact:n,draggable:r,droppable:t,draggables:o,afterCritical:e}),{clientSelection:getClientFromPageBorderBoxCenter({pageBorderBoxCenter:a,draggable:r,viewport:s}),impact:n,scrollJumpRequest:null}):null},whatIsDraggedOver=function(e){e=e.at;return e?("REORDER"===e.type?e.destination:e.combine).droppableId:null},getDroppableOver=function(e,t){e=whatIsDraggedOver(e);return e?t[e]:null},moveInDirection=function(e){var t,n,r,i=e.state,e=e.type,o=getDroppableOver(i.impact,i.dimensions.droppables),a=Boolean(o),s=i.dimensions.droppables[i.critical.droppable.id],o=o||s,s=o.axis.direction,s="vertical"===s&&("MOVE_UP"===e||"MOVE_DOWN"===e)||"horizontal"===s&&("MOVE_LEFT"===e||"MOVE_RIGHT"===e);return s&&!a?null:(a="MOVE_DOWN"===e||"MOVE_RIGHT"===e,e=i.dimensions.draggables[i.critical.draggable.id],t=i.current.page.borderBoxCenter,n=(r=i.dimensions).draggables,r=r.droppables,s?moveToNextPlace({isMovingForward:a,previousPageBorderBoxCenter:t,draggable:e,destination:o,draggables:n,viewport:i.viewport,previousClientSelection:i.current.client.selection,previousImpact:i.impact,afterCritical:i.afterCritical}):moveCrossAxis({isMovingForward:a,previousPageBorderBoxCenter:t,draggable:e,isOver:o,draggables:n,droppables:r,viewport:i.viewport,afterCritical:i.afterCritical}))};function isMovementAllowed(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function isPositionInFrame(e){var t=isWithin(e.top,e.bottom),n=isWithin(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}function getHasOverlap(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function getFurthestAway(e){var n=e.pageBorderBox,t=e.draggable,e=e.candidates,r=t.page.borderBox.center,t=e.map(function(e){var t=e.axis,t=patch(e.axis.line,n.center[t.line],e.page.borderBox.center[t.crossAxisLine]);return{id:e.descriptor.id,distance:distance(r,t)}}).sort(function(e,t){return t.distance-e.distance});return t[0]?t[0].id:null}function getDroppableOver$1(e){var o=e.pageBorderBox,t=e.draggable,e=e.droppables,e=toDroppableList(e).filter(function(e){var t,n,r,i;return!!e.isEnabled&&!!(i=e.subject.active)&&!(!getHasOverlap(o,i)||!isPositionInFrame(i)(o.center)&&(e=e.axis,t=i.center[e.crossAxisLine],n=o[e.crossAxisStart],r=o[e.crossAxisEnd],e=(i=isWithin(i[e.crossAxisStart],i[e.crossAxisEnd]))(n),i=i(r),e||i)&&!(e?n<t:t<r))});return e.length?1===e.length?e[0].descriptor.id:getFurthestAway({pageBorderBox:o,draggable:t,candidates:e}):null}var offsetRectByPosition=function(e,t){return getRect(offsetByPosition(e,t))},withDroppableScroll=function(e,t){e=e.frame;return e?offsetRectByPosition(t,e.scroll.diff.value):t};function getIsDisplaced(e){var t=e.displaced,e=e.id;return Boolean(t.visible[e]||t.invisible[e])}function atIndex(e){var t=e.draggable,n=e.closest,e=e.inHomeList;return n?e&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}var getReorderImpact=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.last,a=e.viewport,s=e.afterCritical,l=r.axis,e=getDisplacedBy(r.axis,n.displaceBy),c=e.value,u=t[l.start],d=t[l.end],t=atIndex({draggable:n,closest:find(removeDraggableFromList(n,i),function(e){var t=e.descriptor.id,e=e.page.borderBox.center[l.line],n=didStartAfterCritical(t,s),t=getIsDisplaced({displaced:o,id:t});return n?t?d<=e:u<e-c:t?d<=e+c:u<e}),inHomeList:isHomeOf(n,r)});return calculateReorderImpact({draggable:n,insideDestination:i,destination:r,viewport:a,last:o,displacedBy:e,index:t})},combineThresholdDivisor=4,getCombineImpact=function(e){var i,o,a,s,t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,l=e.previousImpact,r=e.destination,c=e.insideDestination,u=e.afterCritical;return r.isCombineEnabled&&(i=r.axis,e=getDisplacedBy(r.axis,t.displaceBy),o=e.value,a=n[i.start],s=n[i.end],n=find(removeDraggableFromList(t,c),function(e){var t=e.descriptor.id,e=e.page.borderBox,n=e[i.size]/combineThresholdDivisor,r=didStartAfterCritical(t,u),t=getIsDisplaced({displaced:l.displaced,id:t});return r?t?s>e[i.start]+n&&s<e[i.end]-n:a>e[i.start]-o+n&&a<e[i.end]-o-n:t?s>e[i.start]+o+n&&s<e[i.end]+o-n:a>e[i.start]+n&&a<e[i.end]-n}))?{displacedBy:e,displaced:l.displaced,at:{type:"COMBINE",combine:{draggableId:n.descriptor.id,droppableId:r.descriptor.id}}}:null},getDragImpact=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,i=e.droppables,o=e.previousImpact,a=e.viewport,e=e.afterCritical,t=offsetRectByPosition(n.page.borderBox,t),s=getDroppableOver$1({pageBorderBox:t,draggable:n,droppables:i});return s?(i=i[s],s=getDraggablesInsideDroppable(i.descriptor.id,r),r=withDroppableScroll(i,t),getCombineImpact({pageBorderBoxWithDroppableScroll:r,draggable:n,previousImpact:o,destination:i,insideDestination:s,afterCritical:e})||getReorderImpact({pageBorderBoxWithDroppableScroll:r,draggable:n,destination:i,insideDestination:s,last:o.displaced,viewport:a,afterCritical:e})):noImpact},patchDroppableMap=function(e,t){return _extends({},e,((e={})[t.descriptor.id]=t,e))},clearUnusedPlaceholder=function(e){var t=e.previousImpact,n=e.impact,e=e.droppables,t=whatIsDraggedOver(t),n=whatIsDraggedOver(n);return t&&t!==n&&(n=e[t]).subject.withPlaceholder?(t=removePlaceholder(n),patchDroppableMap(e,t)):e},recomputePlaceholders=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,i=e.previousImpact,e=e.impact,i=clearUnusedPlaceholder({previousImpact:i,impact:e,droppables:r}),e=whatIsDraggedOver(e);return!e||(r=r[e],isHomeOf(t,r))||r.subject.withPlaceholder?i:(e=addPlaceholder(r,t,n),patchDroppableMap(i,e))},update=function(e){var t,n=e.state,r=e.clientSelection,i=e.dimensions,o=e.viewport,a=e.impact,e=e.scrollJumpRequest,o=o||n.viewport,i=i||n.dimensions,r=r||n.current.client.selection,s=subtract(r,n.initial.client.selection),r={offset:s,selection:r,borderBoxCenter:add(n.initial.client.borderBoxCenter,s)},s={selection:add(r.selection,o.scroll.current),borderBoxCenter:add(r.borderBoxCenter,o.scroll.current),offset:add(r.offset,o.scroll.diff.value)},r={client:r,page:s};return"COLLECTING"===n.phase?_extends({phase:"COLLECTING"},n,{dimensions:i,viewport:o,current:r}):(t=i.draggables[n.critical.draggable.id],a=a||getDragImpact({pageOffset:s.offset,draggable:t,draggables:i.draggables,droppables:i.droppables,previousImpact:n.impact,viewport:o,afterCritical:n.afterCritical}),s=recomputePlaceholders({draggable:t,impact:a,previousImpact:n.impact,draggables:i.draggables,droppables:i.droppables}),_extends({},n,{current:r,dimensions:{draggables:i.draggables,droppables:s},impact:a,viewport:o,scrollJumpRequest:e||null,forceShouldAnimate:!e&&null}))};function getDraggables$1(e,t){return e.map(function(e){return t[e]})}var recompute=function(e){var t=e.impact,n=e.viewport,r=e.draggables,i=e.destination,e=e.forceShouldAnimate,o=t.displaced;return _extends({},t,{displaced:getDisplacementGroups({afterDragging:getDraggables$1(o.all,r),destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:e,last:o})})},getClientBorderBoxCenter=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.viewport,e=e.afterCritical,t=getPageBorderBoxCenterFromImpact({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:e});return getClientFromPageBorderBoxCenter({pageBorderBoxCenter:t,draggable:n,viewport:o})},refreshSnap=function(e){var t=e.state,n=e.dimensions,e=e.viewport,r=("SNAP"!==t.movementMode&&invariant(!1),t.impact),e=e||t.viewport,n=n||t.dimensions,i=n.draggables,o=n.droppables,a=i[t.critical.draggable.id],s=whatIsDraggedOver(r),o=(s||invariant(!1),o[s]),s=recompute({impact:r,viewport:e,destination:o,draggables:i}),r=getClientBorderBoxCenter({impact:s,draggable:a,droppable:o,draggables:i,viewport:e,afterCritical:t.afterCritical});return update({impact:s,clientSelection:r,state:t,dimensions:n,viewport:e})},getHomeLocation=function(e){return{index:e.index,droppableId:e.droppableId}},getLiftEffect=function(e){var t=e.draggable,n=e.home,r=e.draggables,e=e.viewport,i=getDisplacedBy(n.axis,t.displaceBy),r=getDraggablesInsideDroppable(n.descriptor.id,r),o=r.indexOf(t),r=(-1===o&&invariant(!1),r.slice(o+1)),o=r.reduce(function(e,t){return e[t.descriptor.id]=!0,e},{}),o={inVirtualList:"virtual"===n.descriptor.mode,displacedBy:i,effected:o};return{impact:{displaced:getDisplacementGroups({afterDragging:r,destination:n,displacedBy:i,last:null,viewport:e.frame,forceShouldAnimate:!1}),displacedBy:i,at:{type:"REORDER",destination:getHomeLocation(t.descriptor)}},afterCritical:o}},patchDimensionMap=function(e,t){return{draggables:e.draggables,droppables:patchDroppableMap(e.droppables,t)}},offsetDraggable=function(e){var t=e.draggable,n=e.offset,e=e.initialWindowScroll,n=offset$1(t.client,n),e=withScroll(n,e);return _extends({},t,{placeholder:_extends({},t.placeholder,{client:n}),client:n,page:e})},getFrame=function(e){e=e.frame;return e||invariant(!1),e},adjustAdditionsForScrollChanges=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,i=r.scroll.diff.value;return t.map(function(e){var t=e.descriptor.droppableId,t=n[t],t=getFrame(t).scroll.diff.value,t=add(i,t);return offsetDraggable({draggable:e,offset:t,initialWindowScroll:r.scroll.initial})})},publishWhileDraggingInVirtual=function(e){var n=e.state,e=e.published,t=e.modified.map(function(e){var t=n.dimensions.droppables[e.droppableId];return scrollDroppable(t,e.scroll)}),t=_extends({},n.dimensions.droppables,{},toDroppableMap(t)),r=toDraggableMap(adjustAdditionsForScrollChanges({additions:e.additions,updatedDroppables:t,viewport:n.viewport})),i=_extends({},n.dimensions.draggables,{},r),r=(e.removals.forEach(function(e){delete i[e]}),{droppables:t,draggables:i}),e=whatIsDraggedOver(n.impact),t=e?r.droppables[e]:null,e=r.draggables[n.critical.draggable.id],o=r.droppables[n.critical.droppable.id],e=getLiftEffect({draggable:e,home:o,draggables:i,viewport:n.viewport}),o=e.impact,e=e.afterCritical,t=t&&t.isCombineEnabled?n.impact:o,t=getDragImpact({pageOffset:n.current.page.offset,draggable:r.draggables[n.critical.draggable.id],draggables:r.draggables,droppables:r.droppables,previousImpact:t,viewport:n.viewport,afterCritical:e}),t=_extends({phase:"DRAGGING"},n,{phase:"DRAGGING",impact:t,onLiftImpact:o,dimensions:r,afterCritical:e,forceShouldAnimate:!1});return"COLLECTING"===n.phase?t:_extends({phase:"DROP_PENDING"},t,{phase:"DROP_PENDING",reason:n.reason,isWaiting:!1})},isSnapping=function(e){return"SNAP"===e.movementMode},postDroppableChange=function(e,t,n){t=patchDimensionMap(e.dimensions,t);return(!isSnapping(e)||n?update:refreshSnap)({state:e,dimensions:t})};function removeScrollJumpRequest(e){return e.isDragging&&"SNAP"===e.movementMode?_extends({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var idle={phase:"IDLE",completed:null,shouldFlush:!1},reducer$1=function(e,t){if(void 0===e&&(e=idle),"FLUSH"===t.type)return _extends({},idle,{shouldFlush:!0});if("INITIAL_PUBLISH"===t.type)return"IDLE"!==e.phase&&invariant(!1),l=(n=t.payload).critical,a=n.clientSelection,s=n.viewport,o=n.dimensions,n=n.movementMode,r=o.draggables[l.draggable.id],i=o.droppables[l.droppable.id],{phase:"DRAGGING",isDragging:!0,critical:l,movementMode:n,dimensions:o,initial:n={client:l={selection:a,borderBoxCenter:r.client.borderBox.center,offset:origin},page:{selection:add(l.selection,s.scroll.initial),borderBoxCenter:add(l.selection,s.scroll.initial),offset:add(l.selection,s.scroll.diff.value)}},current:n,isWindowScrollAllowed:toDroppableList(o.droppables).every(function(e){return!e.isFixedOnPage}),impact:l=(a=getLiftEffect({draggable:r,home:i,draggables:o.draggables,viewport:s})).impact,afterCritical:a.afterCritical,onLiftImpact:l,viewport:s,scrollJumpRequest:null,forceShouldAnimate:null};if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&invariant(!1),_extends({phase:"COLLECTING"},e,{phase:"COLLECTING"}));if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&invariant(!1),publishWhileDraggingInVirtual({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;isMovementAllowed(e)||invariant(!1);var n=t.payload.client;return isEqual(n,e.current.client.selection)?e:update({state:e,clientSelection:n,impact:isSnapping(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return removeScrollJumpRequest(e);if("COLLECTING"===e.phase)return removeScrollJumpRequest(e);isMovementAllowed(e)||invariant(!1);var r=t.payload,i=r.id,o=r.newScroll,a=e.dimensions.droppables[i];return a?(l=scrollDroppable(a,o),postDroppableChange(e,l,!1)):e}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;isMovementAllowed(e)||invariant(!1);var s=t.payload,n=s.id,r=s.isEnabled,i=e.dimensions.droppables[n],a=(i||invariant(!1),i.isEnabled===r&&invariant(!1),_extends({},i,{isEnabled:r}));return postDroppableChange(e,a,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;isMovementAllowed(e)||invariant(!1);var o=t.payload,l=o.id,s=o.isCombineEnabled,n=e.dimensions.droppables[l],i=(n||invariant(!1),n.isCombineEnabled===s&&invariant(!1),_extends({},n,{isCombineEnabled:s}));return postDroppableChange(e,i,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;isMovementAllowed(e)||invariant(!1),e.isWindowScrollAllowed||invariant(!1);r=t.payload.newScroll;return isEqual(e.viewport.scroll.current,r)?removeScrollJumpRequest(e):(a=scrollViewport(e.viewport,r),(isSnapping(e)?refreshSnap:update)({state:e,viewport:a}))}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type)return!isMovementAllowed(e)||(o=t.payload.maxScroll,isEqual(o,e.viewport.scroll.max))?e:(l=_extends({},e.viewport,{scroll:_extends({},e.viewport.scroll,{max:o})}),_extends({phase:"DRAGGING"},e,{viewport:l}));if("MOVE_UP"!==t.type&&"MOVE_DOWN"!==t.type&&"MOVE_LEFT"!==t.type&&"MOVE_RIGHT"!==t.type)return"DROP_PENDING"===t.type?(n=t.payload.reason,"COLLECTING"!==e.phase&&invariant(!1),_extends({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:n})):"DROP_ANIMATE"===t.type?(i=(s=t.payload).completed,r=s.dropDuration,a=s.newHomeClientOffset,"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&invariant(!1),{phase:"DROP_ANIMATING",completed:i,dropDuration:r,newHomeClientOffset:a,dimensions:e.dimensions}):"DROP_COMPLETE"===t.type?{phase:"IDLE",completed:t.payload.completed,shouldFlush:!1}:e;if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&invariant(!1);o=moveInDirection({state:e,type:t.type});return o?update({state:e,impact:o.impact,clientSelection:o.clientSelection,scrollJumpRequest:o.scrollJumpRequest}):e},beforeInitialCapture=function(e){return{type:"BEFORE_INITIAL_CAPTURE",payload:e}},lift=function(e){return{type:"LIFT",payload:e}},initialPublish=function(e){return{type:"INITIAL_PUBLISH",payload:e}},publishWhileDragging=function(e){return{type:"PUBLISH_WHILE_DRAGGING",payload:e}},collectionStarting=function(){return{type:"COLLECTION_STARTING",payload:null}},updateDroppableScroll=function(e){return{type:"UPDATE_DROPPABLE_SCROLL",payload:e}},updateDroppableIsEnabled=function(e){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}},updateDroppableIsCombineEnabled=function(e){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}},move=function(e){return{type:"MOVE",payload:e}},moveByWindowScroll=function(e){return{type:"MOVE_BY_WINDOW_SCROLL",payload:e}},updateViewportMaxScroll=function(e){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}},moveUp=function(){return{type:"MOVE_UP",payload:null}},moveDown=function(){return{type:"MOVE_DOWN",payload:null}},moveRight=function(){return{type:"MOVE_RIGHT",payload:null}},moveLeft=function(){return{type:"MOVE_LEFT",payload:null}},flush=function(){return{type:"FLUSH",payload:null}},animateDrop=function(e){return{type:"DROP_ANIMATE",payload:e}},completeDrop=function(e){return{type:"DROP_COMPLETE",payload:e}},drop=function(e){return{type:"DROP",payload:e}},dropPending=function(e){return{type:"DROP_PENDING",payload:e}},dropAnimationFinished=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},lift$1=function(l){return function(e){var a=e.getState,s=e.dispatch;return function(o){return function(e){var t,n,r,i;"LIFT"!==e.type?o(e):(n=(e=e.payload).id,t=e.clientSelection,e=e.movementMode,"DROP_ANIMATING"===(i=a()).phase&&s(completeDrop({completed:i.completed})),"IDLE"!==a().phase&&invariant(!1),s(flush()),s(beforeInitialCapture({draggableId:n,movementMode:e})),n=(i=l.startPublishing({draggableId:n,scrollOptions:{shouldPublishImmediately:"SNAP"===e}})).critical,r=i.dimensions,i=i.viewport,s(initialPublish({critical:n,dimensions:r,clientSelection:t,movementMode:e,viewport:i})))}}}},style=function(n){return function(){return function(t){return function(e){"INITIAL_PUBLISH"===e.type&&n.dragging(),"DROP_ANIMATE"===e.type&&n.dropping(e.payload.completed.result.reason),"FLUSH"!==e.type&&"DROP_COMPLETE"!==e.type||n.resting(),t(e)}}}},curves={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},combine={opacity:{drop:0,combining:.7},scale:{drop:.75}},timings={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},outOfTheWayTiming=timings.outOfTheWay+"s "+curves.outOfTheWay,transitions={fluid:"opacity "+outOfTheWayTiming,snap:"transform "+outOfTheWayTiming+", opacity "+outOfTheWayTiming,drop:function(e){e=e+"s "+curves.drop;return"transform "+e+", opacity "+e},outOfTheWay:"transform "+outOfTheWayTiming,placeholder:"height "+outOfTheWayTiming+", width "+outOfTheWayTiming+", margin "+outOfTheWayTiming},moveTo=function(e){return isEqual(e,origin)?null:"translate("+e.x+"px, "+e.y+"px)"},transforms={moveTo:moveTo,drop:function(e,t){e=moveTo(e);return e?t?e+" scale("+combine.scale.drop+")":e:null}},minDropTime=timings.minDropTime,maxDropTime=timings.maxDropTime,dropTimeRange=maxDropTime-minDropTime,maxDropTimeAtDistance=1500,cancelDropModifier=.6,getDropDuration=function(e){var t=e.current,n=e.destination,e=e.reason,t=distance(t,n);return t<=0?minDropTime:maxDropTimeAtDistance<=t?maxDropTime:(n=minDropTime+dropTimeRange*(t/maxDropTimeAtDistance),Number(("CANCEL"===e?n*cancelDropModifier:n).toFixed(2)))},getNewHomeClientOffset=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,i=e.viewport,e=e.afterCritical,o=r.draggables,r=r.droppables,a=whatIsDraggedOver(t),a=a?r[a]:null,r=r[n.descriptor.droppableId],t=getClientBorderBoxCenter({impact:t,draggable:n,draggables:o,afterCritical:e,droppable:a||r,viewport:i});return subtract(t,n.client.borderBox.center)},getDropImpact=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,i=e.home,o=e.viewport,e=e.onLiftImpact;return r.at&&"DROP"===n?"REORDER"===r.at.type?{impact:r,didDropInsideDroppable:!0}:{impact:_extends({},r,{displaced:emptyGroups}),didDropInsideDroppable:!0}:{impact:recompute({draggables:t,impact:e,destination:i,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1}},drop$1=function(e){var c=e.getState,u=e.dispatch;return function(l){return function(e){var t,n,r,i,o,a,s;"DROP"!==e.type?l(e):(t=c(),e=e.payload.reason,"COLLECTING"===t.phase?u(dropPending({reason:e})):"IDLE"!==t.phase&&("DROP_PENDING"===t.phase&&t.isWaiting&&invariant(!1),"DRAGGING"!==t.phase&&"DROP_PENDING"!==t.phase&&invariant(!1),i=t.critical,s=(n=t.dimensions).draggables[t.critical.draggable.id],r=(a=getDropImpact({reason:e,lastImpact:t.impact,afterCritical:t.afterCritical,onLiftImpact:t.onLiftImpact,home:t.dimensions.droppables[t.critical.droppable.id],viewport:t.viewport,draggables:t.dimensions.draggables})).impact,o=(a=a.didDropInsideDroppable)?tryGetDestination(r):null,a=a?tryGetCombine(r):null,i={index:i.draggable.index,droppableId:i.droppable.id},i={draggableId:s.descriptor.id,type:s.descriptor.type,source:i,reason:e,mode:t.movementMode,destination:o,combine:a},o=getNewHomeClientOffset({impact:r,draggable:s,dimensions:n,viewport:t.viewport,afterCritical:t.afterCritical}),a={critical:t.critical,afterCritical:t.afterCritical,result:i,impact:r},!isEqual(t.current.client.offset,o)||Boolean(i.combine)?(s=getDropDuration({current:t.current.client.offset,destination:o,reason:e}),u(animateDrop({newHomeClientOffset:o,dropDuration:s,completed:a}))):u(completeDrop({completed:a}))))}}},getWindowScroll=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function getWindowScrollBinding(t){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(e){e.target!==window&&e.target!==window.document||t()}}}function getScrollListener(e){var t=e.onWindowScroll;var n=rafSchd$1(function(){t(getWindowScroll())}),r=getWindowScrollBinding(n),i=noop;function o(){return i!==noop}return{start:function(){o()&&invariant(!1),i=bindEvents(window,[r])},stop:function(){o()||invariant(!1),n.cancel(),i(),i=noop},isActive:o}}var shouldEnd=function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type},scrollListener=function(t){var n=getScrollListener({onWindowScroll:function(e){t.dispatch(moveByWindowScroll({newScroll:e}))}});return function(t){return function(e){n.isActive()||"INITIAL_PUBLISH"!==e.type||n.start(),n.isActive()&&shouldEnd(e)&&n.stop(),t(e)}}},getExpiringAnnounce=function(t){function e(e){n||r||(n=!0,t(e),clearTimeout(i))}var n=!1,r=!1,i=setTimeout(function(){r=!0});return e.wasCalled=function(){return n},e},getAsyncMarshal=function(){var r=[];return{add:function(e){var n=setTimeout(function(){return t=n,-1===(e=findIndex(r,function(e){return e.timerId===t}))&&invariant(!1),void r.splice(e,1)[0].callback();var t,e});r.push({timerId:n,callback:e})},flush:function(){var e;r.length&&(e=[].concat(r),r.length=0,e.forEach(function(e){clearTimeout(e.timerId),e.callback()}))}}},areLocationsEqual=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.droppableId===t.droppableId&&e.index===t.index},isCombineEqual=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId},isCriticalEqual=function(e,t){var n;return e===t||(n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,e=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type,n&&e)},withTimings=function(e,t){t()},getDragStart=function(e,t){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t}},execute=function(e,t,n,r){e&&(e(t,{announce:e=getExpiringAnnounce(n)}),e.wasCalled())||n(r(t))},getPublisher=function(s,l){function t(e){u||invariant(!1),u=null,withTimings("onDragEnd",function(){return execute(s().onDragEnd,e,l,preset.onDragEnd)})}var c=getAsyncMarshal(),u=null;return{beforeCapture:function(t,n){u&&invariant(!1),withTimings("onBeforeCapture",function(){var e=s().onBeforeCapture;e&&e({draggableId:t,mode:n})})},beforeStart:function(t,n){u&&invariant(!1),withTimings("onBeforeDragStart",function(){var e=s().onBeforeDragStart;e&&e(getDragStart(t,n))})},start:function(e,t){u&&invariant(!1);var n=getDragStart(e,t);u={mode:t,lastCritical:e,lastLocation:n.source,lastCombine:null},c.add(function(){withTimings("onDragStart",function(){return execute(s().onDragStart,n,l,preset.onDragStart)})})},update:function(e,t){var n,r=tryGetDestination(t),t=tryGetCombine(t),i=(u||invariant(!1),!isCriticalEqual(e,u.lastCritical)),o=(i&&(u.lastCritical=e),!areLocationsEqual(u.lastLocation,r)),a=(o&&(u.lastLocation=r),!isCombineEqual(u.lastCombine,t));a&&(u.lastCombine=t),(i||o||a)&&(n=_extends({},getDragStart(e,u.mode),{combine:t,destination:r}),c.add(function(){withTimings("onDragUpdate",function(){return execute(s().onDragUpdate,n,l,preset.onDragUpdate)})}))},flush:function(){u||invariant(!1),c.flush()},drop:t,abort:function(){var e;u&&(e=_extends({},getDragStart(u.lastCritical,u.mode),{combine:null,destination:null,reason:"CANCEL"}),t(e))}}},responders=function(e,t){var i=getPublisher(e,t);return function(r){return function(n){return function(e){var t;"BEFORE_INITIAL_CAPTURE"===e.type?i.beforeCapture(e.payload.draggableId,e.payload.movementMode):"INITIAL_PUBLISH"===e.type?(t=e.payload.critical,i.beforeStart(t,e.payload.movementMode),n(e),i.start(t,e.payload.movementMode)):"DROP_COMPLETE"===e.type?(t=e.payload.completed.result,i.flush(),n(e),i.drop(t)):(n(e),"FLUSH"===e.type?i.abort():"DRAGGING"===(t=r.getState()).phase&&i.update(t.critical,t.impact))}}}},dropAnimationFinish=function(n){return function(t){return function(e){"DROP_ANIMATION_FINISHED"!==e.type?t(e):("DROP_ANIMATING"!==(e=n.getState()).phase&&invariant(!1),n.dispatch(completeDrop({completed:e.completed})))}}},dropAnimationFlushOnScroll=function(r){var i=null,o=null;return function(n){return function(e){var t;"FLUSH"!==e.type&&"DROP_COMPLETE"!==e.type&&"DROP_ANIMATION_FINISHED"!==e.type||(o&&(cancelAnimationFrame(o),o=null),i&&(i(),i=null)),n(e),"DROP_ANIMATE"===e.type&&(t={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===r.getState().phase&&r.dispatch(dropAnimationFinished())}},o=requestAnimationFrame(function(){o=null,i=bindEvents(window,[t])}))}}},dimensionMarshalStopper=function(n){return function(){return function(t){return function(e){"DROP_COMPLETE"!==e.type&&"FLUSH"!==e.type&&"DROP_ANIMATE"!==e.type||n.stopPublishing(),t(e)}}}},focus=function(n){var r=!1;return function(){return function(t){return function(e){"INITIAL_PUBLISH"===e.type?(r=!0,n.tryRecordFocus(e.payload.critical.draggable.id),t(e),n.tryRestoreFocusRecorded()):(t(e),r&&("FLUSH"===e.type?(r=!1,n.tryRestoreFocusRecorded()):"DROP_COMPLETE"===e.type&&(r=!1,(e=e.payload.completed.result).combine&&n.tryShiftRecord(e.draggableId,e.combine.draggableId),n.tryRestoreFocusRecorded())))}}}},shouldStop=function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type},autoScroll=function(i){return function(r){return function(n){return function(e){var t;shouldStop(e)?(i.stop(),n(e)):"INITIAL_PUBLISH"===e.type?(n(e),"DRAGGING"!==(t=r.getState()).phase&&invariant(!1),i.start(t)):(n(e),i.scroll(r.getState()))}}}},pendingDrop=function(n){return function(t){return function(e){t(e),"PUBLISH_WHILE_DRAGGING"!==e.type||"DROP_PENDING"!==(e=n.getState()).phase||e.isWaiting||n.dispatch(drop({reason:e.reason}))}}},composeEnhancers=compose,createStore=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,i=e.getResponders,o=e.announce,e=e.autoScroller;return createStore$1(reducer$1,composeEnhancers(applyMiddleware(style(r),dimensionMarshalStopper(t),lift$1(t),drop$1,dropAnimationFinish,dropAnimationFlushOnScroll,pendingDrop,autoScroll(e),scrollListener,focus(n),responders(i,o))))},clean$1=function(){return{additions:{},removals:{},modified:{}}};function createPublisher(e){function n(){a||(i.collectionStarting(),a=requestAnimationFrame(function(){a=null;var e=o,t=e.additions,n=e.removals,e=e.modified,t=Object.keys(t).map(function(e){return r.draggable.getById(e).getDimension(origin)}).sort(function(e,t){return e.descriptor.index-t.descriptor.index}),e=Object.keys(e).map(function(e){return{droppableId:e,scroll:r.droppable.getById(e).callbacks.getScrollWhileDragging()}}),t={additions:t,removals:Object.keys(n),modified:e};o=clean$1(),i.publish(t)}))}var r=e.registry,i=e.callbacks,o=clean$1(),a=null;return{add:function(e){var t=e.descriptor.id;o.additions[t]=e,o.modified[e.descriptor.droppableId]=!0,o.removals[t]&&delete o.removals[t],n()},remove:function(e){e=e.descriptor;o.removals[e.id]=!0,o.modified[e.droppableId]=!0,o.additions[e.id]&&delete o.additions[e.id],n()},stop:function(){a&&(cancelAnimationFrame(a),a=null,o=clean$1())}}}var getMaxScroll=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,e=e.width,n=subtract({x:n,y:t},{x:e,y:r});return{x:Math.max(0,n.x),y:Math.max(0,n.y)}},getDocumentElement=function(){var e=document.documentElement;return e||invariant(!1),e},getMaxWindowScroll=function(){var e=getDocumentElement();return getMaxScroll({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},getViewport=function(){var e=getWindowScroll(),t=getMaxWindowScroll(),n=e.y,r=e.x,i=getDocumentElement(),o=i.clientWidth,i=i.clientHeight;return{frame:getRect({top:n,left:r,right:r+o,bottom:n+i}),scroll:{initial:e,current:e,max:t,diff:{value:origin,displacement:origin}}}},getInitialPublish=function(e){var t=e.critical,n=e.scrollOptions,e=e.registry,r=getViewport(),i=r.scroll.current,o=t.droppable,o=e.droppable.getAllByType(o.type).map(function(e){return e.callbacks.getDimensionAndWatchScroll(i,n)}),e=e.draggable.getAllByType(t.draggable.type).map(function(e){return e.getDimension(i)});return{dimensions:{draggables:toDraggableMap(e),droppables:toDroppableMap(o)},critical:t,viewport:r}};function shouldPublishUpdate(e,t,n){return n.descriptor.id!==t.id&&n.descriptor.type===t.type&&"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode}var createDimensionMarshal=function(r,n){function i(e){o||invariant(!1);var t=o.critical.draggable;"ADDITION"===e.type&&shouldPublishUpdate(r,t,e.value)&&a.add(e.value),"REMOVAL"===e.type&&shouldPublishUpdate(r,t,e.value)&&a.remove(e.value)}var o=null,a=createPublisher({callbacks:{publish:n.publishWhileDragging,collectionStarting:n.collectionStarting},registry:r});return{updateDroppableIsEnabled:function(e,t){r.droppable.exists(e)||invariant(!1),o&&n.updateDroppableIsEnabled({id:e,isEnabled:t})},updateDroppableIsCombineEnabled:function(e,t){o&&(r.droppable.exists(e)||invariant(!1),n.updateDroppableIsCombineEnabled({id:e,isCombineEnabled:t}))},scrollDroppable:function(e,t){o&&r.droppable.getById(e).callbacks.scroll(t)},updateDroppableScroll:function(e,t){o&&(r.droppable.exists(e)||invariant(!1),n.updateDroppableScroll({id:e,newScroll:t}))},startPublishing:function(e){o&&invariant(!1);var t=r.draggable.getById(e.draggableId),n=r.droppable.getById(t.descriptor.droppableId),t={draggable:t.descriptor,droppable:n.descriptor},n=r.subscribe(i);return o={critical:t,unsubscribe:n},getInitialPublish({critical:t,registry:r,scrollOptions:e.scrollOptions})},stopPublishing:function(){var e;o&&(a.stop(),e=o.critical.droppable,r.droppable.getAllByType(e.type).forEach(function(e){return e.callbacks.dragStopped()}),o.unsubscribe(),o=null)}}},canStartDrag=function(e,t){return"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason},scrollWindow=function(e){window.scrollBy(e.x,e.y)},getScrollableDroppables=memoizeOne(function(e){return toDroppableList(e).filter(function(e){return!!e.isEnabled&&!!e.frame})}),getScrollableDroppableOver=function(t,e){return find(getScrollableDroppables(e),function(e){return e.frame||invariant(!1),isPositionInFrame(e.frame.pageMarginBox)(t)})},getBestScrollableDroppable=function(e){var t=e.center,n=e.destination,e=e.droppables;return n?(n=e[n]).frame?n:null:getScrollableDroppableOver(t,e)},config$1={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(e){return Math.pow(e,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},getDistanceThresholds=function(e,t){return{startScrollingFrom:e[t.size]*config$1.startFromPercentage,maxScrollValueAt:e[t.size]*config$1.maxScrollAtPercentage}},getPercentage=function(e){var t=e.startOfRange,n=e.endOfRange,e=e.current,n=n-t;return 0==n?0:(e-t)/n},minScroll=1,getValueFromDistance=function(e,t){return e>t.startScrollingFrom?0:e<=t.maxScrollValueAt?config$1.maxPixelScroll:e===t.startScrollingFrom?minScroll:(t=getPercentage({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),e=config$1.maxPixelScroll*config$1.ease(1-t),Math.ceil(e))},accelerateAt=config$1.durationDampening.accelerateAt,stopAt=config$1.durationDampening.stopDampeningAt,dampenValueByTime=function(e,t){var n=stopAt,t=Date.now()-t;return stopAt<=t?e:t<accelerateAt?minScroll:(n=getPercentage({startOfRange:accelerateAt,endOfRange:n,current:t}),t=e*config$1.ease(n),Math.ceil(t))},getValue=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,e=e.shouldUseTimeDampening,t=getValueFromDistance(t,n);return 0===t?0:e?Math.max(dampenValueByTime(t,r),minScroll):t},getScrollOnAxis=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,i=e.axis,e=e.shouldUseTimeDampening,t=getDistanceThresholds(t,i);return n[i.end]<n[i.start]?getValue({distanceToEdge:n[i.end],thresholds:t,dragStartTime:r,shouldUseTimeDampening:e}):-1*getValue({distanceToEdge:n[i.start],thresholds:t,dragStartTime:r,shouldUseTimeDampening:e})},adjustForSizeLimits=function(e){var t=e.container,n=e.subject,e=e.proposedScroll,r=n.height>t.height,n=n.width>t.width;return n||r?n&&r?null:{x:n?0:e.x,y:r?0:e.y}:e},clean$2=apply(function(e){return 0===e?0:e}),getScroll=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,i=e.center,e=e.shouldUseTimeDampening,i={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},o=getScrollOnAxis({container:n,distanceToEdges:i,dragStartTime:t,axis:vertical,shouldUseTimeDampening:e}),i=getScrollOnAxis({container:n,distanceToEdges:i,dragStartTime:t,axis:horizontal,shouldUseTimeDampening:e}),t=clean$2({x:i,y:o});return isEqual(t,origin)||!(e=adjustForSizeLimits({container:n,subject:r,proposedScroll:t}))||isEqual(e,origin)?null:e},smallestSigned=apply(function(e){return 0===e?0:0<e?1:-1}),getOverlap=function(){function r(e,t){return e<0?e:t<e?e-t:0}return function(e){var t=e.current,n=e.max,e=e.change,t=add(t,e),e={x:r(t.x,n.x),y:r(t.y,n.y)};return isEqual(e,origin)?null:e}}(),canPartiallyScroll=function(e){var t=e.max,n=e.current,e=e.change,t={x:Math.max(n.x,t.x),y:Math.max(n.y,t.y)},e=smallestSigned(e),t=getOverlap({max:t,current:n,change:e});return!t||0!==e.x&&0===t.x||0!==e.y&&0===t.y},canScrollWindow=function(e,t){return canPartiallyScroll({current:e.scroll.current,max:e.scroll.max,change:t})},getWindowOverlap=function(e,t){var n;return canScrollWindow(e,t)?(n=e.scroll.max,e=e.scroll.current,getOverlap({current:e,max:n,change:t})):null},canScrollDroppable=function(e,t){e=e.frame;return!!e&&canPartiallyScroll({current:e.scroll.current,max:e.scroll.max,change:t})},getDroppableOverlap=function(e,t){var n=e.frame;return n&&canScrollDroppable(e,t)?getOverlap({current:n.scroll.current,max:n.scroll.max,change:t}):null},getWindowScrollChange=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,e=e.shouldUseTimeDampening,i=getScroll({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:e});return i&&canScrollWindow(t,i)?i:null},getDroppableScrollChange=function(e){var t=e.droppable,n=e.subject,r=e.center,i=e.dragStartTime,e=e.shouldUseTimeDampening,o=t.frame;return o&&(i=getScroll({dragStartTime:i,container:o.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:e}))&&canScrollDroppable(t,i)?i:null},scroll$1=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,e=e.scrollDroppable,o=t.current.page.borderBoxCenter,a=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){var s=t.viewport,s=getWindowScrollChange({dragStartTime:n,viewport:s,subject:a,center:o,shouldUseTimeDampening:r});if(s)return void i(s)}i=getBestScrollableDroppable({center:o,destination:whatIsDraggedOver(t.impact),droppables:t.dimensions.droppables});i&&(s=getDroppableScrollChange({dragStartTime:n,droppable:i,subject:a,center:o,shouldUseTimeDampening:r}))&&e(i.descriptor.id,s)},createFluidScroller=function(e){function i(e){a||invariant(!1);var t=a.shouldUseTimeDampening,n=(n=a).dragStartTime;scroll$1({state:e,scrollWindow:r,scrollDroppable:o,dragStartTime:n,shouldUseTimeDampening:t})}var t=e.scrollWindow,e=e.scrollDroppable,r=rafSchd$1(t),o=rafSchd$1(e),a=null;return{start:function(e){a&&invariant(!1);function t(){r=!0}var n=Date.now(),r=!1;scroll$1({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:t,scrollDroppable:t}),a={dragStartTime:n,shouldUseTimeDampening:r},r&&i(e)},stop:function(){a&&(r.cancel(),o.cancel(),a=null)},scroll:i}},createJumpScroller=function(e){var o=e.move,a=e.scrollDroppable,s=e.scrollWindow;return function(e){var t,n,r,i=e.scrollJumpRequest;i&&((r=whatIsDraggedOver(e.impact))||invariant(!1),r=e.dimensions.droppables[r],t=canScrollDroppable(r,i=i)?(t=getDroppableOverlap(r,i))?(t=subtract(i,t),a(r.descriptor.id,t),subtract(i,t)):(a(r.descriptor.id,i),null):i)&&(r=e.viewport,i=e.isWindowScrollAllowed,r=r,n=t,i=i&&canScrollWindow(r,n)?(i=getWindowOverlap(r,n))?(r=subtract(n,i),s(r),subtract(n,r)):(s(n),null):n)&&(r=add((r=e).current.client.selection,i),o({client:r}))}},createAutoScroller=function(e){var t=e.scrollDroppable,n=e.scrollWindow,e=e.move,r=createFluidScroller({scrollWindow:n,scrollDroppable:t}),i=createJumpScroller({move:e,scrollWindow:n,scrollDroppable:t});return{scroll:function(e){"DRAGGING"===e.phase&&("FLUID"===e.movementMode?r.scroll(e):e.scrollJumpRequest&&i(e))},start:r.start,stop:r.stop}},prefix$1="data-rbd",dragHandle=function(){var e=prefix$1+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),draggable=function(){var e=prefix$1+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),droppable=function(){var e=prefix$1+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),scrollContainer={contextId:prefix$1+"-scroll-container-context-id"},makeGetSelector=function(t){return function(e){return"["+e+'="'+t+'"]'}},getStyles=function(e,n){return e.map(function(e){var t=e.styles[n];return t?e.selector+" { "+t+" }":""}).join(" ")},noPointerEvents="pointer-events: none;",getStyles$1=function(e){var e=makeGetSelector(e),t=(t="\n cursor: -webkit-grab;\n cursor: grab;\n ",{selector:e(dragHandle.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:t,dragging:noPointerEvents,dropAnimating:t}});n="\n transition: "+transitions.outOfTheWay+";\n ";var n=[{selector:e(draggable.contextId),styles:{dragging:n,dropAnimating:n,userCancel:n}},t,{selector:e(droppable.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:getStyles(n,"always"),resting:getStyles(n,"resting"),dragging:getStyles(n,"dragging"),dropAnimating:getStyles(n,"dropAnimating"),userCancel:getStyles(n,"userCancel")}},useIsomorphicLayoutEffect="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?react.exports.useLayoutEffect:react.exports.useEffect,getHead=function(){var e=document.querySelector("head");return e||invariant(!1),e},createStyleEl=function(e){var t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function useStyleMarshal(n,r){var i=useMemo(function(){return getStyles$1(n)},[n]),o=react.exports.useRef(null),a=react.exports.useRef(null),s=useCallback(memoizeOne(function(e){var t=a.current;t||invariant(!1),t.textContent=e}),[]),l=useCallback(function(e){var t=o.current;t||invariant(!1),t.textContent=e},[]),e=(useIsomorphicLayoutEffect(function(){(o.current||a.current)&&invariant(!1);var e=createStyleEl(r),t=createStyleEl(r);return o.current=e,a.current=t,e.setAttribute(prefix$1+"-always",n),t.setAttribute(prefix$1+"-dynamic",n),getHead().appendChild(e),getHead().appendChild(t),l(i.always),s(i.resting),function(){function e(e){var t=e.current;t||invariant(!1),getHead().removeChild(t),e.current=null}e(o),e(a)}},[r,l,s,i.always,i.resting,n]),useCallback(function(){return s(i.dragging)},[s,i.dragging])),t=useCallback(function(e){s("DROP"===e?i.dropAnimating:i.userCancel)},[s,i.dropAnimating,i.userCancel]),c=useCallback(function(){a.current&&s(i.resting)},[s,i.resting]);return useMemo(function(){return{dragging:e,dropping:t,resting:c}},[e,t,c])}var getWindowFromEl=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function isHtmlElement(e){return e instanceof getWindowFromEl(e).HTMLElement}function findDragHandle(e,t){var e="["+dragHandle.contextId+'="'+e+'"]',e=toArray(document.querySelectorAll(e));return e.length&&(e=find(e,function(e){return e.getAttribute(dragHandle.draggableId)===t}))&&isHtmlElement(e)?e:null}function useFocusMarshal(t){var r=react.exports.useRef({}),n=react.exports.useRef(null),i=react.exports.useRef(null),o=react.exports.useRef(!1),e=useCallback(function(t,e){var n={id:t,focus:e};return r.current[t]=n,function(){var e=r.current;e[t]!==n&&delete e[t]}},[]),a=useCallback(function(e){e=findDragHandle(t,e);e&&e!==document.activeElement&&e.focus()},[t]),s=useCallback(function(e,t){n.current===e&&(n.current=t)},[]),l=useCallback(function(){i.current||o.current&&(i.current=requestAnimationFrame(function(){i.current=null;var e=n.current;e&&a(e)}))},[a]),c=useCallback(function(e){n.current=null;var t=document.activeElement;t&&t.getAttribute(dragHandle.draggableId)===e&&(n.current=e)},[]);return useIsomorphicLayoutEffect(function(){return o.current=!0,function(){o.current=!1;var e=i.current;e&&cancelAnimationFrame(e)}},[]),useMemo(function(){return{register:e,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}},[e,c,l,s])}function createRegistry(){var r={draggables:{},droppables:{}},n=[];function i(t){n.length&&n.forEach(function(e){return e(t)})}function o(e){return r.draggables[e]||null}function a(e){return r.droppables[e]||null}return{draggable:{register:function(e){i({type:"ADDITION",value:r.draggables[e.descriptor.id]=e})},update:function(e,t){var n=r.draggables[t.descriptor.id];n&&n.uniqueId===e.uniqueId&&(delete r.draggables[t.descriptor.id],r.draggables[e.descriptor.id]=e)},unregister:function(e){var t=e.descriptor.id,n=o(t);n&&e.uniqueId===n.uniqueId&&(delete r.draggables[t],i({type:"REMOVAL",value:e}))},getById:function(e){return(e=o(e))||invariant(!1),e},findById:o,exists:function(e){return Boolean(o(e))},getAllByType:function(t){return values$1(r.draggables).filter(function(e){return e.descriptor.type===t})}},droppable:{register:function(e){r.droppables[e.descriptor.id]=e},unregister:function(e){var t=a(e.descriptor.id);t&&e.uniqueId===t.uniqueId&&delete r.droppables[e.descriptor.id]},getById:function(e){return(e=a(e))||invariant(!1),e},findById:a,exists:function(e){return Boolean(a(e))},getAllByType:function(t){return values$1(r.droppables).filter(function(e){return e.descriptor.type===t})}},subscribe:function(t){return n.push(t),function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}},clean:function(){r.draggables={},r.droppables={},n.length=0}}}function useRegistry(){var e=useMemo(createRegistry,[]);return react.exports.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var StoreContext=React.createContext(null),getBodyElement=function(){var e=document.body;return e||invariant(!1),e},visuallyHidden={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},getId=function(e){return"rbd-announcement-"+e};function useAnnouncer(e){var n=useMemo(function(){return getId(e)},[e]),r=react.exports.useRef(null);return react.exports.useEffect(function(){var t=document.createElement("div");return(r.current=t).id=n,t.setAttribute("aria-live","assertive"),t.setAttribute("aria-atomic","true"),_extends(t.style,visuallyHidden),getBodyElement().appendChild(t),function(){setTimeout(function(){var e=getBodyElement();e.contains(t)&&e.removeChild(t),t===r.current&&(r.current=null)})}},[n]),useCallback(function(e){var t=r.current;t&&(t.textContent=e)},[])}var count=0,defaults={separator:"::"};function useUniqueId(e,t){return useMemo(function(){return""+e+t.separator+count++},[(t=void 0===t?defaults:t).separator,e])}function getElementId(e){return"rbd-hidden-text-"+e.contextId+"-"+e.uniqueId}function useHiddenTextElement(e){var t=e.contextId,n=e.text,r=useUniqueId("hidden-text",{separator:"-"}),i=useMemo(function(){return getElementId({contextId:t,uniqueId:r})},[r,t]);return react.exports.useEffect(function(){var t=document.createElement("div");return t.id=i,t.textContent=n,t.style.display="none",getBodyElement().appendChild(t),function(){var e=getBodyElement();e.contains(t)&&e.removeChild(t)}},[i,n]),i}var AppContext=React.createContext(null);function usePrevious(e){var t=react.exports.useRef(e);return react.exports.useEffect(function(){t.current=e}),t}function create$2(){var t=null;function e(){t||invariant(!1),t=null}return{isClaimed:function(){return Boolean(t)},isActive:function(e){return e===t},claim:function(e){return t&&invariant(!1),t=e={abandon:e}},release:e,tryAbandon:function(){t&&(t.abandon(),e())}}}var _preventedKeys,tab=9,enter=13,escape$1=27,space=32,pageUp=33,pageDown=34,end=35,home=36,arrowLeft=37,arrowUp=38,arrowRight=39,arrowDown=40,preventedKeys=((_preventedKeys={})[enter]=!0,_preventedKeys[tab]=!0,_preventedKeys),preventStandardKeyEvents=function(e){preventedKeys[e.keyCode]&&e.preventDefault()},supportedEventName=function(){var e="visibilitychange";return"undefined"!=typeof document&&find([e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],function(e){return"on"+e in document})||e}(),primaryButton=0,sloppyClickThreshold=5;function isSloppyClickThresholdExceeded(e,t){return Math.abs(t.x-e.x)>=sloppyClickThreshold||Math.abs(t.y-e.y)>=sloppyClickThreshold}var _scrollJumpKeys,idle$1={type:"IDLE"};function getCaptureBindings(e){var n=e.cancel,r=e.completed,i=e.getPhase,o=e.setPhase;return[{eventName:"mousemove",fn:function(e){var t=e.button,n=e.clientX,r=e.clientY;t===primaryButton&&(t={x:n,y:r},"DRAGGING"===(n=i()).type?(e.preventDefault(),n.actions.move(t)):("PENDING"!==n.type&&invariant(!1),isSloppyClickThresholdExceeded(n.point,t)&&(e.preventDefault(),r=n.actions.fluidLift(t),o({type:"DRAGGING",actions:r}))))}},{eventName:"mouseup",fn:function(e){var t=i();("DRAGGING"!==t.type?n:(e.preventDefault(),t.actions.drop({shouldBlockNextClick:!0}),r))()}},{eventName:"mousedown",fn:function(e){"DRAGGING"===i().type&&e.preventDefault(),n()}},{eventName:"keydown",fn:function(e){"PENDING"===i().type?n():e.keyCode===escape$1?(e.preventDefault(),n()):preventStandardKeyEvents(e)}},{eventName:"resize",fn:n},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){"PENDING"===i().type&&n()}},{eventName:"webkitmouseforcedown",fn:function(e){var t=i();"IDLE"===t.type&&invariant(!1),t.actions.shouldRespectForcePress()?n():e.preventDefault()}},{eventName:supportedEventName,fn:n}]}function useMouseSensor(r){var n=react.exports.useRef(idle$1),i=react.exports.useRef(noop),e=useMemo(function(){return{eventName:"mousedown",fn:function(e){var t;e.defaultPrevented||e.button!==primaryButton||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||(t=r.findClosestDraggableId(e))&&(t=r.tryGetLock(t,a,{sourceEvent:e}))&&(e.preventDefault(),e={x:e.clientX,y:e.clientY},i.current(),c(t,e))}}},[r]),t=useMemo(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(e){var t,n;e.defaultPrevented||(t=r.findClosestDraggableId(e))&&(n=r.findOptionsForDraggable(t))&&!n.shouldRespectForcePress&&r.canGetLock(t)&&e.preventDefault()}}},[r]),o=useCallback(function(){i.current=bindEvents(window,[t,e],{passive:!1,capture:!0})},[t,e]),a=useCallback(function(){"IDLE"!==n.current.type&&(n.current=idle$1,i.current(),o())},[o]),s=useCallback(function(){var e=n.current;a(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[a]),l=useCallback(function(){var e=getCaptureBindings({cancel:s,completed:a,getPhase:function(){return n.current},setPhase:function(e){n.current=e}});i.current=bindEvents(window,e,{capture:!0,passive:!1})},[s,a]),c=useCallback(function(e,t){"IDLE"!==n.current.type&&invariant(!1),n.current={type:"PENDING",point:t,actions:e},l()},[l]);useIsomorphicLayoutEffect(function(){return o(),function(){i.current()}},[o])}function noop$1(){}(_scrollJumpKeys={})[pageDown]=!0,_scrollJumpKeys[pageUp]=!0,_scrollJumpKeys[home]=!0,_scrollJumpKeys[end]=!0;var scrollJumpKeys=_scrollJumpKeys;function getDraggingBindings(t,n){function r(){n(),t.cancel()}return[{eventName:"keydown",fn:function(e){e.keyCode===escape$1?(e.preventDefault(),r()):e.keyCode===space?(e.preventDefault(),n(),t.drop()):e.keyCode===arrowDown?(e.preventDefault(),t.moveDown()):e.keyCode===arrowUp?(e.preventDefault(),t.moveUp()):e.keyCode===arrowRight?(e.preventDefault(),t.moveRight()):e.keyCode===arrowLeft?(e.preventDefault(),t.moveLeft()):scrollJumpKeys[e.keyCode]?e.preventDefault():preventStandardKeyEvents(e)}},{eventName:"mousedown",fn:r},{eventName:"mouseup",fn:r},{eventName:"click",fn:r},{eventName:"touchstart",fn:r},{eventName:"resize",fn:r},{eventName:"wheel",fn:r,options:{passive:!0}},{eventName:supportedEventName,fn:r}]}function useKeyboardSensor(i){var o=react.exports.useRef(noop$1),e=useMemo(function(){return{eventName:"keydown",fn:function(e){var t,n;function r(){n||invariant(!1),n=!1,o.current(),a()}e.defaultPrevented||e.keyCode===space&&(t=i.findClosestDraggableId(e))&&(t=i.tryGetLock(t,r,{sourceEvent:e}))&&(e.preventDefault(),n=!0,e=t.snapLift(),o.current(),o.current=bindEvents(window,getDraggingBindings(e,r),{capture:!0,passive:!1}))}}},[i]),a=useCallback(function(){o.current=bindEvents(window,[e],{passive:!1,capture:!0})},[e]);useIsomorphicLayoutEffect(function(){return a(),function(){o.current()}},[a])}var idle$2={type:"IDLE"},timeForLongPress=120,forcePressThreshold=.15;function getWindowBindings(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){"DRAGGING"!==n().type||e.keyCode===escape$1&&e.preventDefault(),t()}},{eventName:supportedEventName,fn:t}]}function getHandleBindings(e){var r=e.cancel,n=e.completed,i=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(e){var t,n=i();"DRAGGING"!==n.type?r():(n.hasMoved=!0,t={x:(t=e.touches[0]).clientX,y:t.clientY},e.preventDefault(),n.actions.move(t))}},{eventName:"touchend",fn:function(e){var t=i();("DRAGGING"!==t.type?r:(e.preventDefault(),t.actions.drop({shouldBlockNextClick:!0}),n))()}},{eventName:"touchcancel",fn:function(e){"DRAGGING"!==i().type||e.preventDefault(),r()}},{eventName:"touchforcechange",fn:function(e){var t=i(),n=("IDLE"===t.type&&invariant(!1),e.touches[0]);if(n&&n.force>=forcePressThreshold){n=t.actions.shouldRespectForcePress();if("PENDING"!==t.type)return!n||t.hasMoved?void e.preventDefault():void r();n&&r()}}},{eventName:supportedEventName,fn:r}]}function useTouchSensor(n){var t=react.exports.useRef(idle$2),i=react.exports.useRef(noop),o=useCallback(function(){return t.current},[]),r=useCallback(function(e){t.current=e},[]),e=useMemo(function(){return{eventName:"touchstart",fn:function(e){var t;e.defaultPrevented||(t=n.findClosestDraggableId(e))&&(t=n.tryGetLock(t,s,{sourceEvent:e}))&&(e={x:(e=e.touches[0]).clientX,y:e.clientY},i.current(),d(t,e))}}},[n]),a=useCallback(function(){i.current=bindEvents(window,[e],{capture:!0,passive:!1})},[e]),s=useCallback(function(){var e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),r(idle$2),i.current(),a())},[a,r]),l=useCallback(function(){var e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[s]),c=useCallback(function(){var e={capture:!0,passive:!1},t={cancel:l,completed:s,getPhase:o},n=bindEvents(window,getHandleBindings(t),e),r=bindEvents(window,getWindowBindings(t),e);i.current=function(){n(),r()}},[l,o,s]),u=useCallback(function(){var e=o(),e=("PENDING"!==e.type&&invariant(!1),e.actions.fluidLift(e.point));r({type:"DRAGGING",actions:e,hasMoved:!1})},[o,r]),d=useCallback(function(e,t){"IDLE"!==o().type&&invariant(!1);var n=setTimeout(u,timeForLongPress);r({type:"PENDING",point:t,actions:e,longPressTimerId:n}),c()},[c,o,r,u]);useIsomorphicLayoutEffect(function(){return a(),function(){i.current();var e=o();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),r(idle$2))}},[o,a,r]),useIsomorphicLayoutEffect(function(){return bindEvents(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}])},[])}var interactiveTagNames={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function isAnInteractiveElement(e,t){var n;return null!=t&&(!!Boolean(interactiveTagNames[t.tagName.toLowerCase()])||"true"===(n=t.getAttribute("contenteditable"))||""===n||t!==e&&isAnInteractiveElement(e,t.parentElement))}function isEventInInteractiveElement(e,t){t=t.target;return!!isHtmlElement(t)&&isAnInteractiveElement(e,t)}var getBorderBoxCenterPosition=function(e){return getRect(e.getBoundingClientRect()).center};function isElement(e){return e instanceof getWindowFromEl(e).Element}var supportedMatchesName=function(){var e="matches";return"undefined"!=typeof document&&find([e,"msMatchesSelector","webkitMatchesSelector"],function(e){return e in Element.prototype})||e}();function closestPonyfill(e,t){return null==e?null:e[supportedMatchesName](t)?e:closestPonyfill(e.parentElement,t)}function closest$1(e,t){return e.closest?e.closest(t):closestPonyfill(e,t)}function getSelector(e){return"["+dragHandle.contextId+'="'+e+'"]'}function findClosestDragHandleFromEvent(e,t){var t=t.target;return isElement(t)&&(t=closest$1(t,getSelector(e)))&&isHtmlElement(t)?t:null}function tryGetClosestDraggableIdFromEvent(e,t){e=findClosestDragHandleFromEvent(e,t);return e?e.getAttribute(dragHandle.draggableId):null}function findDraggable(e,t){e="["+draggable.contextId+'="'+e+'"]',e=find(toArray(document.querySelectorAll(e)),function(e){return e.getAttribute(draggable.id)===t});return e&&isHtmlElement(e)?e:null}function preventDefault(e){e.preventDefault()}function _isActive(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!!r()&&t===n}function canStart(e){var t=e.lockAPI,n=e.store,r=e.registry,e=e.draggableId;return!(t.isClaimed()||!(t=r.draggable.findById(e))||!t.options.isEnabled||!canStartDrag(n.getState(),e))}function tryStart(e){var t,n,r,i,o,a=e.lockAPI,s=e.contextId,l=e.store,c=e.registry,u=e.draggableId,d=e.forceSensorStop,e=e.sourceEvent;return!canStart({lockAPI:a,store:l,registry:c,draggableId:u})||(t=c.draggable.getById(u),!(n=findDraggable(s,t.descriptor.id)))||e&&!t.options.canDragInteractiveElements&&isEventInInteractiveElement(n,e)?null:(r=a.claim(d||noop),i="PRE_DRAG",o=function(e,t){_isActive({expected:e,phase:i,isLockActive:f,shouldWarn:!0})&&l.dispatch(t())}.bind(null,"DRAGGING"),{isActive:function(){return _isActive({expected:"PRE_DRAG",phase:i,isLockActive:f,shouldWarn:!1})},shouldRespectForcePress:p,fluidLift:function(e){var t=rafSchd$1(function(e){o(function(){return move({client:e})})});return _extends({},h({liftActionArgs:{id:u,clientSelection:e,movementMode:"FLUID"},cleanup:function(){return t.cancel()},actions:{move:t}}),{move:t})},snapLift:function(){var e={moveUp:function(){return o(moveUp)},moveRight:function(){return o(moveRight)},moveDown:function(){return o(moveDown)},moveLeft:function(){return o(moveLeft)}};return h({liftActionArgs:{id:u,clientSelection:getBorderBoxCenterPosition(n),movementMode:"SNAP"},cleanup:noop,actions:e})},abort:function(){_isActive({expected:"PRE_DRAG",phase:i,isLockActive:f,shouldWarn:!0})&&a.release()}});function p(){return t.options.shouldRespectForcePress}function f(){return a.isActive(r)}function h(n){function r(){a.release(),i="COMPLETED"}function t(e,t){void 0===t&&(t={shouldBlockNextClick:!1}),n.cleanup(),t.shouldBlockNextClick&&(t=bindEvents(window,[{eventName:"click",fn:preventDefault,options:{once:!0,passive:!1,capture:!0}}]),setTimeout(t)),r(),l.dispatch(drop({reason:e}))}return"PRE_DRAG"!==i&&(r(),"PRE_DRAG"!==i)&&invariant(!1),l.dispatch(lift(n.liftActionArgs)),i="DRAGGING",_extends({isActive:function(){return _isActive({expected:"DRAGGING",phase:i,isLockActive:f,shouldWarn:!1})},shouldRespectForcePress:p,drop:function(e){return t("DROP",e)},cancel:function(e){return t("CANCEL",e)}},n.actions)}}var defaultSensors=[useMouseSensor,useKeyboardSensor,useTouchSensor];function useSensorMarshal(e){for(var r=e.contextId,i=e.store,o=e.registry,t=e.customSensors,e=e.enableDefaultSensors,n=[].concat(e?defaultSensors:[],t||[]),a=react.exports.useState(function(){return create$2()})[0],s=useCallback(function(e,t){e.isDragging&&!t.isDragging&&a.tryAbandon()},[a]),l=(useIsomorphicLayoutEffect(function(){var t=i.getState();return i.subscribe(function(){var e=i.getState();s(t,e),t=e})},[a,i,s]),useIsomorphicLayoutEffect(function(){return a.tryAbandon},[a.tryAbandon]),useCallback(function(e){return canStart({lockAPI:a,registry:o,store:i,draggableId:e})},[a,o,i])),c=useCallback(function(e,t,n){return tryStart({lockAPI:a,registry:o,contextId:r,store:i,draggableId:e,forceSensorStop:t,sourceEvent:n&&n.sourceEvent?n.sourceEvent:null})},[r,a,o,i]),u=useCallback(function(e){return tryGetClosestDraggableIdFromEvent(r,e)},[r]),d=useCallback(function(e){e=o.draggable.findById(e);return e?e.options:null},[o.draggable]),p=useCallback(function(){a.isClaimed()&&(a.tryAbandon(),"IDLE"!==i.getState().phase)&&i.dispatch(flush())},[a,i]),f=useCallback(a.isClaimed,[a]),h=useMemo(function(){return{canGetLock:l,tryGetLock:c,findClosestDraggableId:u,findOptionsForDraggable:d,tryReleaseLock:p,isLockClaimed:f}},[l,c,u,d,p,f]),m=0;m<n.length;m++)n[m](h)}var createResponders=function(e){return{onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}};function getStore(e){return e.current||invariant(!1),e.current}function App$1(e){var t=e.contextId,n=e.setCallbacks,r=e.sensors,i=e.nonce,o=e.dragHandleUsageInstructions,a=react.exports.useRef(null),s=usePrevious(e),l=useCallback(function(){return createResponders(s.current)},[s]),c=useAnnouncer(t),u=useHiddenTextElement({contextId:t,text:o}),d=useStyleMarshal(t,i),p=useCallback(function(e){getStore(a).dispatch(e)},[]),f=useMemo(function(){return bindActionCreators$1({publishWhileDragging:publishWhileDragging,updateDroppableScroll:updateDroppableScroll,updateDroppableIsEnabled:updateDroppableIsEnabled,updateDroppableIsCombineEnabled:updateDroppableIsCombineEnabled,collectionStarting:collectionStarting},p)},[p]),h=useRegistry(),m=useMemo(function(){return createDimensionMarshal(h,f)},[h,f]),g=useMemo(function(){return createAutoScroller(_extends({scrollWindow:scrollWindow,scrollDroppable:m.scrollDroppable},bindActionCreators$1({move:move},p)))},[m.scrollDroppable,p]),v=useFocusMarshal(t),o=useMemo(function(){return createStore({announce:c,autoScroller:g,dimensionMarshal:m,focusMarshal:v,getResponders:l,styleMarshal:d})},[c,g,m,v,l,d]),y=(a.current=o,useCallback(function(){var e=getStore(a);"IDLE"!==e.getState().phase&&e.dispatch(flush())},[])),x=useCallback(function(){var e=getStore(a).getState();return e.isDragging||"DROP_ANIMATING"===e.phase},[]),b=(n(useMemo(function(){return{isDragging:x,tryAbort:y}},[x,y])),useCallback(function(e){return canStartDrag(getStore(a).getState(),e)},[])),C=useCallback(function(){return isMovementAllowed(getStore(a).getState())},[]),i=useMemo(function(){return{marshal:m,focus:v,contextId:t,canLift:b,isMovementAllowed:C,dragHandleUsageInstructionsId:u,registry:h}},[t,m,u,v,b,C,h]);return useSensorMarshal({contextId:t,store:o,registry:h,customSensors:r,enableDefaultSensors:!1!==e.enableDefaultSensors}),react.exports.useEffect(function(){return y},[y]),React.createElement(AppContext.Provider,{value:i},React.createElement(Provider,{context:StoreContext,store:o},e.children))}var count$1=0;function useInstanceCount(){return useMemo(function(){return""+count$1++},[])}function DragDropContext(t){var n=useInstanceCount(),r=t.dragHandleUsageInstructions||preset.dragHandleUsageInstructions;return React.createElement(ErrorBoundary,null,function(e){return React.createElement(App$1,{nonce:t.nonce,contextId:n,setCallbacks:e,dragHandleUsageInstructions:r,enableDefaultSensors:t.enableDefaultSensors,sensors:t.sensors,onBeforeCapture:t.onBeforeCapture,onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragUpdate:t.onDragUpdate,onDragEnd:t.onDragEnd},t.children)})}var isEqual$1=function(t){return function(e){return t===e}},isScroll=isEqual$1("scroll"),isAuto=isEqual$1("auto"),isEither=function(e,t){return t(e.overflowX)||t(e.overflowY)},isElementScrollable=function(e){e=window.getComputedStyle(e),e={overflowX:e.overflowX,overflowY:e.overflowY};return isEither(e,isScroll)||isEither(e,isAuto)},isBodyScrollable=function(){return!1},getClosestScrollable=function e(t){return null==t?null:t===document.body?isBodyScrollable()?t:null:t===document.documentElement?null:isElementScrollable(t)?t:e(t.parentElement)},getScroll$1=function(e){return{x:e.scrollLeft,y:e.scrollTop}},getIsFixed=function e(t){return!!t&&("fixed"===window.getComputedStyle(t).position||e(t.parentElement))},getEnv=function(e){return{closestScrollable:getClosestScrollable(e),isFixedOnPage:getIsFixed(e)}},getDroppableDimension=function(e){var t,n=e.descriptor,r=e.isEnabled,i=e.isCombineEnabled,o=e.isFixedOnPage,a=e.direction,s=e.client,l=e.page,e=e.closest,c=e?(u=e.scrollSize,c=e.client,t=getMaxScroll({scrollHeight:u.scrollHeight,scrollWidth:u.scrollWidth,height:c.paddingBox.height,width:c.paddingBox.width}),{pageMarginBox:e.page.marginBox,frameClient:c,scrollSize:u,shouldClipSubject:e.shouldClipSubject,scroll:{initial:e.scroll,current:e.scroll,max:t,diff:{value:origin,displacement:origin}}}):null,u="vertical"===a?vertical:horizontal;return{descriptor:n,isCombineEnabled:i,isFixedOnPage:o,axis:u,isEnabled:r,client:s,page:l,frame:c,subject:getSubject({page:l,withPlaceholder:null,axis:u,frame:c})}},getClient=function(e,t){var n,r,i=getBox(e);return!t||e!==t?i:(e=i.paddingBox.top-t.scrollTop,n=i.paddingBox.left-t.scrollLeft,r=e+t.scrollHeight,t=n+t.scrollWidth,e=expand({top:e,right:t,bottom:r,left:n},i.border),createBox({borderBox:e,margin:i.margin,border:i.border,padding:i.padding}))},getDimension=function(e){var t,n=e.ref,r=e.descriptor,i=e.env,o=e.windowScroll,a=e.direction,s=e.isDropDisabled,l=e.isCombineEnabled,e=e.shouldClipSubject,c=i.closestScrollable,n=getClient(n,c),u=withScroll(n,o),d=c?(d=getBox(c),t={scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth},{client:d,page:withScroll(d,o),scroll:getScroll$1(c),scrollSize:t,shouldClipSubject:e}):null;return getDroppableDimension({descriptor:r,isEnabled:!s,isCombineEnabled:l,isFixedOnPage:i.isFixedOnPage,direction:a,client:n,page:u,closest:d})},immediate={passive:!1},delayed={passive:!0},getListenerOptions=function(e){return e.shouldPublishImmediately?immediate:delayed};function useRequiredContext(e){e=react.exports.useContext(e);return e||invariant(!1),e}var getClosestScrollableFromDrag=function(e){return e&&e.env.closestScrollable||null};function useDroppablePublisher(e){var o=react.exports.useRef(null),a=useRequiredContext(AppContext),t=useUniqueId("droppable"),n=a.registry,r=a.marshal,s=usePrevious(e),l=useMemo(function(){return{id:e.droppableId,type:e.type,mode:e.mode}},[e.droppableId,e.mode,e.type]),i=react.exports.useRef(l),c=useMemo(function(){return memoizeOne(function(e,t){o.current||invariant(!1),r.updateDroppableScroll(l.id,{x:e,y:t})})},[l.id,r]),u=useCallback(function(){var e=o.current;return e&&e.env.closestScrollable?getScroll$1(e.env.closestScrollable):origin},[]),d=useCallback(function(){var e=u();c(e.x,e.y)},[u,c]),p=useMemo(function(){return rafSchd$1(d)},[d]),f=useCallback(function(){var e=o.current,t=getClosestScrollableFromDrag(e);e&&t||invariant(!1),(e.scrollOptions.shouldPublishImmediately?d:p)()},[p,d]),h=useCallback(function(e,t){o.current&&invariant(!1);var n=s.current,r=n.getDroppableRef(),i=(r||invariant(!1),getEnv(r)),t={ref:r,descriptor:l,env:i,scrollOptions:t},r=(o.current=t,getDimension({ref:r,descriptor:l,env:i,windowScroll:e,direction:n.direction,isDropDisabled:n.isDropDisabled,isCombineEnabled:n.isCombineEnabled,shouldClipSubject:!n.ignoreContainerClipping})),e=i.closestScrollable;return e&&(e.setAttribute(scrollContainer.contextId,a.contextId),e.addEventListener("scroll",f,getListenerOptions(t.scrollOptions))),r},[a.contextId,l,f,s]),m=useCallback(function(){var e=o.current,t=getClosestScrollableFromDrag(e);return e&&t||invariant(!1),getScroll$1(t)},[]),g=useCallback(function(){var e=o.current,t=(e||invariant(!1),getClosestScrollableFromDrag(e));o.current=null,t&&(p.cancel(),t.removeAttribute(scrollContainer.contextId),t.removeEventListener("scroll",f,getListenerOptions(e.scrollOptions)))},[f,p]),v=useCallback(function(e){var t=o.current,t=(t||invariant(!1),getClosestScrollableFromDrag(t));t||invariant(!1),t.scrollTop+=e.y,t.scrollLeft+=e.x},[]),y=useMemo(function(){return{getDimensionAndWatchScroll:h,getScrollWhileDragging:m,dragStopped:g,scroll:v}},[g,h,m,v]),x=useMemo(function(){return{uniqueId:t,descriptor:l,callbacks:y}},[y,l,t]);useIsomorphicLayoutEffect(function(){return i.current=x.descriptor,n.droppable.register(x),function(){o.current&&g(),n.droppable.unregister(x)}},[y,l,g,x,r,n.droppable]),useIsomorphicLayoutEffect(function(){o.current&&r.updateDroppableIsEnabled(i.current.id,!e.isDropDisabled)},[e.isDropDisabled,r]),useIsomorphicLayoutEffect(function(){o.current&&r.updateDroppableIsCombineEnabled(i.current.id,e.isCombineEnabled)},[e.isCombineEnabled,r])}function noop$2(){}var empty={width:0,height:0,margin:noSpacing},getSize=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,e=e.animate;return t||"close"===e?empty:{height:n.client.borderBox.height,width:n.client.borderBox.width,margin:n.client.margin}},getStyle=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,e=e.animate,t=getSize({isAnimatingOpenOnMount:t,placeholder:n,animate:e});return{display:n.display,boxSizing:"border-box",width:t.width,height:t.height,marginTop:t.margin.top,marginRight:t.margin.right,marginBottom:t.margin.bottom,marginLeft:t.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==e?transitions.placeholder:null}};function Placeholder(e){var t=react.exports.useRef(null),n=useCallback(function(){t.current&&(clearTimeout(t.current),t.current=null)},[]),r=e.animate,i=e.onTransitionEnd,o=e.onClose,a=e.contextId,s=react.exports.useState("open"===e.animate),l=s[0],c=s[1],s=(react.exports.useEffect(function(){return l?"open"!==r?(n(),c(!1),noop$2):t.current?noop$2:(t.current=setTimeout(function(){t.current=null,c(!1)}),n):noop$2},[r,l,n]),useCallback(function(e){"height"===e.propertyName&&(i(),"close"===r)&&o()},[r,o,i])),u=getStyle({isAnimatingOpenOnMount:l,animate:e.animate,placeholder:e.placeholder});return React.createElement(e.placeholder.tagName,{style:u,"data-rbd-placeholder-context-id":a,onTransitionEnd:s,ref:e.innerRef})}var Placeholder$1=React.memo(Placeholder),DroppableContext=React.createContext(null),AnimateInOut=function(i){function e(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=i.call.apply(i,[this].concat(n))||this).state={isVisible:Boolean(e.props.on),data:e.props.on,animate:e.props.shouldAnimate&&e.props.on?"open":"none"},e.onClose=function(){"close"===e.state.animate&&e.setState({isVisible:!1})},e}return _inheritsLoose$2(e,i),e.getDerivedStateFromProps=function(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}},e.prototype.render=function(){var e;return this.state.isVisible?(e={onClose:this.onClose,data:this.state.data,animate:this.state.animate},this.props.children(e)):null},e}(React.PureComponent),zIndexOptions={dragging:5e3,dropAnimating:4500},getDraggingTransition=function(e,t){return t?transitions.drop(t.duration):e?transitions.snap:transitions.fluid},getDraggingOpacity=function(e,t){return e?t?combine.opacity.drop:combine.opacity.combining:null},getShouldDraggingAnimate=function(e){return null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode};function getDraggingStyle(e){var t=e.dimension.client,n=e.offset,r=e.combineWith,i=e.dropping,r=Boolean(r),e=getShouldDraggingAnimate(e),o=Boolean(i),n=o?transforms.drop(n,r):transforms.moveTo(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:getDraggingTransition(e,i),transform:n,opacity:getDraggingOpacity(r,o),zIndex:o?zIndexOptions.dropAnimating:zIndexOptions.dragging,pointerEvents:"none"}}function getSecondaryStyle(e){return{transform:transforms.moveTo(e.offset),transition:e.shouldAnimateDisplacement?null:"none"}}function getStyle$1(e){return("DRAGGING"===e.type?getDraggingStyle:getSecondaryStyle)(e)}function getDimension$1(e,t,n){void 0===n&&(n=origin);var r=window.getComputedStyle(t),i=t.getBoundingClientRect(),i=calculateBox(i,r),n=withScroll(i,n);return{descriptor:e,placeholder:{client:i,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:n}}function useDraggablePublisher(e){var t=useUniqueId("draggable"),n=e.descriptor,r=e.registry,i=e.getDraggableRef,o=e.canDragInteractiveElements,a=e.shouldRespectForcePress,s=e.isEnabled,l=useMemo(function(){return{canDragInteractiveElements:o,shouldRespectForcePress:a,isEnabled:s}},[o,s,a]),c=useCallback(function(e){var t=i();return t||invariant(!1),getDimension$1(n,t,e)},[n,i]),u=useMemo(function(){return{uniqueId:t,descriptor:n,options:l,getDimension:c}},[n,c,l,t]),d=react.exports.useRef(u),p=react.exports.useRef(!0);useIsomorphicLayoutEffect(function(){return r.draggable.register(d.current),function(){return r.draggable.unregister(d.current)}},[r.draggable]),useIsomorphicLayoutEffect(function(){var e;p.current?p.current=!1:(e=d.current,d.current=u,r.draggable.update(u,e))},[u,r.draggable])}function preventHtml5Dnd(e){e.preventDefault()}function Draggable(e){var t=react.exports.useRef(null),n=useCallback(function(e){t.current=e},[]),r=useCallback(function(){return t.current},[]),i=useRequiredContext(AppContext),o=i.contextId,a=i.dragHandleUsageInstructionsId,s=i.registry,i=useRequiredContext(DroppableContext),l=i.type,c=i.droppableId,u=useMemo(function(){return{id:e.draggableId,index:e.index,type:l,droppableId:c}},[e.draggableId,e.index,l,c]),i=e.children,d=e.draggableId,p=e.isEnabled,f=e.shouldRespectForcePress,h=e.canDragInteractiveElements,m=e.isClone,g=e.mapped,v=e.dropAnimationFinished,y=(m||useDraggablePublisher(useMemo(function(){return{descriptor:u,registry:s,getDraggableRef:r,canDragInteractiveElements:h,shouldRespectForcePress:f,isEnabled:p}},[u,s,r,h,f,p])),useMemo(function(){return p?{tabIndex:0,role:"button","aria-describedby":a,"data-rbd-drag-handle-draggable-id":d,"data-rbd-drag-handle-context-id":o,draggable:!1,onDragStart:preventHtml5Dnd}:null},[o,a,d,p])),x=useCallback(function(e){"DRAGGING"===g.type&&g.dropping&&"transform"===e.propertyName&&v()},[v,g]),m=useMemo(function(){var e=getStyle$1(g),t="DRAGGING"===g.type&&g.dropping?x:null;return{innerRef:n,draggableProps:{"data-rbd-draggable-context-id":o,"data-rbd-draggable-id":d,style:e,onTransitionEnd:t},dragHandleProps:y}},[o,y,d,g,x,n]),b=useMemo(function(){return{draggableId:u.id,type:u.type,source:{index:u.index,droppableId:u.droppableId}}},[u.droppableId,u.id,u.index,u.type]);return i(m,g.snapshot,b)}var isStrictEqual=function(e,t){return e===t},whatIsDraggedOverFromResult=function(e){var t=e.combine,e=e.destination;return e?e.droppableId:t?t.droppableId:null},getCombineWithFromResult=function(e){return e.combine?e.combine.draggableId:null},getCombineWithFromImpact=function(e){return e.at&&"COMBINE"===e.at.type?e.at.combine.draggableId:null};function getDraggableSelector(){var s=memoizeOne(function(e,t){return{x:e,y:t}}),l=memoizeOne(function(e,t,n,r,i){return{isDragging:!0,isClone:t,isDropAnimating:Boolean(i),dropAnimation:i,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null}}),c=memoizeOne(function(e,t,n,r,i,o,a){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:o,mode:t,offset:e,dimension:n,forceShouldAnimate:a,snapshot:l(t,r,i,o,null)}}});return function(e,t){var n,r,i,o,a;return e.isDragging?e.critical.draggable.id!==t.draggableId?null:(o=e.current.client.offset,n=e.dimensions.draggables[t.draggableId],r=whatIsDraggedOver(e.impact),a=getCombineWithFromImpact(e.impact),i=e.forceShouldAnimate,c(s(o.x,o.y),e.movementMode,n,t.isClone,r,a,i)):"DROP_ANIMATING"!==e.phase||(o=e.completed).result.draggableId!==t.draggableId?null:(n=t.isClone,r=e.dimensions.draggables[t.draggableId],i=(a=o.result).mode,t=whatIsDraggedOverFromResult(a),o=getCombineWithFromResult(a),a={duration:e.dropDuration,curve:curves.drop,moveTo:e.newHomeClientOffset,opacity:o?combine.opacity.drop:null,scale:o?combine.scale.drop:null},{mapped:{type:"DRAGGING",offset:e.newHomeClientOffset,dimension:r,dropping:a,draggingOver:t,combineWith:o,mode:i,forceShouldAnimate:null,snapshot:l(i,n,t,o,a)}})}}function getSecondarySnapshot(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var atRest={mapped:{type:"SECONDARY",offset:origin,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:getSecondarySnapshot(null)}};function getSecondarySelector(){function n(e,t,n,r){var i=n.displaced.visible[e],o=Boolean(r.inVirtualList&&r.effected[e]),a=(a=tryGetCombine(n))&&a.draggableId===e?t:null;return i?o?c(a):(t=n.displacedBy.point,t=s(t.x,t.y),l(t,a,i.shouldAnimate)):o?n.displaced.invisible[e]?null:(t=negate(r.displacedBy.point),i=s(t.x,t.y),l(i,a,!0)):c(a)}var s=memoizeOne(function(e,t){return{x:e,y:t}}),r=memoizeOne(getSecondarySnapshot),l=memoizeOne(function(e,t,n){return{mapped:{type:"SECONDARY",offset:e,combineTargetFor:t=void 0===t?null:t,shouldAnimateDisplacement:n,snapshot:r(t)}}}),c=function(e){return e?l(origin,e,!0):null};return function(e,t){return e.isDragging?e.critical.draggable.id===t.draggableId?null:n(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical):"DROP_ANIMATING"!==e.phase||(e=e.completed).result.draggableId===t.draggableId?null:n(t.draggableId,e.result.draggableId,e.impact,e.afterCritical)}}var makeMapStateToProps=function(){var n=getDraggableSelector(),r=getSecondarySelector();return function(e,t){return n(e,t)||r(e,t)||atRest}},mapDispatchToProps={dropAnimationFinished:dropAnimationFinished},ConnectedDraggable=connect(makeMapStateToProps,mapDispatchToProps,null,{context:StoreContext,pure:!0,areStatePropsEqual:isStrictEqual})(Draggable);function PrivateDraggable(e){return useRequiredContext(DroppableContext).isUsingCloneFor!==e.draggableId||e.isClone?React.createElement(ConnectedDraggable,e):null}function PublicDraggable(e){var t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return React.createElement(PrivateDraggable,_extends({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}function Droppable(e){var n,r,t=react.exports.useContext(AppContext),i=(t||invariant(!1),t.contextId),o=t.isMovementAllowed,a=react.exports.useRef(null),s=react.exports.useRef(null),t=e.children,l=e.droppableId,c=e.type,u=e.mode,d=e.direction,p=e.ignoreContainerClipping,f=e.isDropDisabled,h=e.isCombineEnabled,m=e.snapshot,g=e.useClone,v=e.updateViewportMaxScroll,y=e.getContainerForClone,x=useCallback(function(){return a.current},[]),b=useCallback(function(e){a.current=e},[]),C=(useCallback(function(){return s.current},[]),useCallback(function(e){s.current=e},[])),$=useCallback(function(){o()&&v({maxScroll:getMaxWindowScroll()})},[o,v]),w=(useDroppablePublisher({droppableId:l,type:c,mode:u,direction:d,isDropDisabled:f,isCombineEnabled:h,ignoreContainerClipping:p,getDroppableRef:x}),React.createElement(AnimateInOut,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(e){var t=e.onClose,n=e.data,e=e.animate;return React.createElement(Placeholder$1,{placeholder:n,onClose:t,innerRef:C,animate:e,contextId:i,onTransitionEnd:$})})),u=useMemo(function(){return{innerRef:b,placeholder:w,droppableProps:{"data-rbd-droppable-id":l,"data-rbd-droppable-context-id":i}}},[i,l,w,b]),S=g?g.dragging.draggableId:null,d=useMemo(function(){return{droppableId:l,type:c,isUsingCloneFor:S}},[l,S,c]);return React.createElement(DroppableContext.Provider,{value:d},t(u,m),g?(n=g.dragging,r=g.render,f=React.createElement(PrivateDraggable,{draggableId:n.draggableId,index:n.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(e,t){return r(e,t,n)}),ReactDOM.createPortal(f,y())):null)}var isMatchingType=function(e,t){return e===t.droppable.type},getDraggable=function(e,t){return t.draggables[e.draggable.id]},makeMapStateToProps$1=function(){var s={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},l=_extends({},s,{shouldAnimatePlaceholder:!1}),c=memoizeOne(function(e){return{draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}}}),u=memoizeOne(function(e,t,n,r,i,o){var a=i.descriptor.id;return i.descriptor.droppableId===e?(e=o?{render:o,dragging:c(i.descriptor)}:null,{placeholder:i.placeholder,shouldAnimatePlaceholder:!1,snapshot:{isDraggingOver:n,draggingOverWith:n?a:null,draggingFromThisWith:a,isUsingPlaceholder:!0},useClone:e}):t?r?{placeholder:i.placeholder,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:n,draggingOverWith:a,draggingFromThisWith:null,isUsingPlaceholder:!0},useClone:null}:s:l});return function(e,t){var n,r,i=t.droppableId,o=t.type,a=!t.isDropDisabled,t=t.renderClone;return e.isDragging?(r=e.critical,isMatchingType(o,r)?(r=getDraggable(r,e.dimensions),n=whatIsDraggedOver(e.impact)===i,u(i,a,n,n,r,t)):l):"DROP_ANIMATING"===e.phase?(n=e.completed,isMatchingType(o,n.critical)?(r=getDraggable(n.critical,e.dimensions),u(i,a,whatIsDraggedOverFromResult(n.result)===i,whatIsDraggedOver(n.impact)===i,r,t)):l):"IDLE"===e.phase&&e.completed&&!e.shouldFlush&&(a=e.completed,isMatchingType(o,a.critical))?(n=whatIsDraggedOver(a.impact)===i,r=Boolean(a.impact.at&&"COMBINE"===a.impact.at.type),t=a.critical.droppable.id===i,n?r?s:l:t?s:l):l}},mapDispatchToProps$1={updateViewportMaxScroll:updateViewportMaxScroll};function getBody(){return document.body||invariant(!1),document.body}var defaultProps={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:getBody},ConnectedDroppable=connect(makeMapStateToProps$1,mapDispatchToProps$1,null,{context:StoreContext,pure:!0,areStatePropsEqual:isStrictEqual})(Droppable),naturalDragAnimationRbdnd=(ConnectedDroppable.defaultProps=defaultProps,{exports:{}}),NaturalDragAnimation=(!function(){function i(e){var t;return(o[e]||(t=o[e]={i:e,l:!1,exports:{}},r[e].call(t.exports,t,t.exports,i),t.l=!0,t)).exports}var n,r,o;window,naturalDragAnimationRbdnd.exports=(n=react.exports,r=[function(e,t,n){e.exports=n(4)()},function(e,t){e.exports=n},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var l,r=n(1),i=n.n(r),o=n(0),n=n.n(o);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach(function(e){m(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t,n=h(r);return e=i?(e=h(this).constructor,Reflect.construct(n,arguments,e)):n.apply(this,arguments),n=this,!(t=e)||"object"!==a(t)&&"function"!=typeof t?f(n):t}}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}var g={transform:null,prevX:0,rotation:0},o=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e);var o=p(s);function s(){var a,e=this,t=s;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return m(f(a=o.call.apply(o,[this].concat(r))),"state",c({},g)),m(f(a),"patchTransform",function(){var e,t=a.props,n=t.snapshot.isDragging,r=t.style,i=t.animationRotationFade,o=t.rotationMultiplier,t=t.sigmoidFunction;n&&r.transform?(e=(n=r.transform.match(/translate\(.{1,}\)/g)[0].match(/-?[0-9]{1,}/g)[0])-a.state.prevX,i=a.state.rotation*i+t(e)*o,t="".concat(r.transform," rotate(").concat(i,"deg)"),Math.abs(i)<.01&&(i=0),a.setState({transform:t,prevX:n,rotation:i},function(){l=requestAnimationFrame(a.patchTransform)})):l=requestAnimationFrame(a.patchTransform)}),a}return t=[{key:"getDerivedStateFromProps",value:function(e,t){return e.snapshot.dropAnimation&&t.transform?c({},g):null}}],u((e=s).prototype,[{key:"componentDidMount",value:function(){this.props.snapshot.isDragging&&(l=requestAnimationFrame(this.patchTransform))}},{key:"componentDidUpdate",value:function(e){!e.snapshot.isDragging&&this.props.snapshot.isDragging&&(l=requestAnimationFrame(this.patchTransform)),e.snapshot.isDragging&&!this.props.snapshot.isDragging&&cancelAnimationFrame(l)}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(l)}},{key:"render",value:function(){var e=this.props.snapshot,t=e.isDragging,e=e.dropAnimation,t=t&&!e?c(c({},this.props.style),{},{transform:this.state.transform}):this.props.style;return i.a.createElement(r.Fragment,null,this.props.children(t))}}]),u(e,t),s}(r.Component);m(o,"propTypes",{snapshot:n.a.shape({isDragging:n.a.bool.isRequired,dropAnimation:n.a.shape()}).isRequired,style:n.a.shape().isRequired,children:n.a.func.isRequired,animationRotationFade:n.a.number,rotationMultiplier:n.a.number,sigmoidFunction:n.a.func}),m(o,"defaultProps",{animationRotationFade:.9,rotationMultiplier:1.3,sigmoidFunction:function(e){return e/(1+Math.abs(e))}}),t.default=o},function(e,t,n){var a=n(5);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,o){if(o!==a)throw(o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")).name="Invariant Violation",o}function t(){return e}var n={array:e.isRequired=e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n}},function(e,t,n){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}],o={},i.m=r,i.c=o,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i(i.s=2))}(),getDefaultExportFromCjs(naturalDragAnimationRbdnd.exports));function getLoadingButtonUtilityClass(e){return generateUtilityClass("MuiLoadingButton",e)}const loadingButtonClasses=generateUtilityClasses("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]);var loadingButtonClasses$1=loadingButtonClasses;const _excluded=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],useUtilityClasses=e=>{var{loading:e,loadingPosition:t,classes:n}=e;return _extends({},n,composeClasses({root:["root",e&&"loading"],startIcon:[e&&"startIconLoading"+capitalize$2(t)],endIcon:[e&&"endIconLoading"+capitalize$2(t)],loadingIndicator:["loadingIndicator",e&&"loadingIndicator"+capitalize$2(t)]},getLoadingButtonUtilityClass,n))},rootShouldForwardProp=e=>"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e&&"classes"!==e,LoadingButtonRoot=styled$1(Button$1,{shouldForwardProp:e=>rootShouldForwardProp(e)||"classes"===e,name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{["& ."+loadingButtonClasses$1.startIconLoadingStart]:t.startIconLoadingStart},t.endIconLoadingEnd&&{["& ."+loadingButtonClasses$1.endIconLoadingEnd]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>_extends({[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},"center"===e.loadingPosition&&{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),["&."+loadingButtonClasses$1.loading]:{color:"transparent"}},"start"===e.loadingPosition&&e.fullWidth&&{[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},"end"===e.loadingPosition&&e.fullWidth&&{[`& .${loadingButtonClasses$1.startIconLoadingStart}, & .`+loadingButtonClasses$1.endIconLoadingEnd]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),LoadingButtonLoadingIndicator=styled$1("div",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{e=e.ownerState;return[t.loadingIndicator,t["loadingIndicator"+capitalize$2(e.loadingPosition)]]}})(({theme:e,ownerState:t})=>_extends({position:"absolute",visibility:"visible",display:"flex"},"start"===t.loadingPosition&&("outlined"===t.variant||"contained"===t.variant)&&{left:"small"===t.size?10:14},"start"===t.loadingPosition&&"text"===t.variant&&{left:6},"center"===t.loadingPosition&&{left:"50%",transform:"translate(-50%)",color:e.palette.action.disabled},"end"===t.loadingPosition&&("outlined"===t.variant||"contained"===t.variant)&&{right:"small"===t.size?10:14},"end"===t.loadingPosition&&"text"===t.variant&&{right:6},"start"===t.loadingPosition&&t.fullWidth&&{position:"relative",left:-10},"end"===t.loadingPosition&&t.fullWidth&&{position:"relative",right:-10})),LoadingButton=react.exports.forwardRef(function(e,t){var e=useThemeProps({props:e,name:"MuiLoadingButton"}),{children:n,disabled:r=!1,id:i,loading:o=!1,loadingIndicator:a,loadingPosition:s="center",variant:l="text"}=e,c=_objectWithoutPropertiesLoose$2(e,_excluded),i=useId(i),a=null!=a?a:jsxRuntime.exports.jsx(CircularProgress$1,{"aria-labelledby":i,color:"inherit",size:16}),e=_extends({},e,{disabled:r,loading:o,loadingIndicator:a,loadingPosition:s,variant:l}),s=useUtilityClasses(e);return jsxRuntime.exports.jsx(LoadingButtonRoot,_extends({disabled:r||o,id:i,ref:t},c,{variant:l,classes:s,ownerState:e,children:"end"===e.loadingPosition?jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[n,o&&jsxRuntime.exports.jsx(LoadingButtonLoadingIndicator,{className:s.loadingIndicator,ownerState:e,children:a})]}):jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[o&&jsxRuntime.exports.jsx(LoadingButtonLoadingIndicator,{className:s.loadingIndicator,ownerState:e,children:a}),n]})}))});var LoadingButton$1=LoadingButton,Link={},_interopRequireDefault$1=interopRequireDefault.exports,default_1$1=(Object.defineProperty(Link,"__esModule",{value:!0}),Link.default=void 0),_createSvgIcon$1=_interopRequireDefault$1(createSvgIcon),_jsxRuntime$1=jsxRuntime.exports,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"}),"Link"),default_1$1=Link.default=_default$1,cropper={exports:{}},Cropper=(!function(){function N(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function P(r){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?N(Object(i),!0).forEach(function(e){var t,n;t=r,n=i[e=e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):N(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}function D(e){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function V(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function F(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?r(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(e){return"number"==typeof e&&!ie(e)}function i(e){return void 0===e}function o(e){return"object"===D(e)&&null!==e}function f(e){if(!o(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&ae.call(n,"isPrototypeOf")}catch(e){return!1}}function c(e){return"function"==typeof e}function H(e){return Array.from?Array.from(e):se.call(e)}function E(n,r){return n&&c(r)&&(Array.isArray(n)||p(n.length)?H(n).forEach(function(e,t){r.call(n,e,t,n)}):o(n)&&Object.keys(n).forEach(function(e){r.call(n,n[e],e,n)})),n}function j(e,t){var n=1<arguments.length&&void 0!==t?t:1e11;return le.test(e)?Math.round(e*n)/n:e}function h(e,t){var n=e.style;E(t,function(e,t){ce.test(t)&&p(e)&&(e="".concat(e,"px")),n[t]=e})}function u(e,t){var n;t&&(p(e.length)?E(e,function(e){u(e,t)}):e.classList?e.classList.add(t):(n=e.className.trim())?n.indexOf(t)<0&&(e.className="".concat(n," ").concat(t)):e.className=t)}function _(e,t){t&&(p(e.length)?E(e,function(e){_(e,t)}):e.classList?e.classList.remove(t):0<=e.className.indexOf(t)&&(e.className=e.className.replace(t,"")))}function a(e,t,n){t&&(p(e.length)?E(e,function(e){a(e,t,n)}):(n?u:_)(e,t))}function s(e){return e.replace(ue,"$1-$2").toLowerCase()}function B(e,t){return o(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(s(t)))}function d(e,t,n){o(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat(s(t)),n)}function l(n,e,r,t){var i=3<arguments.length&&void 0!==t?t:{},o=r;e.trim().split(de).forEach(function(e){var t;pe||(t=n.listeners)&&t[e]&&t[e][r]&&(o=t[e][r],delete t[e][r],0===Object.keys(t[e]).length&&delete t[e],0===Object.keys(t).length)&&delete n.listeners,n.removeEventListener(e,o,i)})}function m(o,e,a,t){var s=3<arguments.length&&void 0!==t?t:{},l=a;e.trim().split(de).forEach(function(r){var e,i;s.once&&!pe&&(e=o.listeners,l=function(){delete i[r][a],o.removeEventListener(r,l,s);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];a.apply(o,t)},(i=void 0===e?{}:e)[r]||(i[r]={}),i[r][a]&&o.removeEventListener(r,i[r][a],s),i[r][a]=l,o.listeners=i),o.addEventListener(r,l,s)})}function g(e,t,n){var r;return c(Event)&&c(CustomEvent)?r=new CustomEvent(t,{detail:n,bubbles:!0,cancelable:!0}):(r=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,n),e.dispatchEvent(r)}function U(e){e=e.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}function Z(e){e=e.match(fe);return null!==e&&(e[1]!==t.protocol||e[2]!==t.hostname||e[3]!==t.port)}function W(e){var t="timestamp=".concat((new Date).getTime());return e+(-1===e.indexOf("?")?"?":"&")+t}function v(e){var t=e.rotate,n=e.scaleX,r=e.scaleY,i=e.translateX,e=e.translateY,o=[],i=(p(i)&&0!==i&&o.push("translateX(".concat(i,"px)")),p(e)&&0!==e&&o.push("translateY(".concat(e,"px)")),p(t)&&0!==t&&o.push("rotate(".concat(t,"deg)")),p(n)&&1!==n&&o.push("scaleX(".concat(n,")")),p(r)&&1!==r&&o.push("scaleY(".concat(r,")")),o.length?o.join(" "):"none");return{WebkitTransform:i,msTransform:i,transform:i}}function y(e,t){var n=e.pageX,e=e.pageY,r={endX:n,endY:e};return t?r:P({startX:n,startY:e},r)}function I(e,t){var n,r=e.aspectRatio,i=e.height,o=e.width,a=1<arguments.length&&void 0!==t?t:"contain",s=oe(o),l=oe(i);return s&&l?(n=i*r,"contain"===a&&o<n||"cover"===a&&n<o?i=o/r:o=i*r):s?i=o/r:l&&(o=i*r),{width:o,height:i}}var x,b,C,$,z,T,G,q,w,S,R,O,L,M,A,K,Y,Q,X,J,ee,te,ne,re,ie,oe,ae,se,k,le,ce,ue,de,pe,t,fe,he,me,e,n,ge,ve,ye,xe,be,Ce;cropper.exports=(x="undefined"!=typeof window&&void 0!==window.document,b=x?window:{},n=!(!x||!b.document.documentElement)&&"ontouchstart"in b.document.documentElement,e=x&&"PointerEvent"in b,$="".concat(C="cropper","-crop"),z="".concat(C,"-disabled"),T="".concat(C,"-hidden"),G="".concat(C,"-hide"),q="".concat(C,"-invisible"),w="".concat(C,"-modal"),S="".concat(C,"-move"),R="".concat(C,"Action"),O="".concat(C,"Preview"),L="cropend",M="cropmove",A="cropstart",K=e?"pointerdown":n?"touchstart":"mousedown",Y=e?"pointermove":n?"touchmove":"mousemove",Q=e?"pointerup pointercancel":n?"touchend touchcancel":"mouseup",X="image/jpeg",J=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,ee=/^data:/,te=/^data:image\/jpeg;base64,/,ne=/^img|canvas$/i,re={viewMode:0,dragMode:"crop",initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},ie=Number.isNaN||b.isNaN,oe=function(e){return 0<e&&e<1/0},ae=Object.prototype.hasOwnProperty,se=Array.prototype.slice,k=Object.assign||function(n){for(var e=arguments.length,t=new Array(1<e?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return o(n)&&0<t.length&&t.forEach(function(t){o(t)&&Object.keys(t).forEach(function(e){n[e]=t[e]})}),n},le=/\.\d*(?:0|9){12}\d*$/,ce=/^width|height|left|top|marginLeft|marginTop$/,ue=/([a-z\d])([A-Z])/g,de=/\s\s*/,pe=function(){var t,e,n,r=!1;return x&&(t=!1,e=function(){},n=Object.defineProperty({},"once",{get:function(){return r=!0,t},set:function(e){t=e}}),b.addEventListener("test",e,n),b.removeEventListener("test",e,n)),r}(),t=b.location,fe=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i,he=String.fromCharCode,me=/^data:.*,/,e={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var e=this.element,t=this.options,n=this.container,r=this.cropper,i=Number(t.minContainerWidth),t=Number(t.minContainerHeight),i=(u(r,T),_(e,T),{width:Math.max(n.offsetWidth,0<=i?i:200),height:Math.max(n.offsetHeight,0<=t?t:100)});h(r,{width:(this.containerData=i).width,height:i.height}),u(e,T),_(r,T)},initCanvas:function(){var e=this.containerData,t=this.imageData,n=this.options.viewMode,r=Math.abs(t.rotate)%180==90,i=r?t.naturalHeight:t.naturalWidth,r=r?t.naturalWidth:t.naturalHeight,t=i/r,o=e.width,a=e.height,t=(e.height*t>e.width?3===n?o=e.height*t:a=e.width/t:3===n?a=e.width/t:o=e.height*t,{aspectRatio:t,naturalWidth:i,naturalHeight:r,width:o,height:a});this.canvasData=t,this.limited=1===n||2===n,this.limitCanvas(!0,!0),t.width=Math.min(Math.max(t.width,t.minWidth),t.maxWidth),t.height=Math.min(Math.max(t.height,t.minHeight),t.maxHeight),t.left=(e.width-t.width)/2,t.top=(e.height-t.height)/2,t.oldLeft=t.left,t.oldTop=t.top,this.initialCanvasData=k({},t)},limitCanvas:function(e,t){var n=this.options,r=this.containerData,i=this.canvasData,o=this.cropBoxData,a=n.viewMode,s=i.aspectRatio,l=this.cropped&&o;e&&(e=Number(n.minCanvasWidth)||0,n=Number(n.minCanvasHeight)||0,1<a?(e=Math.max(e,r.width),n=Math.max(n,r.height),3===a&&(e<n*s?e=n*s:n=e/s)):0<a&&(e?e=Math.max(e,l?o.width:0):n?n=Math.max(n,l?o.height:0):l&&((e=o.width)<(n=o.height)*s?e=n*s:n=e/s)),e=(s=I({aspectRatio:s,width:e,height:n})).width,n=s.height,i.minWidth=e,i.minHeight=n,i.maxWidth=1/0,i.maxHeight=1/0),t&&((l?0:1)<a?(s=r.width-i.width,e=r.height-i.height,i.minLeft=Math.min(0,s),i.minTop=Math.min(0,e),i.maxLeft=Math.max(0,s),i.maxTop=Math.max(0,e),l&&this.limited&&(i.minLeft=Math.min(o.left,o.left+(o.width-i.width)),i.minTop=Math.min(o.top,o.top+(o.height-i.height)),i.maxLeft=o.left,i.maxTop=o.top,2===a)&&(i.width>=r.width&&(i.minLeft=Math.min(0,s),i.maxLeft=Math.max(0,s)),i.height>=r.height)&&(i.minTop=Math.min(0,e),i.maxTop=Math.max(0,e))):(i.minLeft=-i.width,i.minTop=-i.height,i.maxLeft=r.width,i.maxTop=r.height))},renderCanvas:function(e,t){var n,r,i=this.canvasData,o=this.imageData;t&&(o=(t=function(e){var t=e.width,n=e.height,e=e.degree;if(90==(e=Math.abs(e)%180))return{width:n,height:t};var r=e%90*Math.PI/180,i=Math.sin(r),r=Math.cos(r),o=t*r+n*i,t=t*i+n*r;return 90<e?{width:t,height:o}:{width:o,height:t}}({width:o.naturalWidth*Math.abs(o.scaleX||1),height:o.naturalHeight*Math.abs(o.scaleY||1),degree:o.rotate||0})).width,t=t.height,n=i.width*(o/i.naturalWidth),r=i.height*(t/i.naturalHeight),i.left-=(n-i.width)/2,i.top-=(r-i.height)/2,i.width=n,i.height=r,i.aspectRatio=o/t,i.naturalWidth=o,i.naturalHeight=t,this.limitCanvas(!0,!1)),(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,h(this.canvas,k({width:i.width,height:i.height},v({translateX:i.left,translateY:i.top}))),this.renderImage(e),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(e){var t=this.canvasData,n=this.imageData,r=n.naturalWidth*(t.width/t.naturalWidth),i=n.naturalHeight*(t.height/t.naturalHeight);k(n,{width:r,height:i,left:(t.width-r)/2,top:(t.height-i)/2}),h(this.image,k({width:n.width,height:n.height},v(k({translateX:n.left,translateY:n.top},n)))),e&&this.output()},initCropBox:function(){var e=this.options,t=this.canvasData,n=e.aspectRatio||e.initialAspectRatio,e=Number(e.autoCropArea)||.8,r={width:t.width,height:t.height};n&&(t.height*n>t.width?r.height=r.width/n:r.width=r.height*n),this.cropBoxData=r,this.limitCropBox(!0,!0),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),r.width=Math.max(r.minWidth,r.width*e),r.height=Math.max(r.minHeight,r.height*e),r.left=t.left+(t.width-r.width)/2,r.top=t.top+(t.height-r.height)/2,r.oldLeft=r.left,r.oldTop=r.top,this.initialCropBoxData=k({},r)},limitCropBox:function(e,t){var n,r,i=this.options,o=this.containerData,a=this.canvasData,s=this.cropBoxData,l=this.limited,c=i.aspectRatio;e&&(e=Number(i.minCropBoxWidth)||0,i=Number(i.minCropBoxHeight)||0,n=l?Math.min(o.width,a.width,a.width+a.left,o.width-a.left):o.width,r=l?Math.min(o.height,a.height,a.height+a.top,o.height-a.top):o.height,e=Math.min(e,o.width),i=Math.min(i,o.height),c&&(e&&i?e<i*c?i=e/c:e=i*c:e?i=e/c:i&&(e=i*c),n<r*c?r=n/c:n=r*c),s.minWidth=Math.min(e,n),s.minHeight=Math.min(i,r),s.maxWidth=n,s.maxHeight=r),t&&(l?(s.minLeft=Math.max(0,a.left),s.minTop=Math.max(0,a.top),s.maxLeft=Math.min(o.width,a.left+a.width)-s.width,s.maxTop=Math.min(o.height,a.top+a.height)-s.height):(s.minLeft=0,s.minTop=0,s.maxLeft=o.width-s.width,s.maxTop=o.height-s.height))},renderCropBox:function(){var e=this.options,t=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCropBox(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,e.movable&&e.cropBoxMovable&&d(this.face,R,n.width>=t.width&&n.height>=t.height?"move":"all"),h(this.cropBox,k({width:n.width,height:n.height},v({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),g(this.element,"crop",this.getData())}},n={initPreview:function(){var e=this.element,n=this.crossOrigin,t=this.options.preview,r=n?this.crossOriginUrl:this.url,i=e.alt||"The image to preview",o=document.createElement("img");n&&(o.crossOrigin=n),o.src=r,o.alt=i,this.viewBox.appendChild(o),this.viewBoxImage=o,t&&("string"==typeof(o=t)?o=e.ownerDocument.querySelectorAll(t):t.querySelector&&(o=[t]),E(this.previews=o,function(e){var t=document.createElement("img");d(e,O,{width:e.offsetWidth,height:e.offsetHeight,html:e.innerHTML}),n&&(t.crossOrigin=n),t.src=r,t.alt=i,t.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',e.innerHTML="",e.appendChild(t)}))},resetPreview:function(){E(this.previews,function(t){var n=B(t,O),n=(h(t,{width:n.width,height:n.height}),t.innerHTML=n.html,t),t=O;if(o(n[t]))try{delete n[t]}catch(e){n[t]=void 0}else if(n.dataset)try{delete n.dataset[t]}catch(e){n.dataset[t]=void 0}else n.removeAttribute("data-".concat(s(t)))})},preview:function(){var a=this.imageData,e=this.canvasData,t=this.cropBoxData,s=t.width,l=t.height,c=a.width,u=a.height,d=t.left-e.left-a.left,p=t.top-e.top-a.top;this.cropped&&!this.disabled&&(h(this.viewBoxImage,k({width:c,height:u},v(k({translateX:-d,translateY:-p},a)))),E(this.previews,function(e){var t=B(e,O),n=t.width,t=t.height,r=n,i=t,o=1;s&&(i=l*(o=n/s)),l&&t<i&&(r=s*(o=t/l),i=t),h(e,{width:r,height:i}),h(e.getElementsByTagName("img")[0],k({width:c*o,height:u*o},v(k({translateX:-d*o,translateY:-p*o},a))))}))}},ge={bind:function(){var e=this.element,t=this.options,n=this.cropper;c(t.cropstart)&&m(e,A,t.cropstart),c(t.cropmove)&&m(e,M,t.cropmove),c(t.cropend)&&m(e,L,t.cropend),c(t.crop)&&m(e,"crop",t.crop),c(t.zoom)&&m(e,"zoom",t.zoom),m(n,K,this.onCropStart=this.cropStart.bind(this)),t.zoomable&&t.zoomOnWheel&&m(n,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&m(n,"dblclick",this.onDblclick=this.dblclick.bind(this)),m(e.ownerDocument,Y,this.onCropMove=this.cropMove.bind(this)),m(e.ownerDocument,Q,this.onCropEnd=this.cropEnd.bind(this)),t.responsive&&m(window,"resize",this.onResize=this.resize.bind(this))},unbind:function(){var e=this.element,t=this.options,n=this.cropper;c(t.cropstart)&&l(e,A,t.cropstart),c(t.cropmove)&&l(e,M,t.cropmove),c(t.cropend)&&l(e,L,t.cropend),c(t.crop)&&l(e,"crop",t.crop),c(t.zoom)&&l(e,"zoom",t.zoom),l(n,K,this.onCropStart),t.zoomable&&t.zoomOnWheel&&l(n,"wheel",this.onWheel,{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&l(n,"dblclick",this.onDblclick),l(e.ownerDocument,Y,this.onCropMove),l(e.ownerDocument,Q,this.onCropEnd),t.responsive&&l(window,"resize",this.onResize)}},ve={resize:function(){var e,t,n,r,i,o,a;this.disabled||(e=this.options,r=this.container,t=this.containerData,n=r.offsetWidth/t.width,r=r.offsetHeight/t.height,1!=(i=Math.abs(n-1)>Math.abs(r-1)?n:r)&&(e.restore&&(o=this.getCanvasData(),a=this.getCropBoxData()),this.render(),e.restore)&&(this.setCanvasData(E(o,function(e,t){o[t]=e*i})),this.setCropBoxData(E(a,function(e,t){a[t]=e*i}))))},dblclick:function(){var e,t;this.disabled||"none"===this.options.dragMode||this.setDragMode((e=this.dragBox,t=$,(e.classList?e.classList.contains(t):-1<e.className.indexOf(t))?"move":"crop"))},wheel:function(e){var t=this,n=Number(this.options.wheelZoomRatio)||.1,r=1;this.disabled||(e.preventDefault(),this.wheeling)||(this.wheeling=!0,setTimeout(function(){t.wheeling=!1},50),e.deltaY?r=0<e.deltaY?1:-1:e.wheelDelta?r=-e.wheelDelta/120:e.detail&&(r=0<e.detail?1:-1),this.zoom(-r*n,e))},cropStart:function(e){var t,n=e.buttons,r=e.button;this.disabled||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(p(n)&&1!==n||p(r)&&0!==r||e.ctrlKey)||(n=this.options,t=this.pointers,e.changedTouches?E(e.changedTouches,function(e){t[e.identifier]=y(e)}):t[e.pointerId||0]=y(e),r=1<Object.keys(t).length&&n.zoomable&&n.zoomOnTouch?"zoom":B(e.target,R),J.test(r)&&!1!==g(this.element,A,{originalEvent:e,action:r})&&(e.preventDefault(),this.action=r,this.cropping=!1,"crop"===r)&&(this.cropping=!0,u(this.dragBox,w)))},cropMove:function(e){var t,n=this.action;!this.disabled&&n&&(t=this.pointers,e.preventDefault(),!1!==g(this.element,M,{originalEvent:e,action:n}))&&(e.changedTouches?E(e.changedTouches,function(e){k(t[e.identifier]||{},y(e,!0))}):k(t[e.pointerId||0]||{},y(e,!0)),this.change(e))},cropEnd:function(e){var t,n;this.disabled||(t=this.action,n=this.pointers,e.changedTouches?E(e.changedTouches,function(e){delete n[e.identifier]}):delete n[e.pointerId||0],t&&(e.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,a(this.dragBox,w,this.cropped&&this.options.modal)),g(this.element,L,{originalEvent:e,action:t})))}},ye={change:function(e){function t(e){switch(e){case"e":g+S.x>b&&(S.x=b-g);break;case"w":p+S.x<y&&(S.x=y-p);break;case"n":f+S.y<x&&(S.y=x-f);break;case"s":v+S.y>C&&(S.y=C-v)}}var n,r,o,i=this.options,a=this.canvasData,s=this.containerData,l=this.cropBoxData,c=this.pointers,u=this.action,d=i.aspectRatio,p=l.left,f=l.top,h=l.width,m=l.height,g=p+h,v=f+m,y=0,x=0,b=s.width,C=s.height,$=!0,w=(!d&&e.shiftKey&&(d=h&&m?h/m:1),this.limited&&(y=l.minLeft,x=l.minTop,b=y+Math.min(s.width,a.width,a.left+a.width),C=x+Math.min(s.height,a.height,a.top+a.height)),c[Object.keys(c)[0]]),S={x:w.endX-w.startX,y:w.endY-w.startY};switch(u){case"all":p+=S.x,f+=S.y;break;case"e":0<=S.x&&(b<=g||d&&(f<=x||C<=v))?$=!1:(t("e"),(h+=S.x)<0&&(u="w",p-=h=-h),d&&(f+=(l.height-(m=h/d))/2));break;case"n":S.y<=0&&(f<=x||d&&(p<=y||b<=g))?$=!1:(t("n"),m-=S.y,f+=S.y,m<0&&(u="s",f-=m=-m),d&&(p+=(l.width-(h=m*d))/2));break;case"w":S.x<=0&&(p<=y||d&&(f<=x||C<=v))?$=!1:(t("w"),h-=S.x,p+=S.x,h<0&&(u="e",p-=h=-h),d&&(f+=(l.height-(m=h/d))/2));break;case"s":0<=S.y&&(C<=v||d&&(p<=y||b<=g))?$=!1:(t("s"),(m+=S.y)<0&&(u="n",f-=m=-m),d&&(p+=(l.width-(h=m*d))/2));break;case"ne":if(d){if(S.y<=0&&(f<=x||b<=g)){$=!1;break}t("n"),m-=S.y,f+=S.y,h=m*d}else t("n"),t("e"),!(0<=S.x)||g<b?h+=S.x:S.y<=0&&f<=x&&($=!1),(!(S.y<=0)||x<f)&&(m-=S.y,f+=S.y);h<0&&m<0?(u="sw",f-=m=-m,p-=h=-h):h<0?(u="nw",p-=h=-h):m<0&&(u="se",f-=m=-m);break;case"nw":if(d){if(S.y<=0&&(f<=x||p<=y)){$=!1;break}t("n"),m-=S.y,f+=S.y,p+=l.width-(h=m*d)}else t("n"),t("w"),!(S.x<=0)||y<p?(h-=S.x,p+=S.x):S.y<=0&&f<=x&&($=!1),(!(S.y<=0)||x<f)&&(m-=S.y,f+=S.y);h<0&&m<0?(u="se",f-=m=-m,p-=h=-h):h<0?(u="ne",p-=h=-h):m<0&&(u="sw",f-=m=-m);break;case"sw":if(d){if(S.x<=0&&(p<=y||C<=v)){$=!1;break}t("w"),h-=S.x,p+=S.x,m=h/d}else t("s"),t("w"),!(S.x<=0)||y<p?(h-=S.x,p+=S.x):0<=S.y&&C<=v&&($=!1),(!(0<=S.y)||v<C)&&(m+=S.y);h<0&&m<0?(u="ne",f-=m=-m,p-=h=-h):h<0?(u="se",p-=h=-h):m<0&&(u="nw",f-=m=-m);break;case"se":if(d){if(0<=S.x&&(b<=g||C<=v)){$=!1;break}t("e"),m=(h+=S.x)/d}else t("s"),t("e"),!(0<=S.x)||g<b?h+=S.x:0<=S.y&&C<=v&&($=!1),(!(0<=S.y)||v<C)&&(m+=S.y);h<0&&m<0?(u="nw",f-=m=-m,p-=h=-h):h<0?(u="sw",p-=h=-h):m<0&&(u="ne",f-=m=-m);break;case"move":this.move(S.x,S.y),$=!1;break;case"zoom":this.zoom((r=P({},n=c),o=0,E(n,function(i,e){delete r[e],E(r,function(e){var t=Math.abs(i.startX-e.startX),n=Math.abs(i.startY-e.startY),r=Math.abs(i.endX-e.endX),e=Math.abs(i.endY-e.endY),t=Math.sqrt(t*t+n*n),n=(Math.sqrt(r*r+e*e)-t)/t;Math.abs(n)>Math.abs(o)&&(o=n)})}),o),e),$=!1;break;case"crop":S.x&&S.y?(n=U(this.cropper),p=w.startX-n.left,f=w.startY-n.top,h=l.minWidth,m=l.minHeight,0<S.x?u=0<S.y?"se":"ne":S.x<0&&(p-=h,u=0<S.y?"sw":"nw"),S.y<0&&(f-=m),this.cropped||(_(this.cropBox,T),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))):$=!1}$&&(l.width=h,l.height=m,l.left=p,l.top=f,this.action=u,this.renderCropBox()),E(c,function(e){e.startX=e.endX,e.startY=e.endY})}},xe={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&u(this.dragBox,w),_(this.cropBox,T),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=k({},this.initialImageData),this.canvasData=k({},this.initialCanvasData),this.cropBoxData=k({},this.initialCropBoxData),this.renderCanvas(),this.cropped)&&this.renderCropBox(),this},clear:function(){return this.cropped&&!this.disabled&&(k(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),_(this.dragBox,w),u(this.cropBox,T)),this},replace:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,E(this.previews,function(e){e.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,_(this.cropper,z)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,u(this.cropper,z)),this},destroy:function(){var e=this.element;return e[C]&&(e[C]=void 0,this.isImg&&this.replaced&&(e.src=this.originalUrl),this.uncreate()),this},move:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=this.canvasData,r=n.left,n=n.top;return this.moveTo(i(e)?e:r+Number(e),i(t)?t:n+Number(t))},moveTo:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=this.canvasData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.movable&&(p(e)&&(n.left=e,r=!0),p(t)&&(n.top=t,r=!0),r)&&this.renderCanvas(!0),this},zoom:function(e,t){var n=this.canvasData;return e=Number(e),this.zoomTo(n.width*(e=e<0?1/(1-e):1+e)/n.naturalWidth,null,t)},zoomTo:function(e,t,n){var r,i,o,a=this.options,s=this.canvasData,l=s.width,c=s.height,u=s.naturalWidth,d=s.naturalHeight;if(0<=(e=Number(e))&&this.ready&&!this.disabled&&a.zoomable){a=u*e,d=d*e;if(!1===g(this.element,"zoom",{ratio:e,oldRatio:l/u,originalEvent:n}))return this;n?(e=this.pointers,u=U(this.cropper),e=e&&Object.keys(e).length?(o=i=r=0,E(e,function(e){var t=e.startX,e=e.startY;r+=t,i+=e,o+=1}),{pageX:r/=o,pageY:i/=o}):{pageX:n.pageX,pageY:n.pageY},s.left-=(a-l)*((e.pageX-u.left-s.left)/l),s.top-=(d-c)*((e.pageY-u.top-s.top)/c)):f(t)&&p(t.x)&&p(t.y)?(s.left-=(a-l)*((t.x-s.left)/l),s.top-=(d-c)*((t.y-s.top)/c)):(s.left-=(a-l)/2,s.top-=(d-c)/2),s.width=a,s.height=d,this.renderCanvas(!0)}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e))},rotateTo:function(e){return p(e=Number(e))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=e%360,this.renderCanvas(!0,!0)),this},scaleX:function(e){var t=this.imageData.scaleY;return this.scale(e,p(t)?t:1)},scaleY:function(e){var t=this.imageData.scaleX;return this.scale(p(t)?t:1,e)},scale:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=this.imageData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.scalable&&(p(e)&&(n.scaleX=e,r=!0),p(t)&&(n.scaleY=t,r=!0),r)&&this.renderCanvas(!0,!0),this},getData:function(){var n,r,e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=this.options,i=this.imageData,o=this.canvasData,a=this.cropBoxData;return this.ready&&this.cropped?(n={x:a.left-o.left,y:a.top-o.top,width:a.width,height:a.height},r=i.width/i.naturalWidth,E(n,function(e,t){n[t]=e/r}),e&&(o=Math.round(n.y+n.height),a=Math.round(n.x+n.width),n.x=Math.round(n.x),n.y=Math.round(n.y),n.width=a-n.x,n.height=o-n.y)):n={x:0,y:0,width:0,height:0},t.rotatable&&(n.rotate=i.rotate||0),t.scalable&&(n.scaleX=i.scaleX||1,n.scaleY=i.scaleY||1),n},setData:function(e){var t,n=this.options,r=this.imageData,i=this.canvasData,o={};return this.ready&&!this.disabled&&f(e)&&(t=!1,n.rotatable&&p(e.rotate)&&e.rotate!==r.rotate&&(r.rotate=e.rotate,t=!0),n.scalable&&(p(e.scaleX)&&e.scaleX!==r.scaleX&&(r.scaleX=e.scaleX,t=!0),p(e.scaleY))&&e.scaleY!==r.scaleY&&(r.scaleY=e.scaleY,t=!0),t&&this.renderCanvas(!0,!0),n=r.width/r.naturalWidth,p(e.x)&&(o.left=e.x*n+i.left),p(e.y)&&(o.top=e.y*n+i.top),p(e.width)&&(o.width=e.width*n),p(e.height)&&(o.height=e.height*n),this.setCropBoxData(o)),this},getContainerData:function(){return this.ready?k({},this.containerData):{}},getImageData:function(){return this.sized?k({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,n={};return this.ready&&E(["left","top","width","height","naturalWidth","naturalHeight"],function(e){n[e]=t[e]}),n},setCanvasData:function(e){var t=this.canvasData,n=t.aspectRatio;return this.ready&&!this.disabled&&f(e)&&(p(e.left)&&(t.left=e.left),p(e.top)&&(t.top=e.top),p(e.width)?(t.width=e.width,t.height=e.width/n):p(e.height)&&(t.height=e.height,t.width=e.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var e,t=this.cropBoxData;return(e=this.ready&&this.cropped?{left:t.left,top:t.top,width:t.width,height:t.height}:e)||{}},setCropBoxData:function(e){var t,n,r=this.cropBoxData,i=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&f(e)&&(p(e.left)&&(r.left=e.left),p(e.top)&&(r.top=e.top),p(e.width)&&e.width!==r.width&&(t=!0,r.width=e.width),p(e.height)&&e.height!==r.height&&(n=!0,r.height=e.height),i&&(t?r.height=r.width/i:n&&(r.width=r.height*i)),this.renderCropBox()),this},getCroppedCanvas:function(){var e,t,n,r,i,o,a,s,l,c,u,d,p,f,h,m,g,v,y,x,b,C,$,w,S,E,_,T=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return this.ready&&window.HTMLCanvasElement?(E=this.canvasData,h=this.image,d=this.imageData,r=E,v=T,m=d.aspectRatio,t=d.naturalWidth,i=d.naturalHeight,c=void 0===(c=d.rotate)?0:c,u=void 0===(u=d.scaleX)?1:u,d=void 0===(d=d.scaleY)?1:d,n=r.aspectRatio,s=r.naturalWidth,r=r.naturalHeight,a=void 0===(a=v.fillColor)?"transparent":a,p=void 0===(p=v.imageSmoothingEnabled)||p,f=void 0===(f=v.imageSmoothingQuality)?"low":f,o=void 0===(o=v.maxWidth)?1/0:o,_=void 0===(_=v.maxHeight)?1/0:_,e=void 0===(e=v.minWidth)?0:e,v=void 0===(v=v.minHeight)?0:v,y=document.createElement("canvas"),g=y.getContext("2d"),l=I({aspectRatio:n,width:o,height:_}),n=I({aspectRatio:n,width:e,height:v},"cover"),s=Math.min(l.width,Math.max(n.width,s)),l=Math.min(l.height,Math.max(n.height,r)),n=I({aspectRatio:m,width:o,height:_}),r=I({aspectRatio:m,width:e,height:v},"cover"),o=Math.min(n.width,Math.max(r.width,t)),_=Math.min(n.height,Math.max(r.height,i)),m=[-o/2,-_/2,o,_],y.width=j(s),y.height=j(l),g.fillStyle=a,g.fillRect(0,0,s,l),g.save(),g.translate(s/2,l/2),g.rotate(c*Math.PI/180),g.scale(u,d),g.imageSmoothingEnabled=p,g.imageSmoothingQuality=f,g.drawImage.apply(g,[h].concat(F(m.map(function(e){return Math.floor(j(e))})))),g.restore(),e=y,this.cropped?(t=(v=this.getData()).x,n=v.y,r=v.width,i=v.height,1!=(o=e.width/Math.floor(E.naturalWidth))&&(t*=o,n*=o,r*=o,i*=o),a=I({aspectRatio:_=r/i,width:T.maxWidth||1/0,height:T.maxHeight||1/0}),s=I({aspectRatio:_,width:T.minWidth||0,height:T.minHeight||0},"cover"),c=(l=I({aspectRatio:_,width:T.width||(1!=o?e.width:r),height:T.height||(1!=o?e.height:i)})).width,u=l.height,c=Math.min(a.width,Math.max(s.width,c)),u=Math.min(a.height,Math.max(s.height,u)),p=(d=document.createElement("canvas")).getContext("2d"),d.width=j(c),d.height=j(u),p.fillStyle=T.fillColor||"transparent",p.fillRect(0,0,c,u),f=T.imageSmoothingEnabled,h=T.imageSmoothingQuality,p.imageSmoothingEnabled=void 0===f||f,h&&(p.imageSmoothingQuality=h),m=e.width,g=e.height,y=n,(v=t)<=-r||m<v?w=C=x=v=0:v<=0?(C=-v,v=0,w=x=Math.min(m,r+v)):v<=m&&(C=0,w=x=Math.min(r,m-v)),x<=0||y<=-i||g<y?S=$=b=y=0:y<=0?($=-y,y=0,S=b=Math.min(g,i+y)):y<=g&&($=0,S=b=Math.min(i,g-y)),E=[v,y,x,b],0<w&&0<S&&E.push(C*(_=c/r),$*_,w*_,S*_),p.drawImage.apply(p,[e].concat(F(E.map(function(e){return Math.floor(j(e))})))),d):e):null},setAspectRatio:function(e){var t=this.options;return this.disabled||i(e)||(t.aspectRatio=Math.max(0,e)||NaN,this.ready&&(this.initCropBox(),this.cropped)&&this.renderCropBox()),this},setDragMode:function(e){var t,n,r=this.options,i=this.dragBox,o=this.face;return this.ready&&!this.disabled&&(n=r.movable&&"move"===e,r.dragMode=e=(t="crop"===e)||n?e:"none",d(i,R,e),a(i,$,t),a(i,S,n),r.cropBoxMovable||(d(o,R,e),a(o,$,t),a(o,S,n))),this}},be=b.Cropper,Ce=function(){function i(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=this,r=i;if(!(n instanceof r))throw new TypeError("Cannot call a class as a function");if(!e||!ne.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=k({},re,f(t)&&t),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}var e=i,t=[{key:"init",value:function(){var e,t=this.element,n=t.tagName.toLowerCase();if(!t[C]){if(t[C]=this,"img"===n){if(this.isImg=!0,e=t.getAttribute("src")||"",!(this.originalUrl=e))return;e=t.src}else"canvas"===n&&window.HTMLCanvasElement&&(e=t.toDataURL());this.load(e)}}},{key:"load",value:function(e){var t,n,r,i,o,a,s=this;e&&(this.url=e,this.imageData={},t=this.element,(n=this.options).rotatable||n.scalable||(n.checkOrientation=!1),n.checkOrientation&&window.ArrayBuffer?ee.test(e)?te.test(e)?this.read((a=(a=e).replace(me,""),r=atob(a),a=new ArrayBuffer(r.length),E(i=new Uint8Array(a),function(e,t){i[t]=r.charCodeAt(t)}),a)):this.clone():(o=new XMLHttpRequest,a=this.clone.bind(this),this.reloading=!0,(this.xhr=o).onabort=a,o.onerror=a,o.ontimeout=a,o.onprogress=function(){o.getResponseHeader("content-type")!==X&&o.abort()},o.onload=function(){s.read(o.response)},o.onloadend=function(){s.reloading=!1,s.xhr=null},n.checkCrossOrigin&&Z(e)&&t.crossOrigin&&(e=W(e)),o.open("GET",e,!0),o.responseType="arraybuffer",o.withCredentials="use-credentials"===t.crossOrigin,o.send()):this.clone())}},{key:"read",value:function(e){var t=this.options,n=this.imageData,r=function(e){var t,n,r,i,o,a,s=new DataView(e);try{if(255===s.getUint8(0)&&216===s.getUint8(1))for(var l=s.byteLength,c=2;c+1<l;){if(255===s.getUint8(c)&&225===s.getUint8(c+1)){r=c;break}c+=1}var u,d,p;if(i=r&&(u=r+10,"Exif"===function(e,t,n){var r="";n+=t;for(var i=t;i<n;i+=1)r+=he(e.getUint8(i));return r}(s,r+4,4))&&(d=s.getUint16(u),(n=18761===d)||19789===d)&&42===s.getUint16(u+2,n)&&8<=(p=s.getUint32(u+4,n))?u+p:i){var f=s.getUint16(i,n);for(a=0;a<f;a+=1)if(o=i+12*a+2,274===s.getUint16(o,n)){o+=8,t=s.getUint16(o,n),s.setUint16(o,1,n);break}}}catch(e){t=1}return t}(e),i=0,o=1,a=1;1<r&&(this.url=function(e,t){var n=[],r=new Uint8Array(e);for(;0<r.length;)n.push(he.apply(null,H(r.subarray(0,8192)))),r=r.subarray(8192);return"data:".concat(t,";base64,").concat(btoa(n.join("")))}(e,X),i=(e=function(e){var t=0,n=1,r=1;switch(e){case 2:n=-1;break;case 3:t=-180;break;case 4:r=-1;break;case 5:t=90,r=-1;break;case 6:t=90;break;case 7:t=90,n=-1;break;case 8:t=-90}return{rotate:t,scaleX:n,scaleY:r}}(r)).rotate,o=e.scaleX,a=e.scaleY),t.rotatable&&(n.rotate=i),t.scalable&&(n.scaleX=o,n.scaleY=a),this.clone()}},{key:"clone",value:function(){var e=this.element,t=this.url,n=e.crossOrigin,r=t,i=(this.options.checkCrossOrigin&&Z(t)&&(n=n||"anonymous",r=W(t)),this.crossOrigin=n,this.crossOriginUrl=r,document.createElement("img"));n&&(i.crossOrigin=n),i.src=r||t,i.alt=e.alt||"The image to crop",(this.image=i).onload=this.start.bind(this),i.onerror=this.stop.bind(this),u(i,G),e.parentNode.insertBefore(i,e.nextSibling)}},{key:"start",value:function(){function e(e,t){k(r.imageData,{naturalWidth:e,naturalHeight:t,aspectRatio:e/t}),r.initialImageData=k({},r.imageData),r.sizing=!1,r.sized=!0,r.build()}var t,n,r=this,i=this.image,o=(i.onload=null,i.onerror=null,this.sizing=!0,b.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(b.navigator.userAgent));i.naturalWidth&&!o?e(i.naturalWidth,i.naturalHeight):(t=document.createElement("img"),n=document.body||document.documentElement,(this.sizingImage=t).onload=function(){e(t.width,t.height),o||n.removeChild(t)},t.src=i.src,o||(t.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",n.appendChild(t)))}},{key:"stop",value:function(){var e=this.image;e.onload=null,e.onerror=null,e.parentNode.removeChild(e),this.image=null}},{key:"build",value:function(){var e,t,n,r,i,o,a,s,l;this.sized&&!this.ready&&(e=this.element,t=this.options,n=this.image,r=e.parentNode,(i=document.createElement("div")).innerHTML='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',o=(i=i.querySelector(".".concat(C,"-container"))).querySelector(".".concat(C,"-canvas")),a=i.querySelector(".".concat(C,"-drag-box")),l=(s=i.querySelector(".".concat(C,"-crop-box"))).querySelector(".".concat(C,"-face")),this.container=r,this.cropper=i,this.canvas=o,this.dragBox=a,this.cropBox=s,this.viewBox=i.querySelector(".".concat(C,"-view-box")),this.face=l,o.appendChild(n),u(e,T),r.insertBefore(i,e.nextSibling),_(n,G),this.initPreview(),this.bind(),t.initialAspectRatio=Math.max(0,t.initialAspectRatio)||NaN,t.aspectRatio=Math.max(0,t.aspectRatio)||NaN,t.viewMode=Math.max(0,Math.min(3,Math.round(t.viewMode)))||0,u(s,T),t.guides||u(s.getElementsByClassName("".concat(C,"-dashed")),T),t.center||u(s.getElementsByClassName("".concat(C,"-center")),T),t.background&&u(i,"".concat(C,"-bg")),t.highlight||u(l,q),t.cropBoxMovable&&(u(l,S),d(l,R,"all")),t.cropBoxResizable||(u(s.getElementsByClassName("".concat(C,"-line")),T),u(s.getElementsByClassName("".concat(C,"-point")),T)),this.render(),this.ready=!0,this.setDragMode(t.dragMode),t.autoCrop&&this.crop(),this.setData(t.data),c(t.ready)&&m(e,"ready",t.ready,{once:!0}),g(e,"ready"))}},{key:"unbuild",value:function(){var e;this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),(e=this.cropper.parentNode)&&e.removeChild(this.cropper),_(this.element,T))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],n=[{key:"noConflict",value:function(){return window.Cropper=be,i}},{key:"setDefaults",value:function(e){k(re,f(e)&&e)}}];return t&&V(e.prototype,t),n&&V(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(),k(Ce.prototype,e,n,ge,ve,ye,xe),Ce)}(),cropper.exports),__assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function __rest$1(e,t){var n={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n}var AuthStatus,applyDefaultOptions=function(e,t){var n=(t=void 0===t?{}:t).enable,r=t.scaleX,r=void 0===r?1:r,i=t.scaleY,i=void 0===i?1:i,o=t.zoomTo,o=void 0===o?0:o,t=t.rotateTo;void 0===n||n?e.enable():e.disable(),e.scaleX(r),e.scaleY(i),void 0!==t&&e.rotateTo(t),0<o&&e.zoomTo(o)},useCombinedRefs=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=react.exports.useRef(null);return React.useEffect(function(){e.forEach(function(e){e&&("function"==typeof e?e(n.current):e.current=n.current)})},[e]),n},ReactCropper=React.forwardRef(function(e,t){var e=__rest$1(e,[]),n=e.dragMode,r=void 0===n?"crop":n,i=e.src,n=e.style,o=e.className,a=e.crossOrigin,s=e.scaleX,l=e.scaleY,c=e.enable,u=e.zoomTo,d=e.rotateTo,p=e.alt,p=void 0===p?"picture":p,f=e.ready,h=e.onInitialized,m=__rest$1(e,["dragMode","src","style","className","crossOrigin","scaleX","scaleY","enable","zoomTo","rotateTo","alt","ready","onInitialized"]),g={scaleY:l,scaleX:s,enable:c,zoomTo:u,rotateTo:d},l=react.exports.useRef(null),v=useCombinedRefs(t,l);return react.exports.useEffect(function(){var e;null!=(e=v.current)&&e.cropper&&"number"==typeof u&&v.current.cropper.zoomTo(u)},[e.zoomTo]),react.exports.useEffect(function(){var e;null!=(e=v.current)&&e.cropper&&void 0!==i&&v.current.cropper.reset().clear().replace(i)},[i]),react.exports.useEffect(function(){var e;return null!==v.current&&(e=new Cropper(v.current,__assign(__assign({dragMode:r},m),{ready:function(e){null!==e.currentTarget&&applyDefaultOptions(e.currentTarget.cropper,g),f&&f(e)}})),h)&&h(e),function(){var e;null!=(e=null==(e=v.current)?void 0:e.cropper)&&e.destroy()}},[v]),React.createElement("div",{style:n,className:o},React.createElement("img",{crossOrigin:a,src:i,alt:p,style:{opacity:0,maxWidth:"100%"},ref:v}))});const namespace$4="users",userSelector$1=e=>{return null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$4]},userAuthStatusSelector=e=>{return null==(e=null==(e=null==e?void 0:e.aiWareHeaderBarPanel)?void 0:e[namespace$4])?void 0:e.authStatus},GET_CURRENT_USER$1=`os-app-bar-panel/${namespace$4}/get current user`,GET_CURRENT_USER_SUCCESS$1=`os-app-bar-panel/${namespace$4}/get current user success`,RESET_BIOMETRIC=`os-app-bar-panel/${namespace$4}/reset biometric`,RESET_PASSWORD=`os-app-bar-panel/${namespace$4}/reset password`,RESET_PASSWORD_FAIL=`os-app-bar-panel/${namespace$4}/reset password fail`,UPDATE_PROFILE=`os-app-bar-panel/${namespace$4}/update profile`,UPDATE_PROFILE_FAIL=`os-app-bar-panel/${namespace$4}/update profile fail`,UPLOAD__AVATAR=`os-app-bar-panel/${namespace$4}/upload avatar`,UPDATE__AVATAR=`os-app-bar-panel/${namespace$4}/update avatar`,LOGOUT_USER=`os-app-bar-panel/${namespace$4}/logout`,LOGOUT_SUCCESS=`os-app-bar-panel/${namespace$4}/logout success`,LOGOUT_FAIL=`os-app-bar-panel/${namespace$4}/logout fail`,UPLOADING_AVATAR=`os-app-bar-panel/${namespace$4}/uploading`,UPDATE_ACTIVITY=`os-app-bar-panel/${namespace$4}/updateActivityStatus`;function getCurrentUser$1(){return{type:GET_CURRENT_USER$1}}function getCurrentUserSuccess$1(e){return{type:GET_CURRENT_USER_SUCCESS$1,payload:e}}function resetBiometric(){return{type:RESET_BIOMETRIC}}function resetPassword(e){return{type:RESET_PASSWORD,payload:e}}function resetPasswordFail(){return{type:RESET_PASSWORD_FAIL}}function updateProfile(e){return{type:UPDATE_PROFILE,payload:e}}function updateProfileFail(){return{type:UPDATE_PROFILE_FAIL}}function uploadAvatar(e){return{type:UPLOAD__AVATAR,payload:e}}function updateAvatar(e){return{type:UPDATE__AVATAR,payload:e}}function logoutUserSuccess(){return{type:LOGOUT_SUCCESS}}function logoutUserFail(){return{type:LOGOUT_FAIL}}function uploadingAvatar(e){return{type:UPLOADING_AVATAR,payload:e}}!function(e){e.AUTHENTICATED="authenticated",e.LOGGING_OUT="logging_out",e.LOGGED_OUT="logged_out"}(AuthStatus=AuthStatus||{});const initialState$4={currentUser:{},status:"idle",authStatus:AuthStatus.AUTHENTICATED};function userReducer$1(e,t){return void 0===e?initialState$4:t.type===GET_CURRENT_USER_SUCCESS$1?Object.assign(Object.assign({},e),{currentUser:t.payload,status:"success"}):t.type===UPLOADING_AVATAR?Object.assign(Object.assign({},e),{loading:t.payload}):t.type===LOGOUT_USER?Object.assign(Object.assign({},e),{authStatus:AuthStatus.LOGGING_OUT}):t.type===LOGOUT_SUCCESS?Object.assign(Object.assign({},e),{authStatus:AuthStatus.LOGGED_OUT}):t.type===LOGOUT_FAIL?Object.assign(Object.assign({},e),{authStatus:AuthStatus.AUTHENTICATED}):e}var luxon={};function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function _construct(e,t,n){return(_construct=_isNativeReflectConstruct()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);t=new(Function.bind.apply(e,r));return n&&_setPrototypeOf(t,n.prototype),t}).apply(null,arguments)}function _isNativeFunction(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _wrapNativeSuper(e){var n="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(t,e)})(e)}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};for(var n,r={},i=Object.keys(e),o=0;o<i.length;o++)n=i[o],0<=t.indexOf(n)||(r[n]=e[n]);return r}function _unsupportedIterableToArray(e,t){var n;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _createForOfIteratorHelperLoose(e){var t=0;if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator])return(t=e[Symbol.iterator]()).next.bind(t);if(Array.isArray(e)||(e=_unsupportedIterableToArray(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Object.defineProperty(luxon,"__esModule",{value:!0});var LuxonError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(_wrapNativeSuper(Error)),InvalidDateTimeError=function(t){function e(e){return t.call(this,"Invalid DateTime: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidIntervalError=function(t){function e(e){return t.call(this,"Invalid Interval: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidDurationError=function(t){function e(e){return t.call(this,"Invalid Duration: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),ConflictingSpecificationError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(LuxonError),InvalidUnitError=function(t){function e(e){return t.call(this,"Invalid unit "+e)||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidArgumentError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(LuxonError),ZoneIsAbstractError=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return _inheritsLoose(t,e),t}(LuxonError),n="numeric",s="short",l$1="long",DATE_SHORT={year:n,month:n,day:n},DATE_MED={year:n,month:s,day:n},DATE_MED_WITH_WEEKDAY={year:n,month:s,day:n,weekday:s},DATE_FULL={year:n,month:l$1,day:n},DATE_HUGE={year:n,month:l$1,day:n,weekday:l$1},TIME_SIMPLE={hour:n,minute:n},TIME_WITH_SECONDS={hour:n,minute:n,second:n},TIME_WITH_SHORT_OFFSET={hour:n,minute:n,second:n,timeZoneName:s},TIME_WITH_LONG_OFFSET={hour:n,minute:n,second:n,timeZoneName:l$1},TIME_24_SIMPLE={hour:n,minute:n,hour12:!1},TIME_24_WITH_SECONDS={hour:n,minute:n,second:n,hour12:!1},TIME_24_WITH_SHORT_OFFSET={hour:n,minute:n,second:n,hour12:!1,timeZoneName:s},TIME_24_WITH_LONG_OFFSET={hour:n,minute:n,second:n,hour12:!1,timeZoneName:l$1},DATETIME_SHORT={year:n,month:n,day:n,hour:n,minute:n},DATETIME_SHORT_WITH_SECONDS={year:n,month:n,day:n,hour:n,minute:n,second:n},DATETIME_MED={year:n,month:s,day:n,hour:n,minute:n},DATETIME_MED_WITH_SECONDS={year:n,month:s,day:n,hour:n,minute:n,second:n},DATETIME_MED_WITH_WEEKDAY={year:n,month:s,day:n,weekday:s,hour:n,minute:n},DATETIME_FULL={year:n,month:l$1,day:n,hour:n,minute:n,timeZoneName:s},DATETIME_FULL_WITH_SECONDS={year:n,month:l$1,day:n,hour:n,minute:n,second:n,timeZoneName:s},DATETIME_HUGE={year:n,month:l$1,day:n,weekday:l$1,hour:n,minute:n,timeZoneName:l$1},DATETIME_HUGE_WITH_SECONDS={year:n,month:l$1,day:n,weekday:l$1,hour:n,minute:n,second:n,timeZoneName:l$1};function isUndefined(e){return void 0===e}function isNumber(e){return"number"==typeof e}function isInteger(e){return"number"==typeof e&&e%1==0}function isString(e){return"string"==typeof e}function isDate(e){return"[object Date]"===Object.prototype.toString.call(e)}function hasIntl(){try{return"undefined"!=typeof Intl&&Intl.DateTimeFormat}catch(e){return!1}}function hasFormatToParts(){return!isUndefined(Intl.DateTimeFormat.prototype.formatToParts)}function hasRelative(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function maybeArray(e){return Array.isArray(e)?e:[e]}function bestBy(e,n,r){if(0!==e.length)return e.reduce(function(e,t){t=[n(t),t];return e&&r(e[0],t[0])===e[0]?e:t},null)[1]}function pick(n,e){return e.reduce(function(e,t){return e[t]=n[t],e},{})}function hasOwnProperty$1(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function integerBetween(e,t,n){return isInteger(e)&&t<=e&&e<=n}function floorMod(e,t){return e-t*Math.floor(e/t)}function padStart(e,t){void 0===t&&(t=2);var n=e<0?"-":"",e=n?-1*e:e,t=e.toString().length<t?("0".repeat(t)+e).slice(-t):e.toString();return n+t}function parseInteger(e){if(!isUndefined(e)&&null!==e&&""!==e)return parseInt(e,10)}function parseMillis(e){if(!isUndefined(e)&&null!==e&&""!==e)return e=1e3*parseFloat("0."+e),Math.floor(e)}function roundTo(e,t,n){void 0===n&&(n=!1);t=Math.pow(10,t);return(n?Math.trunc:Math.round)(e*t)/t}function isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}function daysInYear(e){return isLeapYear(e)?366:365}function daysInMonth(e,t){var n=floorMod(t-1,12)+1;return 2===n?isLeapYear(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function objToLocalTS(e){var t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&0<=e.year&&(t=new Date(t)).setUTCFullYear(t.getUTCFullYear()-1900),+t}function weeksInWeekYear(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,e=e-1,e=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7;return 4==t||3==e?53:52}function untruncateYear(e){return 99<e?e:60<e?1900+e:2e3+e}function parseZoneInfo(e,t,n,r){void 0===r&&(r=null);var i,e=new Date(e),o={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"},r=(r&&(o.timeZone=r),Object.assign({timeZoneName:t},o)),t=hasIntl();return t&&hasFormatToParts()?(i=new Intl.DateTimeFormat(n,r).formatToParts(e).find(function(e){return"timezonename"===e.type.toLowerCase()}))?i.value:null:t?(i=new Intl.DateTimeFormat(n,o).format(e),new Intl.DateTimeFormat(n,r).format(e).substring(i.length).replace(/^[, \u200e]+/,"")):null}function signedOffset(e,t){e=parseInt(e,10),Number.isNaN(e)&&(e=0),t=parseInt(t,10)||0;return 60*e+(e<0||Object.is(e,-0)?-t:t)}function asNumber(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new InvalidArgumentError("Invalid unit value "+e);return t}function normalizeObject(e,t,n){var r,i,o={};for(r in e)!hasOwnProperty$1(e,r)||0<=n.indexOf(r)||null!=(i=e[r])&&(o[t(r)]=asNumber(i));return o}function formatOffset(e,t){var n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=0<=e?"+":"-";switch(t){case"short":return i+padStart(n,2)+":"+padStart(r,2);case"narrow":return i+n+(0<r?":"+r:"");case"techie":return i+padStart(n,2)+padStart(r,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function timeObject(e){return pick(e,["hour","minute","second","millisecond"])}var ianaRegex=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function stringify(e){return JSON.stringify(e,Object.keys(e).sort())}var monthsLong=["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthsNarrow=["J","F","M","A","M","J","J","A","S","O","N","D"];function months(e){switch(e){case"narrow":return[].concat(monthsNarrow);case"short":return[].concat(monthsShort);case"long":return[].concat(monthsLong);case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var weekdaysLong=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],weekdaysShort=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],weekdaysNarrow=["M","T","W","T","F","S","S"];function weekdays(e){switch(e){case"narrow":return[].concat(weekdaysNarrow);case"short":return[].concat(weekdaysShort);case"long":return[].concat(weekdaysLong);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var meridiems=["AM","PM"],erasLong=["Before Christ","Anno Domini"],erasShort=["BC","AD"],erasNarrow=["B","A"];function eras(e){switch(e){case"narrow":return[].concat(erasNarrow);case"short":return[].concat(erasShort);case"long":return[].concat(erasLong);default:return null}}function meridiemForDateTime(e){return meridiems[e.hour<12?0:1]}function weekdayForDateTime(e,t){return weekdays(t)[e.weekday-1]}function monthForDateTime(e,t){return months(t)[e.month-1]}function eraForDateTime(e,t){return eras(t)[e.year<0?0:1]}function formatRelativeTime(e,t,n,r){void 0===n&&(n="always"),void 0===r&&(r=!1);var i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&o){var a="days"===e;switch(t){case 1:return a?"tomorrow":"next "+i[e][0];case-1:return a?"yesterday":"last "+i[e][0];case 0:return a?"today":"this "+i[e][0]}}var n=Object.is(t,-0)||t<0,o=Math.abs(t),t=1===o,s=i[e],r=r?!t&&s[2]||s[1]:t?i[e][0]:e;return n?o+" "+r+" ago":"in "+o+" "+r}function formatString(e){var t="EEEE, LLLL d, yyyy, h:mm a";switch(stringify(pick(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]))){case stringify(DATE_SHORT):return"M/d/yyyy";case stringify(DATE_MED):return"LLL d, yyyy";case stringify(DATE_MED_WITH_WEEKDAY):return"EEE, LLL d, yyyy";case stringify(DATE_FULL):return"LLLL d, yyyy";case stringify(DATE_HUGE):return"EEEE, LLLL d, yyyy";case stringify(TIME_SIMPLE):return"h:mm a";case stringify(TIME_WITH_SECONDS):return"h:mm:ss a";case stringify(TIME_WITH_SHORT_OFFSET):case stringify(TIME_WITH_LONG_OFFSET):return"h:mm a";case stringify(TIME_24_SIMPLE):return"HH:mm";case stringify(TIME_24_WITH_SECONDS):return"HH:mm:ss";case stringify(TIME_24_WITH_SHORT_OFFSET):case stringify(TIME_24_WITH_LONG_OFFSET):return"HH:mm";case stringify(DATETIME_SHORT):return"M/d/yyyy, h:mm a";case stringify(DATETIME_MED):return"LLL d, yyyy, h:mm a";case stringify(DATETIME_FULL):return"LLLL d, yyyy, h:mm a";case stringify(DATETIME_HUGE):return t;case stringify(DATETIME_SHORT_WITH_SECONDS):return"M/d/yyyy, h:mm:ss a";case stringify(DATETIME_MED_WITH_SECONDS):return"LLL d, yyyy, h:mm:ss a";case stringify(DATETIME_MED_WITH_WEEKDAY):return"EEE, d LLL yyyy, h:mm a";case stringify(DATETIME_FULL_WITH_SECONDS):return"LLLL d, yyyy, h:mm:ss a";case stringify(DATETIME_HUGE_WITH_SECONDS):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return t}}function stringifyTokens(e,t){for(var n="",r=_createForOfIteratorHelperLoose(e);!(i=r()).done;){var i=i.value;i.literal?n+=i.val:n+=t(i.val)}return n}var _macroTokenToFormatOpts={D:DATE_SHORT,DD:DATE_MED,DDD:DATE_FULL,DDDD:DATE_HUGE,t:TIME_SIMPLE,tt:TIME_WITH_SECONDS,ttt:TIME_WITH_SHORT_OFFSET,tttt:TIME_WITH_LONG_OFFSET,T:TIME_24_SIMPLE,TT:TIME_24_WITH_SECONDS,TTT:TIME_24_WITH_SHORT_OFFSET,TTTT:TIME_24_WITH_LONG_OFFSET,f:DATETIME_SHORT,ff:DATETIME_MED,fff:DATETIME_FULL,ffff:DATETIME_HUGE,F:DATETIME_SHORT_WITH_SECONDS,FF:DATETIME_MED_WITH_SECONDS,FFF:DATETIME_FULL_WITH_SECONDS,FFFF:DATETIME_HUGE_WITH_SECONDS},Formatter=function(){function p(e,t){this.opts=t,this.loc=e,this.systemLoc=null}p.create=function(e,t){return new p(e,t=void 0===t?{}:t)},p.parseFormat=function(e){for(var t=null,n="",r=!1,i=[],o=0;o<e.length;o++){var a=e.charAt(o);"'"===a?(0<n.length&&i.push({literal:r,val:n}),t=null,n="",r=!r):r||a===t?n+=a:(0<n.length&&i.push({literal:!1,val:n}),t=n=a)}return 0<n.length&&i.push({literal:r,val:n}),i},p.macroTokenToFormatOpts=function(e){return _macroTokenToFormatOpts[e]};var e=p.prototype;return e.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,Object.assign({},this.opts,t)).format()},e.formatDateTime=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).format()},e.formatDateTimeParts=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).formatToParts()},e.resolvedOptions=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).resolvedOptions()},e.num=function(e,t){var n;return void 0===t&&(t=0),this.opts.forceSimple?padStart(e,t):(n=Object.assign({},this.opts),0<t&&(n.padTo=t),this.loc.numberFormatter(n).format(e))},e.formatDateTimeFromString=function(n,e){var r=this,i="en"===this.loc.listingMode(),t=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&hasFormatToParts(),o=function(e,t){return r.loc.extract(n,e,t)},a=function(e){return n.isOffsetFixed&&0===n.offset&&e.allowZ?"Z":n.isValid?n.zone.formatOffset(n.ts,e.format):""},s=function(){return i?meridiemForDateTime(n):o({hour:"numeric",hour12:!0},"dayperiod")},l=function(e,t){return i?monthForDateTime(n,e):o(t?{month:e}:{month:e,day:"numeric"},"month")},c=function(e,t){return i?weekdayForDateTime(n,e):o(t?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},u=function(e){var t=p.macroTokenToFormatOpts(e);return t?r.formatWithSystemDefault(n,t):e},d=function(e){return i?eraForDateTime(n,e):o({era:e},"era")};return stringifyTokens(p.parseFormat(e),function(e){switch(e){case"S":return r.num(n.millisecond);case"u":case"SSS":return r.num(n.millisecond,3);case"s":return r.num(n.second);case"ss":return r.num(n.second,2);case"m":return r.num(n.minute);case"mm":return r.num(n.minute,2);case"h":return r.num(n.hour%12==0?12:n.hour%12);case"hh":return r.num(n.hour%12==0?12:n.hour%12,2);case"H":return r.num(n.hour);case"HH":return r.num(n.hour,2);case"Z":return a({format:"narrow",allowZ:r.opts.allowZ});case"ZZ":return a({format:"short",allowZ:r.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:r.opts.allowZ});case"ZZZZ":return n.zone.offsetName(n.ts,{format:"short",locale:r.loc.locale});case"ZZZZZ":return n.zone.offsetName(n.ts,{format:"long",locale:r.loc.locale});case"z":return n.zoneName;case"a":return s();case"d":return t?o({day:"numeric"},"day"):r.num(n.day);case"dd":return t?o({day:"2-digit"},"day"):r.num(n.day,2);case"c":return r.num(n.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return r.num(n.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return t?o({month:"numeric",day:"numeric"},"month"):r.num(n.month);case"LL":return t?o({month:"2-digit",day:"numeric"},"month"):r.num(n.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return t?o({month:"numeric"},"month"):r.num(n.month);case"MM":return t?o({month:"2-digit"},"month"):r.num(n.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return t?o({year:"numeric"},"year"):r.num(n.year);case"yy":return t?o({year:"2-digit"},"year"):r.num(n.year.toString().slice(-2),2);case"yyyy":return t?o({year:"numeric"},"year"):r.num(n.year,4);case"yyyyyy":return t?o({year:"numeric"},"year"):r.num(n.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return r.num(n.weekYear.toString().slice(-2),2);case"kkkk":return r.num(n.weekYear,4);case"W":return r.num(n.weekNumber);case"WW":return r.num(n.weekNumber,2);case"o":return r.num(n.ordinal);case"ooo":return r.num(n.ordinal,3);case"q":return r.num(n.quarter);case"qq":return r.num(n.quarter,2);case"X":return r.num(Math.floor(n.ts/1e3));case"x":return r.num(n.ts);default:return u(e)}})},e.formatDurationFromString=function(e,t){var n,r=this,i=function(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},t=p.parseFormat(t),o=t.reduce(function(e,t){var n=t.literal,t=t.val;return n?e:e.concat(t)},[]),e=e.shiftTo.apply(e,o.map(i).filter(function(e){return e}));return stringifyTokens(t,(n=e,function(e){var t=i(e);return t?r.num(n.get(t),e.length):e}))},p}(),Invalid=function(){function e(e,t){this.reason=e,this.explanation=t}return e.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Zone=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new ZoneIsAbstractError},t.formatOffset=function(e,t){throw new ZoneIsAbstractError},t.offset=function(e){throw new ZoneIsAbstractError},t.equals=function(e){throw new ZoneIsAbstractError},_createClass(e,[{key:"type",get:function(){throw new ZoneIsAbstractError}},{key:"name",get:function(){throw new ZoneIsAbstractError}},{key:"universal",get:function(){throw new ZoneIsAbstractError}},{key:"isValid",get:function(){throw new ZoneIsAbstractError}}]),e}(),singleton=null,LocalZone=function(e){function t(){return e.apply(this,arguments)||this}_inheritsLoose(t,e);var n=t.prototype;return n.offsetName=function(e,t){return parseZoneInfo(e,t.format,t.locale)},n.formatOffset=function(e,t){return formatOffset(this.offset(e),t)},n.offset=function(e){return-new Date(e).getTimezoneOffset()},n.equals=function(e){return"local"===e.type},_createClass(t,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return hasIntl()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return singleton=null===singleton?new t:singleton}}]),t}(Zone),matchingRegex=RegExp("^"+ianaRegex.source+"$"),dtfCache={};function makeDTF(e){return dtfCache[e]||(dtfCache[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),dtfCache[e]}var typeToPos={year:0,month:1,day:2,hour:3,minute:4,second:5};function hackyOffset(e,t){var e=e.format(t).replace(/\u200E/g,""),t=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e),e=t[1],n=t[2];return[t[3],e,n,t[4],t[5],t[6]]}function partsOffset(e,t){for(var n=e.formatToParts(t),r=[],i=0;i<n.length;i++){var o=n[i],a=o.type,o=o.value,a=typeToPos[a];isUndefined(a)||(r[a]=parseInt(o,10))}return r}var ianaZoneCache={},IANAZone=function(n){function r(e){var t=n.call(this)||this;return t.zoneName=e,t.valid=r.isValidZone(e),t}_inheritsLoose(r,n),r.create=function(e){return ianaZoneCache[e]||(ianaZoneCache[e]=new r(e)),ianaZoneCache[e]},r.resetCache=function(){ianaZoneCache={},dtfCache={}},r.isValidSpecifier=function(e){return!(!e||!e.match(matchingRegex))},r.isValidZone=function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}},r.parseGMTOffset=function(e){if(e){e=e.match(/^Etc\/GMT(0|[+-]\d{1,2})$/i);if(e)return-60*parseInt(e[1])}return null};var e=r.prototype;return e.offsetName=function(e,t){return parseZoneInfo(e,t.format,t.locale,this.name)},e.formatOffset=function(e,t){return formatOffset(this.offset(e),t)},e.offset=function(e){var t,n,r,e=new Date(e);return isNaN(e)?NaN:(r=(n=+e)%1e3,(objToLocalTS({year:(t=((t=makeDTF(this.name)).formatToParts?partsOffset:hackyOffset)(t,e))[0],month:t[1],day:t[2],hour:24===(e=t[3])?0:e,minute:t[4],second:t[5],millisecond:0})-(n-=0<=r?r:1e3+r))/6e4)},e.equals=function(e){return"iana"===e.type&&e.name===this.name},_createClass(r,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),r}(Zone),singleton$1=null,FixedOffsetZone=function(n){function t(e){var t=n.call(this)||this;return t.fixed=e,t}_inheritsLoose(t,n),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){e=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new t(signedOffset(e[1],e[2]))}return null},_createClass(t,null,[{key:"utcInstance",get:function(){return singleton$1=null===singleton$1?new t(0):singleton$1}}]);var e=t.prototype;return e.offsetName=function(){return this.name},e.formatOffset=function(e,t){return formatOffset(this.fixed,t)},e.offset=function(){return this.fixed},e.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},_createClass(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+formatOffset(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),t}(Zone),InvalidZone=function(n){function e(e){var t=n.call(this)||this;return t.zoneName=e,t}_inheritsLoose(e,n);var t=e.prototype;return t.offsetName=function(){return null},t.formatOffset=function(){return""},t.offset=function(){return NaN},t.equals=function(){return!1},_createClass(e,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),e}(Zone);function normalizeZone(e,t){var n;return isUndefined(e)||null===e?t:e instanceof Zone?e:isString(e)?"local"===(n=e.toLowerCase())?t:"utc"===n||"gmt"===n?FixedOffsetZone.utcInstance:null!=(t=IANAZone.parseGMTOffset(e))?FixedOffsetZone.instance(t):IANAZone.isValidSpecifier(n)?IANAZone.create(e):FixedOffsetZone.parseSpecifier(n)||new InvalidZone(e):isNumber(e)?FixedOffsetZone.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new InvalidZone(e)}var now=function(){return Date.now()},defaultZone=null,defaultLocale$1=null,defaultNumberingSystem=null,defaultOutputCalendar=null,throwOnInvalid=!1,Settings=function(){function e(){}return e.resetCaches=function(){Locale.resetCache(),IANAZone.resetCache()},_createClass(e,null,[{key:"now",get:function(){return now},set:function(e){now=e}},{key:"defaultZoneName",get:function(){return e.defaultZone.name},set:function(e){defaultZone=e?normalizeZone(e):null}},{key:"defaultZone",get:function(){return defaultZone||LocalZone.instance}},{key:"defaultLocale",get:function(){return defaultLocale$1},set:function(e){defaultLocale$1=e}},{key:"defaultNumberingSystem",get:function(){return defaultNumberingSystem},set:function(e){defaultNumberingSystem=e}},{key:"defaultOutputCalendar",get:function(){return defaultOutputCalendar},set:function(e){defaultOutputCalendar=e}},{key:"throwOnInvalid",get:function(){return throwOnInvalid},set:function(e){throwOnInvalid=e}}]),e}(),intlDTCache={};function getCachedDTF(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=intlDTCache[n];return r||(r=new Intl.DateTimeFormat(e,t),intlDTCache[n]=r),r}var intlNumCache={};function getCachedINF(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=intlNumCache[n];return r||(r=new Intl.NumberFormat(e,t),intlNumCache[n]=r),r}var intlRelCache={};function getCachedRTF(e,t){var n=t=void 0===t?{}:t,n=(n.base,_objectWithoutPropertiesLoose(n,["base"])),n=JSON.stringify([e,n]),r=intlRelCache[n];return r||(r=new Intl.RelativeTimeFormat(e,t),intlRelCache[n]=r),r}var sysLocaleCache=null;function systemLocale(){var e;return sysLocaleCache=sysLocaleCache||(hasIntl()&&(e=(new Intl.DateTimeFormat).resolvedOptions().locale)&&"und"!==e?e:"en-US")}function parseLocaleString(e){var t=e.indexOf("-u-");if(-1===t)return[e];var n,t=e.substring(0,t);try{n=getCachedDTF(e).resolvedOptions()}catch(e){n=getCachedDTF(t).resolvedOptions()}e=n;return[t,e.numberingSystem,e.calendar]}function intlConfigString(e,t,n){return hasIntl()?((n||t)&&(e+="-u",n&&(e+="-ca-"+n),t)&&(e+="-nu-"+t),e):[]}function mapMonths(e){for(var t=[],n=1;n<=12;n++){var r=DateTime.utc(2016,n,1);t.push(e(r))}return t}function mapWeekdays(e){for(var t=[],n=1;n<=7;n++){var r=DateTime.utc(2016,11,13+n);t.push(e(r))}return t}function listStuff(e,t,n,r,i){e=e.listingMode(n);return"error"===e?null:("en"===e?r:i)(t)}function supportsFastNumbers(e){return(!e.numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||hasIntl()&&"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)}var PolyNumberFormatter=function(){function e(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1,!t&&hasIntl()&&(t={useGrouping:!1},0<n.padTo&&(t.minimumIntegerDigits=n.padTo),this.inf=getCachedINF(e,t))}return e.prototype.format=function(e){var t;return this.inf?(t=this.floor?Math.floor(e):e,this.inf.format(t)):padStart(this.floor?Math.floor(e):roundTo(e,3),this.padTo)},e}(),PolyDateFormatter=function(){function e(e,t,n){var r,i,o;this.opts=n,this.hasIntl=hasIntl(),e.zone.universal&&this.hasIntl?(i=e.offset/60*-1,o=IANAZone.isValidZone(i=0<=i?"Etc/GMT+"+i:"Etc/GMT"+i),0!==e.offset&&o?(r=i,this.dt=e):(r="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:DateTime.fromMillis(e.ts+60*e.offset*1e3))):"local"===e.zone.type?this.dt=e:r=(this.dt=e).zone.name,this.hasIntl&&(o=Object.assign({},this.opts),r&&(o.timeZone=r),this.dtf=getCachedDTF(t,o))}var t=e.prototype;return t.format=function(){var e,t;return this.hasIntl?this.dtf.format(this.dt.toJSDate()):(e=formatString(this.opts),t=Locale.create("en-US"),Formatter.create(t).formatDateTimeFromString(this.dt,e))},t.formatToParts=function(){return this.hasIntl&&hasFormatToParts()?this.dtf.formatToParts(this.dt.toJSDate()):[]},t.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},e}(),PolyRelFormatter=function(){function e(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&hasRelative()&&(this.rtf=getCachedRTF(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):formatRelativeTime(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),Locale=function(){function i(e,t,n,r){var e=parseLocaleString(e),i=e[0],o=e[1],e=e[2];this.locale=i,this.numberingSystem=t||o||null,this.outputCalendar=n||e||null,this.intl=intlConfigString(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}i.fromOpts=function(e){return i.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)},i.create=function(e,t,n,r){void 0===r&&(r=!1);e=e||Settings.defaultLocale;return new i(e||(r?"en-US":systemLocale()),t||Settings.defaultNumberingSystem,n||Settings.defaultOutputCalendar,e)},i.resetCache=function(){sysLocaleCache=null,intlDTCache={},intlNumCache={},intlRelCache={}},i.fromObject=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.outputCalendar;return i.create(t,n,e)};var e=i.prototype;return e.listingMode=function(e){void 0===e&&(e=!0);var t=hasIntl()&&hasFormatToParts(),n=this.isEnglish(),r=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t||n&&r||e?!t||n&&r?"en":"intl":"error"},e.clone=function(e){return e&&0!==Object.getOwnPropertyNames(e).length?i.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1):this},e.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!0}))},e.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!1}))},e.months=function(n,r,e){var i=this;return void 0===r&&(r=!1),listStuff(this,n,e=void 0===e?!0:e,months,function(){var t=r?{month:n,day:"numeric"}:{month:n},e=r?"format":"standalone";return i.monthsCache[e][n]||(i.monthsCache[e][n]=mapMonths(function(e){return i.extract(e,t,"month")})),i.monthsCache[e][n]})},e.weekdays=function(n,r,e){var i=this;return void 0===r&&(r=!1),listStuff(this,n,e=void 0===e?!0:e,weekdays,function(){var t=r?{weekday:n,year:"numeric",month:"long",day:"numeric"}:{weekday:n},e=r?"format":"standalone";return i.weekdaysCache[e][n]||(i.weekdaysCache[e][n]=mapWeekdays(function(e){return i.extract(e,t,"weekday")})),i.weekdaysCache[e][n]})},e.meridiems=function(e){var n=this;return listStuff(this,void 0,e=void 0===e?!0:e,function(){return meridiems},function(){var t;return n.meridiemCache||(t={hour:"numeric",hour12:!0},n.meridiemCache=[DateTime.utc(2016,11,13,9),DateTime.utc(2016,11,13,19)].map(function(e){return n.extract(e,t,"dayperiod")})),n.meridiemCache})},e.eras=function(e,t){var n=this;return listStuff(this,e,t=void 0===t?!0:t,eras,function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[DateTime.utc(-40,1,1),DateTime.utc(2017,1,1)].map(function(e){return n.extract(e,t,"era")})),n.eraCache[e]})},e.extract=function(e,t,n){e=this.dtFormatter(e,t).formatToParts().find(function(e){return e.type.toLowerCase()===n});return e?e.value:null},e.numberFormatter=function(e){return new PolyNumberFormatter(this.intl,(e=void 0===e?{}:e).forceSimple||this.fastNumbers,e)},e.dtFormatter=function(e,t){return new PolyDateFormatter(e,this.intl,t=void 0===t?{}:t)},e.relFormatter=function(e){return void 0===e&&(e={}),new PolyRelFormatter(this.intl,this.isEnglish(),e)},e.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||hasIntl()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},e.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},_createClass(i,[{key:"fastNumbers",get:function(){return null==this.fastNumbersCached&&(this.fastNumbersCached=supportsFastNumbers(this)),this.fastNumbersCached}}]),i}();function combineRegexes(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.reduce(function(e,t){return e+t.source},"");return RegExp("^"+r+"$")}function combineExtractors(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(o){return t.reduce(function(e,t){var n=e[0],r=e[1],e=e[2],t=t(o,e),e=t[0],i=t[1],t=t[2];return[Object.assign(n,e),r||i,t]},[{},null,1]).slice(0,2)}}function parse(e){if(null!=e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i],s=a[0],a=a[1],s=s.exec(e);if(s)return a(s)}}return[null,null]}function simpleParse(){for(var e=arguments.length,i=new Array(e),t=0;t<e;t++)i[t]=arguments[t];return function(e,t){for(var n={},r=0;r<i.length;r++)n[i[r]]=parseInteger(e[t+r]);return[n,null,t+r]}}var offsetRegex=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,isoTimeBaseRegex=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,isoTimeRegex=RegExp(""+isoTimeBaseRegex.source+offsetRegex.source+"?"),isoTimeExtensionRegex=RegExp("(?:T"+isoTimeRegex.source+")?"),isoYmdRegex=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,isoWeekRegex=/(\d{4})-?W(\d\d)(?:-?(\d))?/,isoOrdinalRegex=/(\d{4})-?(\d{3})/,extractISOWeekData=simpleParse("weekYear","weekNumber","weekDay"),extractISOOrdinalData=simpleParse("year","ordinal"),sqlYmdRegex=/(\d{4})-(\d\d)-(\d\d)/,sqlTimeRegex=RegExp(isoTimeBaseRegex.source+" ?(?:"+offsetRegex.source+"|("+ianaRegex.source+"))?"),sqlTimeExtensionRegex=RegExp("(?: "+sqlTimeRegex.source+")?");function int(e,t,n){e=e[t];return isUndefined(e)?n:parseInteger(e)}function extractISOYmd(e,t){return[{year:int(e,t),month:int(e,t+1,1),day:int(e,t+2,1)},null,t+3]}function extractISOTime(e,t){return[{hours:int(e,t,0),minutes:int(e,t+1,0),seconds:int(e,t+2,0),milliseconds:parseMillis(e[t+3])},null,t+4]}function extractISOOffset(e,t){var n=!e[t]&&!e[t+1],e=signedOffset(e[t+1],e[t+2]);return[{},n?null:FixedOffsetZone.instance(e),t+3]}function extractIANAZone(e,t){return[{},e[t]?IANAZone.create(e[t]):null,t+1]}var isoTimeOnly=RegExp("^T?"+isoTimeBaseRegex.source+"$"),isoDuration=/^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function extractISODuration(e){function t(e,t){return void 0===t&&(t=!1),void 0!==e&&(t||e&&u)?-e:e}var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],e=e[8],u="-"===n[0],n=c&&"-"===c[0];return[{years:t(parseInteger(r)),months:t(parseInteger(i)),weeks:t(parseInteger(o)),days:t(parseInteger(a)),hours:t(parseInteger(s)),minutes:t(parseInteger(l)),seconds:t(parseInteger(c),"-0"===c),milliseconds:t(parseMillis(e),n)}]}var obsOffsets={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function fromStrings(e,t,n,r,i,o,a){t={year:2===t.length?untruncateYear(parseInteger(t)):parseInteger(t),month:monthsShort.indexOf(n)+1,day:parseInteger(r),hour:parseInteger(i),minute:parseInteger(o)};return a&&(t.second=parseInteger(a)),e&&(t.weekday=3<e.length?weekdaysLong.indexOf(e)+1:weekdaysShort.indexOf(e)+1),t}var rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function extractRFC2822(e){var t=e[1],n=e[2],r=e[3],i=e[4],o=e[5],a=e[6],s=e[7],l=e[8],c=e[9],u=e[10],e=e[11],t=fromStrings(t,i,r,n,o,a,s),i=l?obsOffsets[l]:c?0:signedOffset(u,e);return[t,new FixedOffsetZone(i)]}function preprocessRFC2822(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var rfc1123=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,rfc850=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,ascii=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function extractRFC1123Or850(e){var t=e[1],n=e[2],r=e[3];return[fromStrings(t,e[4],r,n,e[5],e[6],e[7]),FixedOffsetZone.utcInstance]}function extractASCII(e){var t=e[1],n=e[2],r=e[3],i=e[4],o=e[5],a=e[6];return[fromStrings(t,e[7],n,r,i,o,a),FixedOffsetZone.utcInstance]}var isoYmdWithTimeExtensionRegex=combineRegexes(isoYmdRegex,isoTimeExtensionRegex),isoWeekWithTimeExtensionRegex=combineRegexes(isoWeekRegex,isoTimeExtensionRegex),isoOrdinalWithTimeExtensionRegex=combineRegexes(isoOrdinalRegex,isoTimeExtensionRegex),isoTimeCombinedRegex=combineRegexes(isoTimeRegex),extractISOYmdTimeAndOffset=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset),extractISOWeekTimeAndOffset=combineExtractors(extractISOWeekData,extractISOTime,extractISOOffset),extractISOOrdinalDateAndTime=combineExtractors(extractISOOrdinalData,extractISOTime,extractISOOffset),extractISOTimeAndOffset=combineExtractors(extractISOTime,extractISOOffset);function parseISODate(e){return parse(e,[isoYmdWithTimeExtensionRegex,extractISOYmdTimeAndOffset],[isoWeekWithTimeExtensionRegex,extractISOWeekTimeAndOffset],[isoOrdinalWithTimeExtensionRegex,extractISOOrdinalDateAndTime],[isoTimeCombinedRegex,extractISOTimeAndOffset])}function parseRFC2822Date(e){return parse(preprocessRFC2822(e),[rfc2822,extractRFC2822])}function parseHTTPDate(e){return parse(e,[rfc1123,extractRFC1123Or850],[rfc850,extractRFC1123Or850],[ascii,extractASCII])}function parseISODuration(e){return parse(e,[isoDuration,extractISODuration])}var extractISOTimeOnly=combineExtractors(extractISOTime);function parseISOTimeOnly(e){return parse(e,[isoTimeOnly,extractISOTimeOnly])}var sqlYmdWithTimeExtensionRegex=combineRegexes(sqlYmdRegex,sqlTimeExtensionRegex),sqlTimeCombinedRegex=combineRegexes(sqlTimeRegex),extractISOYmdTimeOffsetAndIANAZone=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset,extractIANAZone),extractISOTimeOffsetAndIANAZone=combineExtractors(extractISOTime,extractISOOffset,extractIANAZone);function parseSQL(e){return parse(e,[sqlYmdWithTimeExtensionRegex,extractISOYmdTimeOffsetAndIANAZone],[sqlTimeCombinedRegex,extractISOTimeOffsetAndIANAZone])}var INVALID="Invalid Duration",lowOrderMatrix={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},casualMatrix=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},lowOrderMatrix),daysInYearAccurate=365.2425,daysInMonthAccurate=30.436875,accurateMatrix=Object.assign({years:{quarters:4,months:12,weeks:daysInYearAccurate/7,days:daysInYearAccurate,hours:24*daysInYearAccurate,minutes:24*daysInYearAccurate*60,seconds:24*daysInYearAccurate*60*60,milliseconds:24*daysInYearAccurate*60*60*1e3},quarters:{months:3,weeks:daysInYearAccurate/28,days:daysInYearAccurate/4,hours:24*daysInYearAccurate/4,minutes:24*daysInYearAccurate*60/4,seconds:24*daysInYearAccurate*60*60/4,milliseconds:24*daysInYearAccurate*60*60*1e3/4},months:{weeks:daysInMonthAccurate/7,days:daysInMonthAccurate,hours:24*daysInMonthAccurate,minutes:24*daysInMonthAccurate*60,seconds:24*daysInMonthAccurate*60*60,milliseconds:24*daysInMonthAccurate*60*60*1e3}},lowOrderMatrix),orderedUnits=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],reverseUnits=orderedUnits.slice(0).reverse();function clone(e,t,n){n={values:(n=void 0===n?!1:n)?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new Duration(n)}function antiTrunc(e){return e<0?Math.floor(e):Math.ceil(e)}function convert(e,t,n,r,i){var e=e[i][n],o=t[n]/e,o=!(Math.sign(o)===Math.sign(r[i]))&&0!==r[i]&&Math.abs(o)<=1?antiTrunc(o):Math.trunc(o);r[i]+=o,t[n]-=o*e}function normalizeValues(n,r){reverseUnits.reduce(function(e,t){return isUndefined(r[t])?e:(e&&convert(n,r,e,r,t),t)},null)}var Duration=function(){function h(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||Locale.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?accurateMatrix:casualMatrix,this.isLuxonDuration=!0}h.fromMillis=function(e,t){return h.fromObject(Object.assign({milliseconds:e},t))},h.fromObject=function(e){if(null==e||"object"!=typeof e)throw new InvalidArgumentError("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new h({values:normalizeObject(e,h.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:Locale.fromObject(e),conversionAccuracy:e.conversionAccuracy})},h.fromISO=function(e,t){var n=parseISODuration(e)[0];return n?(n=Object.assign(n,t),h.fromObject(n)):h.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},h.fromISOTime=function(e,t){var n=parseISOTimeOnly(e)[0];return n?(n=Object.assign(n,t),h.fromObject(n)):h.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},h.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the Duration is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDurationError(e);return new h({invalid:e})},h.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(t)return t;throw new InvalidUnitError(e)},h.isDuration=function(e){return e&&e.isLuxonDuration||!1};var e=h.prototype;return e.toFormat=function(e,t){void 0===t&&(t={});t=Object.assign({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Formatter.create(this.loc,t).formatDurationFromString(this,e):INVALID},e.toObject=function(e){var t;return void 0===e&&(e={}),this.isValid?(t=Object.assign({},this.values),e.includeConfig&&(t.conversionAccuracy=this.conversionAccuracy,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t):{}},e.toISO=function(){var e;return this.isValid?(e="P",0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=roundTo(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e):null},e.toISOTime=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=this.toMillis();if(t<0||864e5<=t)return null;e=Object.assign({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e);var t=this.shiftTo("hours","minutes","seconds","milliseconds"),n="basic"===e.format?"hhmm":"hh:mm",t=(e.suppressSeconds&&0===t.seconds&&0===t.milliseconds||(n+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===t.milliseconds)||(n+=".SSS"),t.toFormat(n));return t=e.includePrefix?"T"+t:t},e.toJSON=function(){return this.toISO()},e.toString=function(){return this.toISO()},e.toMillis=function(){return this.as("milliseconds")},e.valueOf=function(){return this.toMillis()},e.plus=function(e){if(!this.isValid)return this;for(var t=friendlyDuration(e),n={},r=_createForOfIteratorHelperLoose(orderedUnits);!(i=r()).done;){var i=i.value;(hasOwnProperty$1(t.values,i)||hasOwnProperty$1(this.values,i))&&(n[i]=t.get(i)+this.get(i))}return clone(this,{values:n},!0)},e.minus=function(e){return this.isValid?(e=friendlyDuration(e),this.plus(e.negate())):this},e.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,r=Object.keys(this.values);n<r.length;n++){var i=r[n];t[i]=asNumber(e(this.values[i],i))}return clone(this,{values:t},!0)},e.get=function(e){return this[h.normalizeUnit(e)]},e.set=function(e){return this.isValid?clone(this,{values:Object.assign(this.values,normalizeObject(e,h.normalizeUnit,[]))}):this},e.reconfigure=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.conversionAccuracy,t={loc:this.loc.clone({locale:t,numberingSystem:n})};return e&&(t.conversionAccuracy=e),clone(this,t)},e.as=function(e){return this.isValid?this.shiftTo(e).get(e):NaN},e.normalize=function(){var e;return this.isValid?(e=this.toObject(),normalizeValues(this.matrix,e),clone(this,{values:e},!0)):this},e.shiftTo=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!this.isValid)return this;if(0===t.length)return this;for(var r,t=t.map(function(e){return h.normalizeUnit(e)}),i={},o={},a=this.toObject(),s=_createForOfIteratorHelperLoose(orderedUnits);!(f=s()).done;){var l=f.value;if(0<=t.indexOf(l)){var c,u=l,d=0;for(c in o)d+=this.matrix[c][l]*o[c],o[c]=0;isNumber(a[l])&&(d+=a[l]);var p,f=Math.trunc(d);for(p in o[l]=d-(i[l]=f),a)orderedUnits.indexOf(p)>orderedUnits.indexOf(l)&&convert(this.matrix,a,p,i,l)}else isNumber(a[l])&&(o[l]=a[l])}for(r in o)0!==o[r]&&(i[u]+=r===u?o[r]:o[r]/this.matrix[u][r]);return clone(this,{values:i},!0).normalize()},e.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);t<n.length;t++){var r=n[t];e[r]=-this.values[r]}return clone(this,{values:e},!0)},e.equals=function(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(var t,n=_createForOfIteratorHelperLoose(orderedUnits);!(r=n()).done;){var r=r.value;if(t=this.values[r],r=e.values[r],!(void 0===t||0===t?void 0===r||0===r:t===r))return!1}return!0},_createClass(h,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),h}();function friendlyDuration(e){if(isNumber(e))return Duration.fromMillis(e);if(Duration.isDuration(e))return e;if("object"==typeof e)return Duration.fromObject(e);throw new InvalidArgumentError("Unknown duration argument "+e+" of type "+typeof e)}var INVALID$1="Invalid Interval";function validateStartEnd(e,t){return e&&e.isValid?t&&t.isValid?t<e?Interval.invalid("end before start","The end of an interval must be after its start, but you had start="+e.toISO()+" and end="+t.toISO()):null:Interval.invalid("missing or invalid end"):Interval.invalid("missing or invalid start")}var Interval=function(){function c(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}c.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the Interval is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidIntervalError(e);return new c({invalid:e})},c.fromDateTimes=function(e,t){var e=friendlyDateTime(e),t=friendlyDateTime(t),n=validateStartEnd(e,t);return null==n?new c({start:e,end:t}):n},c.after=function(e,t){t=friendlyDuration(t),e=friendlyDateTime(e);return c.fromDateTimes(e,e.plus(t))},c.before=function(e,t){t=friendlyDuration(t),e=friendlyDateTime(e);return c.fromDateTimes(e.minus(t),e)},c.fromISO=function(e,t){var n,r,i,o=(e||"").split("/",2),a=o[0],s=o[1];if(a&&s){try{l=(n=DateTime.fromISO(a,t)).isValid}catch(s){l=!1}try{i=(r=DateTime.fromISO(s,t)).isValid}catch(s){i=!1}if(l&&i)return c.fromDateTimes(n,r);if(l){o=Duration.fromISO(s,t);if(o.isValid)return c.after(n,o)}else if(i){var l=Duration.fromISO(a,t);if(l.isValid)return c.before(r,l)}}return c.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},c.isInterval=function(e){return e&&e.isLuxonInterval||!1};var e=c.prototype;return e.length=function(e){return void 0===e&&(e="milliseconds"),this.isValid?this.toDuration.apply(this,[e]).get(e):NaN},e.count=function(e){var t,n;return void 0===e&&(e="milliseconds"),this.isValid?(t=this.start.startOf(e),n=this.end.startOf(e),Math.floor(n.diff(t,e).get(e))+1):NaN},e.hasSame=function(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))},e.isEmpty=function(){return this.s.valueOf()===this.e.valueOf()},e.isAfter=function(e){return!!this.isValid&&this.s>e},e.isBefore=function(e){return!!this.isValid&&this.e<=e},e.contains=function(e){return!!this.isValid&&this.s<=e&&this.e>e},e.set=function(e){var e=void 0===e?{}:e,t=e.start,e=e.end;return this.isValid?c.fromDateTimes(t||this.s,e||this.e):this},e.splitAt=function(){var t=this;if(!this.isValid)return[];for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];for(var i=n.map(friendlyDateTime).filter(function(e){return t.contains(e)}).sort(),o=[],a=this.s,s=0;a<this.e;){var l=i[s]||this.e,l=+l>+this.e?this.e:l;o.push(c.fromDateTimes(a,l)),a=l,s+=1}return o},e.splitBy=function(e){var t=friendlyDuration(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];for(var n=this.s,r=1,i=[];n<this.e;){var o=this.start.plus(t.mapUnits(function(e){return e*r})),o=+o>+this.e?this.e:o;i.push(c.fromDateTimes(n,o)),n=o,r+=1}return i},e.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},e.overlaps=function(e){return this.e>e.s&&this.s<e.e},e.abutsStart=function(e){return!!this.isValid&&+this.e==+e.s},e.abutsEnd=function(e){return!!this.isValid&&+e.e==+this.s},e.engulfs=function(e){return!!this.isValid&&this.s<=e.s&&this.e>=e.e},e.equals=function(e){return!(!this.isValid||!e.isValid)&&this.s.equals(e.s)&&this.e.equals(e.e)},e.intersection=function(e){var t;return this.isValid?(t=(this.s>e.s?this:e).s,(e=(this.e<e.e?this:e).e)<=t?null:c.fromDateTimes(t,e)):this},e.union=function(e){var t;return this.isValid?(t=(this.s<e.s?this:e).s,e=(this.e>e.e?this:e).e,c.fromDateTimes(t,e)):this},c.merge=function(e){var e=e.sort(function(e,t){return e.s-t.s}).reduce(function(e,t){var n=e[0],e=e[1];return e?e.overlaps(t)||e.abutsStart(t)?[n,e.union(t)]:[n.concat([e]),t]:[n,t]},[[],null]),t=e[0],e=e[1];return e&&t.push(e),t},c.xor=function(e){for(var t,n=null,r=0,i=[],e=e.map(function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]}),o=_createForOfIteratorHelperLoose((t=Array.prototype).concat.apply(t,e).sort(function(e,t){return e.time-t.time}));!(a=o()).done;)var a=a.value,n=1===(r+="s"===a.type?1:-1)?a.time:(n&&+n!=+a.time&&i.push(c.fromDateTimes(n,a.time)),null);return c.merge(i)},e.difference=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return c.xor([this].concat(n)).map(function(e){return t.intersection(e)}).filter(function(e){return e&&!e.isEmpty()})},e.toString=function(){return this.isValid?"["+this.s.toISO()+" – "+this.e.toISO()+")":INVALID$1},e.toISO=function(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):INVALID$1},e.toISODate=function(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():INVALID$1},e.toISOTime=function(e){return this.isValid?this.s.toISOTime(e)+"/"+this.e.toISOTime(e):INVALID$1},e.toFormat=function(e,t){t=(void 0===t?{}:t).separator,t=void 0===t?" – ":t;return this.isValid?""+this.s.toFormat(e)+t+this.e.toFormat(e):INVALID$1},e.toDuration=function(e,t){return this.isValid?this.e.diff(this.s,e,t):Duration.invalid(this.invalidReason)},e.mapEndpoints=function(e){return c.fromDateTimes(e(this.s),e(this.e))},_createClass(c,[{key:"start",get:function(){return this.isValid?this.s:null}},{key:"end",get:function(){return this.isValid?this.e:null}},{key:"isValid",get:function(){return null===this.invalidReason}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),c}(),Info=function(){function e(){}return e.hasDST=function(e){void 0===e&&(e=Settings.defaultZone);var t=DateTime.now().setZone(e).set({month:12});return!e.universal&&t.offset!==t.set({month:6}).offset},e.isValidIANAZone=function(e){return IANAZone.isValidSpecifier(e)&&IANAZone.isValidZone(e)},e.normalizeZone=function(e){return normalizeZone(e,Settings.defaultZone)},e.months=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,i=t.locObj,i=void 0===i?null:i,t=t.outputCalendar;return(i||Locale.create(void 0===n?null:n,void 0===r?null:r,void 0===t?"gregory":t)).months(e)},e.monthsFormat=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,i=t.locObj,i=void 0===i?null:i,t=t.outputCalendar;return(i||Locale.create(void 0===n?null:n,void 0===r?null:r,void 0===t?"gregory":t)).months(e,!0)},e.weekdays=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,t=t.locObj;return((void 0===t?null:t)||Locale.create(void 0===n?null:n,void 0===r?null:r,null)).weekdays(e)},e.weekdaysFormat=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,t=t.locObj;return((void 0===t?null:t)||Locale.create(void 0===n?null:n,void 0===r?null:r,null)).weekdays(e,!0)},e.meridiems=function(e){e=(void 0===e?{}:e).locale;return Locale.create(void 0===e?null:e).meridiems()},e.eras=function(e,t){void 0===e&&(e="short");t=(void 0===t?{}:t).locale;return Locale.create(void 0===t?null:t,null,"gregory").eras(e)},e.features=function(){var e=!1,t=!1,n=!1,r=!1;if(hasIntl()){e=!0,t=hasFormatToParts(),r=hasRelative();try{n="America/New_York"===new Intl.DateTimeFormat("en",{timeZone:"America/New_York"}).resolvedOptions().timeZone}catch(e){n=!1}}return{intl:e,intlTokens:t,zones:n,relative:r}},e}();function dayDiff(e,t){function n(e){return e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()}t=n(t)-n(e);return Math.floor(Duration.fromMillis(t).as("days"))}function highOrderDiffs(e,t,n){for(var r={},i=0,o=[["years",function(e,t){return t.year-e.year}],["quarters",function(e,t){return t.quarter-e.quarter}],["months",function(e,t){return t.month-e.month+12*(t.year-e.year)}],["weeks",function(e,t){e=dayDiff(e,t);return(e-e%7)/7}],["days",dayDiff]];i<o.length;i++){var a,s,l,c=o[i],u=c[0],c=c[1];0<=n.indexOf(u)&&(a=u,c=c(e,t),t<(l=e.plus(((s={})[u]=c,s)))?(e=e.plus(((s={})[u]=c-1,s)),--c):e=l,r[u]=c)}return[e,r,l,a]}function _diff(e,t,n,r){var e=highOrderDiffs(e,t,n),i=e[0],o=e[1],a=e[2],e=e[3],s=t-i,n=n.filter(function(e){return 0<=["hours","minutes","seconds","milliseconds"].indexOf(e)}),t=(0===n.length&&(a=a<t?i.plus(((t={})[e]=1,t)):a)!==i&&(o[e]=(o[e]||0)+s/(a-i)),Duration.fromObject(Object.assign(o,r)));return 0<n.length?(e=Duration.fromMillis(s,r)).shiftTo.apply(e,n).plus(t):t}var numberingSystems={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},numberingSystemsUTF16={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},hanidecChars=numberingSystems.hanidec.replace(/[\[|\]]/g,"").split("");function parseDigits(e){var t=parseInt(e,10);if(isNaN(t)){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);if(-1!==e[n].search(numberingSystems.hanidec))t+=hanidecChars.indexOf(e[n]);else for(var i in numberingSystemsUTF16){var i=numberingSystemsUTF16[i],o=i[0],i=i[1];o<=r&&r<=i&&(t+=r-o)}}return parseInt(t,10)}return t}function digitRegex(e,t){e=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+numberingSystems[e||"latn"]+t)}var MISSING_FTP="missing Intl.DateTimeFormat.formatToParts support";function intUnit(e,t){return void 0===t&&(t=function(e){return e}),{regex:e,deser:function(e){e=e[0];return t(parseDigits(e))}}}var NBSP=String.fromCharCode(160),spaceOrNBSP="( |"+NBSP+")",spaceOrNBSPRegExp=new RegExp(spaceOrNBSP,"g");function fixListRegex(e){return e.replace(/\./g,"\\.?").replace(spaceOrNBSPRegExp,spaceOrNBSP)}function stripInsensitivities(e){return e.replace(/\./g,"").replace(spaceOrNBSPRegExp," ").toLowerCase()}function oneOf(n,r){return null===n?null:{regex:RegExp(n.map(fixListRegex).join("|")),deser:function(e){var t=e[0];return n.findIndex(function(e){return stripInsensitivities(t)===stripInsensitivities(e)})+r}}}function offset(e,t){return{regex:e,deser:function(e){return signedOffset(e[1],e[2])},groups:t}}function simple(e){return{regex:e,deser:function(e){return e[0]}}}function escapeToken(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function unitForToken(t,n){function r(e){return{regex:RegExp(escapeToken(e.val)),deser:function(e){return e[0]},literal:!0}}var i=digitRegex(n),o=digitRegex(n,"{2}"),a=digitRegex(n,"{3}"),s=digitRegex(n,"{4}"),l=digitRegex(n,"{6}"),c=digitRegex(n,"{1,2}"),u=digitRegex(n,"{1,3}"),d=digitRegex(n,"{1,6}"),p=digitRegex(n,"{1,9}"),f=digitRegex(n,"{2,4}"),h=digitRegex(n,"{4,6}"),e=function(e){if(t.literal)return r(e);switch(e.val){case"G":return oneOf(n.eras("short",!1),0);case"GG":return oneOf(n.eras("long",!1),0);case"y":return intUnit(d);case"yy":return intUnit(f,untruncateYear);case"yyyy":return intUnit(s);case"yyyyy":return intUnit(h);case"yyyyyy":return intUnit(l);case"M":return intUnit(c);case"MM":return intUnit(o);case"MMM":return oneOf(n.months("short",!0,!1),1);case"MMMM":return oneOf(n.months("long",!0,!1),1);case"L":return intUnit(c);case"LL":return intUnit(o);case"LLL":return oneOf(n.months("short",!1,!1),1);case"LLLL":return oneOf(n.months("long",!1,!1),1);case"d":return intUnit(c);case"dd":return intUnit(o);case"o":return intUnit(u);case"ooo":return intUnit(a);case"HH":return intUnit(o);case"H":return intUnit(c);case"hh":return intUnit(o);case"h":return intUnit(c);case"mm":return intUnit(o);case"m":case"q":return intUnit(c);case"qq":return intUnit(o);case"s":return intUnit(c);case"ss":return intUnit(o);case"S":return intUnit(u);case"SSS":return intUnit(a);case"u":return simple(p);case"a":return oneOf(n.meridiems(),0);case"kkkk":return intUnit(s);case"kk":return intUnit(f,untruncateYear);case"W":return intUnit(c);case"WW":return intUnit(o);case"E":case"c":return intUnit(i);case"EEE":return oneOf(n.weekdays("short",!1,!1),1);case"EEEE":return oneOf(n.weekdays("long",!1,!1),1);case"ccc":return oneOf(n.weekdays("short",!0,!1),1);case"cccc":return oneOf(n.weekdays("long",!0,!1),1);case"Z":case"ZZ":return offset(new RegExp("([+-]"+c.source+")(?::("+o.source+"))?"),2);case"ZZZ":return offset(new RegExp("([+-]"+c.source+")("+o.source+")?"),2);case"z":return simple(/[a-z_+-/]{1,256}?/i);default:return r(e)}}(t)||{invalidReason:MISSING_FTP};return e.token=t,e}var partTypeStyleToTokenVal={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function tokenForPart(e,t,n){var r=e.type,e=e.value;return"literal"===r?{literal:!0,val:e}:(e=n[r],(n="object"==typeof(n=partTypeStyleToTokenVal[r])?n[e]:n)?{literal:!1,val:n}:void 0)}function buildRegex(e){return["^"+e.map(function(e){return e.regex}).reduce(function(e,t){return e+"("+t.source+")"},"")+"$",e]}function match$1(e,t,n){var r=e.match(t);if(r){var i,o,a,s={},l=1;for(i in n)hasOwnProperty$1(n,i)&&(a=(o=n[i]).groups?o.groups+1:1,!o.literal&&o.token&&(s[o.token.val[0]]=o.deser(r.slice(l,l+a))),l+=a);return[r,s]}return[r,{}]}function dateTimeFromMatches(r){var e=isUndefined(r.Z)?isUndefined(r.z)?null:IANAZone.create(r.z):new FixedOffsetZone(r.Z);return isUndefined(r.q)||(r.M=3*(r.q-1)+1),isUndefined(r.h)||(r.h<12&&1===r.a?r.h+=12:12===r.h&&0===r.a&&(r.h=0)),0===r.G&&r.y&&(r.y=-r.y),isUndefined(r.u)||(r.S=parseMillis(r.u)),[Object.keys(r).reduce(function(e,t){var n=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(t);return n&&(e[n]=r[t]),e},{}),e]}var dummyDateTimeCache=null;function getDummyDateTime(){return dummyDateTimeCache=dummyDateTimeCache||DateTime.fromMillis(1555555555555)}function maybeExpandMacroToken(e,t){var n,r;return e.literal||!(n=Formatter.macroTokenToFormatOpts(e.val))||(r=Formatter.create(t,n).formatDateTimeParts(getDummyDateTime()).map(function(e){return tokenForPart(e,t,n)})).includes(void 0)?e:r}function expandMacroTokens(e,t){var n;return(n=Array.prototype).concat.apply(n,e.map(function(e){return maybeExpandMacroToken(e,t)}))}function explainFromTokens(t,e,n){var n=expandMacroTokens(Formatter.parseFormat(n),t),r=n.map(function(e){return unitForToken(e,t)}),i=r.find(function(e){return e.invalidReason});if(i)return{input:e,tokens:n,invalidReason:i.invalidReason};var i=buildRegex(r),r=i[0],i=i[1],r=RegExp(r,"i"),i=match$1(e,r,i),o=i[0],i=i[1],a=i?dateTimeFromMatches(i):[null,null],s=a[0],a=a[1];if(hasOwnProperty$1(i,"a")&&hasOwnProperty$1(i,"H"))throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:n,regex:r,rawMatches:o,matches:i,result:s,zone:a}}function parseFromTokens(e,t,n){e=explainFromTokens(e,t,n);return[e.result,e.zone,e.invalidReason]}var nonLeapLadder=[0,31,59,90,120,151,181,212,243,273,304,334],leapLadder=[0,31,60,91,121,152,182,213,244,274,305,335];function unitOutOfRange(e,t){return new Invalid("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function dayOfWeek(e,t,n){e=new Date(Date.UTC(e,t-1,n)).getUTCDay();return 0===e?7:e}function computeOrdinal(e,t,n){return n+(isLeapYear(e)?leapLadder:nonLeapLadder)[t-1]}function uncomputeOrdinal(e,t){var e=isLeapYear(e)?leapLadder:nonLeapLadder,n=e.findIndex(function(e){return e<t});return{month:n+1,day:t-e[n]}}function gregorianToWeek(e){var t,n=e.year,r=e.month,i=e.day,o=computeOrdinal(n,r,i),r=dayOfWeek(n,r,i),i=Math.floor((o-r+10)/7);return i<1?i=weeksInWeekYear(t=n-1):i>weeksInWeekYear(n)?(t=n+1,i=1):t=n,Object.assign({weekYear:t,weekNumber:i,weekday:r},timeObject(e))}function weekToGregorian(e){var t,n=e.weekYear,r=e.weekNumber,i=e.weekday,o=dayOfWeek(n,1,4),a=daysInYear(n),r=7*r+i-o-3,i=(r<1?r+=daysInYear(t=n-1):a<r?(t=n+1,r-=daysInYear(n)):t=n,uncomputeOrdinal(t,r)),o=i.month,a=i.day;return Object.assign({year:t,month:o,day:a},timeObject(e))}function gregorianToOrdinal(e){var t=e.year,n=computeOrdinal(t,e.month,e.day);return Object.assign({year:t,ordinal:n},timeObject(e))}function ordinalToGregorian(e){var t=e.year,n=uncomputeOrdinal(t,e.ordinal),r=n.month,n=n.day;return Object.assign({year:t,month:r,day:n},timeObject(e))}function hasInvalidWeekData(e){var t=isInteger(e.weekYear),n=integerBetween(e.weekNumber,1,weeksInWeekYear(e.weekYear)),r=integerBetween(e.weekday,1,7);return t?n?!r&&unitOutOfRange("weekday",e.weekday):unitOutOfRange("week",e.week):unitOutOfRange("weekYear",e.weekYear)}function hasInvalidOrdinalData(e){var t=isInteger(e.year),n=integerBetween(e.ordinal,1,daysInYear(e.year));return t?!n&&unitOutOfRange("ordinal",e.ordinal):unitOutOfRange("year",e.year)}function hasInvalidGregorianData(e){var t=isInteger(e.year),n=integerBetween(e.month,1,12),r=integerBetween(e.day,1,daysInMonth(e.year,e.month));return t?n?!r&&unitOutOfRange("day",e.day):unitOutOfRange("month",e.month):unitOutOfRange("year",e.year)}function hasInvalidTimeData(e){var t=e.hour,n=e.minute,r=e.second,e=e.millisecond,i=integerBetween(t,0,23)||24===t&&0===n&&0===r&&0===e,o=integerBetween(n,0,59),a=integerBetween(r,0,59),s=integerBetween(e,0,999);return i?o?a?!s&&unitOutOfRange("millisecond",e):unitOutOfRange("second",r):unitOutOfRange("minute",n):unitOutOfRange("hour",t)}var INVALID$2="Invalid DateTime",MAX_DATE=864e13;function unsupportedZone(e){return new Invalid("unsupported zone",'the zone "'+e.name+'" is not supported')}function possiblyCachedWeekData(e){return null===e.weekData&&(e.weekData=gregorianToWeek(e.c)),e.weekData}function clone$1(e,t){e={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new DateTime(Object.assign({},e,t,{old:e}))}function fixOffset(e,t,n){var r=e-60*t*1e3,i=n.offset(r);return t===i?[r,t]:i===(n=n.offset(r-=60*(i-t)*1e3))?[r,i]:[e-60*Math.min(i,n)*1e3,Math.max(i,n)]}function tsToObj(e,t){e+=60*t*1e3;t=new Date(e);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function objToTS(e,t,n){return fixOffset(objToLocalTS(e),t,n)}function adjustTime(e,t){var n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),r=Object.assign({},e.c,{year:r,month:i,day:Math.min(e.c.day,daysInMonth(r,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),i=Duration.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),t=fixOffset(objToLocalTS(r),n,e.zone),r=t[0],n=t[1];return 0!==i&&(n=e.zone.offset(r+=i)),{ts:r,o:n}}function parseDataToDateTime(e,t,n,r,i){var o=n.setZone,a=n.zone;return e&&0!==Object.keys(e).length?(e=DateTime.fromObject(Object.assign(e,n,{zone:t||a,setZone:void 0})),o?e:e.setZone(a)):DateTime.invalid(new Invalid("unparsable",'the input "'+i+"\" can't be parsed as "+r))}function toTechFormat(e,t,n){return void 0===n&&(n=!0),e.isValid?Formatter.create(Locale.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function toTechTimeFormat(e,t){var n=t.suppressSeconds,r=t.suppressMilliseconds,i=t.includeOffset,o=t.includePrefix,o=void 0!==o&&o,a=t.includeZone,a=void 0!==a&&a,s=t.spaceZone,t=t.format,t=void 0===t?"extended":t,l="basic"===t?"HHmm":"HH:mm",n=(void 0!==n&&n&&0===e.second&&0===e.millisecond||(l+="basic"===t?"ss":":ss",void 0!==r&&r&&0===e.millisecond)||(l+=".SSS"),(a||i)&&(void 0!==s&&s)&&(l+=" "),a?l+="z":i&&(l+="basic"===t?"ZZZ":"ZZ"),toTechFormat(e,l));return n=o?"T"+n:n}var defaultUnitValues={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},defaultWeekUnitValues={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},defaultOrdinalUnitValues={ordinal:1,hour:0,minute:0,second:0,millisecond:0},orderedUnits$1=["year","month","day","hour","minute","second","millisecond"],orderedWeekUnits=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],orderedOrdinalUnits=["year","ordinal","hour","minute","second","millisecond"];function normalizeUnit(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(t)return t;throw new InvalidUnitError(e)}function quickDT(e,t){for(var n=_createForOfIteratorHelperLoose(orderedUnits$1);!(r=n()).done;){var r=r.value;isUndefined(e[r])&&(e[r]=defaultUnitValues[r])}var i,o=hasInvalidGregorianData(e)||hasInvalidTimeData(e);return o?DateTime.invalid(o):(o=Settings.now(),i=(o=objToTS(e,t.offset(o),t))[0],o=o[1],new DateTime({ts:i,zone:t,o:o}))}function diffRelative(t,n,r){function e(e,t){return e=roundTo(e,o||r.calendary?0:2,!0),n.loc.clone(r).relFormatter(r).format(e,t)}function i(e){return r.calendary?n.hasSame(t,e)?0:n.startOf(e).diff(t.startOf(e),e).get(e):n.diff(t,e).get(e)}var o=!!isUndefined(r.round)||r.round;if(r.unit)return e(i(r.unit),r.unit);for(var a=_createForOfIteratorHelperLoose(r.units);!(s=a()).done;){var s=s.value,l=i(s);if(1<=Math.abs(l))return e(l,s)}return e(n<t?-0:0,r.units[r.units.length-1])}var DateTime=function(){function g(e){var t,n=e.zone||Settings.defaultZone,r=e.invalid||(Number.isNaN(e.ts)?new Invalid("invalid input"):null)||(n.isValid?null:unsupportedZone(n)),i=(this.ts=isUndefined(e.ts)?Settings.now():e.ts,null),o=null;r||(o=e.old&&e.old.ts===this.ts&&e.old.zone.equals(n)?(i=(t=[e.old.c,e.old.o])[0],t[1]):(t=n.offset(this.ts),i=tsToObj(this.ts,t),i=(r=Number.isNaN(i.year)?new Invalid("invalid input"):null)?null:i,r?null:t)),this._zone=n,this.loc=e.loc||Locale.create(),this.invalid=r,this.weekData=null,this.c=i,this.o=o,this.isLuxonDateTime=!0}g.now=function(){return new g({})},g.local=function(e,t,n,r,i,o,a){return isUndefined(e)?g.now():quickDT({year:e,month:t,day:n,hour:r,minute:i,second:o,millisecond:a},Settings.defaultZone)},g.utc=function(e,t,n,r,i,o,a){return isUndefined(e)?new g({ts:Settings.now(),zone:FixedOffsetZone.utcInstance}):quickDT({year:e,month:t,day:n,hour:r,minute:i,second:o,millisecond:a},FixedOffsetZone.utcInstance)},g.fromJSDate=function(e,t){void 0===t&&(t={});var n,e=isDate(e)?e.valueOf():NaN;return Number.isNaN(e)?g.invalid("invalid input"):(n=normalizeZone(t.zone,Settings.defaultZone)).isValid?new g({ts:e,zone:n,loc:Locale.fromObject(t)}):g.invalid(unsupportedZone(n))},g.fromMillis=function(e,t){if(void 0===t&&(t={}),isNumber(e))return e<-MAX_DATE||MAX_DATE<e?g.invalid("Timestamp out of range"):new g({ts:e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)});throw new InvalidArgumentError("fromMillis requires a numerical input, but received a "+typeof e+" with value "+e)},g.fromSeconds=function(e,t){if(void 0===t&&(t={}),isNumber(e))return new g({ts:1e3*e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)});throw new InvalidArgumentError("fromSeconds requires a numerical input")},g.fromObject=function(e){var t=normalizeZone(e.zone,Settings.defaultZone);if(!t.isValid)return g.invalid(unsupportedZone(t));var n=Settings.now(),r=t.offset(n),i=normalizeObject(e,normalizeUnit,["zone","locale","outputCalendar","numberingSystem"]),o=!isUndefined(i.ordinal),a=!isUndefined(i.year),s=!isUndefined(i.month)||!isUndefined(i.day),a=a||s,l=i.weekYear||i.weekNumber,c=Locale.fromObject(e);if((a||o)&&l)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&o)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");for(var u,s=l||i.weekday&&!a,d=tsToObj(n,r),p=(s?(m=orderedWeekUnits,u=defaultWeekUnitValues,d=gregorianToWeek(d)):o?(m=orderedOrdinalUnits,u=defaultOrdinalUnitValues,d=gregorianToOrdinal(d)):(m=orderedUnits$1,u=defaultUnitValues),!1),f=_createForOfIteratorHelperLoose(m);!(h=f()).done;){var h=h.value;isUndefined(i[h])?i[h]=(p?u:d)[h]:p=!0}var m,l=(s?hasInvalidWeekData:o?hasInvalidOrdinalData:hasInvalidGregorianData)(i)||hasInvalidTimeData(i);return l?g.invalid(l):(m=new g({ts:(n=objToTS(s?weekToGregorian(i):o?ordinalToGregorian(i):i,r,t))[0],zone:t,o:n[1],loc:c}),i.weekday&&a&&e.weekday!==m.weekday?g.invalid("mismatched weekday","you can't specify both a weekday of "+i.weekday+" and a date of "+m.toISO()):m)},g.fromISO=function(e,t){void 0===t&&(t={});var n=parseISODate(e);return parseDataToDateTime(n[0],n[1],t,"ISO 8601",e)},g.fromRFC2822=function(e,t){void 0===t&&(t={});var n=parseRFC2822Date(e);return parseDataToDateTime(n[0],n[1],t,"RFC 2822",e)},g.fromHTTP=function(e,t){void 0===t&&(t={});e=parseHTTPDate(e);return parseDataToDateTime(e[0],e[1],t,"HTTP",t)},g.fromFormat=function(e,t,n){if(void 0===n&&(n={}),isUndefined(e)||isUndefined(t))throw new InvalidArgumentError("fromFormat requires an input string and a format");var r=n,i=r.locale,r=r.numberingSystem,i=parseFromTokens(Locale.fromOpts({locale:void 0===i?null:i,numberingSystem:void 0===r?null:r,defaultToEN:!0}),e,t),r=i[0],o=i[1],i=i[2];return i?g.invalid(i):parseDataToDateTime(r,o,n,"format "+t,e)},g.fromString=function(e,t,n){return g.fromFormat(e,t,n=void 0===n?{}:n)},g.fromSQL=function(e,t){void 0===t&&(t={});var n=parseSQL(e);return parseDataToDateTime(n[0],n[1],t,"SQL",e)},g.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the DateTime is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDateTimeError(e);return new g({invalid:e})},g.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var e=g.prototype;return e.get=function(e){return this[e]},e.resolvedLocaleOpts=function(e){e=Formatter.create(this.loc.clone(e=void 0===e?{}:e),e).resolvedOptions(this);return{locale:e.locale,numberingSystem:e.numberingSystem,outputCalendar:e.calendar}},e.toUTC=function(e,t){return void 0===t&&(t={}),this.setZone(FixedOffsetZone.instance(e=void 0===e?0:e),t)},e.toLocal=function(){return this.setZone(Settings.defaultZone)},e.setZone=function(e,t){var n,t=void 0===t?{}:t,r=t.keepLocalTime,r=void 0!==r&&r,t=t.keepCalendarTime,t=void 0!==t&&t;return(e=normalizeZone(e,Settings.defaultZone)).equals(this.zone)?this:e.isValid?(n=this.ts,(r||t)&&(r=e.offset(this.ts),n=objToTS(this.toObject(),r,e)[0]),clone$1(this,{ts:n,zone:e})):g.invalid(unsupportedZone(e))},e.reconfigure=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.outputCalendar,t=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:e});return clone$1(this,{loc:t})},e.setLocale=function(e){return this.reconfigure({locale:e})},e.set=function(e){if(!this.isValid)return this;var t,e=normalizeObject(e,normalizeUnit,[]),n=!isUndefined(e.weekYear)||!isUndefined(e.weekNumber)||!isUndefined(e.weekday),r=!isUndefined(e.ordinal),i=!isUndefined(e.year),o=!isUndefined(e.month)||!isUndefined(e.day),a=e.weekYear||e.weekNumber;if((i||o||r)&&a)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&r)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");n?t=weekToGregorian(Object.assign(gregorianToWeek(this.c),e)):isUndefined(e.ordinal)?(t=Object.assign(this.toObject(),e),isUndefined(e.day)&&(t.day=Math.min(daysInMonth(t.year,t.month),t.day))):t=ordinalToGregorian(Object.assign(gregorianToOrdinal(this.c),e));i=objToTS(t,this.o,this.zone);return clone$1(this,{ts:i[0],o:i[1]})},e.plus=function(e){return this.isValid?clone$1(this,adjustTime(this,friendlyDuration(e))):this},e.minus=function(e){return this.isValid?clone$1(this,adjustTime(this,friendlyDuration(e).negate())):this},e.startOf=function(e){if(!this.isValid)return this;var t={},e=Duration.normalizeUnit(e);switch(e){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}return"weeks"===e&&(t.weekday=1),"quarters"===e&&(e=Math.ceil(this.month/3),t.month=3*(e-1)+1),this.set(t)},e.endOf=function(e){var t;return this.isValid?this.plus(((t={})[e]=1,t)).startOf(e).minus(1):this},e.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?Formatter.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):INVALID$2},e.toLocaleString=function(e){return void 0===e&&(e=DATE_SHORT),this.isValid?Formatter.create(this.loc.clone(e),e).formatDateTime(this):INVALID$2},e.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?Formatter.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},e.toISO=function(e){return void 0===e&&(e={}),this.isValid?this.toISODate(e)+"T"+this.toISOTime(e):null},e.toISODate=function(e){e=(void 0===e?{}:e).format,e="basic"===(void 0===e?"extended":e)?"yyyyMMdd":"yyyy-MM-dd";return toTechFormat(this,e=9999<this.year?"+"+e:e)},e.toISOWeekDate=function(){return toTechFormat(this,"kkkk-'W'WW-c")},e.toISOTime=function(e){var e=void 0===e?{}:e,t=e.suppressMilliseconds,n=e.suppressSeconds,r=e.includeOffset,i=e.includePrefix,e=e.format;return toTechTimeFormat(this,{suppressSeconds:void 0!==n&&n,suppressMilliseconds:void 0!==t&&t,includeOffset:void 0===r||r,includePrefix:void 0!==i&&i,format:void 0===e?"extended":e})},e.toRFC2822=function(){return toTechFormat(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},e.toHTTP=function(){return toTechFormat(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},e.toSQLDate=function(){return toTechFormat(this,"yyyy-MM-dd")},e.toSQLTime=function(e){var e=void 0===e?{}:e,t=e.includeOffset,e=e.includeZone;return toTechTimeFormat(this,{includeOffset:void 0===t||t,includeZone:void 0!==e&&e,spaceZone:!0})},e.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},e.toString=function(){return this.isValid?this.toISO():INVALID$2},e.valueOf=function(){return this.toMillis()},e.toMillis=function(){return this.isValid?this.ts:NaN},e.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},e.toJSON=function(){return this.toISO()},e.toBSON=function(){return this.toJSDate()},e.toObject=function(e){var t;return void 0===e&&(e={}),this.isValid?(t=Object.assign({},this.c),e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t):{}},e.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},e.diff=function(e,t,n){var r;return void 0===t&&(t="milliseconds"),void 0===n&&(n={}),this.isValid&&e.isValid?(n=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),t=maybeArray(t).map(Duration.normalizeUnit),t=_diff((r=e.valueOf()>this.valueOf())?this:e,r?e:this,t,n),r?t.negate():t):Duration.invalid(this.invalid||e.invalid,"created by diffing an invalid DateTime")},e.diffNow=function(e,t){return void 0===e&&(e="milliseconds"),void 0===t&&(t={}),this.diff(g.now(),e,t)},e.until=function(e){return this.isValid?Interval.fromDateTimes(this,e):this},e.hasSame=function(e,t){var n;return!!this.isValid&&(n=e.valueOf(),(e=this.setZone(e.zone,{keepLocalTime:!0})).startOf(t)<=n)&&n<=e.endOf(t)},e.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},e.toRelative=function(e){var t,n,r,i;return this.isValid?(t=(e=void 0===e?{}:e).base||g.fromObject({zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0,r=["years","months","days","hours","minutes","seconds"],i=e.unit,Array.isArray(e.unit)&&(r=e.unit,i=void 0),diffRelative(t,this.plus(n),Object.assign(e,{numeric:"always",units:r,unit:i}))):null},e.toRelativeCalendar=function(e){return void 0===e&&(e={}),this.isValid?diffRelative(e.base||g.fromObject({zone:this.zone}),this,Object.assign(e,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},g.min=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.every(g.isDateTime))return bestBy(t,function(e){return e.valueOf()},Math.min);throw new InvalidArgumentError("min requires all arguments be DateTimes")},g.max=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.every(g.isDateTime))return bestBy(t,function(e){return e.valueOf()},Math.max);throw new InvalidArgumentError("max requires all arguments be DateTimes")},g.fromFormatExplain=function(e,t,n){var n=n=void 0===n?{}:n,r=n.locale,n=n.numberingSystem;return explainFromTokens(Locale.fromOpts({locale:void 0===r?null:r,numberingSystem:void 0===n?null:n,defaultToEN:!0}),e,t)},g.fromStringExplain=function(e,t,n){return g.fromFormatExplain(e,t,n=void 0===n?{}:n)},_createClass(g,[{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function(){return this._zone}},{key:"zoneName",get:function(){return this.isValid?this.zone.name:null}},{key:"year",get:function(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function(){return this.isValid?this.c.month:NaN}},{key:"day",get:function(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function(){return this.isValid?possiblyCachedWeekData(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?possiblyCachedWeekData(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?possiblyCachedWeekData(this).weekday:NaN}},{key:"ordinal",get:function(){return this.isValid?gregorianToOrdinal(this.c).ordinal:NaN}},{key:"monthShort",get:function(){return this.isValid?Info.months("short",{locObj:this.loc})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?Info.months("long",{locObj:this.loc})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?Info.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?Info.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}},{key:"offset",get:function(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function(){return this.isValid?this.zone.universal:null}},{key:"isInDST",get:function(){return!this.isOffsetFixed&&(this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return isLeapYear(this.year)}},{key:"daysInMonth",get:function(){return daysInMonth(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?daysInYear(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?weeksInWeekYear(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return DATE_SHORT}},{key:"DATE_MED",get:function(){return DATE_MED}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return DATE_MED_WITH_WEEKDAY}},{key:"DATE_FULL",get:function(){return DATE_FULL}},{key:"DATE_HUGE",get:function(){return DATE_HUGE}},{key:"TIME_SIMPLE",get:function(){return TIME_SIMPLE}},{key:"TIME_WITH_SECONDS",get:function(){return TIME_WITH_SECONDS}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return TIME_WITH_SHORT_OFFSET}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return TIME_WITH_LONG_OFFSET}},{key:"TIME_24_SIMPLE",get:function(){return TIME_24_SIMPLE}},{key:"TIME_24_WITH_SECONDS",get:function(){return TIME_24_WITH_SECONDS}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return TIME_24_WITH_SHORT_OFFSET}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return TIME_24_WITH_LONG_OFFSET}},{key:"DATETIME_SHORT",get:function(){return DATETIME_SHORT}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return DATETIME_SHORT_WITH_SECONDS}},{key:"DATETIME_MED",get:function(){return DATETIME_MED}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return DATETIME_MED_WITH_SECONDS}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return DATETIME_MED_WITH_WEEKDAY}},{key:"DATETIME_FULL",get:function(){return DATETIME_FULL}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return DATETIME_FULL_WITH_SECONDS}},{key:"DATETIME_HUGE",get:function(){return DATETIME_HUGE}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return DATETIME_HUGE_WITH_SECONDS}}]),g}();function friendlyDateTime(e){if(DateTime.isDateTime(e))return e;if(e&&e.valueOf&&isNumber(e.valueOf()))return DateTime.fromJSDate(e);if(e&&"object"==typeof e)return DateTime.fromObject(e);throw new InvalidArgumentError("Unknown datetime argument: "+e+", of type "+typeof e)}var VERSION="1.28.1",DateTime_1=luxon.DateTime=DateTime;luxon.Duration=Duration,luxon.FixedOffsetZone=FixedOffsetZone,luxon.IANAZone=IANAZone,luxon.Info=Info,luxon.Interval=Interval,luxon.InvalidZone=InvalidZone,luxon.LocalZone=LocalZone,luxon.Settings=Settings,luxon.VERSION=VERSION,luxon.Zone=Zone;const useStyles$f=makeStyles()(()=>({root:{padding:"15px 30px"},title:{display:"flex"},action:{fontWeight:600},time:{fontSize:"12px",paddingLeft:"15px",lineHeight:"21px"},description:{lineHeight:"150%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},divider:{margin:"0 30px",backgroundColor:"#D5DFE9",height:"0.5px"}})),ActivityCard=({longFormatTime:e=!1,data:{createdDateTime:t,event:n,description:r}})=>{var i=useStyles$f()["classes"];return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:i.root,"data-testid":"activity-card"},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:i.title},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:i.action},{children:n})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:i.time},{children:e?DateTime_1.fromISO(t||"").toFormat("F"):DateTime_1.fromISO(t||"").toFormat("tt")}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({placement:"top-start",title:r||""},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1",className:i.description},{children:r}))}))})]})),jsxRuntime.exports.jsx(Divider$1,{className:i.divider})]})},useStyles$e=makeStyles()(e=>({root:{width:"100%",height:"100%"},header:{opacity:.9,display:"flex",justifyContent:"space-between",padding:e.spacing(4,6),position:"relative"},title:{opacity:.9,padding:e.spacing(4,6,2,6)},titleText:{textTransform:"uppercase",color:e.palette.secondary.main},scrollContent:{overflowY:"auto",height:"calc(100% - 65px)"}})),filters$2=[{value:"all",title:"All Activities"},{value:"today",title:"Activities today"}],today$1=DateTime_1.local().startOf("day"),yesterday=DateTime_1.local().plus({days:-1}).startOf("day"),ActivityPanel=({data:e,filter:t,onChangeFilter:n})=>{var r=useStyles$e()["classes"],i=null==e?void 0:e.filter(e=>DateTime_1.fromISO(e.createdDateTime||"").hasSame(today$1,"day")),o=null==e?void 0:e.filter(e=>DateTime_1.fromISO(e.createdDateTime||"").hasSame(yesterday,"day")),e=null==e?void 0:e.filter(e=>DateTime_1.fromISO(e.createdDateTime||"").startOf("day")<yesterday);return jsxRuntime.exports.jsxs("div",Object.assign({className:r.root},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:r.header},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.titleText},{children:"Today"})),jsxRuntime.exports.jsx(Filter,{data:filters$2,filter:t,onFilter:e=>{n(null==(e=null==e?void 0:e.target)?void 0:e.value)}})]})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:r.scrollContent},{children:[jsxRuntime.exports.jsx(Box$1,{children:null==i?void 0:i.map((e,t)=>jsxRuntime.exports.jsx(ActivityCard,{longFormatTime:!1,data:e},t))}),"all"===t&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[0<(null==o?void 0:o.length)&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.title,"data-testid":"filter-all-box"},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.titleText},{children:"Yesterday"}))})),jsxRuntime.exports.jsx(Box$1,{children:o.map((e,t)=>jsxRuntime.exports.jsx(ActivityCard,{longFormatTime:!1,data:e},t))})]}),0<(null==e?void 0:e.length)&&jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:r.title},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:r.titleText},{children:"Older"}))})),jsxRuntime.exports.jsx(Box$1,{children:e.map((e,t)=>jsxRuntime.exports.jsx(ActivityCard,{longFormatTime:!0,data:e},t))})]})]})]}))]}))},useStyles$d=makeStyles()((e,{appListV2:t,type:n},r)=>({listItem:{display:"flex",cursor:"pointer",alignItems:"center",height:t?"unset":70,width:"100%",padding:t?0:e.spacing(0,6),"&:hover":{backgroundColor:"#EEF3F9"},["& ."+r.appName]:{marginLeft:e.spacing(3)}},iconButton:{borderRadius:4,textAlign:"center",width:"94px",height:"110px",cursor:"pointer",["& ."+r.appName]:{marginBottom:e.spacing(3)}},appName:{textAlign:"center",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",textTransform:"capitalize",width:"switcherGrid"===n?"80%":"unset",margin:"switcherGrid"===n?"auto":"unset"},image:{display:"flex",justifyContent:"center",alignItems:"center",margin:t?"10px":e.spacing(3.8,0)},bounding:{padding:"17px 27px 19px 27px"},img:{width:40,height:40},switcherGrid:{borderRadius:4,textAlign:"center",padding:"20px 0 20px 0",cursor:"pointer","&:hover":{backgroundColor:"#EEF3F9"}},dialogTitle:{fontSize:"18px",fontFamily:"Nunito",fontStyle:"normal",lineHeight:"24px",letterSpacing:"-1.30385e-09px",fontWeight:400,cursor:"default"}})),namespace$3="user-app-group",initialState$3={appGroups:[],uiStatus:Status.idle,appGroupsRootFolderId:""},appGroupSlice=createSlice({name:namespace$3,initialState:initialState$3,reducers:{fetchUserAppGroupsStart(e){e.uiStatus=Status.loading},fetchUserAppGroupSuccess(e,t){e.uiStatus=Status.success,e.appGroups=t.payload},fetchUserAppGroupsFailed(e){e.uiStatus=Status.failure},addAppToGroup(e,t){const{destination:n,appId:r}=t.payload;var t=(e.appGroups||[]).findIndex(e=>e.id===n),i=(((e.appGroups||[])[t]||{}).apps||[]).find(e=>e===r);-1===t||i||(e.appGroups||[])[t].apps.push(r)},removeAppFromGroup(e,t){const{source:n,appId:r}=t.payload;t=(e.appGroups||[]).findIndex(e=>e.id===n);-1!==t&&((e.appGroups||[])[t].apps=(e.appGroups||[])[t].apps.filter(e=>e!==r))},updateGroupPriority(e,t){var n=[...e.appGroups||[]];const{groupId:r,newPriority:i}=t.payload,o=n.find(e=>e.id===r);o&&(i>o.priority?(n.forEach(e=>{e.priority<=i&&e.priority>o.priority&&--e.priority}),o.priority=i):i<o.priority&&(n.forEach(e=>{e.priority>=i&&e.priority<o.priority&&(e.priority+=1)}),o.priority=i),n.sort((e,t)=>e.priority-t.priority),e.appGroups=n)},createNewAppGroupPlaceholder(e){var t;e.appGroups.find(e=>e.isNew)||((t=[...e.appGroups]).forEach(e=>e.priority+=1),t.unshift({groupName:"",id:"new-group-placeholder",treeObjectId:"",isNew:!0,apps:[],priority:0,expanded:!0,isEdited:!0}),e.appGroups=t)},removeNewAppGroupPlaceholder(e){e.appGroups=(e.appGroups||[]).filter(e=>!e.isNew&&(--e.priority,!0))},createNewAppGroupStart(e,t){return e},editAppGroup(e,t){const{edit:n,groupId:r,newGroupName:i}=t.payload;if(n&&(e.appGroups||[]).find(e=>e.isEdited))return;var o,t=(e.appGroups||[]).findIndex(e=>e.id===r);-1!==t&&(!((o=[...e.appGroups||[]])[t].isEdited=n)&&i&&(o[t].groupName=i),e.appGroups=o)},deleteAppGroup(e,t){return e},expandCollapse(e,t){var n,r=(e.appGroups||[]).findIndex(e=>e.id===t.payload);-1!==r&&(n=(e.appGroups||[])[r].isExpanded,(e.appGroups||[])[r].isExpanded=!n&&void 0!==n)},fetchUserAppGroupsRootFolderIdSuccess(e,t){e.appGroupsRootFolderId=t.payload}}}),{addAppToGroup,removeAppFromGroup,updateGroupPriority,removeNewAppGroupPlaceholder,createNewAppGroupStart,editAppGroup,deleteAppGroup,expandCollapse,fetchUserAppGroupsStart,fetchUserAppGroupSuccess,fetchUserAppGroupsFailed,fetchUserAppGroupsRootFolderIdSuccess}=appGroupSlice.actions,appGroupReducer=appGroupSlice.reducer;function __awaiter$1(e,a,s,l){return new(s=s||Promise)(function(n,t){function r(e){try{o(l.next(e))}catch(e){t(e)}}function i(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((l=l.apply(e,a||[])).next())})}const fetchUserAppGroupsRootFolderIdApi=(e,t)=>__awaiter$1(void 0,void 0,void 0,function*(){return(yield baseGraphQLApiWithError({query:`
|
|
1276
1276
|
mutation createApplicationGroupRootFolder {
|
|
1277
1277
|
createRootFolders(rootFolderType:application) {
|
|
1278
1278
|
id
|
|
@@ -1390,4 +1390,4 @@ createScheduledJob(input:{
|
|
|
1390
1390
|
}
|
|
1391
1391
|
}
|
|
1392
1392
|
}
|
|
1393
|
-
`,graphEndpoint:e,token:t})}catch(e){return{success:!1}}});function*getCurrentUserSaga(){var e=yield select(graphEndpointSelector),t=yield select(sessionTokenSelector),e=yield call$7(getCurrentUserApi,e,t);null!=e&&e.errors&&0<(null==e?void 0:e.errors.length)&&(null==(t=e.errors[0].path)||!t.includes("userSettings"))?console.error("getCurrentUser error"):(t=Object.assign(Object.assign({},null==(t=null==e?void 0:e.data)?void 0:t.me),{organizationRole:{organizationId:get$3(e,"data.me.organization.id","")},organization:Object.assign({},null==(e=null==(t=null==e?void 0:e.data)?void 0:t.me)?void 0:e.organization)}),yield put(getCurrentUserSuccess(t)))}function*getCurrentApplicationInfoSaga(e){var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),e=e.payload["applicationId"],e=yield call$7(getApplicationInfo,e,t,n);null!=e&&e.errors&&0<(null==e?void 0:e.errors.length)?console.error("getCurrentApplicationInfo error"):yield put(getCurrentAppIconSuccess(null==(n=null==(t=null==e?void 0:e.data)?void 0:t.application)?void 0:n.iconUrl))}function*userSaga(){yield all([takeEvery$1(GET_CURRENT_USER,getCurrentUserSaga)]),yield all([takeEvery$1(GET_CURRENT_APP_ICON,getCurrentApplicationInfoSaga)])}function*bootFunction(){yield take(BOOTED)}function*booting(){yield takeEvery$1(BOOTING,bootFunction)}function*logoutListener(e){for(var t=e.payload;;)yield take(logout$1),t?null!=t&&t():yield put(logoutUser$1())}function*notificationActionClickedSaga(e){const t=e.payload;yield takeEvery$1(onNotificationActionClicked,function*(e){t&&(yield call$7(t,e.payload))})}function*handleAppSwitchListenerSetup(e){const t=e.payload;yield takeEvery$1(appSwitcherHandleClick,function*(e){e=e.payload;t?t(e):yield put(appSwitcherHandleClickAppNatively(e))})}function*rootSaga(){yield all([fork(userSaga),fork(booting),takeLatest$1(listenLogout,logoutListener),takeLatest$1(appSwitcherSetupListener,handleAppSwitchListenerSetup),takeLatest$1(initNotificationAction,notificationActionClickedSaga)])}function getAppbarModule(){return{id:"os-app-bar",reducerMap:{[nameSpace$1]:userReducer},sagas:[rootSaga],initialActions:[]}}function App(e){var{onLogout:t,onClickNotificationAction:n,onAppSwitch:r,onClickOrgIcon:i,showNotifications:o,applicationId:a,searchBarMountId:s}=e,e=__rest(e,["onLogout","onClickNotificationAction","onAppSwitch","onShowSettingPanel","onClickOrgIcon","onClickHelpIcon","showNotifications","applicationId","searchBarMountId"]);const l=useDispatch(),[c,u]=react.exports.useState(!1),[d,p]=react.exports.useState(!1),[f,h]=react.exports.useState(!1),[m,g]=react.exports.useState(!1),[v,y]=react.exports.useState(!1),[x,b]=react.exports.useState(!1);var C=(useSelector(userSelector)||{})["currentUser"];const{panels:$=[]}=useSelector(rootSelector);var w=useSelector(unseenNotificationSelector);const S=useSelector(notificationStatusSelector);var E=useSelector(betaFeaturesSelector),C=(C||{})["organization"];const _=useSelector(authSelector)["user"];var{application:T=[]}=useSelector(applicationSelector)||{};const[j,I]=react.exports.useState(!1);const R=useSelector(appIdSelector),O=useSelector(selectApplicationConfig),[L,M]=react.exports.useState(!1);var N=useSelector(selectHasUserCreateRootFolderPermission);const P=gqlIntrospection.isOperationValid("fileApplication","mutation")&&N;function A(){u(!1),h(!1),g(!1),p(!1),y(!1),b(!1)}function k(){null!==$&&void 0!==$&&$.forEach(e=>{l(hidePanel$1(e.panelId))})}return react.exports.useEffect(()=>{var e,t=window.location["search"];l(actions$2.userApplicationSettings.fetchApplicationConfigStart({appId:R})),"?panel=invite-requests"!==t||j||(I(!0),t={name:"INVITE_REQUESTS_PANEL",config:{name:"Invite Requests"}},e={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,size:"medium",zIndex:1001,parentPanelId:null,dimmed:0,dimmedStatus:"dimParent",header:{title:"INVITE REQUESTS"}},l(mountPanel$1({panelId:"INVITE_REQUESTS_PANEL",microFrontend:t,panelConfig:e})))},[]),react.exports.useEffect(()=>{null!==O&&void 0!==O&&O.length&&M(!0)},[O]),react.exports.useEffect(()=>{"success"===S&&l(markAllNotificationsSeenRequest())},[S,l]),react.exports.useEffect(()=>{l(getCurrentUser()),a&&l(getCurrentAppIcon({applicationId:a}))},[l,a]),react.exports.useEffect(()=>{l({type:listenLogout().type,payload:t})},[l,t]),react.exports.useEffect(()=>{n&&l(initNotificationAction(n))},[l,n]),react.exports.useEffect(()=>{l({type:appSwitcherSetupListener().type,payload:r})},[l,r]),react.exports.useEffect(()=>{l(onBooted())},[l]),react.exports.useEffect(()=>{$&&0!==$.length||A()},[$]),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getAppbarModule(),getAppbarPanelModule(),getNotificationModule$1(),getEventsModule(),getUserApplicationSettingsModule()]},{children:jsxRuntime.exports.jsx("div",Object.assign({className:"App",id:"aiware-app-bar","data-testid":"aiware-app-bar"},{children:jsxRuntime.exports.jsx(NewAppBar,Object.assign({isEnableOrgPanel:!1,onCloseSetting:function(){k()},onOpenSetting:function(){var e,t;c?(u(!1),k()):(A(),u(!0),k(),e={name:"APP_BAR_PANEL",config:{name:"Veritone",dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:VERITONE_PANEL_ID,type:"TAB_TEMPLATE",marginTop:55,withTab:!0,width:80,zIndex:1004,userRoles:null===_||void 0===_?void 0:_.roles,header:{divider:!0,title:""},footer:{logo:!0},size:"xlarge",fullScreen:!1},l(mountPanel$1({panelId:VERITONE_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenHelpCenter:function(){var e,t;d?(p(!1),k()):(A(),k(),p(!0),e={name:"HELP_PANEL",config:{name:"Help panel",dataId:"helpDataId",type:"SIMPLE_PANEL"}},t={panelId:HELP_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,size:"large",header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.headerTitle.helpCenter",defaultMessage:"Help Center",description:"The header title for the help center."}),actions:[{iconUrl:img$Q,action:{type:"OPEN_HELP_LINK"}}]}},l(mountPanel$1({panelId:HELP_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenNotification:function(){var e,t;null!=o&&o(),v?(y(!1),k()):(A(),k(),y(!0),e={name:"NOTIFICATION_PANEL",config:{name:"Notification Panel",dataId:"notificationDataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:413,header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.panel.notifications",defaultMessage:"Notifications Center",description:"Title of the notifications center panel"}),actions:[]}},l(mountPanel$1({panelId:NOTIFICATION_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenUserApplicationSettings:function(){var e,t;x?(b(!1),k()):(A(),k(),b(!0),e={name:"USER_APPLICATION_SETTINGS_PANEL",config:{name:"User application settings",dataId:"userApplicationSettingsDataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:USER_APPLICATION_SETTINGS_PANEL,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:320,header:{divider:!1,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header.panelTitle.user-application-name-settings",defaultMessage:"Application Settings",description:"Title of user application name settings panel"})}},l(mountPanel$1({panelId:USER_APPLICATION_SETTINGS_PANEL,microFrontend:e,panelConfig:t})))},onDashboardClick:function(){console.log("HANDLE DASHBOARD CLICK!")},organization:C,onClickOrgIcon:function(){var e,t;null!=i&&i(),m?(g(!1),k()):(A(),k(),g(!0),e={name:"ORGANIZATION_PANEL",config:{name:"Veritone",tabId:TabId.ORGANIZATION_PANEL,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:ORGANIZATION_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:420,header:{divider:!0,title:"ORGANIZATIONS"}},l(mountPanel$1({panelId:ORGANIZATION_PANEL_ID,microFrontend:e,panelConfig:t})))},panels:$,searchBarMountId:s,openSetting:{openHelpPanel:!1,openNotificationPanel:!1,openAppSwitchPanel:!1,openOrgSwitchPanel:!1,openVeritonePanel:!1,openUserApplicationSettingsPanel:!1},unseenCount:w,onClickAppSwitchIcon:function(){var e,t;f?(h(!1),k()):(A(),k(),h(!0),e={name:"APP_BAR_PANEL",config:{name:"APP_BAR_PANEL",tabId:TabId.APP_PANEL,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:APPLICATION_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:720,header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header.panelTitle-app-switcher",defaultMessage:"App Switcher",description:"Title of applications panel list"}),actions:P?[{action:{type:"user-app-group/createNewAppGroupPlaceholder"},label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header-action.new-app-group",defaultMessage:"New App Group",description:"New App Group action button"}),variant:"contained",size:"large",color:"primary",submit:!0}]:void 0}},l(mountPanel$1({panelId:APPLICATION_PANEL_ID,microFrontend:e,panelConfig:t})))},applications:T,showDashboardIcon:E,userApplicationSettingsIcon:L},e))}))}))})})}const headerBarSelector=e=>null==e?void 0:e.aiWareHeaderBar,registry={[AvailableWidgets.APP_BAR]:App,[AvailableComponents.APP_BAR_PANEL]:SettingPanelComponent},registryLookup=n=>__awaiter$a(void 0,void 0,void 0,function*(){if(registry[n])return registry[n];let e,t=null;switch(n){case AvailableWidgets.SAMPLE_APP_BAR:e=yield import("./js-core.esm2.js"),t=e.SampleAppBar;break;case AvailableWidgets.RESET_PASSWORD:e=yield import("./js-core.esm4.js"),t=e.ResetPassword;break;case AvailableWidgets.FLOW_CENTER:e=yield import("./js-core.esm5.js"),t=e.App;break;case AvailableWidgets.FLOW_WIDGET:e=yield import("./js-core.esm7.js").then(function(e){return e.i}),t=e.App;break;case AvailableWidgets.ENGINE_CENTER_BROWSE:e=yield import("./js-core.esm19.js"),t=e.EngineCenterBrowse;break;case AvailablePanels.SIMPLE_PANEL:e=yield import("./js-core.esm39.js"),t=e.Panel;break;case AvailablePanels.APP_BAR_PANEL_TEMPLATE:e=yield import("./js-core.esm41.js"),t=e.AppbarPanel;break;case AvailablePanels.APP_BAR_TAB_PANEL_TEMPLATE:e=yield import("./js-core.esm41.js"),t=e.AppbarTabPanel;break;case AvailablePanels.TAB_TEMPLATE:e=yield import("./js-core.esm41.js"),t=e.TabPanel;break;case AvailableComponents.NOTIFICATION_PANEL:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationPanel;break;case AvailableComponents.NOTIFICATION_DETAIL:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationDetailPanel;break;case AvailableComponents.NOTIFICATION_SETTING:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationSetting;break;case AvailableComponents.NOTIFICATION_UTILITY:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationUtilityPanel;break;case AvailableComponents.NOTIFICATION_APPLICATION:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationApplication;break;case AvailableComponents.HELP_PANEL:e=yield Promise.resolve().then(function(){return index_esm}),t=e.HelpCenterPanel;break;case AvailableComponents.EDIT_PROFILE_PICTURE:e=yield Promise.resolve().then(function(){return index_esm$1}),t=e.EditProFilePicture;break;case AvailableComponents.TEST_COMPONENT:e=yield import("./js-core.esm39.js"),t=e.SamplePanel1;break;case AvailableComponents.TEST_COMPONENT2:e=yield import("./js-core.esm39.js"),t=e.SamplePanel2;break;case AvailableComponents.TEST_COMPONENT3:e=yield import("./js-core.esm39.js"),t=e.SamplePanel3;break;case AvailableComponents.SETTING_PREFERENCE:e=yield import("./js-core.esm45.js"),t=e.SettingsPreferencesPanel;break;case AvailableComponents.ORGANIZATION_PANEL:e=yield import("./js-core.esm42.js"),t=e.OrganizationPanel;break;case AvailableComponents.INVITE_USERS_PANEL:e=yield import("./js-core.esm42.js"),t=e.InviteUsersPanel;break;case AvailableComponents.INVITE_REQUESTS_PANEL:e=yield import("./js-core.esm42.js"),t=e.InviteRequestsPanel;break;case AvailableComponents.REVIEW_ORG_INVITE_PANEL:e=yield import("./js-core.esm42.js"),t=e.ReviewRequestPanel;break;case AvailableComponents.ADD_APPLICATIONS:e=yield import("./js-core.esm42.js"),t=e.AddApplicationsPanel;break;case AvailableComponents.DATA_CENTER_BROWSE:e=yield import("./js-core.esm46.js"),t=e.DataCenterBrowse;break;case AvailableComponents.DATA_CENTER_FOLDERS_AND_FILES:e=yield import("./js-core.esm46.js"),t=e.FoldersAndFilesPanel;break;case AvailableComponents.DATA_CENTER_FILE_INFO_PANEL:e=yield import("./js-core.esm46.js"),t=e.FileInfoPanel;break;case AvailableComponents.DATA_CENTER_IMPORTER:e=yield import("./js-core.esm58.js"),t=e.DataCenterImporter;break;case AvailableComponents.DATA_LABELER:e=yield import("./js-core.esm60.js"),t=e.DataLabelerPanel;break;case AvailableComponents.ADMIN_CENTER_OPEN_ID:e=yield import("./js-core.esm61.js"),t=e.AdminCenterOpenId;break;case AvailableComponents.ADMIN_CENTER_BROWSE:e=yield import("./js-core.esm62.js"),t=e.AdminCenterBrowse;break;case AvailableComponents.DATA_CENTER_PROCESS_AI:e=yield import("./js-core.esm66.js"),t=e.DataCenterProcessAI;break;case AvailableComponents.ENGINE_CENTER_NEW:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.EngineCenterNew;break;case AvailableComponents.ENGINE_CENTER_FILTER:e=yield import("./js-core.esm19.js"),t=e.EngineCenterFilter;break;case AvailableComponents.APP_CENTER_FILTER:e=yield import("./js-core.esm67.js"),t=e.AppCenterFilter;break;case AvailableComponents.ENGINE_CENTER_DETAILS:e=yield import("./js-core.esm19.js"),t=e.EngineDetails;break;case AvailableComponents.ENGINE_CENTER_NEW_BUILD:e=yield import("./js-core.esm19.js"),t=e.CreateNewBuildPanel;break;case AvailableComponents.ENGINE_CENTER_CUSTOM_FIELDS_FORM:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.EngineCenterCustomFieldsForm;break;case AvailableComponents.ENGINE_CENTER_SCHEMAS_FORM_PANEL:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.SchemasFormPanel;break;case AvailableComponents.ENGINE_CENTER_INPUT_TYPE_FLYOUT:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.InputTypeFlyout;break;case AvailableComponents.ENGINE_CENTER_EDIT_RELEASE_NOTES:e=yield import("./js-core.esm19.js"),t=e.EditReleaseNotes;break;case AvailableComponents.ENGINE_CENTER_VERSION_HISTORY_PANEL:e=yield import("./js-core.esm19.js"),t=e.VersionHistoryPanel;break;case AvailableComponents.SUPPORTED_FILE_TYPES:e=yield import("./js-core.esm58.js"),t=e.SupportedFileTypes;break;case AvailableComponents.EDIT_FILE_METADATA:e=yield import("./js-core.esm58.js"),t=e.EditFileMetadata;break;case AvailableWidgets.APP_CENTER_BROWSE:e=yield import("./js-core.esm67.js"),t=e.AppCenterBrowse;break;case AvailableComponents.APP_CENTER_NEW:e=yield import("./js-core.esm68.js"),t=e.AppCenterNew;break;case AvailableComponents.APP_CENTER_ADD_FLOW_PANEL:e=yield import("./js-core.esm68.js"),t=e.AppCenterAddFlowPanel;break;case AvailableComponents.APP_CENTER_ADD_SCHEMA_PANEL:e=yield import("./js-core.esm68.js"),t=e.AppCenterAddSchemaPanel;break;case AvailableComponents.APP_CENTER_CONFIG_FIELDS_FORM:e=yield import("./js-core.esm68.js"),t=e.AppCenterConfigFieldsForm;break;case AvailableComponents.APP_CENTER_CONTEXT_MENU_EXTENSIONS:e=yield import("./js-core.esm68.js"),t=e.AppCenterContextMenuExtensionPanel;break;case AvailableComponents.APP_CENTER_EVENT_PANEL:e=yield import("./js-core.esm68.js"),t=e.AppCenterEventPanel;break;case AvailableComponents.APP_CENTER_AUTOMATE_PALETTE_INTEGRATION_PANEL:e=yield import("./js-core.esm68.js"),t=e.AppCenterPaletteIntegrationPanel;break;case AvailableComponents.APP_CENTER_BROWSE:e=yield import("./js-core.esm67.js"),t=e.AppCenterBrowse;break;case AvailableComponents.APP_CENTER_DETAILS:e=yield import("./js-core.esm67.js"),t=e.AppCenterDetails;break;case AvailableComponents.DATA_CENTER_ENGINE_SELECTION:e=yield import("./js-core.esm66.js"),t=e.DataCenterEngineSelection;break;case AvailableComponents.ADMIN_CENTER_NEW_GROUP_PANEL:e=yield import("./js-core.esm55.js"),t=e.NewGroupPanel;break;case AvailableComponents.PERMISSIONS_PANEL:e=yield import("./js-core.esm48.js"),t=e.PermissionsPanel;break;case AvailableComponents.GROUP_INFO_PANEL:e=yield import("./js-core.esm48.js"),t=e.GroupInfoPanel;break;case AvailableComponents.NEW_PERMISSION_SET_PANEL:e=yield import("./js-core.esm48.js"),t=e.NewPermissionSetPanel;break;case AvailableComponents.PERMISSION_SET_DETAILS_PANEL:e=yield import("./js-core.esm48.js"),t=e.PermissionSetDetailsPanel;break;case AvailableComponents.DATA_CENTER_MDP_IFRAME_PANEL:e=yield import("./js-core.esm46.js"),t=e.MediaDetailsPanelIframe;break;case AvailableComponents.DATA_CENTER_INGESTION_CREATION_PANEL:e=yield import("./js-core.esm46.js"),t=e.IngestionCreationPanel;break;case AvailableComponents.DATA_CENTER_SELECT_IMPORT_SOURCE:e=yield import("./js-core.esm46.js"),t=e.SelectImportSource;break;case AvailableComponents.DATA_CENTER_SOURCE_CREATION_PANEL:e=yield import("./js-core.esm46.js"),t=e.SourceCreationPanel;break;case AvailableComponents.ADMIN_CENTER_GROUP_DETAILS_PANEL:e=yield import("./js-core.esm55.js"),t=e.GroupDetailsPanel;break;case AvailableComponents.ADMIN_CENTER_ADD_MEMBER_PANEL:e=yield import("./js-core.esm55.js"),t=e.AddMemberPanel;break;case AvailableComponents.APPLICATION_DETAILS_PANEL:e=yield import("./js-core.esm63.js"),t=e.ApplicationDetailsPanel;break;case AvailableComponents.PROCESSING_CENTER_SOURCES:e=yield import("./js-core.esm69.js"),t=e.ProcessingCenterSources;break;case AvailableComponents.PROCESSING_CENTER_ERROR_DETAIL:e=yield import("./js-core.esm69.js"),t=e.ErrorDetailPanel;break;case AvailableComponents.USER_APPLICATION_SETTINGS_PANEL:e=yield Promise.resolve().then(function(){return index_esm$3}),t=e.UserApplicationSettingsPanel;break;case AvailableComponents.ADD_APPLICATION_USERS_PANEL:e=yield import("./js-core.esm63.js"),t=e.AddUsersPanel;break;case AvailableComponents.PROCESSING_CENTER_BROWSE:e=yield import("./js-core.esm72.js"),t=e.ProcessingCenterBrowse;break;case AvailableComponents.JOBS_TABLE_SETTINGS_PANEL:e=yield import("./js-core.esm73.js"),t=e.JobsTableSettingsPanel;break;case AvailableComponents.VERSION_PANEL:e=yield import("./js-core.esm41.js"),t=e.VersionPanel;break;case AvailableComponents.PROCESSING_CENTER_DAG_BUILDER:e=yield import("./js-core.esm75.js"),t=e.DagBuilder;break;case AvailableComponents.PROCESSING_CENTER_INGESTION:e=yield import("./js-core.esm76.js").then(function(e){return e.an}),t=e.ProcessingCenterIngestion;break;case AvailableComponents.PROCESSING_CENTER_ADVANCED_SETTINGS:e=yield import("./js-core.esm76.js").then(function(e){return e.an}),t=e.ProcessingCenterAdvancedSettings;break;case AvailableComponents.PROCESSING_CENTER_AFFILIATE_PANEL:e=yield import("./js-core.esm76.js").then(function(e){return e.an}),t=e.ProcessingCenterAffiliatePanel;break;case AvailableComponents.JOBS_DETAILS_PANEL:e=yield import("./js-core.esm73.js"),t=e.JobsDetailsPanel;break;case AvailableComponents.TASKS_TABLE_SETTINGS_PANEL:e=yield import("./js-core.esm74.js"),t=e.TasksTableSettingsPanel;break;case AvailableComponents.RESOURCE_CENTER_BROWSE:e=yield import("./js-core.esm77.js"),t=e.ResourceCenterBrowse;break;case AvailableComponents.PACKAGE_DETAILS_PANEL:e=yield import("./js-core.esm79.js"),t=e.PackageDetails;break;case AvailableComponents.INSTANCE_ADMIN_CENTER_BROWSE:e=yield import("./js-core.esm80.js"),t=e.InstanceAdminCenterBrowse}return registry[n]=t}),registerComponent=(e,t)=>{registry[e]=t},WIDGETS_FEATURE_KEY="widgets",initialState$1=(!function(e){e.idle="idle",e.mounting="mounting",e.unmounting="unmounting",e.error="error",e.eventing="eventing"}(WidgetsStatus=WidgetsStatus||{}),{value:[],status:WidgetsStatus.idle}),widgetsSelector=e=>e[name].value,callWidgetOnComplete=(e,t)=>{e=e.find(e=>e.widgetName===t);null!=e&&e.onComplete&&e.onComplete()},{name,reducer,actions:{mountWidget:mountWidget$1,mountWidgetSuccess,mountWidgetError,unmountWidget:unmountWidget$1,unmountWidgetSuccess,unmountWidgetFailure,triggerWidgetCallback,triggerWidgetCallbackSuccess}}=createSlice({name:WIDGETS_FEATURE_KEY,initialState:initialState$1,reducers:{mountWidget:(e,t)=>{e.value.push(t.payload),e.status=WidgetsStatus.mounting},mountWidgetSuccess:e=>{e.status=WidgetsStatus.idle},mountWidgetError:e=>{e.status=WidgetsStatus.error},triggerWidgetCallback:(e,t)=>{e.status=WidgetsStatus.eventing},triggerWidgetCallbackSuccess:e=>{e.status=WidgetsStatus.idle},unmountWidget:(e,t)=>{e.status=WidgetsStatus.unmounting},unmountWidgetSuccess:(e,t)=>{e.value=e.value.filter(e=>e.widgetId!==t.payload),e.status=WidgetsStatus.idle},unmountWidgetFailure:e=>{e.status=WidgetsStatus.error}}});function*mountWidgetListenerSaga(){let a;const s={};yield takeEvery$1(mountWidget$1({}).type,function*(e){try{var{widgetConfig:t={},widgetName:n,elementId:r}=null==e?void 0:e.payload,i=(yield call$7(registryLookup,n))||(()=>jsxRuntime.exports.jsx("div",{children:"Component Not Found."})),o=getElement(r,n);o.classList.add("aiware-el"),s[r]?a=s[r]:(a=client$1.createRoot(o),s[r]=a),a.render(jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(i,Object.assign({},t))}))})}))),yield put(mountWidgetSuccess())}catch(e){yield put(mountWidgetError())}}),yield takeEvery$1(e=>/\/booted$/.test(e.type),function*(e){var[e]=e.type.split("/");yield put(triggerWidgetCallback(e))}),yield takeEvery$1(unmountWidget$1("").type,function*(t){try{const e=yield select(e=>{return(null==(e=widgetsSelector(e).find(e=>e.widgetId===t.payload))?void 0:e.elementId)||""});setTimeout(()=>{s[e]&&s[e].unmount(),delete s[e]}),yield put(unmountWidgetSuccess(t.payload))}catch(e){yield put(unmountWidgetFailure())}}),yield takeEvery$1(triggerWidgetCallback("").type,function*(e){var t=yield select(widgetsSelector);callWidgetOnComplete(t,e.payload),yield put(triggerWidgetCallbackSuccess())})}function getWidgetsModule(){return{id:name,reducerMap:{[name]:reducer},sagas:[mountWidgetListenerSaga],initialActions:[]}}function getDataModule(){return{id:"data",reducerMap:{data:(e,{type:t,payload:n})=>{return t===setData({}).type?[...e.filter(e=>e.id!==n.id),n]:e||[]}},sagas:[],initialActions:[]}}var match,version,store,wmget,wmhas,wmset,set,get,has,STATE,activeXDocument,IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator,commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},check=function(e){return e&&e.Math==Math&&e},global$b=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")(),objectGetOwnPropertyDescriptor={},fails$c=function(e){try{return!!e()}catch(e){return!0}},fails$b=fails$c,descriptors=!fails$c(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),fails$a=fails$c,functionBindNative=!fails$c(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),NATIVE_BIND$1=functionBindNative,call$6=Function.prototype.call,functionCall=NATIVE_BIND$1?call$6.bind(call$6):function(){return call$6.apply(call$6,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$1&&!$propertyIsEnumerable.call({1:2},1),createPropertyDescriptor$3=(objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){e=getOwnPropertyDescriptor$1(this,e);return!!e&&e.enumerable}:$propertyIsEnumerable,function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}),NATIVE_BIND=functionBindNative,FunctionPrototype$1=Function.prototype,bind=FunctionPrototype$1.bind,call$5=FunctionPrototype$1.call,uncurryThis$c=NATIVE_BIND&&bind.bind(call$5,call$5),functionUncurryThis=NATIVE_BIND?function(e){return e&&uncurryThis$c(e)}:function(e){return e&&function(){return call$5.apply(e,arguments)}},uncurryThis$b=functionUncurryThis,toString$3=uncurryThis$b({}.toString),stringSlice=uncurryThis$b("".slice),classofRaw$1=function(e){return stringSlice(toString$3(e),8,-1)},uncurryThis$a=functionUncurryThis,fails$9=fails$c,classof$3=classofRaw$1,$Object$4=Object,split=functionUncurryThis("".split),indexedObject=fails$9(function(){return!$Object$4("z").propertyIsEnumerable(0)})?function(e){return"String"==classof$3(e)?split(e,""):$Object$4(e)}:$Object$4,$TypeError$7=TypeError,requireObjectCoercible$3=function(e){if(null==e)throw $TypeError$7("Can't call method on "+e);return e},IndexedObject$1=indexedObject,requireObjectCoercible$2=requireObjectCoercible$3,toIndexedObject$5=function(e){return IndexedObject$1(requireObjectCoercible$2(e))},isCallable$f=function(e){return"function"==typeof e},isCallable$e=isCallable$f,isObject$6=function(e){return"object"==typeof e?null!==e:isCallable$e(e)},global$a=global$b,isCallable$d=isCallable$f,aFunction=function(e){return isCallable$d(e)?e:void 0},getBuiltIn$4=function(e,t){return arguments.length<2?aFunction(global$a[e]):global$a[e]&&global$a[e][t]},uncurryThis$9=functionUncurryThis,objectIsPrototypeOf=functionUncurryThis({}.isPrototypeOf),getBuiltIn$3=getBuiltIn$4,engineUserAgent=getBuiltIn$4("navigator","userAgent")||"",global$9=global$b,userAgent=engineUserAgent,process$1=global$9.process,Deno=global$9.Deno,versions=process$1&&process$1.versions||Deno&&Deno.version,v8=versions&&versions.v8,engineV8Version=version=!(version=v8?0<(match=v8.split("."))[0]&&match[0]<4?1:+(match[0]+match[1]):version)&&userAgent&&(!(match=userAgent.match(/Edge\/(\d+)/))||74<=match[1])&&(match=userAgent.match(/Chrome\/(\d+)/))?+match[1]:version,V8_VERSION=version,fails$8=fails$c,nativeSymbol=!!Object.getOwnPropertySymbols&&!fails$8(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION&&V8_VERSION<41}),NATIVE_SYMBOL$1=nativeSymbol,useSymbolAsUid=nativeSymbol&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$2=getBuiltIn$4,isCallable$c=isCallable$f,isPrototypeOf=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$2=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$2("Symbol");return isCallable$c(t)&&isPrototypeOf(t.prototype,$Object$3(e))},$String$3=String,tryToString$1=function(e){try{return $String$3(e)}catch(e){return"Object"}},isCallable$b=isCallable$f,tryToString=tryToString$1,$TypeError$6=TypeError,aCallable$1=function(e){if(isCallable$b(e))return e;throw $TypeError$6(tryToString(e)+" is not a function")},aCallable=aCallable$1,getMethod$1=function(e,t){e=e[t];return null==e?void 0:aCallable(e)},call$4=functionCall,isCallable$a=isCallable$f,isObject$5=isObject$6,$TypeError$5=TypeError,ordinaryToPrimitive$1=function(e,t){var n,r;if("string"===t&&isCallable$a(n=e.toString)&&!isObject$5(r=call$4(n,e)))return r;if(isCallable$a(n=e.valueOf)&&!isObject$5(r=call$4(n,e)))return r;if("string"!==t&&isCallable$a(n=e.toString)&&!isObject$5(r=call$4(n,e)))return r;throw $TypeError$5("Can't convert object to primitive value")},shared$3={exports:{}},global$8=global$b,defineProperty$5=Object.defineProperty,defineGlobalProperty$3=function(t,n){try{defineProperty$5(global$8,t,{value:n,configurable:!0,writable:!0})}catch(e){global$8[t]=n}return n},global$7=global$b,defineGlobalProperty$2=defineGlobalProperty$3,SHARED="__core-js_shared__",store$3=global$b[SHARED]||defineGlobalProperty$2(SHARED,{}),sharedStore=store$3,store$2=sharedStore,requireObjectCoercible$1=((shared$3.exports=function(e,t){return store$2[e]||(store$2[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"}),requireObjectCoercible$3),$Object$2=Object,toObject$3=function(e){return $Object$2(requireObjectCoercible$1(e))},uncurryThis$8=functionUncurryThis,toObject$2=toObject$3,hasOwnProperty=functionUncurryThis({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty(toObject$2(e),t)},uncurryThis$7=functionUncurryThis,id=0,postfix=Math.random(),toString$2=uncurryThis$7(1..toString),uid$2=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$2(++id+postfix,36)},global$6=global$b,shared$2=shared$3.exports,hasOwn$8=hasOwnProperty_1,uid$1=uid$2,NATIVE_SYMBOL=nativeSymbol,USE_SYMBOL_AS_UID=useSymbolAsUid,WellKnownSymbolsStore=shared$2("wks"),Symbol$1=global$6.Symbol,symbolFor=Symbol$1&&Symbol$1.for,createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid$1,wellKnownSymbol$a=function(e){var t;return hasOwn$8(WellKnownSymbolsStore,e)&&(NATIVE_SYMBOL||"string"==typeof WellKnownSymbolsStore[e])||(t="Symbol."+e,NATIVE_SYMBOL&&hasOwn$8(Symbol$1,e)?WellKnownSymbolsStore[e]=Symbol$1[e]:WellKnownSymbolsStore[e]=(USE_SYMBOL_AS_UID&&symbolFor?symbolFor:createWellKnownSymbol)(t)),WellKnownSymbolsStore[e]},call$3=functionCall,isObject$4=isObject$6,isSymbol$1=isSymbol$2,getMethod=getMethod$1,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$9=wellKnownSymbol$a,$TypeError$4=TypeError,TO_PRIMITIVE=wellKnownSymbol$a("toPrimitive"),toPrimitive$1=function(e,t){if(!isObject$4(e)||isSymbol$1(e))return e;var n=getMethod(e,TO_PRIMITIVE);if(n){if(n=call$3(n,e,t=void 0===t?"default":t),!isObject$4(n)||isSymbol$1(n))return n;throw $TypeError$4("Can't convert object to primitive value")}return ordinaryToPrimitive(e,t=void 0===t?"number":t)},toPrimitive=toPrimitive$1,isSymbol=isSymbol$2,toPropertyKey$2=function(e){e=toPrimitive(e,"string");return isSymbol(e)?e:e+""},global$5=global$b,isObject$3=isObject$6,document$1=global$b.document,EXISTS$1=isObject$3(document$1)&&isObject$3(document$1.createElement),documentCreateElement$2=function(e){return EXISTS$1?document$1.createElement(e):{}},DESCRIPTORS$9=descriptors,fails$7=fails$c,createElement=documentCreateElement$2,ie8DomDefine=!descriptors&&!fails$c(function(){return 7!=Object.defineProperty(createElement("div"),"a",{get:function(){return 7}}).a}),DESCRIPTORS$8=descriptors,call$2=functionCall,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,createPropertyDescriptor$2=createPropertyDescriptor$3,toIndexedObject$4=toIndexedObject$5,toPropertyKey$1=toPropertyKey$2,hasOwn$7=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,objectDefineProperty=(objectGetOwnPropertyDescriptor.f=DESCRIPTORS$8?$getOwnPropertyDescriptor$1:function(e,t){if(e=toIndexedObject$4(e),t=toPropertyKey$1(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$1(e,t)}catch(e){}if(hasOwn$7(e,t))return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f,e,t),e[t])},{}),DESCRIPTORS$7=descriptors,fails$6=fails$c,v8PrototypeDefineBug=descriptors&&fails$c(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),isObject$2=isObject$6,$String$2=String,$TypeError$3=TypeError,anObject$5=function(e){if(isObject$2(e))return e;throw $TypeError$3($String$2(e)+" is not an object")},DESCRIPTORS$6=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$4=anObject$5,toPropertyKey=toPropertyKey$2,$TypeError$2=TypeError,$defineProperty=Object.defineProperty,$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable",DESCRIPTORS$5=(objectDefineProperty.f=DESCRIPTORS$6?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,n){var r;return anObject$4(e),t=toPropertyKey(t),anObject$4(n),"function"==typeof e&&"prototype"===t&&"value"in n&&WRITABLE in n&&!n[WRITABLE]&&(r=$getOwnPropertyDescriptor(e,t))&&r[WRITABLE]&&(e[t]=n.value,n={configurable:(CONFIGURABLE$1 in n?n:r)[CONFIGURABLE$1],enumerable:(ENUMERABLE in n?n:r)[ENUMERABLE],writable:!1}),$defineProperty(e,t,n)}:$defineProperty:function(e,t,n){if(anObject$4(e),t=toPropertyKey(t),anObject$4(n),IE8_DOM_DEFINE)try{return $defineProperty(e,t,n)}catch(e){}if("get"in n||"set"in n)throw $TypeError$2("Accessors not supported");return"value"in n&&(e[t]=n.value),e},descriptors),definePropertyModule$3=objectDefineProperty,createPropertyDescriptor$1=createPropertyDescriptor$3,createNonEnumerableProperty$4=DESCRIPTORS$5?function(e,t,n){return definePropertyModule$3.f(e,t,createPropertyDescriptor$1(1,n))}:function(e,t,n){return e[t]=n,e},makeBuiltIn$2={exports:{}},DESCRIPTORS$4=descriptors,hasOwn$6=hasOwnProperty_1,FunctionPrototype=Function.prototype,getDescriptor=DESCRIPTORS$4&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$6(FunctionPrototype,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$4||getDescriptor(FunctionPrototype,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},uncurryThis$6=functionUncurryThis,isCallable$9=isCallable$f,store$1=sharedStore,functionToString=functionUncurryThis(Function.toString),inspectSource$2=(isCallable$9(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)}),store$1.inspectSource),global$4=global$b,isCallable$8=isCallable$f,inspectSource$1=inspectSource$2,WeakMap$1=global$b.WeakMap,nativeWeakMap=isCallable$8(WeakMap$1)&&/native code/.test(inspectSource$1(WeakMap$1)),shared$1=shared$3.exports,uid=uid$2,keys=shared$1("keys"),sharedKey$3=function(e){return keys[e]||(keys[e]=uid(e))},hiddenKeys$4={},NATIVE_WEAK_MAP=nativeWeakMap,global$3=global$b,uncurryThis$5=functionUncurryThis,isObject$1=isObject$6,createNonEnumerableProperty$3=createNonEnumerableProperty$4,hasOwn$5=hasOwnProperty_1,shared=sharedStore,sharedKey$2=sharedKey$3,hiddenKeys$3=hiddenKeys$4,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$1=global$3.TypeError,WeakMap$2=global$3.WeakMap,enforce=function(e){return has(e)?get(e):set(e,{})},getterFor=function(t){return function(e){if(isObject$1(e)&&(e=get(e)).type===t)return e;throw TypeError$1("Incompatible receiver, "+t+" required")}},internalState=(has=NATIVE_WEAK_MAP||shared.state?(store=shared.state||(shared.state=new WeakMap$2),wmget=uncurryThis$5(store.get),wmhas=uncurryThis$5(store.has),wmset=uncurryThis$5(store.set),set=function(e,t){if(wmhas(store,e))throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);return t.facade=e,wmset(store,e,t),t},get=function(e){return wmget(store,e)||{}},function(e){return wmhas(store,e)}):(STATE=sharedKey$2("state"),hiddenKeys$3[STATE]=!0,set=function(e,t){if(hasOwn$5(e,STATE))throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$3(e,STATE,t),t},get=function(e){return hasOwn$5(e,STATE)?e[STATE]:{}},function(e){return hasOwn$5(e,STATE)}),{set:set,get:get,has:has,enforce:enforce,getterFor:getterFor}),fails$5=fails$c,isCallable$7=isCallable$f,hasOwn$4=hasOwnProperty_1,DESCRIPTORS$3=descriptors,CONFIGURABLE_FUNCTION_NAME$1=functionName.CONFIGURABLE,inspectSource=inspectSource$2,InternalStateModule$1=internalState,enforceInternalState=InternalStateModule$1.enforce,getInternalState$1=InternalStateModule$1.get,defineProperty$4=Object.defineProperty,CONFIGURABLE_LENGTH=DESCRIPTORS$3&&!fails$5(function(){return 8!==defineProperty$4(function(){},"length",{value:8}).length}),TEMPLATE=String(String).split("String"),makeBuiltIn$1=makeBuiltIn$2.exports=function(e,t,n){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!hasOwn$4(e,"name")||CONFIGURABLE_FUNCTION_NAME$1&&e.name!==t)&&(DESCRIPTORS$3?defineProperty$4(e,"name",{value:t,configurable:!0}):e.name=t),CONFIGURABLE_LENGTH&&n&&hasOwn$4(n,"arity")&&e.length!==n.arity&&defineProperty$4(e,"length",{value:n.arity});try{n&&hasOwn$4(n,"constructor")&&n.constructor?DESCRIPTORS$3&&defineProperty$4(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}n=enforceInternalState(e);return hasOwn$4(n,"source")||(n.source=TEMPLATE.join("string"==typeof t?t:"")),e},isCallable$6=(Function.prototype.toString=makeBuiltIn$1(function(){return isCallable$7(this)&&getInternalState$1(this).source||inspectSource(this)},"toString"),isCallable$f),definePropertyModule$2=objectDefineProperty,makeBuiltIn=makeBuiltIn$2.exports,defineGlobalProperty$1=defineGlobalProperty$3,defineBuiltIn$3=function(e,t,n,r){var i=(r=r||{}).enumerable,o=void 0!==r.name?r.name:t;if(isCallable$6(n)&&makeBuiltIn(n,o,r),r.global)i?e[t]=n:defineGlobalProperty$1(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=n:definePropertyModule$2.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},objectGetOwnPropertyNames={},ceil=Math.ceil,floor=Math.floor,mathTrunc=Math.trunc||function(e){e=+e;return(0<e?floor:ceil)(e)},trunc=mathTrunc,toIntegerOrInfinity$2=function(e){e=+e;return e!=e||0==e?0:trunc(e)},toIntegerOrInfinity$1=toIntegerOrInfinity$2,max=Math.max,min$1=Math.min,toAbsoluteIndex$1=function(e,t){e=toIntegerOrInfinity$1(e);return e<0?max(e+t,0):min$1(e,t)},toIntegerOrInfinity=toIntegerOrInfinity$2,min=Math.min,toLength$1=function(e){return 0<e?min(toIntegerOrInfinity(e),9007199254740991):0},toLength=toLength$1,lengthOfArrayLike$1=function(e){return toLength(e.length)},toIndexedObject$3=toIndexedObject$5,toAbsoluteIndex=toAbsoluteIndex$1,lengthOfArrayLike=lengthOfArrayLike$1,createMethod=function(s){return function(e,t,n){var r,i=toIndexedObject$3(e),o=lengthOfArrayLike(i),a=toAbsoluteIndex(n,o);if(s&&t!=t){for(;a<o;)if((r=i[a++])!=r)return!0}else for(;a<o;a++)if((s||a in i)&&i[a]===t)return s||a||0;return!s&&-1}},arrayIncludes={includes:createMethod(!0),indexOf:createMethod(!1)},uncurryThis$4=functionUncurryThis,hasOwn$3=hasOwnProperty_1,toIndexedObject$2=toIndexedObject$5,indexOf=arrayIncludes.indexOf,hiddenKeys$2=hiddenKeys$4,push=uncurryThis$4([].push),objectKeysInternal=function(e,t){var n,r=toIndexedObject$2(e),i=0,o=[];for(n in r)!hasOwn$3(hiddenKeys$2,n)&&hasOwn$3(r,n)&&push(o,n);for(;t.length>i;)!hasOwn$3(r,n=t[i++])||~indexOf(o,n)||push(o,n);return o},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,hiddenKeys$1=enumBugKeys$3.concat("length","prototype"),objectGetOwnPropertySymbols=(objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys$1(e,hiddenKeys$1)},{}),getBuiltIn$1=(objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols,getBuiltIn$4),uncurryThis$3=functionUncurryThis,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$3=anObject$5,concat$1=functionUncurryThis([].concat),ownKeys$1=getBuiltIn$1("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule.f(anObject$3(e)),n=getOwnPropertySymbolsModule$1.f;return n?concat$1(t,n(e)):t},hasOwn$2=hasOwnProperty_1,ownKeys=ownKeys$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule$1=objectDefineProperty,copyConstructorProperties$1=function(e,t,n){for(var r=ownKeys(t),i=definePropertyModule$1.f,o=getOwnPropertyDescriptorModule.f,a=0;a<r.length;a++){var s=r[a];hasOwn$2(e,s)||n&&hasOwn$2(n,s)||i(e,s,o(t,s))}},fails$4=fails$c,isCallable$5=isCallable$f,replacement=/#|\.prototype\./,isForced$1=function(e,t){e=data[normalize(e)];return e==POLYFILL||e!=NATIVE&&(isCallable$5(t)?fails$4(t):!!t)},normalize=isForced$1.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$1.data={},NATIVE=isForced$1.NATIVE="N",POLYFILL=isForced$1.POLYFILL="P",isForced_1=isForced$1,global$2=global$b,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,createNonEnumerableProperty$2=createNonEnumerableProperty$4,defineBuiltIn$2=defineBuiltIn$3,defineGlobalProperty=defineGlobalProperty$3,copyConstructorProperties=copyConstructorProperties$1,isForced=isForced_1,_export=function(e,t){var n,r,i,o=e.target,a=e.global,s=e.stat,l=a?global$2:s?global$2[o]||defineGlobalProperty(o,{}):(global$2[o]||{}).prototype;if(l)for(n in t){if(r=t[n],i=e.dontCallGetSet?(i=getOwnPropertyDescriptor(l,n))&&i.value:l[n],!isForced(a?n:o+(s?".":"#")+n,e.forced)&&void 0!==i){if(typeof r==typeof i)continue;copyConstructorProperties(r,i)}(e.sham||i&&i.sham)&&createNonEnumerableProperty$2(r,"sham",!0),defineBuiltIn$2(l,n,r,e)}},internalObjectKeys=objectKeysInternal,enumBugKeys$1=enumBugKeys$3,objectKeys$2=Object.keys||function(e){return internalObjectKeys(e,enumBugKeys$1)},DESCRIPTORS$2=descriptors,uncurryThis$2=functionUncurryThis,call$1=functionCall,fails$3=fails$c,objectKeys$1=objectKeys$2,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$1=toObject$3,IndexedObject=indexedObject,$assign=Object.assign,defineProperty$3=Object.defineProperty,concat=uncurryThis$2([].concat),objectAssign=!$assign||fails$3(function(){var e,t,n,r;return!(!DESCRIPTORS$2||1===$assign({b:1},$assign(defineProperty$3({},"a",{enumerable:!0,get:function(){defineProperty$3(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)||(t={},r="abcdefghijklmnopqrst",(e={})[n=Symbol()]=7,r.split("").forEach(function(e){t[e]=e}),7!=$assign({},e)[n])||objectKeys$1($assign({},t)).join("")!=r})?function(e,t){for(var n=toObject$1(e),r=arguments.length,i=1,o=getOwnPropertySymbolsModule.f,a=propertyIsEnumerableModule.f;i<r;)for(var s,l=IndexedObject(arguments[i++]),c=o?concat(objectKeys$1(l),o(l)):objectKeys$1(l),u=c.length,d=0;d<u;)s=c[d++],DESCRIPTORS$2&&!call$1(a,l,s)||(n[s]=l[s]);return n}:$assign,$$3=_export,assign=objectAssign,objectDefineProperties=(_export({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign},{assign:assign}),{}),DESCRIPTORS$1=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule=objectDefineProperty,anObject$2=anObject$5,toIndexedObject$1=toIndexedObject$5,objectKeys=objectKeys$2,getBuiltIn=(objectDefineProperties.f=DESCRIPTORS$1&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$2(e);for(var n,r=toIndexedObject$1(t),i=objectKeys(t),o=i.length,a=0;a<o;)definePropertyModule.f(e,n=i[a++],r[n]);return e},getBuiltIn$4),html$1=getBuiltIn$4("document","documentElement"),anObject$1=anObject$5,definePropertiesModule=objectDefineProperties,enumBugKeys=enumBugKeys$3,hiddenKeys=hiddenKeys$4,html=html$1,documentCreateElement$1=documentCreateElement$2,sharedKey$1=sharedKey$3,GT=">",LT="<",PROTOTYPE="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$3("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e=documentCreateElement$1("iframe"),t="java"+SCRIPT+":";return e.style.display="none",html.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(scriptTag("document.F=Object")),t.close(),t.F},NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"==typeof document||document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame();for(var e=enumBugKeys.length;e--;)delete NullProtoObject[PROTOTYPE][enumBugKeys[e]];return NullProtoObject()},objectCreate=(hiddenKeys[IE_PROTO$1]=!0,Object.create||function(e,t){var n;return null!==e?(EmptyConstructor[PROTOTYPE]=anObject$1(e),n=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,n[IE_PROTO$1]=e):n=NullProtoObject(),void 0===t?n:definePropertiesModule.f(n,t)}),wellKnownSymbol$8=wellKnownSymbol$a,create$1=objectCreate,defineProperty$2=objectDefineProperty.f,UNSCOPABLES=wellKnownSymbol$8("unscopables"),ArrayPrototype=Array.prototype,addToUnscopables$2=(null==ArrayPrototype[UNSCOPABLES]&&defineProperty$2(ArrayPrototype,UNSCOPABLES,{configurable:!0,value:create$1(null)}),function(e){ArrayPrototype[UNSCOPABLES][e]=!0}),iterators={},fails$2=fails$c,correctPrototypeGetter=!fails$c(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),hasOwn$1=hasOwnProperty_1,isCallable$4=isCallable$f,toObject=toObject$3,sharedKey=sharedKey$3,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,IE_PROTO=sharedKey$3("IE_PROTO"),$Object$1=Object,ObjectPrototype=$Object$1.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?$Object$1.getPrototypeOf:function(e){var t,e=toObject(e);return hasOwn$1(e,IE_PROTO)?e[IE_PROTO]:(t=e.constructor,isCallable$4(t)&&e instanceof t?t.prototype:e instanceof $Object$1?ObjectPrototype:null)},fails$1=fails$c,isCallable$3=isCallable$f,getPrototypeOf$1=objectGetPrototypeOf,defineBuiltIn$1=defineBuiltIn$3,wellKnownSymbol$7=wellKnownSymbol$a,ITERATOR$2=wellKnownSymbol$a("iterator"),BUGGY_SAFARI_ITERATORS$1=!1,NEW_ITERATOR_PROTOTYPE=([].keys&&("next"in(arrayIterator=[].keys())?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$1(getPrototypeOf$1(arrayIterator)))!==Object.prototype&&(IteratorPrototype$2=PrototypeOfArrayIteratorPrototype):BUGGY_SAFARI_ITERATORS$1=!0),null==IteratorPrototype$2||fails$1(function(){var e={};return IteratorPrototype$2[ITERATOR$2].call(e)!==e})),iteratorsCore=(isCallable$3((IteratorPrototype$2=NEW_ITERATOR_PROTOTYPE?{}:IteratorPrototype$2)[ITERATOR$2])||defineBuiltIn$1(IteratorPrototype$2,ITERATOR$2,function(){return this}),{IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1}),defineProperty$1=objectDefineProperty.f,hasOwn=hasOwnProperty_1,wellKnownSymbol$6=wellKnownSymbol$a,TO_STRING_TAG$3=wellKnownSymbol$a("toStringTag"),setToStringTag$2=function(e,t,n){(e=e&&!n?e.prototype:e)&&!hasOwn(e,TO_STRING_TAG$3)&&defineProperty$1(e,TO_STRING_TAG$3,{configurable:!0,value:t})},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create=objectCreate,createPropertyDescriptor=createPropertyDescriptor$3,setToStringTag$1=setToStringTag$2,Iterators$2=iterators,returnThis$1=function(){return this},createIteratorConstructor$1=function(e,t,n,r){t+=" Iterator";return e.prototype=create(IteratorPrototype$1,{next:createPropertyDescriptor(+!r,n)}),setToStringTag$1(e,t,!1),Iterators$2[t]=returnThis$1,e},isCallable$2=isCallable$f,$String$1=String,$TypeError$1=TypeError,aPossiblePrototype$1=function(e){if("object"==typeof e||isCallable$2(e))return e;throw $TypeError$1("Can't set "+$String$1(e)+" as a prototype")},uncurryThis$1=functionUncurryThis,anObject=anObject$5,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var n,r=!1,e={};try{(n=uncurryThis$1(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),r=e instanceof Array}catch(e){}return function(e,t){return anObject(e),aPossiblePrototype(t),r?n(e,t):e.__proto__=t,e}}():void 0),$$2=_export,call=functionCall,FunctionName=functionName,isCallable$1=isCallable$f,createIteratorConstructor=createIteratorConstructor$1,getPrototypeOf=objectGetPrototypeOf,setPrototypeOf=objectSetPrototypeOf,setToStringTag=setToStringTag$2,createNonEnumerableProperty$1=createNonEnumerableProperty$4,defineBuiltIn=defineBuiltIn$3,wellKnownSymbol$5=wellKnownSymbol$a,Iterators$1=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$1=wellKnownSymbol$5("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},defineIterator$1=function(e,t,n,r,i,o,a){createIteratorConstructor(n,t,r);function s(e){if(e===i&&f)return f;if(!BUGGY_SAFARI_ITERATORS&&e in d)return d[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new n(this,e)}}return function(){return new n(this)}}var l,c,r=t+" Iterator",u=!1,d=e.prototype,p=d[ITERATOR$1]||d["@@iterator"]||i&&d[i],f=!BUGGY_SAFARI_ITERATORS&&p||s(i),h="Array"==t&&d.entries||p;if(h&&(h=getPrototypeOf(h.call(new e)))!==Object.prototype&&h.next&&(getPrototypeOf(h)!==IteratorPrototype&&(setPrototypeOf?setPrototypeOf(h,IteratorPrototype):isCallable$1(h[ITERATOR$1])||defineBuiltIn(h,ITERATOR$1,returnThis)),setToStringTag(h,r,!0)),PROPER_FUNCTION_NAME&&i==VALUES&&p&&p.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty$1(d,"name",VALUES):(u=!0,f=function(){return call(p,this)})),i)if(l={values:s(VALUES),keys:o?f:s(KEYS),entries:s(ENTRIES)},a)for(c in l)!BUGGY_SAFARI_ITERATORS&&!u&&c in d||defineBuiltIn(d,c,l[c]);else $$2({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||u},l);return d[ITERATOR$1]!==f&&defineBuiltIn(d,ITERATOR$1,f,{name:i}),Iterators$1[t]=f,l},toIndexedObject=toIndexedObject$5,addToUnscopables$1=addToUnscopables$2,Iterators=iterators,InternalStateModule=internalState,defineProperty=objectDefineProperty.f,defineIterator=defineIterator$1,DESCRIPTORS=descriptors,ARRAY_ITERATOR="Array Iterator",setInternalState=InternalStateModule.set,getInternalState=InternalStateModule.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator(Array,"Array",function(e,t){setInternalState(this,{type:ARRAY_ITERATOR,target:toIndexedObject(e),index:0,kind:t})},function(){var e=getInternalState(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?{value:e.target=void 0,done:!0}:"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values"),values=Iterators.Arguments=Iterators.Array;if(addToUnscopables$1("keys"),addToUnscopables$1("values"),addToUnscopables$1("entries"),DESCRIPTORS&&"values"!==values.name)try{defineProperty(values,"name",{value:"values"})}catch(e){}var COLLECTION_NAME,domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},documentCreateElement=documentCreateElement$2,classList=documentCreateElement$2("span").classList,DOMTokenListPrototype$1=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype$1===Object.prototype?void 0:DOMTokenListPrototype$1,global$1=global$b,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty=createNonEnumerableProperty$4,wellKnownSymbol$4=wellKnownSymbol$a,ITERATOR=wellKnownSymbol$4("iterator"),TO_STRING_TAG$2=wellKnownSymbol$4("toStringTag"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(t,e){if(t){if(t[ITERATOR]!==ArrayValues)try{createNonEnumerableProperty(t,ITERATOR,ArrayValues)}catch(e){t[ITERATOR]=ArrayValues}if(t[TO_STRING_TAG$2]||createNonEnumerableProperty(t,TO_STRING_TAG$2,e),DOMIterables[e])for(var n in ArrayIteratorMethods)if(t[n]!==ArrayIteratorMethods[n])try{createNonEnumerableProperty(t,n,ArrayIteratorMethods[n])}catch(e){t[n]=ArrayIteratorMethods[n]}}};for(COLLECTION_NAME in DOMIterables)handlePrototype(global$1[COLLECTION_NAME]&&global$1[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");var $$1=_export,$includes=arrayIncludes.includes,fails=fails$c,addToUnscopables=addToUnscopables$2,BROKEN_ON_SPARSE=fails$c(function(){return!Array(1).includes()}),isObject=($$1({target:"Array",proto:!0,forced:BROKEN_ON_SPARSE},{includes:function(e){return $includes(this,e,1<arguments.length?arguments[1]:void 0)}}),addToUnscopables("includes"),isObject$6),classof$2=classofRaw$1,wellKnownSymbol$3=wellKnownSymbol$a,MATCH$1=wellKnownSymbol$a("match"),isRegexp=function(e){var t;return isObject(e)&&(void 0!==(t=e[MATCH$1])?!!t:"RegExp"==classof$2(e))},isRegExp=isRegexp,$TypeError=TypeError,notARegexp=function(e){if(isRegExp(e))throw $TypeError("The method doesn't accept regular expressions");return e},wellKnownSymbol$2=wellKnownSymbol$a,TO_STRING_TAG$1=wellKnownSymbol$a("toStringTag"),test={},toStringTagSupport=(test[TO_STRING_TAG$1]="z","[object z]"===String(test)),TO_STRING_TAG_SUPPORT=toStringTagSupport,isCallable=isCallable$f,classofRaw=classofRaw$1,wellKnownSymbol$1=wellKnownSymbol$a,TO_STRING_TAG=wellKnownSymbol$a("toStringTag"),$Object=Object,CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$1=TO_STRING_TAG_SUPPORT?classofRaw:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=tryGet(e=$Object(e),TO_STRING_TAG))?t:CORRECT_ARGUMENTS?classofRaw(e):"Object"==(t=classofRaw(e))&&isCallable(e.callee)?"Arguments":t},classof=classof$1,$String=String,toString$1=function(e){if("Symbol"===classof(e))throw TypeError("Cannot convert a Symbol value to a string");return $String(e)},wellKnownSymbol=wellKnownSymbol$a,MATCH=wellKnownSymbol$a("match"),correctIsRegexpLogic=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[MATCH]=!1,"/./"[t](n)}catch(e){}}return!1},$=_export,uncurryThis=functionUncurryThis,notARegExp=notARegexp,requireObjectCoercible=requireObjectCoercible$3,toString=toString$1,correctIsRegExpLogic=correctIsRegexpLogic,stringIndexOf=functionUncurryThis("".indexOf);$({target:"String",proto:!0,forced:!correctIsRegExpLogic("includes")},{includes:function(e){return!!~stringIndexOf(toString(requireObjectCoercible(this)),toString(notARegExp(e)),1<arguments.length?arguments[1]:void 0)}});const clickAwayListener=e=>{var t,n=null==(n=null==(t=null==e?void 0:e.composedPath())?void 0:t.find)?void 0:n.call(t,e=>{var t;return(null==(t=null==e?void 0:e.id)?void 0:t.toLowerCase().includes("aiware-app-bar"))||(null==(t=null==e?void 0:e.id)?void 0:t.toLowerCase().includes("panel"))||(null==(t=null==e?void 0:e.id)?void 0:t.includes("APP_BAR"))||(null==(t=null==e?void 0:e.id)?void 0:t.includes("undefined"))||(null==(t=null==e?void 0:e.id)?void 0:t.includes("-root"))||(null==(t=null==(e=null==(t=null==e?void 0:e.attributes)?void 0:t.getNamedItem("role"))?void 0:e.value)?void 0:t.includes("presentation"))}),e="BODY"===(null==(t=((null==e?void 0:e.composedPath())||[])[0])?void 0:t.tagName);n||e||store$4.dispatch(unmountAllPanel$1("null"))};class RefHolder extends react.exports.Component{render(){return jsxRuntime.exports.jsx("div",{children:this.props.children})}}const rootPostfix="root";function mountPanelListenerSagaGenerator(d,p){let f;const h={};return function*(){yield takeEvery$1(mountPanel$1({}).type,function*(e){const{panelId:t,microFrontend:{name:n},panelConfig:r}=null==e?void 0:e.payload;let i=null,o=void 0;p&&(o=yield call$7(p,r.type),i=yield call$7(p,n));var a,s,l,e=i||d[n]||(()=>jsxRuntime.exports.jsx("div",{children:"Component Not Found."})),c=o||d[r.type],u=(r.parent&&({panelConfig:{marginTop:u=0,marginStart:a=0,zIndex:s=1e3},panelId:l}=yield select(e=>e.panels.find(e=>e.panelId===r.parent)),l=(null==(l=null===document||void 0===document?void 0:document.getElementById(l))?void 0:l.clientWidth)||650,r.marginTop=r.marginTop||u,r.marginStart=r.marginStart||a+l,r.zIndex=r.zIndex||s),getElement(t+"-"+rootPostfix));u.classList.add("aiware-el"),h[t+"-"+rootPostfix]?f=h[t+"-"+rootPostfix]:(f=client$1.createRoot(u),h[t+"-"+rootPostfix]=f),f.render(jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(ClickAwayListener,Object.assign({onClickAway:clickAwayListener},{children:jsxRuntime.exports.jsx(RefHolder,{children:jsxRuntime.exports.jsx(c,Object.assign({type:"SIMPLE_PANEL",panelId:t,"data-test":"panel-"+t},{children:jsxRuntime.exports.jsx(e,{})}))})}))}))})})))}),yield takeEvery$1(unmountPanel$1("").type,function*(t){var e=yield select(e=>e.panels.find(e=>{return(null==(e=null==e?void 0:e.panelConfig)?void 0:e.parentPanelId)===t.payload}));e&&0<Object.keys(e).length&&(yield put(unmountPanel$1(e.panelId))),setTimeout(()=>{h[t.payload+"-"+rootPostfix]&&h[t.payload+"-"+rootPostfix].unmount(),delete h[t.payload+"-"+rootPostfix]})}),yield takeEvery$1(openLinkOnNewTab.type,function(e){var e=null==(e=null==e?void 0:e.payload)?void 0:e.url,t=document.createElement("a");t.target="_blank",t.href=e,t.click()})}}function getPanelsModule(e,t){return{id:name$1,reducerMap:{panels:(e,{type:t,payload:n})=>{switch(t){case mountPanel$1({}).type:{var r=[...e],i=(n.panelConfig.show=!0,n.panelConfig);const a=null==i?void 0:i.parentPanelId;var i=null==i?void 0:i.dimmedStatus;return"dimAllParents"===i?[...r.map(e=>{return Object.assign(Object.assign({},e),{panelConfig:Object.assign(Object.assign({},e.panelConfig),{dimmed:((null==(e=e.panelConfig)?void 0:e.dimmed)||0)+1})})}),n]:a&&i?(r[i=e.findIndex(e=>e.panelId===a)]=Object.assign(Object.assign({},r[i]),{panelConfig:Object.assign(Object.assign({},null==(o=r[i])?void 0:o.panelConfig),{dimmed:((null==(i=null==(o=r[i])?void 0:o.panelConfig)?void 0:i.dimmed)||0)+1})}),[...r,n]):[...e,n]}case unmountPanel$1("").type:{i=null==(o=e.find(e=>e.panelId===n))?void 0:o.panelConfig;const s=null==i?void 0:i.parentPanelId;var r=null==i?void 0:i.dimmedStatus,o=e.filter(e=>e.panelId!==n);return"dimAllParents"===r?o.map(e=>{return Object.assign(Object.assign({},e),{panelConfig:Object.assign(Object.assign({},e.panelConfig),{dimmed:((null==(e=e.panelConfig)?void 0:e.dimmed)||0)-1})})}):(s&&r&&-1!==(i=e.findIndex(e=>e.panelId===s))&&(o[i]=Object.assign(Object.assign({},o[i]),{panelConfig:Object.assign(Object.assign({},o[i].panelConfig),{dimmed:((null==(r=o[i].panelConfig)?void 0:r.dimmed)||0)-1})})),o)}case hidePanel$1("").type:i=e.find(e=>e.panelId===n),r=e.filter(e=>e.panelId!==n),i=Object.assign(Object.assign({},i),{panelConfig:Object.assign(Object.assign({},null==i?void 0:i.panelConfig),{show:!1})});return[...r,i];case unmountAllPanel$1("").type:return e.map(e=>Object.assign(Object.assign({},e),{panelConfig:Object.assign(Object.assign({},null==e?void 0:e.panelConfig),{show:!1})}));case updatePanelMicroFrontendProps({}).type:o=e.find(e=>e.panelId===n.id),r=e.filter(e=>e.panelId!==n.id),o=Object.assign(Object.assign({},o),{microFrontend:Object.assign(Object.assign({},null==o?void 0:o.microFrontend),{config:n.props})});return[...r,o]}return e||[]}},sagas:[mountPanelListenerSagaGenerator(e,t)],initialActions:[]}}const useStyles$2=makeStyles()(e=>({sdkSnackbarContainer:{"& svg":{fill:"white"}}}));function CustomSnackbar(){const n=useDispatch(),[e,t]=react.exports.useState([]),[r,i]=react.exports.useState(!1),[o,a]=react.exports.useState(void 0),{message:s,duration:l}=useSelector(snackbarSelector);var c=useStyles$2()["classes"],u=(react.exports.useEffect(()=>{null!==s&&void 0!==s&&s.content&&t(e=>[...e,s])},[s]),react.exports.useEffect(()=>{e.length&&!o?(a(Object.assign({},e[0])),t(e=>e.slice(1)),i(!0)):e.length&&o&&r&&(n(clearMessage()),i(!1))},[e,o,r,n]),(e,t)=>{"clickaway"!==t&&(i(!1),n(clearMessage()))});return jsxRuntime.exports.jsx(Snackbar$1,Object.assign({anchorOrigin:{vertical:"bottom",horizontal:"right"},open:r,autoHideDuration:l||3e3,onClose:u,TransitionProps:{onExited:()=>{a(void 0),n(clearMessage())}},className:c.sdkSnackbarContainer,"data-snackbarid":(null===o||void 0===o?void 0:o.key)||"na","data-testid":"snackbar.message."+((null===o||void 0===o?void 0:o.severity)||"na")},{children:jsxRuntime.exports.jsx(Alert$1,Object.assign({onClose:u,severity:null===o||void 0===o?void 0:o.severity,elevation:6,variant:"filled"},{children:null===o||void 0===o?void 0:o.content}))}),o?o.key:void 0)}function validateConfig(e){return e.applicationId||console.info("@aiware/js: applicationId is required. Go to developer app to find your application id."),e.baseUrl||console.info("@aiware/js: baseUrl is required. It defaults to the US Commercial environment which is https://api.us-1.veritone.com/v3/graphql"),!0}const ID="openSupportChatButton",DATA_ATTR="open-support-chat-button";var SupportCenterPixel=()=>jsxRuntime.exports.jsx(Portal$1,{children:jsxRuntime.exports.jsx("div",{id:ID,"data-veritone-element":DATA_ATTR,style:{width:1,height:1,position:"fixed",right:55,bottom:20}})});const nameSpace="@helpPanel",updateSelectedTab=createAction(nameSpace+"/UPDATE_SELECTED_TAB",function(e,t){return{payload:{selectedTabId:e,tabLink:t}}}),setCustomKnowledgeBaseUrl=createAction(nameSpace+"/SET_CUSTOM_KNOWLEDGE_BASE_URL",function(e){return{payload:{url:e}}}),setCustomDocsUrl=createAction(nameSpace+"/SET_CUSTOM_DOCS_URL",function(e){return{payload:{url:e}}}),initialState={selectedTabId:0,tabLink:"https://support.veritone.com/",customKnowledgeBaseUrl:"",customDocsUrl:""},getTabLinkReducer=createReducer(initialState,e=>{e.addCase(updateSelectedTab,(e,t)=>Object.assign(Object.assign({},e),{tabLink:t.payload.tabLink,selectedTabId:t.payload.selectedTabId})),e.addCase(setCustomKnowledgeBaseUrl,(e,t)=>Object.assign(Object.assign({},e),{customKnowledgeBaseUrl:t.payload.url})),e.addCase(setCustomDocsUrl,(e,t)=>Object.assign(Object.assign({},e),{customDocsUrl:t.payload.url}))});function*helpSaga(){yield takeEvery$1("OPEN_HELP_LINK",function*(){var e=yield select(e=>e.helpPanel.tabLink);yield put(openLinkOnNewTab({url:e}))})}const namespace="helpPanel",helpCenterSelectedTabIdSelector=e=>null!=e&&e[namespace]?e[namespace].selectedTabId:0,customDocsUrlSelector=e=>null!=e&&e[namespace]?e[namespace].customDocsUrl:"",customKnowledgeBaseUrlSelector=e=>null!=e&&e[namespace]?e[namespace].customKnowledgeBaseUrl:"";function getHelpPanelModule(){return{id:"help",reducerMap:{[namespace]:getTabLinkReducer},sagas:[helpSaga],initialActions:[]}}var knowledgeBaseUrl$1="https://docs.veritone.com/help/index.html",documentUrl$1="https://docs.veritone.com",config={knowledgeBaseUrl:knowledgeBaseUrl$1,documentUrl:documentUrl$1};const useStyles$1=makeStyles()(e=>({root:{height:"calc(100% - 110px)",textAlign:"left","& .Sdk-MuiTab-root.Mui-selected":{color:e.palette.text.primary,fontWeight:600}},tabs:{padding:e.spacing(2.4,6,0,6)},tabPanels:{width:"100%",height:"100%"},aiWareIcon:{position:"relative",maxHeight:50,opacity:"inherit",padding:e.spacing(4,3.2,0,3.2),display:"flex",justifyContent:"flex-end"},customTabs:{margin:e.spacing(0,4)},kbRoot:{height:"100%",textAlign:"left"},loadingContainer:{position:"absolute",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"white"},kbToolBarBox:{padding:e.spacing(6,6,1.6,6)},kbTabContent:{height:"calc(100% - 92px)"},kbTabPanel:{padding:e.spacing(6)},dRoot:{height:"100%",width:"100%"},dNavBar:{height:"100%",overflow:"hidden",background:"#F4F4F4"},dTitle:{color:"#2A323C",fontWeight:600,fontSize:"18px",lineHeight:"24px",padding:e.spacing(3.2)},dContent:{height:"100%",width:"100%",position:"relative"},dMenu:{overflowY:"auto",height:"calc(100% - 52px)"},drawerContainer:{display:"flex",height:"100%",background:e.palette.background.default},tabContainer:{borderRight:"0.5px solid #D5DFE9",overflow:"hidden",height:"100%",width:"100%"},tabName:{borderBottom:"0.5px solid #D5DFE9",display:"flex",justifyContent:"space-between",alignItems:"center",height:"64px",padding:e.spacing(0,6)},actionIcons:{margin:e.spacing(-2.4)},tabContent:{height:"calc(100vh - 57px - 60px)",overflowY:"auto",overflowX:"hidden"}})),documentUrl=config.documentUrl,Documentation=({path:e=documentUrl})=>{var t=useStyles$1()["classes"];const[n,r]=react.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(t.dRoot,"hide-in-percy")},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"docs-iframe",title:"Document Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){setTimeout(()=>{r(!1)},1e3)}})]}))},knowledgeBaseUrl=config["knowledgeBaseUrl"];function Knowledgebase({path:e=knowledgeBaseUrl}){var t=useStyles$1()["classes"];const[n,r]=react.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:t.kbRoot},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"knowledgebase-iframe",title:"Knowledgebase Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){r(!1)}})]}))}const defaultLocale="en-us",tabsList=[{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.au1+VZ",defaultMessage:"Knowledgebase",description:"Help Panel: Knowledgebase tab label"}),disabled:!1,url:"https://support.veritone.com/"},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.8bnkm8",defaultMessage:"Documentation",description:"Help Panel: Documentation tab label"}),disabled:!1,url:"https://docs.veritone.com/#/aiware/"}];function HelpCenter(e){var t=useSelector(initialConfigSelector),n=useSelector(customKnowledgeBaseUrlSelector),r=useSelector(customDocsUrlSelector),i=useSelector(helpCenterSelectedTabIdSelector),o=useSelector(e=>null==e?void 0:e.panels),a=useStyles$1()["classes"],[s]=react.exports.useState(defaultLocale);const l=useDispatch();o=null==o?void 0:o.find(e=>"CUSTOM_HELP_PANEL_ID"===e.panelId),n=o&&n?n:t.knowledgeBaseURL,o=o&&r?r:t.docsURL;return jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getHelpPanelModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,Object.assign({locale:s},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.drawerContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({id:"setting-content",className:a.tabContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.tabContent},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.root},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:a.tabPanels},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:a.customTabs},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:i,onChangeTab:e=>{l(updateSelectedTab(e,tabsList[e].url))},tabsList:tabsList})})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:a.tabPanels},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:i,index:0},{children:jsxRuntime.exports.jsx(Knowledgebase,{path:n})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:i,index:1},{children:jsxRuntime.exports.jsx(Documentation,{path:o})}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:a.aiWareIcon},{children:jsxRuntime.exports.jsx("img",{src:img$y,alt:"icon",draggable:"false"})}))]}))}))}))}))}))}))}))}var index_esm=Object.freeze({__proto__:null,HelpCenterPanel:HelpCenter,customDocsUrlSelector:customDocsUrlSelector,customKnowledgeBaseUrlSelector:customKnowledgeBaseUrlSelector,helpCenterSelectedTabIdSelector:helpCenterSelectedTabIdSelector,setCustomDocsUrl:setCustomDocsUrl,setCustomKnowledgeBaseUrl:setCustomKnowledgeBaseUrl,updateSelectedTab:updateSelectedTab});const useStyles=makeStyles()(()=>({dialog:{top:"125px",overflowX:"hidden",overflowY:"hidden",display:"flex",alignItems:"center",flexDirection:"column"},container:{borderRadius:"4px",backgroundColor:"#fff",width:"430px",overflow:"hidden",outline:0,boxShadow:"0px 0px 7px rgba(0, 0, 0, .25)"},header:{textTransform:"capitalize"},appListContainer:{width:"100%"},orgName:{fontWeight:"bold"}})),ApplicationDialog=()=>{const[e,t]=react.exports.useState(null),[n,r]=react.exports.useState(0);var i=useSelector(userSelector$2),o=useStyles()["classes"];const a=useSelector(initialConfigSelector),s=a.applicationId,l=useSelector(applicationSelector),c=useSelector(switchApiSelector);var u=(null===l||void 0===l?void 0:l.application)||[],d=null===l||void 0===l?void 0:l.status;var p=[...u].sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),f=u.findIndex(e=>e.id===s);useInterval(()=>{t(e=>e&&e-1)},e&&n<3?1e3:null),react.exports.useEffect(()=>{"success"!==(null===l||void 0===l?void 0:l.status)||1!==(null===l||void 0===l?void 0:l.application.length)||(null===l||void 0===l?void 0:l.application[0].id)===a.applicationId||e||(0===e?window.open(c+"/"+(null===l||void 0===l?void 0:l.application[0].id),"_self"):t(10))},[a,l,c,e]);return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(s)&&f<0&&"success"===d?jsxRuntime.exports.jsx(Modal$1,Object.assign({className:o.dialog,open:!0},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:o.container},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"application-dialog-title",className:o.header,variant:"h1",sx:{px:"30px",pt:"30px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-title",defaultMessage:"Application Not Available",description:"Title for modal"})})),jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"10px"}},{children:[jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message1",defaultMessage:"Looks like you switched organizations, your current application is not available in the current",description:"Description current application not available"})," ",jsxRuntime.exports.jsx("span",Object.assign({className:o.orgName},{children:null!=(f=null==i?void 0:i.organization)&&f.organizationName?i.organization.organizationName:""}))," ",jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message2",defaultMessage:"organization you are viewing.",description:"Description current application not available"})]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"20px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message3",defaultMessage:"Please select from the available applications below to be redirected.",description:"Instructions for current application not available"})})),e&&jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"20px"},onClick:()=>{r(e=>e+1)}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-countdown-message",defaultMessage:"You will be automatically forwarded to {appName} in {timeRemaining} seconds.",description:"Instructions for current application not available",values:{timeRemaining:e,appName:u[0].name}})})),jsxRuntime.exports.jsx("div",Object.assign({className:o.appListContainer},{children:jsxRuntime.exports.jsx(AppList,{title:"",selectedAppId:null,onSelectApplication:e=>{window.open(c+"/"+e,"_self")},applications:p,useGrid:!1,row:3})}))]}))})):null};class RateLimiter{constructor(){this.lastCall=null}checkIfCanCall(e=1){return e<1&&(e=1),(!this.lastCall||(new Date).getTime()-this.lastCall>=6e4*e)&&(this.lastCall=(new Date).getTime(),!0)}}const rateLimiter=new RateLimiter;function SnackbarRenderer(){return jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getSnackbarModule()]},{children:jsxRuntime.exports.jsx(CustomSnackbar,{})}))}))}store$4.addModules([getWidgetsModule(),getPanelsModule(registry,registryLookup),getDataModule(),getConfigModule(),getAuthModule()]);let hasLoaded=!1;const AppBarPreLoader=()=>{var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&!hasLoaded&&(hasLoaded=!0,setTimeout(()=>{store$4.addModules([getAppbarPanelModule()])},0)),null};function ApplicationDialogPreLoader(){var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&hasLoaded?jsxRuntime.exports.jsx(ApplicationDialog,{}):null}const authHelpers={updateToken(e){e?store$4.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout(e){"function"==typeof e?(e(),setTimeout(()=>{store$4.dispatch(logout$1())},1e3)):store$4.dispatch(logout$1())},reportAppActivity(e){rateLimiter.checkIfCanCall(e)&&store$4.dispatch(updateActivityStatus$1())}};function PortalRenderer(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SupportCenterPixel,{}),jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AppBarPreLoader,{})}))]})}function ApplicationDialogRenderer(){return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(ApplicationDialogPreLoader,{})})}))})}const ThemeInitializer=()=>(useTheme(),null),root=getElement("aiWARE"),reactDOMroot=(root.classList.add("aiware-el"),client$1.createRoot(root)),mountWidget=("_auth"===window.name?handleImplicitRedirect(window.location.hash,window.opener):reactDOMroot.render(jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsxs(AIWareThemeProvider,{children:[jsxRuntime.exports.jsx(PortalRenderer,{}),jsxRuntime.exports.jsx(SnackbarRenderer,{}),jsxRuntime.exports.jsx(ApplicationDialogRenderer,{}),jsxRuntime.exports.jsx(ThemeInitializer,{})]})}))),(e,t)=>{var n=getUniqueID(),{name:e,elementId:r,config:i}=e;return e&&r&&i||console.error("[aiwarejs-error]: `mountWidget` function should include all the following params: name, elementId, config"),store$4.dispatch(mountWidget$1({elementId:r,widgetName:e,widgetConfig:i,widgetId:n,onComplete:t})),n}),unmountWidget=e=>(store$4.dispatch(unmountWidget$1(e)),!0),mountPanel=(e,t)=>{const n=e.panelId||getUniqueID();var{microFrontend:e,panelConfig:r}=e;store$4.dispatch(mountPanel$1({microFrontend:e,panelId:n,panelConfig:r}));const i=[...(null==(e=null==r?void 0:r.header)?void 0:e.actions)||[],...(null==(e=null==r?void 0:r.footer)?void 0:e.actions)||[]].filter(e=>e.submit).map(e=>e.action);r={id:n,sagas:[function*(){yield takeEvery$1(i.map(e=>e.type),function*(){var e=(yield select(e=>e.data.find(e=>e.id===n)))["data"];t&&t(e)})}]};return store$4.addModule(r),n},unmountPanel=e=>(store$4.dispatch(unmountPanel$1(e)),!0),hidePanel=e=>(store$4.dispatch(hidePanel$1(e)),!0),unmountAllPanel=()=>{store$4.dispatch(unmountAllPanel$1(""))};function init(e,t){validateConfig(e)&&store$4.dispatch(getInitConfig(Object.assign(Object.assign({},e),{onComplete:t})))}function helpCenter(){var e=new HelpCenter$2({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}}function dataCenter(){var e=new DataCenter$1;return{openImporterPanel:e.openImporterPanel.bind(e)}}function handleEvents(){function n(e){if(!e||"string"!=typeof e)throw new SdkError("Please provide a valid event name!");if(!SdkEvents[e])throw new SdkError("Unknown event: "+e)}return{on:function(e,t){n(e),sdkEventManager.on.call(sdkEventManager,e,t)},off:function(e){n(e),sdkEventManager.off.call(sdkEventManager,e)}}}const mountPanelForResponse=e=>mountPanelForResponse$1(e,store$4),aiwareEvents=handleEvents();window&&(window.aiWare_initTesting=()=>{window.aiWare_store=store$4,window.aiWare_theme={darkTheme:darkTheme,lightTheme:lightTheme}},window.aiware={init:init,auth:authHelpers,helpCenter:helpCenter(),dataCenter:dataCenter(),on:aiwareEvents.on,off:aiwareEvents.off,hidePanel:hidePanel,unmountPanel:unmountPanel,store:store$4,registry:registry,registerComponent:registerComponent,AvailableWidgets:AvailableWidgets,mountPanelAction:mountPanel$1,unmountPanelAction:unmountPanel$1,hidePanelAction:hidePanel$1,updatePanelMicroFrontendPropsAction:updatePanelMicroFrontendProps,setData:setData,mountWidget:mountWidget,mountPanel:mountPanel,mountPanelForResponse:mountPanelForResponse,unmountWidget:unmountWidget,version:"sdk_release_version",commit:"f2a6e4577",releaseDate:"sdk_release_date"});export{ListItem$1 as $,AIWareIntlProvider as A,Box$1 as B,interopRequireDefault as C,createAction as D,createReducer as E,FormattedMessage$1 as F,Grid$1 as G,createSlice as H,ENGINE_OWNER_TYPES as I,ENGINE_FILTER_TYPES as J,DynamicModuleLoader as K,LoadingButton$1 as L,preferredLanguageSelector as M,baseUrlSelector as N,rootApiSelector as O,Provider$2 as P,sessionTokenSelector as Q,graphEndpointSelector as R,Switch$1 as S,Typography$1 as T,controllerNodeRedImageSelector as U,controllerUrlSelector as V,automateControllerUrlSelector as W,automateUrlSelector as X,Portal$1 as Y,List$2 as Z,_extends as _,generateUtilityClasses as a,deleteEngine as a$,ListItemIcon$1 as a0,ListItemText$1 as a1,all as a2,img$m as a3,img$n as a4,img$p as a5,img$q as a6,Divider$1 as a7,Tooltip$1 as a8,IconButton$1 as a9,DialogTitle$1 as aA,DialogContent$1 as aB,DialogActions$1 as aC,TableContainer$1 as aD,Table$1 as aE,TableHead$1 as aF,TableRow$1 as aG,TableCell$1 as aH,TableSortLabel$1 as aI,TableBody$1 as aJ,img$f as aK,Popper$1 as aL,ClickAwayListener as aM,Fade$1 as aN,img$r as aO,img$o as aP,img$O as aQ,img$A as aR,Select$1 as aS,MenuItem$1 as aT,Snackbar$1 as aU,default_1 as aV,img$h as aW,img$j as aX,img$S as aY,Tabs$1 as aZ,Tab$1 as a_,img$g as aa,img$E as ab,Skeleton$1 as ac,takeLatest$1 as ad,fetchAllTags as ae,put as af,select as ag,fetchFlows as ah,call$7 as ai,fetchTemplateGallery as aj,isRevisionsExistOnServerRequest as ak,FormLabel$1 as al,default_1$5 as am,FormGroup$1 as an,FormControlLabel$1 as ao,Checkbox$1 as ap,fetchTemplateGalleryFallback as aq,Button$1 as ar,Card$1 as as,img$k as at,flowStyles as au,NoResults as av,CircularProgress$1 as aw,img$a as ax,setApiEndpoint as ay,Dialog$1 as az,styled$1 as b,_createCompounder as b$,img$i as b0,AIWareFormatMessage as b1,FormattedDate as b2,fetchVeritoneGraphQLApi as b3,useTheme as b4,KeyboardArrowRight as b5,KeyboardArrowLeft as b6,useId as b7,InputUnstyled as b8,isHostComponent as b9,img$b as bA,isEmpty_1 as bB,Backdrop$1 as bC,getDefaultMiddleware as bD,isNil_1 as bE,UpDown as bF,Icon$1 as bG,get_1 as bH,map_1 as bI,keys_1 as bJ,RadioGroup$1 as bK,Avatar$1 as bL,img$u as bM,baseGraphQLApi as bN,FormHelperText$2 as bO,img$e as bP,StyledEngineProvider as bQ,ThemeProvider as bR,lightTheme as bS,CssBaseline as bT,Hide as bU,showMessage as bV,MessageSeverity as bW,Radio$2 as bX,fetchEngine as bY,createSvgIcon$2 as bZ,_hasPath as b_,getDefaultExportFromNamespaceIfNotNamed as ba,commonjsRequire as bb,_typeof$4 as bc,_inheritsLoose$2 as bd,_assertThisInitialized$1 as be,React as bf,hoistNonReactStatics_cjs as bg,_defineProperty$1 as bh,reactDom as bi,Transition$1 as bj,__awaiter$a as bk,__generator$2 as bl,__spread as bm,TransitionGroup$1 as bn,connect$1 as bo,Bookmark as bp,EngineFlagIcons as bq,createAsyncThunk as br,withStyles as bs,getConfigModule as bt,getAuthModule as bu,getSnackbarModule as bv,CacheProvider as bw,muiCache as bx,img$P as by,img$c as bz,Paper$1 as c,useIntl as c$,_baseIteratee as c0,isArrayLike_1 as c1,toInteger_1 as c2,_toPropertyKey as c3,_setPrototypeOf$3 as c4,commonjsGlobal$1 as c5,combineReducers as c6,createSelector$1 as c7,fork as c8,AIWareThemeProvider as c9,Add as cA,ExpandLess as cB,ExpandMore as cC,Collapse$1 as cD,img$14 as cE,Filter$1 as cF,DynamicTable as cG,useTheme$2 as cH,getThemeProps as cI,useEnhancedEffect$1 as cJ,React$1 as cK,_arrayPush as cL,isArray_1 as cM,_baseToString as cN,_baseTrim as cO,_castSlice as cP,_stringToArray as cQ,toString_1 as cR,ReactIs as cS,upperFirst_1 as cT,isString_1 as cU,_baseGet as cV,_baseSlice as cW,_castPath as cX,_toKey as cY,_isIndex as cZ,channel as c_,Stack$4 as ca,Close$1 as cb,FullscreenExit as cc,Fullscreen as cd,TabPanel as ce,default_1$2 as cf,InputAdornment$1 as cg,unmountPanel$1 as ch,AvailableComponents as ci,delay$1 as cj,hidePanel$1 as ck,mountPanel$1 as cl,DialogContentText$1 as cm,userSelector$2 as cn,MoreVert as co,Menu$1 as cp,Edit as cq,Upload as cr,Delete as cs,CustomTabs as ct,useBackupImg as cu,img$1x as cv,validate as cw,configSelector as cx,baseGraphQLApiWithError as cy,VerifiedFilled as cz,capitalize$2 as d,_setToArray as d$,VideoCamera as d0,Image$1 as d1,Sound as d2,Description as d3,toNumber_1 as d4,ProgressStepper as d5,size_1 as d6,take as d7,CurlyBraces as d8,UnknownDocument as d9,_baseEach as dA,_arrayFilter as dB,_getNative as dC,eq_1 as dD,_root as dE,_Uint8Array as dF,_overArg as dG,_isPrototype as dH,isObjectLike_1 as dI,_baseGetTag as dJ,_arrayLikeKeys as dK,isArguments_1 as dL,isBuffer$3 as dM,isFunction_1 as dN,isTypedArray_1 as dO,_Stack as dP,_baseFor as dQ,identity_1 as dR,_isIterateeCall as dS,isSymbol_1 as dT,_baseMap as dU,_baseUnary as dV,memoizeOne as dW,isPlainObject$1 as dX,styled$2 as dY,_Symbol as dZ,_Set as d_,sdkEventManager as da,SdkEvents as db,SdkError as dc,EngineClassIcons as dd,Mode2 as de,EngineModeIcons as df,DeploymentModelIcons as dg,guid as dh,EditList as di,forceReflow as dj,getDefaultExportFromCjs as dk,alpha as dl,useControlled as dm,useEventCallback as dn,ButtonBase$1 as dp,useForkRef as dq,setRef as dr,inputClasses$1 as ds,inputBaseClasses$1 as dt,outlinedInputClasses$1 as du,filledInputClasses$1 as dv,ClearIcon as dw,ArrowDropDownIcon as dx,isObject_1 as dy,_arrayMap as dz,_objectWithoutPropertiesLoose$2 as e,img$1r as e$,_SetCache as e0,_cacheHas as e1,deepmerge as e2,useTheme$3 as e3,Slide$1 as e4,updatePanelMicroFrontendProps as e5,setData as e6,useIsFocusVisible as e7,ownerDocument as e8,appendOwnerState as e9,enableBetaFeatures as eA,Badge$1 as eB,openLinkOnNewTab as eC,orange$1 as eD,deepOrange$1 as eE,authSelector as eF,headerBarSelector as eG,getSortName as eH,img$7 as eI,InputLabel$1 as eJ,ListItemAvatar$1 as eK,OrganizationTabIcon as eL,ScopedCssBaseline$1 as eM,AlarmTwo as eN,getApplicationsApi as eO,ListItemSecondaryAction$1 as eP,updateTokenSuccess as eQ,postNotificationCommand as eR,aiwareEvent as eS,notificationCommands as eT,panelsSelector as eU,css as eV,avatarClasses as eW,img$L as eX,img$K as eY,img$1t as eZ,img$1s as e_,lighten as ea,darken as eb,slotShouldForwardProp as ec,shouldSpreadAdditionalProps$1 as ed,keyframes as ee,img$1u as ef,createTheme$1 as eg,injectIntl as eh,TabId as ei,PersonalProfile$1 as ej,Organizations as ek,DataCenter as el,Process as em,FlowCenter2 as en,DeveloperCenter as eo,Marketplace$1 as ep,LibraryCenter as eq,AdminCenter as er,AdminTabIcon as es,Resources$1 as et,DagBuilder as eu,img$R as ev,selectIsSuperAdmin as ew,img$3 as ex,img$y as ey,takeEvery$1 as ez,clsx as f,ConfirmationModal as f$,img$I as f0,img$1v as f1,img$H as f2,emphasize as f3,_arraySome as f4,ErrorBoundary$1 as f5,Information as f6,NewFolder as f7,SpecialFolder as f8,User as f9,FilterRemove as fA,CheckCircle as fB,FolderOpen as fC,Voice as fD,useDoubleClick as fE,FolderFilled as fF,Time as fG,img$w as fH,Undefined as fI,YoutubeSource as fJ,PodcastSource as fK,TVSource as fL,RadioSource as fM,selectOrgId as fN,selectIsUserAdmin as fO,ErrorState$1 as fP,StepConnector$1 as fQ,NullState$2 as fR,Group as fS,gqlIntrospection as fT,PermissionChangedAction as fU,Lock as fV,AddGroup as fW,StepperContext$1 as fX,StepContext$1 as fY,SvgIcon$1 as fZ,initialConfigSelector as f_,Source as fa,Search$1 as fb,selectIsOLPEnabled as fc,getLibraryModule as fd,selectApiConfigs$1 as fe,FullScreenContainer as ff,betaFeaturesSelector as fg,cmsUrlSelector as fh,UserAddFilled as fi,Popover$1 as fj,MenuList$1 as fk,MoveFolder as fl,Download as fm,img$8 as fn,selectPanelByPanelName as fo,EngineCategoryIcons as fp,Settings$2 as fq,Hamburger as fr,List as fs,EditAttributes as ft,MoreHor as fu,img$t as fv,img$v as fw,img$2 as fx,selectUserOrgEdgeVersion as fy,ProcessingDetail as fz,generateUtilityClass as g,EnumHelpers as g0,formatBytes as g1,NotInterested as g2,mountPanelForResponse$1 as g3,md5 as g4,AddUser as g5,Users as g6,ApplicationTabIcon as g7,SecurityGroup as g8,NoApps as g9,FormattedRelativeTime$1 as gA,Folder as gB,Hidden as gC,ArrowUp as gD,ArrowDown as gE,toFinite_1 as gF,_baseForOwn as gG,_arrayReduce as gH,hasIn_1 as gI,useSyncExternalStoreExports as gJ,tabsClasses$1 as gK,Engines as gL,Packages as gM,actionChannel as gN,PackagesAvatar as gO,registry as gP,registerComponent as gQ,AvailableWidgets as gR,root as gS,mountWidget as gT,unmountWidget as gU,mountPanel as gV,unmountPanel as gW,hidePanel as gX,unmountAllPanel as gY,init as gZ,green$1 as ga,selectors as gb,LibraryDropdown as gc,Remove as gd,Save as ge,Input$3 as gf,Copy as gg,ArrowForward as gh,Modal$1 as gi,_baseIsEqual as gj,Input$1 as gk,_getSymbols as gl,stubArray_1 as gm,_baseGetAllKeys as gn,_getTag as go,_nodeUtil as gp,_getAllKeys as gq,_castFunction as gr,Article as gs,Task as gt,View as gu,_objectSpread2 as gv,serialize$1 as gw,stringify$4 as gx,compile$1 as gy,Check as gz,composeClasses as h,useDispatch as i,jsxRuntime as j,useSelector as k,authStatusSelector as l,makeStyles as m,authContextSelector as n,AuthContext as o,lodash as p,Alert$1 as q,react as r,store$4 as s,authErrorMessage as t,useThemeProps as u,FormControl$1 as v,TextField$1 as w,classNames as x,resetPasswordRequest as y,createSvgIcon as z};
|
|
1393
|
+
`,graphEndpoint:e,token:t})}catch(e){return{success:!1}}});function*getCurrentUserSaga(){var e=yield select(graphEndpointSelector),t=yield select(sessionTokenSelector),e=yield call$7(getCurrentUserApi,e,t);null!=e&&e.errors&&0<(null==e?void 0:e.errors.length)&&(null==(t=e.errors[0].path)||!t.includes("userSettings"))?console.error("getCurrentUser error"):(t=Object.assign(Object.assign({},null==(t=null==e?void 0:e.data)?void 0:t.me),{organizationRole:{organizationId:get$3(e,"data.me.organization.id","")},organization:Object.assign({},null==(e=null==(t=null==e?void 0:e.data)?void 0:t.me)?void 0:e.organization)}),yield put(getCurrentUserSuccess(t)))}function*getCurrentApplicationInfoSaga(e){var t=yield select(graphEndpointSelector),n=yield select(sessionTokenSelector),e=e.payload["applicationId"],e=yield call$7(getApplicationInfo,e,t,n);null!=e&&e.errors&&0<(null==e?void 0:e.errors.length)?console.error("getCurrentApplicationInfo error"):yield put(getCurrentAppIconSuccess(null==(n=null==(t=null==e?void 0:e.data)?void 0:t.application)?void 0:n.iconUrl))}function*userSaga(){yield all([takeEvery$1(GET_CURRENT_USER,getCurrentUserSaga)]),yield all([takeEvery$1(GET_CURRENT_APP_ICON,getCurrentApplicationInfoSaga)])}function*bootFunction(){yield take(BOOTED)}function*booting(){yield takeEvery$1(BOOTING,bootFunction)}function*logoutListener(e){for(var t=e.payload;;)yield take(logout$1),t?null!=t&&t():yield put(logoutUser$1())}function*notificationActionClickedSaga(e){const t=e.payload;yield takeEvery$1(onNotificationActionClicked,function*(e){t&&(yield call$7(t,e.payload))})}function*handleAppSwitchListenerSetup(e){const t=e.payload;yield takeEvery$1(appSwitcherHandleClick,function*(e){e=e.payload;t?t(e):yield put(appSwitcherHandleClickAppNatively(e))})}function*rootSaga(){yield all([fork(userSaga),fork(booting),takeLatest$1(listenLogout,logoutListener),takeLatest$1(appSwitcherSetupListener,handleAppSwitchListenerSetup),takeLatest$1(initNotificationAction,notificationActionClickedSaga)])}function getAppbarModule(){return{id:"os-app-bar",reducerMap:{[nameSpace$1]:userReducer},sagas:[rootSaga],initialActions:[]}}function App(e){var{onLogout:t,onClickNotificationAction:n,onAppSwitch:r,onClickOrgIcon:i,showNotifications:o,applicationId:a,searchBarMountId:s}=e,e=__rest(e,["onLogout","onClickNotificationAction","onAppSwitch","onShowSettingPanel","onClickOrgIcon","onClickHelpIcon","showNotifications","applicationId","searchBarMountId"]);const l=useDispatch(),[c,u]=react.exports.useState(!1),[d,p]=react.exports.useState(!1),[f,h]=react.exports.useState(!1),[m,g]=react.exports.useState(!1),[v,y]=react.exports.useState(!1),[x,b]=react.exports.useState(!1);var C=(useSelector(userSelector)||{})["currentUser"];const{panels:$=[]}=useSelector(rootSelector);var w=useSelector(unseenNotificationSelector);const S=useSelector(notificationStatusSelector);var E=useSelector(betaFeaturesSelector),C=(C||{})["organization"];const _=useSelector(authSelector)["user"];var{application:T=[]}=useSelector(applicationSelector)||{};const[j,I]=react.exports.useState(!1);const R=useSelector(appIdSelector),O=useSelector(selectApplicationConfig),[L,M]=react.exports.useState(!1);var N=useSelector(selectHasUserCreateRootFolderPermission);const P=gqlIntrospection.isOperationValid("fileApplication","mutation")&&N;function A(){u(!1),h(!1),g(!1),p(!1),y(!1),b(!1)}function k(){null!==$&&void 0!==$&&$.forEach(e=>{l(hidePanel$1(e.panelId))})}return react.exports.useEffect(()=>{var e,t=window.location["search"];l(actions$2.userApplicationSettings.fetchApplicationConfigStart({appId:R})),"?panel=invite-requests"!==t||j||(I(!0),t={name:"INVITE_REQUESTS_PANEL",config:{name:"Invite Requests"}},e={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:0,size:"medium",zIndex:1001,parentPanelId:null,dimmed:0,dimmedStatus:"dimParent",header:{title:"INVITE REQUESTS"}},l(mountPanel$1({panelId:"INVITE_REQUESTS_PANEL",microFrontend:t,panelConfig:e})))},[]),react.exports.useEffect(()=>{null!==O&&void 0!==O&&O.length&&M(!0)},[O]),react.exports.useEffect(()=>{"success"===S&&l(markAllNotificationsSeenRequest())},[S,l]),react.exports.useEffect(()=>{l(getCurrentUser()),a&&l(getCurrentAppIcon({applicationId:a}))},[l,a]),react.exports.useEffect(()=>{l({type:listenLogout().type,payload:t})},[l,t]),react.exports.useEffect(()=>{n&&l(initNotificationAction(n))},[l,n]),react.exports.useEffect(()=>{l({type:appSwitcherSetupListener().type,payload:r})},[l,r]),react.exports.useEffect(()=>{l(onBooted())},[l]),react.exports.useEffect(()=>{$&&0!==$.length||A()},[$]),jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getAppbarModule(),getAppbarPanelModule(),getNotificationModule$1(),getEventsModule(),getUserApplicationSettingsModule()]},{children:jsxRuntime.exports.jsx("div",Object.assign({className:"App",id:"aiware-app-bar","data-testid":"aiware-app-bar"},{children:jsxRuntime.exports.jsx(NewAppBar,Object.assign({isEnableOrgPanel:!1,onCloseSetting:function(){k()},onOpenSetting:function(){var e,t;c?(u(!1),k()):(A(),u(!0),k(),e={name:"APP_BAR_PANEL",config:{name:"Veritone",dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:VERITONE_PANEL_ID,type:"TAB_TEMPLATE",marginTop:55,withTab:!0,width:80,zIndex:1004,userRoles:null===_||void 0===_?void 0:_.roles,header:{divider:!0,title:""},footer:{logo:!0},size:"xlarge",fullScreen:!1},l(mountPanel$1({panelId:VERITONE_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenHelpCenter:function(){var e,t;d?(p(!1),k()):(A(),k(),p(!0),e={name:"HELP_PANEL",config:{name:"Help panel",dataId:"helpDataId",type:"SIMPLE_PANEL"}},t={panelId:HELP_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,size:"large",header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.headerTitle.helpCenter",defaultMessage:"Help Center",description:"The header title for the help center."}),actions:[{iconUrl:img$Q,action:{type:"OPEN_HELP_LINK"}}]}},l(mountPanel$1({panelId:HELP_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenNotification:function(){var e,t;null!=o&&o(),v?(y(!1),k()):(A(),k(),y(!0),e={name:"NOTIFICATION_PANEL",config:{name:"Notification Panel",dataId:"notificationDataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:413,header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.panel.notifications",defaultMessage:"Notifications Center",description:"Title of the notifications center panel"}),actions:[]}},l(mountPanel$1({panelId:NOTIFICATION_PANEL_ID,microFrontend:e,panelConfig:t})))},onOpenUserApplicationSettings:function(){var e,t;x?(b(!1),k()):(A(),k(),b(!0),e={name:"USER_APPLICATION_SETTINGS_PANEL",config:{name:"User application settings",dataId:"userApplicationSettingsDataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:USER_APPLICATION_SETTINGS_PANEL,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:320,header:{divider:!1,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header.panelTitle.user-application-name-settings",defaultMessage:"Application Settings",description:"Title of user application name settings panel"})}},l(mountPanel$1({panelId:USER_APPLICATION_SETTINGS_PANEL,microFrontend:e,panelConfig:t})))},onDashboardClick:function(){console.log("HANDLE DASHBOARD CLICK!")},organization:C,onClickOrgIcon:function(){var e,t;null!=i&&i(),m?(g(!1),k()):(A(),k(),g(!0),e={name:"ORGANIZATION_PANEL",config:{name:"Veritone",tabId:TabId.ORGANIZATION_PANEL,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:ORGANIZATION_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:420,header:{divider:!0,title:"ORGANIZATIONS"}},l(mountPanel$1({panelId:ORGANIZATION_PANEL_ID,microFrontend:e,panelConfig:t})))},panels:$,searchBarMountId:s,openSetting:{openHelpPanel:!1,openNotificationPanel:!1,openAppSwitchPanel:!1,openOrgSwitchPanel:!1,openVeritonePanel:!1,openUserApplicationSettingsPanel:!1},unseenCount:w,onClickAppSwitchIcon:function(){var e,t;f?(h(!1),k()):(A(),k(),h(!0),e={name:"APP_BAR_PANEL",config:{name:"APP_BAR_PANEL",tabId:TabId.APP_PANEL,dataId:"dataId",type:"APP_BAR_PANEL_TEMPLATE"}},t={panelId:APPLICATION_PANEL_ID,type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,width:720,header:{divider:!0,title:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header.panelTitle-app-switcher",defaultMessage:"App Switcher",description:"Title of applications panel list"}),actions:P?[{action:{type:"user-app-group/createNewAppGroupPlaceholder"},label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-app-bar.header-action.new-app-group",defaultMessage:"New App Group",description:"New App Group action button"}),variant:"contained",size:"large",color:"primary",submit:!0}]:void 0}},l(mountPanel$1({panelId:APPLICATION_PANEL_ID,microFrontend:e,panelConfig:t})))},applications:T,showDashboardIcon:E,userApplicationSettingsIcon:L},e))}))}))})})}const headerBarSelector=e=>null==e?void 0:e.aiWareHeaderBar,registry={[AvailableWidgets.APP_BAR]:App,[AvailableComponents.APP_BAR_PANEL]:SettingPanelComponent},registryLookup=n=>__awaiter$a(void 0,void 0,void 0,function*(){if(registry[n])return registry[n];let e,t=null;switch(n){case AvailableWidgets.SAMPLE_APP_BAR:e=yield import("./js-core.esm2.js"),t=e.SampleAppBar;break;case AvailableWidgets.RESET_PASSWORD:e=yield import("./js-core.esm4.js"),t=e.ResetPassword;break;case AvailableWidgets.FLOW_CENTER:e=yield import("./js-core.esm5.js"),t=e.App;break;case AvailableWidgets.FLOW_WIDGET:e=yield import("./js-core.esm7.js").then(function(e){return e.i}),t=e.App;break;case AvailableWidgets.ENGINE_CENTER_BROWSE:e=yield import("./js-core.esm19.js"),t=e.EngineCenterBrowse;break;case AvailablePanels.SIMPLE_PANEL:e=yield import("./js-core.esm39.js"),t=e.Panel;break;case AvailablePanels.APP_BAR_PANEL_TEMPLATE:e=yield import("./js-core.esm41.js"),t=e.AppbarPanel;break;case AvailablePanels.APP_BAR_TAB_PANEL_TEMPLATE:e=yield import("./js-core.esm41.js"),t=e.AppbarTabPanel;break;case AvailablePanels.TAB_TEMPLATE:e=yield import("./js-core.esm41.js"),t=e.TabPanel;break;case AvailableComponents.NOTIFICATION_PANEL:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationPanel;break;case AvailableComponents.NOTIFICATION_DETAIL:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationDetailPanel;break;case AvailableComponents.NOTIFICATION_SETTING:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationSetting;break;case AvailableComponents.NOTIFICATION_UTILITY:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationUtilityPanel;break;case AvailableComponents.NOTIFICATION_APPLICATION:e=yield Promise.resolve().then(function(){return index_esm$2}),t=e.NotificationApplication;break;case AvailableComponents.HELP_PANEL:e=yield Promise.resolve().then(function(){return index_esm}),t=e.HelpCenterPanel;break;case AvailableComponents.EDIT_PROFILE_PICTURE:e=yield Promise.resolve().then(function(){return index_esm$1}),t=e.EditProFilePicture;break;case AvailableComponents.TEST_COMPONENT:e=yield import("./js-core.esm39.js"),t=e.SamplePanel1;break;case AvailableComponents.TEST_COMPONENT2:e=yield import("./js-core.esm39.js"),t=e.SamplePanel2;break;case AvailableComponents.TEST_COMPONENT3:e=yield import("./js-core.esm39.js"),t=e.SamplePanel3;break;case AvailableComponents.SETTING_PREFERENCE:e=yield import("./js-core.esm45.js"),t=e.SettingsPreferencesPanel;break;case AvailableComponents.ORGANIZATION_PANEL:e=yield import("./js-core.esm42.js"),t=e.OrganizationPanel;break;case AvailableComponents.INVITE_USERS_PANEL:e=yield import("./js-core.esm42.js"),t=e.InviteUsersPanel;break;case AvailableComponents.INVITE_REQUESTS_PANEL:e=yield import("./js-core.esm42.js"),t=e.InviteRequestsPanel;break;case AvailableComponents.REVIEW_ORG_INVITE_PANEL:e=yield import("./js-core.esm42.js"),t=e.ReviewRequestPanel;break;case AvailableComponents.ADD_APPLICATIONS:e=yield import("./js-core.esm42.js"),t=e.AddApplicationsPanel;break;case AvailableComponents.DATA_CENTER_BROWSE:e=yield import("./js-core.esm46.js"),t=e.DataCenterBrowse;break;case AvailableComponents.DATA_CENTER_FOLDERS_AND_FILES:e=yield import("./js-core.esm46.js"),t=e.FoldersAndFilesPanel;break;case AvailableComponents.DATA_CENTER_FILE_INFO_PANEL:e=yield import("./js-core.esm46.js"),t=e.FileInfoPanel;break;case AvailableComponents.DATA_CENTER_IMPORTER:e=yield import("./js-core.esm57.js"),t=e.DataCenterImporter;break;case AvailableComponents.DATA_LABELER:e=yield import("./js-core.esm59.js"),t=e.DataLabelerPanel;break;case AvailableComponents.ADMIN_CENTER_OPEN_ID:e=yield import("./js-core.esm60.js"),t=e.AdminCenterOpenId;break;case AvailableComponents.ADMIN_CENTER_BROWSE:e=yield import("./js-core.esm61.js"),t=e.AdminCenterBrowse;break;case AvailableComponents.DATA_CENTER_PROCESS_AI:e=yield import("./js-core.esm65.js"),t=e.DataCenterProcessAI;break;case AvailableComponents.ENGINE_CENTER_NEW:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.EngineCenterNew;break;case AvailableComponents.ENGINE_CENTER_FILTER:e=yield import("./js-core.esm19.js"),t=e.EngineCenterFilter;break;case AvailableComponents.APP_CENTER_FILTER:e=yield import("./js-core.esm66.js"),t=e.AppCenterFilter;break;case AvailableComponents.ENGINE_CENTER_DETAILS:e=yield import("./js-core.esm19.js"),t=e.EngineDetails;break;case AvailableComponents.ENGINE_CENTER_NEW_BUILD:e=yield import("./js-core.esm19.js"),t=e.CreateNewBuildPanel;break;case AvailableComponents.ENGINE_CENTER_CUSTOM_FIELDS_FORM:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.EngineCenterCustomFieldsForm;break;case AvailableComponents.ENGINE_CENTER_SCHEMAS_FORM_PANEL:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.SchemasFormPanel;break;case AvailableComponents.ENGINE_CENTER_INPUT_TYPE_FLYOUT:e=yield import("./js-core.esm20.js").then(function(e){return e.h}),t=e.InputTypeFlyout;break;case AvailableComponents.ENGINE_CENTER_EDIT_RELEASE_NOTES:e=yield import("./js-core.esm19.js"),t=e.EditReleaseNotes;break;case AvailableComponents.ENGINE_CENTER_VERSION_HISTORY_PANEL:e=yield import("./js-core.esm19.js"),t=e.VersionHistoryPanel;break;case AvailableComponents.SUPPORTED_FILE_TYPES:e=yield import("./js-core.esm57.js"),t=e.SupportedFileTypes;break;case AvailableComponents.EDIT_FILE_METADATA:e=yield import("./js-core.esm57.js"),t=e.EditFileMetadata;break;case AvailableWidgets.APP_CENTER_BROWSE:e=yield import("./js-core.esm66.js"),t=e.AppCenterBrowse;break;case AvailableComponents.APP_CENTER_NEW:e=yield import("./js-core.esm67.js"),t=e.AppCenterNew;break;case AvailableComponents.APP_CENTER_ADD_FLOW_PANEL:e=yield import("./js-core.esm67.js"),t=e.AppCenterAddFlowPanel;break;case AvailableComponents.APP_CENTER_ADD_SCHEMA_PANEL:e=yield import("./js-core.esm67.js"),t=e.AppCenterAddSchemaPanel;break;case AvailableComponents.APP_CENTER_CONFIG_FIELDS_FORM:e=yield import("./js-core.esm67.js"),t=e.AppCenterConfigFieldsForm;break;case AvailableComponents.APP_CENTER_CONTEXT_MENU_EXTENSIONS:e=yield import("./js-core.esm67.js"),t=e.AppCenterContextMenuExtensionPanel;break;case AvailableComponents.APP_CENTER_EVENT_PANEL:e=yield import("./js-core.esm67.js"),t=e.AppCenterEventPanel;break;case AvailableComponents.APP_CENTER_AUTOMATE_PALETTE_INTEGRATION_PANEL:e=yield import("./js-core.esm67.js"),t=e.AppCenterPaletteIntegrationPanel;break;case AvailableComponents.APP_CENTER_BROWSE:e=yield import("./js-core.esm66.js"),t=e.AppCenterBrowse;break;case AvailableComponents.APP_CENTER_DETAILS:e=yield import("./js-core.esm66.js"),t=e.AppCenterDetails;break;case AvailableComponents.DATA_CENTER_ENGINE_SELECTION:e=yield import("./js-core.esm65.js"),t=e.DataCenterEngineSelection;break;case AvailableComponents.ADMIN_CENTER_NEW_GROUP_PANEL:e=yield import("./js-core.esm54.js"),t=e.NewGroupPanel;break;case AvailableComponents.PERMISSIONS_PANEL:e=yield import("./js-core.esm48.js"),t=e.PermissionsPanel;break;case AvailableComponents.GROUP_INFO_PANEL:e=yield import("./js-core.esm48.js"),t=e.GroupInfoPanel;break;case AvailableComponents.NEW_PERMISSION_SET_PANEL:e=yield import("./js-core.esm48.js"),t=e.NewPermissionSetPanel;break;case AvailableComponents.PERMISSION_SET_DETAILS_PANEL:e=yield import("./js-core.esm48.js"),t=e.PermissionSetDetailsPanel;break;case AvailableComponents.DATA_CENTER_MDP_IFRAME_PANEL:e=yield import("./js-core.esm46.js"),t=e.MediaDetailsPanelIframe;break;case AvailableComponents.DATA_CENTER_INGESTION_CREATION_PANEL:e=yield import("./js-core.esm46.js"),t=e.IngestionCreationPanel;break;case AvailableComponents.DATA_CENTER_SELECT_IMPORT_SOURCE:e=yield import("./js-core.esm46.js"),t=e.SelectImportSource;break;case AvailableComponents.DATA_CENTER_SOURCE_CREATION_PANEL:e=yield import("./js-core.esm46.js"),t=e.SourceCreationPanel;break;case AvailableComponents.ADMIN_CENTER_GROUP_DETAILS_PANEL:e=yield import("./js-core.esm54.js"),t=e.GroupDetailsPanel;break;case AvailableComponents.ADMIN_CENTER_ADD_MEMBER_PANEL:e=yield import("./js-core.esm54.js"),t=e.AddMemberPanel;break;case AvailableComponents.APPLICATION_DETAILS_PANEL:e=yield import("./js-core.esm62.js"),t=e.ApplicationDetailsPanel;break;case AvailableComponents.PROCESSING_CENTER_SOURCES:e=yield import("./js-core.esm68.js"),t=e.ProcessingCenterSources;break;case AvailableComponents.PROCESSING_CENTER_ERROR_DETAIL:e=yield import("./js-core.esm68.js"),t=e.ErrorDetailPanel;break;case AvailableComponents.USER_APPLICATION_SETTINGS_PANEL:e=yield Promise.resolve().then(function(){return index_esm$3}),t=e.UserApplicationSettingsPanel;break;case AvailableComponents.ADD_APPLICATION_USERS_PANEL:e=yield import("./js-core.esm62.js"),t=e.AddUsersPanel;break;case AvailableComponents.PROCESSING_CENTER_BROWSE:e=yield import("./js-core.esm71.js"),t=e.ProcessingCenterBrowse;break;case AvailableComponents.JOBS_TABLE_SETTINGS_PANEL:e=yield import("./js-core.esm72.js"),t=e.JobsTableSettingsPanel;break;case AvailableComponents.VERSION_PANEL:e=yield import("./js-core.esm41.js"),t=e.VersionPanel;break;case AvailableComponents.PROCESSING_CENTER_DAG_BUILDER:e=yield import("./js-core.esm74.js"),t=e.DagBuilder;break;case AvailableComponents.PROCESSING_CENTER_INGESTION:e=yield import("./js-core.esm75.js").then(function(e){return e.an}),t=e.ProcessingCenterIngestion;break;case AvailableComponents.PROCESSING_CENTER_ADVANCED_SETTINGS:e=yield import("./js-core.esm75.js").then(function(e){return e.an}),t=e.ProcessingCenterAdvancedSettings;break;case AvailableComponents.PROCESSING_CENTER_AFFILIATE_PANEL:e=yield import("./js-core.esm75.js").then(function(e){return e.an}),t=e.ProcessingCenterAffiliatePanel;break;case AvailableComponents.JOBS_DETAILS_PANEL:e=yield import("./js-core.esm72.js"),t=e.JobsDetailsPanel;break;case AvailableComponents.TASKS_TABLE_SETTINGS_PANEL:e=yield import("./js-core.esm73.js"),t=e.TasksTableSettingsPanel;break;case AvailableComponents.RESOURCE_CENTER_BROWSE:e=yield import("./js-core.esm76.js"),t=e.ResourceCenterBrowse;break;case AvailableComponents.PACKAGE_DETAILS_PANEL:e=yield import("./js-core.esm78.js"),t=e.PackageDetails;break;case AvailableComponents.INSTANCE_ADMIN_CENTER_BROWSE:e=yield import("./js-core.esm79.js"),t=e.InstanceAdminCenterBrowse}return registry[n]=t}),registerComponent=(e,t)=>{registry[e]=t},WIDGETS_FEATURE_KEY="widgets",initialState$1=(!function(e){e.idle="idle",e.mounting="mounting",e.unmounting="unmounting",e.error="error",e.eventing="eventing"}(WidgetsStatus=WidgetsStatus||{}),{value:[],status:WidgetsStatus.idle}),widgetsSelector=e=>e[name].value,callWidgetOnComplete=(e,t)=>{e=e.find(e=>e.widgetName===t);null!=e&&e.onComplete&&e.onComplete()},{name,reducer,actions:{mountWidget:mountWidget$1,mountWidgetSuccess,mountWidgetError,unmountWidget:unmountWidget$1,unmountWidgetSuccess,unmountWidgetFailure,triggerWidgetCallback,triggerWidgetCallbackSuccess}}=createSlice({name:WIDGETS_FEATURE_KEY,initialState:initialState$1,reducers:{mountWidget:(e,t)=>{e.value.push(t.payload),e.status=WidgetsStatus.mounting},mountWidgetSuccess:e=>{e.status=WidgetsStatus.idle},mountWidgetError:e=>{e.status=WidgetsStatus.error},triggerWidgetCallback:(e,t)=>{e.status=WidgetsStatus.eventing},triggerWidgetCallbackSuccess:e=>{e.status=WidgetsStatus.idle},unmountWidget:(e,t)=>{e.status=WidgetsStatus.unmounting},unmountWidgetSuccess:(e,t)=>{e.value=e.value.filter(e=>e.widgetId!==t.payload),e.status=WidgetsStatus.idle},unmountWidgetFailure:e=>{e.status=WidgetsStatus.error}}});function*mountWidgetListenerSaga(){let a;const s={};yield takeEvery$1(mountWidget$1({}).type,function*(e){try{var{widgetConfig:t={},widgetName:n,elementId:r}=null==e?void 0:e.payload,i=(yield call$7(registryLookup,n))||(()=>jsxRuntime.exports.jsx("div",{children:"Component Not Found."})),o=getElement(r,n);o.classList.add("aiware-el"),s[r]?a=s[r]:(a=client$1.createRoot(o),s[r]=a),a.render(jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(i,Object.assign({},t))}))})}))),yield put(mountWidgetSuccess())}catch(e){yield put(mountWidgetError())}}),yield takeEvery$1(e=>/\/booted$/.test(e.type),function*(e){var[e]=e.type.split("/");yield put(triggerWidgetCallback(e))}),yield takeEvery$1(unmountWidget$1("").type,function*(t){try{const e=yield select(e=>{return(null==(e=widgetsSelector(e).find(e=>e.widgetId===t.payload))?void 0:e.elementId)||""});setTimeout(()=>{s[e]&&s[e].unmount(),delete s[e]}),yield put(unmountWidgetSuccess(t.payload))}catch(e){yield put(unmountWidgetFailure())}}),yield takeEvery$1(triggerWidgetCallback("").type,function*(e){var t=yield select(widgetsSelector);callWidgetOnComplete(t,e.payload),yield put(triggerWidgetCallbackSuccess())})}function getWidgetsModule(){return{id:name,reducerMap:{[name]:reducer},sagas:[mountWidgetListenerSaga],initialActions:[]}}function getDataModule(){return{id:"data",reducerMap:{data:(e,{type:t,payload:n})=>{return t===setData({}).type?[...e.filter(e=>e.id!==n.id),n]:e||[]}},sagas:[],initialActions:[]}}var match,version,store,wmget,wmhas,wmset,set,get,has,STATE,activeXDocument,IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator,commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},check=function(e){return e&&e.Math==Math&&e},global$b=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")(),objectGetOwnPropertyDescriptor={},fails$c=function(e){try{return!!e()}catch(e){return!0}},fails$b=fails$c,descriptors=!fails$c(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),fails$a=fails$c,functionBindNative=!fails$c(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),NATIVE_BIND$1=functionBindNative,call$6=Function.prototype.call,functionCall=NATIVE_BIND$1?call$6.bind(call$6):function(){return call$6.apply(call$6,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$1&&!$propertyIsEnumerable.call({1:2},1),createPropertyDescriptor$3=(objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){e=getOwnPropertyDescriptor$1(this,e);return!!e&&e.enumerable}:$propertyIsEnumerable,function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}),NATIVE_BIND=functionBindNative,FunctionPrototype$1=Function.prototype,bind=FunctionPrototype$1.bind,call$5=FunctionPrototype$1.call,uncurryThis$c=NATIVE_BIND&&bind.bind(call$5,call$5),functionUncurryThis=NATIVE_BIND?function(e){return e&&uncurryThis$c(e)}:function(e){return e&&function(){return call$5.apply(e,arguments)}},uncurryThis$b=functionUncurryThis,toString$3=uncurryThis$b({}.toString),stringSlice=uncurryThis$b("".slice),classofRaw$1=function(e){return stringSlice(toString$3(e),8,-1)},uncurryThis$a=functionUncurryThis,fails$9=fails$c,classof$3=classofRaw$1,$Object$4=Object,split=functionUncurryThis("".split),indexedObject=fails$9(function(){return!$Object$4("z").propertyIsEnumerable(0)})?function(e){return"String"==classof$3(e)?split(e,""):$Object$4(e)}:$Object$4,$TypeError$7=TypeError,requireObjectCoercible$3=function(e){if(null==e)throw $TypeError$7("Can't call method on "+e);return e},IndexedObject$1=indexedObject,requireObjectCoercible$2=requireObjectCoercible$3,toIndexedObject$5=function(e){return IndexedObject$1(requireObjectCoercible$2(e))},isCallable$f=function(e){return"function"==typeof e},isCallable$e=isCallable$f,isObject$6=function(e){return"object"==typeof e?null!==e:isCallable$e(e)},global$a=global$b,isCallable$d=isCallable$f,aFunction=function(e){return isCallable$d(e)?e:void 0},getBuiltIn$4=function(e,t){return arguments.length<2?aFunction(global$a[e]):global$a[e]&&global$a[e][t]},uncurryThis$9=functionUncurryThis,objectIsPrototypeOf=functionUncurryThis({}.isPrototypeOf),getBuiltIn$3=getBuiltIn$4,engineUserAgent=getBuiltIn$4("navigator","userAgent")||"",global$9=global$b,userAgent=engineUserAgent,process$1=global$9.process,Deno=global$9.Deno,versions=process$1&&process$1.versions||Deno&&Deno.version,v8=versions&&versions.v8,engineV8Version=version=!(version=v8?0<(match=v8.split("."))[0]&&match[0]<4?1:+(match[0]+match[1]):version)&&userAgent&&(!(match=userAgent.match(/Edge\/(\d+)/))||74<=match[1])&&(match=userAgent.match(/Chrome\/(\d+)/))?+match[1]:version,V8_VERSION=version,fails$8=fails$c,nativeSymbol=!!Object.getOwnPropertySymbols&&!fails$8(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION&&V8_VERSION<41}),NATIVE_SYMBOL$1=nativeSymbol,useSymbolAsUid=nativeSymbol&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$2=getBuiltIn$4,isCallable$c=isCallable$f,isPrototypeOf=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$2=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$2("Symbol");return isCallable$c(t)&&isPrototypeOf(t.prototype,$Object$3(e))},$String$3=String,tryToString$1=function(e){try{return $String$3(e)}catch(e){return"Object"}},isCallable$b=isCallable$f,tryToString=tryToString$1,$TypeError$6=TypeError,aCallable$1=function(e){if(isCallable$b(e))return e;throw $TypeError$6(tryToString(e)+" is not a function")},aCallable=aCallable$1,getMethod$1=function(e,t){e=e[t];return null==e?void 0:aCallable(e)},call$4=functionCall,isCallable$a=isCallable$f,isObject$5=isObject$6,$TypeError$5=TypeError,ordinaryToPrimitive$1=function(e,t){var n,r;if("string"===t&&isCallable$a(n=e.toString)&&!isObject$5(r=call$4(n,e)))return r;if(isCallable$a(n=e.valueOf)&&!isObject$5(r=call$4(n,e)))return r;if("string"!==t&&isCallable$a(n=e.toString)&&!isObject$5(r=call$4(n,e)))return r;throw $TypeError$5("Can't convert object to primitive value")},shared$3={exports:{}},global$8=global$b,defineProperty$5=Object.defineProperty,defineGlobalProperty$3=function(t,n){try{defineProperty$5(global$8,t,{value:n,configurable:!0,writable:!0})}catch(e){global$8[t]=n}return n},global$7=global$b,defineGlobalProperty$2=defineGlobalProperty$3,SHARED="__core-js_shared__",store$3=global$b[SHARED]||defineGlobalProperty$2(SHARED,{}),sharedStore=store$3,store$2=sharedStore,requireObjectCoercible$1=((shared$3.exports=function(e,t){return store$2[e]||(store$2[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"}),requireObjectCoercible$3),$Object$2=Object,toObject$3=function(e){return $Object$2(requireObjectCoercible$1(e))},uncurryThis$8=functionUncurryThis,toObject$2=toObject$3,hasOwnProperty=functionUncurryThis({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty(toObject$2(e),t)},uncurryThis$7=functionUncurryThis,id=0,postfix=Math.random(),toString$2=uncurryThis$7(1..toString),uid$2=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$2(++id+postfix,36)},global$6=global$b,shared$2=shared$3.exports,hasOwn$8=hasOwnProperty_1,uid$1=uid$2,NATIVE_SYMBOL=nativeSymbol,USE_SYMBOL_AS_UID=useSymbolAsUid,WellKnownSymbolsStore=shared$2("wks"),Symbol$1=global$6.Symbol,symbolFor=Symbol$1&&Symbol$1.for,createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid$1,wellKnownSymbol$a=function(e){var t;return hasOwn$8(WellKnownSymbolsStore,e)&&(NATIVE_SYMBOL||"string"==typeof WellKnownSymbolsStore[e])||(t="Symbol."+e,NATIVE_SYMBOL&&hasOwn$8(Symbol$1,e)?WellKnownSymbolsStore[e]=Symbol$1[e]:WellKnownSymbolsStore[e]=(USE_SYMBOL_AS_UID&&symbolFor?symbolFor:createWellKnownSymbol)(t)),WellKnownSymbolsStore[e]},call$3=functionCall,isObject$4=isObject$6,isSymbol$1=isSymbol$2,getMethod=getMethod$1,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$9=wellKnownSymbol$a,$TypeError$4=TypeError,TO_PRIMITIVE=wellKnownSymbol$a("toPrimitive"),toPrimitive$1=function(e,t){if(!isObject$4(e)||isSymbol$1(e))return e;var n=getMethod(e,TO_PRIMITIVE);if(n){if(n=call$3(n,e,t=void 0===t?"default":t),!isObject$4(n)||isSymbol$1(n))return n;throw $TypeError$4("Can't convert object to primitive value")}return ordinaryToPrimitive(e,t=void 0===t?"number":t)},toPrimitive=toPrimitive$1,isSymbol=isSymbol$2,toPropertyKey$2=function(e){e=toPrimitive(e,"string");return isSymbol(e)?e:e+""},global$5=global$b,isObject$3=isObject$6,document$1=global$b.document,EXISTS$1=isObject$3(document$1)&&isObject$3(document$1.createElement),documentCreateElement$2=function(e){return EXISTS$1?document$1.createElement(e):{}},DESCRIPTORS$9=descriptors,fails$7=fails$c,createElement=documentCreateElement$2,ie8DomDefine=!descriptors&&!fails$c(function(){return 7!=Object.defineProperty(createElement("div"),"a",{get:function(){return 7}}).a}),DESCRIPTORS$8=descriptors,call$2=functionCall,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,createPropertyDescriptor$2=createPropertyDescriptor$3,toIndexedObject$4=toIndexedObject$5,toPropertyKey$1=toPropertyKey$2,hasOwn$7=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,objectDefineProperty=(objectGetOwnPropertyDescriptor.f=DESCRIPTORS$8?$getOwnPropertyDescriptor$1:function(e,t){if(e=toIndexedObject$4(e),t=toPropertyKey$1(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$1(e,t)}catch(e){}if(hasOwn$7(e,t))return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f,e,t),e[t])},{}),DESCRIPTORS$7=descriptors,fails$6=fails$c,v8PrototypeDefineBug=descriptors&&fails$c(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),isObject$2=isObject$6,$String$2=String,$TypeError$3=TypeError,anObject$5=function(e){if(isObject$2(e))return e;throw $TypeError$3($String$2(e)+" is not an object")},DESCRIPTORS$6=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$4=anObject$5,toPropertyKey=toPropertyKey$2,$TypeError$2=TypeError,$defineProperty=Object.defineProperty,$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable",DESCRIPTORS$5=(objectDefineProperty.f=DESCRIPTORS$6?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,n){var r;return anObject$4(e),t=toPropertyKey(t),anObject$4(n),"function"==typeof e&&"prototype"===t&&"value"in n&&WRITABLE in n&&!n[WRITABLE]&&(r=$getOwnPropertyDescriptor(e,t))&&r[WRITABLE]&&(e[t]=n.value,n={configurable:(CONFIGURABLE$1 in n?n:r)[CONFIGURABLE$1],enumerable:(ENUMERABLE in n?n:r)[ENUMERABLE],writable:!1}),$defineProperty(e,t,n)}:$defineProperty:function(e,t,n){if(anObject$4(e),t=toPropertyKey(t),anObject$4(n),IE8_DOM_DEFINE)try{return $defineProperty(e,t,n)}catch(e){}if("get"in n||"set"in n)throw $TypeError$2("Accessors not supported");return"value"in n&&(e[t]=n.value),e},descriptors),definePropertyModule$3=objectDefineProperty,createPropertyDescriptor$1=createPropertyDescriptor$3,createNonEnumerableProperty$4=DESCRIPTORS$5?function(e,t,n){return definePropertyModule$3.f(e,t,createPropertyDescriptor$1(1,n))}:function(e,t,n){return e[t]=n,e},makeBuiltIn$2={exports:{}},DESCRIPTORS$4=descriptors,hasOwn$6=hasOwnProperty_1,FunctionPrototype=Function.prototype,getDescriptor=DESCRIPTORS$4&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$6(FunctionPrototype,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$4||getDescriptor(FunctionPrototype,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},uncurryThis$6=functionUncurryThis,isCallable$9=isCallable$f,store$1=sharedStore,functionToString=functionUncurryThis(Function.toString),inspectSource$2=(isCallable$9(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)}),store$1.inspectSource),global$4=global$b,isCallable$8=isCallable$f,inspectSource$1=inspectSource$2,WeakMap$1=global$b.WeakMap,nativeWeakMap=isCallable$8(WeakMap$1)&&/native code/.test(inspectSource$1(WeakMap$1)),shared$1=shared$3.exports,uid=uid$2,keys=shared$1("keys"),sharedKey$3=function(e){return keys[e]||(keys[e]=uid(e))},hiddenKeys$4={},NATIVE_WEAK_MAP=nativeWeakMap,global$3=global$b,uncurryThis$5=functionUncurryThis,isObject$1=isObject$6,createNonEnumerableProperty$3=createNonEnumerableProperty$4,hasOwn$5=hasOwnProperty_1,shared=sharedStore,sharedKey$2=sharedKey$3,hiddenKeys$3=hiddenKeys$4,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$1=global$3.TypeError,WeakMap$2=global$3.WeakMap,enforce=function(e){return has(e)?get(e):set(e,{})},getterFor=function(t){return function(e){if(isObject$1(e)&&(e=get(e)).type===t)return e;throw TypeError$1("Incompatible receiver, "+t+" required")}},internalState=(has=NATIVE_WEAK_MAP||shared.state?(store=shared.state||(shared.state=new WeakMap$2),wmget=uncurryThis$5(store.get),wmhas=uncurryThis$5(store.has),wmset=uncurryThis$5(store.set),set=function(e,t){if(wmhas(store,e))throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);return t.facade=e,wmset(store,e,t),t},get=function(e){return wmget(store,e)||{}},function(e){return wmhas(store,e)}):(STATE=sharedKey$2("state"),hiddenKeys$3[STATE]=!0,set=function(e,t){if(hasOwn$5(e,STATE))throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$3(e,STATE,t),t},get=function(e){return hasOwn$5(e,STATE)?e[STATE]:{}},function(e){return hasOwn$5(e,STATE)}),{set:set,get:get,has:has,enforce:enforce,getterFor:getterFor}),fails$5=fails$c,isCallable$7=isCallable$f,hasOwn$4=hasOwnProperty_1,DESCRIPTORS$3=descriptors,CONFIGURABLE_FUNCTION_NAME$1=functionName.CONFIGURABLE,inspectSource=inspectSource$2,InternalStateModule$1=internalState,enforceInternalState=InternalStateModule$1.enforce,getInternalState$1=InternalStateModule$1.get,defineProperty$4=Object.defineProperty,CONFIGURABLE_LENGTH=DESCRIPTORS$3&&!fails$5(function(){return 8!==defineProperty$4(function(){},"length",{value:8}).length}),TEMPLATE=String(String).split("String"),makeBuiltIn$1=makeBuiltIn$2.exports=function(e,t,n){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!hasOwn$4(e,"name")||CONFIGURABLE_FUNCTION_NAME$1&&e.name!==t)&&(DESCRIPTORS$3?defineProperty$4(e,"name",{value:t,configurable:!0}):e.name=t),CONFIGURABLE_LENGTH&&n&&hasOwn$4(n,"arity")&&e.length!==n.arity&&defineProperty$4(e,"length",{value:n.arity});try{n&&hasOwn$4(n,"constructor")&&n.constructor?DESCRIPTORS$3&&defineProperty$4(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}n=enforceInternalState(e);return hasOwn$4(n,"source")||(n.source=TEMPLATE.join("string"==typeof t?t:"")),e},isCallable$6=(Function.prototype.toString=makeBuiltIn$1(function(){return isCallable$7(this)&&getInternalState$1(this).source||inspectSource(this)},"toString"),isCallable$f),definePropertyModule$2=objectDefineProperty,makeBuiltIn=makeBuiltIn$2.exports,defineGlobalProperty$1=defineGlobalProperty$3,defineBuiltIn$3=function(e,t,n,r){var i=(r=r||{}).enumerable,o=void 0!==r.name?r.name:t;if(isCallable$6(n)&&makeBuiltIn(n,o,r),r.global)i?e[t]=n:defineGlobalProperty$1(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=n:definePropertyModule$2.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},objectGetOwnPropertyNames={},ceil=Math.ceil,floor=Math.floor,mathTrunc=Math.trunc||function(e){e=+e;return(0<e?floor:ceil)(e)},trunc=mathTrunc,toIntegerOrInfinity$2=function(e){e=+e;return e!=e||0==e?0:trunc(e)},toIntegerOrInfinity$1=toIntegerOrInfinity$2,max=Math.max,min$1=Math.min,toAbsoluteIndex$1=function(e,t){e=toIntegerOrInfinity$1(e);return e<0?max(e+t,0):min$1(e,t)},toIntegerOrInfinity=toIntegerOrInfinity$2,min=Math.min,toLength$1=function(e){return 0<e?min(toIntegerOrInfinity(e),9007199254740991):0},toLength=toLength$1,lengthOfArrayLike$1=function(e){return toLength(e.length)},toIndexedObject$3=toIndexedObject$5,toAbsoluteIndex=toAbsoluteIndex$1,lengthOfArrayLike=lengthOfArrayLike$1,createMethod=function(s){return function(e,t,n){var r,i=toIndexedObject$3(e),o=lengthOfArrayLike(i),a=toAbsoluteIndex(n,o);if(s&&t!=t){for(;a<o;)if((r=i[a++])!=r)return!0}else for(;a<o;a++)if((s||a in i)&&i[a]===t)return s||a||0;return!s&&-1}},arrayIncludes={includes:createMethod(!0),indexOf:createMethod(!1)},uncurryThis$4=functionUncurryThis,hasOwn$3=hasOwnProperty_1,toIndexedObject$2=toIndexedObject$5,indexOf=arrayIncludes.indexOf,hiddenKeys$2=hiddenKeys$4,push=uncurryThis$4([].push),objectKeysInternal=function(e,t){var n,r=toIndexedObject$2(e),i=0,o=[];for(n in r)!hasOwn$3(hiddenKeys$2,n)&&hasOwn$3(r,n)&&push(o,n);for(;t.length>i;)!hasOwn$3(r,n=t[i++])||~indexOf(o,n)||push(o,n);return o},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,hiddenKeys$1=enumBugKeys$3.concat("length","prototype"),objectGetOwnPropertySymbols=(objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys$1(e,hiddenKeys$1)},{}),getBuiltIn$1=(objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols,getBuiltIn$4),uncurryThis$3=functionUncurryThis,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$3=anObject$5,concat$1=functionUncurryThis([].concat),ownKeys$1=getBuiltIn$1("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule.f(anObject$3(e)),n=getOwnPropertySymbolsModule$1.f;return n?concat$1(t,n(e)):t},hasOwn$2=hasOwnProperty_1,ownKeys=ownKeys$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule$1=objectDefineProperty,copyConstructorProperties$1=function(e,t,n){for(var r=ownKeys(t),i=definePropertyModule$1.f,o=getOwnPropertyDescriptorModule.f,a=0;a<r.length;a++){var s=r[a];hasOwn$2(e,s)||n&&hasOwn$2(n,s)||i(e,s,o(t,s))}},fails$4=fails$c,isCallable$5=isCallable$f,replacement=/#|\.prototype\./,isForced$1=function(e,t){e=data[normalize(e)];return e==POLYFILL||e!=NATIVE&&(isCallable$5(t)?fails$4(t):!!t)},normalize=isForced$1.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$1.data={},NATIVE=isForced$1.NATIVE="N",POLYFILL=isForced$1.POLYFILL="P",isForced_1=isForced$1,global$2=global$b,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,createNonEnumerableProperty$2=createNonEnumerableProperty$4,defineBuiltIn$2=defineBuiltIn$3,defineGlobalProperty=defineGlobalProperty$3,copyConstructorProperties=copyConstructorProperties$1,isForced=isForced_1,_export=function(e,t){var n,r,i,o=e.target,a=e.global,s=e.stat,l=a?global$2:s?global$2[o]||defineGlobalProperty(o,{}):(global$2[o]||{}).prototype;if(l)for(n in t){if(r=t[n],i=e.dontCallGetSet?(i=getOwnPropertyDescriptor(l,n))&&i.value:l[n],!isForced(a?n:o+(s?".":"#")+n,e.forced)&&void 0!==i){if(typeof r==typeof i)continue;copyConstructorProperties(r,i)}(e.sham||i&&i.sham)&&createNonEnumerableProperty$2(r,"sham",!0),defineBuiltIn$2(l,n,r,e)}},internalObjectKeys=objectKeysInternal,enumBugKeys$1=enumBugKeys$3,objectKeys$2=Object.keys||function(e){return internalObjectKeys(e,enumBugKeys$1)},DESCRIPTORS$2=descriptors,uncurryThis$2=functionUncurryThis,call$1=functionCall,fails$3=fails$c,objectKeys$1=objectKeys$2,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$1=toObject$3,IndexedObject=indexedObject,$assign=Object.assign,defineProperty$3=Object.defineProperty,concat=uncurryThis$2([].concat),objectAssign=!$assign||fails$3(function(){var e,t,n,r;return!(!DESCRIPTORS$2||1===$assign({b:1},$assign(defineProperty$3({},"a",{enumerable:!0,get:function(){defineProperty$3(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)||(t={},r="abcdefghijklmnopqrst",(e={})[n=Symbol()]=7,r.split("").forEach(function(e){t[e]=e}),7!=$assign({},e)[n])||objectKeys$1($assign({},t)).join("")!=r})?function(e,t){for(var n=toObject$1(e),r=arguments.length,i=1,o=getOwnPropertySymbolsModule.f,a=propertyIsEnumerableModule.f;i<r;)for(var s,l=IndexedObject(arguments[i++]),c=o?concat(objectKeys$1(l),o(l)):objectKeys$1(l),u=c.length,d=0;d<u;)s=c[d++],DESCRIPTORS$2&&!call$1(a,l,s)||(n[s]=l[s]);return n}:$assign,$$3=_export,assign=objectAssign,objectDefineProperties=(_export({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign},{assign:assign}),{}),DESCRIPTORS$1=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule=objectDefineProperty,anObject$2=anObject$5,toIndexedObject$1=toIndexedObject$5,objectKeys=objectKeys$2,getBuiltIn=(objectDefineProperties.f=DESCRIPTORS$1&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$2(e);for(var n,r=toIndexedObject$1(t),i=objectKeys(t),o=i.length,a=0;a<o;)definePropertyModule.f(e,n=i[a++],r[n]);return e},getBuiltIn$4),html$1=getBuiltIn$4("document","documentElement"),anObject$1=anObject$5,definePropertiesModule=objectDefineProperties,enumBugKeys=enumBugKeys$3,hiddenKeys=hiddenKeys$4,html=html$1,documentCreateElement$1=documentCreateElement$2,sharedKey$1=sharedKey$3,GT=">",LT="<",PROTOTYPE="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$3("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e=documentCreateElement$1("iframe"),t="java"+SCRIPT+":";return e.style.display="none",html.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(scriptTag("document.F=Object")),t.close(),t.F},NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"==typeof document||document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame();for(var e=enumBugKeys.length;e--;)delete NullProtoObject[PROTOTYPE][enumBugKeys[e]];return NullProtoObject()},objectCreate=(hiddenKeys[IE_PROTO$1]=!0,Object.create||function(e,t){var n;return null!==e?(EmptyConstructor[PROTOTYPE]=anObject$1(e),n=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,n[IE_PROTO$1]=e):n=NullProtoObject(),void 0===t?n:definePropertiesModule.f(n,t)}),wellKnownSymbol$8=wellKnownSymbol$a,create$1=objectCreate,defineProperty$2=objectDefineProperty.f,UNSCOPABLES=wellKnownSymbol$8("unscopables"),ArrayPrototype=Array.prototype,addToUnscopables$2=(null==ArrayPrototype[UNSCOPABLES]&&defineProperty$2(ArrayPrototype,UNSCOPABLES,{configurable:!0,value:create$1(null)}),function(e){ArrayPrototype[UNSCOPABLES][e]=!0}),iterators={},fails$2=fails$c,correctPrototypeGetter=!fails$c(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),hasOwn$1=hasOwnProperty_1,isCallable$4=isCallable$f,toObject=toObject$3,sharedKey=sharedKey$3,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,IE_PROTO=sharedKey$3("IE_PROTO"),$Object$1=Object,ObjectPrototype=$Object$1.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?$Object$1.getPrototypeOf:function(e){var t,e=toObject(e);return hasOwn$1(e,IE_PROTO)?e[IE_PROTO]:(t=e.constructor,isCallable$4(t)&&e instanceof t?t.prototype:e instanceof $Object$1?ObjectPrototype:null)},fails$1=fails$c,isCallable$3=isCallable$f,getPrototypeOf$1=objectGetPrototypeOf,defineBuiltIn$1=defineBuiltIn$3,wellKnownSymbol$7=wellKnownSymbol$a,ITERATOR$2=wellKnownSymbol$a("iterator"),BUGGY_SAFARI_ITERATORS$1=!1,NEW_ITERATOR_PROTOTYPE=([].keys&&("next"in(arrayIterator=[].keys())?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$1(getPrototypeOf$1(arrayIterator)))!==Object.prototype&&(IteratorPrototype$2=PrototypeOfArrayIteratorPrototype):BUGGY_SAFARI_ITERATORS$1=!0),null==IteratorPrototype$2||fails$1(function(){var e={};return IteratorPrototype$2[ITERATOR$2].call(e)!==e})),iteratorsCore=(isCallable$3((IteratorPrototype$2=NEW_ITERATOR_PROTOTYPE?{}:IteratorPrototype$2)[ITERATOR$2])||defineBuiltIn$1(IteratorPrototype$2,ITERATOR$2,function(){return this}),{IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1}),defineProperty$1=objectDefineProperty.f,hasOwn=hasOwnProperty_1,wellKnownSymbol$6=wellKnownSymbol$a,TO_STRING_TAG$3=wellKnownSymbol$a("toStringTag"),setToStringTag$2=function(e,t,n){(e=e&&!n?e.prototype:e)&&!hasOwn(e,TO_STRING_TAG$3)&&defineProperty$1(e,TO_STRING_TAG$3,{configurable:!0,value:t})},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create=objectCreate,createPropertyDescriptor=createPropertyDescriptor$3,setToStringTag$1=setToStringTag$2,Iterators$2=iterators,returnThis$1=function(){return this},createIteratorConstructor$1=function(e,t,n,r){t+=" Iterator";return e.prototype=create(IteratorPrototype$1,{next:createPropertyDescriptor(+!r,n)}),setToStringTag$1(e,t,!1),Iterators$2[t]=returnThis$1,e},isCallable$2=isCallable$f,$String$1=String,$TypeError$1=TypeError,aPossiblePrototype$1=function(e){if("object"==typeof e||isCallable$2(e))return e;throw $TypeError$1("Can't set "+$String$1(e)+" as a prototype")},uncurryThis$1=functionUncurryThis,anObject=anObject$5,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var n,r=!1,e={};try{(n=uncurryThis$1(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),r=e instanceof Array}catch(e){}return function(e,t){return anObject(e),aPossiblePrototype(t),r?n(e,t):e.__proto__=t,e}}():void 0),$$2=_export,call=functionCall,FunctionName=functionName,isCallable$1=isCallable$f,createIteratorConstructor=createIteratorConstructor$1,getPrototypeOf=objectGetPrototypeOf,setPrototypeOf=objectSetPrototypeOf,setToStringTag=setToStringTag$2,createNonEnumerableProperty$1=createNonEnumerableProperty$4,defineBuiltIn=defineBuiltIn$3,wellKnownSymbol$5=wellKnownSymbol$a,Iterators$1=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$1=wellKnownSymbol$5("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},defineIterator$1=function(e,t,n,r,i,o,a){createIteratorConstructor(n,t,r);function s(e){if(e===i&&f)return f;if(!BUGGY_SAFARI_ITERATORS&&e in d)return d[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new n(this,e)}}return function(){return new n(this)}}var l,c,r=t+" Iterator",u=!1,d=e.prototype,p=d[ITERATOR$1]||d["@@iterator"]||i&&d[i],f=!BUGGY_SAFARI_ITERATORS&&p||s(i),h="Array"==t&&d.entries||p;if(h&&(h=getPrototypeOf(h.call(new e)))!==Object.prototype&&h.next&&(getPrototypeOf(h)!==IteratorPrototype&&(setPrototypeOf?setPrototypeOf(h,IteratorPrototype):isCallable$1(h[ITERATOR$1])||defineBuiltIn(h,ITERATOR$1,returnThis)),setToStringTag(h,r,!0)),PROPER_FUNCTION_NAME&&i==VALUES&&p&&p.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty$1(d,"name",VALUES):(u=!0,f=function(){return call(p,this)})),i)if(l={values:s(VALUES),keys:o?f:s(KEYS),entries:s(ENTRIES)},a)for(c in l)!BUGGY_SAFARI_ITERATORS&&!u&&c in d||defineBuiltIn(d,c,l[c]);else $$2({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||u},l);return d[ITERATOR$1]!==f&&defineBuiltIn(d,ITERATOR$1,f,{name:i}),Iterators$1[t]=f,l},toIndexedObject=toIndexedObject$5,addToUnscopables$1=addToUnscopables$2,Iterators=iterators,InternalStateModule=internalState,defineProperty=objectDefineProperty.f,defineIterator=defineIterator$1,DESCRIPTORS=descriptors,ARRAY_ITERATOR="Array Iterator",setInternalState=InternalStateModule.set,getInternalState=InternalStateModule.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator(Array,"Array",function(e,t){setInternalState(this,{type:ARRAY_ITERATOR,target:toIndexedObject(e),index:0,kind:t})},function(){var e=getInternalState(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?{value:e.target=void 0,done:!0}:"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values"),values=Iterators.Arguments=Iterators.Array;if(addToUnscopables$1("keys"),addToUnscopables$1("values"),addToUnscopables$1("entries"),DESCRIPTORS&&"values"!==values.name)try{defineProperty(values,"name",{value:"values"})}catch(e){}var COLLECTION_NAME,domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},documentCreateElement=documentCreateElement$2,classList=documentCreateElement$2("span").classList,DOMTokenListPrototype$1=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype$1===Object.prototype?void 0:DOMTokenListPrototype$1,global$1=global$b,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty=createNonEnumerableProperty$4,wellKnownSymbol$4=wellKnownSymbol$a,ITERATOR=wellKnownSymbol$4("iterator"),TO_STRING_TAG$2=wellKnownSymbol$4("toStringTag"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(t,e){if(t){if(t[ITERATOR]!==ArrayValues)try{createNonEnumerableProperty(t,ITERATOR,ArrayValues)}catch(e){t[ITERATOR]=ArrayValues}if(t[TO_STRING_TAG$2]||createNonEnumerableProperty(t,TO_STRING_TAG$2,e),DOMIterables[e])for(var n in ArrayIteratorMethods)if(t[n]!==ArrayIteratorMethods[n])try{createNonEnumerableProperty(t,n,ArrayIteratorMethods[n])}catch(e){t[n]=ArrayIteratorMethods[n]}}};for(COLLECTION_NAME in DOMIterables)handlePrototype(global$1[COLLECTION_NAME]&&global$1[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");var $$1=_export,$includes=arrayIncludes.includes,fails=fails$c,addToUnscopables=addToUnscopables$2,BROKEN_ON_SPARSE=fails$c(function(){return!Array(1).includes()}),isObject=($$1({target:"Array",proto:!0,forced:BROKEN_ON_SPARSE},{includes:function(e){return $includes(this,e,1<arguments.length?arguments[1]:void 0)}}),addToUnscopables("includes"),isObject$6),classof$2=classofRaw$1,wellKnownSymbol$3=wellKnownSymbol$a,MATCH$1=wellKnownSymbol$a("match"),isRegexp=function(e){var t;return isObject(e)&&(void 0!==(t=e[MATCH$1])?!!t:"RegExp"==classof$2(e))},isRegExp=isRegexp,$TypeError=TypeError,notARegexp=function(e){if(isRegExp(e))throw $TypeError("The method doesn't accept regular expressions");return e},wellKnownSymbol$2=wellKnownSymbol$a,TO_STRING_TAG$1=wellKnownSymbol$a("toStringTag"),test={},toStringTagSupport=(test[TO_STRING_TAG$1]="z","[object z]"===String(test)),TO_STRING_TAG_SUPPORT=toStringTagSupport,isCallable=isCallable$f,classofRaw=classofRaw$1,wellKnownSymbol$1=wellKnownSymbol$a,TO_STRING_TAG=wellKnownSymbol$a("toStringTag"),$Object=Object,CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$1=TO_STRING_TAG_SUPPORT?classofRaw:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=tryGet(e=$Object(e),TO_STRING_TAG))?t:CORRECT_ARGUMENTS?classofRaw(e):"Object"==(t=classofRaw(e))&&isCallable(e.callee)?"Arguments":t},classof=classof$1,$String=String,toString$1=function(e){if("Symbol"===classof(e))throw TypeError("Cannot convert a Symbol value to a string");return $String(e)},wellKnownSymbol=wellKnownSymbol$a,MATCH=wellKnownSymbol$a("match"),correctIsRegexpLogic=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[MATCH]=!1,"/./"[t](n)}catch(e){}}return!1},$=_export,uncurryThis=functionUncurryThis,notARegExp=notARegexp,requireObjectCoercible=requireObjectCoercible$3,toString=toString$1,correctIsRegExpLogic=correctIsRegexpLogic,stringIndexOf=functionUncurryThis("".indexOf);$({target:"String",proto:!0,forced:!correctIsRegExpLogic("includes")},{includes:function(e){return!!~stringIndexOf(toString(requireObjectCoercible(this)),toString(notARegExp(e)),1<arguments.length?arguments[1]:void 0)}});const clickAwayListener=e=>{var t,n=null==(n=null==(t=null==e?void 0:e.composedPath())?void 0:t.find)?void 0:n.call(t,e=>{var t;return(null==(t=null==e?void 0:e.id)?void 0:t.toLowerCase().includes("aiware-app-bar"))||(null==(t=null==e?void 0:e.id)?void 0:t.toLowerCase().includes("panel"))||(null==(t=null==e?void 0:e.id)?void 0:t.includes("APP_BAR"))||(null==(t=null==e?void 0:e.id)?void 0:t.includes("undefined"))||(null==(t=null==e?void 0:e.id)?void 0:t.includes("-root"))||(null==(t=null==(e=null==(t=null==e?void 0:e.attributes)?void 0:t.getNamedItem("role"))?void 0:e.value)?void 0:t.includes("presentation"))}),e="BODY"===(null==(t=((null==e?void 0:e.composedPath())||[])[0])?void 0:t.tagName);n||e||store$4.dispatch(unmountAllPanel$1("null"))};class RefHolder extends react.exports.Component{render(){return jsxRuntime.exports.jsx("div",{children:this.props.children})}}const rootPostfix="root";function mountPanelListenerSagaGenerator(d,p){let f;const h={};return function*(){yield takeEvery$1(mountPanel$1({}).type,function*(e){const{panelId:t,microFrontend:{name:n},panelConfig:r}=null==e?void 0:e.payload;let i=null,o=void 0;p&&(o=yield call$7(p,r.type),i=yield call$7(p,n));var a,s,l,e=i||d[n]||(()=>jsxRuntime.exports.jsx("div",{children:"Component Not Found."})),c=o||d[r.type],u=(r.parent&&({panelConfig:{marginTop:u=0,marginStart:a=0,zIndex:s=1e3},panelId:l}=yield select(e=>e.panels.find(e=>e.panelId===r.parent)),l=(null==(l=null===document||void 0===document?void 0:document.getElementById(l))?void 0:l.clientWidth)||650,r.marginTop=r.marginTop||u,r.marginStart=r.marginStart||a+l,r.zIndex=r.zIndex||s),getElement(t+"-"+rootPostfix));u.classList.add("aiware-el"),h[t+"-"+rootPostfix]?f=h[t+"-"+rootPostfix]:(f=client$1.createRoot(u),h[t+"-"+rootPostfix]=f),f.render(jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(ClickAwayListener,Object.assign({onClickAway:clickAwayListener},{children:jsxRuntime.exports.jsx(RefHolder,{children:jsxRuntime.exports.jsx(c,Object.assign({type:"SIMPLE_PANEL",panelId:t,"data-test":"panel-"+t},{children:jsxRuntime.exports.jsx(e,{})}))})}))}))})})))}),yield takeEvery$1(unmountPanel$1("").type,function*(t){var e=yield select(e=>e.panels.find(e=>{return(null==(e=null==e?void 0:e.panelConfig)?void 0:e.parentPanelId)===t.payload}));e&&0<Object.keys(e).length&&(yield put(unmountPanel$1(e.panelId))),setTimeout(()=>{h[t.payload+"-"+rootPostfix]&&h[t.payload+"-"+rootPostfix].unmount(),delete h[t.payload+"-"+rootPostfix]})}),yield takeEvery$1(openLinkOnNewTab.type,function(e){var e=null==(e=null==e?void 0:e.payload)?void 0:e.url,t=document.createElement("a");t.target="_blank",t.href=e,t.click()})}}function getPanelsModule(e,t){return{id:name$1,reducerMap:{panels:(e,{type:t,payload:n})=>{switch(t){case mountPanel$1({}).type:{var r=[...e],i=(n.panelConfig.show=!0,n.panelConfig);const a=null==i?void 0:i.parentPanelId;var i=null==i?void 0:i.dimmedStatus;return"dimAllParents"===i?[...r.map(e=>{return Object.assign(Object.assign({},e),{panelConfig:Object.assign(Object.assign({},e.panelConfig),{dimmed:((null==(e=e.panelConfig)?void 0:e.dimmed)||0)+1})})}),n]:a&&i?(r[i=e.findIndex(e=>e.panelId===a)]=Object.assign(Object.assign({},r[i]),{panelConfig:Object.assign(Object.assign({},null==(o=r[i])?void 0:o.panelConfig),{dimmed:((null==(i=null==(o=r[i])?void 0:o.panelConfig)?void 0:i.dimmed)||0)+1})}),[...r,n]):[...e,n]}case unmountPanel$1("").type:{i=null==(o=e.find(e=>e.panelId===n))?void 0:o.panelConfig;const s=null==i?void 0:i.parentPanelId;var r=null==i?void 0:i.dimmedStatus,o=e.filter(e=>e.panelId!==n);return"dimAllParents"===r?o.map(e=>{return Object.assign(Object.assign({},e),{panelConfig:Object.assign(Object.assign({},e.panelConfig),{dimmed:((null==(e=e.panelConfig)?void 0:e.dimmed)||0)-1})})}):(s&&r&&-1!==(i=e.findIndex(e=>e.panelId===s))&&(o[i]=Object.assign(Object.assign({},o[i]),{panelConfig:Object.assign(Object.assign({},o[i].panelConfig),{dimmed:((null==(r=o[i].panelConfig)?void 0:r.dimmed)||0)-1})})),o)}case hidePanel$1("").type:i=e.find(e=>e.panelId===n),r=e.filter(e=>e.panelId!==n),i=Object.assign(Object.assign({},i),{panelConfig:Object.assign(Object.assign({},null==i?void 0:i.panelConfig),{show:!1})});return[...r,i];case unmountAllPanel$1("").type:return e.map(e=>Object.assign(Object.assign({},e),{panelConfig:Object.assign(Object.assign({},null==e?void 0:e.panelConfig),{show:!1})}));case updatePanelMicroFrontendProps({}).type:o=e.find(e=>e.panelId===n.id),r=e.filter(e=>e.panelId!==n.id),o=Object.assign(Object.assign({},o),{microFrontend:Object.assign(Object.assign({},null==o?void 0:o.microFrontend),{config:n.props})});return[...r,o]}return e||[]}},sagas:[mountPanelListenerSagaGenerator(e,t)],initialActions:[]}}const useStyles$2=makeStyles()(e=>({sdkSnackbarContainer:{"& svg":{fill:"white"}}}));function CustomSnackbar(){const n=useDispatch(),[e,t]=react.exports.useState([]),[r,i]=react.exports.useState(!1),[o,a]=react.exports.useState(void 0),{message:s,duration:l}=useSelector(snackbarSelector);var c=useStyles$2()["classes"],u=(react.exports.useEffect(()=>{null!==s&&void 0!==s&&s.content&&t(e=>[...e,s])},[s]),react.exports.useEffect(()=>{e.length&&!o?(a(Object.assign({},e[0])),t(e=>e.slice(1)),i(!0)):e.length&&o&&r&&(n(clearMessage()),i(!1))},[e,o,r,n]),(e,t)=>{"clickaway"!==t&&(i(!1),n(clearMessage()))});return jsxRuntime.exports.jsx(Snackbar$1,Object.assign({anchorOrigin:{vertical:"bottom",horizontal:"right"},open:r,autoHideDuration:l||3e3,onClose:u,TransitionProps:{onExited:()=>{a(void 0),n(clearMessage())}},className:c.sdkSnackbarContainer,"data-snackbarid":(null===o||void 0===o?void 0:o.key)||"na","data-testid":"snackbar.message."+((null===o||void 0===o?void 0:o.severity)||"na")},{children:jsxRuntime.exports.jsx(Alert$1,Object.assign({onClose:u,severity:null===o||void 0===o?void 0:o.severity,elevation:6,variant:"filled"},{children:null===o||void 0===o?void 0:o.content}))}),o?o.key:void 0)}function validateConfig(e){return e.applicationId||console.info("@aiware/js: applicationId is required. Go to developer app to find your application id."),e.baseUrl||console.info("@aiware/js: baseUrl is required. It defaults to the US Commercial environment which is https://api.us-1.veritone.com/v3/graphql"),!0}const ID="openSupportChatButton",DATA_ATTR="open-support-chat-button";var SupportCenterPixel=()=>jsxRuntime.exports.jsx(Portal$1,{children:jsxRuntime.exports.jsx("div",{id:ID,"data-veritone-element":DATA_ATTR,style:{width:1,height:1,position:"fixed",right:55,bottom:20}})});const nameSpace="@helpPanel",updateSelectedTab=createAction(nameSpace+"/UPDATE_SELECTED_TAB",function(e,t){return{payload:{selectedTabId:e,tabLink:t}}}),setCustomKnowledgeBaseUrl=createAction(nameSpace+"/SET_CUSTOM_KNOWLEDGE_BASE_URL",function(e){return{payload:{url:e}}}),setCustomDocsUrl=createAction(nameSpace+"/SET_CUSTOM_DOCS_URL",function(e){return{payload:{url:e}}}),initialState={selectedTabId:0,tabLink:"https://support.veritone.com/",customKnowledgeBaseUrl:"",customDocsUrl:""},getTabLinkReducer=createReducer(initialState,e=>{e.addCase(updateSelectedTab,(e,t)=>Object.assign(Object.assign({},e),{tabLink:t.payload.tabLink,selectedTabId:t.payload.selectedTabId})),e.addCase(setCustomKnowledgeBaseUrl,(e,t)=>Object.assign(Object.assign({},e),{customKnowledgeBaseUrl:t.payload.url})),e.addCase(setCustomDocsUrl,(e,t)=>Object.assign(Object.assign({},e),{customDocsUrl:t.payload.url}))});function*helpSaga(){yield takeEvery$1("OPEN_HELP_LINK",function*(){var e=yield select(e=>e.helpPanel.tabLink);yield put(openLinkOnNewTab({url:e}))})}const namespace="helpPanel",helpCenterSelectedTabIdSelector=e=>null!=e&&e[namespace]?e[namespace].selectedTabId:0,customDocsUrlSelector=e=>null!=e&&e[namespace]?e[namespace].customDocsUrl:"",customKnowledgeBaseUrlSelector=e=>null!=e&&e[namespace]?e[namespace].customKnowledgeBaseUrl:"";function getHelpPanelModule(){return{id:"help",reducerMap:{[namespace]:getTabLinkReducer},sagas:[helpSaga],initialActions:[]}}var knowledgeBaseUrl$1="https://docs.veritone.com/help/index.html",documentUrl$1="https://docs.veritone.com",config={knowledgeBaseUrl:knowledgeBaseUrl$1,documentUrl:documentUrl$1};const useStyles$1=makeStyles()(e=>({root:{height:"calc(100% - 110px)",textAlign:"left","& .Sdk-MuiTab-root.Mui-selected":{color:e.palette.text.primary,fontWeight:600}},tabs:{padding:e.spacing(2.4,6,0,6)},tabPanels:{width:"100%",height:"100%"},aiWareIcon:{position:"relative",maxHeight:50,opacity:"inherit",padding:e.spacing(4,3.2,0,3.2),display:"flex",justifyContent:"flex-end"},customTabs:{margin:e.spacing(0,4)},kbRoot:{height:"100%",textAlign:"left"},loadingContainer:{position:"absolute",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"white"},kbToolBarBox:{padding:e.spacing(6,6,1.6,6)},kbTabContent:{height:"calc(100% - 92px)"},kbTabPanel:{padding:e.spacing(6)},dRoot:{height:"100%",width:"100%"},dNavBar:{height:"100%",overflow:"hidden",background:"#F4F4F4"},dTitle:{color:"#2A323C",fontWeight:600,fontSize:"18px",lineHeight:"24px",padding:e.spacing(3.2)},dContent:{height:"100%",width:"100%",position:"relative"},dMenu:{overflowY:"auto",height:"calc(100% - 52px)"},drawerContainer:{display:"flex",height:"100%",background:e.palette.background.default},tabContainer:{borderRight:"0.5px solid #D5DFE9",overflow:"hidden",height:"100%",width:"100%"},tabName:{borderBottom:"0.5px solid #D5DFE9",display:"flex",justifyContent:"space-between",alignItems:"center",height:"64px",padding:e.spacing(0,6)},actionIcons:{margin:e.spacing(-2.4)},tabContent:{height:"calc(100vh - 57px - 60px)",overflowY:"auto",overflowX:"hidden"}})),documentUrl=config.documentUrl,Documentation=({path:e=documentUrl})=>{var t=useStyles$1()["classes"];const[n,r]=react.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:classNames(t.dRoot,"hide-in-percy")},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"docs-iframe",title:"Document Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){setTimeout(()=>{r(!1)},1e3)}})]}))},knowledgeBaseUrl=config["knowledgeBaseUrl"];function Knowledgebase({path:e=knowledgeBaseUrl}){var t=useStyles$1()["classes"];const[n,r]=react.exports.useState(!0);return jsxRuntime.exports.jsxs("div",Object.assign({className:t.kbRoot},{children:[n&&jsxRuntime.exports.jsx("div",Object.assign({className:t.loadingContainer},{children:jsxRuntime.exports.jsx(CircularProgress$1,{})})),jsxRuntime.exports.jsx("iframe",{"data-cy":"knowledgebase-iframe",title:"Knowledgebase Iframe",style:{width:"100%",height:"100%"},src:e,frameBorder:"0",onLoad:function(){r(!1)}})]}))}const defaultLocale="en-us",tabsList=[{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.au1+VZ",defaultMessage:"Knowledgebase",description:"Help Panel: Knowledgebase tab label"}),disabled:!1,url:"https://support.veritone.com/"},{label:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"os-help-panel.8bnkm8",defaultMessage:"Documentation",description:"Help Panel: Documentation tab label"}),disabled:!1,url:"https://docs.veritone.com/#/aiware/"}];function HelpCenter(){var e=useSelector(initialConfigSelector),t=useSelector(customKnowledgeBaseUrlSelector),n=useSelector(customDocsUrlSelector),r=useSelector(helpCenterSelectedTabIdSelector),i=useSelector(e=>null==e?void 0:e.panels),o=useStyles$1()["classes"],[a]=react.exports.useState(defaultLocale);const s=useDispatch();i=null==i?void 0:i.find(e=>"CUSTOM_HELP_PANEL_ID"===e.panelId),t=i&&t?t:e.knowledgeBaseURL,i=i&&n?n:e.docsURL;return jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getHelpPanelModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,Object.assign({locale:a},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.drawerContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({id:"setting-content",className:o.tabContainer},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.tabContent},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.root},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:o.tabPanels},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:o.customTabs},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:r,onChangeTab:e=>{s(updateSelectedTab(e,tabsList[e].url))},tabsList:tabsList})})),jsxRuntime.exports.jsxs(Box$1,Object.assign({className:o.tabPanels},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:0},{children:jsxRuntime.exports.jsx(Knowledgebase,{path:t})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:1},{children:jsxRuntime.exports.jsx(Documentation,{path:i})}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.aiWareIcon},{children:jsxRuntime.exports.jsx("img",{src:img$y,alt:"icon",draggable:"false"})}))]}))}))}))}))}))}))}))}var index_esm=Object.freeze({__proto__:null,HelpCenterPanel:HelpCenter,customDocsUrlSelector:customDocsUrlSelector,customKnowledgeBaseUrlSelector:customKnowledgeBaseUrlSelector,helpCenterSelectedTabIdSelector:helpCenterSelectedTabIdSelector,setCustomDocsUrl:setCustomDocsUrl,setCustomKnowledgeBaseUrl:setCustomKnowledgeBaseUrl,updateSelectedTab:updateSelectedTab});const useStyles=makeStyles()(()=>({dialog:{top:"125px",overflowX:"hidden",overflowY:"hidden",display:"flex",alignItems:"center",flexDirection:"column"},container:{borderRadius:"4px",backgroundColor:"#fff",width:"430px",overflow:"hidden",outline:0,boxShadow:"0px 0px 7px rgba(0, 0, 0, .25)"},header:{textTransform:"capitalize"},appListContainer:{width:"100%"},orgName:{fontWeight:"bold"}})),ApplicationDialog=()=>{const[e,t]=react.exports.useState(null),[n,r]=react.exports.useState(0);var i=useSelector(userSelector$2),o=useStyles()["classes"];const a=useSelector(initialConfigSelector),s=a.applicationId,l=useSelector(applicationSelector),c=useSelector(switchApiSelector);var u=(null===l||void 0===l?void 0:l.application)||[],d=null===l||void 0===l?void 0:l.status;var p=[...u].sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),f=u.findIndex(e=>e.id===s);useInterval(()=>{t(e=>e&&e-1)},e&&n<3?1e3:null),react.exports.useEffect(()=>{"success"!==(null===l||void 0===l?void 0:l.status)||1!==(null===l||void 0===l?void 0:l.application.length)||(null===l||void 0===l?void 0:l.application[0].id)===a.applicationId||e||(0===e?window.open(c+"/"+(null===l||void 0===l?void 0:l.application[0].id),"_self"):t(10))},[a,l,c,e]);return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(s)&&f<0&&"success"===d?jsxRuntime.exports.jsx(Modal$1,Object.assign({className:o.dialog,open:!0},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:o.container},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"application-dialog-title",className:o.header,variant:"h1",sx:{px:"30px",pt:"30px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-title",defaultMessage:"Application Not Available",description:"Title for modal"})})),jsxRuntime.exports.jsxs(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"10px"}},{children:[jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message1",defaultMessage:"Looks like you switched organizations, your current application is not available in the current",description:"Description current application not available"})," ",jsxRuntime.exports.jsx("span",Object.assign({className:o.orgName},{children:null!=(f=null==i?void 0:i.organization)&&f.organizationName?i.organization.organizationName:""}))," ",jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message2",defaultMessage:"organization you are viewing.",description:"Description current application not available"})]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"20px"}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-message3",defaultMessage:"Please select from the available applications below to be redirected.",description:"Instructions for current application not available"})})),e&&jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{px:"30px",pt:"20px"},onClick:()=>{r(e=>e+1)}},{children:jsxRuntime.exports.jsx(FormattedMessage$1,{id:"js-core-app-dialog-countdown-message",defaultMessage:"You will be automatically forwarded to {appName} in {timeRemaining} seconds.",description:"Instructions for current application not available",values:{timeRemaining:e,appName:u[0].name}})})),jsxRuntime.exports.jsx("div",Object.assign({className:o.appListContainer},{children:jsxRuntime.exports.jsx(AppList,{title:"",selectedAppId:null,onSelectApplication:e=>{window.open(c+"/"+e,"_self")},applications:p,useGrid:!1,row:3})}))]}))})):null};class RateLimiter{constructor(){this.lastCall=null}checkIfCanCall(e=1){return e<1&&(e=1),(!this.lastCall||(new Date).getTime()-this.lastCall>=6e4*e)&&(this.lastCall=(new Date).getTime(),!0)}}const rateLimiter=new RateLimiter;function SnackbarRenderer(){return jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getSnackbarModule()]},{children:jsxRuntime.exports.jsx(CustomSnackbar,{})}))}))}store$4.addModules([getWidgetsModule(),getPanelsModule(registry,registryLookup),getDataModule(),getConfigModule(),getAuthModule()]);let hasLoaded=!1;const AppBarPreLoader=()=>{var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&!hasLoaded&&(hasLoaded=!0,setTimeout(()=>{store$4.addModules([getAppbarPanelModule()])},0)),null};function ApplicationDialogPreLoader(){var e=useSelector(authSelector);return(null==(e=null==e?void 0:e.user)?void 0:e.token)&&hasLoaded?jsxRuntime.exports.jsx(ApplicationDialog,{}):null}const authHelpers={updateToken(e){e?store$4.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout(e){"function"==typeof e?(e(),setTimeout(()=>{store$4.dispatch(logout$1())},1e3)):store$4.dispatch(logout$1())},reportAppActivity(e){rateLimiter.checkIfCanCall(e)&&store$4.dispatch(updateActivityStatus$1())}};function PortalRenderer(){return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SupportCenterPixel,{}),jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AppBarPreLoader,{})}))]})}function ApplicationDialogRenderer(){return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:jsxRuntime.exports.jsx(Provider$2,Object.assign({store:store$4},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(ApplicationDialogPreLoader,{})})}))})}const ThemeInitializer=()=>(useTheme(),null),root=getElement("aiWARE"),reactDOMroot=(root.classList.add("aiware-el"),client$1.createRoot(root)),mountWidget=("_auth"===window.name?handleImplicitRedirect(window.location.hash,window.opener):reactDOMroot.render(jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsxs(AIWareThemeProvider,{children:[jsxRuntime.exports.jsx(PortalRenderer,{}),jsxRuntime.exports.jsx(SnackbarRenderer,{}),jsxRuntime.exports.jsx(ApplicationDialogRenderer,{}),jsxRuntime.exports.jsx(ThemeInitializer,{})]})}))),(e,t)=>{var n=getUniqueID(),{name:e,elementId:r,config:i}=e;return e&&r&&i||console.error("[aiwarejs-error]: `mountWidget` function should include all the following params: name, elementId, config"),store$4.dispatch(mountWidget$1({elementId:r,widgetName:e,widgetConfig:i,widgetId:n,onComplete:t})),n}),unmountWidget=e=>(store$4.dispatch(unmountWidget$1(e)),!0),mountPanel=(e,t)=>{const n=e.panelId||getUniqueID();var{microFrontend:e,panelConfig:r}=e;store$4.dispatch(mountPanel$1({microFrontend:e,panelId:n,panelConfig:r}));const i=[...(null==(e=null==r?void 0:r.header)?void 0:e.actions)||[],...(null==(e=null==r?void 0:r.footer)?void 0:e.actions)||[]].filter(e=>e.submit).map(e=>e.action);r={id:n,sagas:[function*(){yield takeEvery$1(i.map(e=>e.type),function*(){var e=(yield select(e=>e.data.find(e=>e.id===n)))["data"];t&&t(e)})}]};return store$4.addModule(r),n},unmountPanel=e=>(store$4.dispatch(unmountPanel$1(e)),!0),hidePanel=e=>(store$4.dispatch(hidePanel$1(e)),!0),unmountAllPanel=()=>{store$4.dispatch(unmountAllPanel$1(""))};function init(e,t){validateConfig(e)&&store$4.dispatch(getInitConfig(Object.assign(Object.assign({},e),{onComplete:t})))}function helpCenter(){var e=new HelpCenter$2({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}}function dataCenter(){var e=new DataCenter$1;return{openImporterPanel:e.openImporterPanel.bind(e)}}function handleEvents(){function n(e){if(!e||"string"!=typeof e)throw new SdkError("Please provide a valid event name!");if(!SdkEvents[e])throw new SdkError("Unknown event: "+e)}return{on:function(e,t){n(e),sdkEventManager.on.call(sdkEventManager,e,t)},off:function(e){n(e),sdkEventManager.off.call(sdkEventManager,e)}}}const mountPanelForResponse=e=>mountPanelForResponse$1(e,store$4),aiwareEvents=handleEvents();window&&(window.aiWare_initTesting=()=>{window.aiWare_store=store$4,window.aiWare_theme={darkTheme:darkTheme,lightTheme:lightTheme}},window.aiware={init:init,auth:authHelpers,helpCenter:helpCenter(),dataCenter:dataCenter(),on:aiwareEvents.on,off:aiwareEvents.off,hidePanel:hidePanel,unmountPanel:unmountPanel,store:store$4,registry:registry,registerComponent:registerComponent,AvailableWidgets:AvailableWidgets,mountPanelAction:mountPanel$1,unmountPanelAction:unmountPanel$1,hidePanelAction:hidePanel$1,updatePanelMicroFrontendPropsAction:updatePanelMicroFrontendProps,setData:setData,mountWidget:mountWidget,mountPanel:mountPanel,mountPanelForResponse:mountPanelForResponse,unmountWidget:unmountWidget,version:"sdk_release_version",commit:"6072b4904",releaseDate:"sdk_release_date"});export{ListItem$1 as $,AIWareIntlProvider as A,Box$1 as B,interopRequireDefault as C,createAction as D,createReducer as E,FormattedMessage$1 as F,Grid$1 as G,createSlice as H,ENGINE_OWNER_TYPES as I,ENGINE_FILTER_TYPES as J,DynamicModuleLoader as K,LoadingButton$1 as L,preferredLanguageSelector as M,baseUrlSelector as N,rootApiSelector as O,Provider$2 as P,sessionTokenSelector as Q,graphEndpointSelector as R,Switch$1 as S,Typography$1 as T,controllerNodeRedImageSelector as U,controllerUrlSelector as V,automateControllerUrlSelector as W,automateUrlSelector as X,Portal$1 as Y,List$2 as Z,_extends as _,generateUtilityClasses as a,deleteEngine as a$,ListItemIcon$1 as a0,ListItemText$1 as a1,all as a2,img$m as a3,img$n as a4,img$p as a5,img$q as a6,Divider$1 as a7,Tooltip$1 as a8,IconButton$1 as a9,DialogTitle$1 as aA,DialogContent$1 as aB,DialogActions$1 as aC,TableContainer$1 as aD,Table$1 as aE,TableHead$1 as aF,TableRow$1 as aG,TableCell$1 as aH,TableSortLabel$1 as aI,TableBody$1 as aJ,img$f as aK,Popper$1 as aL,ClickAwayListener as aM,Fade$1 as aN,img$r as aO,img$o as aP,img$O as aQ,img$A as aR,Select$1 as aS,MenuItem$1 as aT,Snackbar$1 as aU,default_1 as aV,img$h as aW,img$j as aX,img$S as aY,Tabs$1 as aZ,Tab$1 as a_,img$g as aa,img$E as ab,Skeleton$1 as ac,takeLatest$1 as ad,fetchAllTags as ae,put as af,select as ag,fetchFlows as ah,call$7 as ai,fetchTemplateGallery as aj,isRevisionsExistOnServerRequest as ak,FormLabel$1 as al,default_1$5 as am,FormGroup$1 as an,FormControlLabel$1 as ao,Checkbox$1 as ap,fetchTemplateGalleryFallback as aq,Button$1 as ar,Card$1 as as,img$k as at,flowStyles as au,NoResults as av,CircularProgress$1 as aw,img$a as ax,setApiEndpoint as ay,Dialog$1 as az,styled$1 as b,_createCompounder as b$,img$i as b0,AIWareFormatMessage as b1,FormattedDate as b2,fetchVeritoneGraphQLApi as b3,useTheme as b4,KeyboardArrowRight as b5,KeyboardArrowLeft as b6,useId as b7,InputUnstyled as b8,isHostComponent as b9,img$b as bA,isEmpty_1 as bB,Backdrop$1 as bC,getDefaultMiddleware as bD,isNil_1 as bE,UpDown as bF,Icon$1 as bG,get_1 as bH,map_1 as bI,keys_1 as bJ,RadioGroup$1 as bK,Avatar$1 as bL,img$u as bM,baseGraphQLApi as bN,FormHelperText$2 as bO,img$e as bP,StyledEngineProvider as bQ,ThemeProvider as bR,lightTheme as bS,CssBaseline as bT,Hide as bU,showMessage as bV,MessageSeverity as bW,Radio$2 as bX,fetchEngine as bY,createSvgIcon$2 as bZ,_hasPath as b_,getDefaultExportFromNamespaceIfNotNamed as ba,commonjsRequire as bb,_typeof$4 as bc,_inheritsLoose$2 as bd,_assertThisInitialized$1 as be,React as bf,hoistNonReactStatics_cjs as bg,_defineProperty$1 as bh,reactDom as bi,Transition$1 as bj,__awaiter$a as bk,__generator$2 as bl,__spread as bm,TransitionGroup$1 as bn,connect$1 as bo,Bookmark as bp,EngineFlagIcons as bq,createAsyncThunk as br,withStyles as bs,getConfigModule as bt,getAuthModule as bu,getSnackbarModule as bv,CacheProvider as bw,muiCache as bx,img$P as by,img$c as bz,Paper$1 as c,useIntl as c$,_baseIteratee as c0,isArrayLike_1 as c1,toInteger_1 as c2,_toPropertyKey as c3,_setPrototypeOf$3 as c4,commonjsGlobal$1 as c5,combineReducers as c6,createSelector$1 as c7,fork as c8,AIWareThemeProvider as c9,Add as cA,ExpandLess as cB,ExpandMore as cC,Collapse$1 as cD,img$14 as cE,Filter$1 as cF,DynamicTable as cG,useTheme$2 as cH,getThemeProps as cI,useEnhancedEffect$1 as cJ,React$1 as cK,_arrayPush as cL,isArray_1 as cM,_baseToString as cN,_baseTrim as cO,_castSlice as cP,_stringToArray as cQ,toString_1 as cR,ReactIs as cS,upperFirst_1 as cT,isString_1 as cU,_baseGet as cV,_baseSlice as cW,_castPath as cX,_toKey as cY,_isIndex as cZ,channel as c_,Stack$4 as ca,Close$1 as cb,FullscreenExit as cc,Fullscreen as cd,TabPanel as ce,default_1$2 as cf,InputAdornment$1 as cg,unmountPanel$1 as ch,AvailableComponents as ci,delay$1 as cj,hidePanel$1 as ck,mountPanel$1 as cl,DialogContentText$1 as cm,userSelector$2 as cn,MoreVert as co,Menu$1 as cp,Edit as cq,Upload as cr,Delete as cs,CustomTabs as ct,useBackupImg as cu,img$1x as cv,validate as cw,configSelector as cx,baseGraphQLApiWithError as cy,VerifiedFilled as cz,capitalize$2 as d,_setToArray as d$,VideoCamera as d0,Image$1 as d1,Sound as d2,Description as d3,toNumber_1 as d4,ProgressStepper as d5,size_1 as d6,take as d7,CurlyBraces as d8,UnknownDocument as d9,_baseEach as dA,_arrayFilter as dB,_getNative as dC,eq_1 as dD,_root as dE,_Uint8Array as dF,_overArg as dG,_isPrototype as dH,isObjectLike_1 as dI,_baseGetTag as dJ,_arrayLikeKeys as dK,isArguments_1 as dL,isBuffer$3 as dM,isFunction_1 as dN,isTypedArray_1 as dO,_Stack as dP,_baseFor as dQ,identity_1 as dR,_isIterateeCall as dS,isSymbol_1 as dT,_baseMap as dU,_baseUnary as dV,memoizeOne as dW,isPlainObject$1 as dX,styled$2 as dY,_Symbol as dZ,_Set as d_,sdkEventManager as da,SdkEvents as db,SdkError as dc,EngineClassIcons as dd,Mode2 as de,EngineModeIcons as df,DeploymentModelIcons as dg,guid as dh,EditList as di,forceReflow as dj,getDefaultExportFromCjs as dk,alpha as dl,useControlled as dm,useEventCallback as dn,ButtonBase$1 as dp,useForkRef as dq,setRef as dr,inputClasses$1 as ds,inputBaseClasses$1 as dt,outlinedInputClasses$1 as du,filledInputClasses$1 as dv,ClearIcon as dw,ArrowDropDownIcon as dx,isObject_1 as dy,_arrayMap as dz,_objectWithoutPropertiesLoose$2 as e,img$1r as e$,_SetCache as e0,_cacheHas as e1,deepmerge as e2,useTheme$3 as e3,Slide$1 as e4,updatePanelMicroFrontendProps as e5,setData as e6,useIsFocusVisible as e7,ownerDocument as e8,appendOwnerState as e9,enableBetaFeatures as eA,Badge$1 as eB,openLinkOnNewTab as eC,orange$1 as eD,deepOrange$1 as eE,authSelector as eF,headerBarSelector as eG,getSortName as eH,img$7 as eI,InputLabel$1 as eJ,ListItemAvatar$1 as eK,OrganizationTabIcon as eL,ScopedCssBaseline$1 as eM,AlarmTwo as eN,getApplicationsApi as eO,ListItemSecondaryAction$1 as eP,updateTokenSuccess as eQ,postNotificationCommand as eR,aiwareEvent as eS,notificationCommands as eT,panelsSelector as eU,css as eV,avatarClasses as eW,img$L as eX,img$K as eY,img$1t as eZ,img$1s as e_,lighten as ea,darken as eb,slotShouldForwardProp as ec,shouldSpreadAdditionalProps$1 as ed,keyframes as ee,img$1u as ef,createTheme$1 as eg,injectIntl as eh,TabId as ei,PersonalProfile$1 as ej,Organizations as ek,DataCenter as el,Process as em,FlowCenter2 as en,DeveloperCenter as eo,Marketplace$1 as ep,LibraryCenter as eq,AdminCenter as er,AdminTabIcon as es,Resources$1 as et,DagBuilder as eu,img$R as ev,selectIsSuperAdmin as ew,img$3 as ex,img$y as ey,takeEvery$1 as ez,clsx as f,ConfirmationModal as f$,img$I as f0,img$1v as f1,img$H as f2,emphasize as f3,_arraySome as f4,ErrorBoundary$1 as f5,Information as f6,NewFolder as f7,SpecialFolder as f8,User as f9,FilterRemove as fA,CheckCircle as fB,FolderOpen as fC,Voice as fD,useDoubleClick as fE,FolderFilled as fF,Time as fG,img$w as fH,Undefined as fI,YoutubeSource as fJ,PodcastSource as fK,TVSource as fL,RadioSource as fM,selectOrgId as fN,selectIsUserAdmin as fO,ErrorState$1 as fP,StepConnector$1 as fQ,NullState$2 as fR,Group as fS,gqlIntrospection as fT,PermissionChangedAction as fU,Lock as fV,AddGroup as fW,StepperContext$1 as fX,StepContext$1 as fY,SvgIcon$1 as fZ,initialConfigSelector as f_,Source as fa,Search$1 as fb,selectIsOLPEnabled as fc,getLibraryModule as fd,selectApiConfigs$1 as fe,FullScreenContainer as ff,betaFeaturesSelector as fg,cmsUrlSelector as fh,UserAddFilled as fi,Popover$1 as fj,MenuList$1 as fk,MoveFolder as fl,Download as fm,img$8 as fn,selectPanelByPanelName as fo,EngineCategoryIcons as fp,Settings$2 as fq,Hamburger as fr,List as fs,EditAttributes as ft,MoreHor as fu,img$t as fv,img$v as fw,img$2 as fx,selectUserOrgEdgeVersion as fy,ProcessingDetail as fz,generateUtilityClass as g,EnumHelpers as g0,formatBytes as g1,NotInterested as g2,mountPanelForResponse$1 as g3,md5 as g4,AddUser as g5,Users as g6,ApplicationTabIcon as g7,SecurityGroup as g8,NoApps as g9,FormattedRelativeTime$1 as gA,Folder as gB,Hidden as gC,ArrowUp as gD,ArrowDown as gE,toFinite_1 as gF,_baseForOwn as gG,_arrayReduce as gH,hasIn_1 as gI,useSyncExternalStoreExports as gJ,tabsClasses$1 as gK,Engines as gL,Packages as gM,actionChannel as gN,PackagesAvatar as gO,registry as gP,registerComponent as gQ,AvailableWidgets as gR,root as gS,mountWidget as gT,unmountWidget as gU,mountPanel as gV,unmountPanel as gW,hidePanel as gX,unmountAllPanel as gY,init as gZ,green$1 as ga,selectors as gb,LibraryDropdown as gc,Remove as gd,Save as ge,Input$3 as gf,Copy as gg,ArrowForward as gh,Modal$1 as gi,_baseIsEqual as gj,Input$1 as gk,_getSymbols as gl,stubArray_1 as gm,_baseGetAllKeys as gn,_getTag as go,_nodeUtil as gp,_getAllKeys as gq,_castFunction as gr,Article as gs,Task as gt,View as gu,_objectSpread2 as gv,serialize$1 as gw,stringify$4 as gx,compile$1 as gy,Check as gz,composeClasses as h,useDispatch as i,jsxRuntime as j,useSelector as k,authStatusSelector as l,makeStyles as m,authContextSelector as n,AuthContext as o,lodash as p,Alert$1 as q,react as r,store$4 as s,authErrorMessage as t,useThemeProps as u,FormControl$1 as v,TextField$1 as w,classNames as x,resetPasswordRequest as y,createSvgIcon as z};
|