{"version":3,"file":"static/components/4522-e9a4aaf34389ef6e2a3a.mjs?cv=7","mappings":"mvBAKA,IAAMA,EAAuB,CAC3B,CACEC,GAAI,gBACJC,KAAM,8BACNC,KAAM,MACNC,QAAS,aACTC,MAAO,0CACPC,UAAU,EACVC,SAAS,EACTC,cAAe,IAEjB,CACEP,GAAI,sBACJC,KAAM,8BACNC,KAAM,MACNC,QAAS,aACTC,MAAO,+BACPC,UAAU,EACVC,SAAS,EACTC,cAAe,CAAC,sBAElB,CACEP,GAAI,8BACJC,KAAM,qBACNC,KAAM,OACNC,QAAS,qBACTC,MAAO,qCACPC,UAAU,EACVC,SAAS,EACTC,cAAe,IAEjB,CACEP,GAAI,qBACJC,KAAM,qBACNC,KAAM,OACNC,QAAS,qBACTC,MAAO,iBACPC,UAAU,EACVC,SAAS,EACTC,cAAe,IAEjB,CACEP,GAAI,wBACJC,KAAM,qBACNC,KAAM,OACNC,QAAS,qBACTC,MAAO,+CACPC,UAAU,EACVC,SAAS,EACTC,cAAe,IAEjB,CACEP,GAAI,oBACJC,KAAM,aACNC,KAAM,WACNC,QAAS,cACTC,MAAO,yBACPC,UAAU,EACVC,SAAS,EACTC,cAAe,CAAC,qBAElB,CACEP,GAAI,gBACJC,KAAM,aACNC,KAAM,WACNC,QAAS,mCACTC,MAAO,0BACPC,UAAU,EACVC,SAAS,EACTC,cAAe,CAAC,iBAElB,CACEP,GAAI,kBACJC,KAAM,aACNC,KAAM,WACNC,QAAS,mCACTC,MAAO,qBACPC,UAAU,EACVC,SAAS,EACTC,cAAe,CAAC,kCAElB,CACEP,GAAI,yBACJC,KAAM,aACNC,KAAM,WACNC,QAAS,mCACTC,MAAO,oDACPC,UAAU,EACVC,SAAS,EACTC,cAAe,IAEjB,CACEP,GAAI,2BACJC,KAAM,aACNC,KAAM,WACNC,QAAS,4BACTC,MAAO,0BACPC,UAAU,EACVC,SAAS,EACTC,cAAe,CAAC,iBAElB,CACEP,GAAI,qCACJC,KAAM,aACNC,KAAM,WAC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CACtDrB,MAAOA,EACP,aAAW,OACX8B,KAAK,WAEJjN,IAGH,IAAI,IAEV0M,EAEJ,C","sources":["webpack:///home/runner/work/actionpopulaire.fr/actionpopulaire.fr/agir/notifications/components/common/notifications.config.js","webpack:///home/runner/work/actionpopulaire.fr/actionpopulaire.fr/agir/front/components/genericComponents/BottomSheet.js","webpack:///home/runner/work/actionpopulaire.fr/actionpopulaire.fr/agir/front/components/genericComponents/ModalConfirmation.js","webpack:///home/runner/work/actionpopulaire.fr/actionpopulaire.fr/agir/carte/components/common/location/constants.js","webpack:///home/runner/work/actionpopulaire.fr/actionpopulaire.fr/agir/front/components/allPages/ios.js","webpack:///home/runner/work/actionpopulaire.fr/actionpopulaire.fr/agir/notifications/components/common/api.js","webpack:///home/runner/work/actionpopulaire.fr/actionpopulaire.fr/agir/front/components/genericComponents/Modal.js"],"sourcesContent":["import {\n  NEWSLETTER_OPTIONS,\n  getNewsletterOptions,\n} from \"@agir/front/authentication/common\";\n\nconst PERSON_NOTIFICATIONS = [\n  {\n    id: \"campaign_news\",\n    type: \"Mon compte Action Populaire\",\n    icon: \"rss\",\n    subtype: \"Nouveautés\",\n    label: \"Informations importantes de la campagne\",\n    hasEmail: false,\n    hasPush: true,\n    activityTypes: [],\n  },\n  {\n    id: \"person_related_news\",\n    type: \"Mon compte Action Populaire\",\n    icon: \"rss\",\n    subtype: \"Nouveautés\",\n    label: \"Nouveautés qui me concernent\",\n    hasEmail: true,\n    hasPush: true,\n    activityTypes: [\"referral-accepted\"],\n  },\n  {\n    id: \"security_and_payment_alerts\",\n    type: \"Compte et sécurité\",\n    icon: \"lock\",\n    subtype: \"Compte et sécurité\",\n    label: \"Alertes de sécurité et de paiement\",\n    hasEmail: false,\n    hasPush: false,\n    activityTypes: [],\n  },\n  {\n    id: \"donation_reminders\",\n    type: \"Compte et sécurité\",\n    icon: \"lock\",\n    subtype: \"Compte et sécurité\",\n    label: \"Rappels de don\",\n    hasEmail: false,\n    hasPush: true,\n    activityTypes: [],\n  },\n  {\n    id: \"person_task_reminders\",\n    type: \"Compte et sécurité\",\n    icon: \"lock\",\n    subtype: \"Mes tâches à faire\",\n    label: \"Me rappeler mes tâches à faire régulièrement\",\n    hasEmail: false,\n    hasPush: true,\n    activityTypes: [],\n  },\n  {\n    id: \"event_suggestions\",\n    type: \"Événements\",\n    icon: \"calendar\",\n    subtype: \"Suggestions\",\n    label: \"Suggestion d'événement\",\n    hasEmail: false,\n    hasPush: true,\n    activityTypes: [\"event-suggestion\"],\n  },\n  {\n    id: \"event_updates\",\n    type: \"Événements\",\n    icon: \"calendar\",\n    subtype: \"Événements auxquels je participe\",\n    label: \"Mise à jour d'événement\",\n    hasEmail: true,\n    hasPush: true,\n    activityTypes: [\"event-update\"],\n  },\n  {\n    id: \"event_reminders\",\n    type: \"Événements\",\n    icon: \"calendar\",\n    subtype: \"Événements auxquels je participe\",\n    label: \"Rappel d'événement\",\n    hasEmail: false,\n    hasPush: true,\n    activityTypes: [\"reminder-upcoming-event-start\"],\n  },\n  {\n    id: \"online_event_reminders\",\n    type: \"Événements\",\n    icon: \"calendar\",\n    subtype: \"Événements auxquels je participe\",\n    label: \"Lien de connexion à la visio-conférence 5mn avant\",\n    hasEmail: false,\n    hasPush: true,\n    activityTypes: [],\n  },\n  {\n    id: \"event_rsvp_notifications\",\n    type: \"Événements\",\n    icon: \"calendar\",\n    subtype: \"Événements que j'organise\",\n    label: \"Nouveaux participant·es\",\n    hasEmail: true,\n    hasPush: true,\n    activityTypes: [\"new-attendee\"],\n  },\n  {\n    id: \"event_group_attendee_notifications\",\n    type: \"Événements\",\n    icon: \"calendar\",\n    subtype: \"Événements que j'organise\",\n    label: \"Nouveaux groupes participants\",\n    hasEmail: false,\n    hasPush: true,\n    activityTypes: [\"new-group-attendee\"],\n  },\n  {\n    id: \"event_task_reminders\",\n    type: \"Événements\",\n    icon: \"calendar\",\n    subtype: \"Événements que j'organise\",\n    label: \"Tâches à effectuer \",\n    hasEmail: false,\n    hasPush: true,\n    activityTypes: [\n      \"waiting-location-event\",\n      \"reminder-docs-event-eve\",\n      \"reminder-docs-event-nextday\",\n    ],\n  },\n  {\n    id: \"event_organizer_updates\",\n    type: \"Événements\",\n    icon: \"calendar\",\n    subtype: \"Événements que j'organise\",\n    label: \"Mises à jour pour les organisateur·ices\",\n    hasEmail: false,\n    hasPush: true,\n    activityTypes: [],\n  },\n].filter((notification) => notification.activityTypes.length > 0);\n\nconst GROUP_NOTIFICATIONS = [\n  {\n    id: \"group_join_event\",\n    type: \"Groupes\",\n    icon: \"users\",\n    subtype: \"Événements\",\n    label: \"Participation à un événement\",\n    hasEmail: false,\n    hasPush: true,\n    isActive: (group) => !group.isReferent,\n    activityTypes: [\"new-event-participation-mygroups\"],\n  },\n  {\n    id: \"group_event_coorganization-info\",\n    type: \"Groupes\",\n    icon: \"users\",\n    subtype: \"Événements\",\n    label: \"Gestion des co-organisations des événements\",\n    hasEmail: true,\n    hasPush: true,\n    isActive: (group) => group.isManager,\n    activityTypes: [\"group-coorganization-info\", \"group-coorganization-accepted\", \"group-coorganization-invite\"]\n  },\n  {\n    id: \"group_event_notifications\",\n    type: \"Groupes\",\n    icon: \"users\",\n    subtype: \"Mises à jour du groupe\",\n    label: \"Nouvel événement du groupe\",\n    hasEmail: true,\n    hasPush: true,\n    isActive: true,\n    activityTypes: [\"new-event-mygroups\"],\n  },\n  {\n    id: \"group_event_report_notifications\",\n    type: \"Groupes\",\n    icon: \"users\",\n    subtype: \"Mises à jour du groupe\",\n    label: \"Compte rendu d'un événement du groupe\",\n    hasEmail: true,\n    hasPush: true,\n    isActive: true,\n    activityTypes: [\"new-report\"],\n  },\n  {\n    id: \"group_updates\",\n    type: \"Groupes\",\n    icon: \"users\",\n    subtype: \"Mises à jour du groupe\",\n    label: \"Mise à jour du groupe\",\n    hasEmail: true,\n    hasPush: true,\n    isActive: true,\n    activityTypes: [\"group-info-update\"],\n  },\n  {\n    id: \"group_message_notifications\",\n    type: \"Groupes\",\n    icon: \"users\",\n    subtype: \"Discussions\",\n    label: \"Nouvelle discussion\",\n    hasEmail: true,\n    hasPush: true,\n    isActive: true,\n    activityTypes: [\"new-message\"],\n  },\n  {\n    id: \"group_comment_notifications\",\n    type: \"Groupes\",\n    icon: \"users\",\n    subtype: \"Discussions\",\n    label: \"Réponses à toutes les discussions\",\n    hasEmail: false,\n    hasPush: true,\n    isActive: true,\n    activityTypes: [\"new-comment\"],\n  },\n  {\n    id: \"group_restricted_comment_notifications\",\n    type: \"Groupes\",\n    icon: \"users\",\n    subtype: \"Discussions\",\n    label: \"Réponses aux discussions auxquelles je participe\",\n    hasEmail: true,\n    hasPush: true,\n    isActive: true,\n    activityTypes: [\"new-comment-restricted\"],\n  },\n  {\n    id: \"group_member_notifications\",\n    type: \"Groupes\",\n    icon: \"users\",\n    subtype: \"Gestion de mon groupe\",\n    label: \"Nouveaux membres\",\n    hasEmail: true,\n    hasPush: true,\n    isActive: (group) => group.isManager,\n    activityTypes: [\n      \"new-follower\",\n      \"new-member\",\n      \"accepted-invitation-member\",\n      \"group-membership-limit-reminder\",\n      \"new-members-through-transfer\",\n    ],\n  },\n  {\n    id: \"group_task_reminders\",\n    type: \"Groupes\",\n    icon: \"users\",\n    subtype: \"Gestion de mon groupe\",\n    label: \"Actions à faire\",\n    hasEmail: false,\n    hasPush: true,\n    isActive: (group) => group.isManager,\n    activityTypes: [\"waiting-location-group\", \"group-coorganization-invite\"],\n  },\n  {\n    id: \"group_manager_updates\",\n    type: \"Groupes\",\n    icon: \"users\",\n    subtype: \"Gestion de mon groupe\",\n    label: \"Mises à jour pour les gestionnaires\",\n    hasEmail: false,\n    hasPush: true,\n    isActive: (group) => group.isManager,\n    activityTypes: [\n      \"group-creation-confirmation\",\n      \"group-coorganization-accepted\",\n    ],\n  },\n].filter((notification) => notification.activityTypes.length > 0);\n\nconst getNotificationId = (notificationId, groupId) => {\n  if (groupId) {\n    return `${notificationId}__${groupId}`;\n  }\n  return notificationId;\n};\n\nconst getSingleGroupNotifications = (group) =>\n  GROUP_NOTIFICATIONS.filter((notification) => {\n    if (typeof notification.isActive === \"function\") {\n      return notification.isActive(group);\n    }\n    return notification.isActive;\n  }).map((notification) => ({\n    ...notification,\n    id: getNotificationId(notification.id, group.id),\n    type: group.name,\n    group: group.id,\n  }));\n\nconst getGroupNotifications = (groups = []) =>\n  groups.reduce(\n    (arr, group) => [...arr, ...getSingleGroupNotifications(group)],\n    [],\n  );\n\nconst getNewsletterNotifications = (user) => {\n  if (!user) {\n    return [];\n  }\n\n  return getNewsletterOptions(user).map((option) => ({\n    id: option.value,\n    label: option.label,\n    active: option.active,\n    type: \"Lettres d'information\",\n    icon: \"rss\",\n    subtype: \"Newsletter\",\n    hasEmail: true,\n    hasPush: false,\n    isNewsletter: true,\n  }));\n};\n\nexport const getAllNotifications = (user) => [\n  ...getNewsletterNotifications(user),\n  ...PERSON_NOTIFICATIONS,\n  ...getGroupNotifications(user?.groups),\n];\n\nexport const getNewsletterStatus = (newsletters) => {\n  if (!newsletters || !Array.isArray(newsletters)) {\n    return {};\n  }\n  let newsletterStatus = {};\n  Object.values(NEWSLETTER_OPTIONS).forEach((opt) => {\n    if (!opt.value) {\n      return;\n    }\n    newsletterStatus = {\n      ...newsletterStatus,\n      [opt.value]: { email: newsletters.includes(opt.value) },\n    };\n  });\n  return newsletterStatus;\n};\n\nexport const getNotificationStatus = (activeNotifications) => {\n  const active = {};\n\n  if (!Array.isArray(activeNotifications) || activeNotifications.length === 0) {\n    return active;\n  }\n\n  activeNotifications.forEach((activeNotification) => {\n    let notificationId = null;\n    const notification = activeNotification.group\n      ? GROUP_NOTIFICATIONS.find((groupNotification) =>\n          groupNotification.activityTypes.includes(\n            activeNotification.activityType,\n          ),\n        )\n      : PERSON_NOTIFICATIONS.find((notification) =>\n          notification.activityTypes.includes(activeNotification.activityType),\n        );\n    if (!notification) {\n      return;\n    }\n    notificationId = getNotificationId(\n      notification.id,\n      activeNotification.group,\n    );\n    active[notificationId] = active[notificationId] || {\n      email: false,\n      push: false,\n    };\n    active[notificationId][activeNotification.type] =\n      active[notificationId][activeNotification.type] || [];\n    active[notificationId][activeNotification.type].push(activeNotification.id);\n  });\n  return active;\n};\n\nexport function getDefaultNotifications() {\n  return [\n      ...PERSON_NOTIFICATIONS.filter((notification) =>\n          notification.hasPush && notification.id !== \"event_rsvp_notifications\")\n  ]\n}","import PropTypes from \"prop-types\";\nimport React, {\n  useCallback,\n  useEffect,\n  useRef,\n  useState,\n  Suspense,\n} from \"react\";\nimport styled from \"styled-components\";\n\nimport { lazy } from \"@agir/front/app/utils\";\n\nconst RSBS = lazy(() => import(\"./ReactSpringBottomSheet\"));\n\nconst StyledBottomSheetFooter = styled.footer`\n  &::before {\n    content: \"\";\n    display: block;\n    width: calc(100% - 3rem);\n    height: 1px;\n    margin: 0 auto;\n    background-color: ${(props) => props.theme.text200};\n  }\n\n  button {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    color: ${(props) => props.theme.text1000};\n    background-color: ${(props) => props.theme.background0};\n    box-shadow: none;\n    border: none;\n    height: 54px;\n    font-size: 0.875rem;\n    width: 100%;\n    cursor: pointer;\n  }\n`;\nconst StyledBottomSheet = styled(RSBS)`\n  [data-rsbs-overlay] {\n    background-color: ${(props) => props.theme.background0};\n    z-index: ${(props) => props.theme.zindexPanel};\n  }\n  [data-rsbs-backdrop] {\n    z-index: ${(props) => props.theme.zindexPanel};\n    background-color: rgba(0, 10, 44, 0.6);\n  }\n  [data-rsbs-footer] {\n    padding: 0;\n    box-shadow: none;\n  }\n`;\n\nexport const BottomSheet = (props) => {\n  const { isOpen, onDismiss, shouldDismissOnClick, children } = props;\n  const [isReady, setIsReady] = useState(false);\n  const contentRef = useRef();\n\n  const handleSpringStart = useCallback(\n    (e) => {\n      let content = contentRef.current;\n      if (!content || !shouldDismissOnClick) {\n        return;\n      }\n      const targets = content.querySelectorAll(\"a, button\");\n      if (e.type === \"OPEN\") {\n        targets.forEach((element) => {\n          element.addEventListener(\"click\", onDismiss);\n        });\n      }\n      if (e.type === \"CLOSE\") {\n        targets.forEach((element) => {\n          element.removeEventListener(\"click\", onDismiss);\n        });\n      }\n    },\n    [onDismiss, shouldDismissOnClick],\n  );\n\n  useEffect(() => {\n    isOpen && !isReady && setIsReady(true);\n  }, [isOpen, isReady]);\n\n  return (\n    <Suspense fallback={null}>\n      {isReady && (\n        <StyledBottomSheet\n          open={isOpen}\n          onDismiss={onDismiss}\n          onSpringStart={handleSpringStart}\n          defaultSnap={({ minHeight }) => minHeight}\n          snapPoints={({ maxHeight }) => [\n            2 * (maxHeight / 3),\n            maxHeight - maxHeight / 10,\n            maxHeight / 3,\n          ]}\n          footer={\n            <StyledBottomSheetFooter>\n              <button onClick={onDismiss}>Fermer</button>\n            </StyledBottomSheetFooter>\n          }\n        >\n          <div ref={contentRef}>{children}</div>\n        </StyledBottomSheet>\n      )}\n    </Suspense>\n  );\n};\n\nBottomSheet.propTypes = {\n  isOpen: PropTypes.bool,\n  onDismiss: PropTypes.func,\n  shouldDismissOnClick: PropTypes.bool,\n  children: PropTypes.node,\n};\nexport default BottomSheet;\n","import PropTypes from \"prop-types\";\nimport React from \"react\";\nimport styled from \"styled-components\";\n\nimport BottomSheet from \"@agir/front/genericComponents/BottomSheet\";\nimport Button from \"@agir/front/genericComponents/Button\";\nimport Modal from \"@agir/front/genericComponents/Modal\";\nimport Spacer from \"@agir/front/genericComponents/Spacer\";\nimport { ResponsiveLayout } from \"@agir/front/genericComponents/grid\";\n\nconst ModalContainer = styled.div`\n  background: ${(props) => props.theme.background0};\n  width: 40%;\n  max-width: 650px;\n  margin: 5% auto;\n  border-radius: ${(props) => props.theme.borderRadius};\n  display: flex;\n  justify-content: center;\n\n  @media (max-width: ${(props) => props.theme.collapse}px) {\n    width: 100%;\n    max-width: unset;\n    margin: 0;\n  }\n`;\n\nconst ModalContent = styled.div`\n  display: inline-flex;\n  flex-direction: column;\n  padding: 1rem 1.5rem;\n\n  h3 {\n    font-size: 1rem;\n  }\n\n  & > ${Button} {\n    margin-bottom: 1rem;\n  }\n`;\n\nconst ModalConfirmation = (props) => {\n  const {\n    shouldShow = false,\n    onClose,\n    title,\n    children,\n    dismissLabel,\n    confirmationLabel = \"\",\n    confirmationUrl = \"\",\n    onConfirm = null,\n    shouldDismissOnClick = true,\n    isConfirming = false,\n    disabled = false,\n    onDismiss\n  } = props;\n\n  return (\n    <ResponsiveLayout\n      DesktopLayout={Modal}\n      MobileLayout={BottomSheet}\n      shouldShow={shouldShow}\n      isOpen={shouldShow}\n      onClose={onClose}\n      onDismiss={onClose}\n      shouldDismissOnClick={shouldDismissOnClick}\n      noScroll\n    >\n      <ModalContainer>\n        <ModalContent>\n          <h3>{title}</h3>\n          {children}\n          <Spacer size=\"1rem\" />\n          {!!confirmationUrl && (\n            <Button\n              wrap\n              color=\"primary\"\n              type=\"button\"\n              link\n              route={confirmationUrl}\n              disabled={disabled || isConfirming}\n              loading={isConfirming}\n            >\n              {confirmationLabel}\n            </Button>\n          )}\n          {!!onConfirm && (\n            <Button\n              wrap\n              color=\"primary\"\n              type=\"button\"\n              onClick={onConfirm}\n              disabled={disabled || isConfirming}\n              loading={isConfirming}\n            >\n              {confirmationLabel}\n            </Button>\n          )}\n          {dismissLabel && (\n            <Button\n              wrap\n              type=\"button\"\n              onClick={(e) => { onClose?.(e); onDismiss?.(e)}}\n              css={`\n                color: ${(props) => props.theme.text1000};\n              `}\n              disabled={isConfirming}\n            >\n              {dismissLabel}\n            </Button>\n          )}\n        </ModalContent>\n      </ModalContainer>\n    </ResponsiveLayout>\n  );\n};\n\nModalConfirmation.propTypes = {\n  shouldShow: PropTypes.bool,\n  onClose: PropTypes.func,\n  title: PropTypes.node,\n  children: PropTypes.node,\n  onDismiss: PropTypes.func,\n  dismissLabel: PropTypes.node,\n  confirmationLabel: PropTypes.node,\n  confirmationUrl: PropTypes.string,\n  onConfirm: PropTypes.func,\n  shouldDismissOnClick: PropTypes.bool,\n  isConfirming: PropTypes.bool,\n  disabled: PropTypes.bool,\n};\n\nexport default ModalConfirmation;\n","\nexport const LocationAuthorizationStatus = {\n  GRANTED: \"granted\",\n  DENIED: \"denied\",\n  NOT_DETERMINED: \"notDetermined\"\n}\n","import {useCallback, useEffect, useRef, useState} from \"react\";\nimport {setupDefaultNotification} from \"@agir/notifications/common/api\";\n\nimport logger from \"@agir/lib/utils/logger\";\nimport {useLocalStorage} from \"@agir/lib/utils/hooks\";\nimport {useMobileApp} from \"@agir/front/app/hooks/useMobileApp\";\nimport { LocationAuthorizationStatus } from \"../../../carte/components/common/location/constants\";\n\nconst log = logger(__filename);\n\nwindow.iOSNativeMessage = (data) => {\n  let event = new CustomEvent(\"iOSMessage\", {\n    detail: {\n      data: JSON.parse(data),\n    },\n  });\n\n  log.debug(\"got message\", data);\n\n  window.dispatchEvent(event);\n};\n\nexport const iosAction= {\n  SET_NOTIFICATION_STATE: 'setNotificationState',\n  GET_NOTIFICATION_STATE: 'getNotificationState',\n  ENABLE_NOTIFICATIONS: 'enableNotifications',\n\n  SET_LOCATION_STATE: 'setLocationState',\n  GET_LOCATION_STATE: 'getLocationState',\n\n  OPEN_APPLICATION_SETTINGS: 'openApplicationSettings'\n};\n\nexport const useIOSNotificationGrant = (onNotificationGrant) => {\n  const [notificationIsGranted, setNotificationIsGranted] = useState(false)\n  const [fcmToken] = useLocalStorage(\"AP_FCMToken\", null);\n\n  const iosMessageHandler = useCallback(async ({action, noPermission}) => {\n    if (action === iosAction.SET_NOTIFICATION_STATE && noPermission === \"false\") {\n      setNotificationIsGranted(true);\n      onNotificationGrant?.()\n    }\n  }, []);\n\n  const postMessage = useIOSMessages(iosMessageHandler);\n\n  useEffect(() => {\n    postMessage && postMessage({ action: iosAction.GET_NOTIFICATION_STATE });\n  }, [postMessage]);\n\n  const grantNotification = useCallback(() => {\n    if (postMessage) {\n      postMessage && postMessage({ action: iosAction.ENABLE_NOTIFICATIONS });\n    } else {\n      console.error(\"postMessage not found !\")\n    }\n  }, [postMessage])\n\n  return {\n    grantNotification,\n    notificationIsGranted,\n    hasUpdate: fcmToken !== null\n  }\n}\n\nexport const useIOSMessages = (cb) => {\n  const savedCallback = useRef();\n\n  useEffect(() => {\n    savedCallback.current = cb;\n  }, [cb]);\n\n  useEffect(() => {\n    const eventListener = (event) =>\n      savedCallback.current && savedCallback.current(event.detail.data);\n\n    window.addEventListener(\"iOSMessage\", eventListener);\n\n    return () => {\n      window.removeEventListener(\"iOSMessage\", eventListener);\n    };\n  }, []);\n\n  const postMessage = useCallback((data) => {\n    window.webkit?.messageHandlers?.main?.postMessage(data);\n  }, []);\n\n  if (!window.webkit?.messageHandlers?.main) {\n    return;\n  }\n\n  return postMessage;\n};\n\n/**\n * \n * @param {callback} onLocationGrant \n * @returns {\n *  {LocationAuthorizationStatus | false} locationIsGranted\n *  {bool} hasUpdate\n * }\n */\nexport function useIOSLocationGrant(onLocationGrant) {\n    const [iosLocationGranted, setIosLocationGranted] = useState(LocationAuthorizationStatus.NOT_DETERMINED)\n    const [fcmToken] = useLocalStorage(\"AP_FCMToken\", null);\n    const {isIOS} = useMobileApp();\n   \n    const iosMessageHandler = useCallback(async (body) => {\n        const {action, state} = body\n\n      if (action === iosAction.SET_LOCATION_STATE) {\n        let newState = LocationAuthorizationStatus.NOT_DETERMINED\n        if (state === LocationAuthorizationStatus.GRANTED)\n          newState = LocationAuthorizationStatus.GRANTED\n        else if (state === LocationAuthorizationStatus.DENIED)\n          newState = LocationAuthorizationStatus.DENIED\n        setIosLocationGranted(newState);\n        onLocationGrant?.(newState)\n      }\n    }, []);\n\n    const postMessage = useIOSMessages(iosMessageHandler);\n\n    const updateLocationIsGranted = useCallback(() => {\n      if (postMessage)\n        postMessage({ action: iosAction.GET_LOCATION_STATE });\n    }, [postMessage])\n\n    useEffect(() => {\n      updateLocationIsGranted()\n    }, [updateLocationIsGranted]);\n    \n    return {\n        locationIsGranted: isIOS && iosLocationGranted,\n        updateLocationIsGranted: isIOS && updateLocationIsGranted,\n        hasUpdate: fcmToken !== undefined,\n    }\n}","import axios from \"@agir/lib/utils/axios\";\nimport {getDefaultNotifications} from \"@agir/notifications/common/notifications.config\";\n\nexport const ENDPOINT = {\n  getSubscriptions: \"/api/notifications/subscriptions/\",\n  createSubscriptions: \"/api/notifications/subscriptions/\",\n  deleteSubscriptions: \"/api/notifications/subscriptions/\",\n};\n\nexport const createSubscriptions = async (subscriptions) => {\n  const result = {\n    success: false,\n    error: null,\n  };\n  const url = ENDPOINT.createSubscriptions;\n  try {\n    const response = await axios.post(url, subscriptions);\n    result.success = response.status === 201;\n    result.data = response.data || null;\n  } catch (e) {\n    result.error = (e.response && e.response.data) || e.message;\n  }\n\n  return result;\n};\n\nexport const deleteSubscriptions = async (subscriptions) => {\n  const result = {\n    success: false,\n    error: null,\n  };\n  const url = ENDPOINT.deleteSubscriptions;\n  try {\n    const response = await axios.delete(url, { data: subscriptions });\n    result.success = response.status === 201;\n    result.data = response.data || null;\n  } catch (e) {\n    result.error = (e.response && e.response.data) || e.message;\n  }\n\n  return result;\n};\n\nexport async function setupDefaultNotification() {\n  /**\n   * we must send subscribe for each notification type because if\n   * we send as a list, and there is only one which is already registered, the API will trigger a constraint and ignore the other ones.\n   */\n  const subscriptionRequest = getDefaultNotifications().map((notification) => {\n    return notification.activityTypes.map((type) =>\n        createSubscriptions([{\n          activityType: type,\n          type: \"push\",\n        }]));\n  });\n  await Promise.all(subscriptionRequest.flat(2))\n}","import PropTypes from \"prop-types\";\nimport React, { useEffect, useMemo } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { useTransition, animated } from \"@react-spring/web\";\nimport styled from \"styled-components\";\n\nimport { useDisableBodyScroll, useFocusTrap } from \"@agir/lib/utils/hooks\";\nimport { RawFeatherIcon } from \"./FeatherIcon\";\n\nconst slideInTransition = {\n  from: { opacity: 0, paddingTop: \"2%\" },\n  enter: { opacity: 1, paddingTop: \"0%\" },\n  leave: { opacity: 0, paddingTop: \"2%\" },\n};\n\nconst fadeInTransition = {\n  from: { opacity: 0 },\n  enter: { opacity: 1 },\n  leave: { opacity: 0 },\n};\n\nconst Overlay = styled(animated.div)`\n  width: 100%;\n  height: 100%;\n  position: fixed;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  right: 0;\n  background-color: rgba(164, 159, 173, 0.6);\n  cursor: ${({ onClick }) => (onClick ? \"pointer\" : \"default\")};\n  z-index: 1;\n`;\n\nconst AnimatedOverlay = (props) => {\n  const { shouldShow = false, onClick } = props;\n  const transitions = useTransition(shouldShow, fadeInTransition);\n\n  return transitions((style, item) =>\n    item ? <Overlay style={style} onClick={onClick} /> : null,\n  );\n};\n\nAnimatedOverlay.propTypes = {\n  shouldShow: PropTypes.bool,\n  onClick: PropTypes.func,\n  className: PropTypes.string,\n};\n\nconst ModalContent = styled(animated.div)`\n  position: absolute;\n  top: 0;\n  left: 50%;\n  transform: translate3d(-50%, 0, 0);\n  z-index: 2;\n  width: 100%;\n  height: 100%;\n  margin: 0 auto;\n  pointer-events: none;\n\n  & > * {\n    pointer-events: all;\n  }\n`;\n\nconst ModalFrame = styled.div`\n  position: fixed;\n  top: var(--top-bar-height, 0);\n  bottom: 0;\n  left: 0;\n  right: 0;\n  padding: 0;\n  margin: 0;\n  width: 100vw;\n  overflow-x: hidden;\n  overflow-y: auto;\n  z-index: ${(props) => props.theme.zindexModal};\n`;\n\nconst StyledCloseButton = styled.button`\n  position: absolute;\n  top: 1rem;\n  right: 1rem;\n  padding: 0;\n  color: ${(props) => props.theme.text700};\n  z-index: 1;\n  background-color: transparent;\n  border: none;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  cursor: pointer;\n`;\n\nexport const ModalCloseButton = ({ onClose, size = \"2rem\", ...rest }) => {\n  if (!onClose) {\n    return null;\n  }\n\n  return (\n    <StyledCloseButton\n      {...rest}\n      onClick={onClose}\n      aria-label=\"Fermer la modale\"\n    >\n      <RawFeatherIcon name=\"x\" width={size} height={size} />\n    </StyledCloseButton>\n  );\n};\n\nModalCloseButton.propTypes = {\n  onClose: PropTypes.func,\n  size: PropTypes.string,\n};\n\nconst Modal = (props) => {\n  const {\n    shouldShow = false,\n    children,\n    onClose,\n    noScroll,\n    className,\n    disableFocusTrap,\n  } = props;\n\n  const modalRef = useDisableBodyScroll(noScroll, shouldShow);\n  const modalContentRef = useFocusTrap(shouldShow);\n\n  const transitions = useTransition(shouldShow, slideInTransition);\n\n  const modalParent = useMemo(() => {\n    const modalParent = document.createElement(\"div\");\n    modalParent.className = \"modal-root\";\n    document.body.appendChild(modalParent);\n\n    return modalParent;\n  }, []);\n\n  useEffect(\n    () => () => {\n      modalParent && document.body.removeChild(modalParent);\n    },\n    [modalParent],\n  );\n\n  return createPortal(\n    transitions((style, item) =>\n      item ? (\n        <ModalFrame ref={modalRef} className={className}>\n          <AnimatedOverlay onClick={onClose} shouldShow={shouldShow} />\n          <ModalContent\n            {...(!disableFocusTrap ? { ref: modalContentRef } : {})}\n            style={style}\n            aria-modal=\"true\"\n            role=\"dialog\"\n          >\n            {children}\n          </ModalContent>\n        </ModalFrame>\n      ) : null,\n    ),\n    modalParent,\n  );\n};\nModal.propTypes = {\n  shouldShow: PropTypes.bool,\n  children: PropTypes.node,\n  onClose: PropTypes.func,\n  noScroll: PropTypes.bool,\n};\n\nexport default Modal;\n"],"names":["PERSON_NOTIFICATIONS","id","type","icon","subtype","label","hasEmail","hasPush","activityTypes","filter","notification","length","GROUP_NOTIFICATIONS","isActive","group","isReferent","isManager","getNotificationId","notificationId","groupId","concat","getGroupNotifications","arguments","undefined","reduce","arr","_toConsumableArray","map","_objectSpread","name","getSingleGroupNotifications","getAllNotifications","user","getNewsletterOptions","option","value","active","isNewsletter","getNewsletterNotifications","groups","getNewsletterStatus","newsletters","Array","isArray","newsletterStatus","Object","values","NEWSLETTER_OPTIONS","forEach","opt","_defineProperty","email","includes","getNotificationStatus","activeNotifications","activeNotification","find","groupNotification","activityType","push","getDefaultNotifications","RSBS","lazy","StyledBottomSheetFooter","styled","footer","props","theme","text200","text1000","background0","StyledBottomSheet","zindexPanel","isOpen","onDismiss","shouldDismissOnClick","children","_useState","useState","_useState2","_slicedToArray","isReady","setIsReady","contentRef","useRef","handleSpringStart","useCallback","e","content","current","targets","querySelectorAll","element","addEventListener","removeEventListener","useEffect","React","Suspense","fallback","open","onSpringStart","defaultSnap","_ref","minHeight","snapPoints","_ref2","maxHeight","onClick","ref","ModalContainer","div","borderRadius","collapse","ModalContent","Button","_props$shouldShow","shouldShow","onClose","title","dismissLabel","_props$confirmationLa","confirmationLabel","_props$confirmationUr","confirmationUrl","_props$onConfirm","onConfirm","_props$shouldDismissO","_props$isConfirming","isConfirming","_props$disabled","disabled","ResponsiveLayout","DesktopLayout","Modal","MobileLayout","BottomSheet","noScroll","Spacer","size","wrap","color","link","route","loading","_StyledButton","LocationAuthorizationStatus","GRANTED","DENIED","NOT_DETERMINED","log","logger","window","iOSNativeMessage","data","event","CustomEvent","detail","JSON","parse","debug","dispatchEvent","iosAction","SET_NOTIFICATION_STATE","GET_NOTIFICATION_STATE","ENABLE_NOTIFICATIONS","SET_LOCATION_STATE","GET_LOCATION_STATE","OPEN_APPLICATION_SETTINGS","useIOSNotificationGrant","onNotificationGrant","notificationIsGranted","setNotificationIsGranted","_useLocalStorage","useLocalStorage","fcmToken","iosMessageHandler","_asyncToGenerator","_regeneratorRuntime","_callee","action","noPermission","_context","prev","next","stop","_x","apply","postMessage","useIOSMessages","grantNotification","console","error","hasUpdate","cb","_window$webkit2","savedCallback","eventListener","_window$webkit","webkit","messageHandlers","main","useIOSLocationGrant","onLocationGrant","_useState3","_useState4","iosLocationGranted","setIosLocationGranted","_useLocalStorage3","isIOS","useMobileApp","_ref3","_callee2","body","state","newState","_context2","_x2","updateLocationIsGranted","locationIsGranted","ENDPOINT","getSubscriptions","createSubscriptions","deleteSubscriptions","subscriptions","result","url","response","success","axios","post","sent","status","t0","message","abrupt","setupDefaultNotification","_setupDefaultNotification","_callee3","subscriptionRequest","_context3","Promise","all","flat","slideInTransition","from","opacity","paddingTop","enter","leave","fadeInTransition","Overlay","animated","AnimatedOverlay","useTransition","transitions","style","item","ModalFrame","zindexModal","StyledCloseButton","button","text700","ModalCloseButton","_ref2$size","rest","_objectWithoutProperties","_excluded","_extends","RawFeatherIcon","width","height","_props$shouldShow2","className","disableFocusTrap","modalRef","useDisableBodyScroll","modalContentRef","useFocusTrap","modalParent","useMemo","document","createElement","appendChild","removeChild","createPortal","role"],"sourceRoot":""}