@wellesley/settings 1.0.583 → 1.0.584

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.
Files changed (2) hide show
  1. package/index.mjs +1 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import{createAction as js,createSlice as Ls,createSelector as Ut}from"https://cdn.jsdelivr.net/npm/@reduxjs/toolkit@2.2.1/+esm";import Iy,{useState as Ry,useEffect as Py}from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import{Checkbox as ky,RadioGroup as Ey,RadioGroupItem as Cy,TooltipProvider as Oy,Tooltip as jy,TooltipTrigger as Ly,Label as My,TooltipContent as Wy,Select as Fy,SelectTrigger as Ty,SelectValue as Dy,SelectContent as By,SelectGroup as Ny,SelectItem as zy,Switch as Uy,Input as Vy}from"https://cdn.jsdelivr.net/npm/@wellesley/ui@1.0.588";import{useForm as qy,FormProvider as $y}from"https://cdn.jsdelivr.net/npm/react-hook-form@7.51.0/+esm";import{useSelector as kt}from"https://cdn.jsdelivr.net/npm/react-redux@9.1.0/+esm";import{toast as nt}from"https://cdn.jsdelivr.net/npm/react-toastify@10.0.5/+esm";import{api as Ye,handleBasicResponse as Io,QueryTags as hs}from"https://cdn.jsdelivr.net/npm/@wellesley/openapi@1.0.626";import{getErrorMsg as Hn}from"https://cdn.jsdelivr.net/npm/@wellesley/error-kit@1.0.477";import{authSlice as Qr,useHasUserPermissions as Ky}from"https://cdn.jsdelivr.net/npm/@wellesley/auth@1.0.682";import{userSlice as ds}from"https://cdn.jsdelivr.net/npm/@wellesley/user@1.0.641";const Qy=t=>{if("object"!=typeof t||null===t)return!1;let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||null===Object.getPrototypeOf(t)},Gy=t=>Qy(t)&&"type"in t&&"string"==typeof t.type,J=t=>{const e=e=>({type:t,payload:e});return e.toString=()=>`${t}`,e.type=t,e.match=e=>Gy(e)&&e.type===t,e};J("remoteReady"),J("askLogin"),J("reselectUser"),J("requestLogout"),J("setConfirmLeavePage"),J("requestChangePath"),J("wsSubscribe"),J("wsUnSubscribe"),J("hostStoreConnect"),J("remoteLogin"),J("remoteLogout"),J("wsOnMessage"),J("setRouterPath"),J("setDeviceType"),J("setUserError"),J("setUserIsError"),J("setUserPending"),J("setUserSuccess"),J("setUserData"),J("updateAccountData"),J("updateUser"),J("addNotification"),J("markNotification"),J("setNotificationsError"),J("setNotificationsList"),J("setNotificationsPending"),J("setNotificationsTotalCount"),J("setNotificationsUnreadCount"),J("resetNotificationsState"),J("undoNotification"),J("setInstanceInfo"),J("setInstanceInfoPending"),J("setInstanceInfoError");const Mo=J("setPlatformSettings"),Wo=J("setProfileSettings");J("setGroupData"),J("setGroupLoading"),js("requestMicroFrontendFetch"),js("sendMicroFrontendFetchResponse");const Jy={data:null,isPending:!1,isSuccess:!1},Yy=Ls({name:"profileSettings",initialState:Jy,reducers:{setPending:(t,e)=>{t.isPending=e.payload},setSuccess:(t,{payload:e})=>{t.isSuccess=e},setError:(t,{payload:e})=>{t.error=e}},extraReducers:t=>{t.addCase(Wo,((t,{payload:e})=>{t.data=e}))},selectors:{selectProfileSettings:t=>t.data,selectPending:t=>t.isPending,selectError:t=>t.error,selectSuccess:t=>t.isSuccess}}),L={openaiConfigModel:"wellesley.openai.config.model",openaiConfigApiKey:"wellesley.openai.config.apiKey",uploadsProvider:"wellesley.uploads.provider",uploadsS3:"wellesley.uploads.s3",uploadsPolicyImageExtensions:"wellesley.uploads.policy.image.extensions",uploadsPolicyImageKeepOriginal:"wellesley.uploads.policy.image.keepOriginal",uploadsPolicyImageResolutions:"wellesley.uploads.policy.image.resolutions",uploadsPolicyImageMaxResolution:"wellesley.uploads.policy.image.maxResolution",uploadsPolicyImageMaxMatrix:"wellesley.uploads.policy.image.maxMatrix",uploadsPolicyImageMaxSize:"wellesley.uploads.policy.image.maxSize",uploadsPolicyVideoExtensions:"wellesley.uploads.policy.video.extensions",uploadsPolicyVideoResolutions:"wellesley.uploads.policy.video.resolutions",uploadsPolicyVideoKeepOriginal:"wellesley.uploads.policy.video.keepOriginal",uploadsPolicyVideoMaxResolution:"wellesley.uploads.policy.video.maxResolution",uploadsPolicyVideoMaxMatrix:"wellesley.uploads.policy.video.maxMatrix",uploadsPolicyVideoMaxSize:"wellesley.uploads.policy.video.maxSize",uploadsPolicyVideoMaxDuration:"wellesley.uploads.policy.video.maxDuration",uploadsPolicyVideoStreamingThreshold:"wellesley.uploads.policy.video.streamingThreshold",uploadsPolicyAudioExtensions:"wellesley.uploads.policy.audio.extensions",uploadsPolicyAudioKeepOriginal:"wellesley.uploads.policy.audio.keepOriginal",uploadsPolicyAudioMaxSize:"wellesley.uploads.policy.audio.maxSize",uploadsPolicyDocExtensions:"wellesley.uploads.policy.doc.extensions",uploadsPolicyDocMaxSize:"wellesley.uploads.policy.doc.maxSize",mediacacheEnabled:"wellesley.mediacache.enabled",mediacacheMaxTotalSize:"wellesley.mediacache.maxTotalSize",mediacacheMaxFileSize:"wellesley.mediacache.maxFileSize",mediacacheLimitPerRun:"wellesley.mediacache.limitPerRun",mediacacheSingleRun:"wellesley.mediacache.singleRun",mediacacheCheckInterval:"wellesley.mediacache.checkInterval",postsMaxMediaAttachments:"wellesley.posts.max_media_attachments",postsMaxCharacters:"wellesley.posts.max_characters",postsMaxPins:"wellesley.posts.max_pins",registrationMode:"wellesley.registration.mode",registrationInvitesEnabled:"wellesley.registration.invitesEnabled",registrationReasonToJoin:"wellesley.registration.reasonToJoin",registrationShowCaptcha:"wellesley.registration.showCaptcha",registrationNotAvailableMessage:"wellesley.registration.notAvailableMessage",captchaVerifyUrl:"wellesley.captcha.verifyUrl",captchaSecretKey:"wellesley.captcha.secretKey",captchaSiteKey:"wellesley.captcha.siteKey",confirmationCodeCodeExpirationMinutes:"wellesley.confirmationCode.codeExpirationMinutes",confirmationCodeCounterExpirationMinutes:"wellesley.confirmationCode.counterExpirationMinutes",confirmationCodeLimitStoreAttempts:"wellesley.confirmationCode.limitStoreAttempts",confirmationCodeLimitCheckAttempts:"wellesley.confirmationCode.limitCheckAttempts",translation:"wellesley.translation"},Pv=[L.uploadsPolicyImageExtensions,L.uploadsPolicyImageKeepOriginal,L.uploadsPolicyImageResolutions,L.uploadsPolicyImageMaxResolution,L.uploadsPolicyImageMaxMatrix,L.uploadsPolicyImageMaxSize,L.uploadsPolicyVideoExtensions,L.uploadsPolicyVideoResolutions,L.uploadsPolicyVideoKeepOriginal,L.uploadsPolicyVideoMaxResolution,L.uploadsPolicyVideoMaxMatrix,L.uploadsPolicyVideoMaxSize,L.uploadsPolicyVideoMaxDuration,L.uploadsPolicyVideoStreamingThreshold,L.uploadsPolicyAudioExtensions,L.uploadsPolicyAudioKeepOriginal,L.uploadsPolicyAudioMaxSize,L.uploadsPolicyDocExtensions,L.uploadsPolicyDocMaxSize,L.mediacacheEnabled,L.mediacacheMaxTotalSize,L.mediacacheMaxFileSize,L.mediacacheLimitPerRun,L.mediacacheSingleRun,L.mediacacheCheckInterval,L.postsMaxMediaAttachments,L.postsMaxCharacters,L.postsMaxPins,L.registrationMode,L.registrationInvitesEnabled,L.registrationReasonToJoin,L.registrationShowCaptcha,L.registrationNotAvailableMessage],kv="wellesley",_e={followAutoAccept:"user.follow.autoAccept",notificationsPrefsFollow:"user.notifications.prefs.follow",notificationsPrefsFollow_request:"user.notifications.prefs.followRequest",notificationsPrefsLike:"user.notifications.prefs.like",notificationsPrefsComment:"user.notifications.prefs.comment",notificationsPrefsMention:"user.notifications.prefs.mention",notificationsPrefsRepost:"user.notifications.prefs.repost",notificationsPrefsList_post_create:"user.notifications.prefs.list_post_create",notificationsPrefsPost_update:"user.notifications.prefs.post_update",notificationsPrefsSubscribeOnComment:"user.notifications.prefs.subscribeOnComment",notificationsPrefsAlwaysSendEmail:"user.notifications.prefs.alwaysSendEmail",notificationsShowPopup:"user.notifications.prefs.showPopup",notificationsPolicyBlockNonFollowers:"user.notifications.policy.blockNonFollowers",notificationsPolicyBlockNonFollowing:"user.notifications.policy.blockNonFollowing",notificationsPolicyBlockNonFollowingMessages:"user.notifications.policy.blockNonFollowingMessages",notificationsPolicyBlockNewAccounts:"user.notifications.policy.blockNewAccounts",privacyShowPublicPosts:"user.privacy.showPublicPosts",privacyShowProfilePage:"user.privacy.showProfilePage",privacyShowFollowers:"user.privacy.showFollowers",translation:"user.translation"},Ev="user",Zy=["wellesley.posts","wellesley.captcha","wellesley.registration","wellesley.access","wellesley.branding","wellesley.confirmationCode","wellesley.uploads.policy.doc","wellesley.uploads.policy.audio","wellesley.uploads.policy.image","wellesley.uploads.policy.video","wellesley.translation","wellesley.instance.admin","wellesley.instance.legal","wellesley.instance.domainBlocks","wellesley.instance.contacts"],Hy=["wellesley.admin.sms","wellesley.admin.auth","wellesley.admin.openai","wellesley.admin.uploads","wellesley.admin.captcha","wellesley.admin.language","wellesley.admin.mediacache","wellesley.admin.translation","wellesley.admin.link_service"],Xy={sms:"wellesley.admin.sms",auth:"wellesley.admin.auth",openai:"wellesley.admin.openai",uploads:"wellesley.admin.uploads",captcha:"wellesley.admin.captcha",language:"wellesley.admin.language",mediacache:"wellesley.admin.mediacache",translation:"wellesley.admin.translation",link_service:"wellesley.admin.link_service"},ri={posts:"wellesley.posts",translation:"wellesley.translation",registration:"wellesley.registration",confirmationCode:"wellesley.confirmationCode",uploadsPolicyDoc:"wellesley.uploads.policy.doc",uploadsPolicyAudio:"wellesley.uploads.policy.audio",uploadsPolicyImage:"wellesley.uploads.policy.image",uploadsPolicyVideo:"wellesley.uploads.policy.video",captcha:"wellesley.captcha",access:"wellesley.access",branding:"wellesley.branding",instanceAdmin:"wellesley.instance.admin",legal:"wellesley.instance.legal",domainBlocks:"wellesley.instance.domainBlocks",contacts:"wellesley.instance.contacts"},e_={data:null,isPending:!1},{posts:Ro,uploadsPolicyDoc:gs,uploadsPolicyAudio:Po,uploadsPolicyImage:Xn,uploadsPolicyVideo:Vr,registration:t_,captcha:r_,instanceAdmin:n_,branding:i_,translation:o_,access:a_}=ri,{captcha:u_,language:s_,translation:c_,openai:l_,link_service:f_}=Xy,hr=t=>t.data,p_=Ut(hr,(t=>{var e,n,r;return{max_characters:(null==(e=null==t?void 0:t[Ro])?void 0:e.max_characters)||0,max_media_attachments:(null==(n=null==t?void 0:t[Ro])?void 0:n.max_media_attachments)||0,max_pins:(null==(r=null==t?void 0:t[Ro])?void 0:r.max_pins)||0}})),Ms=Ut(hr,(t=>{var e,n,r;return{...null==t?void 0:t[Xn],maxSize:(null==(e=null==t?void 0:t[Xn])?void 0:e.maxSize)||0,maxMatrix:(null==(n=null==t?void 0:t[Xn])?void 0:n.maxMatrix)||0,maxResolution:(null==(r=null==t?void 0:t[Xn])?void 0:r.maxResolution)||0}})),Ws=Ut(hr,(t=>{var e,n,r,i;return{...null==t?void 0:t[Vr],maxSize:(null==(e=null==t?void 0:t[Vr])?void 0:e.maxSize)||0,maxMatrix:(null==(n=null==t?void 0:t[Vr])?void 0:n.maxMatrix)||0,maxDuration:(null==(r=null==t?void 0:t[Vr])?void 0:r.maxDuration)||0,maxResolution:(null==(i=null==t?void 0:t[Vr])?void 0:i.maxResolution)||0}})),Fs=Ut(hr,(t=>{var e,n;return{...null==t?void 0:t[Po],maxSize:null==(e=null==t?void 0:t[Po])?void 0:e.maxSize,keepOriginal:(null==(n=null==t?void 0:t[Po])?void 0:n.keepOriginal)||0}})),Ts=Ut(hr,(t=>{var e;return{...null==t?void 0:t[gs],maxSize:(null==(e=null==t?void 0:t[gs])?void 0:e.maxSize)||0}})),Ds=Ut([Ms,Ws,Fs,Ts],((t,e,n,r)=>({IMAGE:null==t?void 0:t.extensions,VIDEO:null==e?void 0:e.extensions,AUDIO:null==n?void 0:n.extensions,DOCUMENT:null==r?void 0:r.extensions}))),h_=Ut(Ds,(t=>Object.keys(t).reduce(((e,n)=>[...e,...t[n]||[]]),[]))),ko=Ls({name:"platformSettings",initialState:e_,reducers:{setError:(t,e)=>{t.error=e.payload},setPending:(t,e)=>{t.isPending=e.payload}},extraReducers:t=>{t.addCase(Mo,((t,{payload:e})=>{t.data={...t.data,...e}}))},selectors:{selectSettings:hr,selectPostConfig:p_,selectDocPolicy:Ts,selectImagePolicy:Ms,selectVideoPolicy:Ws,selectAudioPolicy:Fs,selectSupportedExtensions:Ds,selectFullExtensionsList:h_,selectRegistration:t=>{var e;return null==(e=t.data)?void 0:e[t_]},selectLanguageDetection:t=>{var e;return null==(e=t.data)?void 0:e[s_]},selectLanguageTranslation:t=>{var e;return null==(e=t.data)?void 0:e[c_]},selectOpenai:t=>{var e;return null==(e=t.data)?void 0:e[l_]},selectCaptcha:t=>{var e;return null==(e=t.data)?void 0:e[r_]},selectAdminCaptcha:t=>{var e;return null==(e=t.data)?void 0:e[u_]},selectPlatformTranslation:t=>{var e;return null==(e=t.data)?void 0:e[o_]},selectAccess:t=>{var e;return null==(e=t.data)?void 0:e[a_]},selectBranding:t=>{var e;return null==(e=t.data)?void 0:e[i_]},selectLinkService:t=>{var e;return null==(e=t.data)?void 0:e[f_]},selectInstanceAdmin:t=>{var e;return null==(e=t.data)?void 0:e[n_]},selectLegal:t=>{var e;return null==(e=t.data)?void 0:e[ri.legal]},selectDomainBlocks:t=>{var e;return null==(e=t.data)?void 0:e[ri.domainBlocks]},selectContacts:t=>{var e;return null==(e=t.data)?void 0:e[ri.contacts]}}});var ys,_s,ei=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Eo={exports:{}},qr={};
1
+ import{createAction as js,createSlice as Ls,createSelector as Ut}from"https://cdn.jsdelivr.net/npm/@reduxjs/toolkit@2.2.1/+esm";import Iy,{useState as Ry,useEffect as Py}from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import{Checkbox as ky,RadioGroup as Ey,RadioGroupItem as Cy,TooltipProvider as Oy,Tooltip as jy,TooltipTrigger as Ly,Label as My,TooltipContent as Wy,Select as Fy,SelectTrigger as Ty,SelectValue as Dy,SelectContent as By,SelectGroup as Ny,SelectItem as zy,Switch as Uy,Input as Vy}from"https://cdn.jsdelivr.net/npm/@wellesley/ui@1.0.589";import{useForm as qy,FormProvider as $y}from"https://cdn.jsdelivr.net/npm/react-hook-form@7.51.0/+esm";import{useSelector as kt}from"https://cdn.jsdelivr.net/npm/react-redux@9.1.0/+esm";import{toast as nt}from"https://cdn.jsdelivr.net/npm/react-toastify@10.0.5/+esm";import{api as Ye,handleBasicResponse as Io,QueryTags as hs}from"https://cdn.jsdelivr.net/npm/@wellesley/openapi@1.0.627";import{getErrorMsg as Hn}from"https://cdn.jsdelivr.net/npm/@wellesley/error-kit@1.0.478";import{authSlice as Qr,useHasUserPermissions as Ky}from"https://cdn.jsdelivr.net/npm/@wellesley/auth@1.0.683";import{userSlice as ds}from"https://cdn.jsdelivr.net/npm/@wellesley/user@1.0.642";const Qy=t=>{if("object"!=typeof t||null===t)return!1;let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||null===Object.getPrototypeOf(t)},Gy=t=>Qy(t)&&"type"in t&&"string"==typeof t.type,J=t=>{const e=e=>({type:t,payload:e});return e.toString=()=>`${t}`,e.type=t,e.match=e=>Gy(e)&&e.type===t,e};J("remoteReady"),J("askLogin"),J("reselectUser"),J("requestLogout"),J("setConfirmLeavePage"),J("requestChangePath"),J("wsSubscribe"),J("wsUnSubscribe"),J("hostStoreConnect"),J("remoteLogin"),J("remoteLogout"),J("wsOnMessage"),J("setRouterPath"),J("setDeviceType"),J("setUserError"),J("setUserIsError"),J("setUserPending"),J("setUserSuccess"),J("setUserData"),J("updateAccountData"),J("updateUser"),J("addNotification"),J("markNotification"),J("setNotificationsError"),J("setNotificationsList"),J("setNotificationsPending"),J("setNotificationsTotalCount"),J("setNotificationsUnreadCount"),J("resetNotificationsState"),J("undoNotification"),J("setInstanceInfo"),J("setInstanceInfoPending"),J("setInstanceInfoError");const Mo=J("setPlatformSettings"),Wo=J("setProfileSettings");J("setGroupData"),J("setGroupLoading"),js("requestMicroFrontendFetch"),js("sendMicroFrontendFetchResponse");const Jy={data:null,isPending:!1,isSuccess:!1},Yy=Ls({name:"profileSettings",initialState:Jy,reducers:{setPending:(t,e)=>{t.isPending=e.payload},setSuccess:(t,{payload:e})=>{t.isSuccess=e},setError:(t,{payload:e})=>{t.error=e}},extraReducers:t=>{t.addCase(Wo,((t,{payload:e})=>{t.data=e}))},selectors:{selectProfileSettings:t=>t.data,selectPending:t=>t.isPending,selectError:t=>t.error,selectSuccess:t=>t.isSuccess}}),L={openaiConfigModel:"wellesley.openai.config.model",openaiConfigApiKey:"wellesley.openai.config.apiKey",uploadsProvider:"wellesley.uploads.provider",uploadsS3:"wellesley.uploads.s3",uploadsPolicyImageExtensions:"wellesley.uploads.policy.image.extensions",uploadsPolicyImageKeepOriginal:"wellesley.uploads.policy.image.keepOriginal",uploadsPolicyImageResolutions:"wellesley.uploads.policy.image.resolutions",uploadsPolicyImageMaxResolution:"wellesley.uploads.policy.image.maxResolution",uploadsPolicyImageMaxMatrix:"wellesley.uploads.policy.image.maxMatrix",uploadsPolicyImageMaxSize:"wellesley.uploads.policy.image.maxSize",uploadsPolicyVideoExtensions:"wellesley.uploads.policy.video.extensions",uploadsPolicyVideoResolutions:"wellesley.uploads.policy.video.resolutions",uploadsPolicyVideoKeepOriginal:"wellesley.uploads.policy.video.keepOriginal",uploadsPolicyVideoMaxResolution:"wellesley.uploads.policy.video.maxResolution",uploadsPolicyVideoMaxMatrix:"wellesley.uploads.policy.video.maxMatrix",uploadsPolicyVideoMaxSize:"wellesley.uploads.policy.video.maxSize",uploadsPolicyVideoMaxDuration:"wellesley.uploads.policy.video.maxDuration",uploadsPolicyVideoStreamingThreshold:"wellesley.uploads.policy.video.streamingThreshold",uploadsPolicyAudioExtensions:"wellesley.uploads.policy.audio.extensions",uploadsPolicyAudioKeepOriginal:"wellesley.uploads.policy.audio.keepOriginal",uploadsPolicyAudioMaxSize:"wellesley.uploads.policy.audio.maxSize",uploadsPolicyDocExtensions:"wellesley.uploads.policy.doc.extensions",uploadsPolicyDocMaxSize:"wellesley.uploads.policy.doc.maxSize",mediacacheEnabled:"wellesley.mediacache.enabled",mediacacheMaxTotalSize:"wellesley.mediacache.maxTotalSize",mediacacheMaxFileSize:"wellesley.mediacache.maxFileSize",mediacacheLimitPerRun:"wellesley.mediacache.limitPerRun",mediacacheSingleRun:"wellesley.mediacache.singleRun",mediacacheCheckInterval:"wellesley.mediacache.checkInterval",postsMaxMediaAttachments:"wellesley.posts.max_media_attachments",postsMaxCharacters:"wellesley.posts.max_characters",postsMaxPins:"wellesley.posts.max_pins",registrationMode:"wellesley.registration.mode",registrationInvitesEnabled:"wellesley.registration.invitesEnabled",registrationReasonToJoin:"wellesley.registration.reasonToJoin",registrationShowCaptcha:"wellesley.registration.showCaptcha",registrationNotAvailableMessage:"wellesley.registration.notAvailableMessage",captchaVerifyUrl:"wellesley.captcha.verifyUrl",captchaSecretKey:"wellesley.captcha.secretKey",captchaSiteKey:"wellesley.captcha.siteKey",confirmationCodeCodeExpirationMinutes:"wellesley.confirmationCode.codeExpirationMinutes",confirmationCodeCounterExpirationMinutes:"wellesley.confirmationCode.counterExpirationMinutes",confirmationCodeLimitStoreAttempts:"wellesley.confirmationCode.limitStoreAttempts",confirmationCodeLimitCheckAttempts:"wellesley.confirmationCode.limitCheckAttempts",translation:"wellesley.translation"},Pv=[L.uploadsPolicyImageExtensions,L.uploadsPolicyImageKeepOriginal,L.uploadsPolicyImageResolutions,L.uploadsPolicyImageMaxResolution,L.uploadsPolicyImageMaxMatrix,L.uploadsPolicyImageMaxSize,L.uploadsPolicyVideoExtensions,L.uploadsPolicyVideoResolutions,L.uploadsPolicyVideoKeepOriginal,L.uploadsPolicyVideoMaxResolution,L.uploadsPolicyVideoMaxMatrix,L.uploadsPolicyVideoMaxSize,L.uploadsPolicyVideoMaxDuration,L.uploadsPolicyVideoStreamingThreshold,L.uploadsPolicyAudioExtensions,L.uploadsPolicyAudioKeepOriginal,L.uploadsPolicyAudioMaxSize,L.uploadsPolicyDocExtensions,L.uploadsPolicyDocMaxSize,L.mediacacheEnabled,L.mediacacheMaxTotalSize,L.mediacacheMaxFileSize,L.mediacacheLimitPerRun,L.mediacacheSingleRun,L.mediacacheCheckInterval,L.postsMaxMediaAttachments,L.postsMaxCharacters,L.postsMaxPins,L.registrationMode,L.registrationInvitesEnabled,L.registrationReasonToJoin,L.registrationShowCaptcha,L.registrationNotAvailableMessage],kv="wellesley",_e={followAutoAccept:"user.follow.autoAccept",notificationsPrefsFollow:"user.notifications.prefs.follow",notificationsPrefsFollow_request:"user.notifications.prefs.followRequest",notificationsPrefsLike:"user.notifications.prefs.like",notificationsPrefsComment:"user.notifications.prefs.comment",notificationsPrefsMention:"user.notifications.prefs.mention",notificationsPrefsRepost:"user.notifications.prefs.repost",notificationsPrefsList_post_create:"user.notifications.prefs.list_post_create",notificationsPrefsPost_update:"user.notifications.prefs.post_update",notificationsPrefsSubscribeOnComment:"user.notifications.prefs.subscribeOnComment",notificationsPrefsAlwaysSendEmail:"user.notifications.prefs.alwaysSendEmail",notificationsShowPopup:"user.notifications.prefs.showPopup",notificationsPolicyBlockNonFollowers:"user.notifications.policy.blockNonFollowers",notificationsPolicyBlockNonFollowing:"user.notifications.policy.blockNonFollowing",notificationsPolicyBlockNonFollowingMessages:"user.notifications.policy.blockNonFollowingMessages",notificationsPolicyBlockNewAccounts:"user.notifications.policy.blockNewAccounts",privacyShowPublicPosts:"user.privacy.showPublicPosts",privacyShowProfilePage:"user.privacy.showProfilePage",privacyShowFollowers:"user.privacy.showFollowers",translation:"user.translation"},Ev="user",Zy=["wellesley.posts","wellesley.captcha","wellesley.registration","wellesley.access","wellesley.branding","wellesley.confirmationCode","wellesley.uploads.policy.doc","wellesley.uploads.policy.audio","wellesley.uploads.policy.image","wellesley.uploads.policy.video","wellesley.translation","wellesley.instance.admin","wellesley.instance.legal","wellesley.instance.domainBlocks","wellesley.instance.contacts"],Hy=["wellesley.admin.sms","wellesley.admin.auth","wellesley.admin.openai","wellesley.admin.uploads","wellesley.admin.captcha","wellesley.admin.language","wellesley.admin.mediacache","wellesley.admin.translation","wellesley.admin.link_service"],Xy={sms:"wellesley.admin.sms",auth:"wellesley.admin.auth",openai:"wellesley.admin.openai",uploads:"wellesley.admin.uploads",captcha:"wellesley.admin.captcha",language:"wellesley.admin.language",mediacache:"wellesley.admin.mediacache",translation:"wellesley.admin.translation",link_service:"wellesley.admin.link_service"},ri={posts:"wellesley.posts",translation:"wellesley.translation",registration:"wellesley.registration",confirmationCode:"wellesley.confirmationCode",uploadsPolicyDoc:"wellesley.uploads.policy.doc",uploadsPolicyAudio:"wellesley.uploads.policy.audio",uploadsPolicyImage:"wellesley.uploads.policy.image",uploadsPolicyVideo:"wellesley.uploads.policy.video",captcha:"wellesley.captcha",access:"wellesley.access",branding:"wellesley.branding",instanceAdmin:"wellesley.instance.admin",legal:"wellesley.instance.legal",domainBlocks:"wellesley.instance.domainBlocks",contacts:"wellesley.instance.contacts"},e_={data:null,isPending:!1},{posts:Ro,uploadsPolicyDoc:gs,uploadsPolicyAudio:Po,uploadsPolicyImage:Xn,uploadsPolicyVideo:Vr,registration:t_,captcha:r_,instanceAdmin:n_,branding:i_,translation:o_,access:a_}=ri,{captcha:u_,language:s_,translation:c_,openai:l_,link_service:f_}=Xy,hr=t=>t.data,p_=Ut(hr,(t=>{var e,n,r;return{max_characters:(null==(e=null==t?void 0:t[Ro])?void 0:e.max_characters)||0,max_media_attachments:(null==(n=null==t?void 0:t[Ro])?void 0:n.max_media_attachments)||0,max_pins:(null==(r=null==t?void 0:t[Ro])?void 0:r.max_pins)||0}})),Ms=Ut(hr,(t=>{var e,n,r;return{...null==t?void 0:t[Xn],maxSize:(null==(e=null==t?void 0:t[Xn])?void 0:e.maxSize)||0,maxMatrix:(null==(n=null==t?void 0:t[Xn])?void 0:n.maxMatrix)||0,maxResolution:(null==(r=null==t?void 0:t[Xn])?void 0:r.maxResolution)||0}})),Ws=Ut(hr,(t=>{var e,n,r,i;return{...null==t?void 0:t[Vr],maxSize:(null==(e=null==t?void 0:t[Vr])?void 0:e.maxSize)||0,maxMatrix:(null==(n=null==t?void 0:t[Vr])?void 0:n.maxMatrix)||0,maxDuration:(null==(r=null==t?void 0:t[Vr])?void 0:r.maxDuration)||0,maxResolution:(null==(i=null==t?void 0:t[Vr])?void 0:i.maxResolution)||0}})),Fs=Ut(hr,(t=>{var e,n;return{...null==t?void 0:t[Po],maxSize:null==(e=null==t?void 0:t[Po])?void 0:e.maxSize,keepOriginal:(null==(n=null==t?void 0:t[Po])?void 0:n.keepOriginal)||0}})),Ts=Ut(hr,(t=>{var e;return{...null==t?void 0:t[gs],maxSize:(null==(e=null==t?void 0:t[gs])?void 0:e.maxSize)||0}})),Ds=Ut([Ms,Ws,Fs,Ts],((t,e,n,r)=>({IMAGE:null==t?void 0:t.extensions,VIDEO:null==e?void 0:e.extensions,AUDIO:null==n?void 0:n.extensions,DOCUMENT:null==r?void 0:r.extensions}))),h_=Ut(Ds,(t=>Object.keys(t).reduce(((e,n)=>[...e,...t[n]||[]]),[]))),ko=Ls({name:"platformSettings",initialState:e_,reducers:{setError:(t,e)=>{t.error=e.payload},setPending:(t,e)=>{t.isPending=e.payload}},extraReducers:t=>{t.addCase(Mo,((t,{payload:e})=>{t.data={...t.data,...e}}))},selectors:{selectSettings:hr,selectPostConfig:p_,selectDocPolicy:Ts,selectImagePolicy:Ms,selectVideoPolicy:Ws,selectAudioPolicy:Fs,selectSupportedExtensions:Ds,selectFullExtensionsList:h_,selectRegistration:t=>{var e;return null==(e=t.data)?void 0:e[t_]},selectLanguageDetection:t=>{var e;return null==(e=t.data)?void 0:e[s_]},selectLanguageTranslation:t=>{var e;return null==(e=t.data)?void 0:e[c_]},selectOpenai:t=>{var e;return null==(e=t.data)?void 0:e[l_]},selectCaptcha:t=>{var e;return null==(e=t.data)?void 0:e[r_]},selectAdminCaptcha:t=>{var e;return null==(e=t.data)?void 0:e[u_]},selectPlatformTranslation:t=>{var e;return null==(e=t.data)?void 0:e[o_]},selectAccess:t=>{var e;return null==(e=t.data)?void 0:e[a_]},selectBranding:t=>{var e;return null==(e=t.data)?void 0:e[i_]},selectLinkService:t=>{var e;return null==(e=t.data)?void 0:e[f_]},selectInstanceAdmin:t=>{var e;return null==(e=t.data)?void 0:e[n_]},selectLegal:t=>{var e;return null==(e=t.data)?void 0:e[ri.legal]},selectDomainBlocks:t=>{var e;return null==(e=t.data)?void 0:e[ri.domainBlocks]},selectContacts:t=>{var e;return null==(e=t.data)?void 0:e[ri.contacts]}}});var ys,_s,ei=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Eo={exports:{}},qr={};
2
2
  /**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.min.js
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.583",
2
+ "version": "1.0.584",
3
3
  "name": "@wellesley/settings",
4
4
  "license": "UNLICENSED",
5
5
  "main": "index.mjs",