@wellesley/settings 1.0.264 → 1.0.265

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 pl,createSlice as hl,createSelector as Ut}from"https://cdn.jsdelivr.net/npm/@reduxjs/toolkit@2.2.1/+esm";import Xg,{useState as ey,useEffect as ty}from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import{Checkbox as ry,RadioGroup as ny,RadioGroupItem as iy,TooltipProvider as oy,Tooltip as uy,TooltipTrigger as ay,Label as ly,TooltipContent as cy,Select as sy,SelectTrigger as fy,SelectValue as py,SelectContent as hy,SelectGroup as dy,SelectItem as gy,Switch as yy,Input as vy}from"https://cdn.jsdelivr.net/npm/@wellesley/ui@1.0.269";import{useForm as my,FormProvider as _y}from"https://cdn.jsdelivr.net/npm/react-hook-form@7.51.0/+esm";import{useSelector as Pt}from"https://cdn.jsdelivr.net/npm/react-redux@9.1.0/+esm";import{toast as rt}from"https://cdn.jsdelivr.net/npm/react-toastify@10.0.5/+esm";import{logErrorToSentry as wy}from"https://cdn.jsdelivr.net/npm/@wellesley/sentry@1.0.173";import{api as Je,handleBasicResponse as mo}from"https://cdn.jsdelivr.net/npm/@wellesley/openapi@1.0.307";import{getErrorMsg as Kn}from"https://cdn.jsdelivr.net/npm/@wellesley/error-kit@1.0.158";import{authSlice as Zn}from"https://cdn.jsdelivr.net/npm/@wellesley/auth@1.0.363";import{userSlice as Po}from"https://cdn.jsdelivr.net/npm/@wellesley/user@1.0.322";const xy=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)},by=t=>xy(t)&&"type"in t&&"string"==typeof t.type,$=t=>{const e=e=>({type:t,payload:e});return e.toString=()=>`${t}`,e.type=t,e.match=e=>by(e)&&e.type===t,e};$("remoteReady"),$("reselectUser"),$("requestLogin"),$("requestLogout"),$("setConfirmLeavePage"),$("requestChangePath"),$("wsSubscribe"),$("wsUnSubscribe"),$("hostStoreConnect"),$("remoteLogin"),$("remoteLogout"),$("wsOnMessage"),$("setRouterPath"),$("setDeviceType"),$("setUserError"),$("setUserIsError"),$("setUserPending"),$("setUserSuccess"),$("setUserData"),$("updateAccountData"),$("updateUser"),$("addNotification"),$("markNotification"),$("setNotificationsError"),$("setNotificationsList"),$("setNotificationsPending"),$("setNotificationsTotalCount"),$("setNotificationsUnreadCount"),$("resetNotificationsState"),$("undoNotification"),$("setInstanceInfo"),$("setInstanceInfoPending"),$("setInstanceInfoError");const dl=$("setPlatformSettings"),Io=$("setProfileSettings");$("setGroupData"),$("setGroupLoading"),$("showGroupBasicInfo"),pl("requestMicroFrontendFetch"),pl("sendMicroFrontendFetchResponse");const Ay={data:null,isPending:!1,isSuccess:!1},Sy=hl({name:"profileSettings",initialState:Ay,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(Io,((t,{payload:e})=>{t.data=e}))},selectors:{selectProfileSettings:t=>t.data,selectPending:t=>t.isPending,selectError:t=>t.error,selectSuccess:t=>t.isSuccess}}),O={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=[O.uploadsPolicyImageExtensions,O.uploadsPolicyImageKeepOriginal,O.uploadsPolicyImageResolutions,O.uploadsPolicyImageMaxResolution,O.uploadsPolicyImageMaxMatrix,O.uploadsPolicyImageMaxSize,O.uploadsPolicyVideoExtensions,O.uploadsPolicyVideoResolutions,O.uploadsPolicyVideoKeepOriginal,O.uploadsPolicyVideoMaxResolution,O.uploadsPolicyVideoMaxMatrix,O.uploadsPolicyVideoMaxSize,O.uploadsPolicyVideoMaxDuration,O.uploadsPolicyVideoStreamingThreshold,O.uploadsPolicyAudioExtensions,O.uploadsPolicyAudioKeepOriginal,O.uploadsPolicyAudioMaxSize,O.uploadsPolicyDocExtensions,O.uploadsPolicyDocMaxSize,O.mediacacheEnabled,O.mediacacheMaxTotalSize,O.mediacacheMaxFileSize,O.mediacacheLimitPerRun,O.mediacacheSingleRun,O.mediacacheCheckInterval,O.postsMaxMediaAttachments,O.postsMaxCharacters,O.postsMaxPins,O.registrationMode,O.registrationInvitesEnabled,O.registrationReasonToJoin,O.registrationShowCaptcha,O.registrationNotAvailableMessage],Iv="wellesley",ye={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"},Cv="user",Ry=["wellesley.posts","wellesley.captcha","wellesley.registration","wellesley.confirmationCode","wellesley.uploads.policy.doc","wellesley.uploads.policy.audio","wellesley.uploads.policy.image","wellesley.uploads.policy.video","wellesley.translation"],Py=["wellesley.admin.sms","wellesley.admin.auth","wellesley.admin.openai","wellesley.admin.uploads","wellesley.admin.captcha","wellesley.admin.language","wellesley.admin.mediacache","wellesley.admin.translation"],Iy={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"},Cy={posts:"wellesley.posts",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"},jy={data:null,isPending:!1},{posts:_o,uploadsPolicyDoc:tl,uploadsPolicyAudio:wo,uploadsPolicyImage:Qn,uploadsPolicyVideo:Tr,registration:ky,captcha:Oy}=Cy,{captcha:Ey,language:My,translation:Ly,openai:Wy}=Iy,cr=t=>t.data,zy=Ut(cr,(t=>{var e,n,r;return{max_characters:(null==(e=null==t?void 0:t[_o])?void 0:e.max_characters)||0,max_media_attachments:(null==(n=null==t?void 0:t[_o])?void 0:n.max_media_attachments)||0,max_pins:(null==(r=null==t?void 0:t[_o])?void 0:r.max_pins)||0}})),gl=Ut(cr,(t=>{var e,n,r;return{...null==t?void 0:t[Qn],maxSize:(null==(e=null==t?void 0:t[Qn])?void 0:e.maxSize)||0,maxMatrix:(null==(n=null==t?void 0:t[Qn])?void 0:n.maxMatrix)||0,maxResolution:(null==(r=null==t?void 0:t[Qn])?void 0:r.maxResolution)||0}})),yl=Ut(cr,(t=>{var e,n,r,i;return{...null==t?void 0:t[Tr],maxSize:(null==(e=null==t?void 0:t[Tr])?void 0:e.maxSize)||0,maxMatrix:(null==(n=null==t?void 0:t[Tr])?void 0:n.maxMatrix)||0,maxDuration:(null==(r=null==t?void 0:t[Tr])?void 0:r.maxDuration)||0,maxResolution:(null==(i=null==t?void 0:t[Tr])?void 0:i.maxResolution)||0}})),vl=Ut(cr,(t=>{var e,n;return{...null==t?void 0:t[wo],maxSize:null==(e=null==t?void 0:t[wo])?void 0:e.maxSize,keepOriginal:(null==(n=null==t?void 0:t[wo])?void 0:n.keepOriginal)||0}})),ml=Ut(cr,(t=>{var e;return{...null==t?void 0:t[tl],maxSize:(null==(e=null==t?void 0:t[tl])?void 0:e.maxSize)||0}})),_l=Ut([gl,yl,vl,ml],((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}))),Fy=Ut(_l,(t=>Object.keys(t).reduce(((e,n)=>[...e,...t[n]||[]]),[]))),rl=hl({name:"platformSettings",initialState:jy,reducers:{setError:(t,e)=>{t.error=e.payload},setPending:(t,e)=>{t.isPending=e.payload}},extraReducers:t=>{t.addCase(dl,((t,{payload:e})=>{t.data={...t.data,...e}}))},selectors:{selectSettings:cr,selectPostConfig:zy,selectDocPolicy:ml,selectImagePolicy:gl,selectVideoPolicy:yl,selectAudioPolicy:vl,selectSupportedExtensions:_l,selectFullExtensionsList:Fy,selectRegistration:t=>{var e;return null==(e=t.data)?void 0:e[ky]},selectLanguageDetection:t=>{var e;return null==(e=t.data)?void 0:e[My]},selectLanguageTranslation:t=>{var e;return null==(e=t.data)?void 0:e[Ly]},selectOpenai:t=>{var e;return null==(e=t.data)?void 0:e[Wy]},selectCaptcha:t=>{var e;return null==(e=t.data)?void 0:e[Oy]},selectAdminCaptcha:t=>{var e;return null==(e=t.data)?void 0:e[Ey]}}});var nl,il,Gn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},xo={exports:{}},Dr={};
1
+ import{createAction as pl,createSlice as hl,createSelector as Ut}from"https://cdn.jsdelivr.net/npm/@reduxjs/toolkit@2.2.1/+esm";import Xg,{useState as ey,useEffect as ty}from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import{Checkbox as ry,RadioGroup as ny,RadioGroupItem as iy,TooltipProvider as oy,Tooltip as uy,TooltipTrigger as ay,Label as ly,TooltipContent as cy,Select as sy,SelectTrigger as fy,SelectValue as py,SelectContent as hy,SelectGroup as dy,SelectItem as gy,Switch as yy,Input as vy}from"https://cdn.jsdelivr.net/npm/@wellesley/ui@1.0.270";import{useForm as my,FormProvider as _y}from"https://cdn.jsdelivr.net/npm/react-hook-form@7.51.0/+esm";import{useSelector as Pt}from"https://cdn.jsdelivr.net/npm/react-redux@9.1.0/+esm";import{toast as rt}from"https://cdn.jsdelivr.net/npm/react-toastify@10.0.5/+esm";import{logErrorToSentry as wy}from"https://cdn.jsdelivr.net/npm/@wellesley/sentry@1.0.174";import{api as Je,handleBasicResponse as mo}from"https://cdn.jsdelivr.net/npm/@wellesley/openapi@1.0.308";import{getErrorMsg as Kn}from"https://cdn.jsdelivr.net/npm/@wellesley/error-kit@1.0.159";import{authSlice as Zn}from"https://cdn.jsdelivr.net/npm/@wellesley/auth@1.0.364";import{userSlice as Po}from"https://cdn.jsdelivr.net/npm/@wellesley/user@1.0.323";const xy=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)},by=t=>xy(t)&&"type"in t&&"string"==typeof t.type,$=t=>{const e=e=>({type:t,payload:e});return e.toString=()=>`${t}`,e.type=t,e.match=e=>by(e)&&e.type===t,e};$("remoteReady"),$("reselectUser"),$("requestLogin"),$("requestLogout"),$("setConfirmLeavePage"),$("requestChangePath"),$("wsSubscribe"),$("wsUnSubscribe"),$("hostStoreConnect"),$("remoteLogin"),$("remoteLogout"),$("wsOnMessage"),$("setRouterPath"),$("setDeviceType"),$("setUserError"),$("setUserIsError"),$("setUserPending"),$("setUserSuccess"),$("setUserData"),$("updateAccountData"),$("updateUser"),$("addNotification"),$("markNotification"),$("setNotificationsError"),$("setNotificationsList"),$("setNotificationsPending"),$("setNotificationsTotalCount"),$("setNotificationsUnreadCount"),$("resetNotificationsState"),$("undoNotification"),$("setInstanceInfo"),$("setInstanceInfoPending"),$("setInstanceInfoError");const dl=$("setPlatformSettings"),Io=$("setProfileSettings");$("setGroupData"),$("setGroupLoading"),$("showGroupBasicInfo"),pl("requestMicroFrontendFetch"),pl("sendMicroFrontendFetchResponse");const Ay={data:null,isPending:!1,isSuccess:!1},Sy=hl({name:"profileSettings",initialState:Ay,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(Io,((t,{payload:e})=>{t.data=e}))},selectors:{selectProfileSettings:t=>t.data,selectPending:t=>t.isPending,selectError:t=>t.error,selectSuccess:t=>t.isSuccess}}),O={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=[O.uploadsPolicyImageExtensions,O.uploadsPolicyImageKeepOriginal,O.uploadsPolicyImageResolutions,O.uploadsPolicyImageMaxResolution,O.uploadsPolicyImageMaxMatrix,O.uploadsPolicyImageMaxSize,O.uploadsPolicyVideoExtensions,O.uploadsPolicyVideoResolutions,O.uploadsPolicyVideoKeepOriginal,O.uploadsPolicyVideoMaxResolution,O.uploadsPolicyVideoMaxMatrix,O.uploadsPolicyVideoMaxSize,O.uploadsPolicyVideoMaxDuration,O.uploadsPolicyVideoStreamingThreshold,O.uploadsPolicyAudioExtensions,O.uploadsPolicyAudioKeepOriginal,O.uploadsPolicyAudioMaxSize,O.uploadsPolicyDocExtensions,O.uploadsPolicyDocMaxSize,O.mediacacheEnabled,O.mediacacheMaxTotalSize,O.mediacacheMaxFileSize,O.mediacacheLimitPerRun,O.mediacacheSingleRun,O.mediacacheCheckInterval,O.postsMaxMediaAttachments,O.postsMaxCharacters,O.postsMaxPins,O.registrationMode,O.registrationInvitesEnabled,O.registrationReasonToJoin,O.registrationShowCaptcha,O.registrationNotAvailableMessage],Iv="wellesley",ye={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"},Cv="user",Ry=["wellesley.posts","wellesley.captcha","wellesley.registration","wellesley.confirmationCode","wellesley.uploads.policy.doc","wellesley.uploads.policy.audio","wellesley.uploads.policy.image","wellesley.uploads.policy.video","wellesley.translation"],Py=["wellesley.admin.sms","wellesley.admin.auth","wellesley.admin.openai","wellesley.admin.uploads","wellesley.admin.captcha","wellesley.admin.language","wellesley.admin.mediacache","wellesley.admin.translation"],Iy={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"},Cy={posts:"wellesley.posts",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"},jy={data:null,isPending:!1},{posts:_o,uploadsPolicyDoc:tl,uploadsPolicyAudio:wo,uploadsPolicyImage:Qn,uploadsPolicyVideo:Tr,registration:ky,captcha:Oy}=Cy,{captcha:Ey,language:My,translation:Ly,openai:Wy}=Iy,cr=t=>t.data,zy=Ut(cr,(t=>{var e,n,r;return{max_characters:(null==(e=null==t?void 0:t[_o])?void 0:e.max_characters)||0,max_media_attachments:(null==(n=null==t?void 0:t[_o])?void 0:n.max_media_attachments)||0,max_pins:(null==(r=null==t?void 0:t[_o])?void 0:r.max_pins)||0}})),gl=Ut(cr,(t=>{var e,n,r;return{...null==t?void 0:t[Qn],maxSize:(null==(e=null==t?void 0:t[Qn])?void 0:e.maxSize)||0,maxMatrix:(null==(n=null==t?void 0:t[Qn])?void 0:n.maxMatrix)||0,maxResolution:(null==(r=null==t?void 0:t[Qn])?void 0:r.maxResolution)||0}})),yl=Ut(cr,(t=>{var e,n,r,i;return{...null==t?void 0:t[Tr],maxSize:(null==(e=null==t?void 0:t[Tr])?void 0:e.maxSize)||0,maxMatrix:(null==(n=null==t?void 0:t[Tr])?void 0:n.maxMatrix)||0,maxDuration:(null==(r=null==t?void 0:t[Tr])?void 0:r.maxDuration)||0,maxResolution:(null==(i=null==t?void 0:t[Tr])?void 0:i.maxResolution)||0}})),vl=Ut(cr,(t=>{var e,n;return{...null==t?void 0:t[wo],maxSize:null==(e=null==t?void 0:t[wo])?void 0:e.maxSize,keepOriginal:(null==(n=null==t?void 0:t[wo])?void 0:n.keepOriginal)||0}})),ml=Ut(cr,(t=>{var e;return{...null==t?void 0:t[tl],maxSize:(null==(e=null==t?void 0:t[tl])?void 0:e.maxSize)||0}})),_l=Ut([gl,yl,vl,ml],((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}))),Fy=Ut(_l,(t=>Object.keys(t).reduce(((e,n)=>[...e,...t[n]||[]]),[]))),rl=hl({name:"platformSettings",initialState:jy,reducers:{setError:(t,e)=>{t.error=e.payload},setPending:(t,e)=>{t.isPending=e.payload}},extraReducers:t=>{t.addCase(dl,((t,{payload:e})=>{t.data={...t.data,...e}}))},selectors:{selectSettings:cr,selectPostConfig:zy,selectDocPolicy:ml,selectImagePolicy:gl,selectVideoPolicy:yl,selectAudioPolicy:vl,selectSupportedExtensions:_l,selectFullExtensionsList:Fy,selectRegistration:t=>{var e;return null==(e=t.data)?void 0:e[ky]},selectLanguageDetection:t=>{var e;return null==(e=t.data)?void 0:e[My]},selectLanguageTranslation:t=>{var e;return null==(e=t.data)?void 0:e[Ly]},selectOpenai:t=>{var e;return null==(e=t.data)?void 0:e[Wy]},selectCaptcha:t=>{var e;return null==(e=t.data)?void 0:e[Oy]},selectAdminCaptcha:t=>{var e;return null==(e=t.data)?void 0:e[Ey]}}});var nl,il,Gn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},xo={exports:{}},Dr={};
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.264",
2
+ "version": "1.0.265",
3
3
  "name": "@wellesley/settings",
4
4
  "license": "UNLICENSED",
5
5
  "main": "index.mjs",