{"version":3,"file":"index.mjs","sources":["../src/components/AnErrorOccurred.tsx","../src/hooks/useCallbackRef.ts","../src/features/Notifications.tsx","../src/features/RBAC.tsx","../src/utils/auth.ts","../src/utils/fetchClient.ts","../src/utils/getFetchClient.ts","../src/utils/hasPermissions.ts","../src/components/LoadingIndicatorPage.tsx","../src/components/CheckPagePermissions.tsx","../src/components/CheckPermissions.tsx","../src/components/ConfirmDialog.tsx","../src/components/ContentBox.tsx","../src/utils/once.ts","../src/components/DateTimePicker.tsx","../src/features/AppInfo.tsx","../src/features/Tracking.tsx","../src/hooks/useQueryParams.ts","../src/icons/SortIcon.tsx","../src/components/EmptyStateLayout.tsx","../src/components/EmptyBodyTable.tsx","../src/components/DynamicTable.tsx","../src/components/Table.tsx","../src/components/FilterListURLQuery.tsx","../src/components/FilterPopoverURLQuery.tsx","../src/components/Form.tsx","../src/hooks/useFieldHint.tsx","../src/hooks/useQuery.ts","../src/hooks/useFocusInputField.ts","../src/utils/pxToRem.ts","../src/components/GenericInput.tsx","../src/features/StrapiApp.tsx","../src/components/InjectionZone.tsx","../src/components/Link.tsx","../src/components/LinkButton.tsx","../src/components/NoContent.tsx","../src/components/NoMedia.tsx","../src/components/NoPermissions.tsx","../src/components/NotAllowedInput.tsx","../src/components/PageSizeURLQuery.tsx","../src/components/PaginationURLQuery.tsx","../src/components/ReactSelect.tsx","../src/components/RelativeTime.tsx","../src/components/SearchURLQuery.tsx","../src/components/SettingsPageTitle.tsx","../src/components/Status.tsx","../src/content-manager/CMEditViewDataManager.tsx","../src/content-manager/utils/getAttributeInfos.ts","../src/features/AutoReloadOverlayBlocker.tsx","../src/features/CustomFields.tsx","../src/features/GuidedTour.tsx","../src/features/Library.tsx","../src/features/OverlayBlocker.tsx","../src/utils/getPrefixedId.ts","../src/utils/normalizeAPIError.ts","../src/hooks/useAPIErrorHandler.ts","../src/hooks/useClipboard.ts","../src/hooks/useCollator.ts","../src/hooks/useFetchClient.ts","../src/hooks/useFilter.ts","../src/hooks/useFocusWhenNavigate.ts","../src/hooks/useLockScroll.ts","../src/hooks/usePersistentState.ts","../src/hooks/useRBAC.ts","../src/hooks/useSelectionState.ts","../src/icons/RemoveRoundedButton.tsx","../src/content-manager/utils/contentManagementUtilRemoveFieldsFromData.ts","../src/content-manager/utils/formatContentTypeData.ts","../src/utils/awaitToJs.ts","../src/utils/difference.ts","../src/utils/getAPIInnerErrors.ts","../src/utils/getFileExtension.ts","../src/utils/getYupInnerErrors.ts","../src/utils/prefixFileUrlWithBackendUrl.ts","../src/utils/prefixPluginTranslations.ts","../src/utils/request.ts","../src/utils/setHexOpacity.ts","../src/utils/stopPropagation.ts","../src/utils/translatedErrors.ts","../src/utils/wrapAxiosInstance.ts"],"sourcesContent":["import * as React from 'react';\n\nimport { EmptyStateLayout, EmptyStateLayoutProps } from '@strapi/design-system';\nimport { ExclamationMarkCircle } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\n\nimport type { TranslationMessage } from '../types';\n\nexport type AnErrorOccurredProps = Omit<EmptyStateLayoutProps, 'content' | 'icon'> & {\n  content?: TranslationMessage;\n};\n\nconst AnErrorOccurred = ({\n  content = {\n    id: 'anErrorOccurred',\n    defaultMessage: 'Woops! Something went wrong. Please, try again.',\n    values: {},\n  },\n  ...rest\n}: AnErrorOccurredProps) => {\n  const { formatMessage } = useIntl();\n\n  return (\n    <EmptyStateLayout\n      {...rest}\n      icon={<ExclamationMarkCircle width=\"10rem\" />}\n      content={formatMessage(\n        { id: content.id, defaultMessage: content.defaultMessage },\n        content.values\n      )}\n    />\n  );\n};\n\nexport { AnErrorOccurred };\n","import * as React from 'react';\n\n/**\n * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a\n * prop or avoid re-executing effects when passed as a dependency\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const useCallbackRef = <T extends (...args: any[]) => any>(callback: T | undefined): T => {\n  const callbackRef = React.useRef(callback);\n\n  React.useEffect(() => {\n    callbackRef.current = callback;\n  });\n\n  // https://github.com/facebook/react/issues/19240\n  return React.useMemo(() => ((...args) => callbackRef.current?.(...args)) as T, []);\n};\n","import * as React from 'react';\n\nimport { Alert, AlertVariant, Flex } from '@strapi/design-system';\nimport { Link } from '@strapi/design-system/v2';\nimport { MessageDescriptor, useIntl } from 'react-intl';\n\nimport { useCallbackRef } from '../hooks/useCallbackRef';\nimport { TranslationMessage } from '../types';\n\n/**\n * TODO: realistically a lot of this logic is isolated to the `core/admin` package.\n * However, we want to expose the `useNotification` hook to the plugins.\n *\n * Therefore, in V5 we should move this logic back to the `core/admin` package & export\n * the hook from that package and re-export here. For now, let's keep it all together\n * because it's easier to diagnose and we're not using a million refs because we don't\n * understand what's going on.\n */\n\nexport interface NotificationLink {\n  label: string | MessageDescriptor;\n  target?: string;\n  url: string;\n}\n\nexport interface NotificationConfig {\n  blockTransition?: boolean;\n  link?: NotificationLink;\n  message?: string | TranslationMessage;\n  onClose?: () => void;\n  timeout?: number;\n  title?: string | TranslationMessage;\n  type?: 'info' | 'warning' | 'softWarning' | 'success';\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\nexport interface NotificationsContextValue {\n  /**\n   * Toggles a notification, wrapped in `useCallback` for a stable identity.\n   */\n  toggleNotification: (config: NotificationConfig) => void;\n}\n\nconst NotificationsContext = React.createContext<NotificationsContextValue>({\n  toggleNotification: () => {},\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Provider\n * -----------------------------------------------------------------------------------------------*/\n\nexport interface NotificationsProviderProps {\n  children: React.ReactNode;\n}\nexport interface Notification extends NotificationConfig {\n  id: number;\n}\n\nconst NotificationsProvider = ({ children }: NotificationsProviderProps) => {\n  const notificationIdRef = React.useRef(0);\n\n  const [notifications, setNotifications] = React.useState<Notification[]>([]);\n\n  const toggleNotification = React.useCallback(\n    ({ type, message, link, timeout, blockTransition, onClose, title }: NotificationConfig) => {\n      setNotifications((s) => [\n        ...s,\n        {\n          id: notificationIdRef.current++,\n          type,\n          message,\n          link,\n          timeout,\n          blockTransition,\n          onClose,\n          title,\n        },\n      ]);\n    },\n    []\n  );\n\n  const clearNotification = React.useCallback((id: number) => {\n    setNotifications((s) => s.filter((n) => n.id !== id));\n  }, []);\n\n  const value = React.useMemo(() => ({ toggleNotification }), [toggleNotification]);\n\n  return (\n    <NotificationsContext.Provider value={value}>\n      <Flex\n        left=\"50%\"\n        marginLeft=\"-250px\"\n        position=\"fixed\"\n        direction=\"column\"\n        alignItems=\"stretch\"\n        gap={2}\n        top={`${46 / 16}rem`}\n        width={`${500 / 16}rem`}\n        zIndex={10}\n      >\n        {notifications.map((notification) => {\n          return (\n            <Notification\n              key={notification.id}\n              {...notification}\n              clearNotification={clearNotification}\n            />\n          );\n        })}\n      </Flex>\n      {children}\n    </NotificationsContext.Provider>\n  );\n};\n\nexport interface NotificationProps extends Notification {\n  clearNotification: (id: number) => void;\n}\n\nconst Notification = ({\n  clearNotification,\n  blockTransition = false,\n  id,\n  link,\n  message = {\n    id: 'notification.success.saved',\n    defaultMessage: 'Saved',\n  },\n  onClose,\n  timeout = 2500,\n  title,\n  type,\n}: NotificationProps) => {\n  const { formatMessage } = useIntl();\n\n  /**\n   * Chances are `onClose` won't be classed as stabilised,\n   * so we use `useCallbackRef` to avoid make it stable.\n   */\n  const onCloseCallback = useCallbackRef(onClose);\n\n  const handleClose = React.useCallback(() => {\n    onCloseCallback();\n\n    clearNotification(id);\n  }, [clearNotification, id, onCloseCallback]);\n\n  // eslint-disable-next-line consistent-return\n  React.useEffect(() => {\n    if (!blockTransition) {\n      const timeoutReference = setTimeout(() => {\n        handleClose();\n      }, timeout);\n\n      return () => {\n        clearTimeout(timeoutReference);\n      };\n    }\n  }, [blockTransition, handleClose, timeout]);\n\n  let variant: AlertVariant;\n  let alertTitle: string;\n\n  if (type === 'info') {\n    variant = 'default';\n    alertTitle = formatMessage({\n      id: 'notification.default.title',\n      defaultMessage: 'Information:',\n    });\n  } else if (type === 'warning') {\n    // TODO: type should be renamed to danger in the future, but it might introduce changes if done now\n    variant = 'danger';\n    alertTitle = formatMessage({\n      id: 'notification.warning.title',\n      defaultMessage: 'Warning:',\n    });\n  } else if (type === 'softWarning') {\n    // TODO: type should be renamed to just warning in the future\n    variant = 'warning';\n    alertTitle = formatMessage({\n      id: 'notification.warning.title',\n      defaultMessage: 'Warning:',\n    });\n  } else {\n    variant = 'success';\n    alertTitle = formatMessage({\n      id: 'notification.success.title',\n      defaultMessage: 'Success:',\n    });\n  }\n\n  if (title) {\n    alertTitle =\n      typeof title === 'string'\n        ? title\n        : formatMessage(\n            {\n              id: title.id,\n              defaultMessage: title.defaultMessage ?? title.id,\n            },\n            title.values\n          );\n  }\n\n  return (\n    <Alert\n      action={\n        link ? (\n          <Link href={link.url} isExternal>\n            {formatMessage({\n              id: typeof link.label === 'object' ? link.label.id : link.label,\n              defaultMessage:\n                typeof link.label === 'object'\n                  ? link.label.defaultMessage ?? link.label.id\n                  : link.label,\n            })}\n          </Link>\n        ) : undefined\n      }\n      onClose={handleClose}\n      closeLabel={formatMessage({\n        id: 'global.close',\n        defaultMessage: 'Close',\n      })}\n      title={alertTitle}\n      variant={variant}\n    >\n      {message && typeof message === 'object'\n        ? formatMessage(\n            {\n              id: message.id,\n              defaultMessage: message.defaultMessage ?? message.id,\n            },\n            message.values\n          )\n        : message}\n    </Alert>\n  );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Hook\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * @preserve\n * @description Returns an object to interact with the notification\n * system. The callbacks are wrapped in `useCallback` for a stable\n * identity.\n *\n * @example\n * ```tsx\n * import { useNotification } from '@strapi/helper-plugin';\n *\n * const MyComponent = () => {\n *  const toggleNotification = useNotification();\n *\n *  return <button onClick={() => toggleNotification({ message: 'Hello world!' })}>Click me</button>;\n */\nconst useNotification = () => React.useContext(NotificationsContext).toggleNotification;\n\nexport { NotificationsContext, NotificationsProvider, useNotification };\n","import * as React from 'react';\n\nimport type { Entity } from '@strapi/types';\n\n/**\n * This is duplicated from the `@strapi/admin` package.\n */\ninterface Permission {\n  id?: Entity.ID;\n  action: string;\n  actionParameters?: object;\n  subject?: string | null;\n  properties?: {\n    fields?: string[];\n    locales?: string[];\n    [key: string]: any;\n  };\n  conditions?: string[];\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\nexport type RBACContextValue = {\n  allPermissions: Permission[]; // The permissions of the current user.\n  refetchPermissions: () => void;\n};\n\nconst RBACContext = React.createContext<RBACContextValue>({\n  allPermissions: [],\n  refetchPermissions: async () => {\n    throw new Error('RBACContext: refetchPermissions() not implemented');\n  },\n});\n\n/**\n * @deprecated Use RBACContext instead.\n */\nconst RBACProviderContext = RBACContext;\n\n/* -------------------------------------------------------------------------------------------------\n * Provider\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * TODO: in another iteration where we tackle the RBAC hooks // system to consolidate it all into one hook.\n */\n\n/* -------------------------------------------------------------------------------------------------\n * Hook\n * -----------------------------------------------------------------------------------------------*/\n\nconst useRBAC = () => React.useContext(RBACContext);\n\nconst useRBACProvider = useRBAC;\n\nexport { RBACContext, RBACProviderContext, useRBACProvider, Permission };\n","import isEmpty from 'lodash/isEmpty';\nimport isNil from 'lodash/isNil';\n\nconst TOKEN_KEY = 'jwtToken';\nconst USER_INFO = 'userInfo';\nconst CURRENT_STEP = 'GUIDED_TOUR_CURRENT_STEP';\nconst COMPLETED_STEPS = 'GUIDED_TOUR_COMPLETED_STEPS';\nconst SKIPPED = 'GUIDED_TOUR_SKIPPED';\nconst THEME_KEY = 'STRAPI_THEME'; // Also used in packages/core/admin/admin/src/components/ThemeToggleProvider/index.js\nconst UPLOAD_MODAL_VIEW = 'STRAPI_UPLOAD_MODAL_VIEW';\nconst UPLOAD_VIEW = 'STRAPI_UPLOAD_LIBRARY_VIEW';\n\ninterface UserInfo {\n  email: string;\n  firstname?: string;\n  lastname?: string;\n  username?: string;\n  preferedLanguage?: string;\n  id: number;\n  isActive?: boolean;\n  blocked: boolean;\n  createdAt: string;\n  updatedAt: string;\n}\n\ninterface StorageItems {\n  userInfo: UserInfo;\n  jwtToken: string;\n  STRAPI_THEME: 'light' | 'dark';\n  GUIDED_TOUR_CURRENT_STEP: string | null;\n  GUIDED_TOUR_COMPLETED_STEPS: string[] | null;\n  GUIDED_TOUR_SKIPPED: boolean | null;\n  STRAPI_UPDATE_NOTIF: boolean | null;\n  STRAPI_UPLOAD_MODAL_VIEW: 0 | 1 | null; // grid or list view\n  STRAPI_UPLOAD_LIBRARY_VIEW: 0 | 1 | null; // grid or list view\n  videos: unknown;\n  onboarding: unknown;\n}\n\ntype StorageItemValues = StorageItems[keyof StorageItems];\n\n/**\n * @deprecated if you're trying to interact with the token or current user you use should use the `useAuth` hook instead.\n * If you're generally interacting with localStorage, then access this directly e.g. `localStorage.getItem('myKey')`.\n *\n * This will be removed in V5.\n */\nconst auth = {\n  clear(key: keyof StorageItems) {\n    if (localStorage.getItem(key)) {\n      return localStorage.removeItem(key);\n    }\n\n    if (sessionStorage.getItem(key)) {\n      return sessionStorage.removeItem(key);\n    }\n\n    return null;\n  },\n\n  clearAppStorage() {\n    if (localStorage) {\n      const videos = auth.get('videos');\n      const onboarding = auth.get('onboarding');\n      const strapiUpdateNotification = auth.get('STRAPI_UPDATE_NOTIF');\n\n      const localeLang = localStorage.getItem('strapi-admin-language');\n      const guidedTourCurrentStep = auth.get(CURRENT_STEP);\n      const guidedTourState = auth.get(COMPLETED_STEPS);\n      const guidedTourSkipped = auth.get(SKIPPED);\n      const applicationTheme = auth.get(THEME_KEY);\n      const uploadMediaLibraryView = auth.get(UPLOAD_VIEW);\n      const uploadMediaLibraryModalView = auth.get(UPLOAD_MODAL_VIEW);\n\n      localStorage.clear();\n\n      localStorage.setItem('videos', JSON.stringify(videos));\n      localStorage.setItem(CURRENT_STEP, JSON.stringify(guidedTourCurrentStep));\n      localStorage.setItem(COMPLETED_STEPS, JSON.stringify(guidedTourState));\n      localStorage.setItem(SKIPPED, JSON.stringify(guidedTourSkipped));\n      localStorage.setItem('STRAPI_UPDATE_NOTIF', JSON.stringify(strapiUpdateNotification));\n\n      if (onboarding) {\n        localStorage.setItem('onboarding', JSON.stringify(onboarding));\n      }\n\n      if (localeLang) {\n        localStorage.setItem('strapi-admin-language', localeLang);\n      }\n\n      if (applicationTheme) {\n        localStorage.setItem(THEME_KEY, applicationTheme);\n      }\n\n      if (!isNil(uploadMediaLibraryView)) {\n        localStorage.setItem(UPLOAD_VIEW, JSON.stringify(uploadMediaLibraryView));\n      }\n\n      if (!isNil(uploadMediaLibraryModalView)) {\n        localStorage.setItem(UPLOAD_MODAL_VIEW, JSON.stringify(uploadMediaLibraryModalView));\n      }\n    }\n\n    sessionStorage.clear();\n  },\n\n  get<T extends keyof StorageItems>(key: T): StorageItems[T] | null {\n    const item = localStorage.getItem(key) ?? sessionStorage.getItem(key);\n    if (item) {\n      try {\n        const parsedItem = JSON.parse(item);\n        return parsedItem;\n      } catch (error) {\n        // Failed to parse return the string value\n        // @ts-expect-error - this is fine\n        return item;\n      }\n    }\n\n    return null;\n  },\n\n  set(value: StorageItemValues, key: keyof StorageItems, isLocalStorage: boolean) {\n    if (isEmpty(value)) {\n      return null;\n    }\n\n    if (isLocalStorage) {\n      return localStorage.setItem(key, JSON.stringify(value));\n    }\n\n    return sessionStorage.setItem(key, JSON.stringify(value));\n  },\n\n  /**\n   * @deprecated use auth.clear(\"jwtToken\") instead\n   */\n  clearToken(tokenKey: 'jwtToken' = TOKEN_KEY) {\n    void auth.clear(tokenKey);\n  },\n\n  /**\n   * @deprecated use auth.clear(\"userInfo\") instead\n   */\n  clearUserInfo(userInfoKey: 'userInfo' = USER_INFO) {\n    return auth.clear(userInfoKey);\n  },\n\n  /**\n   * @deprecated use auth.get(\"jwtToken\") instead\n   */\n  getToken(tokenKey: 'jwtToken' = TOKEN_KEY) {\n    return auth.get(tokenKey);\n  },\n\n  /**\n   * @deprecated use auth.get(\"userInfo\") instead\n   */\n  getUserInfo(userInfoKey: 'userInfo' = USER_INFO) {\n    return auth.get(userInfoKey);\n  },\n\n  /**\n   * @depreacted use auth.set(value, \"jwtToken\", true | false) instead\n   */\n  setToken(\n    value: StorageItemValues = '',\n    isLocalStorage = false,\n    tokenKey: 'jwtToken' = TOKEN_KEY\n  ) {\n    void auth.set(value, tokenKey, isLocalStorage);\n  },\n\n  /**\n   * @depreacted use auth.set(value, \"userInfo\", true | false) instead\n   */\n  setUserInfo(value: StorageItemValues, isLocalStorage = false, userInfo: 'userInfo' = USER_INFO) {\n    void auth.set(value, userInfo, isLocalStorage);\n  },\n\n  /**\n   * @depreacted use auth.set(value, \"userInfo\", true | false) instead\n   */\n  updateToken(value: StorageItemValues = '') {\n    const isLocalStorage = Boolean(localStorage.getItem(TOKEN_KEY));\n\n    void auth.setToken(value, isLocalStorage);\n  },\n};\n\nexport { auth };\nexport type { UserInfo, StorageItems };\n","import axios, { AxiosInstance } from 'axios';\nimport qs from 'qs';\n\nimport { auth } from './auth';\n\nconst fetchClient = (): AxiosInstance => {\n  const instance = axios.create({\n    headers: {\n      Accept: 'application/json',\n      'Content-Type': 'application/json',\n    },\n    paramsSerializer: (params) => {\n      return qs.stringify(params, { encode: false });\n    },\n  });\n\n  // Add a request interceptor to add authorization token to headers, rejects errors\n  instance.interceptors.request.use(\n    async (config) => {\n      config.headers.Authorization = `Bearer ${auth.getToken()}`;\n\n      return config;\n    },\n    (error) => Promise.reject(error)\n  );\n\n  // Add a response interceptor to return the response or handle the error\n  instance.interceptors.response.use(\n    (response) => response,\n    (error) => {\n      if (error?.response?.status === 401) {\n        auth.clearAppStorage();\n        window.location.reload();\n      }\n\n      throw error;\n    }\n  );\n\n  return instance;\n};\n\nconst instance = fetchClient();\n\nexport { instance };\n","import { AxiosRequestConfig, AxiosResponse } from 'axios';\n\nimport { instance } from './fetchClient';\n\nconst addPrependingSlash = (url: string) => (url.charAt(0) !== '/' ? `/${url}` : url);\n\n// This regular expression matches a string that starts with either \"http://\" or \"https://\" or any other protocol name in lower case letters, followed by \"://\" and ends with anything else\nconst hasProtocol = (url: string) => new RegExp('^(?:[a-z+]+:)?//', 'i').test(url);\n\n// Check if the url has a prepending slash, if not add a slash\nconst normalizeUrl = (url: string) => (hasProtocol(url) ? url : addPrependingSlash(url));\n\ntype FetchClient = {\n  get: <TData = any, R = AxiosResponse<TData>, TSend = any>(\n    url: string,\n    config?: AxiosRequestConfig<TSend>\n  ) => Promise<R>;\n  put: <TData = any, R = AxiosResponse<TData>, TSend = any>(\n    url: string,\n    data?: TSend,\n    config?: AxiosRequestConfig<TSend>\n  ) => Promise<R>;\n  post: <TData = any, R = AxiosResponse<TData>, TSend = any>(\n    url: string,\n    data?: TSend,\n    config?: AxiosRequestConfig<TSend>\n  ) => Promise<R>;\n  del: <TData = any, R = AxiosResponse<TData>, TSend = any>(\n    url: string,\n    config?: AxiosRequestConfig<TSend>\n  ) => Promise<R>;\n};\n\nconst getFetchClient = (defaultOptions: AxiosRequestConfig = {}): FetchClient => {\n  instance.defaults.baseURL = window.strapi.backendURL;\n  return {\n    get: (url, config) =>\n      instance.get(normalizeUrl(url), {\n        ...defaultOptions,\n        ...config,\n      }),\n    put: (url, data, config) =>\n      instance.put(normalizeUrl(url), data, { ...defaultOptions, ...config }),\n    post: (url, data, config) =>\n      instance.post(normalizeUrl(url), data, { ...defaultOptions, ...config }),\n    del: (url, config) => instance.delete(normalizeUrl(url), { ...defaultOptions, ...config }),\n  };\n};\n\nexport { getFetchClient };\n","import { getFetchClient } from './getFetchClient';\n\nimport type { Permission } from '../features/RBAC';\nimport type { GenericAbortSignal } from 'axios';\n\ntype PermissionToCheckAgainst = Pick<Permission, 'action' | 'subject'> &\n  Partial<Pick<Permission, 'actionParameters' | 'conditions' | 'properties'>>;\n\nconst findMatchingPermissions = (\n  userPermissions: Permission[],\n  permissions: PermissionToCheckAgainst[]\n) =>\n  userPermissions.reduce<Permission[]>((acc, curr) => {\n    const associatedPermission = permissions.find(\n      (perm) => perm.action === curr.action && perm.subject === curr.subject\n    );\n\n    if (associatedPermission) {\n      acc.push(curr);\n    }\n\n    return acc;\n  }, []);\n\nconst formatPermissionsForRequest = (permissions: Permission[]) =>\n  permissions.map((permission) => {\n    if (!permission.action) {\n      return {};\n    }\n\n    const returnedPermission: Partial<Permission> = {\n      action: permission.action,\n    };\n\n    if (permission.subject) {\n      returnedPermission.subject = permission.subject;\n    }\n\n    return returnedPermission;\n  });\n\n/**\n * This should fail if there are no permissions or if there are permissions but no conditions\n */\nconst shouldCheckPermissions = (permissions: Permission[]) =>\n  permissions.length > 0 &&\n  permissions.every((perm) => Array.isArray(perm.conditions) && perm.conditions.length > 0);\n\nconst hasPermissions = async (\n  userPermissions: Permission[],\n  permissions: PermissionToCheckAgainst[],\n  signal?: GenericAbortSignal\n) => {\n  if (!permissions || !permissions.length) {\n    return true;\n  }\n\n  const matchingPermissions = findMatchingPermissions(userPermissions, permissions);\n\n  if (shouldCheckPermissions(matchingPermissions)) {\n    let hasPermission = false;\n\n    try {\n      const {\n        data: { data },\n      } = await getFetchClient().post<{ data: boolean[] }>(\n        '/admin/permissions/check',\n        {\n          permissions: formatPermissionsForRequest(matchingPermissions),\n        },\n        { signal }\n      );\n\n      hasPermission = data.every((v) => v === true);\n    } catch (err) {\n      console.error('Error while checking permissions', err);\n    }\n\n    return hasPermission;\n  }\n\n  return matchingPermissions.length > 0;\n};\n\nexport {\n  hasPermissions,\n  findMatchingPermissions,\n  formatPermissionsForRequest,\n  shouldCheckPermissions,\n};\n\nexport type { PermissionToCheckAgainst };\n","import * as React from 'react';\n\nimport { Flex, Loader } from '@strapi/design-system';\nimport styled from 'styled-components';\n\nconst Wrapper = styled(Flex)`\n  height: 100vh;\n`;\n\ninterface LoadingIndicatorPageProps {\n  children?: React.ReactNode;\n  'data-testid'?: string;\n}\n\nconst LoadingIndicatorPage = ({\n  children = 'Loading content.',\n  'data-testid': dataTestId = 'loader',\n}: LoadingIndicatorPageProps) => {\n  return (\n    <Wrapper justifyContent=\"space-around\" data-testid={dataTestId}>\n      <Loader>{children}</Loader>\n    </Wrapper>\n  );\n};\n\nexport { LoadingIndicatorPage };\n","import * as React from 'react';\n\nimport { useQuery } from 'react-query';\nimport { Redirect } from 'react-router-dom';\n\nimport { useNotification } from '../features/Notifications';\nimport { useRBACProvider } from '../features/RBAC';\nimport { PermissionToCheckAgainst, hasPermissions } from '../utils/hasPermissions';\n\nimport { LoadingIndicatorPage } from './LoadingIndicatorPage';\n\nexport interface CheckPagePermissionsProps {\n  children: React.ReactNode;\n  permissions?: PermissionToCheckAgainst[];\n}\n\nconst CheckPagePermissions = ({\n  permissions = [],\n  children,\n}: CheckPagePermissionsProps): React.JSX.Element => {\n  const { allPermissions } = useRBACProvider();\n  const toggleNotification = useNotification();\n\n  const { data: canAccess, isLoading } = useQuery(\n    ['checkPagePermissions', permissions, allPermissions],\n    () => hasPermissions(allPermissions, permissions),\n    {\n      onError: () => {\n        toggleNotification({\n          type: 'warning',\n          message: { id: 'notification.error' },\n        });\n      },\n    }\n  );\n\n  if (isLoading) {\n    return <LoadingIndicatorPage />;\n  }\n\n  if (canAccess === false) {\n    return <Redirect to=\"/\" />;\n  }\n\n  return <>{children}</>;\n};\n\nexport { CheckPagePermissions };\n","import * as React from 'react';\n\nimport { useNotification } from '../features/Notifications';\nimport { useRBACProvider } from '../features/RBAC';\nimport { PermissionToCheckAgainst, hasPermissions } from '../utils/hasPermissions';\n\n// NOTE: this component is very similar to the CheckPagePermissions\n// except that it does not handle redirections nor loading state\n\nexport interface CheckPermissionsProps {\n  children: React.ReactNode;\n  permissions?: PermissionToCheckAgainst[];\n}\n\nconst CheckPermissions = ({ permissions = [], children }: CheckPermissionsProps) => {\n  const { allPermissions } = useRBACProvider();\n\n  const toggleNotification = useNotification();\n  const [state, setState] = React.useState({ isLoading: true, canAccess: false });\n  const isMounted = React.useRef(true);\n  const abortController = new AbortController();\n  const { signal } = abortController;\n\n  React.useEffect(() => {\n    const checkPermission = async () => {\n      try {\n        setState({ isLoading: true, canAccess: false });\n\n        const canAccess = await hasPermissions(allPermissions || [], permissions, signal);\n\n        if (isMounted.current) {\n          setState({ isLoading: false, canAccess });\n        }\n      } catch (err) {\n        if (isMounted.current) {\n          console.error(err);\n          toggleNotification?.({\n            type: 'warning',\n            message: { id: 'notification.error' },\n          });\n\n          setState({ isLoading: false, canAccess: false });\n        }\n      }\n    };\n\n    checkPermission();\n\n    return () => {\n      abortController.abort();\n    };\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [permissions]);\n\n  React.useEffect(() => {\n    return () => {\n      isMounted.current = false;\n    };\n  }, []);\n\n  if (state.isLoading) {\n    return null;\n  }\n\n  if (!state.canAccess) {\n    return null;\n  }\n\n  return <>{children}</>;\n};\n\nexport { CheckPermissions };\n","import * as React from 'react';\n\nimport {\n  Button,\n  ButtonProps,\n  Box,\n  BoxProps,\n  Dialog,\n  DialogBody,\n  DialogFooter,\n  Flex,\n  Typography,\n  DialogBodyProps,\n  FlexProps,\n  DialogProps,\n} from '@strapi/design-system';\nimport { ExclamationMarkCircle, Trash } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\n\nexport interface RootProps extends Partial<FooterProps>, Pick<BoxProps, 'children'> {\n  isOpen: boolean;\n  title?: {\n    id: string;\n    defaultMessage: string;\n  };\n  onToggleDialog: DialogProps['onClose'];\n  onConfirm: FooterProps['onConfirm'];\n}\nexport const Root = ({\n  children,\n  iconRightButton,\n  isConfirmButtonLoading = false,\n  isOpen,\n  onConfirm,\n  onToggleDialog,\n  leftButtonText = {\n    id: 'app.components.Button.cancel',\n    defaultMessage: 'Cancel',\n  },\n  rightButtonText = {\n    id: 'app.components.Button.confirm',\n    defaultMessage: 'Confirm',\n  },\n  title = {\n    id: 'app.components.ConfirmDialog.title',\n    defaultMessage: 'Confirmation',\n  },\n  variantRightButton = 'danger-light',\n  ...props\n}: RootProps) => {\n  const { formatMessage } = useIntl();\n\n  return (\n    <Dialog\n      onClose={onToggleDialog}\n      title={formatMessage({\n        id: title.id,\n        defaultMessage: title.defaultMessage,\n      })}\n      isOpen={isOpen}\n      id=\"confirmation\"\n      {...props}\n    >\n      <Box id=\"confirm-description\">{children}</Box>\n\n      <Footer\n        iconRightButton={iconRightButton}\n        isConfirmButtonLoading={isConfirmButtonLoading}\n        leftButtonText={leftButtonText}\n        onConfirm={onConfirm}\n        onToggleDialog={onToggleDialog}\n        rightButtonText={rightButtonText}\n        variantRightButton={variantRightButton}\n      />\n    </Dialog>\n  );\n};\n\nexport interface BodyProps {\n  children: FlexProps['children'];\n  iconBody?: DialogBodyProps['icon'];\n}\n\nexport const Body = ({ iconBody = <ExclamationMarkCircle />, children }: BodyProps) => {\n  return (\n    <DialogBody icon={iconBody}>\n      <Flex direction=\"column\" alignItems=\"stretch\" gap={2}>\n        <Flex justifyContent=\"center\">{children}</Flex>\n      </Flex>\n    </DialogBody>\n  );\n};\n\ninterface FooterProps {\n  iconRightButton?: ButtonProps['startIcon'];\n  isConfirmButtonLoading: boolean;\n  onConfirm: ButtonProps['onClick'];\n  onToggleDialog: ButtonProps['onClick'];\n  leftButtonText: {\n    id: string;\n    defaultMessage: string;\n  };\n  rightButtonText: {\n    id: string;\n    defaultMessage: string;\n  };\n  variantRightButton: ButtonProps['variant'];\n}\n\nconst Footer = ({\n  iconRightButton = <Trash />,\n  isConfirmButtonLoading,\n  leftButtonText,\n  onConfirm,\n  onToggleDialog,\n  rightButtonText,\n  variantRightButton,\n}: FooterProps) => {\n  const { formatMessage } = useIntl();\n\n  return (\n    <DialogFooter\n      startAction={\n        <Button onClick={onToggleDialog} variant=\"tertiary\">\n          {formatMessage({\n            id: leftButtonText.id,\n            defaultMessage: leftButtonText.defaultMessage,\n          })}\n        </Button>\n      }\n      endAction={\n        <Button\n          onClick={onConfirm}\n          variant={variantRightButton}\n          startIcon={iconRightButton}\n          id=\"confirm-delete\"\n          loading={isConfirmButtonLoading}\n        >\n          {formatMessage({\n            id: rightButtonText.id,\n            defaultMessage: rightButtonText.defaultMessage,\n          })}\n        </Button>\n      }\n    />\n  );\n};\n\nexport interface ConfirmDialogProps extends Omit<RootProps, 'children'> {\n  bodyText?: {\n    id: string;\n    defaultMessage: string;\n  };\n}\n\ninterface ConfirmDialogComponent extends React.FC<ConfirmDialogProps> {\n  Root: React.FC<RootProps>;\n  Body: React.FC<BodyProps>;\n}\nconst ConfirmDialog: ConfirmDialogComponent = ({\n  bodyText = {\n    id: 'components.popUpWarning.message',\n    defaultMessage: 'Are you sure you want to delete this?',\n  },\n  ...props\n}: ConfirmDialogProps) => {\n  const { formatMessage } = useIntl();\n\n  return (\n    <Root {...props}>\n      <Body>\n        <Typography variant=\"omega\">\n          {formatMessage({\n            id: bodyText.id,\n            defaultMessage: bodyText.defaultMessage,\n          })}\n        </Typography>\n      </Body>\n    </Root>\n  );\n};\n\nConfirmDialog.Root = Root;\nConfirmDialog.Body = Body;\n\nexport { ConfirmDialog };\n","import { Flex, FlexProps, Typography } from '@strapi/design-system';\nimport styled from 'styled-components';\n\nexport interface ContentBoxProps {\n  title?: string;\n  subtitle?: string;\n  icon?: FlexProps['children'];\n  iconBackground?: FlexProps['background'];\n  endAction?: FlexProps['children'];\n  titleEllipsis?: boolean;\n}\nconst IconWrapper = styled(Flex)`\n  margin-right: ${({ theme }) => theme.spaces[6]};\n\n  svg {\n    width: ${32 / 16}rem;\n    height: ${32 / 16}rem;\n  }\n`;\n\nconst TypographyWordBreak = styled(Typography)`\n  word-break: break-all;\n`;\n\nconst ContentBox = ({\n  title,\n  subtitle,\n  icon,\n  iconBackground,\n  endAction,\n  titleEllipsis = false,\n}: ContentBoxProps) => {\n  if (title && title.length > 70 && titleEllipsis) {\n    title = `${title.substring(0, 70)}...`;\n  }\n\n  return (\n    <Flex shadow=\"tableShadow\" hasRadius padding={6} background=\"neutral0\">\n      <IconWrapper background={iconBackground} hasRadius padding={3}>\n        {icon}\n      </IconWrapper>\n      <Flex direction=\"column\" alignItems=\"stretch\" gap={endAction ? 0 : 1}>\n        <Flex>\n          <TypographyWordBreak fontWeight=\"semiBold\" variant=\"pi\">\n            {title}\n          </TypographyWordBreak>\n          {endAction}\n        </Flex>\n        <Typography textColor=\"neutral600\">{subtitle}</Typography>\n      </Flex>\n    </Flex>\n  );\n};\n\nexport { ContentBox };\n","export const PREFIX = '[@strapi/helper-plugin]:';\n\nexport const once = <T extends unknown[], R>(fn: (...args: T) => R) => {\n  const func = fn;\n  let called = false;\n\n  if (typeof func !== 'function') {\n    throw new TypeError(`${PREFIX} once requires a function parameter`);\n  }\n\n  return (...args: T) => {\n    if (!called) {\n      func(...args);\n      called = true;\n    }\n  };\n};\n","import * as React from 'react';\n\nimport { DateTimePicker, DateTimePickerProps } from '@strapi/design-system';\n\nimport { once } from '../utils/once';\n\nconst warnOnce = once(console.warn);\n\n// TODO: remove DateTimePicker component from the helper-plugin in V5\n/**\n * @deprecated Use the DateTimePicker from the Design System instead.\n */\nconst DateTimePickerLegacy = (props: DateTimePickerProps) => {\n  warnOnce(\n    `\n      Deprecation warning: Usage of \"DateTimePicker\" component from the helper-plugin is deprecated and will be removed in the next major release. Instead, use the DateTimePicker from the Design System: import { DateTimePicker } from '@strapi/design-system';\"\n    `\n  );\n\n  return <DateTimePicker {...props} />;\n};\n\nexport { DateTimePickerLegacy as DateTimePicker };\n","import * as React from 'react';\n\ntype EmptyObject = Record<string, never>;\n\ntype AppInfoContextValue = {\n  autoReload?: boolean;\n  communityEdition?: boolean;\n  currentEnvironment?: string;\n  dependencies?: Record<string, string>;\n  latestStrapiReleaseTag?: string;\n  nodeVersion?: string;\n  projectId?: string | null;\n  setUserDisplayName: (name: string) => void;\n  shouldUpdateStrapi: boolean;\n  strapiVersion?: string | null;\n  useYarn?: boolean;\n  userDisplayName: string;\n  userId?: string;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\nconst AppInfoContext = React.createContext<AppInfoContextValue | EmptyObject>({});\n\n/* -------------------------------------------------------------------------------------------------\n * Provider\n * -----------------------------------------------------------------------------------------------*/\n\ntype AppInfoProviderProps = AppInfoContextValue & { children: React.ReactNode };\n\nconst AppInfoProvider = ({\n  children,\n  autoReload,\n  communityEdition,\n  currentEnvironment,\n  dependencies,\n  latestStrapiReleaseTag,\n  nodeVersion,\n  projectId,\n  setUserDisplayName,\n  shouldUpdateStrapi,\n  strapiVersion,\n  useYarn,\n  userDisplayName,\n  userId,\n}: AppInfoProviderProps) => {\n  const contextValue: AppInfoContextValue = React.useMemo(\n    () => ({\n      autoReload,\n      communityEdition,\n      currentEnvironment,\n      dependencies,\n      latestStrapiReleaseTag,\n      nodeVersion,\n      projectId,\n      setUserDisplayName,\n      shouldUpdateStrapi,\n      strapiVersion,\n      useYarn,\n      userDisplayName,\n      userId,\n    }),\n    [\n      autoReload,\n      communityEdition,\n      currentEnvironment,\n      dependencies,\n      latestStrapiReleaseTag,\n      nodeVersion,\n      projectId,\n      setUserDisplayName,\n      shouldUpdateStrapi,\n      strapiVersion,\n      useYarn,\n      userDisplayName,\n      userId,\n    ]\n  );\n\n  return <AppInfoContext.Provider value={contextValue}>{children}</AppInfoContext.Provider>;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Hook\n * -----------------------------------------------------------------------------------------------*/\n\nconst useAppInfo = () => React.useContext(AppInfoContext);\n\n/**\n * TODO: rename these to remove the plural in next major version\n */\n/**\n * @preserve\n * @deprecated use useAppInfo instead\n */\nconst useAppInfos = useAppInfo;\n/**\n * @preserve\n * @deprecated use AppInfoProvider instead\n */\nconst AppInfosProvider = AppInfoProvider;\n/**\n * @preserve\n * @deprecated use AppInfoContext instead\n */\nconst AppInfosContext = AppInfoContext;\n\nexport {\n  AppInfoContext,\n  AppInfoProvider,\n  AppInfosContext,\n  AppInfosProvider,\n  useAppInfo,\n  useAppInfos,\n};\n\nexport type { AppInfoContextValue, AppInfoProviderProps };\n","import * as React from 'react';\n\nimport axios, { AxiosResponse } from 'axios';\n\nimport { useAppInfo } from './AppInfo';\n\nexport interface TelemetryProperties {\n  useTypescriptOnServer?: boolean;\n  useTypescriptOnAdmin?: boolean;\n  isHostedOnStrapiCloud?: boolean;\n  numberOfAllContentTypes?: number;\n  numberOfComponents?: number;\n  numberOfDynamicZones?: number;\n}\n\nexport interface TrackingContextValue {\n  uuid?: string | boolean;\n  deviceId?: string;\n  telemetryProperties?: TelemetryProperties;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\nconst TrackingContext = React.createContext<TrackingContextValue>({\n  uuid: false,\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Provider\n * -----------------------------------------------------------------------------------------------*/\n\nexport interface TrackingProviderProps {\n  children: React.ReactNode;\n  value?: TrackingContextValue;\n}\n\nconst TrackingProvider = ({ value = { uuid: false }, children }: TrackingProviderProps) => {\n  const memoizedValue = React.useMemo(() => value, [value]);\n\n  return <TrackingContext.Provider value={memoizedValue}>{children}</TrackingContext.Provider>;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Hook\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * We can group these events together because none have properties so there's no benefit\n * to having them as separate types.\n *\n * Meanwhile those with properties have different property shapes corresponding to the specific\n * event so understanding which properties go with which event is very helpful.\n */\ninterface EventWithoutProperties {\n  name:\n    | 'changeComponentsOrder'\n    | 'didAccessAuthenticatedAdministration'\n    | 'didAddComponentToDynamicZone'\n    | 'didBulkDeleteEntries'\n    | 'didChangeDisplayedFields'\n    | 'didCheckDraftRelations'\n    | 'didClickGuidedTourHomepageApiTokens'\n    | 'didClickGuidedTourHomepageContentManager'\n    | 'didClickGuidedTourHomepageContentTypeBuilder'\n    | 'didClickGuidedTourStep1CollectionType'\n    | 'didClickGuidedTourStep2ContentManager'\n    | 'didClickGuidedTourStep3ApiTokens'\n    | 'didClickonBlogSection'\n    | 'didClickonCodeExampleSection'\n    | 'didClickonReadTheDocumentationSection'\n    | 'didClickOnTryStrapiCloudSection'\n    | 'didClickonTutorialSection'\n    | 'didCreateGuidedTourCollectionType'\n    | 'didCreateGuidedTourEntry'\n    | 'didCreateNewRole'\n    | 'didCreateRole'\n    | 'didDeleteToken'\n    | 'didDuplicateRole'\n    | 'didEditEditSettings'\n    | 'didEditEmailTemplates'\n    | 'didEditFieldNameOnContentType'\n    | 'didEditListSettings'\n    | 'didEditMediaLibraryConfig'\n    | 'didEditNameOfContentType'\n    | 'didGenerateGuidedTourApiTokens'\n    | 'didGoToMarketplace'\n    | 'didLaunchGuidedtour'\n    | 'didMissMarketplacePlugin'\n    | 'didNotCreateFirstAdmin'\n    | 'didNotSaveComponent'\n    | 'didPluginLearnMore'\n    | 'didPublishEntry'\n    | 'didUnpublishEntry'\n    | 'didSaveComponent'\n    | 'didSaveContentType'\n    | 'didSearch'\n    | 'didSkipGuidedtour'\n    | 'didSubmitPlugin'\n    | 'didSubmitProvider'\n    | 'didUpdateConditions'\n    | 'didSelectAllMediaLibraryElements'\n    | 'didSelectContentTypeFieldSettings'\n    | 'didSelectContentTypeSettings'\n    | 'didEditAuthenticationProvider'\n    | 'hasClickedCTBAddFieldBanner'\n    | 'removeComponentFromDynamicZone'\n    | 'willAddMoreFieldToContentType'\n    | 'willBulkDeleteEntries'\n    | 'willBulkUnpublishEntries'\n    | 'willChangeNumberOfEntriesPerPage'\n    | 'willCheckDraftRelations'\n    | 'willCreateComponent'\n    | 'willCreateComponentFromAttributesModal'\n    | 'willCreateContentType'\n    | 'willCreateFirstAdmin'\n    | 'willCreateNewRole'\n    | 'willCreateRole'\n    | 'willCreateSingleType'\n    | 'willCreateStage'\n    | 'willCreateWorkflow'\n    | 'willDeleteEntryFromList'\n    | 'willDeleteFieldOfContentType'\n    | 'willDuplicateRole'\n    | 'willEditEditLayout'\n    | 'willEditEmailTemplates'\n    | 'willEditEntryFromButton'\n    | 'willEditEntryFromList'\n    | 'willEditFieldOfContentType'\n    | 'willEditMediaLibraryConfig'\n    | 'willEditNameOfContentType'\n    | 'willEditNameOfSingleType'\n    | 'willEditAuthenticationProvider'\n    | 'willEditFieldNameOnContentType'\n    | 'willEditStage'\n    | 'willFilterEntries'\n    | 'willInstallPlugin'\n    | 'willPublishEntry'\n    | 'willUnpublishEntry'\n    | 'willSaveComponent'\n    | 'willSaveContentType'\n    | 'willSaveContentTypeLayout'\n    | 'didEditFieldNameOnContentType'\n    | 'didCreateRelease';\n  properties?: never;\n}\n\ninterface DidFilterMediaLibraryElementsEvent {\n  name: 'didFilterMediaLibraryElements';\n  properties: MediaEvents['properties'] & {\n    filter: string;\n  };\n}\n\ninterface DidSortMediaLibraryElementsEvent {\n  name: 'didSortMediaLibraryElements';\n  properties: MediaEvents['properties'] & {\n    sort: string;\n  };\n}\n\ninterface DidCropFileEvent {\n  name: 'didCropFile';\n  properties: MediaEvents['properties'] & {\n    duplicatedFile: null | boolean;\n  };\n}\n\ninterface DidSelectFile {\n  name: 'didSelectFile';\n  properties: MediaEvents['properties'] & {\n    source: 'url' | 'computer';\n  };\n}\n\ninterface DidEditMediaLibraryElementsEvent {\n  name: 'didEditMediaLibraryElements';\n  properties: MediaEvents['properties'] & {\n    type: string;\n    changeLocation: string;\n  };\n}\n\ninterface MediaEvents {\n  name:\n    | 'didSearchMediaLibraryElements'\n    | 'didReplaceMedia'\n    | 'didAddMediaLibraryFolders'\n    | 'willAddMediaLibraryAssets';\n  properties: {\n    location: string;\n  };\n}\n\ninterface DidSelectContentTypeFieldTypeEvent {\n  name: 'didSelectContentTypeFieldType';\n  properties: {\n    type?: string;\n  };\n}\n\ninterface DidChangeModeEvent {\n  name: 'didChangeMode';\n  properties: {\n    newMode: string;\n  };\n}\ninterface DidSubmitWithErrorsFirstAdminEvent {\n  name: 'didSubmitWithErrorsFirstAdmin';\n  properties: {\n    count: string;\n  };\n}\n\ninterface WillNavigateEvent {\n  name: 'willNavigate';\n  properties: {\n    from: string;\n    to: string;\n  };\n}\n\ninterface DidAccessTokenListEvent {\n  name: 'didAccessTokenList';\n  properties: {\n    tokenType: TokenEvents['properties']['tokenType'];\n    number: number;\n  };\n}\ninterface LogoEvent {\n  name: 'didChangeLogo' | 'didClickResetLogo';\n  properties: {\n    logo: 'menu' | 'auth';\n  };\n}\n\ninterface TokenEvents {\n  name:\n    | 'didCopyTokenKey'\n    | 'didAddTokenFromList'\n    | 'didEditTokenFromList'\n    | 'willAccessTokenList'\n    | 'willAddTokenFromList'\n    | 'willCreateToken'\n    | 'willDeleteToken'\n    | 'willEditToken'\n    | 'willEditTokenFromList';\n  properties: {\n    tokenType: 'api-token' | 'transfer-token';\n  };\n}\n\ninterface WillModifyTokenEvent {\n  name: 'didCreateToken' | 'didEditToken';\n  properties: {\n    tokenType: TokenEvents['properties']['tokenType'];\n    type: 'custom' | 'full-access' | 'read-only' | Array<'push' | 'pull' | 'push-pull'>;\n  };\n}\n\ninterface DeleteEntryEvents {\n  name: 'willDeleteEntry' | 'didDeleteEntry' | 'didNotDeleteEntry';\n  properties: {\n    status?: string;\n    error?: unknown;\n  };\n}\n\ninterface CreateEntryEvents {\n  name: 'willCreateEntry' | 'didCreateEntry' | 'didNotCreateEntry';\n  properties: {\n    status?: string;\n    error?: unknown;\n  };\n}\n\ninterface UpdateEntryEvents {\n  name: 'willEditEntry' | 'didEditEntry' | 'didNotEditEntry';\n  properties: {\n    status?: string;\n    error?: unknown;\n  };\n}\n\ninterface DidFilterEntriesEvent {\n  name: 'didFilterEntries';\n  properties: {\n    useRelation: boolean;\n  };\n}\n\ninterface DidPublishRelease {\n  name: 'didPublishRelease';\n  properties: {\n    totalEntries: number;\n    totalPublishedEntries: number;\n    totalUnpublishedEntries: number;\n  };\n}\n\ntype EventsWithProperties =\n  | CreateEntryEvents\n  | DidAccessTokenListEvent\n  | DidChangeModeEvent\n  | DidCropFileEvent\n  | DeleteEntryEvents\n  | DidEditMediaLibraryElementsEvent\n  | DidFilterMediaLibraryElementsEvent\n  | DidFilterEntriesEvent\n  | DidSelectContentTypeFieldTypeEvent\n  | DidSelectFile\n  | DidSortMediaLibraryElementsEvent\n  | DidSubmitWithErrorsFirstAdminEvent\n  | LogoEvent\n  | TokenEvents\n  | UpdateEntryEvents\n  | WillModifyTokenEvent\n  | WillNavigateEvent\n  | DidPublishRelease;\n\nexport type TrackingEvent = EventWithoutProperties | EventsWithProperties;\nexport interface UseTrackingReturn {\n  /**\n   * This type helps show all the available event names before you start typing,\n   * however autocomplete isn't great.\n   */\n  trackUsage<TEvent extends TrackingEvent>(\n    event: TEvent['name'],\n    properties: TEvent['properties']\n  ): Promise<null | AxiosResponse<string>>;\n  trackUsage<TEvent extends Extract<TrackingEvent, { properties?: never }>>(\n    event: TEvent['name'],\n    properties?: never\n  ): Promise<null | AxiosResponse<string>>;\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  trackUsage<TEvent extends Extract<TrackingEvent, { properties: object }>>(\n    event: TEvent['name'],\n    properties: TEvent['properties']\n  ): Promise<null | AxiosResponse<string>>;\n}\n\n/**\n * @description Used to send amplitude events to the Strapi Tracking hub.\n *\n * @example\n * ```tsx\n * import { useTracking } from '@strapi/helper-plugin';\n *\n * const MyComponent = () => {\n *  const { trackUsage } = useTracking();\n *\n *  const handleClick = () => {\n *   trackUsage('my-event', { myProperty: 'myValue' });\n *  }\n *\n *  return <button onClick={handleClick}>Send Event</button>\n * }\n * ```\n */\nconst useTracking = (): UseTrackingReturn => {\n  const { uuid, telemetryProperties, deviceId } = React.useContext(TrackingContext);\n  const appInfo = useAppInfo();\n  const userId = appInfo?.userId;\n  const trackUsage = React.useCallback(\n    async <TEvent extends TrackingEvent>(\n      event: TEvent['name'],\n      properties?: TEvent['properties']\n    ) => {\n      try {\n        if (uuid && !window.strapi.telemetryDisabled) {\n          const res = await axios.post<string>(\n            'https://analytics.strapi.io/api/v2/track',\n            {\n              event,\n              userId,\n              deviceId,\n              eventProperties: { ...properties },\n              userProperties: {},\n              groupProperties: {\n                ...telemetryProperties,\n                projectId: uuid,\n                projectType: window.strapi.projectType,\n              },\n            },\n            {\n              headers: {\n                'Content-Type': 'application/json',\n                'X-Strapi-Event': event,\n              },\n            }\n          );\n\n          return res;\n        }\n      } catch (err) {\n        // Silence is golden\n      }\n\n      return null;\n    },\n    [deviceId, telemetryProperties, userId, uuid]\n  );\n\n  return { trackUsage };\n};\n\nexport { TrackingContext, TrackingProvider, useTracking };\n","import { useCallback, useMemo } from 'react';\n\nimport { parse, stringify } from 'qs';\nimport { useHistory, useLocation } from 'react-router-dom';\n\nconst useQueryParams = <TQuery extends object>(initialParams?: TQuery) => {\n  const { search } = useLocation();\n  const { push } = useHistory();\n\n  const query = useMemo(() => {\n    const searchQuery = search.substring(1);\n\n    if (!search && initialParams) {\n      return initialParams;\n    }\n\n    return parse(searchQuery) as TQuery;\n  }, [search, initialParams]);\n\n  const setQuery = useCallback(\n    (nextParams: TQuery, method: 'push' | 'remove' = 'push') => {\n      let nextQuery = { ...query };\n\n      if (method === 'remove') {\n        Object.keys(nextParams).forEach((key) => {\n          if (Object.prototype.hasOwnProperty.call(nextQuery, key)) {\n            // @ts-expect-error – this is fine, if you want to fix it, please do.\n            delete nextQuery[key];\n          }\n        });\n      } else {\n        nextQuery = { ...query, ...nextParams };\n      }\n\n      push({ search: stringify(nextQuery, { encode: false }) });\n    },\n    [push, query]\n  );\n\n  return [{ query, rawQuery: search }, setQuery] as const;\n};\n\nexport { useQueryParams };\n","import * as React from 'react';\n\nimport { CarretDown } from '@strapi/icons';\nimport styled from 'styled-components';\n\nexport interface SortIconProps extends React.SVGProps<SVGSVGElement> {\n  isUp?: boolean;\n}\n\nconst transientProps: Partial<Record<keyof SortIconProps, boolean>> = {\n  isUp: true,\n};\n\nconst SortIcon = styled(CarretDown).withConfig<SortIconProps>({\n  shouldForwardProp: (prop, defPropValFN) => !transientProps[prop] && defPropValFN(prop),\n})`\n  transform: ${({ isUp = false }) => `rotate(${isUp ? '180' : '0'}deg)`};\n`;\n\nexport { SortIcon };\n","import {\n  EmptyStateLayout as Layout,\n  EmptyStateLayoutProps as LayoutProps,\n} from '@strapi/design-system';\nimport { EmptyDocuments, EmptyPermissions, EmptyPictures } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\n\nimport type { TranslationMessage } from '../types';\n\nconst icons = {\n  document: EmptyDocuments,\n  media: EmptyPictures,\n  permissions: EmptyPermissions,\n};\n\nexport interface EmptyStateLayoutProps\n  extends Pick<LayoutProps, 'action' | 'hasRadius' | 'shadow'> {\n  icon?: keyof typeof icons;\n  content?: TranslationMessage;\n}\n\nconst EmptyStateLayout = ({\n  action,\n  content = {\n    id: 'app.components.EmptyStateLayout.content-document',\n    defaultMessage: 'No content found',\n  },\n  hasRadius = true,\n  icon = 'document',\n  shadow = 'tableShadow',\n}: EmptyStateLayoutProps) => {\n  const Icon = icons[icon];\n  const { formatMessage } = useIntl();\n\n  return (\n    <Layout\n      action={action}\n      content={formatMessage(\n        { id: content.id, defaultMessage: content.defaultMessage },\n        content.values\n      )}\n      hasRadius={hasRadius}\n      icon={<Icon width=\"10rem\" />}\n      shadow={shadow}\n    />\n  );\n};\n\nexport { EmptyStateLayout };\n","import { Box, Flex, Loader, Tbody, Td, Tr, RawTdProps } from '@strapi/design-system';\n\nimport { EmptyStateLayout, EmptyStateLayoutProps } from './EmptyStateLayout';\n\nexport interface EmptyBodyTableProps\n  extends Omit<EmptyStateLayoutProps, 'hasRadius' | 'shadow'>,\n    Pick<RawTdProps, 'colSpan'> {\n  isLoading?: boolean;\n}\n\nconst EmptyBodyTable = ({ colSpan, isLoading = false, ...rest }: EmptyBodyTableProps) => {\n  if (isLoading) {\n    return (\n      <Tbody>\n        <Tr>\n          <Td colSpan={colSpan}>\n            <Flex justifyContent=\"center\">\n              <Box padding={11} background=\"neutral0\">\n                <Loader>Loading content...</Loader>\n              </Box>\n            </Flex>\n          </Td>\n        </Tr>\n      </Tbody>\n    );\n  }\n\n  return (\n    <Tbody>\n      <Tr>\n        <Td colSpan={colSpan}>\n          <EmptyStateLayout {...rest} hasRadius={false} />\n        </Td>\n      </Tr>\n    </Tbody>\n  );\n};\n\nexport { EmptyBodyTable };\n","import * as React from 'react';\n\nimport {\n  Button,\n  Flex,\n  Table as TableCompo,\n  Typography,\n  BaseCheckbox,\n  BaseCheckboxProps,\n  IconButton,\n  Th,\n  Thead,\n  Tooltip,\n  Tr,\n  VisuallyHidden,\n  TableProps as DSTableProps,\n} from '@strapi/design-system';\nimport { Trash } from '@strapi/icons';\nimport { Entity } from '@strapi/types';\nimport { useIntl } from 'react-intl';\n\nimport { useTracking } from '../features/Tracking';\nimport { useQueryParams } from '../hooks/useQueryParams';\nimport { SortIcon } from '../icons/SortIcon';\n\nimport { ConfirmDialog } from './ConfirmDialog';\nimport { EmptyBodyTable, EmptyBodyTableProps } from './EmptyBodyTable';\n\ninterface TableProps<\n  TRows extends { id: Entity.ID } = { id: Entity.ID },\n  THeader extends TableHeader = TableHeader\n> extends Pick<EmptyBodyTableProps, 'action'>,\n    Pick<DSTableProps, 'footer'> {\n  children?: React.ReactNode;\n  contentType: string;\n  components?: {\n    ConfirmDialogDeleteAll?: React.ElementType;\n    ConfirmDialogDelete?: React.ElementType;\n  };\n  headers?: TableHeadProps<THeader>['headers'];\n  isLoading?: boolean;\n  onConfirmDeleteAll?: (ids: Array<TRows['id']>) => Promise<void>;\n  onConfirmDelete?: (id: TRows['id']) => Promise<void>;\n  rows?: Array<TRows>;\n  withBulkActions?: boolean;\n  withMainAction?: boolean;\n  renderBulkActionsBar?: (props: {\n    selectedEntries: Array<string | number>;\n    clearSelectedEntries: () => void;\n  }) => React.ReactNode;\n}\n\ninterface TableRowProps<\n  TRows extends { id: Entity.ID } = { id: Entity.ID },\n  THeader extends TableHeader = TableHeader\n> extends Pick<\n      TableProps<TRows, THeader>,\n      'withBulkActions' | 'withMainAction' | 'rows' | 'headers'\n    >,\n    Pick<TableHeadProps<THeader>, 'entriesToDelete'> {\n  onClickDelete: (id: TRows['id']) => void;\n  onSelectRow: (row: { name: TRows['id']; value: boolean }) => void;\n}\n\n/**\n * @deprecated\n * This component will be replaced by packages/core/helper-plugin/src/components/Table\n * in the next major release.\n */\nconst Table = ({\n  action,\n  children,\n  contentType,\n  components,\n  footer,\n  headers = [],\n  isLoading = false,\n  onConfirmDeleteAll,\n  onConfirmDelete,\n  rows = [],\n  withBulkActions = false,\n  withMainAction = false,\n  renderBulkActionsBar,\n  ...rest\n}: TableProps) => {\n  const [selectedEntries, setSelectedEntries] = React.useState<Array<number | string>>([]);\n  const [showConfirmDeleteAll, setShowConfirmDeleteAll] = React.useState(false);\n  const [showConfirmDelete, setShowConfirmDelete] = React.useState(false);\n  const [isConfirmButtonLoading, setIsConfirmButtonLoading] = React.useState(false);\n  const [{ query }] = useQueryParams<{ filters: string[] }>();\n  const { formatMessage } = useIntl();\n  const { trackUsage } = useTracking();\n  const ROW_COUNT = rows.length + 1;\n  const COL_COUNT = headers.length + (withBulkActions ? 1 : 0) + (withMainAction ? 1 : 0);\n  const hasFilters = query?.filters !== undefined;\n  const areAllEntriesSelected = selectedEntries.length === rows.length && rows.length > 0;\n\n  const content = hasFilters\n    ? {\n        id: 'content-manager.components.TableEmpty.withFilters',\n        defaultMessage: 'There are no {contentType} with the applied filters...',\n        values: { contentType },\n      }\n    : undefined;\n\n  const handleConfirmDeleteAll = async () => {\n    try {\n      setIsConfirmButtonLoading(true);\n      await onConfirmDeleteAll?.(selectedEntries);\n      handleToggleConfirmDeleteAll();\n      setSelectedEntries([]);\n      setIsConfirmButtonLoading(false);\n    } catch (err) {\n      setIsConfirmButtonLoading(false);\n      handleToggleConfirmDeleteAll();\n    }\n  };\n\n  const handleConfirmDelete = async () => {\n    try {\n      setIsConfirmButtonLoading(true);\n      // await onConfirmDeleteAll(entriesToDelete);\n      await onConfirmDelete?.(selectedEntries[0]);\n      handleToggleConfirmDelete();\n      setIsConfirmButtonLoading(false);\n    } catch (err) {\n      setIsConfirmButtonLoading(false);\n      handleToggleConfirmDelete();\n    }\n  };\n\n  const handleSelectAll = () => {\n    if (!areAllEntriesSelected) {\n      setSelectedEntries(rows.map((row) => row.id));\n    } else {\n      setSelectedEntries([]);\n    }\n  };\n\n  const handleToggleConfirmDeleteAll = () => {\n    if (!showConfirmDeleteAll) {\n      trackUsage('willBulkDeleteEntries');\n    }\n\n    setShowConfirmDeleteAll((prev) => !prev);\n  };\n\n  const handleToggleConfirmDelete = () => {\n    if (showConfirmDelete) {\n      setSelectedEntries([]);\n    }\n    setShowConfirmDelete((prev) => !prev);\n  };\n\n  const handleClickDelete: TableRowProps['onClickDelete'] = (id) => {\n    setSelectedEntries([id]);\n\n    handleToggleConfirmDelete();\n  };\n\n  const handleSelectRow: TableRowProps['onSelectRow'] = ({ name, value }) => {\n    setSelectedEntries((prev) => {\n      if (value) {\n        return prev.concat(name);\n      }\n\n      return prev.filter((id) => id !== name);\n    });\n  };\n\n  const clearSelectedEntries = () => {\n    setSelectedEntries([]);\n  };\n\n  const ConfirmDeleteAllComponent = components?.ConfirmDialogDeleteAll\n    ? components.ConfirmDialogDeleteAll\n    : ConfirmDialog;\n\n  const ConfirmDeleteComponent = components?.ConfirmDialogDelete\n    ? components.ConfirmDialogDelete\n    : ConfirmDialog;\n\n  return (\n    <>\n      {selectedEntries.length > 0 && (\n        <Flex gap={3}>\n          <Typography variant=\"omega\" textColor=\"neutral500\">\n            {formatMessage(\n              {\n                id: 'content-manager.components.TableDelete.label',\n                defaultMessage: '{number, plural, one {# entry} other {# entries}} selected',\n              },\n              { number: selectedEntries.length }\n            )}\n          </Typography>\n          {renderBulkActionsBar ? (\n            renderBulkActionsBar({ selectedEntries, clearSelectedEntries })\n          ) : (\n            <Button\n              onClick={handleToggleConfirmDeleteAll}\n              startIcon={<Trash />}\n              size=\"L\"\n              variant=\"danger-light\"\n            >\n              {formatMessage({ id: 'global.delete', defaultMessage: 'Delete' })}\n            </Button>\n          )}\n        </Flex>\n      )}\n      <TableCompo colCount={COL_COUNT} rowCount={ROW_COUNT} footer={footer}>\n        <TableHead\n          areAllEntriesSelected={areAllEntriesSelected}\n          entriesToDelete={selectedEntries}\n          headers={headers}\n          onSelectAll={handleSelectAll}\n          withMainAction={withMainAction}\n          withBulkActions={withBulkActions}\n        />\n        {!rows.length || isLoading ? (\n          <EmptyBodyTable\n            colSpan={COL_COUNT}\n            content={content}\n            isLoading={isLoading}\n            action={action}\n          />\n        ) : (\n          React.Children.toArray(children).map((child) =>\n            React.cloneElement(child as React.ReactElement, {\n              entriesToDelete: selectedEntries,\n              onClickDelete: handleClickDelete,\n              onSelectRow: handleSelectRow,\n              headers,\n              rows,\n              withBulkActions,\n              withMainAction,\n              ...rest,\n            })\n          )\n        )}\n      </TableCompo>\n      <ConfirmDeleteAllComponent\n        isConfirmButtonLoading={isConfirmButtonLoading}\n        onConfirm={handleConfirmDeleteAll}\n        onToggleDialog={handleToggleConfirmDeleteAll}\n        isOpen={showConfirmDeleteAll}\n      />\n      <ConfirmDeleteComponent\n        isConfirmButtonLoading={isConfirmButtonLoading}\n        onConfirm={handleConfirmDelete}\n        onToggleDialog={handleToggleConfirmDelete}\n        isOpen={showConfirmDelete}\n      />\n    </>\n  );\n};\n\ninterface TableHeader {\n  fieldSchema?: {\n    type: string;\n  };\n  name: string;\n  metadatas: {\n    sortable: boolean;\n    label: string;\n    mainField?: {\n      name: string;\n    };\n  };\n}\n\ninterface TableHeadProps<THeader extends TableHeader = TableHeader> {\n  areAllEntriesSelected?: boolean;\n  entriesToDelete?: Array<string | number>;\n  headers?: Array<THeader>;\n  onSelectAll: BaseCheckboxProps['onChange'];\n  withMainAction?: boolean;\n  withBulkActions?: boolean;\n}\n\nconst TableHead = ({\n  areAllEntriesSelected = false,\n  entriesToDelete = [],\n  headers = [],\n  onSelectAll,\n  withMainAction,\n  withBulkActions,\n}: TableHeadProps) => {\n  const { formatMessage } = useIntl();\n  const [{ query }, setQuery] = useQueryParams<{ sort?: string }>();\n  const sort = query?.sort ?? '';\n  const [sortBy, sortOrder] = sort.split(':');\n  const isIndeterminate = !areAllEntriesSelected && entriesToDelete.length > 0;\n\n  return (\n    <Thead>\n      <Tr>\n        {withMainAction && (\n          <Th>\n            <BaseCheckbox\n              aria-label={formatMessage({\n                id: 'global.select-all-entries',\n                defaultMessage: 'Select all entries',\n              })}\n              checked={areAllEntriesSelected}\n              indeterminate={isIndeterminate}\n              onChange={onSelectAll}\n            />\n          </Th>\n        )}\n        {headers.map(\n          ({ fieldSchema, name, metadatas: { sortable: isSortable, label, mainField } }) => {\n            let isSorted = sortBy === name;\n            const isUp = sortOrder === 'ASC';\n\n            // relations always have to be sorted by their main field instead of only the\n            // attribute name; sortBy e.g. looks like: &sortBy=attributeName[mainField]:ASC\n            if (fieldSchema?.type === 'relation' && mainField) {\n              isSorted = sortBy === `${name.split('.')[0]}[${mainField.name}]`;\n            }\n\n            const sortLabel = formatMessage(\n              { id: 'components.TableHeader.sort', defaultMessage: 'Sort on {label}' },\n              { label }\n            );\n\n            const handleClickSort = (shouldAllowClick = true) => {\n              if (isSortable && shouldAllowClick) {\n                let nextSort = name;\n\n                // relations always have to be sorted by their main field instead of only the\n                // attribute name; nextSort e.g. looks like: &nextSort=attributeName[mainField]:ASC\n                if (fieldSchema?.type === 'relation' && mainField) {\n                  nextSort = `${name.split('.')[0]}[${mainField.name}]`;\n                }\n\n                setQuery({\n                  sort: `${nextSort}:${isSorted && sortOrder === 'ASC' ? 'DESC' : 'ASC'}`,\n                });\n              }\n            };\n\n            return (\n              <Th\n                key={name}\n                action={\n                  isSorted && (\n                    <IconButton\n                      label={sortLabel}\n                      onClick={() => handleClickSort()}\n                      icon={isSorted && <SortIcon isUp={isUp} />}\n                      noBorder\n                    />\n                  )\n                }\n              >\n                <Tooltip label={isSortable ? sortLabel : label}>\n                  <Typography\n                    as={!isSorted && isSortable ? 'button' : 'span'}\n                    textColor=\"neutral600\"\n                    onClick={() => handleClickSort(!isSorted)}\n                    variant=\"sigma\"\n                  >\n                    {label}\n                  </Typography>\n                </Tooltip>\n              </Th>\n            );\n          }\n        )}\n\n        {withBulkActions && (\n          <Th>\n            <VisuallyHidden>\n              {formatMessage({\n                id: 'global.actions',\n                defaultMessage: 'Actions',\n              })}\n            </VisuallyHidden>\n          </Th>\n        )}\n      </Tr>\n    </Thead>\n  );\n};\n\nexport { Table as DynamicTable };\nexport type { TableProps, TableRowProps, TableHeader, TableHeadProps };\n","import * as React from 'react';\n\nimport {\n  Box,\n  Flex,\n  Button,\n  Typography,\n  Th,\n  Tbody,\n  Td,\n  Tooltip,\n  IconButton,\n  Thead,\n  Tr,\n  BaseCheckbox,\n  VisuallyHidden,\n  Loader,\n  Table as DSTable,\n  TableProps as DSTableProps,\n} from '@strapi/design-system';\nimport { Trash } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\n\nimport { useQueryParams } from '../hooks/useQueryParams';\nimport { SortIcon } from '../icons/SortIcon';\n\nimport { ConfirmDialog } from './ConfirmDialog';\nimport { EmptyStateLayout, EmptyStateLayoutProps } from './EmptyStateLayout';\n\nimport type { Attribute, Entity } from '@strapi/types';\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\ninterface TableContextValue<TRow extends { id: Entity.ID } = { id: Entity.ID }> {\n  selectedEntries: Entity.ID[];\n  setSelectedEntries: React.Dispatch<React.SetStateAction<Entity.ID[]>>;\n  onSelectRow: (args: { name: Entity.ID; value: boolean }) => void;\n  rows: TRow[];\n  isLoading: boolean;\n  isFetching: boolean;\n  colCount: number;\n  rowCount: number;\n}\n\nconst TableContext = React.createContext<TableContextValue | null>(null);\n\nconst useTableContext = <TRow extends { id: Entity.ID }>() => {\n  const context = React.useContext(TableContext);\n\n  if (!context) {\n    throw new Error('useTableContext must be used within a TableProvider');\n  }\n\n  return context as TableContextValue<TRow>;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ActionBar\n * -----------------------------------------------------------------------------------------------*/\n\ninterface ActionBarProps {\n  children: React.ReactNode;\n}\n\nconst ActionBar = ({ children }: ActionBarProps) => {\n  const { formatMessage } = useIntl();\n  const { selectedEntries } = useTableContext();\n\n  if (selectedEntries.length === 0) return null;\n\n  return (\n    <Flex gap={2}>\n      <Typography variant=\"omega\" textColor=\"neutral500\">\n        {formatMessage(\n          {\n            id: 'content-manager.components.TableDelete.label',\n            defaultMessage: '{number, plural, one {# entry} other {# entries}} selected',\n          },\n          { number: selectedEntries.length }\n        )}\n      </Typography>\n      {children}\n    </Flex>\n  );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * BulkDeleteButton\n * -----------------------------------------------------------------------------------------------*/\n\ninterface BulkDeleteButtonProps {\n  onConfirmDeleteAll: (ids: Entity.ID[]) => Promise<void>;\n}\n\nconst BulkDeleteButton = ({ onConfirmDeleteAll }: BulkDeleteButtonProps) => {\n  const { selectedEntries, setSelectedEntries } = useTableContext();\n  const { formatMessage } = useIntl();\n  const [showConfirmDeleteAll, setShowConfirmDeleteAll] = React.useState(false);\n  const [isConfirmButtonLoading, setIsConfirmButtonLoading] = React.useState(false);\n\n  const handleConfirmDeleteAll = async () => {\n    try {\n      setIsConfirmButtonLoading(true);\n      await onConfirmDeleteAll(selectedEntries);\n      setIsConfirmButtonLoading(false);\n      handleToggleConfirmDeleteAll();\n      setSelectedEntries([]);\n    } catch (err) {\n      setIsConfirmButtonLoading(false);\n      handleToggleConfirmDeleteAll();\n    }\n  };\n\n  const handleToggleConfirmDeleteAll = () => {\n    setShowConfirmDeleteAll((prev) => !prev);\n  };\n\n  return (\n    <>\n      <Button\n        onClick={handleToggleConfirmDeleteAll}\n        startIcon={<Trash />}\n        size=\"L\"\n        variant=\"danger-light\"\n      >\n        {formatMessage({ id: 'global.delete', defaultMessage: 'Delete' })}\n      </Button>\n      <ConfirmDialog\n        isConfirmButtonLoading={isConfirmButtonLoading}\n        onConfirm={handleConfirmDeleteAll}\n        onToggleDialog={handleToggleConfirmDeleteAll}\n        isOpen={showConfirmDeleteAll}\n      />\n    </>\n  );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Head\n * -----------------------------------------------------------------------------------------------*/\n\ninterface HeadProps {\n  children: React.ReactNode;\n}\n\nconst Head = ({ children }: HeadProps) => {\n  return (\n    <Thead>\n      <Tr>{children}</Tr>\n    </Thead>\n  );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * HeaderCheckboxCell\n * -----------------------------------------------------------------------------------------------*/\n\nconst HeaderCheckboxCell = () => {\n  const { selectedEntries, setSelectedEntries, rows } = useTableContext();\n\n  const { formatMessage } = useIntl();\n\n  const areAllEntriesSelected = selectedEntries.length === rows.length && rows.length > 0;\n  const isIndeterminate = !areAllEntriesSelected && selectedEntries.length > 0;\n\n  const handleSelectAll = () => {\n    if (!areAllEntriesSelected) {\n      setSelectedEntries(rows.map((row) => row.id));\n    } else {\n      setSelectedEntries([]);\n    }\n  };\n\n  if (rows.length === 0) {\n    return null;\n  }\n\n  return (\n    <Th>\n      <BaseCheckbox\n        aria-label={formatMessage({\n          id: 'global.select-all-entries',\n          defaultMessage: 'Select all entries',\n        })}\n        checked={areAllEntriesSelected}\n        indeterminate={isIndeterminate}\n        onChange={handleSelectAll}\n      />\n    </Th>\n  );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * HeaderHiddenActionsCell\n * -----------------------------------------------------------------------------------------------*/\n\nconst HeaderHiddenActionsCell = () => {\n  const { formatMessage } = useIntl();\n\n  return (\n    <Th>\n      <VisuallyHidden>\n        {formatMessage({\n          id: 'global.actions',\n          defaultMessage: 'Actions',\n        })}\n      </VisuallyHidden>\n    </Th>\n  );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * HeaderCell\n * -----------------------------------------------------------------------------------------------*/\n\ninterface HeaderCellProps {\n  fieldSchemaType: Attribute.Kind | 'custom';\n  name: string;\n  relationFieldName?: string;\n  isSortable?: boolean;\n  label: string;\n}\n\nconst HeaderCell = ({\n  fieldSchemaType,\n  name,\n  relationFieldName,\n  isSortable,\n  label,\n}: HeaderCellProps) => {\n  const [{ query }, setQuery] = useQueryParams<{ sort: `${string}:${'ASC' | 'DESC'}` }>();\n  const sort = typeof query?.sort === 'string' ? query.sort : '';\n  const [sortBy, sortOrder] = sort.split(':');\n  const { formatMessage } = useIntl();\n\n  let isSorted = sortBy === name;\n  const isUp = sortOrder === 'ASC';\n\n  // relations always have to be sorted by their main field instead of only the\n  // attribute name; sortBy e.g. looks like: &sortBy=attributeName[mainField]:ASC\n  if (fieldSchemaType === 'relation' && relationFieldName) {\n    isSorted = sortBy === `${name.split('.')[0]}[${relationFieldName}]`;\n  }\n\n  const sortLabel = formatMessage(\n    { id: 'components.TableHeader.sort', defaultMessage: 'Sort on {label}' },\n    { label }\n  );\n\n  const handleClickSort = (shouldAllowClick = true) => {\n    if (isSortable && shouldAllowClick) {\n      let nextSort = name;\n\n      // relations always have to be sorted by their main field instead of only the\n      // attribute name; nextSort e.g. looks like: &nextSort=attributeName[mainField]:ASC\n      if (fieldSchemaType === 'relation' && relationFieldName) {\n        nextSort = `${name.split('.')[0]}[${relationFieldName}]`;\n      }\n\n      setQuery({\n        sort: `${nextSort}:${isSorted && sortOrder === 'ASC' ? 'DESC' : 'ASC'}`,\n      });\n    }\n  };\n\n  return (\n    <Th\n      key={name}\n      action={\n        isSorted &&\n        isSortable && (\n          <IconButton\n            label={sortLabel}\n            onClick={() => handleClickSort(true)}\n            icon={<SortIcon isUp={isUp} />}\n            noBorder\n          />\n        )\n      }\n    >\n      <Tooltip label={isSortable ? sortLabel : label}>\n        <Typography\n          textColor=\"neutral600\"\n          as={!isSorted && isSortable ? 'button' : 'span'}\n          onClick={() => handleClickSort()}\n          variant=\"sigma\"\n        >\n          {label}\n        </Typography>\n      </Tooltip>\n    </Th>\n  );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Root\n * -----------------------------------------------------------------------------------------------*/\n\ninterface RootProps\n  extends Partial<Pick<TableContextValue, 'colCount' | 'rows' | 'isLoading' | 'isFetching'>> {\n  children: React.ReactNode;\n  defaultSelectedEntries?: Entity.ID[];\n}\n\nconst Root = ({\n  children,\n  defaultSelectedEntries = [],\n  rows = [],\n  colCount = 0,\n  isLoading = false,\n  isFetching = false,\n}: RootProps) => {\n  const [selectedEntries, setSelectedEntries] = React.useState<Entity.ID[]>(defaultSelectedEntries);\n  const rowCount = rows.length + 1;\n\n  const onSelectRow = React.useCallback<TableContextValue['onSelectRow']>(({ name, value }) => {\n    setSelectedEntries((prev) => {\n      if (value) {\n        return prev.concat(name);\n      }\n\n      return prev.filter((id) => id !== name);\n    });\n  }, []);\n\n  const context = React.useMemo(() => {\n    return {\n      selectedEntries,\n      setSelectedEntries,\n      onSelectRow,\n      rows,\n      isLoading,\n      isFetching,\n      colCount,\n      rowCount,\n    };\n  }, [\n    onSelectRow,\n    selectedEntries,\n    setSelectedEntries,\n    rows,\n    isLoading,\n    isFetching,\n    colCount,\n    rowCount,\n  ]);\n\n  return <TableContext.Provider value={context}>{children}</TableContext.Provider>;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * EmptyBody\n * -----------------------------------------------------------------------------------------------*/\n\ninterface EmptyBodyProps extends EmptyStateLayoutProps {\n  contentType: string;\n}\n\nconst EmptyBody = ({ contentType, ...rest }: EmptyBodyProps) => {\n  const { rows, colCount, isLoading } = useTableContext();\n  const [{ query }] = useQueryParams<{ filters?: string[] }>();\n  const hasFilters = query?.filters !== undefined;\n  const content = hasFilters\n    ? {\n        id: 'content-manager.components.TableEmpty.withFilters',\n        defaultMessage: 'There are no {contentType} with the applied filters...',\n        values: { contentType },\n      }\n    : undefined;\n\n  if (rows?.length > 0 || isLoading) {\n    return null;\n  }\n\n  return (\n    <Tbody>\n      <Tr>\n        <Td colSpan={colCount}>\n          <EmptyStateLayout {...rest} content={content} hasRadius={false} shadow={undefined} />\n        </Td>\n      </Tr>\n    </Tbody>\n  );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * LoadingBody\n * -----------------------------------------------------------------------------------------------*/\n\nconst LoadingBody = () => {\n  const { isLoading, colCount } = useTableContext();\n\n  if (!isLoading) {\n    return null;\n  }\n\n  return (\n    <Tbody>\n      <Tr>\n        <Td colSpan={colCount}>\n          <Flex justifyContent=\"center\">\n            <Box padding={11} background=\"neutral0\">\n              <Loader>Loading content</Loader>\n            </Box>\n          </Flex>\n        </Td>\n      </Tr>\n    </Tbody>\n  );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Body\n * -----------------------------------------------------------------------------------------------*/\ninterface BodyProps {\n  children: React.ReactNode;\n}\n\nconst Body = ({ children }: BodyProps) => {\n  const { rows, isLoading } = useTableContext();\n\n  if (isLoading || rows.length === 0) {\n    return null;\n  }\n\n  return <Tbody>{children}</Tbody>;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Content\n * -----------------------------------------------------------------------------------------------*/\n\ninterface ContentProps extends Pick<DSTableProps, 'footer'> {\n  children: React.ReactNode;\n}\n\nconst Content = ({ children, footer }: ContentProps) => {\n  const { rowCount, colCount } = useTableContext();\n\n  return (\n    <DSTable rowCount={rowCount} colCount={colCount} footer={footer}>\n      {children}\n    </DSTable>\n  );\n};\n\nconst Table = {\n  Content,\n  Root,\n  Body,\n  ActionBar,\n  Head,\n  HeaderCell,\n  HeaderHiddenActionsCell,\n  HeaderCheckboxCell,\n  LoadingBody,\n  EmptyBody,\n  BulkDeleteButton,\n};\n\nexport { Table, useTableContext };\n","import * as React from 'react';\n\nimport { Box, Tag } from '@strapi/design-system';\nimport { Cross } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\n\nimport { useQueryParams } from '../hooks/useQueryParams';\n\nimport type { FilterData, Filter } from '../types';\nexport interface FilterListURLQueryProps {\n  filtersSchema: FilterData[];\n}\n\nexport const FilterListURLQuery = ({ filtersSchema = [] }: FilterListURLQueryProps) => {\n  const [{ query }, setQuery] = useQueryParams<{\n    filters: {\n      $and: Filter[];\n    };\n    page?: number;\n  }>();\n\n  const handleClick = (filter: Filter) => {\n    const nextFilters = (query?.filters?.$and || []).filter((prevFilter) => {\n      const name = Object.keys(filter)[0] as keyof Filter;\n      const filterType = Object.keys(filter[name])[0] as keyof Filter[typeof name];\n      const value = filter[name][filterType];\n\n      return prevFilter[name]?.[filterType] !== value;\n    });\n\n    setQuery({ filters: { $and: nextFilters }, page: 1 });\n  };\n\n  if (!query?.filters?.$and?.length) {\n    return null;\n  }\n\n  return (\n    <>\n      {query?.filters?.$and?.map((filter, i) => {\n        const attributeName = Object.keys(filter)[0] as keyof Filter;\n        const attribute = filtersSchema.find(({ name }) => name === attributeName);\n\n        if (!attribute) {\n          return null;\n        }\n\n        if (attribute.fieldSchema.type === 'relation') {\n          const relationTargetAttribute = attribute?.fieldSchema?.mainField\n            ?.name as keyof Filter[typeof attributeName];\n          const filterObj = filter[attributeName][relationTargetAttribute];\n\n          if (typeof filterObj === 'object' && filterObj !== null) {\n            const operator = Object.keys(filterObj)[0] as keyof typeof filterObj;\n            const value = filterObj[operator] ?? '';\n\n            return (\n              <AttributeTag\n                // eslint-disable-next-line react/no-array-index-key\n                key={`${attributeName}-${i}`}\n                attribute={attribute}\n                filter={filter}\n                onClick={handleClick}\n                operator={operator}\n                value={value}\n              />\n            );\n          }\n\n          return null;\n        } else {\n          const filterObj = filter[attributeName];\n          const operator = Object.keys(filterObj)[0] as keyof typeof filterObj;\n          const value = filterObj[operator];\n\n          if (typeof value === 'string' || value === null) {\n            return (\n              <AttributeTag\n                // eslint-disable-next-line react/no-array-index-key\n                key={`${attributeName}-${i}`}\n                attribute={attribute}\n                filter={filter}\n                onClick={handleClick}\n                operator={operator}\n                value={value ?? ''}\n              />\n            );\n          }\n\n          return null;\n        }\n      })}\n    </>\n  );\n};\n\ninterface AttributeTagProps {\n  attribute: FilterData;\n  filter: Filter;\n  onClick: (filter: Filter) => void;\n  operator: string;\n  value: string;\n}\n\nconst AttributeTag = ({ attribute, filter, onClick, operator, value }: AttributeTagProps) => {\n  const { formatMessage, formatDate, formatTime, formatNumber } = useIntl();\n\n  const handleClick = () => {\n    onClick(filter);\n  };\n\n  const { fieldSchema } = attribute;\n\n  const type = fieldSchema.type === 'relation' ? fieldSchema?.mainField?.type : fieldSchema.type;\n\n  let formattedValue = value;\n\n  switch (type) {\n    case 'date':\n      formattedValue = formatDate(value, { dateStyle: 'full' });\n      break;\n    case 'datetime':\n      formattedValue = formatDate(value, { dateStyle: 'full', timeStyle: 'short' });\n      break;\n    case 'time':\n      const [hour, minute] = value.split(':');\n      const date = new Date();\n      date.setHours(Number(hour));\n      date.setMinutes(Number(minute));\n\n      formattedValue = formatTime(date, {\n        hour: 'numeric',\n        minute: 'numeric',\n      });\n      break;\n    case 'float':\n    case 'integer':\n    case 'biginteger':\n    case 'decimal':\n      formattedValue = formatNumber(Number(value));\n      break;\n  }\n\n  // Handle custom input\n  if (attribute.metadatas.customInput) {\n    // If the custom input has an options array, find the option with a customValue matching the query value\n    if (attribute.metadatas.options) {\n      const selectedOption = attribute.metadatas.options.find((option) => {\n        return option.customValue === value;\n      });\n      // Expecting option as an object: {label: 'Neat label', customValue: 'some.value'}\n      // return the label or fallback to the query value\n      formattedValue = selectedOption?.label || value;\n    }\n  }\n\n  const content = `${attribute.metadatas.label || attribute.name} ${formatMessage({\n    id: `components.FilterOptions.FILTER_TYPES.${operator}`,\n    defaultMessage: operator,\n  })} ${operator !== '$null' && operator !== '$notNull' ? formattedValue : ''}`;\n\n  return (\n    <Box padding={1}>\n      <Tag onClick={handleClick} icon={<Cross />}>\n        {content}\n      </Tag>\n    </Box>\n  );\n};\n","import * as React from 'react';\n\nimport {\n  Box,\n  Button,\n  Flex,\n  Popover,\n  PopoverProps,\n  DatePicker,\n  DateTimePicker,\n  Field,\n  FieldInput,\n  NumberInput,\n  TimePicker,\n  SingleSelect,\n  SingleSelectOption,\n} from '@strapi/design-system';\nimport { Plus } from '@strapi/icons';\nimport formatISO from 'date-fns/formatISO';\nimport { useIntl } from 'react-intl';\nimport styled from 'styled-components';\n\nimport { useTracking } from '../features/Tracking';\nimport { useQueryParams } from '../hooks/useQueryParams';\n\nimport type { DefaultFilterInputsProps, Filter, FilterData, Operator } from '../types';\nimport type { EntityService } from '@strapi/types';\n\nexport interface FilterPopoverURLQueryProps extends Pick<PopoverProps, 'source'> {\n  displayedFilters: FilterData[];\n  isVisible: boolean;\n  onBlur?: () => void;\n  onToggle: () => void;\n}\n\nexport const FilterPopoverURLQuery = ({\n  displayedFilters,\n  isVisible,\n  onBlur,\n  onToggle,\n  source,\n}: FilterPopoverURLQueryProps) => {\n  const [{ query }, setQuery] = useQueryParams<{\n    filters: {\n      $and: Filter[];\n    };\n    page: number;\n  }>();\n  const { formatMessage } = useIntl();\n  const { trackUsage } = useTracking();\n  const defaultFieldSchema = { fieldSchema: { type: 'string' } };\n  const [modifiedData, setModifiedData] = React.useState<{\n    name: string;\n    filter: EntityService.Params.Filters.Operator.Where;\n    value: string | null;\n  }>({\n    name: displayedFilters[0]?.name || '',\n    filter: getFilterList((displayedFilters[0] || defaultFieldSchema).fieldSchema)[0].value,\n    value: '',\n  });\n\n  if (!isVisible) {\n    return null;\n  }\n\n  if (displayedFilters.length === 0) {\n    return null;\n  }\n\n  const handleChangeFilterField = (value: string) => {\n    const nextField = displayedFilters.find((f) => f.name === value);\n\n    if (!nextField) return;\n\n    const {\n      fieldSchema: { type, options },\n    } = nextField;\n    let filterValue = '';\n\n    if (type === 'boolean') {\n      filterValue = 'true';\n    }\n\n    if (type === 'enumeration' && Array.isArray(options)) {\n      filterValue = options[0];\n    }\n\n    const filter = getFilterList(nextField.fieldSchema)[0].value;\n\n    setModifiedData({ name: value, filter, value: filterValue });\n  };\n\n  const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {\n    e.preventDefault();\n\n    const hasFilter =\n      query?.filters?.$and.find((filter) => {\n        return (\n          filter[modifiedData.name] &&\n          filter[modifiedData.name]?.[modifiedData.filter] === modifiedData.value\n        );\n      }) !== undefined;\n\n    if (modifiedData.value && !hasFilter) {\n      const foundAttribute = displayedFilters.find(({ name }) => name === modifiedData.name);\n\n      if (foundAttribute) {\n        if (foundAttribute.trackedEvent) {\n          trackUsage(foundAttribute.trackedEvent.name, foundAttribute.trackedEvent.properties);\n        }\n\n        let filterToAdd: Filter;\n\n        if (\n          foundAttribute.fieldSchema.type === 'relation' &&\n          foundAttribute.fieldSchema.mainField\n        ) {\n          filterToAdd = {\n            [modifiedData.name]: {\n              [foundAttribute.fieldSchema.mainField.name]: {\n                [modifiedData.filter]: modifiedData.value,\n              },\n            },\n          } as Filter;\n        } else {\n          filterToAdd = {\n            [modifiedData.name]: { [modifiedData.filter]: modifiedData.value },\n          } as Filter;\n        }\n\n        const filters = [...(query?.filters?.$and || []), filterToAdd];\n\n        setQuery({ filters: { $and: filters }, page: 1 });\n      }\n    }\n    onToggle();\n  };\n\n  const handleChangeOperator = (operator: EntityService.Params.Filters.Operator.Where) => {\n    if (operator === '$null' || operator === '$notNull') {\n      setModifiedData((prev) => ({\n        ...prev,\n        value: 'true',\n        filter: operator,\n      }));\n\n      return;\n    }\n\n    setModifiedData((prev) => ({ ...prev, filter: operator, value: '' }));\n  };\n\n  const appliedFilter = displayedFilters.find((filter) => filter.name === modifiedData.name)!;\n  const operator = modifiedData.filter;\n  const filterList =\n    appliedFilter.metadatas.customOperators || getFilterList(appliedFilter.fieldSchema);\n  const Inputs = appliedFilter.metadatas.customInput || DefaultInputs;\n\n  return (\n    <Popover source={source} onDismiss={onToggle} padding={3} spacing={4} onBlur={onBlur}>\n      <form onSubmit={handleSubmit}>\n        <Flex direction=\"column\" alignItems=\"stretch\" gap={1} style={{ minWidth: 184 }}>\n          <SelectContainers direction=\"column\" alignItems=\"stretch\" gap={1}>\n            <SingleSelect\n              label={formatMessage({\n                id: 'app.utils.select-field',\n                defaultMessage: 'Select field',\n              })}\n              name=\"name\"\n              size=\"M\"\n              // @ts-expect-error from the DS V2 this won't be needed because we're only returning strings.\n              onChange={handleChangeFilterField}\n              value={modifiedData.name}\n            >\n              {displayedFilters.map((filter) => {\n                return (\n                  <SingleSelectOption key={filter.name} value={filter.name}>\n                    {filter.metadatas.label}\n                  </SingleSelectOption>\n                );\n              })}\n            </SingleSelect>\n            <SingleSelect\n              label={formatMessage({\n                id: 'app.utils.select-filter',\n                defaultMessage: 'Select filter',\n              })}\n              name=\"filter\"\n              size=\"M\"\n              value={modifiedData.filter}\n              onChange={(value) =>\n                // TODO: we should do an assertion function to ensure the value is a valid operator\n                handleChangeOperator(value as EntityService.Params.Filters.Operator.Where)\n              }\n            >\n              {filterList.map((option) => {\n                return (\n                  <SingleSelectOption key={option.value} value={option.value}>\n                    {formatMessage(option.intlLabel)}\n                  </SingleSelectOption>\n                );\n              })}\n            </SingleSelect>\n          </SelectContainers>\n          {operator !== '$null' && operator !== '$notNull' && (\n            <Box>\n              <Inputs\n                label={appliedFilter.metadatas.label}\n                type={appliedFilter.fieldSchema.type}\n                options={appliedFilter.fieldSchema.options ?? appliedFilter.metadatas.options}\n                value={modifiedData.value}\n                onChange={(value) => setModifiedData((prev) => ({ ...prev, value }))}\n              />\n            </Box>\n          )}\n          <Box>\n            <Button size=\"L\" variant=\"secondary\" startIcon={<Plus />} type=\"submit\" fullWidth>\n              {formatMessage({ id: 'app.utils.add-filter', defaultMessage: 'Add filter' })}\n            </Button>\n          </Box>\n        </Flex>\n      </form>\n    </Popover>\n  );\n};\n\nconst SelectContainers = styled(Flex)`\n  /* Hide the label, every input needs a label. */\n  label {\n    border: 0;\n    clip: rect(0 0 0 0);\n    height: 1px;\n    margin: -1px;\n    overflow: hidden;\n    padding: 0;\n    position: absolute;\n    width: 1px;\n  }\n`;\n\nconst DefaultInputs = ({\n  label = '',\n  onChange,\n  type,\n  value = '',\n  ...restProps\n}: DefaultFilterInputsProps) => {\n  const { formatMessage } = useIntl();\n\n  if (type === 'boolean') {\n    return (\n      <SingleSelect aria-label={label} onChange={(value) => onChange(String(value))} value={value}>\n        <SingleSelectOption value=\"true\">true</SingleSelectOption>\n        <SingleSelectOption value=\"false\">false</SingleSelectOption>\n      </SingleSelect>\n    );\n  }\n\n  if (type === 'date') {\n    return (\n      // @ts-expect-error – in V2 of the DS we won't pass label because this will become input only & a label breaks the design\n      <DatePicker\n        clearLabel={formatMessage({ id: 'clearLabel', defaultMessage: 'Clear' })}\n        ariaLabel={label}\n        name=\"datepicker\"\n        onChange={(date) => onChange(date ? formatISO(date, { representation: 'date' }) : null)}\n        onClear={() => onChange(null)}\n        selectedDate={value ? new Date(value) : undefined}\n      />\n    );\n  }\n\n  if (type === 'datetime') {\n    return (\n      // @ts-expect-error – in V2 of the DS we won't pass label because this will become input only & a label breaks the design\n      <DateTimePicker\n        clearLabel={formatMessage({ id: 'clearLabel', defaultMessage: 'Clear' })}\n        ariaLabel={label}\n        name=\"datetimepicker\"\n        // check if date is not null or undefined\n        onChange={(date) => onChange(date ? date.toISOString() : null)}\n        onClear={() => onChange(null)}\n        value={value ? new Date(value) : undefined}\n      />\n    );\n  }\n\n  if (type === 'enumeration') {\n    const options = (restProps.options as FilterData['fieldSchema']['options']) ?? [];\n    return (\n      // @ts-expect-error from the DS V2 this won't be needed because we're only returning strings.\n      <SingleSelect aria-label={label} onChange={onChange} value={value}>\n        {options.map((optionValue) => {\n          return (\n            <SingleSelectOption key={optionValue} value={optionValue}>\n              {optionValue}\n            </SingleSelectOption>\n          );\n        })}\n      </SingleSelect>\n    );\n  }\n\n  if (['float', 'integer', 'biginteger', 'decimal'].includes(type)) {\n    return (\n      <NumberInput\n        aria-label={label}\n        name=\"filter-value\"\n        onValueChange={(value) => onChange(value ? String(value) : null)}\n        // @ts-expect-error – we need to refactor this component so it's a discriminated union where the attribute type dictates the value type.\n        value={value || 0}\n      />\n    );\n  }\n\n  if (type === 'time') {\n    return (\n      // @ts-expect-error – in V2 of the DS we won't pass label because this will become input only & a label breaks the design\n      <TimePicker\n        aria-label={label}\n        onClear={() => onChange('')}\n        onChange={(value) => onChange(value ? value : null)}\n        value={value ?? undefined}\n        clearLabel=\"Clear the selected time picker value\"\n      />\n    );\n  }\n\n  return (\n    <Field>\n      <FieldInput\n        aria-label={formatMessage({ id: 'app.utils.filter-value', defaultMessage: 'Filter value' })}\n        onChange={({ target: { value } }) => onChange(value)}\n        value={value ?? undefined}\n        size=\"M\"\n      />\n    </Field>\n  );\n};\n\n/**\n * Depending on the selected field find the possible filters to apply\n */\nconst getFilterList = (filterSchema: FilterData['fieldSchema']): Operator[] => {\n  let type = filterSchema.type;\n\n  if (filterSchema.type === 'relation' && filterSchema?.mainField?.type) {\n    type = filterSchema.mainField.type;\n  }\n\n  switch (type) {\n    case 'email':\n    case 'text':\n    case 'enumeration':\n    case 'string': {\n      return [\n        {\n          intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$eq', defaultMessage: 'is' },\n          value: '$eq',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$eqi',\n            defaultMessage: 'is (case insensitive)',\n          },\n          value: '$eqi',\n        },\n        {\n          intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$ne', defaultMessage: 'is not' },\n          value: '$ne',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$nei',\n            defaultMessage: 'is not (case insensitive)',\n          },\n          value: '$nei',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$null',\n            defaultMessage: 'is null',\n          },\n          value: '$null',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$notNull',\n            defaultMessage: 'is not null',\n          },\n          value: '$notNull',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$contains',\n            defaultMessage: 'contains',\n          },\n          value: '$contains',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$containsi',\n            defaultMessage: 'contains (case insensitive)',\n          },\n          value: '$containsi',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$notContains',\n            defaultMessage: 'not contains',\n          },\n          value: '$notContains',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$notContainsi',\n            defaultMessage: 'not contains (case insensitive)',\n          },\n          value: '$notContainsi',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$startsWith',\n            defaultMessage: 'starts with',\n          },\n          value: '$startsWith',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$startsWithi',\n            defaultMessage: 'starts with (case insensitive)',\n          },\n          value: '$startsWithi',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$endsWith',\n            defaultMessage: 'ends with',\n          },\n          value: '$endsWith',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$endsWithi',\n            defaultMessage: 'ends with (case insensitive)',\n          },\n          value: '$endsWithi',\n        },\n      ];\n    }\n\n    case 'float':\n    case 'integer':\n    case 'biginteger':\n    case 'decimal': {\n      return [\n        {\n          intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$eq', defaultMessage: 'is' },\n          value: '$eq',\n        },\n        {\n          intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$ne', defaultMessage: 'is not' },\n          value: '$ne',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$null',\n            defaultMessage: 'is null',\n          },\n          value: '$null',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$notNull',\n            defaultMessage: 'is not null',\n          },\n          value: '$notNull',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$gt',\n            defaultMessage: 'is greater than',\n          },\n          value: '$gt',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$gte',\n            defaultMessage: 'is greater than or equal to',\n          },\n          value: '$gte',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$lt',\n            defaultMessage: 'is less than',\n          },\n          value: '$lt',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$lte',\n            defaultMessage: 'is less than or equal to',\n          },\n          value: '$lte',\n        },\n      ];\n    }\n    case 'time':\n    case 'date': {\n      return [\n        {\n          intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$eq', defaultMessage: 'is' },\n          value: '$eq',\n        },\n        {\n          intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$ne', defaultMessage: 'is not' },\n          value: '$ne',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$null',\n            defaultMessage: 'is null',\n          },\n          value: '$null',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$notNull',\n            defaultMessage: 'is not null',\n          },\n          value: '$notNull',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$contains',\n            defaultMessage: 'contains (sensitive)',\n          },\n          value: '$contains',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$notContains',\n            defaultMessage: 'not contains (sensitive)',\n          },\n          value: '$notContains',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$gt',\n            defaultMessage: 'is greater than',\n          },\n          value: '$gt',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$gte',\n            defaultMessage: 'is greater than or equal to',\n          },\n          value: '$gte',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$lt',\n            defaultMessage: 'is less than',\n          },\n          value: '$lt',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$lte',\n            defaultMessage: 'is less than or equal to',\n          },\n          value: '$lte',\n        },\n      ];\n    }\n\n    case 'datetime': {\n      return [\n        {\n          intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$eq', defaultMessage: 'is' },\n          value: '$eq',\n        },\n        {\n          intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$ne', defaultMessage: 'is not' },\n          value: '$ne',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$null',\n            defaultMessage: 'is null',\n          },\n          value: '$null',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$notNull',\n            defaultMessage: 'is not null',\n          },\n          value: '$notNull',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$gt',\n            defaultMessage: 'is greater than',\n          },\n          value: '$gt',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$gte',\n            defaultMessage: 'is greater than or equal to',\n          },\n          value: '$gte',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$lt',\n            defaultMessage: 'is less than',\n          },\n          value: '$lt',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$lte',\n            defaultMessage: 'is less than or equal to',\n          },\n          value: '$lte',\n        },\n      ];\n    }\n\n    default:\n      return [\n        {\n          intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$eq', defaultMessage: 'is' },\n          value: '$eq',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$eqi',\n            defaultMessage: 'is (case insensitive)',\n          },\n          value: '$eqi',\n        },\n        {\n          intlLabel: { id: 'components.FilterOptions.FILTER_TYPES.$ne', defaultMessage: 'is not' },\n          value: '$ne',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$null',\n            defaultMessage: 'is null',\n          },\n          value: '$null',\n        },\n        {\n          intlLabel: {\n            id: 'components.FilterOptions.FILTER_TYPES.$notNull',\n            defaultMessage: 'is not null',\n          },\n          value: '$notNull',\n        },\n      ];\n  }\n};\n","import * as React from 'react';\n\nimport { Form as FormikForm, FormikFormProps, useFormikContext } from 'formik';\n\nexport type FormProps = Omit<FormikFormProps, 'noValidate'>;\n\n/**\n * @deprecated Use Formik form directly instead.\n */\nconst Form = ({ ...props }: FormProps) => {\n  const formRef = React.useRef<HTMLFormElement>(null!);\n  const { isSubmitting, isValidating, errors, touched } = useFormikContext();\n\n  React.useEffect(() => {\n    if (isSubmitting && !isValidating) {\n      const errorsInForm = formRef.current.querySelectorAll('[data-strapi-field-error]');\n\n      if (errorsInForm && errorsInForm.length > 0) {\n        const firstError = errorsInForm[0];\n        const describingId = firstError.getAttribute('id');\n        const formElementInError = formRef.current.querySelector(\n          `[aria-describedby=\"${describingId}\"]`\n        );\n\n        if (formElementInError && formElementInError instanceof HTMLElement) {\n          formElementInError.focus();\n        }\n      }\n    }\n\n    if (!isSubmitting && !isValidating && Object.keys(errors).length) {\n      const el = document.getElementById('global-form-error');\n\n      if (el) {\n        el.focus();\n      }\n    }\n  }, [errors, isSubmitting, isValidating, touched]);\n\n  return <FormikForm ref={formRef} {...props} noValidate />;\n};\n\nexport { Form };\n","/* eslint-disable check-file/filename-naming-convention */ // this is disabled because the file name is correct however, we do use JSX in this file.\nimport { useIntl } from 'react-intl';\n\nimport type { MessageDescriptor, PrimitiveType } from 'react-intl';\n\nexport type FieldSchema = {\n  minLength?: number | string;\n  maxLength?: number | string;\n  max?: number | string;\n  min?: number | string;\n};\nexport interface UseFieldHintProps {\n  description?: MessageDescriptor & { values?: Record<string, PrimitiveType> };\n  fieldSchema?: FieldSchema;\n  type?: string;\n}\n\n/**\n * @description\n * A hook for generating the hint for a field\n */\nconst useFieldHint = ({ description, fieldSchema, type }: UseFieldHintProps) => {\n  const { formatMessage } = useIntl();\n\n  const buildDescription = () =>\n    description?.id\n      ? formatMessage(\n          { id: description.id, defaultMessage: description.defaultMessage },\n          { ...description.values }\n        )\n      : '';\n\n  const buildHint = () => {\n    const { maximum, minimum } = getMinMax(fieldSchema);\n    const units = getFieldUnits({\n      type,\n      minimum,\n      maximum,\n    });\n\n    const minIsNumber = typeof minimum === 'number';\n    const maxIsNumber = typeof maximum === 'number';\n    const hasMinAndMax = maxIsNumber && minIsNumber;\n    const hasMinOrMax = maxIsNumber || minIsNumber;\n\n    if (!description?.id && !hasMinOrMax) {\n      return '';\n    }\n\n    return formatMessage(\n      {\n        id: 'content-manager.form.Input.hint.text',\n        defaultMessage:\n          '{min, select, undefined {} other {min. {min}}}{divider}{max, select, undefined {} other {max. {max}}}{unit}{br}{description}',\n      },\n      {\n        min: minimum,\n        max: maximum,\n        description: buildDescription(),\n        unit: units?.message && hasMinOrMax ? formatMessage(units.message, units.values) : null,\n        divider: hasMinAndMax\n          ? formatMessage({\n              id: 'content-manager.form.Input.hint.minMaxDivider',\n              defaultMessage: ' / ',\n            })\n          : null,\n        br: hasMinOrMax ? <br /> : null,\n      }\n    );\n  };\n\n  return { hint: buildHint() };\n};\n\nconst getFieldUnits = ({\n  type,\n  minimum,\n  maximum,\n}: {\n  type?: string;\n  minimum?: number;\n  maximum?: number;\n}) => {\n  if (type && ['biginteger', 'integer', 'number'].includes(type)) {\n    return {};\n  }\n  const maxValue = Math.max(minimum || 0, maximum || 0);\n\n  return {\n    message: {\n      id: 'content-manager.form.Input.hint.character.unit',\n      defaultMessage: '{maxValue, plural, one { character} other { characters}}',\n    },\n    values: {\n      maxValue,\n    },\n  };\n};\n\nconst getMinMax = (fieldSchema?: FieldSchema) => {\n  if (!fieldSchema) {\n    return { maximum: undefined, minimum: undefined };\n  }\n\n  const { minLength, maxLength, max, min } = fieldSchema;\n\n  let minimum;\n  let maximum;\n\n  const parsedMin = Number(min);\n  const parsedMinLength = Number(minLength);\n\n  if (!Number.isNaN(parsedMin)) {\n    minimum = parsedMin;\n  } else if (!Number.isNaN(parsedMinLength)) {\n    minimum = parsedMinLength;\n  }\n\n  const parsedMax = Number(max);\n  const parsedMaxLength = Number(maxLength);\n\n  if (!Number.isNaN(parsedMax)) {\n    maximum = parsedMax;\n  } else if (!Number.isNaN(parsedMaxLength)) {\n    maximum = parsedMaxLength;\n  }\n\n  return { maximum, minimum };\n};\n\nexport { useFieldHint };\n","import { useMemo } from 'react';\n\nimport { useLocation } from 'react-router-dom';\n\nconst useQuery = () => {\n  const { search } = useLocation();\n\n  return useMemo(() => new URLSearchParams(search), [search]);\n};\n\nexport { useQuery };\n","import { MutableRefObject, useEffect, useState } from 'react';\n\nimport { useQuery } from './useQuery';\n\ntype InputFieldRefs = HTMLElement | { input: MutableRefObject<HTMLInputElement> } | null;\n\n/**\n * @description Given the name of an input field (this does not need to be the name you pass as a prop to the DOM element),\n * when the query param `field` matches the name the field will be focused & scrolled into the center of the view.\n * Uses a callback ref to set the field to ensure asynchronous rendering of inputs does not cause issues e.g. CodeMirror.EditView\n *\n * @example\n * ```tsx\n * const fieldRef = useFocusInputField('name');\n *\n * return (\n *  <input ref={fieldRef} />\n * );\n * ```\n */\nexport const useFocusInputField = (name: string): ((node: InputFieldRefs) => void) => {\n  const search = useQuery();\n\n  /**\n   * TODO: remove union and just use `HTMLElement`\n   *\n   * Realistically, it will only be an `HTMLElement` but `TextInput` in the design-system\n   * has an imperativeHandle we can't remove until v2 of the design-system.\n   */\n  const [field, setField] = useState<InputFieldRefs>(null);\n\n  useEffect(() => {\n    if (search.has('field') && search.get('field') === name && field) {\n      /**\n       * TODO: simplify this when we use v2 of the design-system\n       */\n      if ('input' in field) {\n        field.input.current.focus();\n        field.input.current.scrollIntoView({\n          block: 'center',\n        });\n      } else {\n        field.focus();\n        field.scrollIntoView({\n          block: 'center',\n        });\n      }\n    }\n  }, [search, name, field]);\n\n  return setField;\n};\n","const pxToRem = (px: number) => `${px / 16}rem`;\n\nexport { pxToRem };\n","/**\n * TODO: this entire component needs to be refactored to use Attribute as a passed base\n * to then understand the type and value types of what attribute we're rendering with\n * what input and make the types all play nicely. At least now we have an idea of what\n * everything is!\n */\n\nimport * as React from 'react';\n\nimport {\n  Checkbox,\n  DatePicker,\n  DateTimePicker,\n  Icon,\n  JSONInput,\n  NumberInput,\n  SingleSelect,\n  SingleSelectOption,\n  Textarea,\n  TextInput,\n  TimePicker,\n  ToggleInput,\n} from '@strapi/design-system';\nimport { Eye, EyeStriked } from '@strapi/icons';\nimport formatISO from 'date-fns/formatISO';\nimport isEqual from 'lodash/isEqual';\nimport { useIntl } from 'react-intl';\n\nimport { FieldSchema, useFieldHint } from '../hooks/useFieldHint';\nimport { useFocusInputField } from '../hooks/useFocusInputField';\nimport { pxToRem } from '../utils/pxToRem';\n\nimport type { TranslationMessage } from '../types';\nimport type { Attribute } from '@strapi/types';\n\ninterface InputOption {\n  metadatas: {\n    intlLabel: TranslationMessage;\n    disabled: boolean;\n    hidden: boolean;\n  };\n  key: string;\n  value: string;\n}\n\ninterface CustomInputProps<TAttribute extends Attribute.Any>\n  extends Omit<GenericInputProps<TAttribute>, 'customInputs'> {\n  ref?: React.Ref<HTMLElement>;\n  hint?: string | React.JSX.Element | (string | React.JSX.Element)[];\n}\n\nexport interface GenericInputProps<TAttribute extends Attribute.Any = Attribute.Any> {\n  attribute?: TAttribute;\n  autoComplete?: string;\n  customInputs?: Record<string, React.ComponentType<CustomInputProps<TAttribute>>>;\n  description?: TranslationMessage;\n  disabled?: boolean;\n  error?: string | TranslationMessage;\n  intlLabel: TranslationMessage;\n  labelAction?: React.ReactNode;\n  name: string;\n  onChange: (\n    payload: {\n      target: {\n        name: string;\n        value: Attribute.GetValue<TAttribute>;\n        type?: string;\n      };\n    },\n    shouldSetInitialValue?: boolean\n  ) => void;\n  options?: InputOption[];\n  placeholder?: TranslationMessage;\n  required?: boolean;\n  step?: number;\n  type: string;\n  // TODO: The value depends on the input type, too complicated to handle all cases here\n  value?: Attribute.GetValue<TAttribute>;\n  isNullable?: boolean;\n}\n\nconst GenericInput = ({\n  autoComplete,\n  customInputs,\n  description,\n  disabled,\n  intlLabel,\n  labelAction,\n  error,\n  name,\n  onChange,\n  options = [],\n  placeholder,\n  required,\n  step,\n  type,\n  value: defaultValue,\n  isNullable,\n  attribute,\n  ...rest\n}: GenericInputProps) => {\n  const { formatMessage } = useIntl();\n\n  // TODO: Workaround to get the field hint values if they exist on the type\n  const getFieldHintValue = (attribute?: Attribute.Any, key?: keyof FieldSchema) => {\n    if (!attribute) return;\n\n    if (key === 'minLength' && key in attribute) {\n      return attribute[key];\n    }\n\n    if (key === 'maxLength' && key in attribute) {\n      return attribute[key];\n    }\n\n    if (key === 'max' && key in attribute) {\n      return attribute[key];\n    }\n\n    if (key === 'min' && key in attribute) {\n      return attribute[key];\n    }\n  };\n\n  const { hint } = useFieldHint({\n    description,\n    fieldSchema: {\n      minLength: getFieldHintValue(attribute, 'minLength'),\n      maxLength: getFieldHintValue(attribute, 'maxLength'),\n      max: getFieldHintValue(attribute, 'max'),\n      min: getFieldHintValue(attribute, 'min'),\n    },\n    type: attribute?.type || type,\n  });\n\n  const [showPassword, setShowPassword] = React.useState(false);\n  const fieldRef = useFocusInputField(name);\n\n  const CustomInput = customInputs ? customInputs[type] : null;\n\n  // the API always returns null, which throws an error in React,\n  // therefore we cast this case to undefined\n  const value = defaultValue ?? undefined;\n\n  /*\n   TODO: ideally we should pass in `defaultValue` and `value` for\n   inputs, in order to make them controlled components. This variable\n   acts as a fallback for now, to prevent React errors in devopment mode\n\n   See: https://github.com/strapi/strapi/pull/12861\n  */\n  const valueWithEmptyStringFallback = value ?? '';\n\n  function getErrorMessage(error: string | TranslationMessage | undefined) {\n    if (!error) {\n      return null;\n    }\n\n    if (typeof error === 'string') {\n      return formatMessage({ id: error, defaultMessage: error });\n    }\n\n    const values = {\n      ...error.values,\n    };\n\n    return formatMessage(\n      {\n        id: error.id,\n        defaultMessage: error?.defaultMessage ?? error.id,\n      },\n      values\n    );\n  }\n\n  const errorMessage = getErrorMessage(error) ?? undefined;\n\n  if (CustomInput) {\n    return (\n      <CustomInput\n        {...rest}\n        ref={fieldRef}\n        attribute={attribute}\n        description={description}\n        hint={hint}\n        disabled={disabled}\n        intlLabel={intlLabel}\n        labelAction={labelAction}\n        error={errorMessage || ''}\n        name={name}\n        onChange={onChange}\n        options={options}\n        required={required}\n        placeholder={placeholder}\n        type={type}\n        value={value}\n      />\n    );\n  }\n\n  const label = intlLabel.id\n    ? formatMessage(\n        { id: intlLabel.id, defaultMessage: intlLabel.defaultMessage },\n        { ...intlLabel.values }\n      )\n    : name;\n\n  const formattedPlaceholder = placeholder\n    ? formatMessage(\n        { id: placeholder.id, defaultMessage: placeholder.defaultMessage },\n        { ...placeholder.values }\n      )\n    : '';\n\n  switch (type) {\n    case 'json': {\n      return (\n        <JSONInput\n          // @ts-expect-error JSONInput ref is weird but it does work\n          ref={fieldRef}\n          label={label}\n          labelAction={labelAction}\n          value={value}\n          error={errorMessage}\n          disabled={disabled}\n          hint={hint}\n          required={required}\n          onChange={(json) => {\n            // Default to null when the field is not required and there is no input value\n            const value =\n              attribute && 'required' in attribute && !attribute?.required && !json.length\n                ? null\n                : json;\n            onChange({ target: { name, value } }, false);\n          }}\n          minHeight={pxToRem(252)}\n          maxHeight={pxToRem(504)}\n        />\n      );\n    }\n    case 'bool': {\n      return (\n        <ToggleInput\n          ref={fieldRef}\n          checked={defaultValue === null ? null : defaultValue || false}\n          disabled={disabled}\n          hint={hint}\n          label={label}\n          error={errorMessage}\n          labelAction={labelAction}\n          name={name}\n          offLabel={formatMessage({\n            id: 'app.components.ToggleCheckbox.off-label',\n            defaultMessage: 'False',\n          })}\n          onLabel={formatMessage({\n            id: 'app.components.ToggleCheckbox.on-label',\n            defaultMessage: 'True',\n          })}\n          onChange={(e) => {\n            onChange({ target: { name, value: e.target.checked } });\n          }}\n          required={required}\n          onClear={() => {\n            onChange({ target: { name, value: null } });\n          }}\n          clearLabel={\n            isNullable\n              ? formatMessage({\n                  id: 'app.components.ToggleCheckbox.clear-label',\n                  defaultMessage: 'Clear',\n                })\n              : undefined\n          }\n        />\n      );\n    }\n    case 'checkbox': {\n      return (\n        <Checkbox\n          ref={fieldRef}\n          disabled={disabled}\n          error={errorMessage}\n          hint={hint}\n          id={name}\n          name={name}\n          onValueChange={(value) => {\n            onChange({ target: { name, value } });\n          }}\n          required={required}\n          value={Boolean(value)}\n        >\n          {label}\n        </Checkbox>\n      );\n    }\n    case 'datetime': {\n      return (\n        <DateTimePicker\n          ref={fieldRef}\n          clearLabel={formatMessage({ id: 'clearLabel', defaultMessage: 'Clear' })}\n          disabled={disabled}\n          error={errorMessage}\n          label={label}\n          labelAction={labelAction}\n          id={name}\n          hint={hint}\n          name={name}\n          onChange={(date) => {\n            // check if date is not null or undefined\n            const formattedDate = date ? date.toISOString() : null;\n\n            onChange({ target: { name, value: formattedDate, type } });\n          }}\n          onClear={() => onChange({ target: { name, value: null, type } })}\n          placeholder={formattedPlaceholder}\n          required={required}\n          value={value}\n        />\n      );\n    }\n    case 'date': {\n      return (\n        <DatePicker\n          ref={fieldRef}\n          clearLabel={formatMessage({ id: 'clearLabel', defaultMessage: 'Clear' })}\n          disabled={disabled}\n          error={errorMessage}\n          label={label}\n          id={name}\n          hint={hint}\n          name={name}\n          onChange={(date) => {\n            onChange({\n              target: {\n                name,\n                value: date ? formatISO(date, { representation: 'date' }) : null,\n                type,\n              },\n            });\n          }}\n          onClear={() => onChange({ target: { name, value: null, type } })}\n          placeholder={formattedPlaceholder}\n          required={required}\n          selectedDate={value}\n        />\n      );\n    }\n    case 'number': {\n      return (\n        <NumberInput\n          ref={fieldRef}\n          disabled={disabled}\n          error={errorMessage}\n          label={label}\n          labelAction={labelAction}\n          id={name}\n          hint={hint}\n          name={name}\n          onValueChange={(value) => {\n            onChange({ target: { name, value, type } });\n          }}\n          placeholder={formattedPlaceholder}\n          required={required}\n          step={step}\n          value={value}\n        />\n      );\n    }\n    case 'email': {\n      return (\n        <TextInput\n          ref={fieldRef}\n          autoComplete={autoComplete}\n          disabled={disabled}\n          error={errorMessage}\n          label={label}\n          labelAction={labelAction}\n          id={name}\n          hint={hint}\n          name={name}\n          onChange={(e) => {\n            onChange({ target: { name, value: e.target.value, type } });\n          }}\n          placeholder={formattedPlaceholder}\n          required={required}\n          type=\"email\"\n          value={valueWithEmptyStringFallback}\n        />\n      );\n    }\n    case 'timestamp':\n    case 'text':\n    case 'string': {\n      return (\n        <TextInput\n          ref={fieldRef}\n          autoComplete={autoComplete}\n          disabled={disabled}\n          error={errorMessage}\n          label={label}\n          labelAction={labelAction}\n          id={name}\n          hint={hint}\n          name={name}\n          onChange={(e) => {\n            onChange({ target: { name, value: e.target.value, type } });\n          }}\n          placeholder={formattedPlaceholder}\n          required={required}\n          type=\"text\"\n          value={valueWithEmptyStringFallback}\n        />\n      );\n    }\n    case 'password': {\n      return (\n        <TextInput\n          ref={fieldRef}\n          autoComplete={autoComplete}\n          disabled={disabled}\n          error={errorMessage}\n          endAction={\n            <button\n              aria-label={formatMessage({\n                id: 'Auth.form.password.show-password',\n                defaultMessage: 'Show password',\n              })}\n              onClick={() => {\n                setShowPassword((prev) => !prev);\n              }}\n              style={{\n                border: 'none',\n                padding: 0,\n                background: 'transparent',\n              }}\n              type=\"button\"\n            >\n              {showPassword ? (\n                <Icon as={Eye} color=\"neutral500\" />\n              ) : (\n                <Icon as={EyeStriked} color=\"neutral500\" />\n              )}\n            </button>\n          }\n          label={label}\n          labelAction={labelAction}\n          id={name}\n          hint={hint}\n          name={name}\n          onChange={(e) => {\n            onChange({ target: { name, value: e.target.value, type } });\n          }}\n          placeholder={formattedPlaceholder}\n          required={required}\n          type={showPassword ? 'text' : 'password'}\n          value={valueWithEmptyStringFallback}\n        />\n      );\n    }\n    case 'select': {\n      return (\n        <SingleSelect\n          ref={fieldRef}\n          disabled={disabled}\n          error={errorMessage}\n          label={label}\n          labelAction={labelAction}\n          id={name}\n          hint={hint}\n          name={name}\n          onChange={(value) => {\n            onChange({ target: { name, value, type: 'select' } });\n          }}\n          placeholder={formattedPlaceholder}\n          required={required}\n          value={value}\n        >\n          {options.map(({ metadatas: { intlLabel, disabled, hidden }, key, value }) => {\n            return (\n              <SingleSelectOption key={key} value={value} disabled={disabled} hidden={hidden}>\n                {formatMessage(intlLabel)}\n              </SingleSelectOption>\n            );\n          })}\n        </SingleSelect>\n      );\n    }\n    case 'textarea': {\n      return (\n        <Textarea\n          ref={fieldRef}\n          disabled={disabled}\n          error={errorMessage}\n          label={label}\n          labelAction={labelAction}\n          id={name}\n          hint={hint}\n          name={name}\n          onChange={(event) => onChange({ target: { name, value: event.target.value, type } })}\n          required={required}\n          placeholder={formattedPlaceholder}\n          value={valueWithEmptyStringFallback}\n        />\n      );\n    }\n    case 'time': {\n      let time = value;\n\n      // The backend send a value which has the following format: '00:45:00.000'\n      // or the time picker only supports hours & minutes so we need to mutate the value\n      if (typeof value === 'string' && value.split(':').length > 2) {\n        const [hour, minute] = value.split(':');\n        time = `${hour}:${minute}`;\n      }\n\n      return (\n        <TimePicker\n          ref={fieldRef}\n          clearLabel={formatMessage({ id: 'clearLabel', defaultMessage: 'Clear' })}\n          disabled={disabled}\n          error={errorMessage}\n          label={label}\n          labelAction={labelAction}\n          id={name}\n          hint={hint}\n          name={name}\n          onChange={(time) => {\n            onChange({ target: { name, value: `${time}`, type } });\n          }}\n          onClear={() => {\n            onChange({ target: { name, value: null, type } });\n          }}\n          required={required}\n          value={time}\n        />\n      );\n    }\n    default: {\n      /**\n       * If there's no component for the given type, we return a disabled text input\n       * showing a \"Not supported\" title to illustrate the issue.\n       */\n      return (\n        <TextInput\n          disabled\n          error={errorMessage}\n          label={label}\n          labelAction={labelAction}\n          id={name}\n          hint={hint}\n          name={name}\n          placeholder=\"Not supported\"\n          required={required}\n          type=\"text\"\n          value=\"\"\n        />\n      );\n    }\n  }\n};\n\n/**\n * we've memoized this component because we use a context to store all the data in our form in the content-manager.\n * This then causes _every_ component to re-render because there are no selects incurring performance issues\n * in content-types as the content-type gets more complicated.\n */\nconst MemoizedGenericInput = React.memo(GenericInput, isEqual);\n\nexport { MemoizedGenericInput as GenericInput };\n","import * as React from 'react';\n\nimport { LinkProps } from 'react-router-dom';\n\nimport { TranslationMessage } from '../types';\n\nimport type { Permission } from './RBAC';\n\ntype ComponentModule = () =>\n  | Promise<{ default?: React.ComponentType } | React.ComponentType>\n  | { default?: React.ComponentType }\n  | React.ComponentType;\n\ninterface MenuItem extends Pick<LinkProps, 'to'> {\n  to: string;\n  icon: React.ElementType;\n  intlLabel: TranslationMessage;\n  /**\n   * TODO: add type from the BE for what an Admin Permission looks like –\n   * most likely shared throught the helper plugin...? or duplicated, idm.\n   */\n  permissions: Permission[];\n  notificationsCount?: number;\n  Component?: ComponentModule;\n  exact?: boolean;\n  lockIcon?: boolean; // TODO: to replace with another name in v5\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\ntype InjectionZoneArea =\n  | 'admin.tutorials.links'\n  | 'contentManager.editView.informations'\n  | 'contentManager.editView.right-links'\n  | 'contentManager.listView.actions'\n  | 'contentManager.listView.unpublishModalAdditionalInfos'\n  | 'contentManager.listView.deleteModalAdditionalInfos'\n  | 'contentManager.listView.publishModalAdditionalInfos'\n  | 'contentManager.listView.deleteModalAdditionalInfos';\n\ntype InjectionZoneModule = InjectionZoneArea extends `${infer Word}.${string}` ? Word : never;\ntype InjectionZoneContainer = InjectionZoneArea extends `${string}.${infer Word}.${string}`\n  ? Word\n  : never;\ntype InjectionZoneBlock = InjectionZoneArea extends `${string}.${string}.${infer Word}`\n  ? Word\n  : never;\n\n// TODO: this should come from `core/admin/src/core/apis/Plugins`\ninterface Plugin {\n  apis: Record<string, unknown>;\n  injectionZones: Record<\n    string,\n    Record<string, Array<{ name: string; Component: React.ComponentType }>>\n  >;\n  initializer: React.ComponentType<{ setPlugin(pluginId: string): void }>;\n  getInjectedComponents: (\n    containerName: string,\n    blockName: string\n  ) => Array<{ name: string; Component: React.ComponentType }>;\n  isReady: boolean;\n  name: string;\n  pluginId: string;\n}\n\ninterface StrapiAppSettingLink {\n  id: string;\n  to: string;\n  intlLabel: TranslationMessage;\n  Component: ComponentModule;\n  permissions: Permission[];\n  exact?: boolean;\n}\n\ninterface StrapiAppSetting {\n  id: string;\n  intlLabel: TranslationMessage;\n  links: StrapiAppSettingLink[];\n}\n\ninterface RunHookSeries {\n  (hookName: string, async: true): Promise<any[]>;\n  (hookName: string, async?: false): any[];\n}\n\ninterface RunHookWaterfall {\n  <InitialValue, Store>(\n    hookName: string,\n    initialValue: InitialValue,\n    asynchronous: true,\n    store?: Store\n  ): Promise<InitialValue>;\n  <InitialValue, Store>(\n    hookName: string,\n    initialValue: InitialValue,\n    asynchronous?: false,\n    store?: Store\n  ): InitialValue;\n}\n\ninterface StrapiAppContextValue {\n  menu: MenuItem[];\n  plugins: Record<string, Plugin>;\n  settings: Record<string, StrapiAppSetting>;\n  getPlugin: (pluginId: string) => Plugin | undefined;\n  getAdminInjectedComponents: (\n    moduleName: InjectionZoneModule,\n    containerName: InjectionZoneContainer,\n    blockName: InjectionZoneBlock\n  ) => Array<{ Component: React.ComponentType; name: string }>;\n  runHookParallel: (hookName: string) => Promise<unknown>;\n  runHookWaterfall: RunHookWaterfall;\n  runHookSeries: RunHookSeries;\n}\n\nconst StrapiAppContext = React.createContext<StrapiAppContextValue>({\n  getPlugin: () => undefined,\n  getAdminInjectedComponents: () => [],\n  menu: [],\n  plugins: {},\n  settings: {},\n  // These functions are required but should not resolve to undefined as they do here\n  runHookParallel: () => Promise.resolve(),\n  runHookWaterfall: () => Promise.resolve(),\n  // @ts-expect-error – TODO: fix this.\n  runHookSeries: () => Promise.resolve(),\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Provider\n * -----------------------------------------------------------------------------------------------*/\n\ninterface StrapiAppProviderProps extends StrapiAppContextValue {\n  children: React.ReactNode;\n}\n\nconst StrapiAppProvider = ({\n  children,\n  getPlugin,\n  getAdminInjectedComponents,\n  menu,\n  plugins,\n  runHookParallel,\n  runHookSeries,\n  runHookWaterfall,\n  settings,\n}: StrapiAppProviderProps) => {\n  const contextValue = React.useMemo(\n    () => ({\n      getPlugin,\n      getAdminInjectedComponents,\n      menu,\n      plugins,\n      runHookParallel,\n      runHookSeries,\n      runHookWaterfall,\n      settings,\n    }),\n    [\n      getPlugin,\n      getAdminInjectedComponents,\n      menu,\n      plugins,\n      runHookParallel,\n      runHookSeries,\n      runHookWaterfall,\n      settings,\n    ]\n  );\n\n  return <StrapiAppContext.Provider value={contextValue}>{children}</StrapiAppContext.Provider>;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Hook\n * -----------------------------------------------------------------------------------------------*/\n\nconst useStrapiApp = () => React.useContext(StrapiAppContext);\n\nexport { StrapiAppContext, StrapiAppProvider, useStrapiApp };\nexport type {\n  StrapiAppProviderProps,\n  StrapiAppContextValue,\n  MenuItem,\n  Plugin,\n  StrapiAppSettingLink,\n  StrapiAppSetting,\n  RunHookSeries,\n  RunHookWaterfall,\n  ComponentModule,\n};\n","import * as React from 'react';\n\nimport { useStrapiApp } from '../features/StrapiApp';\n\nexport type InjectionZoneProps<TComponent extends React.ComponentType> = {\n  area:\n    | 'contentManager.listView.actions'\n    | 'contentManager.editView.informations'\n    | 'contentManager.editView.right-links'\n    // pluginName.page.position\n    | `${string}.${string}.${string}`;\n} & React.ComponentProps<TComponent>;\n\nexport const InjectionZone = <TComponent extends React.ComponentType>({\n  area,\n  ...props\n}: InjectionZoneProps<TComponent>) => {\n  const { getPlugin } = useStrapiApp();\n  const [pluginName, page, position] = area.split('.');\n  const plugin = getPlugin(pluginName);\n\n  if (!plugin) {\n    return null;\n  }\n\n  const components = plugin.getInjectedComponents(page, position);\n\n  if (!components) {\n    return null;\n  }\n\n  return components.map(({ name, Component }) => <Component key={name} {...props} />);\n};\n","import { Link as DSLink, LinkProps as DSLinkProps } from '@strapi/design-system/v2';\nimport { NavLink } from 'react-router-dom';\n\n/**\n * @preserve\n *\n * @deprecated Use @strapi/design-system LinkButton instead.\n */\nconst Link = (props: DSLinkProps & { to?: string }) => <DSLink {...props} as={NavLink} />;\n\nexport { Link };\n","import {\n  LinkButton as DSLinkButton,\n  LinkButtonProps as DSLinkButtonProps,\n} from '@strapi/design-system/v2';\nimport { NavLink } from 'react-router-dom';\n\n/**\n * @preserve\n *\n * @deprecated Use @strapi/design-system LinkButton instead.\n */\nconst LinkButton = (props: DSLinkButtonProps) => <DSLinkButton {...props} as={NavLink} />;\n\nexport { LinkButton };\n","import { EmptyStateLayout, EmptyStateLayoutProps } from '@strapi/design-system';\nimport { EmptyDocuments } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\n\nimport type { TranslationMessage } from '../types';\n\nexport type NoContentProps = Omit<EmptyStateLayoutProps, 'content' | 'icon'> & {\n  content?: TranslationMessage;\n};\n\nconst NoContent = ({\n  content = {\n    id: 'app.components.EmptyStateLayout.content-document',\n    defaultMessage: 'No content found',\n    values: {},\n  },\n  ...rest\n}: NoContentProps) => {\n  const { formatMessage } = useIntl();\n\n  return (\n    <EmptyStateLayout\n      {...rest}\n      icon={<EmptyDocuments width=\"10rem\" />}\n      content={formatMessage(\n        { id: content.id, defaultMessage: content.defaultMessage },\n        content.values\n      )}\n    />\n  );\n};\n\nexport { NoContent };\n","import { EmptyStateLayout, EmptyStateLayoutProps } from '@strapi/design-system';\nimport { EmptyPictures } from '@strapi/icons';\n\ntype NoMediaProps = Omit<EmptyStateLayoutProps, 'icon'>;\n\n/*\n * @deprecated use @strapi/design-system `EmptyStateLayout` instead.\n */\nconst NoMedia = (props: NoMediaProps) => {\n  return <EmptyStateLayout {...props} icon={<EmptyPictures width=\"10rem\" />} />;\n};\n\nexport { NoMedia };\n","import { EmptyStateLayout, EmptyStateLayoutProps } from '@strapi/design-system';\nimport { EmptyPermissions } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\n\nexport type NoPermissionsProps = Pick<EmptyStateLayoutProps, 'action'>;\n\nconst NoPermissions = ({ action }: NoPermissionsProps) => {\n  const { formatMessage } = useIntl();\n\n  return (\n    <EmptyStateLayout\n      icon={<EmptyPermissions width=\"10rem\" />}\n      content={formatMessage({\n        id: 'app.components.EmptyStateLayout.content-permissions',\n        defaultMessage: \"You don't have the permissions to access that content\",\n      })}\n      action={action}\n    />\n  );\n};\n\nexport { NoPermissions };\n","import { TextInput, TextInputProps } from '@strapi/design-system';\nimport { EyeStriked } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\nimport styled from 'styled-components';\n\nimport { TranslationMessage } from '../types';\n\ninterface NotAllowedInputProps extends Pick<TextInputProps, 'labelAction' | 'name'> {\n  description?: TranslationMessage;\n  error?: string;\n  intlLabel?: TranslationMessage;\n}\n\nconst NotAllowedInput = ({\n  description,\n  error,\n  intlLabel,\n  labelAction,\n  name = '',\n}: NotAllowedInputProps) => {\n  const { formatMessage } = useIntl();\n  const label = intlLabel?.id\n    ? formatMessage(\n        { id: intlLabel.id, defaultMessage: intlLabel.defaultMessage },\n        { ...intlLabel.values }\n      )\n    : name;\n\n  const hint = description?.id\n    ? formatMessage(\n        { id: description.id, defaultMessage: description.defaultMessage },\n        { ...description.values }\n      )\n    : '';\n\n  const placeholder = formatMessage({\n    id: 'components.NotAllowedInput.text',\n    defaultMessage: 'No permissions to see this field',\n  });\n\n  const errorMessage = error ? formatMessage({ id: error, defaultMessage: error }) : '';\n\n  return (\n    <TextInput\n      disabled\n      error={errorMessage}\n      label={label}\n      labelAction={labelAction}\n      id={name}\n      hint={hint}\n      name={name}\n      placeholder={placeholder}\n      startAction={<StyledIcon />}\n      type=\"text\"\n      value=\"\"\n    />\n  );\n};\n\nconst StyledIcon = styled(EyeStriked)`\n  & > path {\n    fill: ${({ theme }) => theme.colors.neutral600};\n  }\n`;\n\nexport { NotAllowedInput };\n","/**\n *\n * PageSizeURLQuery\n *\n */\n\nimport * as React from 'react';\n\nimport { Flex, SingleSelectOption, SingleSelect, Typography } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\n\nimport { useTracking, TrackingEvent } from '../features/Tracking';\nimport { useQueryParams } from '../hooks/useQueryParams';\n\nexport interface PageSizeURLQueryProps {\n  trackedEvent?: Extract<TrackingEvent, { properties?: never }>['name'];\n  options?: string[];\n  defaultValue?: string;\n}\n\nexport const PageSizeURLQuery = ({\n  trackedEvent,\n  options = ['10', '20', '50', '100'],\n  defaultValue = '10',\n}: PageSizeURLQueryProps) => {\n  const { formatMessage } = useIntl();\n  const [{ query }, setQuery] = useQueryParams<{ pageSize?: string; page: number }>();\n  const { trackUsage } = useTracking();\n\n  const handleChange = (value: string) => {\n    if (trackedEvent) {\n      trackUsage(trackedEvent);\n    }\n\n    setQuery({\n      pageSize: value,\n      page: 1,\n    });\n  };\n\n  const pageSize: string =\n    typeof query?.pageSize === 'string' && query?.pageSize !== '' ? query.pageSize : defaultValue;\n\n  return (\n    <Flex gap={2}>\n      <SingleSelect\n        size=\"S\"\n        aria-label={formatMessage({\n          id: 'components.PageFooter.select',\n          defaultMessage: 'Entries per page',\n        })}\n        // @ts-expect-error from the DS V2 this won't be needed because we're only returning strings.\n        onChange={handleChange}\n        value={pageSize}\n      >\n        {options.map((option) => (\n          <SingleSelectOption key={option} value={option}>\n            {option}\n          </SingleSelectOption>\n        ))}\n      </SingleSelect>\n      <Typography textColor=\"neutral600\" as=\"span\">\n        {formatMessage({\n          id: 'components.PageFooter.select',\n          defaultMessage: 'Entries per page',\n        })}\n      </Typography>\n    </Flex>\n  );\n};\n","/**\n * Pagination\n *\n * The component works as follows\n * `1` , 2, 3, ... 10\n * 1, `2`, 3, ... 10\n * 1, 2, `3`, 4, ... 10\n * 1, 2, 3, `4`, 5, ... 10\n * 1, ..,4, `5`, 6, ... 10\n *\n * 1, ...., 8, 9, `10`\n * 1, ...., 8, `9`, 10\n * 1, ...., 7, `8`, 9, 10\n * 1, ... 6, `7`, 8, 9, 10\n */\n\nimport { Dots, NextLink, PageLink, Pagination, PreviousLink } from '@strapi/design-system';\nimport { stringify } from 'qs';\nimport { useIntl } from 'react-intl';\nimport { useLocation } from 'react-router-dom';\n\nimport { useQueryParams } from '../hooks/useQueryParams';\n\ntype PaginationURLQueryProps = {\n  /**\n   * Number of always visible pages at the beginning and end.\n   * @default 1\n   */\n  boundaryCount?: number;\n  pagination: {\n    pageCount: number;\n  };\n  /**\n   * Number of always visible pages before and after the current page.\n   * @default 1\n   */\n  siblingCount?: number;\n};\n\nexport const PaginationURLQuery = ({\n  pagination: { pageCount },\n  boundaryCount = 1,\n  siblingCount = 1,\n}: PaginationURLQueryProps) => {\n  const [{ query }] = useQueryParams<{ page: string }>();\n  const activePage = parseInt(query?.page || '1', 10);\n  const { pathname } = useLocation();\n  const { formatMessage } = useIntl();\n  const makeSearch = (page: number) => stringify({ ...query, page }, { encode: false });\n\n  const nextSearch = makeSearch(activePage + (pageCount > 1 ? 1 : 0));\n\n  const previousSearch = makeSearch(activePage - 1);\n\n  const range = (start: number, end: number) => {\n    const length = end - start + 1;\n\n    return Array.from({ length }, (_, i) => start + i);\n  };\n\n  const startPages = range(1, Math.min(boundaryCount, pageCount));\n  const endPages = range(Math.max(pageCount - boundaryCount + 1, boundaryCount + 1), pageCount);\n\n  const siblingsStart = Math.max(\n    Math.min(\n      // Natural start\n      activePage - siblingCount,\n      // Lower boundary when page is high\n      pageCount - boundaryCount - siblingCount * 2 - 1\n    ),\n    // Greater than startPages\n    boundaryCount + 2\n  );\n\n  const siblingsEnd = Math.min(\n    Math.max(\n      // Natural end\n      activePage + siblingCount,\n      // Upper boundary when page is low\n      boundaryCount + siblingCount * 2 + 2\n    ),\n    // Less than endPages\n    endPages.length > 0 ? endPages[0] - 2 : pageCount - 1\n  );\n\n  const items = [\n    ...startPages,\n\n    // Start ellipsis\n    // eslint-disable-next-line no-nested-ternary\n    ...(siblingsStart > boundaryCount + 2\n      ? ['start-ellipsis']\n      : boundaryCount + 1 < pageCount - boundaryCount\n      ? [boundaryCount + 1]\n      : []),\n\n    // Sibling pages\n    ...range(siblingsStart, siblingsEnd),\n\n    // End ellipsis\n    // eslint-disable-next-line no-nested-ternary\n    ...(siblingsEnd < pageCount - boundaryCount - 1\n      ? ['end-ellipsis']\n      : pageCount - boundaryCount > boundaryCount\n      ? [pageCount - boundaryCount]\n      : []),\n\n    ...endPages,\n  ];\n\n  return (\n    <Pagination activePage={activePage} pageCount={pageCount}>\n      <PreviousLink active={false} to={{ pathname, search: previousSearch }}>\n        {formatMessage({\n          id: 'components.pagination.go-to-previous',\n          defaultMessage: 'Go to previous page',\n        })}\n      </PreviousLink>\n      {items.map((item) => {\n        if (typeof item === 'number') {\n          return (\n            <PageLink\n              active={item === activePage}\n              key={item}\n              number={item}\n              to={{ pathname, search: makeSearch(item) }}\n            >\n              {formatMessage(\n                { id: 'components.pagination.go-to', defaultMessage: 'Go to page {page}' },\n                { page: item }\n              )}\n            </PageLink>\n          );\n        }\n\n        return <Dots key={item} />;\n      })}\n      <NextLink active={false} to={{ pathname, search: nextSearch }}>\n        {formatMessage({\n          id: 'components.pagination.go-to-next',\n          defaultMessage: 'Go to next page',\n        })}\n      </NextLink>\n    </Pagination>\n  );\n};\n","import { Box } from '@strapi/design-system';\nimport { Cross, CarretDown } from '@strapi/icons';\nimport Select, {\n  ClearIndicatorProps,\n  StylesConfig,\n  components,\n  Props as RSProps,\n  DropdownIndicatorProps,\n} from 'react-select';\nimport styled, { useTheme, DefaultTheme } from 'styled-components';\n\nexport interface ReactSelectProps extends RSProps {\n  error?: string;\n  ariaErrorMessage?: string;\n}\n\nconst ReactSelect = ({\n  components,\n  styles,\n  error,\n  ariaErrorMessage,\n  ...props\n}: ReactSelectProps) => {\n  const theme = useTheme();\n  const customStyles = getSelectStyles(theme, error);\n  return (\n    <Select\n      menuPosition=\"fixed\"\n      components={{\n        ClearIndicator,\n        DropdownIndicator,\n        IndicatorSeparator: () => null,\n        LoadingIndicator: () => null,\n        ...components,\n      }}\n      aria-errormessage={error && ariaErrorMessage}\n      aria-invalid={!!error}\n      styles={{ ...customStyles, ...styles }}\n      {...props}\n    />\n  );\n};\n\nconst IconBox = styled(Box)`\n  background: transparent;\n  border: none;\n  position: relative;\n  z-index: 1;\n\n  svg {\n    height: ${11 / 16}rem;\n    width: ${11 / 16}rem;\n  }\n\n  svg path {\n    fill: ${({ theme }) => theme.colors.neutral600};\n  }\n`;\n\nconst ClearIndicator = (props: ClearIndicatorProps) => {\n  const Component = components.ClearIndicator;\n  return (\n    <Component {...props}>\n      <IconBox as=\"button\" type=\"button\">\n        <Cross />\n      </IconBox>\n    </Component>\n  );\n};\n\nconst CarretBox = styled(IconBox)`\n  display: flex;\n  background: none;\n  border: none;\n\n  svg {\n    width: ${9 / 16}rem;\n  }\n`;\n\nconst DropdownIndicator = ({ innerProps }: DropdownIndicatorProps) => {\n  return (\n    // @ts-expect-error – issue with the ref attached to `innerProps`\n    <CarretBox paddingRight={3} {...innerProps}>\n      <CarretDown />\n    </CarretBox>\n  );\n};\n\nconst getSelectStyles = (theme: DefaultTheme, error: string | undefined): StylesConfig => {\n  return {\n    clearIndicator: (base) => ({ ...base, padding: 0, paddingRight: theme.spaces[3] }),\n    container: (base) => ({\n      ...base,\n      background: theme.colors.neutral0,\n      lineHeight: 'normal',\n    }),\n    control(base, state) {\n      let borderColor = theme.colors.neutral200;\n      let boxShadowColor;\n      let backgroundColor;\n\n      if (state.isFocused) {\n        borderColor = theme.colors.primary600;\n        boxShadowColor = theme.colors.primary600;\n      } else if (error) {\n        borderColor = theme.colors.danger600;\n      }\n\n      if (state.isDisabled) {\n        backgroundColor = `${theme.colors.neutral150} !important`;\n      }\n\n      return {\n        ...base,\n        fontSize: theme.fontSizes[2],\n        height: 40,\n        border: `1px solid ${borderColor} !important`,\n        outline: 0,\n        backgroundColor,\n        borderRadius: theme.borderRadius,\n        boxShadow: boxShadowColor ? `${boxShadowColor} 0px 0px 0px 2px` : '',\n      };\n    },\n    indicatorsContainer: (base) => ({ ...base, padding: 0, paddingRight: theme.spaces[3] }),\n    input: (base) => ({\n      ...base,\n      margin: 0,\n      padding: 0,\n      color: theme.colors.neutral800,\n      gridTemplateColumns: '0 100%',\n    }),\n    menu(base) {\n      return {\n        ...base,\n        width: '100%',\n        marginTop: theme.spaces[1],\n        backgroundColor: theme.colors.neutral0,\n        color: theme.colors.neutral800,\n        borderRadius: theme.borderRadius,\n        border: `1px solid ${theme.colors.neutral200}`,\n        boxShadow: theme.shadows.tableShadow,\n        fontSize: theme.fontSizes[2],\n        zIndex: 2,\n      };\n    },\n    menuList: (base) => ({\n      ...base,\n      paddingLeft: theme.spaces[1],\n      paddingTop: theme.spaces[1],\n      paddingRight: theme.spaces[1],\n      paddingBottom: theme.spaces[1],\n    }),\n    menuPortal: (base) => ({\n      ...base,\n      zIndex: 100,\n    }),\n    option(base, state) {\n      let backgroundColor = base.backgroundColor;\n\n      if (state.isFocused || state.isSelected) {\n        backgroundColor = theme.colors.primary100;\n      }\n\n      return {\n        ...base,\n        color: theme.colors.neutral800,\n        lineHeight: theme.spaces[5],\n        backgroundColor,\n        borderRadius: theme.borderRadius,\n        '&:active': {\n          backgroundColor: theme.colors.primary100,\n        },\n      };\n    },\n    placeholder: (base) => ({\n      ...base,\n      color: theme.colors.neutral600,\n      marginLeft: 0,\n      overflow: 'hidden',\n      textOverflow: 'ellipsis',\n      whiteSpace: 'nowrap',\n      maxWidth: '80%',\n    }),\n    singleValue(base, state) {\n      let color = theme.colors.neutral800;\n\n      if (state.isDisabled) {\n        color = theme.colors.neutral600;\n      }\n\n      return { ...base, marginLeft: 0, color };\n    },\n    valueContainer: (base) => ({\n      ...base,\n      cursor: 'pointer',\n      padding: 0,\n      paddingLeft: theme.spaces[4],\n      marginLeft: 0,\n      marginRight: 0,\n    }),\n  };\n};\n\nexport { ReactSelect };\n","import { Duration, intervalToDuration, isPast } from 'date-fns';\nimport { useIntl } from 'react-intl';\n\nconst intervals: Array<keyof Duration> = ['years', 'months', 'days', 'hours', 'minutes', 'seconds'];\n\ninterface CustomInterval {\n  unit: keyof Duration;\n  text: string;\n  threshold: number;\n}\n\nexport interface RelativeTimeProps {\n  timestamp: Date;\n  customIntervals?: CustomInterval[];\n  className?: string;\n}\n\n/**\n * Displays the relative time between a given timestamp and the current time.\n * You can display a custom message for given time intervals by passing an array of custom intervals.\n *\n * @example\n * ```jsx\n * <caption>Display \"last hour\" if the timestamp is less than an hour ago</caption>\n * <RelativeTime\n *  timestamp={new Date('2021-01-01')}\n *  customIntervals={[\n *   { unit: 'hours', threshold: 1, text: 'last hour' },\n *  ]}\n * ```\n */\nconst RelativeTime = ({ timestamp, customIntervals = [], className }: RelativeTimeProps) => {\n  const { formatRelativeTime, formatDate, formatTime } = useIntl();\n\n  const interval = intervalToDuration({\n    start: timestamp,\n    end: Date.now(),\n    // see https://github.com/date-fns/date-fns/issues/2891 – No idea why it's all partial it returns it every time.\n  }) as Required<Duration>;\n\n  const unit = intervals.find((intervalUnit) => {\n    return interval[intervalUnit] > 0 && Object.keys(interval).includes(intervalUnit);\n  })!;\n\n  const relativeTime = isPast(timestamp) ? -interval[unit] : interval[unit];\n\n  // Display custom text if interval is less than the threshold\n  const customInterval = customIntervals.find((custom) => interval[custom.unit] < custom.threshold);\n\n  const displayText = customInterval\n    ? customInterval.text\n    : formatRelativeTime(relativeTime, unit, { numeric: 'auto' });\n\n  return (\n    <time\n      dateTime={timestamp.toISOString()}\n      title={`${formatDate(timestamp)} ${formatTime(timestamp)}`}\n      className={className}\n    >\n      {displayText}\n    </time>\n  );\n};\n\nexport { RelativeTime };\n","import * as React from 'react';\n\nimport { Icon, IconButton, Searchbar, SearchForm } from '@strapi/design-system';\nimport { Search as SearchIcon } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\n\nimport { TrackingEvent, useTracking } from '../features/Tracking';\nimport { useQueryParams } from '../hooks/useQueryParams';\n\nexport interface SearchURLQueryProps {\n  label: string;\n  placeholder?: string;\n  trackedEvent?: TrackingEvent['name'] | null;\n  trackedEventDetails?: TrackingEvent['properties'];\n}\n\nconst SearchURLQuery = ({\n  label,\n  placeholder,\n  trackedEvent,\n  trackedEventDetails,\n}: SearchURLQueryProps) => {\n  const inputRef = React.useRef<HTMLInputElement>(null);\n  const iconButtonRef = React.useRef<HTMLButtonElement>(null);\n\n  const [{ query }, setQuery] = useQueryParams<{ _q: string; page?: number }>();\n\n  const [value, setValue] = React.useState(query?._q || '');\n  const [isOpen, setIsOpen] = React.useState(!!value);\n\n  const { formatMessage } = useIntl();\n  const { trackUsage } = useTracking();\n\n  const handleToggle = () => setIsOpen((prev) => !prev);\n\n  React.useLayoutEffect(() => {\n    if (isOpen && inputRef.current) {\n      inputRef.current.focus();\n    }\n  }, [isOpen]);\n\n  const handleClear = () => {\n    setValue('');\n    setQuery({ _q: '' }, 'remove');\n  };\n\n  const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {\n    e.preventDefault();\n\n    // Ensure value is a string\n    if (value) {\n      if (trackedEvent) {\n        trackUsage(trackedEvent, trackedEventDetails);\n      }\n      setQuery({ _q: encodeURIComponent(value), page: 1 });\n    } else {\n      handleToggle();\n      setQuery({ _q: '' }, 'remove');\n    }\n  };\n\n  if (isOpen) {\n    return (\n      <SearchForm onSubmit={handleSubmit}>\n        <Searchbar\n          ref={inputRef}\n          name=\"search\"\n          onChange={(e: React.ChangeEvent<HTMLInputElement>) => setValue(e.target.value)}\n          value={value}\n          clearLabel={formatMessage({ id: 'clearLabel', defaultMessage: 'Clear' })}\n          onClear={handleClear}\n          size=\"S\"\n          placeholder={placeholder}\n        >\n          {label}\n        </Searchbar>\n      </SearchForm>\n    );\n  }\n\n  return (\n    <IconButton\n      ref={iconButtonRef}\n      icon={<Icon as={SearchIcon} color=\"neutral800\" />}\n      label={formatMessage({ id: 'global.search', defaultMessage: 'Search' })}\n      onClick={handleToggle}\n    />\n  );\n};\n\nexport { SearchURLQuery };\n","import * as React from 'react';\n\nimport { Helmet } from 'react-helmet';\nimport { useIntl } from 'react-intl';\n\ninterface SettingsPageTitleProps {\n  name: string;\n}\n\nconst SettingsPageTitle = ({ name }: SettingsPageTitleProps) => {\n  const { formatMessage } = useIntl();\n  const text = formatMessage(\n    { id: 'Settings.PageTitle', defaultMessage: 'Settings - {name}' },\n    { name }\n  );\n\n  return <Helmet title={text} />;\n};\n\nexport { SettingsPageTitle };\n","import { StatusVariant } from '@strapi/design-system';\nimport styled, { DefaultTheme } from 'styled-components';\n\ntype BulletProps = {\n  backgroundColor: keyof DefaultTheme['colors'];\n};\n\nconst Bullet = styled.div<BulletProps>`\n  margin-right: ${({ theme }) => theme.spaces[3]};\n  width: ${6 / 16}rem;\n  height: ${6 / 16}rem;\n  border-radius: 50%;\n  background: ${({ theme, backgroundColor }) => theme.colors[backgroundColor]};\n`;\n\ntype StatusProps = {\n  variant: StatusVariant;\n};\n\n/**\n * @deprecated use @strapi/design-system `Status` instead.\n */\nconst Status = ({ variant = 'primary' }: StatusProps) => {\n  const backgroundColor: BulletProps['backgroundColor'] = `${variant}600`;\n\n  return <Bullet backgroundColor={backgroundColor} />;\n};\n\nexport { Status };\n","import * as React from 'react';\n\nimport { TranslationMessage } from '../types';\n\nimport type { Attribute, Schema, Entity as StrapiEntity } from '@strapi/types';\n\ninterface Entity {\n  id: StrapiEntity.ID;\n  createdAt: string | null;\n  createdBy: User | null;\n  updatedAt: string | null;\n  updatedBy: User | null;\n}\n\ntype NonNullableObject<T> = {\n  [key in keyof T]: NonNullable<T[key]>;\n};\n\n/**\n * TODO: should this be `SanitizedUser` from the API?\n */\ninterface User extends NonNullableObject<Entity> {\n  firstname?: string;\n  lastname?: string;\n  username?: string;\n  email?: string;\n  isActive: boolean;\n  blocked: boolean;\n  roles: [];\n}\n\ninterface ContentType extends Partial<Entity> {\n  publishedAt?: string | null;\n  publishedBy?: User | null;\n  [key: string]: Attribute.GetValue<Attribute.Any> | null;\n}\n\n/**\n * TODO: All these types could be accurately inferred from\n * their usage in the content-manager when we move it back.\n */\ninterface CMEditViewDataManagerContextValue {\n  addComponentToDynamicZone?: (\n    keys: string,\n    componentLayoutData: Record<string, unknown>,\n    allComponents: Record<string, unknown>,\n    shouldCheckErrors?: boolean,\n    position?: number\n  ) => void;\n  addNonRepeatableComponentToField?: (\n    keys: string,\n    componentLayoutData: Schema.Component,\n    allComponents: Record<string, Schema.Component>\n  ) => void;\n  addRepeatableComponentToField?: (\n    keys: string,\n    componentLayoutData: Record<string, unknown>,\n    allComponents: Record<string, unknown>,\n    shouldCheckErrors?: boolean,\n    position?: number\n  ) => void;\n  allLayoutData: {\n    components: Record<string, Schema.Component>;\n    contentType?: Schema.ContentType;\n  };\n  createActionAllowedFields: string[];\n  formErrors: Record<string, TranslationMessage>;\n  hasDraftAndPublish: boolean;\n  initialData: ContentType;\n  isCreatingEntry: boolean;\n  isSingleType: boolean;\n  layout?: Schema.CollectionType | Schema.SingleType;\n  modifiedData: ContentType;\n  moveComponentDown?: (dynamicZoneName: string, currentIndex: number) => void;\n  moveComponentField?: (payload: { name: string; newIndex: number; currentIndex: number }) => void;\n  moveComponentUp?: (dynamicZoneName: string, currentIndex: number) => void;\n  onChange?: <TAttribute extends Attribute.Any>(\n    payload: {\n      target: { name: string; type: string; value: Attribute.GetValue<TAttribute> };\n    },\n    shouldSetInitialValue?: boolean\n  ) => void;\n  onPublish?: () => Promise<unknown>;\n  onPublishPromptDismissal?: (e: React.SyntheticEvent) => Promise<void>;\n  onUnpublish?: () => Promise<unknown>;\n  publishConfirmation?: {\n    show: boolean;\n    draftCount: number;\n  };\n  readActionAllowedFields: string[];\n  relationConnect?: (payload: {\n    name: string;\n    value: { id: Entity['id'] };\n    toOneRelation?: boolean;\n  }) => void;\n  relationDisconnect?: (payload: { name: string; id: Entity['id'] }) => void;\n  relationLoad?: (payload: {\n    target: {\n      initialDataPath: string[];\n      modifiedDataPath: string[];\n      value: { id: Entity['id'] }[];\n      modifiedDataOnly?: boolean;\n    };\n  }) => void;\n  relationReorder?: (payload: { name: string; oldIndex: number; newIndex: number }) => void;\n  removeComponentFromDynamicZone?: (dynamicZoneName: string, index: number) => void;\n  removeComponentFromField?: (key: string, uid: string) => void;\n  removeRepeatableField?: (key: string, uid?: string) => void;\n  shouldNotRunValidations?: boolean;\n  slug?: string;\n  // TODO: this can be refined to a union.\n  status?: string;\n  updateActionAllowedFields: string[];\n}\n\nconst ContentManagerEditViewDataManagerContext =\n  React.createContext<CMEditViewDataManagerContextValue>({\n    allLayoutData: {\n      components: {},\n    },\n    createActionAllowedFields: [],\n    formErrors: {},\n    hasDraftAndPublish: false,\n    initialData: {},\n    isCreatingEntry: false,\n    isSingleType: false,\n    modifiedData: {},\n    readActionAllowedFields: [],\n    slug: undefined,\n    updateActionAllowedFields: [],\n  });\n\nconst useCMEditViewDataManager = () => React.useContext(ContentManagerEditViewDataManagerContext);\n\nexport { useCMEditViewDataManager, ContentManagerEditViewDataManagerContext };\nexport type { ContentType, CMEditViewDataManagerContextValue };\n","import get from 'lodash/get';\n\nimport type { Schema } from '@strapi/types';\n\nconst getType = (schema: Schema.Schema, attrName: string) =>\n  get(schema, ['attributes', attrName, 'type'], '');\nconst getOtherInfos = (schema: Schema.Schema, arr: string[]) =>\n  get(schema, ['attributes', ...arr], '');\n\nexport { getOtherInfos, getType };\n","import * as React from 'react';\n\nimport { Box, Flex, Typography } from '@strapi/design-system';\nimport { Link } from '@strapi/design-system/v2';\nimport { Clock, Refresh } from '@strapi/icons';\nimport { createPortal } from 'react-dom';\nimport { MessageDescriptor, useIntl } from 'react-intl';\nimport styled, { keyframes } from 'styled-components';\n\nimport { pxToRem } from '../utils/pxToRem';\n\n/**\n * TODO: realistically a lot of this logic is isolated to the `core/admin` package.\n * However, we want to expose the `useAutoReloadOverlayBlocker` hook to the plugins.\n *\n * Therefore, in V5 we should move this logic back to the `core/admin` package & export\n * the hook from that package and re-export here. For now, let's keep it all together\n * because it's easier to diagnose and we're not using a million refs because we don't\n * understand what's going on.\n */\nexport interface AutoReloadOverlayBlockerConfig {\n  title?: string;\n  description?: string;\n  icon?: 'reload' | 'time';\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\nexport interface AutoReloadOverlayBlockerContextValue {\n  lockAppWithAutoreload?: (config?: AutoReloadOverlayBlockerConfig) => void;\n  unlockAppWithAutoreload?: () => void;\n}\n\nconst AutoReloadOverlayBlockerContext = React.createContext<AutoReloadOverlayBlockerContextValue>(\n  {}\n);\n\n/* -------------------------------------------------------------------------------------------------\n * Provider\n * -----------------------------------------------------------------------------------------------*/\n\nexport interface AutoReloadOverlayBlockerProviderProps {\n  children: React.ReactNode;\n}\n\nconst MAX_ELAPSED_TIME = 30 * 1000;\n\nconst AutoReloadOverlayBlockerProvider = ({ children }: AutoReloadOverlayBlockerProviderProps) => {\n  const [isOpen, setIsOpen] = React.useState(false);\n  const [config, setConfig] = React.useState<AutoReloadOverlayBlockerConfig>({});\n  const [failed, setFailed] = React.useState(false);\n\n  const lockAppWithAutoreload = React.useCallback((config: AutoReloadOverlayBlockerConfig = {}) => {\n    setIsOpen(true);\n    setConfig(config);\n  }, []);\n\n  const unlockAppWithAutoreload = React.useCallback(() => {\n    setIsOpen(false);\n    setConfig({});\n  }, []);\n\n  // eslint-disable-next-line consistent-return\n  React.useEffect(() => {\n    if (isOpen) {\n      const timeout = setTimeout(() => {\n        setFailed(true);\n      }, MAX_ELAPSED_TIME);\n\n      return () => {\n        clearTimeout(timeout);\n      };\n    }\n  }, [isOpen]);\n\n  let displayedIcon = config?.icon || 'reload';\n\n  let description = {\n    id: config?.description || 'components.OverlayBlocker.description',\n    defaultMessage:\n      \"You're using a feature that needs the server to restart. Please wait until the server is up.\",\n  };\n\n  let title = {\n    id: config?.title || 'components.OverlayBlocker.title',\n    defaultMessage: 'Waiting for restart',\n  };\n\n  if (failed) {\n    displayedIcon = 'time';\n\n    description = {\n      id: 'components.OverlayBlocker.description.serverError',\n      defaultMessage: 'The server should have restarted, please check your logs in the terminal.',\n    };\n\n    title = {\n      id: 'components.OverlayBlocker.title.serverError',\n      defaultMessage: 'The restart is taking longer than expected',\n    };\n  }\n\n  const autoReloadValue = React.useMemo(\n    () => ({\n      lockAppWithAutoreload,\n      unlockAppWithAutoreload,\n    }),\n    [lockAppWithAutoreload, unlockAppWithAutoreload]\n  );\n\n  return (\n    <AutoReloadOverlayBlockerContext.Provider value={autoReloadValue}>\n      <Blocker\n        displayedIcon={displayedIcon}\n        isOpen={isOpen}\n        description={description}\n        title={title}\n      />\n      {children}\n    </AutoReloadOverlayBlockerContext.Provider>\n  );\n};\n\ninterface BlockerProps {\n  displayedIcon: string;\n  description: MessageDescriptor;\n  isOpen: boolean;\n  title: MessageDescriptor;\n}\n\nconst Blocker = ({ displayedIcon, description, title, isOpen }: BlockerProps) => {\n  const { formatMessage } = useIntl();\n\n  // eslint-disable-next-line no-undef\n  return isOpen && globalThis?.document?.body\n    ? createPortal(\n        <Overlay id=\"autoReloadOverlayBlocker\" direction=\"column\" alignItems=\"center\" gap={6}>\n          <Flex direction=\"column\" alignItems=\"center\" gap={2}>\n            <Typography as=\"h1\" variant=\"alpha\">\n              {formatMessage(title)}\n            </Typography>\n            <Typography as=\"h2\" textColor=\"neutral600\" fontSize={4} fontWeight=\"regular\">\n              {formatMessage(description)}\n            </Typography>\n          </Flex>\n          {displayedIcon === 'reload' && (\n            <IconBox padding={6} background=\"primary100\" borderColor=\"primary200\">\n              <LoaderReload width={pxToRem(36)} height={pxToRem(36)} />\n            </IconBox>\n          )}\n          {displayedIcon === 'time' && (\n            <IconBox padding={6} background=\"primary100\" borderColor=\"primary200\">\n              <Clock width={pxToRem(40)} height={pxToRem(40)} />\n            </IconBox>\n          )}\n          <Box marginTop={2}>\n            <Link href=\"https://docs.strapi.io\" isExternal>\n              {formatMessage({\n                id: 'global.documentation',\n                defaultMessage: 'Read the documentation',\n              })}\n            </Link>\n          </Box>\n        </Overlay>,\n        // eslint-disable-next-line no-undef\n        globalThis.document.body\n      )\n    : null;\n};\n\nconst rotation = keyframes`\n    from {\n      transform: rotate(0deg);\n    }\n    to {\n      transform: rotate(359deg);\n    }\n  `;\n\nconst LoaderReload = styled(Refresh)`\n  animation: ${rotation} 1s infinite linear;\n`;\n\nconst Overlay = styled(Flex)`\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  /* TODO: set this up in the theme for consistence z-index values */\n  z-index: 1140;\n  padding-top: ${pxToRem(160)};\n\n  & > * {\n    position: relative;\n    z-index: 1;\n  }\n\n  &:before {\n    content: '';\n    position: fixed;\n    top: 0;\n    right: 0;\n    bottom: 0;\n    left: 0;\n    background: ${({ theme }) => theme.colors.neutral0};\n    opacity: 0.9;\n  }\n`;\n\nconst IconBox = styled(Box)`\n  border-radius: 50%;\n  svg {\n    > path {\n      fill: ${({ theme }) => theme.colors.primary600} !important;\n    }\n  }\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Hook\n * -----------------------------------------------------------------------------------------------*/\n\nconst useAutoReloadOverlayBlocker = () => React.useContext(AutoReloadOverlayBlockerContext);\n\nexport {\n  AutoReloadOverlayBlockerContext,\n  AutoReloadOverlayBlockerProvider,\n  useAutoReloadOverlayBlocker,\n};\n","import * as React from 'react';\n\nimport { AnySchema } from 'yup';\n\nimport type { TranslationMessage } from '../types';\n/**\n * @TODO: Custom field types should be defined and exported from the registry:\n * packages/core/admin/admin/src/core/apis/CustomFields.js\n */\ninterface CustomFieldComponents {\n  Input: () => Promise<{ default?: React.ComponentType }>;\n}\n\ntype CustomFieldType =\n  | 'biginteger'\n  | 'boolean'\n  | 'date'\n  | 'datetime'\n  | 'decimal'\n  | 'email'\n  | 'enumeration'\n  | 'float'\n  | 'integer'\n  | 'json'\n  | 'password'\n  | 'richtext'\n  | 'string'\n  | 'text'\n  | 'time'\n  | 'uid';\n\ntype CustomFieldOptionInput =\n  | 'text'\n  | 'checkbox'\n  | 'checkbox-with-number-field'\n  | 'select-default-boolean'\n  | 'date'\n  | 'select'\n  | 'number'\n  | 'boolean-radio-group'\n  | 'select-date'\n  | 'text-area-enum'\n  | 'select-number'\n  | 'radio-group';\n\ntype CustomFieldOptionName =\n  | 'min'\n  | 'minLength'\n  | 'max'\n  | 'maxLength'\n  | 'required'\n  | 'regex'\n  | 'enum'\n  | 'unique'\n  | 'private'\n  | 'default';\n\ninterface CustomFieldOption {\n  intlLabel: TranslationMessage;\n  description: TranslationMessage;\n  name: CustomFieldOptionName;\n  type: CustomFieldOptionInput;\n  defaultValue?: string | number | boolean | Date;\n}\n\ninterface CustomFieldOptionSection {\n  sectionTitle: TranslationMessage | null;\n  items: CustomFieldOption[];\n}\n\ninterface CustomFieldOptions {\n  base?: (CustomFieldOptionSection | CustomFieldOption)[];\n  advanced?: (CustomFieldOptionSection | CustomFieldOption)[];\n  validator?: () => Record<string, AnySchema>;\n}\n\ninterface CustomField {\n  name: string;\n  pluginId?: string;\n  type: CustomFieldType;\n  intlLabel: TranslationMessage;\n  intlDescription: TranslationMessage;\n  icon?: React.ComponentType;\n  components: CustomFieldComponents;\n  options?: CustomFieldOptions;\n}\n\ntype CustomFieldUID = `plugin::${string}.${string}` | `global::${string}`;\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\ninterface CustomFieldsContextValue {\n  get: (uid: string) => CustomField | undefined;\n  getAll: () => Record<string, CustomField>;\n}\n\nconst CustomFieldsContext = React.createContext<CustomFieldsContextValue>({\n  get() {\n    return undefined;\n  },\n  getAll() {\n    return {};\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Provider\n * -----------------------------------------------------------------------------------------------*/\n\ninterface CustomFieldsProviderProps {\n  children: React.ReactNode;\n  customFields: CustomFieldsContextValue;\n}\n\nconst CustomFieldsProvider = ({ children, customFields }: CustomFieldsProviderProps) => {\n  const get = customFields.get.bind(customFields);\n  const getAll = customFields.getAll.bind(customFields);\n\n  const value = React.useMemo(() => ({ get, getAll }), [get, getAll]);\n\n  return <CustomFieldsContext.Provider value={value}>{children}</CustomFieldsContext.Provider>;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Hook\n * -----------------------------------------------------------------------------------------------*/\n\nconst useCustomFields = () => React.useContext(CustomFieldsContext);\n\nexport { CustomFieldsContext, CustomFieldsProvider, useCustomFields };\nexport type {\n  CustomFieldsProviderProps,\n  CustomField,\n  CustomFieldComponents,\n  CustomFieldOptionSection,\n  CustomFieldOption,\n  CustomFieldOptions,\n  CustomFieldUID,\n};\n","import * as React from 'react';\n\n/**\n * TODO: whats the value in having this in the `helper-plugin`? is it actually\n * used externally. I doubt it.\n */\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * ------------------------------------------------------------------------------------------------*/\n\ntype SectionKey = keyof GuidedTourContextValue['guidedTourState'];\ntype StepKey = keyof GuidedTourContextValue['guidedTourState'][SectionKey];\ntype Step = `${SectionKey}.${StepKey}`;\ninterface GuidedTourContextValue {\n  currentStep: Step | null;\n  guidedTourState: {\n    contentTypeBuilder: {\n      create: boolean;\n      success: boolean;\n    };\n    contentManager: {\n      create: boolean;\n      success: boolean;\n    };\n    apiTokens: {\n      create: boolean;\n      success: boolean;\n    };\n    transferTokens: {\n      create: boolean;\n      success: boolean;\n    };\n  };\n  isGuidedTourVisible: boolean;\n  isSkipped: boolean;\n  setCurrentStep: (step: Step | null) => void | null;\n  setGuidedTourVisibility: (isVisible: boolean) => void;\n  setSkipped: (isSkipped: boolean) => void;\n  setStepState: (step: Step, state: boolean) => void;\n  startSection: (section: SectionKey) => void;\n}\n\nconst GuidedTourContext = React.createContext<GuidedTourContextValue>({\n  currentStep: null,\n  guidedTourState: {\n    contentTypeBuilder: {\n      create: false,\n      success: false,\n    },\n    contentManager: {\n      create: false,\n      success: false,\n    },\n    apiTokens: {\n      create: false,\n      success: false,\n    },\n    transferTokens: {\n      create: false,\n      success: false,\n    },\n  },\n  isGuidedTourVisible: false,\n  isSkipped: true,\n  setCurrentStep: () => null,\n  setGuidedTourVisibility: () => null,\n  setSkipped: () => null,\n  setStepState: () => null,\n  startSection: () => null,\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Provider\n * -----------------------------------------------------------------------------------------------*/\n\ninterface GuidedTourProviderProps extends GuidedTourContextValue {\n  children: React.ReactNode;\n}\n\nconst GuidedTourProvider = ({\n  children,\n  currentStep = null,\n  guidedTourState,\n  isGuidedTourVisible = false,\n  isSkipped,\n  setCurrentStep,\n  setGuidedTourVisibility,\n  setSkipped,\n  setStepState,\n  startSection,\n}: GuidedTourProviderProps) => {\n  const value = React.useMemo(\n    () => ({\n      currentStep,\n      guidedTourState,\n      isGuidedTourVisible,\n      isSkipped,\n      setCurrentStep,\n      setGuidedTourVisibility,\n      setSkipped,\n      setStepState,\n      startSection,\n    }),\n    [\n      currentStep,\n      guidedTourState,\n      isGuidedTourVisible,\n      isSkipped,\n      setCurrentStep,\n      setGuidedTourVisibility,\n      setSkipped,\n      setStepState,\n      startSection,\n    ]\n  );\n\n  return <GuidedTourContext.Provider value={value}>{children}</GuidedTourContext.Provider>;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Hook\n * -----------------------------------------------------------------------------------------------*/\n\nconst useGuidedTour = () => React.useContext(GuidedTourContext);\n\ntype GuidedTourStep = Step;\ntype GuidedTourSectionKey = SectionKey;\ntype GuidedTourStepKey = StepKey;\n\nexport { GuidedTourContext, GuidedTourProvider, useGuidedTour };\nexport type { GuidedTourContextValue, GuidedTourStep, GuidedTourSectionKey, GuidedTourStepKey };\n","import * as React from 'react';\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\ninterface LibraryContextValue {\n  fields?: Record<string, React.ComponentType>;\n  components?: Record<string, React.ComponentType>;\n}\n\nconst LibraryContext = React.createContext<LibraryContextValue>({});\n\n/* -------------------------------------------------------------------------------------------------\n * Provider\n * -----------------------------------------------------------------------------------------------*/\n\ninterface LibraryProviderProps extends LibraryContextValue {\n  children: React.ReactNode;\n}\n\nconst LibraryProvider = ({ children, fields, components }: LibraryProviderProps) => {\n  const value = React.useMemo(() => ({ fields, components }), [fields, components]);\n\n  return <LibraryContext.Provider value={value}>{children}</LibraryContext.Provider>;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Hook\n * -----------------------------------------------------------------------------------------------*/\n\nconst useLibrary = () => React.useContext(LibraryContext);\n\nexport { LibraryContext, LibraryProvider, useLibrary };\nexport type { LibraryContextValue, LibraryProviderProps };\n","/* eslint-disable no-undef */\nimport * as React from 'react';\n\nimport { Box } from '@strapi/design-system';\nimport { createPortal } from 'react-dom';\nimport styled from 'styled-components';\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\ninterface OverlayBlockerContextValue {\n  lockApp?: () => void;\n  unlockApp?: () => void;\n}\n\nconst OverlayBlockerContext = React.createContext<OverlayBlockerContextValue>({});\n\n/* -------------------------------------------------------------------------------------------------\n * Provider\n * -----------------------------------------------------------------------------------------------*/\n\ninterface OverlayBlockerProviderProps {\n  children: React.ReactNode;\n}\n\nconst OverlayBlockerProvider = ({ children }: OverlayBlockerProviderProps) => {\n  const [isOpen, setIsOpen] = React.useState(false);\n\n  const lockApp = React.useCallback(() => {\n    setIsOpen(true);\n  }, []);\n\n  const unlockApp = React.useCallback(() => {\n    setIsOpen(false);\n  }, []);\n\n  const contextValue = React.useMemo(() => ({ lockApp, unlockApp }), [lockApp, unlockApp]);\n\n  return (\n    <OverlayBlockerContext.Provider value={contextValue}>\n      {children}\n      {isOpen && globalThis?.document?.body\n        ? createPortal(<Overlay id=\"overlayBlocker\" />, globalThis.document.body)\n        : null}\n    </OverlayBlockerContext.Provider>\n  );\n};\n\nconst Overlay = styled(Box)`\n  position: fixed;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  /* TODO: set this up in the theme for consistence z-index values */\n  z-index: 1140;\n`;\n\n/* -------------------------------------------------------------------------------------------------\n * Hook\n * -----------------------------------------------------------------------------------------------*/\n\nconst useOverlayBlocker = () => React.useContext(OverlayBlockerContext);\n\nexport { OverlayBlockerContext, OverlayBlockerProvider, useOverlayBlocker };\n","const ERROR_PREFIX = 'apiError.';\n\n/**\n * Prefix message with 'apiError.'\n */\nexport function getPrefixedId(message: string, callback?: (prefixedMessage: string) => string) {\n  const prefixedMessage = `${ERROR_PREFIX}${message}`;\n\n  // if a prefix function has been passed in it is used to\n  // prefix the id, e.g. to allow an error message to be\n  // set only for a localization namespace\n  if (typeof callback === 'function') {\n    return callback(prefixedMessage);\n  }\n\n  return prefixedMessage;\n}\n","import { AxiosError } from 'axios';\n\nimport { getPrefixedId } from './getPrefixedId';\n\nimport type { ApiError } from '../types';\nimport type { errors } from '@strapi/utils';\n\nexport interface NormalizeErrorOptions {\n  name?: string;\n  intlMessagePrefixCallback?: (id: string) => string;\n}\n\ninterface NormalizeErrorReturn {\n  id: string;\n  defaultMessage: string;\n  name?: string;\n  values: Record<'path', string> | Record<string, never>;\n}\n\ninterface YupFormattedError {\n  path: string[];\n  message: string;\n  name: string;\n}\n\nfunction normalizeError(\n  error: ApiError | YupFormattedError,\n  { name, intlMessagePrefixCallback }: NormalizeErrorOptions\n): NormalizeErrorReturn {\n  const { message } = error;\n\n  const normalizedError = {\n    id: getPrefixedId(message, intlMessagePrefixCallback),\n    defaultMessage: message,\n    name: error.name ?? name,\n    values: {},\n  };\n\n  if ('path' in error) {\n    normalizedError.values = { path: error.path.join('.') };\n  }\n\n  return normalizedError;\n}\n\nconst validateErrorIsYupValidationError = (\n  err: ApiError\n): err is errors.YupValidationError & { details: { errors: YupFormattedError[] } } =>\n  typeof err.details === 'object' && err.details !== null && 'errors' in err.details;\n\nexport function normalizeAPIError(\n  apiError: AxiosError<{ error: ApiError }>,\n  intlMessagePrefixCallback?: NormalizeErrorOptions['intlMessagePrefixCallback']\n):\n  | NormalizeErrorReturn\n  | { name: string; message: string | null; errors: NormalizeErrorReturn[] }\n  | null {\n  const error = apiError.response?.data.error;\n\n  if (error) {\n    // some errors carry multiple errors (such as ValidationError)\n    if (validateErrorIsYupValidationError(error)) {\n      return {\n        name: error.name,\n        message: error?.message || null,\n        errors: error.details.errors.map((err) =>\n          normalizeError(err, { name: error.name, intlMessagePrefixCallback })\n        ),\n      };\n    }\n\n    return normalizeError(error, { intlMessagePrefixCallback });\n  }\n\n  return null;\n}\n","import { AxiosError } from 'axios';\nimport { IntlFormatters, useIntl } from 'react-intl';\n\nimport { ApiError } from '../types';\nimport { getPrefixedId } from '../utils/getPrefixedId';\nimport { NormalizeErrorOptions, normalizeAPIError } from '../utils/normalizeAPIError';\n\ninterface UnknownApiError {\n  name: 'UnknownError';\n  message: string;\n  details?: unknown;\n  status?: number;\n}\n\n/**\n * The last item is the fallback error SerializedError which\n * typically comes from redux-toolkit itself.\n */\ninterface SerializedError {\n  name?: string;\n  message?: string;\n  stack?: string;\n  code?: string;\n}\n\n/**\n * These are the types or errors we return\n * from the redux-toolkit data-fetching setup.\n */\n\ntype BaseQueryError = ApiError | UnknownApiError | SerializedError;\n\ninterface YupFormattedError {\n  path: string[];\n  message: string;\n  name: string;\n}\n\n/**\n * Hook that exports an error message formatting function.\n */\nexport function useAPIErrorHandler(\n  intlMessagePrefixCallback?: FormatAPIErrorOptions['intlMessagePrefixCallback']\n) {\n  const { formatMessage } = useIntl();\n\n  const formatError = (error: AxiosError<{ error: ApiError }>) => {\n    // Try to normalize the passed error first. This will fail for e.g. network\n    // errors which are thrown by Axios directly.\n    try {\n      const formattedErr = formatAPIError(error, { intlMessagePrefixCallback, formatMessage });\n\n      if (!formattedErr) {\n        return formatAxiosError(error, { intlMessagePrefixCallback, formatMessage });\n      }\n\n      return formattedErr;\n    } catch (_) {\n      throw new Error('formatAPIError: Unknown error:', error);\n    }\n  };\n\n  return {\n    /**\n     * @alpha\n     * Convert ValidationErrors from the API into an object that can be used by forms.\n     */\n    _unstableFormatValidationErrors: (\n      error: Extract<BaseQueryError, { name: 'ValidationError' }>\n    ): Record<string, string> => {\n      if (typeof error.details === 'object' && error.details !== null) {\n        if ('errors' in error.details && Array.isArray(error.details.errors)) {\n          const validationErrors = error.details.errors as YupFormattedError[];\n\n          return validationErrors.reduce((acc, err) => {\n            const { path, message } = err;\n\n            return {\n              ...acc,\n              [path.join('.')]: message,\n            };\n          }, {});\n        } else {\n          const details = error.details as Record<string, string[]>;\n\n          return Object.keys(details).reduce((acc, key) => {\n            const messages = details[key];\n\n            return {\n              ...acc,\n              [key]: messages.join(', '),\n            };\n          }, {});\n        }\n      } else {\n        return {};\n      }\n    },\n    /**\n     * @alpha\n     * This handles the errors given from `redux-toolkit`'s axios based baseQuery function.\n     */\n    _unstableFormatAPIError: (error: BaseQueryError) => {\n      const err = {\n        response: {\n          data: {\n            error,\n          },\n        },\n      } as AxiosError<{ error: BaseQueryError }>;\n\n      /**\n       * There's a chance with SerializedErrors that the message is not set.\n       * In that case we return a generic error message.\n       */\n      if (!error.message) {\n        return 'Unknown error occured.';\n      }\n\n      // @ts-expect-error – UnknownApiError is in the same shape as ApiError, but we don't want to expose this to users yet.\n      return formatError(err);\n    },\n    formatAPIError: formatError,\n  };\n}\n\nfunction formatAxiosError(\n  error: AxiosError<unknown>,\n  { intlMessagePrefixCallback, formatMessage }: FormatAPIErrorOptions\n) {\n  const { code, message } = error;\n\n  return formatMessage(\n    {\n      id: getPrefixedId(message, intlMessagePrefixCallback),\n      defaultMessage: message,\n    },\n    {\n      code,\n    }\n  );\n}\n\ntype FormatAPIErrorOptions = Partial<Pick<NormalizeErrorOptions, 'intlMessagePrefixCallback'>> &\n  Pick<IntlFormatters, 'formatMessage'>;\n\n/**\n * Method to stringify an API error object\n */\nfunction formatAPIError(\n  error: AxiosError<{ error: ApiError }>,\n  { formatMessage, intlMessagePrefixCallback }: FormatAPIErrorOptions\n) {\n  if (!formatMessage) {\n    throw new Error('The formatMessage callback is a mandatory argument.');\n  }\n\n  const normalizedError = normalizeAPIError(error, intlMessagePrefixCallback);\n\n  if (!normalizedError) {\n    return null;\n  }\n\n  if ('message' in normalizedError && normalizedError.message !== null) {\n    return normalizedError.message;\n  }\n\n  // stringify multiple errors\n  if ('errors' in normalizedError) {\n    return normalizedError.errors\n      .map(({ id, defaultMessage, values }) => formatMessage({ id, defaultMessage }, values))\n      .join('\\n');\n  }\n\n  return formatMessage(normalizedError);\n}\n\nexport type { ApiError };\n","import { useCallback } from 'react';\n\nexport const useClipboard = () => {\n  const copy = useCallback(async (value: string | number) => {\n    try {\n      // only strings and numbers casted to strings can be copied to clipboard\n      if (typeof value !== 'string' && typeof value !== 'number') {\n        throw new Error(`Cannot copy typeof ${typeof value} to clipboard, must be a string`);\n      }\n      // empty strings are also considered invalid\n      else if (value === '') {\n        throw new Error(`Cannot copy empty string to clipboard.`);\n      }\n\n      const stringifiedValue = value.toString();\n\n      await navigator.clipboard.writeText(stringifiedValue);\n\n      return true;\n    } catch (error) {\n      /**\n       * Realistically this isn't useful in production as there's nothing the user can do.\n       */\n      if (process.env.NODE_ENV === 'development') {\n        console.warn('Copy failed', error);\n      }\n\n      return false;\n    }\n  }, []);\n\n  return { copy };\n};\n","/**\n * Borrowed from @react-aria/i18n\n */\n\n/**\n * A cache of collators for the current locale.\n */\nconst cache = new Map<string, Intl.Collator>();\n\n/**\n * Provides localized string collation for the current locale. Automatically updates when the locale changes,\n * and handles caching of the collator for performance.\n */\nexport function useCollator(locale: string, options?: Intl.CollatorOptions): Intl.Collator {\n  const cacheKey =\n    locale +\n    (options\n      ? Object.entries(options)\n          .sort((a, b) => (a[0] < b[0] ? -1 : 1))\n          .join()\n      : '');\n\n  if (cache.has(cacheKey)) {\n    return cache.get(cacheKey)!;\n  }\n\n  const formatter = new Intl.Collator(locale, options);\n  cache.set(cacheKey, formatter);\n\n  return formatter;\n}\n","/**\n *\n * useFetchClient\n *\n */\nimport { useEffect, useMemo, useRef } from 'react';\n\nimport { getFetchClient } from '../utils/getFetchClient';\n\nconst useFetchClient = () => {\n  const controller = useRef<AbortController | null>(null);\n\n  if (controller.current === null) {\n    controller.current = new AbortController();\n  }\n\n  useEffect(() => {\n    return () => {\n      controller.current!.abort();\n    };\n  }, []);\n\n  return useMemo(\n    () =>\n      getFetchClient({\n        signal: controller.current!.signal,\n      }),\n    []\n  );\n};\n\nexport { useFetchClient };\n","/**\n * Borrowed from @react-aria/i18n\n */\n\nimport { useCollator } from './useCollator';\n\ninterface Filter {\n  startsWith(string: string, substring: string): boolean; // Returns whether a string starts with a given substring.\n  endsWith(string: string, substring: string): boolean; // Returns whether a string ends with a given substring.\n  includes(string: string, substring: string): boolean; // Returns whether a string contains a given substring.\n}\n\n/**\n * Provides localized string search functionality that is useful for filtering or matching items\n * in a list. Options can be provided to adjust the sensitivity to case, diacritics, and other parameters.\n */\nexport function useFilter(locale: string, options?: Intl.CollatorOptions): Filter {\n  const collator = useCollator(locale, {\n    usage: 'search',\n    ...options,\n  });\n\n  return {\n    startsWith(string, substring) {\n      if (substring.length === 0) {\n        return true;\n      }\n\n      // Normalize both strings so we can slice safely\n      string = string.normalize('NFC');\n      substring = substring.normalize('NFC');\n\n      return collator.compare(string.slice(0, substring.length), substring) === 0;\n    },\n    endsWith(string, substring) {\n      if (substring.length === 0) {\n        return true;\n      }\n\n      string = string.normalize('NFC');\n      substring = substring.normalize('NFC');\n\n      return collator.compare(string.slice(-substring.length), substring) === 0;\n    },\n    includes(string, substring) {\n      if (substring.length === 0) {\n        return true;\n      }\n\n      string = string.normalize('NFC');\n      substring = substring.normalize('NFC');\n\n      let scan = 0;\n      const sliceLen = substring.length;\n      for (; scan + sliceLen <= string.length; scan++) {\n        const slice = string.slice(scan, scan + sliceLen);\n\n        if (collator.compare(substring, slice) === 0) {\n          return true;\n        }\n      }\n\n      return false;\n    },\n  };\n}\n","import * as React from 'react';\ninterface UseFocusWhenNavigateProps {\n  selector?: string;\n  dependencies?: React.DependencyList;\n}\n\nconst useFocusWhenNavigate = ({\n  selector = 'main',\n  dependencies = [],\n}: UseFocusWhenNavigateProps = {}) => {\n  React.useEffect(() => {\n    const mainElement: HTMLElement | null = document.querySelector(selector);\n\n    if (mainElement) {\n      mainElement.focus();\n      window.scrollTo({ top: 0 });\n    } else {\n      console.warn(\n        `[useFocusWhenNavigate] The page does not contain the selector \"${selector}\" and can't be focused.`\n      );\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, dependencies);\n};\n\nexport { useFocusWhenNavigate };\n","import * as React from 'react';\n\ninterface LockScrollProps {\n  lockScroll: boolean;\n}\n\nconst useLockScroll = ({ lockScroll }: LockScrollProps) => {\n  React.useEffect(() => {\n    if (lockScroll) {\n      document.body.classList.add('lock-body-scroll');\n    }\n\n    return () => {\n      document.body.classList.remove('lock-body-scroll');\n    };\n  }, [lockScroll]);\n};\n\nexport { useLockScroll };\n","import { useEffect, useState } from 'react';\n\nconst usePersistentState = <T>(key: string, defaultValue: T) => {\n  const [value, setValue] = useState<T>(() => {\n    const stickyValue = window.localStorage.getItem(key);\n\n    if (stickyValue !== null) {\n      try {\n        return JSON.parse(stickyValue);\n      } catch {\n        // JSON.parse fails when the stored value is a primitive\n        return stickyValue;\n      }\n    }\n\n    return defaultValue;\n  });\n\n  useEffect(() => {\n    window.localStorage.setItem(key, JSON.stringify(value));\n  }, [key, value]);\n\n  return [value, setValue] as const;\n};\n\nexport { usePersistentState };\n","import { useCallback, useMemo, useState } from 'react';\n\nimport { useQueries } from 'react-query';\n\nimport { useRBACProvider, Permission } from '../features/RBAC';\n\nimport { useFetchClient } from './useFetchClient';\n\nimport type { AxiosResponse } from 'axios';\n\nexport type AllowedActions = Record<string, boolean>;\n\nexport const useRBAC = (\n  permissionsToCheck: Record<string, Permission[]> = {},\n  passedPermissions?: Permission[]\n): { allowedActions: AllowedActions; isLoading: boolean; setIsLoading: () => void } => {\n  const [internalIsLoading, setInternalIsLoading] = useState(false);\n  /**\n   * This is the default value we return until the queryResults[i].data\n   * are all resolved with data. This preserves the original behaviour.\n   */\n  const defaultAllowedActions = useMemo(\n    () =>\n      Object.keys(permissionsToCheck).map((name) => ({\n        name,\n        hasPermission: false,\n      })),\n    [permissionsToCheck]\n  );\n\n  const { allPermissions } = useRBACProvider();\n  const { post } = useFetchClient();\n\n  const userPermissions = passedPermissions || allPermissions;\n\n  const permissionsToCheckEntries = Object.entries(permissionsToCheck);\n\n  const queryResults = useQueries(\n    permissionsToCheckEntries.map(([name, permissions]) => ({\n      queryKey: ['useRBAC', name, ...permissions, userPermissions],\n      async queryFn() {\n        if (!permissions || !permissions.length) {\n          return { name, hasPermission: true };\n        }\n\n        if (!userPermissions) return;\n\n        const matchingPermissions = userPermissions.filter((value) => {\n          const associatedPermission = permissions.find(\n            (perm) => perm.action === value.action && perm.subject === value.subject\n          );\n\n          return associatedPermission !== undefined;\n        });\n\n        if (\n          matchingPermissions.length > 0 &&\n          matchingPermissions.every(\n            (permission) => Array.isArray(permission.conditions) && permission.conditions.length > 0\n          )\n        ) {\n          /**\n           * We only \"check\" when there are conditions to check against.\n           * Otherwise, knowing there's a matching permission is enough.\n           */\n          try {\n            const {\n              data: { data },\n            } = await post<\n              { data: { data: boolean[] } },\n              AxiosResponse<{ data: { data: boolean[] } }>\n            >('/admin/permissions/check', {\n              permissions: matchingPermissions.map(({ action, subject }) => ({\n                action,\n                subject,\n              })),\n            });\n\n            return { name, hasPermission: Array.isArray(data) && data.every((v) => v === true) };\n          } catch (err) {\n            /**\n             * We don't notify the user if the request fails.\n             * Instead we declare they dont have the permission.\n             *\n             * TODO: is this accurate?\n             */\n            return { name, hasPermission: false };\n          }\n        }\n\n        return { name, hasPermission: matchingPermissions.length > 0 };\n      },\n    }))\n  );\n\n  /**\n   * This function is used to synchronise the hook when used in dynamic components\n   *\n   * TODO: Is this still needed?\n   */\n  const setIsLoading = useCallback(() => {\n    setInternalIsLoading(true);\n  }, []);\n\n  const isLoading = internalIsLoading || queryResults.some((res) => res.isLoading);\n\n  const data = queryResults.map((res) => res.data);\n\n  /**\n   * This hook originally would not return allowedActions\n   * until all the checks were complete.\n   */\n  const allowedActions = (\n    data.some((res) => res === undefined) ? defaultAllowedActions : data\n  ).reduce((acc, permission) => {\n    if (!permission) return acc;\n\n    const { name, hasPermission } = permission;\n\n    acc[`can${capitalize(name)}`] = hasPermission;\n\n    return acc;\n  }, {} as AllowedActions);\n\n  return { allowedActions, isLoading, setIsLoading };\n};\n\nconst capitalize = (str: string) => str.charAt(0).toUpperCase() + str.slice(1);\n","import { useState } from 'react';\n\nexport const useSelectionState = <TValues extends object>(\n  keys: Array<keyof TValues>,\n  initialValue: TValues[]\n) => {\n  const [selections, setSelections] = useState(initialValue);\n\n  const selectOne = (selection: TValues) => {\n    const index = selections.findIndex((currentSelection) =>\n      keys.every((key) => currentSelection[key] === selection[key])\n    );\n\n    if (index > -1) {\n      setSelections((prevSelected) => [\n        ...prevSelected.slice(0, index),\n        ...prevSelected.slice(index + 1),\n      ]);\n    } else {\n      setSelections((prevSelected) => [...prevSelected, selection]);\n    }\n  };\n\n  const selectAll = (nextSelections: TValues[]) => {\n    if (selections.length > 0) {\n      setSelections([]);\n    } else {\n      setSelections(nextSelections);\n    }\n  };\n\n  const selectOnly = (nextSelection: TValues) => {\n    if (selections.indexOf(nextSelection) > -1) {\n      setSelections([]);\n    } else {\n      setSelections([nextSelection]);\n    }\n  };\n\n  const selectMultiple = (nextSelections: TValues[]) => {\n    setSelections((currSelections) => [\n      // already selected items\n      ...currSelections,\n      // filter out already selected items from nextSelections\n      ...nextSelections.filter(\n        (nextSelection) =>\n          currSelections.findIndex((currentSelection) =>\n            keys.every((key) => currentSelection[key] === nextSelection[key])\n          ) === -1\n      ),\n    ]);\n  };\n\n  const deselectMultiple = (nextSelections: TValues[]) => {\n    setSelections((currSelections) => [\n      // filter out items in currSelections that are in nextSelections\n      ...currSelections.filter(\n        (currentSelection) =>\n          nextSelections.findIndex((nextSelection) =>\n            keys.every((key) => currentSelection[key] === nextSelection[key])\n          ) === -1\n      ),\n    ]);\n  };\n\n  return [\n    selections,\n    { selectOne, selectAll, selectOnly, selectMultiple, deselectMultiple, setSelections },\n  ] as const;\n};\n","import { IconButton, IconButtonProps } from '@strapi/design-system';\nimport { Minus } from '@strapi/icons';\nimport styled from 'styled-components';\n\nimport { pxToRem } from '../utils/pxToRem';\n\nconst StyledIconButton = styled(IconButton)(\n  ({ theme }) => `\n  border-radius: ${pxToRem(30)};\n  width: ${pxToRem(20)};\n  height: ${pxToRem(20)};\n  padding: ${pxToRem(3)};\n  align-items: center;\n  justify-content: center;\n  svg {\n    width: ${pxToRem(8)};\n    rect {\n      fill: ${theme.colors.primary600}\n    }\n  }\n`\n);\n\ninterface RemoveRoundedButtonProps\n  extends Omit<IconButtonProps, 'icon'>,\n    Partial<Pick<IconButtonProps, 'icon'>> {}\n\nconst RemoveRoundedButton = (props: RemoveRoundedButtonProps) => (\n  <StyledIconButton icon={<Minus />} {...props} />\n);\n\nexport { RemoveRoundedButton };\nexport type { RemoveRoundedButtonProps };\n","import get from 'lodash/get';\n\nimport { getOtherInfos, getType } from './getAttributeInfos';\n\nimport type { Attribute, Schema } from '@strapi/types';\n\nconst defaultFields = ['createdBy', 'updatedBy', 'publishedAt', 'id', '_id'];\n\nconst contentManagementUtilRemoveFieldsFromData = <\n  TSchema extends Schema.ContentType,\n  TData extends { [K in keyof TSchema['attributes']]: Attribute.GetValue<TSchema['attributes'][K]> }\n>(\n  data: TData,\n  contentTypeSchema: TSchema,\n  componentSchema: Record<string, Schema.Component>,\n  fields = defaultFields\n) => {\n  const recursiveCleanData = <\n    TSchemum extends Schema.Schema,\n    TDatum extends {\n      [P in keyof TSchemum['attributes']]: Attribute.GetValue<TSchemum['attributes'][P]>;\n    }\n  >(\n    data: TDatum,\n    schema: TSchemum\n  ) => {\n    return Object.keys(data).reduce((acc, current) => {\n      const attrType = getType(schema, current);\n      const value = get(data, current);\n      const component = getOtherInfos(schema, [current, 'component']);\n      const isRepeatable = getOtherInfos(schema, [current, 'repeatable']);\n      let timestamps = get(schema, ['options', 'timestamps']);\n\n      if (!Array.isArray(timestamps)) {\n        timestamps = [];\n      }\n\n      if ([...fields, ...timestamps].indexOf(current) !== -1) {\n        delete acc[current];\n\n        return acc;\n      }\n\n      if (!value) {\n        return acc;\n      }\n\n      if (attrType === 'dynamiczone' && Array.isArray(value)) {\n        // @ts-expect-error – TODO: fix the fact we can't assign this.\n        acc[current] = value.map((componentValue) => {\n          const subCleanedData = recursiveCleanData(\n            componentValue,\n            componentSchema[componentValue.__component]\n          );\n\n          return subCleanedData;\n        });\n\n        return acc;\n      }\n\n      if (attrType === 'component') {\n        if (isRepeatable && Array.isArray(value)) {\n          // @ts-expect-error – TODO: fix the fact we can't assign this.\n          acc[current] = value.map((compoData) => {\n            const subCleanedData = recursiveCleanData(compoData, componentSchema[component]);\n\n            return subCleanedData;\n          });\n        } else {\n          // @ts-expect-error – TODO: fix the fact we can't assign this.\n          acc[current] = recursiveCleanData(value, componentSchema[component]);\n        }\n\n        return acc;\n      }\n\n      return acc;\n    }, Object.assign({}, data) as TDatum);\n  };\n\n  return recursiveCleanData(data, contentTypeSchema);\n};\n\nexport { contentManagementUtilRemoveFieldsFromData };\n","// NOTE: this function is for adding a __temp_key__ key to each object of a repeatable component\n// in order to have a unique identifier for the DnD\n\nimport get from 'lodash/get';\n\nimport { getOtherInfos, getType } from './getAttributeInfos';\n\nimport type { Attribute, Schema } from '@strapi/types';\n\nconst formatContentTypeData = <\n  TSchema extends Schema.ContentType,\n  TData extends { [K in keyof TSchema['attributes']]: Attribute.GetValue<TSchema['attributes'][K]> }\n>(\n  data: TData,\n  ct: TSchema,\n  composSchema: Record<string, Schema.Component>\n) => {\n  const recursiveFormatData = <\n    TSchemum extends Schema.Schema,\n    TDatum extends {\n      [P in keyof TSchemum['attributes']]: Attribute.GetValue<TSchemum['attributes'][P]>;\n    }\n  >(\n    data: TDatum,\n    schema: TSchemum\n  ) => {\n    return Object.keys(data).reduce((acc, current) => {\n      const type = getType(schema, current);\n      const value = get(data, current);\n      const compoUid = getOtherInfos(schema, [current, 'component']);\n      const isRepeatable = getOtherInfos(schema, [current, 'repeatable']);\n\n      if (type === 'json' && value !== undefined) {\n        // @ts-expect-error – TODO: fix the fact we can't assign this.\n        acc[current] = JSON.stringify(value, null, 2);\n\n        return acc;\n      }\n\n      if (!value) {\n        // @ts-expect-error – TODO: fix the fact we can't assign this.\n        acc[current] = value;\n\n        return acc;\n      }\n\n      if (type === 'dynamiczone' && Array.isArray(value)) {\n        // @ts-expect-error – TODO: fix the fact we can't assign this.\n        acc[current] = value.map((componentValue) => {\n          const formattedData = recursiveFormatData(\n            componentValue,\n            composSchema[componentValue.__component]\n          );\n\n          return formattedData;\n        });\n\n        return acc;\n      }\n\n      if (type === 'component') {\n        let formattedValue;\n\n        if (isRepeatable && Array.isArray(value)) {\n          formattedValue = value.map((obj, i) => {\n            const newObj = { ...obj, __temp_key__: i };\n\n            return recursiveFormatData(newObj, composSchema[compoUid]);\n          });\n        } else {\n          formattedValue = recursiveFormatData(value, composSchema[compoUid]);\n        }\n\n        // @ts-expect-error – TODO: fix the fact we can't assign this.\n        acc[current] = formattedValue;\n\n        return acc;\n      }\n\n      // @ts-expect-error – TODO: fix the fact we can't assign this.\n      acc[current] = value;\n\n      return acc;\n    }, {} as TDatum);\n  };\n\n  return recursiveFormatData(data, ct);\n};\n\nexport { formatContentTypeData };\n","/**\n * Async await wrapper for easy error handling\n *\n *\n * @deprecated This function will be removed in the next major release. Use async / await with try / catch instead.\n */\nconst to = (promise: Promise<unknown>, errorExt?: object) => {\n  return promise\n    .then(function (data) {\n      return [null, data];\n    })\n    .catch(function (err) {\n      if (errorExt) {\n        Object.assign(err, errorExt);\n      }\n      return [err, undefined];\n    });\n};\n\nexport { to };\n","import isEqual from 'lodash/isEqual';\nimport isObject from 'lodash/isObject';\nimport transform from 'lodash/transform';\n\ntype ObjectDiff<T> = {\n  [P in keyof T]?: T[P] extends Record<string, unknown> ? ObjectDiff<T[P]> : T[P];\n};\n\nfunction difference<T extends Record<string, unknown>>(object: T, base: T): ObjectDiff<T> {\n  function changes(object: T, base: T): ObjectDiff<T> {\n    return transform(object, (result, value: any, key: keyof ObjectDiff<T>) => {\n      if (!isEqual(value, base[key])) {\n        result[key] =\n          isObject(value) && isObject(base[key]) ? changes(value as T, base[key] as T) : value;\n      }\n      return result;\n    });\n  }\n\n  return changes(object, base);\n}\n\nexport { difference };\n","import { AxiosError } from 'axios';\n\nimport { normalizeAPIError } from './normalizeAPIError';\n\nimport type { ApiError } from '../types';\nimport type { MessageDescriptor } from 'react-intl';\n\ninterface GetAPIInnerErrorsOptions {\n  getTrad: (id: string) => string;\n}\n\n/**\n *\n * Returns a normalized error message\n *\n * @deprecated\n * @preserve\n */\nexport function getAPIInnerErrors(\n  error: AxiosError<{ error: ApiError }>,\n  { getTrad }: GetAPIInnerErrorsOptions\n) {\n  const normalizedError = normalizeAPIError(error, getTrad);\n\n  if (normalizedError && 'errors' in normalizedError) {\n    return normalizedError.errors.reduce<Record<string, MessageDescriptor>>((acc, error) => {\n      if ('path' in error.values) {\n        acc[error.values.path] = {\n          id: error.id,\n          defaultMessage: error.defaultMessage,\n        };\n      }\n\n      return acc;\n    }, {});\n  }\n\n  return normalizedError?.defaultMessage;\n}\n","/**\n * Get the file extension of value passed in.\n *\n * This hook is used to create URL aware of the backend. Practical to resolve assets.\n */\nexport const getFileExtension = (ext: string) => (ext && ext[0] === '.' ? ext.substr(1) : ext);\n","import type { TranslationMessage } from '../types';\nimport type { ValidationError } from 'yup';\n\nconst extractValuesFromYupError = (\n  errorType?: string | undefined,\n  errorParams?: Record<string, any> | undefined\n) => {\n  if (!errorType || !errorParams) {\n    return {};\n  }\n\n  return {\n    [errorType]: errorParams[errorType],\n  };\n};\n\nconst getYupInnerErrors = (error: ValidationError) =>\n  (error?.inner || []).reduce<Record<string, TranslationMessage>>((acc, currentError) => {\n    if (currentError.path) {\n      acc[currentError.path.split('[').join('.').split(']').join('')] = {\n        id: currentError.message,\n        defaultMessage: currentError.message,\n        values: extractValuesFromYupError(currentError?.type, currentError?.params),\n      };\n    }\n\n    return acc;\n  }, {});\n\nexport { getYupInnerErrors };\n","const prefixFileUrlWithBackendUrl = (fileURL?: string): string | undefined => {\n  return !!fileURL && fileURL.startsWith('/') ? `${window.strapi.backendURL}${fileURL}` : fileURL;\n};\n\nexport { prefixFileUrlWithBackendUrl };\n","type TradOptions = Record<string, string>;\n\nconst prefixPluginTranslations = (trad: TradOptions, pluginId: string): TradOptions => {\n  if (!pluginId) {\n    throw new TypeError(\"pluginId can't be empty\");\n  }\n  return Object.keys(trad).reduce((acc, current) => {\n    acc[`${pluginId}.${current}`] = trad[current];\n    return acc;\n  }, {} as TradOptions);\n};\n\nexport { prefixPluginTranslations };\n","import startsWith from 'lodash/startsWith';\n\nimport { auth } from './auth';\nimport { once } from './once';\n\n/**\n * Parses the JSON returned by a network request\n */\nasync function parseJSON<ResponseType>(response: Response | ResponseType): Promise<ResponseType> {\n  if (response instanceof Response) {\n    return response.json();\n  }\n\n  return response;\n}\n\ninterface CustomError extends Error {\n  response?: Response & { payload?: unknown };\n}\n\n/**\n * Checks if a network request came back fine, and throws an error if not\n */\nasync function checkStatus(response: Response, checkToken = true): Promise<Response> {\n  if ((response.status >= 200 && response.status < 300) || response.status === 0) {\n    return response;\n  }\n\n  // TODO handle 403...\n\n  if (response.status === 401 && auth.getToken() && checkToken) {\n    // Temporary fix until we create a new request helper\n    auth.clearAppStorage();\n    window.location.reload();\n  }\n\n  return parseJSON(response)\n    .then((responseFormatted) => {\n      const error: CustomError = new Error(response.statusText);\n      error.response = response;\n      error.response.payload = responseFormatted;\n      throw error;\n    })\n    .catch(() => {\n      const error: CustomError = new Error(response.statusText);\n      error.response = response;\n\n      throw error;\n    });\n}\n\nfunction formatQueryParams(params: Record<string, string>): string {\n  return Object.keys(params)\n    .map((k) => `${encodeURIComponent(k)}=${encodeURIComponent(params[k])}`)\n    .join('&');\n}\n\n/**\n * Server restart watcher\n */\nasync function serverRestartWatcher<ResponseType>(response: ResponseType): Promise<ResponseType> {\n  return new Promise((resolve) => {\n    fetch(`${window.strapi.backendURL}/_health`, {\n      method: 'HEAD',\n      mode: 'no-cors',\n      keepalive: false,\n      headers: {\n        'Content-Type': 'application/json',\n      },\n    })\n      .then((res) => {\n        if (res.status >= 400) {\n          throw new Error('not available');\n        }\n\n        resolve(response);\n      })\n      .catch(() => {\n        setTimeout(() => {\n          return serverRestartWatcher(response).then(resolve);\n        }, 100);\n      });\n  });\n}\n\nconst warnOnce = once(console.warn);\n\n// eslint-disable-next-line no-undef\ninterface RequestOptions extends RequestInit {\n  params?: Record<string, string>;\n}\n\n/**\n * Requests a URL, returning a promise\n *\n * @deprecated use `useFetchClient` instead.\n */\nexport async function request<ResponseType = unknown>(\n  url: string,\n  options: RequestOptions = {},\n  shouldWatchServerRestart?: boolean,\n  stringify = true,\n  { noAuth }: { noAuth?: boolean } = { noAuth: false }\n): Promise<ResponseType> {\n  warnOnce(\n    'The `request` function is deprecated and will be removed in the next major version. Please use `useFetchClient` instead.'\n  );\n\n  // Set headers\n  if (!options.headers) {\n    options.headers = Object.assign(\n      {\n        'Content-Type': 'application/json',\n      },\n      options.headers\n    );\n  }\n\n  const token = auth.getToken();\n\n  if (token && !noAuth) {\n    options.headers = Object.assign(\n      {\n        Authorization: `Bearer ${token}`,\n      },\n      options.headers\n    );\n  }\n\n  // Add parameters to url\n  url = startsWith(url, '/') ? `${window.strapi.backendURL}${url}` : url;\n\n  if (options && options.params) {\n    const params = formatQueryParams(options.params);\n    url = `${url}?${params}`;\n  }\n\n  // Stringify body object\n  if (options && options.body && stringify) {\n    options.body = JSON.stringify(options.body);\n  }\n\n  return fetch(url, options)\n    .then(checkStatus)\n    .then(parseJSON<ResponseType>)\n    .then((response) => {\n      if (shouldWatchServerRestart) {\n        return serverRestartWatcher<ResponseType>(response);\n      }\n\n      return response;\n    });\n}\n","/**\n * Set an opacity to a hex value.\n *\n * @deprecated This function will be removed in the next major release. Use the native CSS opacity property instead.\n */\nconst setHexOpacity = (hex: string, alpha: number) =>\n  `${hex}${Math.floor(alpha * 255)\n    .toString(16)\n    .padStart(2, '0')}`;\n\nexport { setHexOpacity };\n","import * as React from 'react';\n\n/**\n * @deprecated Use the onClick prop on the element you want to stop propagation on instead\n */\nexport const stopPropagation = {\n  onClick: (e: React.MouseEvent) => e.stopPropagation(),\n  role: 'button',\n  'aria-hidden': true,\n};\n\ntype OnRowClickProps = {\n  fn: (e: React.MouseEvent) => void;\n  condition?: boolean;\n};\n\n/**\n * @deprecated Set the onClick prop directly\n */\nexport const onRowClick = ({ fn, condition = true }: OnRowClickProps) => {\n  if (condition) {\n    return {\n      style: { cursor: 'pointer' },\n      onClick: fn,\n    };\n  }\n};\n\n/**\n *\n * @deprecated Set the onClick prop on the element you want to stop propagation on instead\n */\nexport const StopPropagation = () => {\n  // Use createElement to avoid making this file a TSX since it's in the utils folder\n  return React.createElement('div', stopPropagation);\n};\n","const errorsTrads = {\n  email: 'components.Input.error.validation.email',\n  json: 'components.Input.error.validation.json',\n  lowercase: 'components.Input.error.validation.lowercase',\n  max: 'components.Input.error.validation.max',\n  maxLength: 'components.Input.error.validation.maxLength',\n  min: 'components.Input.error.validation.min',\n  minLength: 'components.Input.error.validation.minLength',\n  regex: 'components.Input.error.validation.regex',\n  required: 'components.Input.error.validation.required',\n  unique: 'components.Input.error.validation.unique',\n  integer: 'component.Input.error.validation.integer',\n} as const;\n\nexport { errorsTrads as translatedErrors };\n","import type { AxiosInstance } from 'axios';\n\nconst pickedMethods = [\n  'request',\n  'get',\n  'head',\n  'delete',\n  'options',\n  'post',\n  'put',\n  'patch',\n  'getUri',\n] as const;\n\ntype WrappedAxiosInstance = {\n  [K in (typeof pickedMethods)[number]]: AxiosInstance[K];\n};\n\n/**\n * @deprecated Use the useFetchClient() hook instead, which is exported from the helper-plugin: { useFetchClient } from \"@strapi/helper-plugin\"\n */\nfunction wrapAxiosInstance(instance: AxiosInstance): WrappedAxiosInstance {\n  const isDevelopmentEnv = process.env.NODE_ENV === 'development';\n\n  const warn = () => {\n    // Only log deprecation warnings in development\n    if (!isDevelopmentEnv) return;\n\n    console.warn(\n      'Deprecation warning: Usage of \"axiosInstance\" utility is deprecated and will be removed in the next major release. Instead, use the useFetchClient() hook, which is exported from the helper-plugin: { useFetchClient } from \"@strapi/helper-plugin\"'\n    );\n  };\n\n  const wrapper: WrappedAxiosInstance = {\n    request: (...args) => {\n      warn();\n      return instance.request(...args);\n    },\n    get: (...args) => {\n      warn();\n      return instance.get(...args);\n    },\n    head: (...args) => {\n      warn();\n      return instance.head(...args);\n    },\n    delete: (...args) => {\n      warn();\n      return instance.delete(...args);\n    },\n    options: (...args) => {\n      warn();\n      return instance.options(...args);\n    },\n    post: (...args) => {\n      warn();\n      return instance.post(...args);\n    },\n    put: (...args) => {\n      warn();\n      return instance.put(...args);\n    },\n    patch: (...args) => {\n      warn();\n      return instance.patch(...args);\n    },\n    getUri: (...args) => {\n      warn();\n      return instance.getUri(...args);\n    },\n  };\n\n  return wrapper;\n}\n\nexport { wrapAxiosInstance };\n"],"names":["EmptyStateLayout","Link","useRBAC","instance","useQuery","Root","Body","warnOnce","Icon","Layout","Table","components","TableCompo","DSTable","operator","value","FormikForm","attribute","error","intlLabel","disabled","time","DSLink","DSLinkButton","IconBox","SearchIcon","config","Overlay","get","data","object","base","stringify"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAM,kBAAkB,CAAC;AAAA,EACvB,UAAU;AAAA,IACR,IAAI;AAAA,IACJ,gBAAgB;AAAA,IAChB,QAAQ,CAAC;AAAA,EACX;AAAA,EACA,GAAG;AACL,MAA4B;AACpB,QAAA,EAAE,kBAAkB;AAGxB,SAAA;AAAA,IAACA;AAAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ,MAAM,oBAAC,uBAAsB,EAAA,OAAM,QAAQ,CAAA;AAAA,MAC3C,SAAS;AAAA,QACP,EAAE,IAAI,QAAQ,IAAI,gBAAgB,QAAQ,eAAe;AAAA,QACzD,QAAQ;AAAA,MACV;AAAA,IAAA;AAAA,EAAA;AAGN;ACzBa,MAAA,iBAAiB,CAAoC,aAA+B;AACzF,QAAA,cAAc,MAAM,OAAO,QAAQ;AAEzC,QAAM,UAAU,MAAM;AACpB,gBAAY,UAAU;AAAA,EAAA,CACvB;AAGM,SAAA,MAAM,QAAQ,MAAO,IAAI,SAAS,YAAY,UAAU,GAAG,IAAI,GAAS,CAAA,CAAE;AACnF;AC8BM,MAAA,uBAAuB,MAAM,cAAyC;AAAA,EAC1E,oBAAoB,MAAM;AAAA,EAAC;AAC7B,CAAC;AAaD,MAAM,wBAAwB,CAAC,EAAE,eAA2C;AACpE,QAAA,oBAAoB,MAAM,OAAO,CAAC;AAExC,QAAM,CAAC,eAAe,gBAAgB,IAAI,MAAM,SAAyB,CAAA,CAAE;AAE3E,QAAM,qBAAqB,MAAM;AAAA,IAC/B,CAAC,EAAE,MAAM,SAAS,MAAM,SAAS,iBAAiB,SAAS,YAAgC;AACzF,uBAAiB,CAAC,MAAM;AAAA,QACtB,GAAG;AAAA,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