@davi-ai/retorik-framework 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACGe,kDACb,YAAgC,EAChC,KAAU,EACV,OAAoB;IAEpB,MAAM,OAAO,CAAA,GAAA,gCAAS,EAAE;IACxB,KAAK,qBAAO,gCAAC;QAAc,GAAG,KAAK;;AACrC;;;;;;ACPe,kDACb,aAAiC,EACjC,KAAU,EACV,OAAoB;IAEpB,MAAM,OAAO,CAAA,GAAA,gCAAS,EAAE;IACxB,KAAK,qBAAO,gCAAC;QAAe,GAAG,KAAK;;AACtC;;;;;;;;;AIVA,4BAAiB;;;;ACAjB,4BAAiB;;;;ACAjB,4BAAiB;;;IGAjB;UAAK,cAAc;IAAd,eAAA,eACH,UAAO,KAAP;IADG,eAAA,eAEH,UAAA,KAAA;IAFG,eAAA,eAGH,aAAA,KAAA;IAHG,eAAA,eAIH,eAAA,KAAA;GAJG,8CAAA;IAOL;UAAK,iBAAiB;IAAjB,kBAAA,kBACH,aAAU,QAAV;IADG,kBAAA,kBAEH,cAAA,QAAA;GAFG,8CAAA;IAKL;UAAK,UAAU;IAAV,WACH,SAAM;IADH,WAEH,WAAQ;IAFL,WAGH,SAAM;IAHH,WAIH,QAAK;IAJF,WAKH,mBAAgB;IALb,WAMH,cAAA;IANG,WAOH,YAAS;GAPN,8CAAA;IAUL;UAAK,eAAe;IAAf,gBAAA,gBACH,WAAQ,KAAR;IADG,gBAAA,gBAEH,YAAA,KAAA;IAFG,gBAAA,gBAGH,UAAA,KAAA;GAHG,6CAAA;IAML;UAAK,cAAc;IAAd,eAAA,eACH,UAAO,KAAP;IADG,eAAA,eAEH,aAAA,KAAA;IAFG,eAAA,eAGH,eAAA,KAAA;IAHG,eAAA,eAI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C7C,MAAM,CAAC,EAAE,CAAA,GAAA,yCAAmB,EAAE,KAAK,CAAC;IACpC,QAAQ,CAAC,EAAE,CAAA,GAAA,yCAAmB,EAAE,OAAO,CAAC;IACxC,KAAK,CAAC,EAAE,CAAA,GAAA,yCAAmB,EAAE,IAAI,CAAC;IAClC,SAAS,CAAC,EAAE,CAAA,GAAA,yCAAmB,EAAE,QAAQ,CAAC;IAC1C,SAAS,CAAC,EAAE,CAAA,GAAA,yCAAmB,EAAE,QAAQ,CAAC;IAC1C,OAAO,CAAC,EAAE,CAAA,GAAA,yCAAmB,EAAE,MAAM,CAAC;AACxC;;;;ACRe;QAGT;IAFJ,MAAM,CAAC,gBAAgB,GAAG,CAAA,GAAA,wCAAiB;IAE3C,IAAI,CAAA,4BAAA,6BAAA,KAAA,IAAA,CAAA,+BAAA,gBAAiB,yBAAjB,0CAAA,KAAA,IAAA,6BAA8B,KAAH,MAAa,OAC1C,OAAO;IAET,OAAO;AACT;;;;;;;;;ArTgBA,MAAM,4CAAc,CAAA,GAAA,wCAAc,EAAE,KAAK,MAAM,CAAA,GAAA,wCAAW;AAC1D,MAAM,qCAAe,CAAA,GAAA,wCAAe,EAAE,KAAK,MAAM,CAAA,GAAA,wCAAY;IAE7D,2CAAe,CAAA,GAAA,wCAAW;AA0D1B,OAAO,UAAU;IACf,GAAG,OAAO,OAAO;iBACjB;kBACA;eACA;eACA;eACA;kBACA;AACF","sources":["src/index.tsx","src/renderAgent.tsx","src/renderWidget.tsx","src/components/index.ts","src/components/RetorikAgent.tsx","src/components/Common/ShadowRoot.tsx","node_modules/@parcel/runtime-js/lib/bundles/runtime-4fc48779b707f07f.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-45c1ee4eb5155d11.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-79119e0a2ffe783c.js","src/utils/imageFiles.ts","src/models/constants.ts","src/models/enums.ts","src/components/Common/RetorikContainer.tsx","src/components/Common/RetorikComposer.tsx","src/utils/fetchDirectLineToken.ts","src/utils/studioRetorikAddressFromPrefix.ts","src/utils/createCustomStore.ts","src/utils/createLinkAttachmentCard.ts","src/models/attachmentTypes.ts","src/utils/createImageAttachmentCard.ts","src/utils/processDirectlineIncomingActivity.ts","src/utils/markdownUtils.ts","src/utils/speechMarkdownUtils.ts","src/utils/processAttachments.ts","src/utils/adaptiveCardBuilder.ts","src/components/Contexts/speechCancelStore.ts","src/components/Contexts/utilsStore.ts","src/components/Utils/SendActivityEventListener.tsx","src/components/Contexts/RetorikContext.tsx","src/components/Contexts/localeStore.ts","src/utils/fetchAvailableLanguages.ts","src/utils/studioRetorikAddressFromBaseURI.ts","src/components/Contexts/SpeechContext.tsx","src/utils/createAdaptiveCardHostConfig.ts","src/models/adaptiveCardHostConfig.ts","src/components/Utils/attachmentMiddleware.tsx","src/components/Attachments/NewsAttachment.tsx","src/components/Utils/index.ts","src/components/Utils/Carousel.tsx","src/components/Icons/ChevronIcons/index.ts","src/components/Icons/ChevronIcons/ChevronLeftIcon.tsx","src/components/Icons/ChevronIcons/ChevronRightIcon.tsx","src/components/Icons/ChevronIcons/ChevronUpIcon.tsx","src/components/Utils/LocaleChangeEventListener.tsx","src/components/Utils/Radio.tsx","src/components/Utils/SendTextBox.tsx","src/components/Contexts/ViewContext.tsx","src/models/colors.ts","src/translations/menu.json","src/components/Icons/Miscellaneous/index.ts","src/components/Icons/Miscellaneous/CloseIcon.tsx","src/components/Icons/Miscellaneous/DownloadIcon.tsx","src/components/Icons/Miscellaneous/FeatherCheckIcon.tsx","src/components/Icons/Miscellaneous/FeatherFilterIcon.tsx","src/components/Icons/Miscellaneous/InfoWithCircleIcon.tsx","src/components/Icons/Miscellaneous/SendMessageIcon.tsx","src/components/Icons/Miscellaneous/ZoomOutIcon.tsx","src/components/Icons/Miscellaneous/RetorikLogoIcon.tsx","src/components/Utils/Subtitle.tsx","src/components/Utils/Toggle.tsx","src/components/Utils/ToggleWithTexts.tsx","src/components/Utils/Wheeler.tsx","src/components/Attachments/POIAttachment.tsx","src/components/Icons/DetailedPOIIcons/index.ts","src/components/Icons/DetailedPOIIcons/CommentsPennantIcon.tsx","src/components/Icons/DetailedPOIIcons/FavoriteIcon.tsx","src/components/Icons/DetailedPOIIcons/FavoriteLightIcon.tsx","src/components/Icons/DetailedPOIIcons/PhoneIcon.tsx","src/components/Icons/DetailedPOIIcons/PhotoCameraIcon.tsx","src/components/Attachments/DetailedAttachment/CommentsPennantMini.tsx","src/components/Contexts/ListContext.tsx","src/utils/getColorFromCategoryId.ts","src/components/Attachments/PaginationAttachment.tsx","src/translations/poi.json","src/components/Attachments/EmptyAttachment.tsx","src/components/Attachments/ImageAttachment.tsx","src/components/AnswerPanel/DisplayFullScreenButton.tsx","src/components/Attachments/LinkAttachment.tsx","src/translations/linkattachment.json","src/utils/capitalizeFirstLetter.ts","src/utils/checkFileNameInUrl.ts","src/components/Attachments/Utils/ClassicButton.tsx","src/components/Icons/ArrowIcons/index.ts","src/components/Icons/ArrowIcons/ArrowDownIcon.tsx","src/components/Icons/ArrowIcons/ArrowIcon.tsx","src/components/Icons/ArrowIcons/ArrowLeftIcon.tsx","src/components/Icons/ArrowIcons/ArrowRightIcon.tsx","src/components/Icons/ArrowIcons/ArrowUpIcon.tsx","src/components/Attachments/Utils/BorderlessButton.tsx","src/components/Attachments/MultiLinkAttachment.tsx","src/components/Attachments/SuggestedActionAttachment.tsx","src/components/Attachments/DiscoverAttachment.tsx","src/components/Attachments/SuggestionAttachment.tsx","src/components/Attachments/Utils/BorderlessButtonMessage.tsx","src/translations/suggestion.json","src/components/Utils/activityMiddleware.tsx","src/components/CustomAdaptiveCard/index.ts","src/components/CustomAdaptiveCard/Classes/TextBlockClass.tsx","src/utils/jsxToHtmlElement.ts","src/components/CustomAdaptiveCard/TextBlock.tsx","src/components/CustomAdaptiveCard/Classes/ToggleInputClass.tsx","src/components/CustomAdaptiveCard/InputToggle.tsx","src/utils/localStorageInputsUtils.ts","src/components/CustomAdaptiveCard/Classes/DateInputClass.tsx","src/components/CustomAdaptiveCard/InputDate.tsx","src/utils/getDateAsArray.ts","src/components/CustomAdaptiveCard/InputCalendar.tsx","src/components/CustomAdaptiveCard/Classes/TimeInputClass.tsx","src/components/CustomAdaptiveCard/InputTime.tsx","src/components/CustomAdaptiveCard/Classes/ChoiceSetClass.tsx","src/components/CustomAdaptiveCard/ChoiceSet/Radio.tsx","src/components/CustomAdaptiveCard/ChoiceSet/RadioAsButton.tsx","src/components/CustomAdaptiveCard/ChoiceSet/Checkbox.tsx","src/components/CustomAdaptiveCard/ChoiceSet/CheckboxAsButton.tsx","src/components/CustomAdaptiveCard/ChoiceSet/Select.tsx","src/translations/inputs.json","src/components/CustomAdaptiveCard/Classes/LikertClass.tsx","src/components/CustomAdaptiveCard/CustomElements/Likert.tsx","src/components/CustomAdaptiveCard/Classes/ImageChoiceSetClass.tsx","src/components/CustomAdaptiveCard/Classes/ChoiceWithUrl.ts","src/components/CustomAdaptiveCard/ChoiceSetImages/MultiSelect.tsx","src/components/CustomAdaptiveCard/ChoiceSetImages/MonoSelect.tsx","src/components/CustomAdaptiveCard/Classes/SliderClass.tsx","src/components/CustomAdaptiveCard/CustomElements/Slider.tsx","src/components/CustomAdaptiveCard/Classes/ActionSubmitClass.tsx","src/components/CustomAdaptiveCard/ActionButton.tsx","src/components/CustomAdaptiveCard/Classes/ActionOpenUrlClass.tsx","src/components/CustomAdaptiveCard/Classes/ActionShowCardClass.tsx","src/components/CustomAdaptiveCard/Classes/ActionToggleVisibilityClass.tsx","src/components/Common/RetorikRouter.tsx","src/hooks/useLastEventActivity.tsx","src/components/Views/HomeView.tsx","src/components/Common/Background.tsx","src/components/Utils/BackgroundVideo.tsx","src/hooks/useRefDimensions.ts","src/components/AnswerPanel/UserRequest.tsx","src/components/AnswerPanel/VoiceInput.tsx","src/components/Common/Logo.tsx","src/components/AnswerPanel/BotResponse.tsx","src/hooks/useCurrentOrLastPlayedActivity.ts","src/components/Templates/List.tsx","src/components/Contexts/ListContextProvider.tsx","src/components/Display/List.tsx","src/components/Templates/FullScreenRemoteClosing.tsx","src/components/Templates/index.ts","src/components/Templates/Desktop.tsx","src/components/Templates/FullScreen.tsx","src/components/Templates/FullScreenMobile.tsx","src/components/Templates/FullScreenRemote.tsx","src/components/Templates/Grid.tsx","src/components/Templates/SubMenu.tsx","src/components/Utils/AbsoluteLargeClosingButton.tsx","src/hooks/useCloseButtonTop.ts","src/components/Menu/Remote/DashboardButton.tsx","src/components/Icons/MenuIcons/index.ts","src/components/Icons/MenuIcons/DashboardIcon.tsx","src/components/Icons/MenuIcons/KeyboardIcon.tsx","src/components/Icons/MenuIcons/MicrophoneIcon.tsx","src/components/Icons/MenuIcons/MicrophoneIconOn.tsx","src/components/Icons/MenuIcons/MicrophoneIconOff.tsx","src/components/Templates/SubMenuClosing.tsx","src/components/Menu/Common/index.ts","src/components/Menu/Common/BackButton.tsx","src/components/Menu/Common/Dashboard.tsx","src/components/Menu/ViewsDisplay/DisplayViews.tsx","src/components/Menu/ViewsDisplay/DisplayGenerator.tsx","src/translations/views.json","src/components/Menu/ViewsDisplay/DisplayIcon.tsx","src/components/Icons/ViewIcons/index.ts","src/components/Icons/ViewIcons/EmergencyIcon.tsx","src/components/Icons/ViewIcons/HomeIcon.tsx","src/components/Icons/ViewIcons/InteractiveMapIcon.tsx","src/components/Icons/ViewIcons/NewsChannelIcon.tsx","src/components/Icons/ViewIcons/WeatherIcon.tsx","src/components/Icons/ParameterIcons/index.ts","src/components/Icons/ParameterIcons/HistoryIcon.tsx","src/components/Icons/ParameterIcons/LanguageIcon.tsx","src/components/Icons/ParameterIcons/ParametersIcon.tsx","src/components/Icons/ParameterIcons/TutorialIcon.tsx","src/components/Menu/ViewsDisplay/DisplaySubViews.tsx","src/components/Menu/ViewsDisplay/DisplaySubGenerator.tsx","src/components/Menu/Common/HistoryButton.tsx","src/components/Menu/Common/ParameterButton.tsx","src/translations/languageCodeToMotherTongue.json","src/components/Menu/Common/LanguageButton.tsx","src/utils/checkLocale.ts","src/components/Menu/Common/MicrophoneButton.tsx","src/assets/lottie/recording.json","src/utils/getMicrophonePermission.ts","src/components/Common/Modal.tsx","src/components/Common/CloseButton.tsx","src/translations/common.json","src/components/Menu/Common/Parameters.tsx","src/components/Menu/Common/TutorialButton.tsx","src/components/Display/Parts/Title.tsx","src/translations/template.json","src/components/Display/Parts/FilterLarge.tsx","src/components/Display/Parts/Filter/ChosenItem.tsx","src/components/Display/Parts/Filter/FilterItem.tsx","src/components/Display/Parts/Filter/SubFilter.tsx","src/components/Utils/CheckBox.tsx","src/components/Display/Parts/Filter/SubFilterAll.tsx","src/components/Display/Parts/Filter/SubFilterCalendar.tsx","src/components/Display/Parts/FilterMobile.tsx","src/components/Display/Parts/Filter/MobileFilterPage.tsx","src/components/Display/Parts/Filter/MobileUpperBand.tsx","src/components/Display/Parts/Filter/MobileSubFilterPage.tsx","src/components/Display/Parts/Filter/MobileDisplayResults.tsx","src/components/Display/Parts/ListContainer.tsx","src/components/Display/Parts/Suggestions.tsx","src/components/Display/Parts/Suggestions/VocalReminder.tsx","src/components/Display/Parts/Suggestions/SuggestionsItem.tsx","src/components/Attachments/Attachments.tsx","src/components/AnswerPanel/Card.tsx","src/components/AnswerPanel/ScrollButton.tsx","src/hooks/useFullscreenImage.ts","src/components/Icons/ScrollButton/ScrollButtonIcon.tsx","src/components/AnswerPanel/Carousel.tsx","src/components/Utils/Swiper.tsx","src/hooks/useAnimationQueue.ts","src/hooks/useLastBotActivity.ts","src/components/Common/RetorikLogo.tsx","src/components/Views/SubViews.tsx","src/components/History/HistoryList.tsx","src/hooks/useMessageActivities.ts","src/translations/history.json","src/components/History/HistoryItem.tsx","src/components/History/HistoryQA.tsx","src/components/Language/LanguageChoice.tsx","src/translations/language.json","src/components/Attachments/AttachmentDetail.tsx","src/hooks/useShowPOI.ts","src/utils/colorUtils.ts","src/components/Attachments/DetailedAttachment/DetailedTitle.tsx","src/components/Attachments/DetailedAttachment/CommentsPennant.tsx","src/components/Attachments/DetailedAttachment/DetailedText.tsx","src/components/Attachments/DetailedAttachment/DownloadSheet.tsx","src/components/Attachments/DetailedAttachment/DownloadQR.tsx","src/components/Attachments/DetailedAttachment/DetailedMedia.tsx","src/components/Attachments/DetailedAttachment/DetailedAddress.tsx","src/components/Attachments/DetailedAttachment/ShowPhoneNumber.tsx","src/components/Attachments/DetailedAttachment/Map.tsx","src/components/Attachments/DetailedAttachment/Routes.tsx","src/components/Attachments/DetailedAttachment/RoutesItem.tsx","src/utils/getDistanceAsString.ts","src/utils/getTimeAsString.ts","src/components/Icons/MapIcons/index.ts","src/components/Icons/MapIcons/CyclingRegularIcon.tsx","src/components/Icons/MapIcons/DrivingCarIcon.tsx","src/components/Icons/MapIcons/FootWalkingIcon.tsx","src/components/Attachments/DetailedAttachment/MapUser.tsx","src/components/Attachments/Utils/FullScreenImage.tsx","src/components/Weather/Weather.tsx","src/components/Utils/SubView/MobileTopContainer.tsx","src/components/Utils/SubView/MobileIconAndTitle.tsx","src/components/Utils/SubView/LargeIconAndTitle.tsx","src/components/Views/CustomView.tsx","src/hooks/useShowMap.ts","src/components/Emergency/Emergency.tsx","src/components/Emergency/EmergencyContent.tsx","src/utils/fetchEmergencyData.ts","src/translations/emergency.json","src/components/Loader/Animation2.tsx","src/hooks/useShowEmergency.ts","src/components/AnswerPanel/ConversationPanel.tsx","src/components/Contexts/widgetStore.ts","src/hooks/useActivitiesTextMode.ts","src/components/Menu/Mobile/ConversationHeader.tsx","src/components/Menu/MenuDisplayer.tsx","src/components/Menu/Remote/RemoteContainer.tsx","src/components/Menu/Remote/Remote.tsx","src/components/Menu/Remote/Mode.tsx","src/components/Menu/Mobile/MobileContainer.tsx","src/components/Menu/Mobile/Mobile.tsx","src/components/Menu/Mobile/ModeButton.tsx","src/components/Menu/Mobile/ParametersAndDashboardContainer.tsx","src/components/Views/NewsView.tsx","src/components/News/Time.tsx","src/translations/news.json","src/components/News/News.tsx","src/components/News/SpeakNews.tsx","src/components/Speech/RetorikSpeech.tsx","src/components/Loader/LoaderCallToAction.tsx","src/translations/loader.json","src/components/Loader/Animation.tsx","src/utils/createUtterance.ts","src/utils/selectVoice.ts","src/components/News/Banner.tsx","src/hooks/useNews.tsx","src/components/Views/WarningBeforeNewsView.tsx","src/components/Common/Container.tsx","src/hooks/useCurrentPagination.ts","src/components/Contexts/ContextProvider.tsx","src/components/Contexts/TelemetryContext.tsx","src/utils/fetchAgentData.ts","src/utils/getThemeColors.ts","src/components/Speech/SpeechManager.tsx","src/utils/checkLastbotActivity.ts","src/components/Utils/MobileLandscapePreventer.tsx","src/translations/mobileLandscapePreventer.json","src/models/urlEncodedImages.ts","src/components/Telemetry/ErrorCollector.tsx","src/components/Telemetry/ErrorFallback.tsx","src/translations/error.json","src/components/RetorikWidget.tsx","src/utils/getWidgetStyles.ts","src/translations/widget.json","src/components/RetorikNews.tsx","src/utils/defaultCharacters.ts","src/hooks/useSpeechEnded.ts"],"sourcesContent":["import coreRenderAgent from './renderAgent'\r\nimport coreRenderWidget from './renderWidget'\r\nimport { RetorikAgent, RetorikWidget, RetorikNews } from './components'\r\nimport { characters } from './utils/defaultCharacters'\r\nimport useSpeechEnded from './hooks/useSpeechEnded'\r\nimport fetchAvailableLanguages from './utils/fetchAvailableLanguages'\r\nimport {\r\n useLocaleStore,\r\n getLocale,\r\n setLocale\r\n} from './components/Contexts/localeStore'\r\nimport {\r\n openWidget,\r\n closeWidget,\r\n toggleWidget,\r\n toggleDisplay\r\n} from './components/Contexts/widgetStore'\r\nimport {\r\n useUtilsStore,\r\n setCurrentCustomView,\r\n setCurrentSubView,\r\n showAgent,\r\n hideAgent,\r\n sendActivity\r\n} from './components/Contexts/utilsStore'\r\n\r\nconst renderAgent = coreRenderAgent.bind(null, RetorikAgent)\r\nconst renderWidget = coreRenderWidget.bind(null, RetorikWidget)\r\n\r\nexport default RetorikAgent\r\n\r\nexport {\r\n RetorikAgent,\r\n RetorikWidget,\r\n RetorikNews,\r\n characters,\r\n renderAgent,\r\n useSpeechEnded,\r\n useUtilsStore,\r\n setCurrentCustomView,\r\n setCurrentSubView,\r\n sendActivity,\r\n useLocaleStore,\r\n fetchAvailableLanguages,\r\n getLocale,\r\n setLocale,\r\n openWidget,\r\n closeWidget,\r\n toggleWidget,\r\n toggleDisplay,\r\n showAgent,\r\n hideAgent\r\n}\r\n\r\nexport type {\r\n AvailableLanguages,\r\n Configuration,\r\n ViewsConfiguration,\r\n View,\r\n BackgroundOptions,\r\n ChatbotData,\r\n AgentData,\r\n PonyfillFactoryCredentials,\r\n AddressData,\r\n UserData,\r\n Queue,\r\n CustomVoice,\r\n NewsConfig,\r\n WidgetConfiguration,\r\n CustomMenu\r\n} from './models/types'\r\n\r\nexport type { RetorikThemeColors } from './models/colorTypes'\r\n\r\nexport {\r\n CONTENT_TYPE_POI,\r\n CONTENT_TYPE_NEWS,\r\n CONTENT_TYPE_ADAPTIVE_CARD\r\n} from './models/attachmentTypes'\r\n\r\nexport {\r\n AvailableViews,\r\n AvailableSubViews,\r\n RetorikEvent,\r\n CurrentSubView\r\n} from './models/enums'\r\n\r\nwindow.Retorik = {\r\n ...window.Retorik,\r\n renderAgent,\r\n renderWidget,\r\n showAgent,\r\n hideAgent,\r\n setLocale,\r\n sendActivity\r\n}\r\n","import React, { ComponentType } from 'react'\r\nimport { createRoot } from 'react-dom/client'\r\n\r\nexport default function renderAgent(\r\n RetorikAgent: ComponentType<any>,\r\n props: any,\r\n element: HTMLElement\r\n): void {\r\n const root = createRoot(element)\r\n root.render(<RetorikAgent {...props} />)\r\n}\r\n","import React, { ComponentType } from 'react'\r\nimport { createRoot } from 'react-dom/client'\r\n\r\nexport default function renderAgent(\r\n RetorikWidget: ComponentType<any>,\r\n props: any,\r\n element: HTMLElement\r\n): void {\r\n const root = createRoot(element)\r\n root.render(<RetorikWidget {...props} />)\r\n}\r\n","import RetorikAgent from './RetorikAgent'\r\nimport RetorikWidget from './RetorikWidget'\r\nimport RetorikNews from './RetorikNews'\r\n\r\nexport { RetorikAgent, RetorikWidget, RetorikNews }\r\n","import React from 'react'\r\nimport type { RetorikMainComponentProps } from '../models/retorikTypes'\r\nimport ShadowRoot from './Common/ShadowRoot'\r\nimport RetorikContainer from './Common/RetorikContainer'\r\nimport { ContainerParent } from '../models/enums'\r\n\r\nconst RetorikAgent = (props: RetorikMainComponentProps): JSX.Element => {\r\n // --------- /!\\ -----------\r\n // Ne mettre ici que de la logique spécifique au retorikAgent\r\n // Ce qui est commun avec RetorikWidget ou autres doit aller dans RetorikComposer\r\n // -------------------------\r\n\r\n return (\r\n <ShadowRoot>\r\n <RetorikContainer {...{ parent: ContainerParent.agent, ...props }} />\r\n </ShadowRoot>\r\n )\r\n}\r\n\r\nexport default RetorikAgent\r\n","import root from 'react-shadow'\r\nimport React from 'react'\r\nimport tailwind from 'bundle-text:../../tailwind.css'\r\nimport spiritEngine from 'bundle-text:../../../node_modules/@davi-ai/body-engine-sprite/dist/index.css'\r\nimport leaflet from 'bundle-text:../../../node_modules/leaflet/dist/leaflet.css'\r\nimport { imageFiles } from '../../utils/imageFiles'\r\n\r\n// These lines allow correct default icon display, either way they are searched by relative path and not found\r\nimport L from 'leaflet'\r\nimport iconShadow from 'leaflet/dist/images/marker-shadow.png'\r\n\r\n/**\r\n * STORYBOOK : there is a conflict between parcel and webpack. Here we use bundle-text from parcel and it's not recognized in webpack, that is used in storybook.\r\n * To prevent conflict, you need to comment the 3 imports unsign 'bundle-text' above, and the 3 'style' tags in the HTML below.\r\n */\r\n\r\nconst DefaultIcon = L.icon({\r\n iconUrl: `${imageFiles.mapArrival}`,\r\n shadowUrl: iconShadow,\r\n iconSize: [32, 41],\r\n iconAnchor: [10, 41]\r\n})\r\nL.Marker.prototype.options.icon = DefaultIcon\r\n\r\nconst ShadowRoot = ({ children }): JSX.Element => {\r\n return (\r\n <root.div\r\n id='retorik-shadow'\r\n className='rf-w-full rf-h-full'\r\n style={{\r\n position: 'relative'\r\n }}\r\n >\r\n {children}\r\n <style type='text/css'>{`${tailwind}`}</style>\r\n <style type='text/css'>{`${spiritEngine}`}</style>\r\n <style type='text/css'>{`${leaflet}`}</style>\r\n </root.div>\r\n )\r\n}\r\n\r\nexport default ShadowRoot\r\n","module.exports = \"122858620b337ef4\";","module.exports = \"a794368ab8461759\";","module.exports = \"59f5d850470bfc4d\";","import { CDNImagesAddress } from '../models/constants'\r\n\r\nconst imageFiles = {\r\n noimage: `${CDNImagesAddress}/no-image.png`,\r\n logoRetorikBlack: `${CDNImagesAddress}/logo_RETORIK_black.png`,\r\n logoRetorikWhite: `${CDNImagesAddress}/logo_RETORIK_white.png`,\r\n mapDeparture: `${CDNImagesAddress}/Leaflet/map_departure.png`,\r\n mapArrival: `${CDNImagesAddress}/Leaflet/map_arrival.png`,\r\n leaMini: `${CDNImagesAddress}/lea_mini.png`\r\n}\r\n\r\nexport { imageFiles }\r\n","import { AvailableViews, AvailableSubViews, DeviceType } from './enums'\r\nimport type { BaseMenu, BaseSubMenu } from './types'\r\n\r\nconst mobileBreakpoint = 600\r\nconst mediumBreakpoint = 1500\r\n\r\nconst CDNAddress = 'https://cdn.retorik.ai'\r\nconst CDNCharactersAddress = `${CDNAddress}/spiritenginehtml5/characters`\r\nconst CDNImagesAddress = `${CDNAddress}/retorik-framework/imagefiles`\r\nconst CDNAudioAddress = `${CDNAddress}/retorik-framework/audiofiles`\r\n\r\nconst studioRetorik = 'https://studio.retorik.ai'\r\nconst studioRetorikDev = 'https://dev.studio.retorik.ai'\r\nconst studioRetorikStaging = 'https://preview.studio.retorik.ai'\r\nconst studioRetorikExperimental = 'https://experimental.studio.retorik.ai'\r\n\r\nconst managementRetorik = 'https://management.retorik.ai'\r\nconst managementRetorikDev = 'https://dev.management.retorik.ai'\r\nconst managementRetorikStaging = 'https://staging.management.retorik.ai'\r\nconst managementOGData = '/api/getOGData'\r\n\r\nconst openRoute = 'https://api.openrouteservice.org/v2/directions'\r\nconst openRouteAPIKey =\r\n '5b3ce3597851110001cf62483cfd6bd46f934b7d96f108a35e0f08b8'\r\nconst openMeteoBefore = 'https://api.open-meteo.com/v1/forecast?'\r\nconst openMeteoAfter =\r\n '&daily=weathercode,temperature_2m_max,temperature_2m_min&timezone=auto&current_weather=true'\r\n\r\nconst webchatTokenRetrievalAddress =\r\n 'K2.ContentFields.WebChat/api/GetWebchatToken'\r\n\r\nconst hospitalityApiAddress = 'api/hospitality/Emergency'\r\n\r\nconst telemetryAddress = 'https://telemetry.retorik.ai/otlp-http/v1/traces'\r\n\r\nconst DEFAULT_LANGUAGE_DATA = {\r\n default: 'fr-FR',\r\n all: ['fr-FR']\r\n}\r\n\r\nconst DEFAULT_VIEWS: BaseMenu[] = [\r\n { view: AvailableViews.home, indice: 1 },\r\n { view: AvailableViews.emergency, indice: 2 }\r\n]\r\nconst DEFAULT_SUB_VIEWS: BaseSubMenu[] = [\r\n { view: AvailableSubViews.history, indice: 1 },\r\n { view: AvailableSubViews.tutorial, indice: 2 }\r\n]\r\n\r\nconst mobileDisplays = [DeviceType.mobile, DeviceType.widget]\r\n\r\nconst commonColors = {\r\n primary: '#00D7FF',\r\n secondary: '#1999B1',\r\n black: '#101219',\r\n whereToEatColor: '#FC952E',\r\n whereToSleepColor: '#9F007D',\r\n tobeSeenColor: '#76AB2A',\r\n tobeDoneColor: '#E23C2A',\r\n localProductsColor: '#AFB942',\r\n servicesColor: '#00C8BC',\r\n agendaColor: '#865DA2'\r\n}\r\n\r\nexport {\r\n mobileBreakpoint,\r\n mediumBreakpoint,\r\n CDNAddress,\r\n CDNCharactersAddress,\r\n CDNImagesAddress,\r\n CDNAudioAddress,\r\n studioRetorik,\r\n studioRetorikDev,\r\n studioRetorikStaging,\r\n studioRetorikExperimental,\r\n managementRetorik,\r\n managementRetorikDev,\r\n managementRetorikStaging,\r\n managementOGData,\r\n openRoute,\r\n openRouteAPIKey,\r\n openMeteoBefore,\r\n openMeteoAfter,\r\n webchatTokenRetrievalAddress,\r\n hospitalityApiAddress,\r\n telemetryAddress,\r\n DEFAULT_LANGUAGE_DATA,\r\n DEFAULT_VIEWS,\r\n DEFAULT_SUB_VIEWS,\r\n mobileDisplays,\r\n commonColors\r\n}\r\n","enum AvailableViews {\r\n home = 1,\r\n news,\r\n weather,\r\n emergency\r\n}\r\n\r\nenum AvailableSubViews {\r\n history = 1000,\r\n tutorial\r\n}\r\n\r\nenum CategoryId {\r\n eat = 'where to eat',\r\n sleep = 'where to sleep',\r\n see = 'what to see',\r\n do = 'what to do',\r\n localproducts = 'local products',\r\n services = 'services',\r\n agenda = 'events'\r\n}\r\n\r\nenum ContainerParent {\r\n agent = 1,\r\n widget,\r\n news\r\n}\r\n\r\nenum CurrentSubView {\r\n none = 1,\r\n history,\r\n languages,\r\n weather,\r\n emergency,\r\n custom\r\n}\r\n\r\nenum Depth {\r\n background = 1,\r\n util,\r\n chatbot,\r\n ui,\r\n dropdown,\r\n overlay,\r\n menu,\r\n modal,\r\n exitwidget\r\n}\r\n\r\nenum DeviceType {\r\n mobile = 1,\r\n borne,\r\n landscape,\r\n widget\r\n}\r\n\r\nenum LoaderSteps {\r\n loader = 1,\r\n locale,\r\n supported,\r\n store,\r\n directline,\r\n ponyfill,\r\n agentdata\r\n}\r\n\r\nenum Mode {\r\n vocal = 1,\r\n text,\r\n dashboard\r\n}\r\n\r\nenum Position {\r\n top = 1,\r\n right,\r\n bottom,\r\n left\r\n}\r\n\r\nenum RetorikEvent {\r\n DetailViewOpen = 1,\r\n DetailViewClose = 2,\r\n SpeechStarted = 3,\r\n SpeechEnded = 4\r\n}\r\n\r\nexport {\r\n AvailableViews,\r\n AvailableSubViews,\r\n CategoryId,\r\n ContainerParent,\r\n CurrentSubView,\r\n Depth,\r\n DeviceType,\r\n LoaderSteps,\r\n Mode,\r\n Position,\r\n RetorikEvent\r\n}\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React from 'react'\r\nimport RetorikComposer from './RetorikComposer'\r\nimport RetorikRouter from './RetorikRouter'\r\nimport Container from './Container'\r\nimport ContextProvider from '../Contexts/ContextProvider'\r\nimport getThemeColors from '../../utils/getThemeColors'\r\nimport type { RetorikMainComponentProps } from '../../models/retorikTypes'\r\nimport type { ThemeColors } from '../../models/colorTypes'\r\nimport NewsView from '../Views/NewsView'\r\nimport { ContainerParent, Mode } from '../../models/enums'\r\nimport SpeechManager from '../Speech/SpeechManager'\r\nimport MobileLandscapePreventer from '../Utils/MobileLandscapePreventer'\r\nimport ErrorCollector from '../Telemetry/ErrorCollector'\r\n\r\ntype RetorikContainerProps = RetorikMainComponentProps & {\r\n parent: number\r\n}\r\n\r\nconst RetorikContainer = ({\r\n skipLoader,\r\n defaultMode,\r\n parent,\r\n config,\r\n viewsConfig,\r\n chatbotData,\r\n agentData,\r\n ponyfillFactoryCredentials,\r\n addressData,\r\n userData,\r\n externalEventHandler,\r\n width,\r\n height,\r\n customVoice,\r\n colors,\r\n externalComponents\r\n}: RetorikContainerProps): JSX.Element => {\r\n const themeColors: ThemeColors = getThemeColors(colors)\r\n\r\n return (\r\n <ContextProvider\r\n skipLoader={skipLoader}\r\n mode={defaultMode || Mode.vocal}\r\n viewsConfiguration={viewsConfig}\r\n config={config}\r\n customVoice={customVoice}\r\n addressData={addressData}\r\n agentSource={agentData}\r\n ponyfillFactoryCredentials={ponyfillFactoryCredentials}\r\n themeColors={themeColors}\r\n isConfigUpdated={false}\r\n >\r\n <MobileLandscapePreventer />\r\n <RetorikComposer\r\n addressData={addressData}\r\n userData={userData}\r\n externalEventHandler={externalEventHandler}\r\n colors={themeColors}\r\n >\r\n <ErrorCollector>\r\n <SpeechManager />\r\n <Container\r\n fullSize={\r\n parent !== ContainerParent.widget && config.fullSize !== false\r\n }\r\n width={width}\r\n height={height}\r\n colors={themeColors}\r\n parent={parent}\r\n >\r\n {parent === ContainerParent.news ? (\r\n <NewsView\r\n chatbotData={chatbotData}\r\n hideMenu={true}\r\n isRetorikNews={true}\r\n />\r\n ) : (\r\n <RetorikRouter\r\n chatbotData={chatbotData}\r\n externalComponents={externalComponents}\r\n />\r\n )}\r\n </Container>\r\n </ErrorCollector>\r\n </RetorikComposer>\r\n </ContextProvider>\r\n )\r\n}\r\n\r\nexport default RetorikContainer\r\n\r\n/*\r\nimport React, { useEffect, useState } from 'react'\r\nimport RetorikComposer from './RetorikComposer'\r\nimport RetorikRouter from './RetorikRouter'\r\nimport Container from './Container'\r\nimport ContextProvider from '../Contexts/ContextProvider'\r\nimport getThemeColors from '../../utils/getThemeColors'\r\nimport type { RetorikMainComponentProps } from '../../models/retorikTypes'\r\nimport type { ThemeColors } from '../../models/colorTypes'\r\nimport NewsView from '../Views/NewsView'\r\nimport { ContainerParent, Mode } from '../../models/enums'\r\nimport SpeechManager from '../Speech/SpeechManager'\r\nimport MobileLandscapePreventer from '../Utils/MobileLandscapePreventer'\r\nimport getRetorikConfigs from '../../utils/getConfigs'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { AgentData } from '../../models/types'\r\n\r\ntype RetorikContainerProps = RetorikMainComponentProps & {\r\n parent: number\r\n}\r\n\r\nconst RetorikContainer = (props: RetorikContainerProps): JSX.Element => {\r\n const { setConfiguration, setAgentData } = useRetorik()\r\n const [isConfigUpdated, setIsConfigUpdated] = useState<boolean>(false)\r\n\r\n const [processedThemeColors, setProcessedThemeColors] = useState<ThemeColors>(\r\n getThemeColors(props.colors)\r\n )\r\n const [processedSkipLoader, setProcessedSkipLoader] = useState(\r\n props.skipLoader\r\n )\r\n const [processedDefaultMode, setProcessedDefaultMode] = useState(\r\n props.defaultMode\r\n )\r\n const [processedConfig, setProcessedConfig] = useState(props.config)\r\n const [processedViewsConfig, setProcessedViewsConfig] = useState(\r\n props.viewsConfig\r\n )\r\n const [processedChatbotData, setProcessedChatbotData] = useState(\r\n props.chatbotData\r\n )\r\n const [processedAgentData, setProcessedAgentData] = useState(props.agentData)\r\n const [\r\n processedPonyfillFactoryCredentials,\r\n setProcessedPonyfillFactoryCredentials\r\n ] = useState(props.ponyfillFactoryCredentials)\r\n const [processedAddressData, setProcessedAddressData] = useState(\r\n props.addressData\r\n )\r\n const [processedUserData, setProcessedUserData] = useState(props.userData)\r\n const [processedWidth, setProcessedWidth] = useState(props.width)\r\n const [processedHeight, setProcessedHeight] = useState(props.height)\r\n const [processedCustomVoice, setProcessedCustomVoice] = useState(\r\n props.customVoice\r\n )\r\n\r\n useEffect(() => {\r\n const getUpdatedConfig = async (): Promise<void> => {\r\n const {\r\n skipLoader,\r\n defaultMode,\r\n config: _config,\r\n viewsConfig,\r\n chatbotData,\r\n agentData,\r\n ponyfillFactoryCredentials,\r\n addressData,\r\n userData,\r\n width,\r\n height,\r\n customVoice,\r\n colors\r\n } = await getRetorikConfigs(props)\r\n\r\n setProcessedSkipLoader(skipLoader)\r\n setProcessedDefaultMode(defaultMode)\r\n setProcessedConfig(_config)\r\n setProcessedViewsConfig(viewsConfig)\r\n setProcessedChatbotData(chatbotData)\r\n setProcessedAgentData(agentData)\r\n setProcessedPonyfillFactoryCredentials(ponyfillFactoryCredentials)\r\n setProcessedAddressData(addressData)\r\n setProcessedUserData(userData)\r\n setProcessedWidth(width)\r\n setProcessedHeight(height)\r\n setProcessedCustomVoice(customVoice)\r\n setProcessedThemeColors(getThemeColors(colors))\r\n\r\n setIsConfigUpdated(true)\r\n }\r\n\r\n // Always false ATM for production package creation without this feature\r\n isConfigUpdated && getUpdatedConfig()\r\n }, [])\r\n\r\n useEffect(() => {\r\n if (isConfigUpdated) {\r\n setConfiguration(processedConfig)\r\n if (processedAgentData && typeof processedAgentData === 'object')\r\n setAgentData(processedAgentData as AgentData)\r\n }\r\n }, [isConfigUpdated])\r\n\r\n return (\r\n <ContextProvider\r\n skipLoader={processedSkipLoader}\r\n mode={processedDefaultMode || Mode.vocal}\r\n viewsConfiguration={processedViewsConfig}\r\n config={processedConfig}\r\n addressData={processedAddressData}\r\n agentSource={processedAgentData}\r\n ponyfillFactoryCredentials={processedPonyfillFactoryCredentials}\r\n themeColors={processedThemeColors}\r\n isConfigUpdated={isConfigUpdated}\r\n >\r\n <MobileLandscapePreventer />\r\n <RetorikComposer\r\n addressData={processedAddressData}\r\n userData={processedUserData}\r\n externalEventHandler={props.externalEventHandler}\r\n customVoice={processedCustomVoice}\r\n colors={processedThemeColors}\r\n >\r\n <SpeechManager />\r\n <Container\r\n fullSize={\r\n props.parent !== ContainerParent.widget &&\r\n processedConfig.fullSize !== false\r\n }\r\n width={processedWidth}\r\n height={processedHeight}\r\n colors={processedThemeColors}\r\n parent={props.parent}\r\n >\r\n {props.parent === ContainerParent.news ? (\r\n <NewsView\r\n chatbotData={processedChatbotData}\r\n hideMenu={true}\r\n isRetorikNews={true}\r\n />\r\n ) : (\r\n <RetorikRouter\r\n chatbotData={processedChatbotData}\r\n externalComponents={props.externalComponents}\r\n />\r\n )}\r\n </Container>\r\n </RetorikComposer>\r\n </ContextProvider>\r\n )\r\n}\r\n\r\nexport default RetorikContainer\r\n*/\r\n","// @ts-nocheck\r\nimport React, { useState, useEffect, useMemo } from 'react'\r\nimport {\r\n createDirectLine,\r\n createCognitiveServicesSpeechServicesPonyfillFactory\r\n} from 'botframework-webchat'\r\nimport FullComposer from 'botframework-webchat/lib/FullComposer'\r\nimport type { AddressData, UserData } from '../../models/types'\r\nimport type { ThemeColors } from '../../models/colorTypes'\r\nimport { fetchDirectLineToken } from '../../utils/fetchDirectLineToken'\r\nimport createCustomStore from '../../utils/createCustomStore'\r\nimport SendActivityEventListener from '../Utils/SendActivityEventListener'\r\nimport type { Store } from 'redux'\r\nimport type { DirectLine } from 'botframework-directlinejs'\r\nimport { useSpeech } from '../Contexts/SpeechContext'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport type { WithChildren } from '../../models/utils'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport createAdaptiveCardHostConfig from '../../utils/createAdaptiveCardHostConfig'\r\nimport attachmentMiddleware from '../Utils/attachmentMiddleware'\r\nimport activityMiddleware from '../Utils/activityMiddleware'\r\nimport * as AC from 'adaptivecards/lib/adaptivecards'\r\nimport { useRetorikUI } from '../CustomAdaptiveCard'\r\nimport MarkdownIt from 'markdown-it'\r\n\r\n// Add markdown-it to window for markdown processing\r\nwindow.markdownit = MarkdownIt\r\n\r\nuseRetorikUI()\r\n\r\ntype RetorikComposerProps = WithChildren<{\r\n addressData: AddressData\r\n userData: UserData\r\n externalEventHandler?: (action: any, dispatch?: any) => boolean\r\n height?: number | 'full'\r\n width?: number | 'full'\r\n colors: ThemeColors\r\n}>\r\n\r\nconst defaultUser = {\r\n name: 'default',\r\n id: '',\r\n username: 'default',\r\n nom: 'defaultName',\r\n prenom: 'à vous',\r\n email: '',\r\n token: '',\r\n referrer: '',\r\n ipaddress: ''\r\n}\r\n\r\n/**\r\n * Component using DirectLine\r\n * @param props\r\n */\r\nconst RetorikComposer = ({\r\n addressData,\r\n userData,\r\n externalEventHandler,\r\n children,\r\n colors\r\n}: RetorikComposerProps): JSX.Element => {\r\n const [directLine, setDirectLine] = useState<DirectLine | null>(null)\r\n const [store, setStore] = useState<Store | null>(null)\r\n const { ponyfillCredentials } = useSpeech()\r\n const { configuration, agentData, setAppAvailable, loaderClosed } =\r\n useRetorik()\r\n const { locale, supported } = useLocaleStore()\r\n\r\n useEffect(() => {\r\n if (addressData) {\r\n fetchDirectLineToken(addressData).then((token) => {\r\n let test = true\r\n if (configuration.enableConversationCookie !== false) {\r\n const conversationCookie = document.cookie\r\n .split('; ')\r\n .find((row) => row.startsWith('retorikConversationCookie='))\r\n ?.split('=')[1]\r\n\r\n if (conversationCookie) {\r\n const splitCookieData = conversationCookie.split('||')\r\n if (splitCookieData.length === 2) {\r\n const cookieConversationId = splitCookieData[0]\r\n const cookieTenantName = splitCookieData[1]\r\n const fullTenantName = (\r\n addressData.baseURI ||\r\n `${addressData.prefix || ''}${addressData.tenant}`\r\n ).replace(/;|,|\\s/g, '')\r\n\r\n if (cookieTenantName === fullTenantName) {\r\n setDirectLine(\r\n createDirectLine({\r\n token: token,\r\n conversationId: cookieConversationId,\r\n watermark: '0'\r\n })\r\n )\r\n\r\n test = false\r\n }\r\n }\r\n }\r\n }\r\n\r\n test &&\r\n setDirectLine(\r\n createDirectLine({\r\n token: token\r\n })\r\n )\r\n })\r\n }\r\n }, [addressData])\r\n\r\n const ponyfillFactory = useMemo(() => {\r\n if (ponyfillCredentials) {\r\n const ponyfill = createCognitiveServicesSpeechServicesPonyfillFactory({\r\n credentials: ponyfillCredentials\r\n })\r\n return ponyfill\r\n }\r\n\r\n return null\r\n }, [ponyfillCredentials])\r\n\r\n // Initialize the store\r\n useEffect(() => {\r\n initStore()\r\n }, [])\r\n\r\n // Create custom store\r\n function initStore(): void {\r\n setStore(\r\n createCustomStore(\r\n userData || defaultUser,\r\n configuration.enableConversationCookie,\r\n configuration.conversationCookieMaxAge,\r\n addressData,\r\n configuration.skipWelcome || false,\r\n locale,\r\n externalEventHandler,\r\n !!configuration.isUsedOnBorne\r\n )\r\n )\r\n }\r\n\r\n const customAdaptiveCardHostConfig = createAdaptiveCardHostConfig(\r\n colors.primary,\r\n colors.card.frame.background\r\n )\r\n\r\n useEffect(() => {\r\n if (\r\n locale &&\r\n supported &&\r\n directLine &&\r\n ponyfillFactory &&\r\n store &&\r\n agentData &&\r\n loaderClosed\r\n ) {\r\n setAppAvailable(true)\r\n } else {\r\n setAppAvailable(false)\r\n }\r\n }, [\r\n locale,\r\n supported,\r\n directLine,\r\n ponyfillFactory,\r\n store,\r\n agentData,\r\n loaderClosed\r\n ])\r\n\r\n return directLine && ponyfillFactory && store && agentData ? (\r\n <FullComposer\r\n adaptiveCardsHostConfig={customAdaptiveCardHostConfig}\r\n adaptiveCardsPackage={AC}\r\n styleOptions={{\r\n primaryFont: '\"Helvetica Neue\", sans-serif',\r\n sendBoxTextWrap: true,\r\n sendBoxBackground: 'transparent'\r\n }}\r\n directLine={directLine}\r\n webSpeechPonyfillFactory={ponyfillFactory}\r\n store={store}\r\n locale={locale}\r\n attachmentMiddleware={attachmentMiddleware}\r\n activityMiddleware={activityMiddleware}\r\n >\r\n <SendActivityEventListener />\r\n {children}\r\n </FullComposer>\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default RetorikComposer\r\n","import type { AddressData } from '../models/types'\r\nimport { webchatTokenRetrievalAddress } from '../models/constants'\r\nimport processPrefix from './studioRetorikAddressFromPrefix'\r\n\r\nasync function fetchDirectLineTokenWithKey(key: string): Promise<string> {\r\n const data = {\r\n method: 'POST',\r\n headers: {\r\n Authorization: `Bearer ${key}`\r\n }\r\n }\r\n const res = await fetch(\r\n 'https://directline.botframework.com/v3/directline/tokens/generate',\r\n data\r\n )\r\n const { token } = await res.json()\r\n\r\n return token\r\n}\r\n\r\nasync function fetchDirectLineToken(data: AddressData): Promise<string> {\r\n // baseURI is used for retrocompatibility\r\n let fullAddress = ''\r\n if (data.baseURI) {\r\n fullAddress = data.baseURI\r\n } else {\r\n fullAddress = `${processPrefix(data.prefix)}/${\r\n data.tenant\r\n }/${webchatTokenRetrievalAddress}`\r\n }\r\n\r\n const res = await fetch(fullAddress)\r\n const token = await res.json()\r\n\r\n return token\r\n}\r\n\r\nexport { fetchDirectLineTokenWithKey, fetchDirectLineToken }\r\n","import {\r\n studioRetorik,\r\n studioRetorikDev,\r\n studioRetorikStaging,\r\n studioRetorikExperimental\r\n} from '../models/constants'\r\n\r\nconst processPrefix = (prefix): string => {\r\n switch (prefix) {\r\n case 'dev':\r\n return studioRetorikDev\r\n case 'staging':\r\n case 'preview':\r\n return studioRetorikStaging\r\n case 'experimental':\r\n return studioRetorikExperimental\r\n default:\r\n return studioRetorik\r\n }\r\n}\r\n\r\nexport default processPrefix\r\n","import { createStore } from 'botframework-webchat'\r\nimport createLinkAttachmentCard, {\r\n createAttachmentsFromMultiLink\r\n} from './createLinkAttachmentCard'\r\nimport createImageAttachmentCard from './createImageAttachmentCard'\r\nimport processDirectLineIncomingActivity from './processDirectlineIncomingActivity'\r\nimport {\r\n CONTENT_TYPE_LINK,\r\n CONTENT_TYPE_SUGGESTEDACTION,\r\n CONTENT_TYPE_SUGGESTION\r\n} from '../models/attachmentTypes'\r\nimport type {\r\n Action,\r\n SuggestedActionAttachment\r\n} from '../models/suggestedActionAttachment'\r\nimport { processAttachments } from './processAttachments'\r\nimport { setCancel } from '../components/Contexts/speechCancelStore'\r\nimport { setListClosed } from '../components/Contexts/utilsStore'\r\n\r\ninterface DataAddedToChannelData {\r\n pageSize: string | number\r\n location?: {\r\n latitude: number\r\n longitude: number\r\n }\r\n position?: {\r\n latitude: number\r\n longitude: number\r\n }\r\n}\r\n\r\nconst regexDataCommand =\r\n /(\\{data-command=\")[\\p{L}\\p{N}\\p{Po}\\p{Pd}\\p{Pc}\\s]+(\"\\})(<br\\s\\/>)?/gu\r\n\r\nconst createCustomStore: typeof createStore = (\r\n userData,\r\n enableConversationCookie,\r\n conversationCookieMaxAge,\r\n addressData,\r\n skipWelcome,\r\n locale,\r\n externalEventHandler,\r\n isUsedOnBorne\r\n) => {\r\n return createStore(\r\n {},\r\n ({ dispatch }) =>\r\n (next) =>\r\n async (action): Promise<void> => {\r\n // Switch on action's type to process if needed\r\n switch (action.type) {\r\n case 'DIRECT_LINE/CONNECT_FULFILLED': {\r\n // Start_speaking for webchat to get the welcome speech if there is one\r\n dispatch({\r\n type: 'WEB_CHAT/START_SPEAKING'\r\n })\r\n\r\n if (!(enableConversationCookie === false)) {\r\n const conversationCookie = document.cookie\r\n .split('; ')\r\n .find((row) => row.startsWith('retorikConversationCookie='))\r\n ?.split('=')[1]\r\n\r\n const fullTenantName = (\r\n addressData.baseURI ||\r\n `${addressData.prefix || ''}${addressData.tenant}`\r\n ).replace(/;|,|\\s/g, '')\r\n\r\n if (\r\n conversationCookie &&\r\n conversationCookie.split('||').length === 2 &&\r\n conversationCookie.split('||')[1] === fullTenantName\r\n ) {\r\n // This break instruction prevents from sending the 'setUser' event\r\n break\r\n } else {\r\n document.cookie = `retorikConversationCookie=${\r\n action.payload.directLine.conversationId\r\n }||${fullTenantName}; max-age=${\r\n conversationCookieMaxAge || 3600\r\n }`\r\n }\r\n }\r\n\r\n setTimeout(() => {\r\n dispatch({\r\n type: 'WEB_CHAT/SEND_EVENT',\r\n payload: {\r\n name: 'setUser',\r\n value: {\r\n user: userData,\r\n skipWelcome: skipWelcome\r\n }\r\n }\r\n })\r\n }, 2000)\r\n break\r\n }\r\n case 'DIRECT_LINE/POST_ACTIVITY': {\r\n // Cancel playing utterance if there is one\r\n setCancel(true)\r\n\r\n // Send pagination and position data in channelData on each activity sent to the chatbot, using local storage to get up to date data\r\n if (action.payload?.activity) {\r\n const paginationAsString = localStorage.getItem(\r\n 'Retorik.Framework.Pagination'\r\n )\r\n const positionAsString = localStorage.getItem(\r\n 'Retorik.Framework.Location'\r\n )\r\n const position = positionAsString\r\n ? JSON.parse(positionAsString)\r\n : undefined\r\n\r\n const dataAddedToChannelData: DataAddedToChannelData = {\r\n pageSize: paginationAsString\r\n ? JSON.parse(paginationAsString)\r\n : 10\r\n }\r\n\r\n if (position && position.latitude && position.longitude) {\r\n dataAddedToChannelData.location = {\r\n latitude: position.latitude,\r\n longitude: position.longitude\r\n }\r\n dataAddedToChannelData.position = {\r\n latitude: position.latitude,\r\n longitude: position.longitude\r\n }\r\n }\r\n\r\n if (action.payload.activity.channelData === undefined) {\r\n action.payload.activity = {\r\n ...action.payload.activity,\r\n channelData: dataAddedToChannelData\r\n }\r\n } else {\r\n action.payload.activity.channelData = {\r\n ...action.payload.activity.channelData,\r\n ...dataAddedToChannelData\r\n }\r\n }\r\n }\r\n\r\n break\r\n }\r\n case 'DIRECT_LINE/DISCONNECT':\r\n action = {\r\n type: 'WEB_CHAT/SET_LANGUAGE',\r\n payload: {\r\n language: locale\r\n }\r\n }\r\n break\r\n case 'DIRECT_LINE/INCOMING_ACTIVITY': {\r\n // Only process message activities from the bot\r\n if (\r\n action.payload?.activity?.type === 'message' &&\r\n action.payload.activity.from.role === 'bot'\r\n ) {\r\n setListClosed(false)\r\n // If the application is used on a borne and there are attachments, check if a received attachment is a multi-link one.\r\n // If there is some, we need to split it in several attachments, one for each link.\r\n if (\r\n isUsedOnBorne &&\r\n action.payload?.activity?.attachments &&\r\n action.payload.activity.attachments.length > 0\r\n ) {\r\n let count = 0\r\n const tempAttachments: Array<any> = []\r\n for (const attachment of action.payload.activity.attachments) {\r\n if (\r\n attachment.contentType === CONTENT_TYPE_LINK &&\r\n Array.isArray(attachment.content?.urlData)\r\n ) {\r\n count++\r\n const splitAttachments =\r\n await createAttachmentsFromMultiLink(\r\n attachment.content.urlData\r\n )\r\n tempAttachments.push(...splitAttachments)\r\n } else {\r\n tempAttachments.push(attachment)\r\n }\r\n }\r\n // If some attachments have been split, we replace the attachments in the activity\r\n count > 0 &&\r\n (action.payload.activity.attachments = tempAttachments)\r\n // Carousel display if there is more than 1 card\r\n count > 0 &&\r\n action.payload.activity.attachments.length > 1 &&\r\n (action.payload.activity.attachmentLayout = 'carousel')\r\n }\r\n\r\n const processedData = processDirectLineIncomingActivity(action)\r\n // Set processed speak, text and attachments if there are some\r\n processedData.speak &&\r\n (action.payload.activity.speak = processedData.speak)\r\n processedData.text &&\r\n (action.payload.activity.text = processedData.text)\r\n processedData.htmlText &&\r\n (action.payload.activity.htmlText = processedData.htmlText)\r\n\r\n // Check if there are cards to create from images\r\n if (processedData.images.length > 0) {\r\n // If there is no attachment field, create an empty one\r\n action.payload.activity.attachments === undefined &&\r\n (action.payload.activity.attachments = [])\r\n // Create content from image data and add it to the attachments\r\n for (const image of processedData.images) {\r\n const imageAttachment = await createImageAttachmentCard(image)\r\n action.payload.activity.attachments.push(imageAttachment)\r\n }\r\n action.payload.activity.attachments.length > 1 &&\r\n (action.payload.activity.attachmentLayout = 'carousel')\r\n }\r\n\r\n // Check if there are cards to create from links\r\n if (processedData.urls.length > 0) {\r\n // If there is no attachment field, create an empty one\r\n action.payload.activity.attachments === undefined &&\r\n (action.payload.activity.attachments = [])\r\n // Create content asynchonously from url data and add it to the attachments\r\n for (const url of processedData.urls) {\r\n const fetchedAttachment = await createLinkAttachmentCard(url)\r\n action.payload.activity.attachments.push(fetchedAttachment)\r\n }\r\n action.payload.activity.attachments.length > 1 &&\r\n (action.payload.activity.attachmentLayout = 'carousel')\r\n }\r\n\r\n // Transform herocards in adaptivecards\r\n const heroToAdaptiveAttachments = processAttachments(\r\n action.payload.activity.attachments\r\n )\r\n heroToAdaptiveAttachments &&\r\n (action.payload.activity.attachments = [\r\n ...heroToAdaptiveAttachments\r\n ])\r\n\r\n // Transform suggested actions into cards if the display isn't daviList\r\n if (\r\n action.payload.activity.suggestedActions?.actions &&\r\n action.payload.activity.attachmentLayout?.toLowerCase() !==\r\n 'davilist'\r\n ) {\r\n let actionsArray: Array<Action> = []\r\n action.payload.activity.suggestedActions.actions.forEach(\r\n (suggestedAction) => {\r\n const action: Action = {\r\n title: suggestedAction.title,\r\n action: suggestedAction.value\r\n }\r\n\r\n actionsArray = [...actionsArray, action]\r\n }\r\n )\r\n\r\n const suggestedActionAttachment: SuggestedActionAttachment = {\r\n contentType: CONTENT_TYPE_SUGGESTEDACTION,\r\n content: {\r\n title: action.payload.activity.text || '',\r\n actions: actionsArray\r\n }\r\n }\r\n\r\n // Create field attachments with the newly created one if no attachment yet, or add to existing ones\r\n action.payload.activity.attachments === undefined\r\n ? (action.payload.activity.attachments = [\r\n suggestedActionAttachment\r\n ])\r\n : action.payload.activity.attachments.push(\r\n suggestedActionAttachment\r\n )\r\n }\r\n\r\n // Deal with text containing [data command] data to make them usable in text mode\r\n if (\r\n action.payload.activity?.text &&\r\n action.payload.activity.text.includes('{data-command=')\r\n ) {\r\n const splitText: Array<string> =\r\n action.payload.activity.text.split('{data-command=')\r\n const dataForAttachment: Array<{\r\n text: string\r\n differentTextToSend: string\r\n }> = []\r\n for (let i = 1; i < splitText.length; i++) {\r\n const text = splitText[i - 1].substring(\r\n splitText[i - 1].lastIndexOf('\\n')\r\n ? splitText[i - 1].lastIndexOf('\\n') + 1\r\n : 0\r\n )\r\n const replacement = splitText[i]\r\n .substring(0, splitText[i].indexOf('}'))\r\n .replaceAll('\"', '')\r\n\r\n dataForAttachment.push({\r\n text: text,\r\n differentTextToSend: replacement\r\n })\r\n\r\n // Remove text part from speak / text / htmlText\r\n action.payload.activity.speak &&\r\n (action.payload.activity.speak =\r\n action.payload.activity.speak.replace(text, ''))\r\n\r\n action.payload.activity.text =\r\n action.payload.activity.text.replace(text, '')\r\n\r\n action.payload.activity.htmlText =\r\n action.payload.activity.htmlText.replace(text, '')\r\n }\r\n\r\n if (dataForAttachment.length > 0) {\r\n const suggestionAttachment = {\r\n contentType: CONTENT_TYPE_SUGGESTION,\r\n content: {\r\n suggestions: dataForAttachment,\r\n showTutorial: false\r\n }\r\n }\r\n\r\n // Create field attachment swith the newly created one if no attachment yet, or add to existing ones\r\n action.payload.activity.attachments === undefined\r\n ? (action.payload.activity.attachments = [\r\n suggestionAttachment\r\n ])\r\n : action.payload.activity.attachments.push(\r\n suggestionAttachment\r\n )\r\n }\r\n\r\n // Remove all [data command] from speak / text / htmlText\r\n action.payload.activity.speak &&\r\n (action.payload.activity.speak =\r\n action.payload.activity.speak.replaceAll(\r\n regexDataCommand,\r\n ''\r\n ))\r\n\r\n action.payload.activity.text =\r\n action.payload.activity.text.replaceAll(regexDataCommand, '')\r\n\r\n action.payload.activity.htmlText =\r\n action.payload.activity.htmlText.replaceAll(\r\n regexDataCommand,\r\n ''\r\n )\r\n }\r\n }\r\n\r\n break\r\n }\r\n case 'WEB_CHAT/START_DICTATE':\r\n case 'WEB_CHAT/SEND_MESSAGE': {\r\n // Cancel playing utterance if there is one\r\n setCancel(true)\r\n break\r\n }\r\n case 'WEB_CHAT/SUBMIT_SEND_BOX': {\r\n // Send event containing the speech retrieved from speech recognition\r\n const alternatives =\r\n action.payload?.channelData?.speech?.alternatives\r\n\r\n if (\r\n alternatives &&\r\n Array.isArray(alternatives) &&\r\n alternatives.length > 0\r\n ) {\r\n const speech = alternatives[0].transcript\r\n const speechEvent = new CustomEvent(\r\n 'retorikSpeechRecognitionEnded',\r\n { detail: speech }\r\n )\r\n\r\n document.dispatchEvent(speechEvent)\r\n }\r\n break\r\n }\r\n default:\r\n break\r\n }\r\n\r\n // External event handler to listen for actions from outside the Composer component\r\n if (\r\n externalEventHandler &&\r\n externalEventHandler !== null &&\r\n typeof externalEventHandler === 'function'\r\n ) {\r\n const externalStopTrigger = externalEventHandler(action, dispatch)\r\n if (externalStopTrigger) {\r\n return\r\n }\r\n }\r\n\r\n return next(action)\r\n }\r\n )\r\n}\r\n\r\nexport default createCustomStore\r\n","import type { LinkAttachment, UrlData } from '../models/linkAttachment'\r\nimport QRCode from 'qrcode'\r\nimport { CONTENT_TYPE_LINK } from '../models/attachmentTypes'\r\n\r\nconst createLinkAttachmentCard = async ({\r\n url,\r\n title,\r\n download\r\n}: UrlData): Promise<LinkAttachment> => {\r\n const qrcode = await QRCode.toDataURL(url)\r\n const hasTitle =\r\n title &&\r\n !title.includes('pause0x0') &&\r\n !title.includes('pause1x1') &&\r\n !title.includes('pause2x2')\r\n\r\n return {\r\n contentType: CONTENT_TYPE_LINK,\r\n content: {\r\n urlData: {\r\n url: url,\r\n title: hasTitle ? title : undefined,\r\n download: download\r\n },\r\n qrCode: qrcode\r\n }\r\n }\r\n}\r\n\r\nconst createAttachmentsFromMultiLink = async (\r\n urlDataArray: Array<UrlData>\r\n): Promise<Array<LinkAttachment>> => {\r\n const splitAttachments: Array<LinkAttachment> = []\r\n for (const data of urlDataArray) {\r\n const qrcode = await QRCode.toDataURL(data.url)\r\n\r\n const newLinkAttachment: LinkAttachment = {\r\n contentType: CONTENT_TYPE_LINK,\r\n content: {\r\n urlData: {\r\n url: data.url,\r\n title: data.title,\r\n download: data.download\r\n },\r\n qrCode: qrcode\r\n }\r\n }\r\n\r\n splitAttachments.push(newLinkAttachment)\r\n }\r\n\r\n return splitAttachments\r\n}\r\n\r\nexport default createLinkAttachmentCard\r\n\r\nexport { createAttachmentsFromMultiLink }\r\n","export const CONTENT_TYPE_ADAPTIVE_CARD =\r\n 'application/vnd.microsoft.card.adaptive'\r\nexport const CONTENT_TYPE_HERO_CARD = 'application/vnd.microsoft.card.hero'\r\n\r\nexport const CONTENT_TYPE_NEWS = 'application/vnd.davi.retorik.card.news'\r\nexport const CONTENT_TYPE_POI = 'application/vnd.davi.retorik.card.poi'\r\nexport const CONTENT_TYPE_PAGINATION =\r\n 'application/vnd.davi.retorik.card.pagination'\r\nexport const CONTENT_TYPE_EMPTY = 'application/vnd.davi.retorik.card.empty'\r\nexport const CONTENT_TYPE_IMAGE = 'application/vnd.davi.retorik.card.image'\r\nexport const CONTENT_TYPE_LINK = 'application/vnd.davi.retorik.card.link'\r\nexport const CONTENT_TYPE_DISCOVER =\r\n 'application/vnd.davi.retorik.card.discover'\r\nexport const CONTENT_TYPE_SUGGESTION =\r\n 'application/vnd.davi.retorik.card.suggestion'\r\nexport const CONTENT_TYPE_SUGGESTEDACTION =\r\n 'application/vnd.davi.retorik.card.suggestedaction'\r\n\r\ninterface Media {\r\n url: string\r\n type?: number\r\n alt?: string\r\n}\r\n\r\ninterface Image {\r\n url: string\r\n alt?: string\r\n}\r\n\r\ninterface NewsContent {\r\n title: string\r\n subtitle: string\r\n text: string\r\n category?: string\r\n image?: Image\r\n media?: Array<Media>\r\n buttons?: Array<{\r\n type: string\r\n title: string\r\n value: string\r\n }>\r\n}\r\n\r\ntype POIContentType = {\r\n identifier?: string\r\n title?: string\r\n subtitle?: string\r\n text?: string\r\n address?: string\r\n contact?: string\r\n phoneNumber?: string\r\n category?: {\r\n id: string\r\n label: string\r\n }\r\n media?: [\r\n {\r\n url?: string\r\n title?: string\r\n credits?: string\r\n }\r\n ]\r\n color?: string\r\n customerReviews?: number\r\n coordinates?: Coordinates\r\n downloadUri?: string\r\n favorite?: boolean\r\n review?: Review\r\n infoBanner?: string\r\n otherInformations?: Array<{\r\n title: string\r\n content: string | Array<string>\r\n }>\r\n tap?: {\r\n [option: string]: string\r\n }\r\n}\r\n\r\ntype DiscoverContentType = {\r\n title: string\r\n recommandationButton: { text: string; eventName: string }\r\n mainButtons: ImageButton[]\r\n history?: boolean\r\n height?: number | undefined\r\n}\r\ntype ImageButton = {\r\n Text: string\r\n MediaUrl: string\r\n EventName: string\r\n}\r\ntype Review = {\r\n author?: {\r\n name?: string\r\n capacity?: string\r\n }\r\n comment?: string\r\n picture?: {\r\n url?: string\r\n description?: string\r\n }\r\n}\r\n\r\ntype Coordinates = {\r\n latitude: number\r\n longitude: number\r\n}\r\n\r\nexport type {\r\n Media,\r\n Image,\r\n NewsContent,\r\n POIContentType,\r\n Coordinates,\r\n Review,\r\n DiscoverContentType,\r\n ImageButton\r\n}\r\n","import type { ImageAttachment, ImageData } from '../models/imageAttachment'\r\nimport { CONTENT_TYPE_IMAGE } from '../models/attachmentTypes'\r\nimport { imageFiles } from './imageFiles'\r\n\r\nconst createImageAttachmentCard = async (\r\n imageData: ImageData\r\n): Promise<ImageAttachment> => {\r\n const naturalSize = await getNaturalSize(imageData.url)\r\n let miniaturedDisplay = false\r\n // If an error occured, we retrieve width = 0 and height = 0\r\n if (naturalSize.width === 0 && naturalSize.height === 0) {\r\n imageData = {\r\n url: `${imageFiles.noimage}`,\r\n alt: 'Image no found'\r\n }\r\n } else {\r\n miniaturedDisplay = naturalSize.width < 400 && naturalSize.height < 300\r\n }\r\n\r\n return {\r\n contentType: CONTENT_TYPE_IMAGE,\r\n content: {\r\n ...imageData,\r\n isMiniature: miniaturedDisplay\r\n }\r\n }\r\n}\r\n\r\nconst getNaturalSize = async (\r\n url: string\r\n): Promise<{ width: number; height: number }> => {\r\n return new Promise((resolve) => {\r\n const img = new Image()\r\n img.onload = (): void =>\r\n resolve({ width: img.naturalWidth, height: img.naturalHeight })\r\n img.onerror = (): void => {\r\n resolve({ width: 0, height: 0 })\r\n }\r\n img.src = url\r\n })\r\n}\r\n\r\nexport default createImageAttachmentCard\r\n","import type { DirectLineActivity } from 'botframework-webchat-core'\r\nimport { processMarkdownAndSpeechMarkdown } from '../utils/markdownUtils'\r\nimport type { UrlData } from '../models/linkAttachment'\r\nimport type { ImageData } from '../models/imageAttachment'\r\n\r\ntype ReturnData = {\r\n speak: string | undefined\r\n text: string | undefined\r\n htmlText: string | undefined\r\n images: ImageData[]\r\n urls: UrlData[]\r\n}\r\n\r\nconst processDirectLineIncomingActivity = (\r\n action: DirectLineActivity\r\n): ReturnData => {\r\n const dataToReturn: ReturnData = {\r\n speak: undefined,\r\n text: undefined,\r\n htmlText: undefined,\r\n images: [],\r\n urls: []\r\n }\r\n const usedImageURLs: Array<string> = []\r\n const usedLinkURLs: Array<string> = []\r\n\r\n // Deal with 'speak' field if present\r\n if (action.payload?.activity?.speak) {\r\n // Make all the treatments needed for markdown and speechmarkdown\r\n const data = processMarkdownAndSpeechMarkdown(action.payload.activity.speak)\r\n dataToReturn.speak = data.text\r\n dataToReturn.images = data.images\r\n dataToReturn.urls = data.urls\r\n\r\n // Add the used image URLs and link URLs to prevent doubles\r\n data.images.forEach((data) => {\r\n usedImageURLs.push(data.url)\r\n })\r\n data.urls.forEach((data) => {\r\n usedLinkURLs.push(data.url)\r\n })\r\n }\r\n\r\n // Deal with 'text' field if present\r\n if (action.payload?.activity?.text) {\r\n // Make all the treatments needed for markdown and speechmarkdown\r\n const data = processMarkdownAndSpeechMarkdown(action.payload.activity.text)\r\n dataToReturn.text = data.text\r\n dataToReturn.htmlText = data.htmlText\r\n // Don't add images if they are already in the array (already extracted from the 'speak' field)\r\n data.images.forEach((image: ImageData) => {\r\n !usedImageURLs.includes(image.url) && dataToReturn.images.push(image)\r\n })\r\n // Don't add urls if they are already in the array (already extracted from the 'speak' field)\r\n data.urls.forEach((url: UrlData) => {\r\n !usedLinkURLs.includes(url.url) && dataToReturn.urls.push(url)\r\n })\r\n }\r\n\r\n return dataToReturn\r\n}\r\n\r\nexport default processDirectLineIncomingActivity\r\n","import MarkdownIt from 'markdown-it'\r\nimport {\r\n replaceSpeechMarkdownTags,\r\n getTextWithoutSpeechMarkdown\r\n} from '../utils/speechMarkdownUtils'\r\nimport type { UrlData } from '../models/linkAttachment'\r\nimport type { ImageData } from '../models/imageAttachment'\r\n\r\ntype ImagesAndUrls = {\r\n images: ImageData[]\r\n urls: UrlData[]\r\n}\r\n\r\ntype ReturnType = {\r\n images: ImageData[]\r\n urls: UrlData[]\r\n text: string\r\n htmlText: string\r\n}\r\n\r\ntype Attribute = string[]\r\n\r\ntype Token = {\r\n type: string\r\n content: string\r\n attrs: [Attribute] | null\r\n}\r\n\r\nconst regexLink = /<\\/?a([^>])+>/g\r\nconst regexImg = /<\\/?img([^>])+>/g\r\n\r\nexport const processMarkdownAndSpeechMarkdown = (text: string): ReturnType => {\r\n const md = new MarkdownIt({\r\n breaks: true,\r\n html: true,\r\n xhtmlOut: true,\r\n typographer: true,\r\n quotes: `\"\"''`\r\n })\r\n let attachmentsToCreate: ImagesAndUrls = { images: [], urls: [] }\r\n // text = `[backgroundaudio:\"https://daviretorikcdnstorage.blob.core.windows.net/retorik-framework/audiofiles/audiotest.mp3 0.5 2000 1500\"][silence:\"Leading 1s\"] ((Bonjour, comment allez-vous)[sentence] ? (Bien, merci, et vous-même ?)[sentence;voice:\"Fr-fR-jerOMeNeuRal\"])[paragraph] (Je suis de (tomato)[ipa:\"təˈmeɪtoʊ\"] (sapi)[sapi:\"iy eh n y uw eh s\"] (ups)[ups:\"JH AU\"] retour (après avoir été remplacée)[emphasis:\"strong\"] par Brigitte.[silence:\"Sentenceboundary 3s\"] Au revoir)[voice:\"fr-FR-DeniseNeural\";emotion:\"calm SeniorMale\"] ![image](images/bertranges.jpg)`\r\n // text = `((Bonjour, comment allez-vous ?)[sentence] [1s] (Bien, et toi Jérôme, ça va ?)[sentence])[paragraph] (Bien, merci, et vous-même ?)[voice:\"Fr-fR-jerOMeNeuRal\"]. Tout-va-pour-le-mieux. (Hallo Denise, wie geht es dir heute ?)[rate:\"slow\";vol:\"x-loud\";lang:\"de-DE\"] (Bonjour, je suis de retour (ASAP)[characters] après avoir été remplacée par Brigitte.Merci)[voice:\"fr-FR-DeniseNeural\";vol:\"loud\"] ![image](images/bertranges.jpg)`\r\n // text = `(Como estas ?)[lang:\"es-ES\"][1s] Parti - pour le test - (greenage)[lang:\"en-US\"]. Mettons une image ![image](images/bertranges.jpg).[500ms] En anglais, (parce-que en Français ce n'est pas ça...) greenage se dit (greenage)[lang:\"en-US\"]. Fin de message (aufwiedersehen)[lang:\"de-DE\"]`\r\n const speechMarkdownReplacedData = replaceSpeechMarkdownTags(text)\r\n\r\n const parsed = md.parseInline(speechMarkdownReplacedData.text)\r\n parsed.length > 0 &&\r\n (attachmentsToCreate = createNewAttachments(parsed[0].children))\r\n\r\n const textWithHtmlTags = md.render(text)\r\n // Strip html tags from rendered text\r\n const newText = stripHtml(textWithHtmlTags)\r\n const speechMarkdownTagsPosition: Array<[number, number]> = []\r\n speechMarkdownReplacedData.replacements.forEach((replacement) => {\r\n const index = text.indexOf(replacement.speechMarkdown)\r\n speechMarkdownTagsPosition.push([\r\n index,\r\n index + replacement.speechMarkdown.length\r\n ])\r\n })\r\n\r\n return {\r\n ...attachmentsToCreate,\r\n text: newText,\r\n htmlText: stripHtmlLinkTags(textWithHtmlTags, speechMarkdownTagsPosition)\r\n }\r\n}\r\n\r\n/**\r\n * Removes speechmarkdown, <a href ...></a> and <img ... /> tags from the text and keeps the others\r\n * @param text : string\r\n * @returns string\r\n */\r\nconst stripHtmlLinkTags = (\r\n text: string,\r\n speechMarkdownTagsPosition: Array<[number, number]>\r\n): string => {\r\n // Replace all characters replaced by mardkdown-it renderer (quotes, <, >)\r\n let newText = text.replaceAll('&quot;', '\"')\r\n newText = newText.replaceAll('&lt;', '<')\r\n newText = newText.replaceAll('&gt;', '>')\r\n // Remove speechMarkdown tags, and link/images html tags\r\n newText = getTextWithoutSpeechMarkdown(\r\n newText,\r\n speechMarkdownTagsPosition\r\n ).replaceAll(regexLink, '')\r\n newText = newText.replaceAll(regexImg, '')\r\n\r\n return newText\r\n}\r\n\r\n/**\r\n * Removes all html tags from the text\r\n * @param text : string\r\n * @returns string\r\n */\r\nconst stripHtml = (text: string): string => {\r\n const temp = document.createElement('div')\r\n temp.innerHTML = text\r\n\r\n return temp.textContent && temp.textContent !== '' ? temp.textContent : ''\r\n}\r\n\r\nconst getDataFromToken = (\r\n attributes: [Attribute] | null,\r\n type: 'href' | 'title' | 'alt' | 'src'\r\n): string | undefined => {\r\n // Check if there are attributes, then if one of these attributes contains data with the desired key, and finally if there is a value attached to this key\r\n const allData = attributes?.find(\r\n (data) =>\r\n data.length > 1 && data[0] === type && data.length > 0 && data[1] !== ''\r\n )\r\n if (allData && allData.length > 1) {\r\n return allData[1]\r\n }\r\n\r\n return type === 'href' ? undefined : ''\r\n}\r\n\r\nconst createNewAttachments = (tokens: Token[]): ImagesAndUrls => {\r\n const images: ImageData[] = []\r\n const urls: UrlData[] = []\r\n if (tokens && tokens.length > 0) {\r\n for (let i = 0; i < tokens.length; i++) {\r\n const attributes = tokens[i].attrs\r\n switch (tokens[i].type) {\r\n case 'link_open': {\r\n // Try to retrieve an URl from the href token\r\n const url: string | undefined = getDataFromToken(attributes, 'href')\r\n // If there is an URL, try to retrieve the text contained in the next token 'content' field\r\n if (url) {\r\n const title =\r\n getDataFromToken(attributes, 'title') || tokens[i + 1]?.content\r\n urls.push({\r\n url: url,\r\n title: title\r\n })\r\n }\r\n break\r\n }\r\n case 'image': {\r\n const url = getDataFromToken(attributes, 'src')\r\n url &&\r\n images.push({\r\n url: url,\r\n title: getDataFromToken(attributes, 'title'),\r\n alt: getDataFromToken(attributes, 'alt')\r\n })\r\n break\r\n }\r\n default:\r\n break\r\n }\r\n }\r\n }\r\n\r\n return {\r\n images: images,\r\n urls: urls\r\n }\r\n}\r\n","import { SpeechMarkdown } from '@davi-ai/speechmarkdown-davi-js'\r\nconst speechMarkdownParser = new SpeechMarkdown()\r\n\r\ntype ReturnType = {\r\n text: string\r\n replacements: Array<SpeechMarkdownReplacement>\r\n}\r\n\r\ntype SpeechMarkdownReplacement = {\r\n replacementString: string\r\n speechMarkdown: string\r\n}\r\n\r\nexport const getTextWithoutSpeechMarkdown = (\r\n text: string,\r\n speechMarkdownTagsPosition: Array<[number, number]> = []\r\n): string => {\r\n let res = ''\r\n // Myna parser used in speechmarkdown parsing can't deal with dashes which aren't in speechmarkdown tags properly.\r\n // Let's change them and put them back after treatment\r\n if (text.indexOf('-') !== -1) {\r\n const dashesOutsideSpeechmarkdown: Array<number> = []\r\n for (let i = 0; i < text.length; i++) {\r\n if (text[i] === '-') {\r\n let test = true\r\n speechMarkdownTagsPosition.forEach((position) => {\r\n if (i >= position[0] || i <= position[1]) {\r\n test = false\r\n }\r\n })\r\n\r\n test && dashesOutsideSpeechmarkdown.push(i)\r\n }\r\n }\r\n\r\n let textWithoutDashes = ''\r\n if (dashesOutsideSpeechmarkdown.length > 0) {\r\n for (let i = 0; i < dashesOutsideSpeechmarkdown.length; i++) {\r\n textWithoutDashes +=\r\n i === 0\r\n ? text.substring(0, dashesOutsideSpeechmarkdown[i])\r\n : text.substring(\r\n dashesOutsideSpeechmarkdown[i - 1] + 1,\r\n dashesOutsideSpeechmarkdown[i]\r\n )\r\n textWithoutDashes += '1xx1'\r\n }\r\n // Add the rest of the text (after the last dash)\r\n textWithoutDashes += text.substring(\r\n dashesOutsideSpeechmarkdown[dashesOutsideSpeechmarkdown.length - 1] + 1\r\n )\r\n }\r\n\r\n res = speechMarkdownParser.toText(textWithoutDashes)\r\n res = res.replaceAll('1xx1', '-')\r\n } else {\r\n res = speechMarkdownParser.toText(text)\r\n }\r\n\r\n // Remove phoneme tag\r\n res = res.replaceAll(/<\\/?phoneme?[^>]+>|$/g, '')\r\n return res\r\n}\r\n\r\nexport const replaceSpeechMarkdownTags = (text: string): ReturnType => {\r\n const replacements: Array<SpeechMarkdownReplacement> = []\r\n let textWithReplacements = text\r\n // Get the indexes of all the occurences of ')['\r\n let indexes: Array<number> = []\r\n let position = text.indexOf(')[')\r\n\r\n while (position !== -1) {\r\n indexes.push(position)\r\n position = text.indexOf(')[', position + 1)\r\n }\r\n\r\n // If at least one occurence has been found escape all characters related\r\n if (indexes.length > 0) {\r\n // Loop on indexes to get all indexes\r\n for (let i = 0; i < indexes.length; i++) {\r\n // Get the opening parenthesis related to the closing one from the expression\r\n const openingParenthesisIndex = getOpeningParenthesis(text, indexes[i])\r\n // Get the closing bracket related to the opening one from the expression\r\n const closingBracketIndex =\r\n text.substring(indexes[i]).indexOf(']') + indexes[i]\r\n\r\n const replacement: SpeechMarkdownReplacement = {\r\n // Use string for replacement as : 'replacement1x1'\r\n replacementString: `replacement${i}x${i}`,\r\n speechMarkdown: text.substring(\r\n openingParenthesisIndex,\r\n closingBracketIndex + 1\r\n )\r\n }\r\n replacements.push(replacement)\r\n\r\n textWithReplacements = textWithReplacements.replace(\r\n replacement.speechMarkdown,\r\n replacement.replacementString\r\n )\r\n }\r\n }\r\n\r\n // In markdown links can be found as [...](...) so we need to find data between brackets without parentheses related to the closing bracket. Example : 'Hello. [1s] How are you ?'\r\n // Reset indexes array and set basic text to textWithReplacements to prevent searching again for brackets that have already been removed\r\n indexes = []\r\n const tempText = textWithReplacements\r\n position = tempText.indexOf(']')\r\n\r\n while (position !== -1) {\r\n indexes.push(position)\r\n position = tempText.indexOf(']', position + 1)\r\n }\r\n\r\n if (indexes.length > 0) {\r\n for (let i = 0; i < indexes.length; i++) {\r\n // If the index is the last character of the string, or if the next character isn't an opening parenthesis, it's ok\r\n if (\r\n indexes[i] === tempText.length - 1 ||\r\n tempText.charAt(indexes[i] + 1) !== '('\r\n ) {\r\n // Find the position of the previous opening bracket\r\n const openingBracketIndex = tempText\r\n .substring(0, indexes[i])\r\n .lastIndexOf('[')\r\n const replacement: SpeechMarkdownReplacement = {\r\n // Use string for replacement as : 'pause1x1'\r\n replacementString: `pause${i}x${i}`,\r\n speechMarkdown: tempText.substring(\r\n openingBracketIndex,\r\n indexes[i] + 1\r\n )\r\n }\r\n\r\n replacements.push(replacement)\r\n textWithReplacements = textWithReplacements.replace(\r\n replacement.speechMarkdown,\r\n replacement.replacementString\r\n )\r\n }\r\n }\r\n }\r\n\r\n return {\r\n text: textWithReplacements,\r\n replacements: replacements\r\n }\r\n}\r\n\r\nconst getOpeningParenthesis = (text: string, index: number): number => {\r\n let nbOpeningParenthesis = 0\r\n let nbClosingParenthesis = 0\r\n // Search from the end of the string for an equivalence between opening and ending parenthesis, to prevent error if the text to be\r\n // spoken contains parenthesis.\r\n for (let i = index; i > 0; i--) {\r\n if (text.charAt(i) === ')') {\r\n nbClosingParenthesis++\r\n } else if (text.charAt(i) === '(') {\r\n nbOpeningParenthesis++\r\n if (nbClosingParenthesis === nbOpeningParenthesis) {\r\n return i\r\n }\r\n }\r\n }\r\n\r\n return 0\r\n}\r\n","import { buildCard } from './adaptiveCardBuilder'\r\nimport { CONTENT_TYPE_HERO_CARD } from '../models/attachmentTypes'\r\n\r\nconst processAttachments = (\r\n attachments?: Array<any>\r\n): Array<any> | undefined => {\r\n if (attachments && attachments.length > 0) {\r\n let tempAttachments: Array<any> = []\r\n\r\n attachments.forEach((attachment) => {\r\n if (attachment.contentType === CONTENT_TYPE_HERO_CARD) {\r\n const heroToAdaptive = buildCard({\r\n ...attachment.content\r\n })\r\n tempAttachments = [...tempAttachments, { ...heroToAdaptive }]\r\n } else {\r\n tempAttachments = [...tempAttachments, { ...attachment }]\r\n }\r\n })\r\n\r\n return tempAttachments\r\n }\r\n\r\n return undefined\r\n}\r\n\r\nexport { processAttachments }\r\n","import type { DirectLineCardAction } from 'botframework-webchat-core'\r\nimport { CONTENT_TYPE_ADAPTIVE_CARD } from '../models/attachmentTypes'\r\nimport { getTextWithoutSpeechMarkdown } from './speechMarkdownUtils'\r\n\r\nexport interface BotFrameworkCardAction {\r\n __isBotFrameworkCardAction: true\r\n cardAction: DirectLineCardAction\r\n}\r\n\r\ninterface HeroCardImage {\r\n url: string\r\n alt?: string\r\n tap?: any\r\n}\r\n\r\ninterface ContentFromHeroCard {\r\n buttons?: DirectLineCardAction[]\r\n subtitle?: string\r\n text?: string\r\n title?: string\r\n speak?: string\r\n images?: Array<HeroCardImage>\r\n tap?: any\r\n}\r\n\r\ninterface AdaptiveCard {\r\n contentType: string\r\n content: {\r\n type: string\r\n $schema: string\r\n version: string\r\n body: Array<any>\r\n text?: string\r\n speak?: string\r\n selectAction?: Action\r\n }\r\n}\r\n\r\ninterface TextBlock {\r\n type: 'TextBlock'\r\n text: string\r\n size?: string\r\n horizontalAlignment?: string\r\n wrap?: boolean\r\n maxLines?: number\r\n}\r\n\r\ninterface Image {\r\n type: string\r\n url: string\r\n size: string\r\n altText?: string\r\n selectAction?: any\r\n}\r\n\r\ninterface Action {\r\n type: string\r\n title?: string\r\n url?: string\r\n fullWidth?: boolean\r\n position?: string\r\n display?: string\r\n data: any\r\n}\r\n\r\nconst addTextBlock = (text: string, type: string): TextBlock => {\r\n const textBlock: TextBlock = {\r\n type: 'TextBlock',\r\n text: text,\r\n size: undefined,\r\n horizontalAlignment: undefined,\r\n wrap: true,\r\n maxLines: undefined\r\n }\r\n\r\n switch (type) {\r\n case 'title':\r\n textBlock.size = 'large'\r\n break\r\n case 'subtitle':\r\n textBlock.size = 'medium'\r\n break\r\n case 'text':\r\n default:\r\n break\r\n }\r\n\r\n return textBlock\r\n}\r\n\r\nconst addImage = (data: HeroCardImage): Image => {\r\n const image: Image = {\r\n type: 'Image',\r\n url: '',\r\n size: 'Large',\r\n altText: undefined,\r\n selectAction: undefined\r\n }\r\n\r\n image.url = data.url\r\n image.altText = data.alt || 'image'\r\n image.selectAction = data.tap && addAction(data.tap)\r\n image.size = 'Stretch'\r\n\r\n return { ...image }\r\n}\r\n\r\nconst addAction = (cardAction: any, includesOAuthButtons?: boolean): Action => {\r\n const action: Action = {\r\n type: 'Action.Submit',\r\n title: undefined,\r\n url: undefined,\r\n data: undefined,\r\n fullWidth: undefined,\r\n position: undefined,\r\n display: undefined\r\n }\r\n\r\n for (const val in cardAction) {\r\n if (cardAction[val] && typeof cardAction[val] === 'string') {\r\n cardAction[val] = getTextWithoutSpeechMarkdown(cardAction[val])\r\n }\r\n }\r\n\r\n if (\r\n cardAction.type === 'imBack' ||\r\n cardAction.type === 'messageBack' ||\r\n cardAction.type === 'postBack' ||\r\n (cardAction.type === 'signin' && includesOAuthButtons)\r\n ) {\r\n action.type = 'Action.Submit'\r\n action.data = {\r\n __isBotFrameworkCardAction: true,\r\n cardAction\r\n }\r\n action.title = (cardAction as { title: string }).title || ''\r\n } else {\r\n action.type = 'Action.OpenUrl'\r\n\r\n action.title = (cardAction as { title: string }).title || ''\r\n action.url =\r\n cardAction.type === 'call' ? `tel:${cardAction.value}` : cardAction.value\r\n }\r\n\r\n const channelData = cardAction.channelData\r\n if (channelData) {\r\n action.fullWidth = channelData.fullWidth\r\n action.position = channelData.position\r\n action.display = channelData.display\r\n }\r\n\r\n return { ...action }\r\n}\r\n\r\nconst buildCard = (content: ContentFromHeroCard): AdaptiveCard => {\r\n const adaptiveCard: AdaptiveCard = {\r\n contentType: CONTENT_TYPE_ADAPTIVE_CARD,\r\n content: {\r\n type: 'AdaptiveCard',\r\n $schema: 'http://adaptivecards.io/schemas/adaptive-card.json',\r\n version: '1.5',\r\n body: [],\r\n text: undefined,\r\n speak: undefined,\r\n selectAction: undefined\r\n }\r\n }\r\n\r\n // Add texts first in order : title - subtitle - text\r\n let cardTexts: Array<TextBlock> = []\r\n if (content.title) {\r\n const ti = addTextBlock(content.title, 'title')\r\n cardTexts = [...cardTexts, { ...ti }]\r\n }\r\n if (content.subtitle) {\r\n const st = addTextBlock(content.subtitle, 'subtitle')\r\n cardTexts = [...cardTexts, { ...st }]\r\n }\r\n if (content.text) {\r\n const txt = addTextBlock(content.text, 'text')\r\n cardTexts = [...cardTexts, { ...txt }]\r\n adaptiveCard.content.text = content.text\r\n }\r\n\r\n // Set speak data so that the card is taken in account in the renderer\r\n if (content.speak || content.text) {\r\n adaptiveCard.content.speak = content.speak || content.text\r\n }\r\n\r\n // Set body as Container with empty items\r\n adaptiveCard.content.body = [\r\n {\r\n type: 'Container',\r\n items: []\r\n }\r\n ]\r\n\r\n // Add texts to items is there are some\r\n cardTexts.length > 0 && (adaptiveCard.content.body[0].items = [...cardTexts])\r\n\r\n // Add Images if there are some\r\n let images: Array<Image> = []\r\n content.images &&\r\n content.images.forEach((heroImage) => {\r\n const image = addImage(heroImage)\r\n images = [...images, { ...image }]\r\n })\r\n\r\n images.length > 0 &&\r\n (adaptiveCard.content.body[0].items = [\r\n ...adaptiveCard.content.body[0].items,\r\n ...images\r\n ])\r\n\r\n // Add actions if there are some\r\n let actions: Array<Action> = []\r\n content.buttons &&\r\n content.buttons.forEach((button) => {\r\n const action = addAction(button)\r\n actions = [...actions, { ...action }]\r\n })\r\n\r\n if (actions.length > 0) {\r\n const actionSet = {\r\n type: 'ActionSet',\r\n actions: [...actions]\r\n }\r\n\r\n adaptiveCard.content.body[0].items = [\r\n ...adaptiveCard.content.body[0].items,\r\n { ...actionSet }\r\n ]\r\n }\r\n\r\n // Tap action\r\n if (content.tap) {\r\n const tapAction = addAction(content.tap)\r\n adaptiveCard.content.selectAction = { ...tapAction }\r\n }\r\n\r\n return { ...adaptiveCard }\r\n}\r\n\r\nexport { buildCard }\r\n","import { create } from 'zustand'\r\n\r\ninterface SpeechCancelStore {\r\n cancel: boolean\r\n}\r\n\r\nexport const useSpeechCancelStore = create<SpeechCancelStore>()(() => {\r\n return {\r\n cancel: false\r\n }\r\n})\r\n\r\nexport const setCancel = (cancel: boolean): void => {\r\n useSpeechCancelStore.setState({ cancel: cancel })\r\n}\r\n","import { create } from 'zustand'\r\nimport { CurrentSubView, RetorikEvent } from '../../models/enums'\r\nimport type { CustomMenu } from '../../models/types'\r\nimport { WebChatActivity } from 'botframework-webchat-core'\r\n\r\ninterface UtilsStore {\r\n fullScreenImage: string | undefined\r\n lastListActivity: string | undefined\r\n listClosed: boolean\r\n currentSubView: number\r\n currentCustomView: CustomMenu | undefined\r\n retorikEvent: RetorikEvent | undefined\r\n displayAgent: boolean\r\n activityToSend: WebChatActivity | undefined\r\n}\r\n\r\nexport const useUtilsStore = create<UtilsStore>()(() => {\r\n return {\r\n fullScreenImage: undefined,\r\n lastListActivity: undefined,\r\n listClosed: false,\r\n currentSubView: CurrentSubView.none,\r\n currentCustomView: undefined,\r\n retorikEvent: undefined,\r\n displayAgent: true,\r\n activityToSend: undefined\r\n }\r\n})\r\n\r\nexport const setFullScreenImage = (src: string | undefined): void => {\r\n useUtilsStore.setState({ fullScreenImage: src })\r\n}\r\n\r\nexport const setLastListActivity = (id: string | undefined): void => {\r\n useUtilsStore.setState({ lastListActivity: id })\r\n}\r\n\r\nexport const setListClosed = (value: boolean): void => {\r\n useUtilsStore.setState({ listClosed: value })\r\n}\r\n\r\nexport const setCurrentSubView = (subview: number): void => {\r\n useUtilsStore.setState({ currentSubView: subview })\r\n}\r\n\r\nexport const setCurrentCustomView = (customView: CustomMenu): void => {\r\n useUtilsStore.setState({ currentCustomView: customView })\r\n}\r\n\r\nexport const setRetorikEvent = (event: RetorikEvent): void => {\r\n useUtilsStore.setState({ retorikEvent: event })\r\n}\r\n\r\nexport const showAgent = (): void => {\r\n useUtilsStore.setState({ displayAgent: true })\r\n}\r\n\r\nexport const hideAgent = (): void => {\r\n useUtilsStore.setState({ displayAgent: false })\r\n}\r\n\r\nexport const sendActivity = (activity: WebChatActivity | undefined): void => {\r\n useUtilsStore.setState({ activityToSend: activity })\r\n}\r\n","import { useEffect } from 'react'\r\nimport { hooks } from 'botframework-webchat'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport {\r\n useUtilsStore,\r\n sendActivity as sendUtilActivity\r\n} from '../Contexts/utilsStore'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\n\r\nconst { useMicrophoneButtonClick, usePostActivity } = hooks\r\n\r\nconst SendActivityEventListener = (): null => {\r\n const sendPostActivity = usePostActivity()\r\n const locale = useLocaleStore((state) => state.locale)\r\n const activityToSend = useUtilsStore((state) => state.activityToSend)\r\n const microphoneButtonClick = useMicrophoneButtonClick()\r\n const { setDisplaySubtitles } = useRetorik()\r\n\r\n const sendActivity = (event: CustomEvent): void => {\r\n if (event.type === 'sendMessageEvent') {\r\n console.log(\r\n 'sendMessageEvent has been replaced by retorikSendActivity. Please use retorikSendActivity instead'\r\n )\r\n } else if (event.detail) {\r\n sendPostActivity(event.detail)\r\n }\r\n }\r\n\r\n const handleStartListening = (): void => {\r\n microphoneButtonClick()\r\n }\r\n\r\n const handleDisplaySubtitles = (event: CustomEvent): void => {\r\n setDisplaySubtitles(!!event.detail)\r\n }\r\n\r\n useEffect(() => {\r\n document.addEventListener('sendMessageEvent', sendActivity)\r\n document.addEventListener('retorikSendActivity', sendActivity)\r\n document.addEventListener('retorikStartListening', handleStartListening)\r\n document.addEventListener('retorikDisplaySubtitles', handleDisplaySubtitles)\r\n\r\n return (): void => {\r\n document.removeEventListener('sendMessageEvent', sendActivity)\r\n document.removeEventListener('retorikSendActivity', sendActivity)\r\n document.removeEventListener(\r\n 'retorikStartListening',\r\n handleStartListening\r\n )\r\n document.removeEventListener(\r\n 'retorikDisplaySubtitles',\r\n handleDisplaySubtitles\r\n )\r\n }\r\n }, [])\r\n\r\n useEffect(() => {\r\n if (activityToSend) {\r\n if (\r\n activityToSend.type === 'message' &&\r\n activityToSend.text &&\r\n typeof activityToSend.text !== 'string'\r\n ) {\r\n const tempActivity = { ...activityToSend }\r\n tempActivity.text = activityToSend.text[locale] || ''\r\n sendPostActivity(tempActivity)\r\n } else {\r\n sendPostActivity(activityToSend)\r\n }\r\n sendUtilActivity(undefined)\r\n }\r\n }, [activityToSend])\r\n\r\n return null\r\n}\r\n\r\nexport default SendActivityEventListener\r\n","import React, {\r\n createContext,\r\n useContext,\r\n ReactNode,\r\n useState,\r\n useMemo,\r\n useEffect\r\n} from 'react'\r\nimport type { AddressData, AgentData, Configuration } from '../../models/types'\r\nimport { CurrentSubView, Mode } from '../../models/enums'\r\nimport {\r\n setCurrentSubView as setForUtilsStore,\r\n setLastListActivity,\r\n useUtilsStore\r\n} from './utilsStore'\r\n\r\nexport type RetorikProviderProps = {\r\n chosenMode: number\r\n config: Configuration\r\n currentLocale: string\r\n allLocales?: string[]\r\n agentManifest: AgentData\r\n skipLoader?: boolean\r\n children?: ReactNode\r\n addressData: AddressData\r\n}\r\n\r\ntype LocationData = {\r\n searchForLocation: boolean\r\n latitude: number\r\n longitude: number\r\n city?: string\r\n country?: string\r\n}\r\n\r\nexport type RetorikContextType = {\r\n mode: number\r\n configuration: Configuration\r\n displaySubtitles: boolean\r\n allLanguages: string[]\r\n agentData: AgentData | undefined\r\n appAvailable: boolean\r\n currentSubView: number\r\n customView: { view: string; title: string; icon?: JSX.Element } | undefined\r\n loaderClosed: boolean\r\n addressData: AddressData\r\n canFocusSendBox: boolean\r\n setMode: (x: number) => void\r\n setConfiguration: (x: Configuration) => void\r\n setDisplaySubtitles: (x: boolean) => void\r\n setAllLanguages: (x: string[]) => void\r\n setAgentData: (x: AgentData) => void\r\n setAppAvailable: (x: boolean) => void\r\n setCurrentSubView: (x: number) => void\r\n setCustomView: (x: {\r\n view: string\r\n title: string\r\n icon?: JSX.Element\r\n }) => void\r\n setLoaderClosed: (x: boolean) => void\r\n setCurrentAddressData: (x: AddressData) => void\r\n setSendBoxRef: (x: HTMLTextAreaElement) => void\r\n focusSendBox: () => void\r\n setCanFocusSendBox: (x: boolean) => void\r\n}\r\n\r\nconst defaultConfiguration: Configuration = {\r\n subtitles: false\r\n}\r\n\r\nconst RetorikContextDefaultValues: RetorikContextType = {\r\n mode: Mode.vocal,\r\n configuration: defaultConfiguration,\r\n displaySubtitles: false,\r\n allLanguages: [],\r\n agentData: undefined,\r\n appAvailable: false,\r\n currentSubView: CurrentSubView.none,\r\n customView: undefined,\r\n loaderClosed: false,\r\n addressData: {},\r\n canFocusSendBox: false,\r\n setMode: () => {},\r\n setConfiguration: () => {},\r\n setDisplaySubtitles: () => {},\r\n setAllLanguages: () => {},\r\n setAgentData: () => {},\r\n setAppAvailable: () => {},\r\n setCurrentSubView: () => {},\r\n setCustomView: () => {},\r\n setLoaderClosed: () => {},\r\n setCurrentAddressData: () => {},\r\n setSendBoxRef: () => {},\r\n focusSendBox: () => {},\r\n setCanFocusSendBox: () => {}\r\n}\r\n\r\nexport const RetorikContext = createContext<RetorikContextType>(\r\n RetorikContextDefaultValues\r\n)\r\n\r\nexport function useRetorik(): RetorikContextType {\r\n return useContext(RetorikContext)\r\n}\r\n\r\nexport function RetorikProvider({\r\n skipLoader,\r\n chosenMode,\r\n config,\r\n currentLocale,\r\n allLocales,\r\n agentManifest,\r\n children,\r\n addressData\r\n}: RetorikProviderProps): JSX.Element {\r\n const [currentAddressData, setCurrentAddressData] =\r\n useState<AddressData>(addressData)\r\n const [mode, setMode] = useState<number>(chosenMode)\r\n const [configuration, setConfiguration] = useState<Configuration>(config)\r\n const [displaySubtitles, setDisplaySubtitles] = useState<boolean>(\r\n config.subtitles || mode === Mode.text\r\n )\r\n const [locale, setLocale] = useState<string>(currentLocale)\r\n const [allLanguages, setAllLanguages] = useState<string[]>(allLocales || [])\r\n const [currentSubView, setCurrentSubView] = useState<number>(\r\n CurrentSubView.none\r\n )\r\n const [customView, setCustomView] = useState<\r\n { view: string; title: string; icon?: JSX.Element } | undefined\r\n >()\r\n const [agentData, setAgentData] = useState<AgentData>(agentManifest)\r\n const [appAvailable, setAppAvailable] = useState<boolean>(false)\r\n const [loaderClosed, setLoaderClosed] = useState<boolean>(!!skipLoader)\r\n const [sendBoxRef, setSendBoxRef] = useState<HTMLTextAreaElement | null>(null)\r\n const [canFocusSendBox, setCanFocusSendBox] = useState<boolean>(false)\r\n\r\n const { currentCustomView } = useUtilsStore()\r\n const focusSendBox = (): void => {\r\n sendBoxRef && document.activeElement !== sendBoxRef && sendBoxRef.focus()\r\n }\r\n\r\n const value = useMemo(\r\n () => ({\r\n mode: mode,\r\n configuration: configuration,\r\n displaySubtitles: displaySubtitles,\r\n locale: locale,\r\n allLanguages: allLanguages,\r\n agentData: agentData,\r\n appAvailable: appAvailable,\r\n currentSubView: currentSubView,\r\n customView: customView,\r\n loaderClosed: loaderClosed,\r\n currentAddressData: currentAddressData,\r\n addressData: addressData,\r\n canFocusSendBox: canFocusSendBox,\r\n setConfiguration,\r\n setDisplaySubtitles,\r\n setLocale,\r\n setAllLanguages,\r\n setAgentData,\r\n setAppAvailable,\r\n setMode,\r\n setCurrentSubView,\r\n setCustomView,\r\n setLoaderClosed,\r\n setCurrentAddressData,\r\n setSendBoxRef,\r\n focusSendBox,\r\n setCanFocusSendBox\r\n }),\r\n [\r\n mode,\r\n configuration,\r\n displaySubtitles,\r\n locale,\r\n allLanguages,\r\n agentData,\r\n appAvailable,\r\n currentSubView,\r\n customView,\r\n loaderClosed,\r\n currentAddressData,\r\n canFocusSendBox,\r\n setConfiguration,\r\n setDisplaySubtitles,\r\n setLocale,\r\n setAllLanguages,\r\n setAgentData,\r\n setAppAvailable,\r\n setMode,\r\n setCurrentSubView,\r\n setCustomView,\r\n setLoaderClosed,\r\n setCurrentAddressData,\r\n setSendBoxRef,\r\n setCanFocusSendBox\r\n ]\r\n )\r\n\r\n const setLocation = async (data): Promise<void> => {\r\n const position: LocationData = {\r\n searchForLocation: true,\r\n latitude: data.coords.latitude,\r\n longitude: data.coords.longitude\r\n }\r\n\r\n localStorage.setItem('Retorik.Framework.Location', JSON.stringify(position))\r\n /*\r\n const cityName = await getCity(data.coords.latitude, data.coords.longitude)\r\n if (cityName) {\r\n position.city = cityName.city\r\n position.country = cityName.country\r\n }\r\n */\r\n setConfiguration({\r\n ...configuration,\r\n position: position\r\n })\r\n }\r\n\r\n // TODO find a stronger solution for this (using free api service with limited usage)\r\n /*\r\n const getCity = async (\r\n latitude,\r\n longitude\r\n ): Promise<{ city: string; country: string } | undefined> => {\r\n console.log('using reverse geocoding to fetch city')\r\n return fetch(\r\n `https://api.opencagedata.com/geocode/v1/json?q=${latitude}+${longitude}&key=3ee1620fde1f4bbeb44b2d01314ae5da`\r\n )\r\n .then((response) => response.json())\r\n .then((data) => {\r\n console.log(data)\r\n if (data.results?.length) {\r\n const result = data.results[0].components\r\n if (result) {\r\n return { city: result.city, country: result.country }\r\n }\r\n }\r\n return undefined\r\n })\r\n .catch((error) => {\r\n console.log(error)\r\n return undefined\r\n })\r\n }\r\n */\r\n\r\n // get position from navigator\r\n useEffect(() => {\r\n if (configuration.position?.searchForLocation) {\r\n // Position enabled\r\n if (\r\n configuration.position?.latitude === undefined &&\r\n configuration.position?.longitude === undefined\r\n ) {\r\n // Try to get the position of the device if no one has been given in the configuration\r\n const geoloc = navigator.geolocation\r\n geoloc.getCurrentPosition(\r\n setLocation,\r\n () => {\r\n console.log('navigator.geolocalisation failed')\r\n },\r\n {\r\n timeout: 3000\r\n }\r\n )\r\n }\r\n }\r\n }, [])\r\n\r\n /**\r\n * On chosenMode props change :\r\n * - update mode state\r\n * - update displaySubtitles state if no data has been provided in the configuration\r\n */\r\n useEffect(() => {\r\n setMode(chosenMode)\r\n }, [chosenMode])\r\n\r\n /**\r\n * On mode state change :\r\n * - update displaySubtitles state depending on the mode\r\n */\r\n useEffect(() => {\r\n if (!config.subtitles) {\r\n setDisplaySubtitles(false)\r\n }\r\n setLastListActivity(undefined)\r\n }, [mode])\r\n\r\n /**\r\n * On config props change :\r\n * - update configuration state\r\n */\r\n useEffect(() => {\r\n setConfiguration(config)\r\n }, [config])\r\n\r\n /**\r\n * On configuration.position change :\r\n * - set the new data in localStorage\r\n */\r\n useEffect(() => {\r\n localStorage.setItem(\r\n 'Retorik.Framework.Location',\r\n JSON.stringify(configuration.position || null)\r\n )\r\n }, [configuration.position])\r\n\r\n /**\r\n * On locale change :\r\n * - dispatch CustomEvent 'retorikChangeLocale' with locale in detail field for external use\r\n */\r\n useEffect(() => {\r\n const changeLocaleEvent = new CustomEvent('retorikChangeLocale', {\r\n detail: {\r\n locale: locale\r\n }\r\n })\r\n document.dispatchEvent(changeLocaleEvent)\r\n }, [locale])\r\n\r\n useEffect(() => {\r\n setForUtilsStore(currentSubView)\r\n }, [currentSubView])\r\n\r\n useEffect(() => {\r\n if (currentCustomView) {\r\n let label = ''\r\n if (\r\n currentCustomView.label &&\r\n typeof currentCustomView.label === 'string'\r\n ) {\r\n label = currentCustomView.label\r\n } else if (\r\n currentCustomView.label &&\r\n typeof currentCustomView.label === 'object'\r\n ) {\r\n label = currentCustomView.label[locale]\r\n }\r\n if (label && currentCustomView.customDisplay && currentCustomView.icon) {\r\n setCustomView({\r\n view: currentCustomView.customDisplay,\r\n title: label,\r\n icon: currentCustomView.icon\r\n })\r\n }\r\n setCurrentSubView(CurrentSubView.custom)\r\n }\r\n }, [currentCustomView])\r\n\r\n /**\r\n * On agentManifest change :\r\n * - Set Agent Data if different\r\n */\r\n useEffect(() => {\r\n if (agentData !== agentManifest) {\r\n console.log('Switch Agent Data', agentManifest)\r\n setAgentData(agentManifest)\r\n }\r\n }, [agentManifest])\r\n\r\n return (\r\n <RetorikContext.Provider value={value}>{children}</RetorikContext.Provider>\r\n )\r\n}\r\n","import { create } from 'zustand'\r\nimport type { AddressData, AvailableLanguages } from '../../models/types'\r\nimport fetchAvailableLanguages from '../../utils/fetchAvailableLanguages'\r\n\r\ninterface LocaleStore {\r\n locale: string\r\n defaultLocale: string\r\n supported: string[]\r\n}\r\n\r\nexport const useLocaleStore = create<LocaleStore>()(() => {\r\n return {\r\n locale: '',\r\n defaultLocale: 'fr-FR',\r\n supported: []\r\n }\r\n})\r\n\r\nexport const getLocale = (): string => {\r\n return useLocaleStore((state) => state.locale)\r\n}\r\n\r\nexport const setLocale = (locale: string): void => {\r\n useLocaleStore.setState({ locale: locale })\r\n}\r\n\r\nexport const fetchSupportedLanguages = async (\r\n addressData: AddressData\r\n): Promise<AvailableLanguages> => {\r\n return fetchAvailableLanguages(addressData).then((languages) => {\r\n useLocaleStore.setState({\r\n defaultLocale: languages.default,\r\n supported: languages.all\r\n })\r\n return languages\r\n })\r\n}\r\n","import { DEFAULT_LANGUAGE_DATA } from '../models/constants'\r\nimport type { AddressData, AvailableLanguages } from '../models/types'\r\nimport processBaseURI from './studioRetorikAddressFromBaseURI'\r\nimport processPrefix from './studioRetorikAddressFromPrefix'\r\n\r\nexport default async function fetchAvailableLanguages({\r\n tenant,\r\n prefix,\r\n baseURI\r\n}: AddressData): Promise<AvailableLanguages> {\r\n const fullAddress = `${\r\n baseURI && baseURI?.length > 0\r\n ? processBaseURI(baseURI)\r\n : processPrefix(prefix)\r\n }/${\r\n tenant ? tenant + '/' : ''\r\n }api/graphql?query={siteCultures{culture,default}}`\r\n const languages: AvailableLanguages = await fetch(fullAddress)\r\n .then((res) => res.json())\r\n .then((json) => {\r\n return processJson(json)\r\n })\r\n .catch((error) => {\r\n console.log(error)\r\n return DEFAULT_LANGUAGE_DATA\r\n })\r\n\r\n return languages\r\n}\r\n\r\n/* The data received from the fetch are as follows\r\n{\r\n data: {\r\n siteCultures: [\r\n {\r\n culture: \"fr-FR\",\r\n default: true\r\n },\r\n {\r\n culture: \"en-US\",\r\n default: false\r\n },\r\n {\r\n culture: \"de-DE\",\r\n default: false\r\n }\r\n ]\r\n }\r\n}\r\n*/\r\nconst processJson = (json): AvailableLanguages => {\r\n if (!json.data?.siteCultures || !json.data.siteCultures?.length) {\r\n return DEFAULT_LANGUAGE_DATA\r\n }\r\n const siteCultures = json.data.siteCultures\r\n\r\n const processedLanguages = {\r\n all: siteCultures.map((siteCulture) => siteCulture.culture),\r\n default:\r\n siteCultures.find((siteCulture) => siteCulture.default)?.culture ||\r\n siteCultures[0].culture\r\n }\r\n return processedLanguages\r\n}\r\n","import { webchatTokenRetrievalAddress } from '../models/constants'\r\n\r\nconst processBaseURI = (baseURI: string): string => {\r\n if (baseURI && baseURI.length > 0) {\r\n if (baseURI.indexOf(`/${webchatTokenRetrievalAddress}`) > -1) {\r\n baseURI = baseURI.replace(`/${webchatTokenRetrievalAddress}`, '')\r\n }\r\n }\r\n return baseURI\r\n}\r\n\r\nexport default processBaseURI\r\n","import React, {\r\n createContext,\r\n useContext,\r\n ReactNode,\r\n useState,\r\n useMemo,\r\n useEffect\r\n} from 'react'\r\nimport type { RetorikActivity } from '../../models/activityTypes'\r\nimport { Mode, RetorikEvent } from '../../models/enums'\r\nimport type {\r\n CustomVoice,\r\n PonyfillFactoryCredentials\r\n} from '../../models/types'\r\nimport { useRetorik } from './RetorikContext'\r\nimport { setRetorikEvent } from './utilsStore'\r\nimport { Boundary } from '../../models/speechTypes'\r\n\r\nexport type SpeechProviderProps = {\r\n ponyfillFactoryCredentials: PonyfillFactoryCredentials\r\n customVoice: CustomVoice | undefined\r\n children?: ReactNode\r\n}\r\n\r\ntype SpeechContextType = {\r\n voice: SpeechSynthesisVoice | null\r\n customVoice: CustomVoice | undefined\r\n speaking: boolean\r\n currentReplyToId: string | undefined\r\n currentPlaying: RetorikActivity | undefined\r\n queuedActivities: Array<RetorikActivity>\r\n endedActivities: Array<string>\r\n ponyfillCredentials: PonyfillFactoryCredentials\r\n muted: boolean\r\n boundaryData: Array<Boundary>\r\n setVoice: (x: SpeechSynthesisVoice | null) => void\r\n setSpeaking: (x: boolean) => void\r\n setCurrentReplyToId: (x: string | undefined) => void\r\n setQueuedActivities: (x: Array<RetorikActivity>) => void\r\n setCurrentPlaying: (x: RetorikActivity | undefined) => void\r\n setEndedActivities: (x: Array<string>) => void\r\n setPonyfillCredentials: (x: PonyfillFactoryCredentials) => void\r\n setMuted: (x: boolean) => void\r\n setBoundaryData: (x: Array<Boundary>) => void\r\n}\r\n\r\nconst SpeechContextDefaultValues: SpeechContextType = {\r\n voice: null,\r\n customVoice: undefined,\r\n speaking: false,\r\n currentReplyToId: undefined,\r\n currentPlaying: undefined,\r\n queuedActivities: [],\r\n endedActivities: [],\r\n ponyfillCredentials: {\r\n region: 'francecentral',\r\n subscriptionKey: ''\r\n },\r\n muted: false,\r\n boundaryData: [],\r\n setVoice: () => {},\r\n setSpeaking: () => {},\r\n setCurrentReplyToId: () => {},\r\n setCurrentPlaying: () => {},\r\n setQueuedActivities: () => {},\r\n setEndedActivities: () => {},\r\n setPonyfillCredentials: () => {},\r\n setMuted: () => {},\r\n setBoundaryData: () => {}\r\n}\r\n\r\nexport const SpeechContext = createContext<SpeechContextType>(\r\n SpeechContextDefaultValues\r\n)\r\n\r\nexport function useSpeech(): SpeechContextType {\r\n return useContext(SpeechContext)\r\n}\r\n\r\nexport function SpeechProvider({\r\n ponyfillFactoryCredentials,\r\n customVoice,\r\n children\r\n}: SpeechProviderProps): JSX.Element {\r\n const { mode } = useRetorik()\r\n const [voice, setVoice] = useState<SpeechSynthesisVoice | null>(null)\r\n const [speaking, setSpeaking] = useState<boolean>(false)\r\n const [currentReplyToId, setCurrentReplyToId] = useState<string | undefined>(\r\n undefined\r\n )\r\n const [currentPlaying, setCurrentPlaying] = useState<\r\n RetorikActivity | undefined\r\n >(undefined)\r\n const [queuedActivities, setQueuedActivities] = useState<\r\n Array<RetorikActivity>\r\n >([])\r\n const [endedActivities, setEndedActivities] = useState<Array<string>>([])\r\n const [ponyfillCredentials, setPonyfillCredentials] =\r\n useState<PonyfillFactoryCredentials>(ponyfillFactoryCredentials)\r\n const [muted, setMuted] = useState<boolean>(false)\r\n const [boundaryData, setBoundaryData] = useState<Array<Boundary>>([])\r\n\r\n const value = useMemo(\r\n () => ({\r\n voice: voice,\r\n speaking: speaking,\r\n currentReplyToId: currentReplyToId,\r\n currentPlaying: currentPlaying,\r\n queuedActivities: queuedActivities,\r\n endedActivities: endedActivities,\r\n ponyfillCredentials: ponyfillCredentials,\r\n muted: muted,\r\n boundaryData: boundaryData,\r\n customVoice,\r\n setVoice,\r\n setSpeaking,\r\n setCurrentReplyToId,\r\n setCurrentPlaying,\r\n setQueuedActivities,\r\n setEndedActivities,\r\n setPonyfillCredentials,\r\n setMuted,\r\n setBoundaryData\r\n }),\r\n [\r\n voice,\r\n speaking,\r\n currentReplyToId,\r\n currentPlaying,\r\n queuedActivities,\r\n endedActivities,\r\n ponyfillCredentials,\r\n muted,\r\n boundaryData,\r\n customVoice,\r\n setVoice,\r\n setSpeaking,\r\n setCurrentReplyToId,\r\n setCurrentPlaying,\r\n setQueuedActivities,\r\n setEndedActivities,\r\n setPonyfillCredentials,\r\n setMuted,\r\n setBoundaryData\r\n ]\r\n )\r\n\r\n useEffect(() => {\r\n setMuted(mode === Mode.text)\r\n }, [mode])\r\n\r\n useEffect(() => {\r\n setRetorikEvent(\r\n speaking ? RetorikEvent.SpeechStarted : RetorikEvent.SpeechEnded\r\n )\r\n }, [speaking])\r\n\r\n return (\r\n <React.Fragment>\r\n <SpeechContext.Provider value={value}>{children}</SpeechContext.Provider>\r\n </React.Fragment>\r\n )\r\n}\r\n","import { adaptiveCardHostConfig } from '../models/adaptiveCardHostConfig'\r\n\r\nconst createAdaptiveCardHostConfig = (\r\n primary: string,\r\n cardBackground: string\r\n): typeof adaptiveCardHostConfig => {\r\n const template = adaptiveCardHostConfig\r\n template.containerStyles.default.foregroundColors.default.default = primary\r\n template.containerStyles.default.backgroundColor = cardBackground\r\n\r\n return template\r\n}\r\n\r\nexport default createAdaptiveCardHostConfig\r\n","const color = '#00D7FF'\r\nconst white = '#F7F3F6'\r\n\r\nexport const adaptiveCardHostConfig = {\r\n hostCapabilities: {\r\n capabilities: null\r\n },\r\n choiceSetInputValueSeparator: ',',\r\n supportsInteractivity: true,\r\n fontTypes: {\r\n default: {\r\n fontFamily: '\"Helvetica Neue\", sans-serif',\r\n fontSizes: {\r\n small: 12,\r\n default: 16,\r\n medium: 20,\r\n large: 26,\r\n extraLarge: 33\r\n },\r\n fontWeights: {\r\n lighter: 200,\r\n default: 300,\r\n bolder: 400\r\n }\r\n },\r\n monospace: {\r\n fontFamily: '\"Helvetica Neue\", sans-serif',\r\n fontSizes: {\r\n small: 12,\r\n default: 16,\r\n medium: 20,\r\n large: 26,\r\n extraLarge: 33\r\n },\r\n fontWeights: {\r\n lighter: 200,\r\n default: 300,\r\n bolder: 400\r\n }\r\n }\r\n },\r\n spacing: {\r\n small: 8,\r\n default: 16,\r\n medium: 20,\r\n large: 30,\r\n extraLarge: 40,\r\n padding: 25\r\n },\r\n separator: {\r\n lineThickness: 1,\r\n lineColor: 'transparent'\r\n },\r\n imageSizes: {\r\n small: 40,\r\n medium: 100,\r\n large: 160\r\n },\r\n containerStyles: {\r\n default: {\r\n foregroundColors: {\r\n default: {\r\n default: `${white}`,\r\n subtle: `${color}`,\r\n highlightColors: {\r\n default: `${color}`,\r\n subtle: '#11000000'\r\n }\r\n },\r\n dark: {\r\n default: '#000000',\r\n subtle: '#66000000',\r\n highlightColors: {\r\n default: '#22000000',\r\n subtle: '#11000000'\r\n }\r\n },\r\n light: {\r\n default: '#FFFFFF',\r\n subtle: '#33000000',\r\n highlightColors: {\r\n default: '#22000000',\r\n subtle: '#11000000'\r\n }\r\n },\r\n accent: {\r\n default: '#0063B1',\r\n subtle: '#0063B1',\r\n highlightColors: {\r\n default: '#22000000',\r\n subtle: '#11000000'\r\n }\r\n },\r\n good: {\r\n default: '#54a254',\r\n subtle: '#DD54a254',\r\n highlightColors: {\r\n default: '#22000000',\r\n subtle: '#11000000'\r\n }\r\n },\r\n warning: {\r\n default: '#c3ab23',\r\n subtle: '#DDc3ab23',\r\n highlightColors: {\r\n default: '#22000000',\r\n subtle: '#11000000'\r\n }\r\n },\r\n attention: {\r\n default: '#FF0000',\r\n subtle: '#DDFF0000',\r\n highlightColors: {\r\n default: '#22000000',\r\n subtle: '#11000000'\r\n }\r\n }\r\n },\r\n backgroundColor: 'transparent'\r\n },\r\n emphasis: {\r\n foregroundColors: {\r\n default: {\r\n default: '#000000',\r\n subtle: '#767676',\r\n highlightColors: {\r\n default: '#22000000',\r\n subtle: '#11000000'\r\n }\r\n },\r\n dark: {\r\n default: '#000000',\r\n subtle: '#66000000',\r\n highlightColors: {\r\n default: '#22000000',\r\n subtle: '#11000000'\r\n }\r\n },\r\n light: {\r\n default: '#FFFFFF',\r\n subtle: '#33000000',\r\n highlightColors: {\r\n default: '#22000000',\r\n subtle: '#11000000'\r\n }\r\n },\r\n accent: {\r\n default: '#2E89FC',\r\n subtle: '#882E89FC',\r\n highlightColors: {\r\n default: '#22000000',\r\n subtle: '#11000000'\r\n }\r\n },\r\n good: {\r\n default: '#54a254',\r\n subtle: '#DD54a254',\r\n highlightColors: {\r\n default: '#22000000',\r\n subtle: '#11000000'\r\n }\r\n },\r\n warning: {\r\n default: '#c3ab23',\r\n subtle: '#DDc3ab23',\r\n highlightColors: {\r\n default: '#22000000',\r\n subtle: '#11000000'\r\n }\r\n },\r\n attention: {\r\n default: '#FF0000',\r\n subtle: '#DDFF0000',\r\n highlightColors: {\r\n default: '#22000000',\r\n subtle: '#11000000'\r\n }\r\n }\r\n },\r\n backgroundColor: '#F0F0F0'\r\n }\r\n },\r\n actions: {\r\n maxActions: 100,\r\n spacing: 'Default',\r\n buttonSpacing: 0,\r\n showCard: {\r\n actionMode: 'Inline',\r\n inlineTopMargin: 8,\r\n style: 'emphasis'\r\n },\r\n preExpandSingleShowCardAction: false,\r\n actionsOrientation: 'vertical',\r\n actionAlignment: 'left',\r\n wrap: true\r\n },\r\n adaptiveCard: {\r\n allowCustomStyle: true\r\n },\r\n imageSet: {\r\n maxImageHeight: 100\r\n },\r\n media: {\r\n allowInlinePlayback: true\r\n },\r\n factSet: {\r\n title: {\r\n size: 'Default',\r\n color: `${color}`,\r\n isSubtle: false,\r\n weight: 'Bolder',\r\n wrap: true\r\n },\r\n value: {\r\n size: 'Default',\r\n color: `${color}`,\r\n isSubtle: false,\r\n weight: 'Default',\r\n wrap: true\r\n },\r\n spacing: 1000\r\n },\r\n cssClassNamePrefix: null,\r\n _legacyFontType: {\r\n fontFamily: 'Helvetica Neue,sans-serif',\r\n fontSizes: {\r\n small: 12,\r\n default: 16,\r\n medium: 20,\r\n large: 26,\r\n extraLarge: 33\r\n },\r\n fontWeights: {\r\n lighter: 200,\r\n default: 400,\r\n bolder: 600\r\n }\r\n }\r\n}\r\n","import React from 'react'\r\nimport {\r\n CONTENT_TYPE_NEWS,\r\n CONTENT_TYPE_POI,\r\n CONTENT_TYPE_PAGINATION,\r\n CONTENT_TYPE_EMPTY,\r\n CONTENT_TYPE_IMAGE,\r\n CONTENT_TYPE_LINK,\r\n CONTENT_TYPE_SUGGESTEDACTION,\r\n CONTENT_TYPE_DISCOVER,\r\n CONTENT_TYPE_SUGGESTION\r\n} from '../../models/attachmentTypes'\r\nimport NewsAttachment from '../Attachments/NewsAttachment'\r\nimport POIAttachment from '../Attachments/POIAttachment'\r\nimport PaginationAttachment from '../Attachments/PaginationAttachment'\r\nimport EmptyAttachment from '../Attachments/EmptyAttachment'\r\nimport ImageAttachment from '../Attachments/ImageAttachment'\r\nimport LinkAttachment from '../Attachments/LinkAttachment'\r\nimport MultiLinkAttachment from '../Attachments/MultiLinkAttachment'\r\nimport SuggestedActionAttachment from '../Attachments/SuggestedActionAttachment'\r\nimport DiscoverAttachment from '../Attachments/DiscoverAttachment'\r\nimport SuggestionAttachment from '../Attachments/SuggestionAttachment'\r\n\r\nconst attachmentMiddleware =\r\n () =>\r\n (next) =>\r\n (...args): JSX.Element | any => {\r\n const [{ attachment, history, height }] = args\r\n\r\n switch (attachment.contentType) {\r\n case CONTENT_TYPE_NEWS:\r\n return <NewsAttachment {...{ ...attachment.content, height: height }} />\r\n case CONTENT_TYPE_POI:\r\n return <POIAttachment {...attachment.content} />\r\n case CONTENT_TYPE_PAGINATION:\r\n return <PaginationAttachment {...attachment.content} />\r\n case CONTENT_TYPE_EMPTY:\r\n return <EmptyAttachment />\r\n case CONTENT_TYPE_IMAGE:\r\n return (\r\n <ImageAttachment {...{ ...attachment.content, height: height }} />\r\n )\r\n case CONTENT_TYPE_LINK:\r\n return Array.isArray(attachment.content.urlData) ? (\r\n <MultiLinkAttachment {...{ ...attachment.content, height: height }} />\r\n ) : (\r\n <LinkAttachment {...{ ...attachment.content, height: height }} />\r\n )\r\n case CONTENT_TYPE_SUGGESTEDACTION:\r\n return (\r\n <SuggestedActionAttachment\r\n {...attachment.content}\r\n history={history}\r\n height={height}\r\n />\r\n )\r\n case CONTENT_TYPE_DISCOVER:\r\n return (\r\n <DiscoverAttachment\r\n {...attachment.content}\r\n history={history}\r\n height={height}\r\n />\r\n )\r\n case CONTENT_TYPE_SUGGESTION:\r\n return (\r\n <SuggestionAttachment\r\n {...attachment.content}\r\n history={history}\r\n height={height}\r\n />\r\n )\r\n\r\n default: {\r\n if (height) {\r\n const tempArgs = args[0]\r\n tempArgs.attachment.content.minHeight = `${height}px`\r\n tempArgs.attachment.content.verticalContentAlignment = 'Center'\r\n args[0] = tempArgs\r\n }\r\n\r\n return next(...args)\r\n }\r\n }\r\n }\r\nexport default attachmentMiddleware\r\n","import React from 'react'\r\nimport type { Media } from '../../models/attachmentTypes'\r\nimport { Carousel } from '../Utils'\r\n\r\ninterface NewsAttachmentProps {\r\n title: string\r\n subtitle: string\r\n text: string\r\n media?: Array<{\r\n url: string\r\n profile?: string\r\n }>\r\n height?: number\r\n}\r\n\r\nconst NewsAttachment = ({\r\n title,\r\n subtitle,\r\n text,\r\n media,\r\n height\r\n}: NewsAttachmentProps): JSX.Element => {\r\n const medias: Array<Media> = []\r\n media &&\r\n media.forEach((med) => {\r\n medias.push({\r\n url: med.url,\r\n alt: med.profile || 'media'\r\n })\r\n })\r\n\r\n return (\r\n <div\r\n className='rf-w-full rf-p-4 rf-flex rf-flex-col rf-gap-4 rf-rounded rf-bg-cardFrameBackground rf-text-cardFrameText rf-touch-none'\r\n style={{\r\n height: height\r\n }}\r\n >\r\n {/* Title */}\r\n <div className='rf-w-fit rf-px-2 rf-py-1 large:rf-py-2 rf-small-size-auto rf-uppercase rf-border rf-border-black rf-bg-black rf-text-primary'>\r\n {title}\r\n </div>\r\n\r\n {/* SubTitle */}\r\n <div className='rf-title-size-auto'>{subtitle}</div>\r\n\r\n {/* Medias + information text */}\r\n <div className='rf-w-full rf-flex rf-flex-row rf-items-start rf-gap-3'>\r\n {/* Medias */}\r\n {medias.length > 0 && (\r\n <div className='rf-w-[45%] rf-min-w-[45%] rf-max-w-[45%] rf-flex rf-justify-center rf-aspect-square large:rf-aspect-video'>\r\n <Carousel\r\n className='rf-max-h-full rf-max-w-full rf-h-fit rf-w-fit'\r\n medias={medias}\r\n />\r\n </div>\r\n )}\r\n {/* Information text */}\r\n <div className='rf-line-clamp-7'>{text}</div>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default NewsAttachment\r\n","import Carousel from './Carousel'\r\nimport LocaleChangeEventListener from './LocaleChangeEventListener'\r\nimport Radio from './Radio'\r\nimport SendActivityEventListener from './SendActivityEventListener'\r\nimport SendTextBox from './SendTextBox'\r\nimport Subtitle from './Subtitle'\r\nimport Toggle from './Toggle'\r\nimport ToggleWithTexts from './ToggleWithTexts'\r\nimport Wheeler from './Wheeler'\r\n\r\nexport {\r\n Carousel,\r\n LocaleChangeEventListener,\r\n Radio,\r\n SendActivityEventListener,\r\n SendTextBox,\r\n Subtitle,\r\n Toggle,\r\n ToggleWithTexts,\r\n Wheeler\r\n}\r\n","import React, { useEffect, useRef, useState } from 'react'\r\nimport type { Media } from '../../models/attachmentTypes'\r\nimport { ChevronLeftIcon, ChevronRightIcon } from '../Icons/ChevronIcons'\r\n\r\ninterface CarouselProps {\r\n className?: string\r\n medias: Array<Media>\r\n controls?: boolean\r\n timer?: number\r\n color?: string\r\n maxHeight?: string | number\r\n}\r\n\r\n/**\r\n * Media types enum\r\n */\r\nenum MediaTypes {\r\n image = 1,\r\n video\r\n}\r\n\r\nconst images = ['png', 'gif', 'jpg', 'jpeg']\r\nconst videos = ['mp4', 'webm', '3gp', 'ogg']\r\n\r\nconst Carousel = ({\r\n className,\r\n medias,\r\n controls,\r\n timer,\r\n color,\r\n maxHeight\r\n}: CarouselProps): JSX.Element => {\r\n const [currentIndex, setCurrentIndex] = useState<number>(0)\r\n const [currentMedia, setCurrentMedia] = useState<Media>()\r\n const timerRef: React.MutableRefObject<any> = useRef(null)\r\n\r\n /**\r\n * On medias state change :\r\n * - clear timerRef interval if set\r\n * - call startNewMedia to reset medias\r\n * - if there are more than 1 media, set a timeout and launch it\r\n * On component unmount :\r\n * - clear timerRef interval if set\r\n */\r\n useEffect(() => {\r\n // Clear interval\r\n timerRef.current && clearInterval(timerRef.current)\r\n\r\n // Call the reset function to set currentIndex and currentMedia states\r\n startNewMedias()\r\n\r\n // Launch timer only if there are more than 1 media\r\n if (medias.length > 1 && timer !== 0) {\r\n timerRef.current = setTimeout(() => {\r\n handleMore()\r\n }, timer || 3000)\r\n }\r\n\r\n return (): void => timerRef.current && clearTimeout(timerRef.current)\r\n }, [medias])\r\n\r\n /**\r\n * On currentIndex state change :\r\n * - check type of media in medias array at current index by calling checkType method\r\n * - set currentMedia state\r\n */\r\n useEffect(() => {\r\n if (currentIndex !== undefined) {\r\n const index = currentIndex % medias.length\r\n const type = checkType(medias[index].url)\r\n if (type) {\r\n setCurrentMedia({\r\n ...medias[index],\r\n type: type\r\n })\r\n\r\n // Reset timer only if there are more than 1 media\r\n if (medias.length > 1 && timer !== 0) {\r\n timerRef.current && clearTimeout(timerRef.current)\r\n timerRef.current = setTimeout(() => {\r\n handleMore()\r\n }, timer || 3000)\r\n }\r\n }\r\n }\r\n }, [currentIndex])\r\n\r\n /**\r\n * On call :\r\n * - check if the currentIndex state is 0\r\n * - if so, if we just update this state to 0 it will remain the same and won't change the currentMedia state. We just leave currentIndex as is and set currentMedia state instead.\r\n * - otherwise, set the currentIndex state to 0\r\n */\r\n const startNewMedias = (): void => {\r\n if (currentIndex === 0) {\r\n const type = checkType(medias[0].url)\r\n if (type) {\r\n setCurrentMedia({\r\n ...medias[0],\r\n type: type\r\n })\r\n }\r\n } else {\r\n setCurrentIndex(0)\r\n }\r\n }\r\n\r\n /**\r\n * On call :\r\n * - retrieve the extension of the media\r\n * - return if it's either an image, or a video, or null\r\n * @param src : string\r\n * @returns number | null\r\n */\r\n const checkType = (src: string): number | null => {\r\n const extension = src.split('.').slice(-1)[0]\r\n return images.includes(extension.toLowerCase())\r\n ? MediaTypes.image\r\n : videos.includes(extension.toLowerCase())\r\n ? MediaTypes.video\r\n : null\r\n }\r\n\r\n const handleChoice = (choice: number): void => {\r\n setCurrentIndex(choice)\r\n }\r\n\r\n const handleLess = (): void => {\r\n currentIndex === 0\r\n ? setCurrentIndex(medias.length - 1)\r\n : setCurrentIndex((currentIndex) => currentIndex - 1)\r\n }\r\n\r\n const handleMore = (): void => {\r\n currentIndex === medias.length - 1\r\n ? setCurrentIndex(0)\r\n : setCurrentIndex((currentIndex) => currentIndex + 1)\r\n }\r\n\r\n return currentMedia && currentMedia.type ? (\r\n <React.Fragment>\r\n {currentMedia.type === MediaTypes.image ? (\r\n <img\r\n className={className}\r\n src={currentMedia.url}\r\n alt={currentMedia.alt || 'image'}\r\n style={{\r\n maxHeight: maxHeight\r\n }}\r\n />\r\n ) : (\r\n <video\r\n className={className}\r\n style={{\r\n maxHeight: maxHeight\r\n }}\r\n >\r\n <source src={currentMedia.url} />\r\n </video>\r\n )}\r\n {controls && medias.length > 1 && (\r\n <React.Fragment>\r\n {/* Bubbles at the bottom */}\r\n <div className='rf-absolute rf-bottom-4 rf-left-1/2 -rf-translate-x-1/2 rf-flex rf-flex-row rf-items-center rf-gap-2'>\r\n {medias.map((media, key) => {\r\n return (\r\n <div\r\n key={`${media.url}${key}`}\r\n className='rf-h-3 rf-w-3 rf-rounded-half rf-border rf-border-truewhite rf-cursor-pointer'\r\n onClick={(): void => handleChoice(key)}\r\n style={{\r\n backgroundColor:\r\n currentIndex === key ? color : 'transparent'\r\n }}\r\n />\r\n )\r\n })}\r\n </div>\r\n\r\n {/* Left and right controls */}\r\n <div\r\n className='rf-absolute rf-left-4 rf-top-1/2 -rf-translate-y-1/2 rf-cursor-pointer'\r\n onClick={handleLess}\r\n >\r\n <ChevronLeftIcon className='rf-h-6 large:rf-h-8' color='#FFF' />\r\n </div>\r\n <div\r\n className='rf-absolute rf-right-4 rf-top-1/2 -rf-translate-y-1/2 rf-cursor-pointer'\r\n onClick={handleMore}\r\n >\r\n <ChevronRightIcon className='rf-h-6 large:rf-h-8' color='#FFF' />\r\n </div>\r\n </React.Fragment>\r\n )}\r\n </React.Fragment>\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default Carousel\r\n","import ChevronLeftIcon from './ChevronLeftIcon'\r\nimport ChevronRightIcon from './ChevronRightIcon'\r\nimport ChevronUpIcon from './ChevronUpIcon'\r\n\r\nexport { ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon }\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst ChevronLeftIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n className={className || 'rf-h-6 rf-w-4'}\r\n viewBox='0 0 7.414 12.828'\r\n >\r\n <path\r\n d='M1429.081,2861.407l5-5-5-5'\r\n transform='translate(1435.081 2862.822) rotate(180)'\r\n fill='none'\r\n stroke={color || '#fff'}\r\n strokeLinecap='round'\r\n strokeLinejoin='round'\r\n strokeWidth='2'\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default ChevronLeftIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst ChevronRightIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n className={className || 'rf-h-6 rf-w-4'}\r\n viewBox='0 0 10.131 17.719'\r\n >\r\n <path\r\n d='M8.863,7.077l6.7-6.705a1.261,1.261,0,0,1,1.788,0,1.277,1.277,0,0,1,0,1.794L9.76,9.762A1.264,1.264,0,0,1,8.014,9.8L.369,2.171A1.266,1.266,0,0,1,2.158.377Z'\r\n transform='translate(0 17.719) rotate(-90)'\r\n fill={color || '#818181'}\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default ChevronRightIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst ChevronUpIcon = ({ className, color }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='0 0 28 16.01'\r\n fill={color || 'currentColor'}\r\n className={className || 'rf-h-6 rf-w-6'}\r\n >\r\n <path d='M14 4.83 3.4 15.43a2 2 0 0 1-2.82 0 2.02 2.02 0 0 1 0-2.84l12-12a2 2 0 0 1 2.76-.06l12.08 12.05a2 2 0 0 1-2.83 2.83Z' />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default ChevronUpIcon\r\n","import React, { useEffect } from 'react'\r\nimport { useLocaleStore, setLocale } from '../Contexts/localeStore'\r\n\r\nconst LocaleChangeEventListener = (): JSX.Element => {\r\n const supportedLanguages = useLocaleStore((state) => state.supported)\r\n\r\n useEffect(() => {\r\n document.addEventListener('changeRetorikLocale', handleChangeRetorikLocale)\r\n\r\n return (): void => {\r\n document.removeEventListener(\r\n 'changeRetorikLocale',\r\n handleChangeRetorikLocale\r\n )\r\n }\r\n }, [])\r\n\r\n const handleChangeRetorikLocale = (event): void => {\r\n console.warn(\r\n 'changeRetorikLocale event is depreciated and will be removed soon. Please use setLocale function instead.'\r\n )\r\n const newLocale = event.detail?.locale\r\n if (newLocale && supportedLanguages?.includes(newLocale)) {\r\n setLocale(newLocale)\r\n }\r\n }\r\n\r\n return <React.Fragment />\r\n}\r\n\r\nexport default LocaleChangeEventListener\r\n","import React, { useState } from 'react'\r\n\r\ninterface ToggleProps {\r\n className?: string\r\n title: string\r\n handleChange: (title: string) => void\r\n checked: boolean\r\n}\r\n\r\nconst Radio = ({\r\n className,\r\n title,\r\n handleChange,\r\n checked\r\n}: ToggleProps): JSX.Element => {\r\n const [transition, setTransition] = useState<string>(\r\n checked ? 'rf-scale-1' : 'rf-scale-0'\r\n )\r\n\r\n const handleToggle = (): void => {\r\n setTransition(checked ? 'rf-scale-0' : 'rf-scale-1')\r\n handleChange(title)\r\n }\r\n\r\n return (\r\n <div\r\n className={`rf-flex rf-flex-row rf-items-center rf-justify-between hover:rf-cursor-pointer ${className}`}\r\n >\r\n {/* Title */}\r\n <div className='rf-capitalize'>{title}</div>\r\n\r\n {/* Toggle */}\r\n <button\r\n className={`rf-relative rf-w-7 large:rf-w-8 large-vertical:rf-w-14 rf-h-7 large:rf-h-8 large-vertical:rf-h-14 ${\r\n !checked && 'rf-border rf-border-[#9FA2AA]'\r\n } rf-rounded-half`}\r\n style={{\r\n background: checked\r\n ? 'linear-gradient(to right, #1999B1, #0a4652)'\r\n : '#FFFFFF',\r\n boxShadow: checked ? '-3px 3px 6px #00000029' : ''\r\n }}\r\n onClick={handleToggle}\r\n aria-label={title}\r\n >\r\n <div\r\n className={`rf-absolute rf-top-2 large-vertical:rf-top-4 rf-left-2 large-vertical:rf-left-4 rf-w-3 large:rf-w-4 large-vertical:rf-w-6 rf-h-3 large:rf-h-4 large-vertical:rf-h-6 rf-rounded-half rf-bg-[#F8F8F8] rf-transition-all ${transition}`}\r\n />\r\n </button>\r\n </div>\r\n )\r\n}\r\n\r\nexport default Radio\r\n","/* eslint-disable react/self-closing-comp */\r\nimport React, { useState, useRef, useEffect } from 'react'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport { hooks } from 'botframework-webchat'\r\nimport translation from '../../translations/menu.json'\r\nimport { SendMessageIcon } from '../Icons/Miscellaneous'\r\n\r\nconst { useSendMessage } = hooks\r\n\r\ninterface SendTextProps {\r\n className?: string\r\n withButton?: boolean\r\n}\r\n\r\nconst SendTextBox = ({ className, withButton }: SendTextProps): JSX.Element => {\r\n const locale = useLocaleStore((state) => state.locale)\r\n const { setSendBoxRef, canFocusSendBox } = useRetorik()\r\n const { themeColors, isMobile } = useView()\r\n const sendMessage = useSendMessage()\r\n const [height, setHeight] = useState<string | undefined>()\r\n const [message, setMessage] = useState<string>('')\r\n\r\n const textareaRef: React.MutableRefObject<HTMLTextAreaElement | null> =\r\n useRef(null)\r\n\r\n useEffect(() => {\r\n if (canFocusSendBox && textareaRef.current) {\r\n document.activeElement !== textareaRef.current &&\r\n textareaRef.current.focus()\r\n }\r\n }, [textareaRef, canFocusSendBox])\r\n\r\n useEffect(() => {\r\n textareaRef.current && setSendBoxRef(textareaRef.current)\r\n }, [textareaRef])\r\n\r\n const handleChange = (e: React.ChangeEvent<HTMLTextAreaElement>): void => {\r\n setMessage(e.currentTarget.value)\r\n textareaRef?.current && setHeight(`${textareaRef.current.scrollHeight}px`)\r\n }\r\n\r\n const handleKeyDown = (e: React.KeyboardEvent): void => {\r\n if (e.key === 'Enter' || e.key === 'NumpadEnter') {\r\n e.preventDefault()\r\n e.stopPropagation()\r\n handleSend()\r\n }\r\n }\r\n\r\n const handleSend = (): void => {\r\n if (message.length > 0) {\r\n sendMessage(message, 'speech')\r\n setMessage('')\r\n setHeight(undefined)\r\n }\r\n }\r\n\r\n return (\r\n <div\r\n className={`rf-relative rf-min-h-12 rf-px-4 rf-text-base rf-pt-3 rf-pb-3 rf-flex rf-items-center rf-border rf-border-menuBorder rf-rounded-lg rf-bg-truewhite rf-shadow-[inset_0_0_6px_#0000003B] ${className}`}\r\n >\r\n <textarea\r\n ref={textareaRef}\r\n className={`rf-input-hidden rf-outline-none ${\r\n withButton ? 'rf-w-[calc(100%-3rem)]' : 'rf-w-full'\r\n } rf-resize-none rf-scrollbar-hidden ${\r\n isMobile && 'placeholder:rf-text-black placeholder:rf-opacity-100'\r\n }`}\r\n value={message}\r\n placeholder={\r\n translation[locale]?.message || translation['fr-FR'].message\r\n }\r\n onKeyDown={(e): void => handleKeyDown(e)}\r\n onChange={(e): void => handleChange(e)}\r\n style={{\r\n height: height || '1.5rem'\r\n }}\r\n ></textarea>\r\n {withButton && (\r\n <button\r\n className='rf-absolute rf-right-4 rf-h-5 rf-w-5'\r\n onClick={handleSend}\r\n >\r\n <SendMessageIcon className='rf-w-5' color={themeColors.secondary} />\r\n </button>\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default SendTextBox\r\n","import React, {\r\n createContext,\r\n useContext,\r\n ReactNode,\r\n useState,\r\n useMemo,\r\n useEffect\r\n} from 'react'\r\nimport type { ThemeColors } from '../../models/colorTypes'\r\nimport type { ViewsConfiguration } from '../../models/types'\r\nimport { defaultThemeDark as defaultColors } from '../../models/colors'\r\nimport { DeviceType } from '../../models/enums'\r\nimport { mobileDisplays, mediumBreakpoint } from '../../models/constants'\r\nimport { WebChatActivity } from 'botframework-webchat-core'\r\n\r\nexport type ViewsProviderProps = {\r\n viewsConfiguration: ViewsConfiguration\r\n themeColors: ThemeColors\r\n children?: ReactNode\r\n}\r\n\r\nexport type ViewContextType = {\r\n configurations: ViewsConfiguration\r\n route: string\r\n currentDeviceType: number\r\n currentHeight: number\r\n currentWidth: number\r\n themeColors: ThemeColors\r\n isTactile: boolean\r\n isMobile: boolean\r\n isMobileLandscape: boolean\r\n displayControls: boolean\r\n homeActivityKey: string | undefined\r\n showHomeAttachments: WebChatActivity | undefined\r\n mediumLandscape: boolean\r\n setConfigurations: (x: ViewsConfiguration) => void\r\n setRoute: (x: string) => void\r\n setCurrentDeviceType: (x: number) => void\r\n setCurrentHeight: (x: number) => void\r\n setCurrentWidth: (x: number) => void\r\n setDisplayControls: (x: boolean) => void\r\n setHomeActivityKey: (x: string | undefined) => void\r\n setShowHomeAttachments: (x: WebChatActivity | undefined) => void\r\n}\r\n\r\nconst defaultConfiguration: ViewsConfiguration = {\r\n homeRoute: 'home',\r\n views: {\r\n home: {\r\n background: {\r\n image: '',\r\n style: 'image'\r\n }\r\n }\r\n }\r\n}\r\n\r\nconst ViewContextDefaultValues: ViewContextType = {\r\n configurations: defaultConfiguration,\r\n route: 'home',\r\n currentDeviceType: DeviceType.mobile,\r\n currentHeight: 1080,\r\n currentWidth: 1920,\r\n themeColors: defaultColors,\r\n isTactile: false,\r\n isMobile: false,\r\n isMobileLandscape: false,\r\n displayControls: true,\r\n homeActivityKey: undefined,\r\n showHomeAttachments: undefined,\r\n mediumLandscape: false,\r\n setConfigurations: () => {},\r\n setRoute: () => {},\r\n setCurrentDeviceType: () => {},\r\n setCurrentHeight: () => {},\r\n setCurrentWidth: () => {},\r\n setDisplayControls: () => {},\r\n setHomeActivityKey: () => {},\r\n setShowHomeAttachments: () => {}\r\n}\r\n\r\nexport const ViewContext = createContext<ViewContextType>(\r\n ViewContextDefaultValues\r\n)\r\n\r\nexport function useView(): ViewContextType {\r\n return useContext(ViewContext)\r\n}\r\n\r\nexport function ViewProvider({\r\n viewsConfiguration,\r\n themeColors,\r\n children\r\n}: ViewsProviderProps): JSX.Element {\r\n const [configurations, setConfigurations] =\r\n useState<ViewsConfiguration>(viewsConfiguration)\r\n const [route, setRoute] = useState<string>(configurations.homeRoute || 'home')\r\n const [currentDeviceType, setCurrentDeviceType] = useState<number>(\r\n DeviceType.mobile\r\n )\r\n const [currentHeight, setCurrentHeight] = useState<number>(0)\r\n const [currentWidth, setCurrentWidth] = useState<number>(0)\r\n const mediumLandscape = useMemo<boolean>(() => {\r\n return currentWidth < mediumBreakpoint\r\n }, [currentWidth])\r\n const [isTactile, setIsTactile] = useState<boolean>(false)\r\n const isMobile = useMemo<boolean>(() => {\r\n return mobileDisplays.includes(currentDeviceType)\r\n }, [currentDeviceType])\r\n const isMobileLandscape = useMemo<boolean>(() => {\r\n if (\r\n currentDeviceType === DeviceType.mobile &&\r\n currentHeight < currentWidth\r\n ) {\r\n return true\r\n }\r\n\r\n return false\r\n }, [currentHeight, currentWidth, currentDeviceType])\r\n const [displayControls, setDisplayControls] = useState<boolean>(true)\r\n const [homeActivityKey, setHomeActivityKey] = useState<string | undefined>(\r\n undefined\r\n )\r\n const [showHomeAttachments, setShowHomeAttachments] = useState<\r\n WebChatActivity | undefined\r\n >(undefined)\r\n\r\n const value = useMemo(\r\n () => ({\r\n configurations: configurations,\r\n route: route,\r\n currentDeviceType: currentDeviceType,\r\n currentHeight: currentHeight,\r\n currentWidth: currentWidth,\r\n themeColors: themeColors,\r\n isTactile: isTactile,\r\n isMobile: isMobile,\r\n isMobileLandscape: isMobileLandscape,\r\n displayControls: displayControls,\r\n homeActivityKey: homeActivityKey,\r\n showHomeAttachments: showHomeAttachments,\r\n mediumLandscape: mediumLandscape,\r\n setConfigurations,\r\n setRoute,\r\n setCurrentDeviceType,\r\n setCurrentHeight,\r\n setCurrentWidth,\r\n setDisplayControls,\r\n setShowHomeAttachments,\r\n setHomeActivityKey\r\n }),\r\n [\r\n configurations,\r\n route,\r\n currentDeviceType,\r\n currentHeight,\r\n currentWidth,\r\n themeColors,\r\n isTactile,\r\n isMobileLandscape,\r\n displayControls,\r\n homeActivityKey,\r\n showHomeAttachments,\r\n mediumLandscape,\r\n setConfigurations,\r\n setRoute,\r\n setCurrentDeviceType,\r\n setCurrentHeight,\r\n setCurrentWidth,\r\n setDisplayControls,\r\n setShowHomeAttachments,\r\n setHomeActivityKey\r\n ]\r\n )\r\n\r\n useEffect(() => {\r\n setIsTactile('ontouchstart' in window || navigator.maxTouchPoints > 0)\r\n }, [])\r\n\r\n useEffect(() => {\r\n setConfigurations(viewsConfiguration)\r\n }, [viewsConfiguration])\r\n\r\n return (\r\n <React.Fragment>\r\n <ViewContext.Provider value={value}>{children}</ViewContext.Provider>\r\n </React.Fragment>\r\n )\r\n}\r\n","import type { ThemeColors } from './colorTypes'\r\nimport { commonColors } from './constants'\r\n\r\nconst widgetDefault = {\r\n rgb: 'rgb(112, 112, 112)'\r\n}\r\n\r\nconst defaultThemeDark: ThemeColors = {\r\n ...commonColors,\r\n companyName: '#000',\r\n loader: {\r\n animation: commonColors.primary,\r\n background: 'rgba(18,18,18,0.7)',\r\n text: '#FFF',\r\n toggle: {\r\n text: '#000',\r\n background: commonColors.primary\r\n },\r\n button: {\r\n background: {\r\n default: 'transparent',\r\n hover: 'transparent'\r\n },\r\n border: {\r\n default: commonColors.primary,\r\n hover: '#FFF'\r\n },\r\n text: {\r\n default: commonColors.primary,\r\n hover: '#FFF'\r\n }\r\n }\r\n },\r\n card: {\r\n frame: {\r\n background: '#2B2B2B',\r\n border: 'transparent',\r\n text: '#F7F3F6'\r\n },\r\n button: {\r\n background: {\r\n default: 'transparent',\r\n hover: 'transparent'\r\n },\r\n border: {\r\n default: commonColors.primary,\r\n hover: '#FFF'\r\n },\r\n text: {\r\n default: commonColors.primary,\r\n hover: '#FFF'\r\n }\r\n },\r\n discoverButton: {\r\n background: {\r\n default: '#eaebf0',\r\n hover: 'transparent'\r\n },\r\n border: {\r\n default: 'transparent',\r\n hover: '#FFF'\r\n },\r\n text: {\r\n default: '#575F6B',\r\n hover: '#FFF'\r\n }\r\n }\r\n },\r\n textMode: {\r\n panel: {\r\n background: 'rgba(255, 255, 255, 0.9)',\r\n border: 'transparent',\r\n conversationUser: '#101219',\r\n conversationBot: '#1999B1'\r\n }\r\n },\r\n vocalMode: {\r\n subtitles: {\r\n text: '#FFF',\r\n background: '#000'\r\n }\r\n },\r\n formInput: {\r\n text: {\r\n default: commonColors.secondary,\r\n hover: '#FFF'\r\n },\r\n inputRadioCheckbox: {\r\n unchecked: {\r\n background: '#434141',\r\n border: '#818181'\r\n },\r\n checked: {\r\n background: commonColors.primary,\r\n border: commonColors.primary,\r\n item: '#000'\r\n }\r\n },\r\n inputButton: {\r\n background: {\r\n default: commonColors.black,\r\n hover: commonColors.primary\r\n },\r\n border: {\r\n default: commonColors.primary,\r\n hover: '#FFF'\r\n },\r\n text: {\r\n default: '#FFF',\r\n hover: '#FFF'\r\n }\r\n },\r\n likert: {\r\n default: 'transparent',\r\n hover: '#E8B712'\r\n }\r\n }\r\n}\r\n\r\nconst defaultThemeLight: ThemeColors = {\r\n ...commonColors,\r\n companyName: '#000',\r\n loader: {\r\n animation: commonColors.primary,\r\n background: 'rgba(18,18,18,0.7)',\r\n text: '#FFF',\r\n toggle: {\r\n text: '#000',\r\n background: commonColors.primary\r\n },\r\n button: {\r\n background: {\r\n default: 'transparent',\r\n hover: 'transparent'\r\n },\r\n border: {\r\n default: commonColors.primary,\r\n hover: '#FFF'\r\n },\r\n text: {\r\n default: commonColors.primary,\r\n hover: '#FFF'\r\n }\r\n }\r\n },\r\n card: {\r\n frame: {\r\n background: '#2B2B2B',\r\n border: 'transparent',\r\n text: '#F7F3F6'\r\n },\r\n button: {\r\n background: {\r\n default: 'transparent',\r\n hover: 'transparent'\r\n },\r\n border: {\r\n default: commonColors.primary,\r\n hover: '#FFF'\r\n },\r\n text: {\r\n default: commonColors.primary,\r\n hover: '#FFF'\r\n }\r\n },\r\n discoverButton: {\r\n background: {\r\n default: '#eaebf0',\r\n hover: 'transparent'\r\n },\r\n border: {\r\n default: 'transparent',\r\n hover: '#FFF'\r\n },\r\n text: {\r\n default: '#575F6B',\r\n hover: '#FFF'\r\n }\r\n }\r\n },\r\n textMode: {\r\n panel: {\r\n background: 'rgba(255, 255, 255, 0.9)',\r\n border: 'transparent',\r\n conversationUser: '#101219',\r\n conversationBot: '#1999B1'\r\n }\r\n },\r\n vocalMode: {\r\n subtitles: {\r\n text: '#FFF',\r\n background: '#000'\r\n }\r\n },\r\n formInput: {\r\n text: {\r\n default: commonColors.secondary,\r\n hover: '#FFF'\r\n },\r\n inputRadioCheckbox: {\r\n unchecked: {\r\n background: '#434141',\r\n border: '#818181'\r\n },\r\n checked: {\r\n background: commonColors.primary,\r\n border: commonColors.primary,\r\n item: '#000'\r\n }\r\n },\r\n inputButton: {\r\n background: {\r\n default: commonColors.black,\r\n hover: commonColors.primary\r\n },\r\n border: {\r\n default: commonColors.primary,\r\n hover: '#FFF'\r\n },\r\n text: {\r\n default: '#FFF',\r\n hover: '#FFF'\r\n }\r\n },\r\n likert: {\r\n default: 'transparent',\r\n hover: '#E8B712'\r\n }\r\n }\r\n}\r\n\r\nexport { defaultThemeDark, defaultThemeLight, widgetDefault }\r\n","{\r\n \"fr-FR\": {\r\n \"menu\": \"menu\",\r\n \"mode\": \"mode\",\r\n \"parameters\": \"paramètres\",\r\n \"sound\": \"son\",\r\n \"subtitle\": \"sous-titre\",\r\n \"tutorial\": \"tutoriel\",\r\n \"history\": \"historique\",\r\n \"lang\": \"langues\",\r\n \"singleLang\": \"langue\",\r\n \"message\": \"Saisissez votre message\",\r\n \"allowMicrophone\": \"Autorisez votre navigateur à utiliser votre micro pour continuer\",\r\n \"back\": \"retour\",\r\n \"backconversation\": \"retour à la conversation\",\r\n \"close\": \"fermer\",\r\n \"answer\": \" répond à vos questions\"\r\n },\r\n \"en-US\": {\r\n \"menu\": \"menu\",\r\n \"mode\": \"mode\",\r\n \"parameters\": \"parameters\",\r\n \"sound\": \"sound\",\r\n \"subtitle\": \"subtitle\",\r\n \"tutorial\": \"tutorial\",\r\n \"history\": \"history\",\r\n \"lang\": \"languages\",\r\n \"singleLang\": \"language\",\r\n \"message\": \"Enter your message\",\r\n \"allowMicrophone\": \"Give your browser permission to use microphone to continue\",\r\n \"back\": \"back\",\r\n \"backconversation\": \"back to the conversation\",\r\n \"close\": \"close\",\r\n \"answer\": \" answers your questions\"\r\n },\r\n \"es-ES\": {\r\n \"menu\": \"menu\",\r\n \"mode\": \"mode\",\r\n \"parameters\": \"parameters\",\r\n \"sound\": \"sound\",\r\n \"subtitle\": \"subtitle\",\r\n \"tutorial\": \"tutorial\",\r\n \"history\": \"history\",\r\n \"lang\": \"languages\",\r\n \"singleLang\": \"language\",\r\n \"message\": \"Enter your message\",\r\n \"allowMicrophone\": \"Give your browser permission to use microphone to continue\",\r\n \"back\": \"back\",\r\n \"backconversation\": \"back to the conversation\",\r\n \"close\": \"close\",\r\n \"answer\": \" answers your questions\"\r\n },\r\n \"de-DE\": {\r\n \"menu\": \"menu\",\r\n \"mode\": \"mode\",\r\n \"parameters\": \"parameters\",\r\n \"sound\": \"sound\",\r\n \"subtitle\": \"subtitle\",\r\n \"tutorial\": \"tutorial\",\r\n \"history\": \"history\",\r\n \"lang\": \"languages\",\r\n \"singleLang\": \"language\",\r\n \"message\": \"Enter your message\",\r\n \"allowMicrophone\": \"Give your browser permission to use microphone to continue\",\r\n \"back\": \"back\",\r\n \"backconversation\": \"back to the conversation\",\r\n \"close\": \"close\",\r\n \"answer\": \" answers your questions\"\r\n }\r\n}\r\n","import CloseIcon from './CloseIcon'\r\nimport DownloadIcon from './DownloadIcon'\r\nimport FeatherCheckIcon from './FeatherCheckIcon'\r\nimport FeatherFilterIcon from './FeatherFilterIcon'\r\nimport InfoWithCircleIcon from './InfoWithCircleIcon'\r\nimport SendMessageIcon from './SendMessageIcon'\r\nimport ZoomOutIcon from './ZoomOutIcon'\r\nimport RetorikLogoIcon from './RetorikLogoIcon'\r\n\r\nexport {\r\n CloseIcon,\r\n DownloadIcon,\r\n FeatherCheckIcon,\r\n FeatherFilterIcon,\r\n InfoWithCircleIcon,\r\n SendMessageIcon,\r\n ZoomOutIcon,\r\n RetorikLogoIcon\r\n}\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst CloseIcon = ({ className, color }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n className={className || 'rf-h-6 rf-w-6'}\r\n fill='none'\r\n viewBox='0 0 24 24'\r\n stroke={color || 'currentColor'}\r\n strokeWidth={2}\r\n >\r\n <path\r\n strokeLinecap='round'\r\n strokeLinejoin='round'\r\n d='M6 18L18 6M6 6l12 12'\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default CloseIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst DownloadIcon = ({ className, color }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='0 0 30 30'\r\n className={className || 'rf-h-6 rf-w-6'}\r\n >\r\n <path\r\n d='M20.75 14.38H16V.96c0-.53-.45-.96-1-.96s-1 .43-1 .96v13.42H9.25c-.19 0-.32.2-.22.36l5.75 9.52c.1.16.34.16.44 0l5.75-9.52c.09-.16-.03-.36-.22-.36z'\r\n fill={color || 'currentColor'}\r\n />\r\n <path\r\n d='M29 19.76V27c0 1.1-.86 2-1.93 2H2.93C1.86 29 1 28.1 1 27v-7.24'\r\n fill='none'\r\n stroke={color || 'currentColor'}\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default DownloadIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst FeatherCheckIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n width='28.676'\r\n height='20.419'\r\n viewBox='0 0 28.676 20.419'\r\n className={className || 'rf-w-4 rf-h-4'}\r\n >\r\n <path\r\n d='M30.434,9l-16.8,16.8L6,18.163'\r\n transform='translate(-3.879 -6.879)'\r\n fill='none'\r\n stroke={color || '#fff'}\r\n strokeLinecap='round'\r\n strokeLinejoin='round'\r\n strokeWidth='3'\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default FeatherCheckIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst FeatherFilterIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n width='14.333'\r\n height='13'\r\n viewBox='0 0 14.333 13'\r\n className={className || 'rf-w-6 rf-h-6'}\r\n >\r\n <path\r\n d='M16.333,4.5H3l5.333,6.307v4.36L11,16.5V10.807Z'\r\n transform='translate(-2.5 -4)'\r\n fill='none'\r\n stroke={color || '#000'}\r\n strokeLinecap='round'\r\n strokeLinejoin='round'\r\n strokeWidth='1'\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default FeatherFilterIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst InfoWithCircleIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <div className={className || 'rf-h-6'}>\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='0 0 33 33'\r\n className='rf-h-full'\r\n >\r\n <g transform='translate(-1.5 -1.5)'>\r\n <path\r\n d='M33,18A15,15,0,1,1,18,3,15,15,0,0,1,33,18Z'\r\n fill='none'\r\n stroke={color || '#00d7ff'}\r\n strokeLinecap='round'\r\n strokeLinejoin='round'\r\n strokeWidth='3'\r\n />\r\n <path\r\n d='M18,24V18'\r\n fill='none'\r\n stroke={color || '#00d7ff'}\r\n strokeLinecap='round'\r\n strokeLinejoin='round'\r\n strokeWidth='3'\r\n />\r\n <path\r\n d='M18,12h0'\r\n fill='none'\r\n stroke={color || '#00d7ff'}\r\n strokeLinecap='round'\r\n strokeLinejoin='round'\r\n strokeWidth='3'\r\n />\r\n </g>\r\n </svg>\r\n </div>\r\n )\r\n}\r\n\r\nexport default InfoWithCircleIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst SendMessageIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n className={className || 'rf-w-6'}\r\n viewBox='0 0 23.207 23.207'\r\n >\r\n <g transform='translate(0.5 0.707)'>\r\n <path\r\n d='M28.6,3,16.5,15.1'\r\n transform='translate(-6.6 -3)'\r\n fill='none'\r\n stroke={color || '#1999b1'}\r\n strokeLinecap='round'\r\n strokeLinejoin='round'\r\n strokeWidth='1'\r\n />\r\n <path\r\n d='M25,3,17.3,25l-4.4-9.9L3,10.7Z'\r\n transform='translate(-3 -3)'\r\n fill='none'\r\n stroke={color || '#1999b1'}\r\n strokeLinecap='round'\r\n strokeLinejoin='round'\r\n strokeWidth='1'\r\n />\r\n </g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport default SendMessageIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst ZoomOutIcon = ({ className, color }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='0 0 37.91 37.91'\r\n className={className || 'rf-h-6 rf-w-6'}\r\n >\r\n <path\r\n d='M29.773,4.5l4.844,4.844-6.087,6.044,2.991,2.991,6.044-6.087,4.844,4.844V4.5ZM4.5,17.137l4.844-4.844,6.044,6.087,2.991-2.991L12.293,9.344,17.137,4.5H4.5ZM17.137,42.41l-4.844-4.844,6.087-6.044-2.991-2.991L9.344,34.617,4.5,29.773V42.41ZM42.41,29.773l-4.844,4.844-6.044-6.087-2.991,2.991,6.087,6.044L29.773,42.41H42.41Z'\r\n transform='translate(-4.5 -4.5)'\r\n fill={color || '#00d7ff'}\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default ZoomOutIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst RetorikLogoIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n x='0px'\r\n y='0px'\r\n viewBox='0 0 325 135'\r\n className={className || 'rf-h-6 rf-w-6'}\r\n >\r\n <rect x='0' y='-6' width='325' height='143' fill='transparent' />\r\n <g>\r\n <path\r\n fill={color || '#FFF'}\r\n d='M93.6,70.9V50.8c0-14.2-11.5-25.7-25.7-25.7h0c-14.2,0-25.7,11.5-25.7,25.7v20.1c0,14.2,11.5,25.7,25.7,25.7v0 h25.7l-13.3-3.2C88.2,89,93.6,80.6,93.6,70.9z M67.9,89.8C57.5,89.8,49,81.3,49,70.9V50.8c0-10.4,8.5-18.9,18.9-18.9 c10.4,0,18.9,8.5,18.9,18.9v20.1C86.8,81.3,78.3,89.8,67.9,89.8z'\r\n />\r\n <g>\r\n <path\r\n fill={color || '#FFF'}\r\n d='M67.9,82.6c-2.3,0-4.5-0.9-6.1-2.5c-0.7-0.7-0.7-1.9,0-2.6c0.7-0.7,1.9-0.7,2.6,0c0.9,0.9,2.2,1.4,3.5,1.4 c1.3,0,2.6-0.5,3.5-1.4c0.7-0.7,1.9-0.7,2.6,0c0.7,0.7,0.7,1.9,0,2.6C72.4,81.7,70.2,82.6,67.9,82.6z'\r\n />\r\n </g>\r\n </g>\r\n <g>\r\n <path\r\n fill={color || '#FFF'}\r\n d='M117.1,61.6V34.9h11.1c1.1,0,2.2,0.2,3.1,0.7c1,0.5,1.8,1.1,2.5,1.9c0.7,0.8,1.2,1.7,1.6,2.7 c0.4,1,0.6,2,0.6,3c0,1-0.2,1.9-0.5,2.8c-0.3,0.9-0.7,1.7-1.3,2.5c-0.6,0.7-1.2,1.3-2,1.8c-0.8,0.5-1.6,0.8-2.6,0.9l6.7,10.4h-2.2 l-6.5-10.1H119v10.1H117.1z M119,49.7h9.4c0.9,0,1.6-0.2,2.3-0.6c0.7-0.4,1.3-0.9,1.8-1.5c0.5-0.6,0.9-1.3,1.1-2.1 c0.3-0.8,0.4-1.6,0.4-2.4c0-0.9-0.2-1.7-0.5-2.5c-0.3-0.8-0.7-1.5-1.3-2.1c-0.5-0.6-1.2-1.1-1.9-1.4c-0.7-0.4-1.5-0.5-2.3-0.5H119 V49.7z'\r\n />\r\n <path\r\n fill={color || '#FFF'}\r\n d='M161.6,59.9v1.7h-17.8V34.9h17.5v1.7h-15.5v10.5h13.6v1.7h-13.6v11.1H161.6z'\r\n />\r\n <path\r\n fill={color || '#FFF'}\r\n d='M187.8,36.6H178v25h-1.9v-25h-9.8v-1.7h21.5V36.6z'\r\n />\r\n <path\r\n fill={color || '#FFF'}\r\n d='M203.7,61.8c-1.9,0-3.5-0.4-5.1-1.2c-1.5-0.8-2.8-1.8-4-3c-1.1-1.3-2-2.7-2.6-4.3c-0.6-1.6-0.9-3.3-0.9-5 c0-1.8,0.3-3.5,1-5.1c0.6-1.6,1.5-3.1,2.6-4.3c1.1-1.3,2.4-2.3,4-3c1.5-0.7,3.2-1.1,5-1.1c1.9,0,3.6,0.4,5.1,1.2 c1.5,0.8,2.9,1.8,4,3.1c1.1,1.3,1.9,2.7,2.5,4.3s0.9,3.3,0.9,4.9c0,1.8-0.3,3.5-1,5.2c-0.6,1.6-1.5,3.1-2.6,4.3 c-1.1,1.2-2.4,2.2-4,3C207.1,61.4,205.5,61.8,203.7,61.8z M193.1,48.2c0,1.5,0.3,3,0.8,4.4c0.5,1.4,1.2,2.7,2.2,3.8 c0.9,1.1,2.1,2,3.4,2.6c1.3,0.7,2.7,1,4.3,1c1.6,0,3.1-0.3,4.3-1c1.3-0.7,2.4-1.6,3.3-2.7c0.9-1.1,1.6-2.4,2.1-3.8 c0.5-1.4,0.8-2.8,0.8-4.3c0-1.5-0.3-3-0.8-4.4c-0.5-1.4-1.3-2.7-2.2-3.8c-0.9-1.1-2-2-3.3-2.6c-1.3-0.7-2.7-1-4.2-1 c-1.6,0-3.1,0.3-4.4,1S197,39,196,40.2c-0.9,1.1-1.6,2.4-2.1,3.8C193.4,45.4,193.1,46.8,193.1,48.2z'\r\n id='path19'\r\n />\r\n <path\r\n fill={color || '#FFF'}\r\n d='M223.7,61.6V34.9h11.1c1.1,0,2.2,0.2,3.1,0.7c1,0.5,1.8,1.1,2.5,1.9c0.7,0.8,1.2,1.7,1.6,2.7 c0.4,1,0.6,2,0.6,3c0,1-0.2,1.9-0.5,2.8c-0.3,0.9-0.7,1.7-1.3,2.5c-0.6,0.7-1.2,1.3-2,1.8c-0.8,0.5-1.6,0.8-2.6,0.9l6.7,10.4h-2.2 l-6.5-10.1h-8.7v10.1H223.7z M225.6,49.7h9.4c0.9,0,1.6-0.2,2.3-0.6c0.7-0.4,1.3-0.9,1.8-1.5c0.5-0.6,0.9-1.3,1.1-2.1 c0.3-0.8,0.4-1.6,0.4-2.4c0-0.9-0.2-1.7-0.5-2.5c-0.3-0.8-0.7-1.5-1.3-2.1c-0.5-0.6-1.2-1.1-1.9-1.4c-0.7-0.4-1.5-0.5-2.3-0.5h-9.1 V49.7z'\r\n />\r\n <path fill={color || '#FFF'} d='M250.5,61.6V34.9h1.9v26.7H250.5z' />\r\n <path\r\n fill={color || '#FFF'}\r\n d='M261.7,61.6V34.9h1.9v16.2l15.6-16.2h2.2l-11.1,11.7l11.7,15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8,16.3 c-0.2,0.4-0.5,0.8-0.8,1c-0.4,0.2-0.9,0.4-1.6,0.4c-0.1,0-0.1,0-0.2,0c-0.1,0-0.1,0-0.2,0V100.1z'\r\n />\r\n </g>\r\n </g>\r\n </g>\r\n <g>\r\n <path\r\n fill={color || '#FFF'}\r\n d='M213.9,95.9l0.4-0.3c1.4-1.2,2.1-2.7,2.1-4.6l0-8h-2.5V95.9z'\r\n />\r\n </g>\r\n <g>\r\n <polygon\r\n fill={color || '#FFF'}\r\n points='202.9,93.3 196.9,83 193.9,83 201.4,95.9 201.4,95.9 204.4,95.9 204.4,95.9 212,83 208.9,83 '\r\n />\r\n </g>\r\n <g>\r\n <path\r\n fill={color || '#FFF'}\r\n d='M174.1,87.5v3.9c0,2.5,2,4.5,4.5,4.5h8.9c0.7,0,1.4-0.2,2-0.5v0.4h2.5V83l-13.4,0 C176.1,83,174.1,85,174.1,87.5z M189.4,85.5v5.7c-0.1,1.2-1,2.1-2.2,2.1h-8.6c-1.2,0-2.2-1-2.2-2.3v-3.4c0-1.2,1-2.2,2.2-2.2 H189.4z'\r\n />\r\n </g>\r\n <g>\r\n <path\r\n fill={color || '#FFF'}\r\n d='M171.3,75.2l-2.5-0.8v9.1c-0.6-0.3-1.3-0.5-2-0.5H158c-2.5,0-4.5,2-4.5,4.5v3.9c0,2.5,2,4.5,4.5,4.5l13.2,0 h1.4h0.3c-1-1.2-1.6-2.8-1.6-4.5L171.3,75.2z M168.8,93.4h-10.7c-1.2,0-2.2-1-2.2-2.2v-3.4c0-1.2,1-2.2,2.2-2.2h8.5 c1.1,0,2.1,0.9,2.1,2.1V93.4z'\r\n />\r\n </g>\r\n <g>\r\n <path\r\n fill={color || '#FFF'}\r\n d='M215.1,80.6c0.3,0,0.6-0.1,0.9-0.4c0.3-0.2,0.4-0.5,0.4-0.9c0-0.3-0.1-0.6-0.4-0.9c-0.3-0.3-0.6-0.4-0.9-0.4 c-0.4,0-0.7,0.1-0.9,0.4c-0.2,0.2-0.4,0.5-0.4,0.9c0,0.4,0.1,0.7,0.4,0.9C214.5,80.5,214.8,80.6,215.1,80.6z'\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport default RetorikLogoIcon\r\n","import React, { useState, useEffect, useRef, useMemo } from 'react'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { useSpeech } from '../Contexts/SpeechContext'\r\nimport { Mode } from '../../models/enums'\r\n\r\nconst Subtitle = (): JSX.Element | null => {\r\n const { displaySubtitles, mode } = useRetorik()\r\n const { boundaryData, speaking } = useSpeech()\r\n\r\n const [sentenceToDisplay, setSentenceToDisplay] = useState<string>('')\r\n const timer = useRef<NodeJS.Timeout | null>(null)\r\n const [index, setIndex] = useState<number>(-1)\r\n\r\n // Generate an array of sentences from boundaryData\r\n const sentences: Array<{ sentence: string; duration: number }> =\r\n useMemo(() => {\r\n // If no boundary data is available, return an empty array\r\n if (!boundaryData || boundaryData.length === 0) {\r\n setSentenceToDisplay('')\r\n return []\r\n }\r\n\r\n // Prepare an array to store sentences and their durations\r\n const sentencesArray: { sentence: string; duration: number }[] = []\r\n let currentSentence = ''\r\n let currentStartTime = boundaryData[0]?.startTime || 0\r\n\r\n // Loop over each boundary data item\r\n for (let i = 0; i < boundaryData.length; i++) {\r\n const boundary = boundaryData[i]\r\n\r\n // Prepare a string based on the word at the boundary\r\n let boundaryString = ''\r\n if (['.', ',', '...'].includes(boundary.word)) {\r\n boundaryString = boundary.word\r\n } else if ([':', ';', '!', '?'].includes(boundary.word)) {\r\n boundaryString = '\\u00A0' + boundary.word\r\n } else {\r\n boundaryString = i === 0 ? boundary.word : ' ' + boundary.word\r\n }\r\n\r\n // Construct a new sentence\r\n const newSentence = currentSentence + boundaryString\r\n\r\n // If it's the last boundary of the current array or the end of the boundaries (type 'EndBoundary')\r\n if (\r\n i === boundaryData.length - 1 ||\r\n boundary.boundaryType === 'EndBoundary'\r\n ) {\r\n // Calculate the sentence duration\r\n let sentenceDuration = 0\r\n if (boundary.boundaryType === 'EndBoundary') {\r\n const previousBoundary = i === 0 ? boundary : boundaryData[i - 1]\r\n const end = previousBoundary.endTime\r\n sentenceDuration = (end - currentStartTime) / 10000\r\n } else {\r\n sentenceDuration = (boundary.endTime - currentStartTime) / 10000\r\n }\r\n\r\n // If there is a sentence to push, add it to the array\r\n if (newSentence.trim() !== '') {\r\n sentencesArray.push({\r\n sentence: newSentence,\r\n duration: sentenceDuration\r\n })\r\n }\r\n } else if (newSentence.length > 50) {\r\n // If the current word is a punctuation, add it even if it goes beyond 50 characters\r\n if (boundary.boundaryType === 'PunctuationBoundary') {\r\n // Calculate the sentence duration\r\n const sentenceDuration =\r\n (boundary.endTime - currentStartTime) / 10000\r\n\r\n if (newSentence.trim() !== '') {\r\n sentencesArray.push({\r\n sentence: newSentence,\r\n duration: sentenceDuration\r\n })\r\n }\r\n\r\n currentStartTime =\r\n i === boundaryData.length - 1\r\n ? boundary.startTime\r\n : boundaryData[i + 1].startTime\r\n currentSentence = ''\r\n } else {\r\n // Endtime is the one from the previous boundary, or the current one if there isn't\r\n const previousBoundary = i === 0 ? boundary : boundaryData[i - 1]\r\n const sentenceDuration =\r\n (previousBoundary.endTime - currentStartTime) / 10000\r\n\r\n if (newSentence.trim() !== '') {\r\n sentencesArray.push({\r\n sentence: currentSentence,\r\n duration: sentenceDuration\r\n })\r\n }\r\n\r\n currentStartTime = boundary.startTime\r\n currentSentence = boundary.word\r\n }\r\n } else {\r\n // Continue the current sentence\r\n currentSentence = newSentence\r\n }\r\n }\r\n\r\n // Return the array of sentences and their durations\r\n return sentencesArray\r\n }, [boundaryData])\r\n\r\n useEffect(() => {\r\n setIndex(speaking ? 0 : -1)\r\n }, [speaking])\r\n\r\n useEffect(() => {\r\n if (index !== -1) {\r\n // Set the current sentence\r\n const sentence = sentences[index]\r\n setSentenceToDisplay(sentence?.sentence || '')\r\n\r\n // Set a new timer to update the index after the sentence's duration\r\n timer.current = setTimeout(() => {\r\n setIndex((i) => i + 1)\r\n }, sentence?.duration || 1000)\r\n } else {\r\n if (timer.current) {\r\n clearTimeout(timer.current)\r\n }\r\n setSentenceToDisplay('')\r\n }\r\n }, [index])\r\n\r\n return mode === Mode.vocal && sentenceToDisplay && displaySubtitles ? (\r\n <div className='rf-relative rf-col-start-1 vertical:rf-col-span-full rf-col-span-6 rf-row-start-9 rf-row-span-full vertical:rf-row-start-11 vertical:rf-row-span-1 rf-justify-self-center rf-self-center rf-overflow-y-auto rf-scrollbar-thin rf-w-1/2 vertical:rf-w-5/6 rf-max-h-full rf-py-1 large:rf-py-4'>\r\n <div\r\n className='rf-relative rf-max-h-full rf-bg-vocalModeSubtitlesBackground rf-text-vocalModeSubtitlesText rf-justify-self-center rf-self-center rf-p-2 large:rf-p-4 rf-text-size-auto rf-text-center'\r\n id='retorik-subtitles'\r\n >\r\n {sentenceToDisplay}\r\n </div>\r\n </div>\r\n ) : null\r\n}\r\n\r\nexport default Subtitle\r\n","import React, { useEffect, useState } from 'react'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { Mode } from '../../models/enums'\r\n\r\ninterface ToggleProps {\r\n className?: string\r\n title?: string\r\n handleChange: (on: boolean) => void\r\n defaultChecked?: boolean\r\n lockInTextMode?: boolean\r\n}\r\n\r\nconst Toggle = ({\r\n className,\r\n title,\r\n handleChange,\r\n defaultChecked,\r\n lockInTextMode\r\n}: ToggleProps): JSX.Element => {\r\n const { mode } = useRetorik()\r\n const [on, setOn] = useState<boolean>(!!defaultChecked)\r\n const [transition, setTransition] = useState<string>(\r\n on ? 'rf-right-1' : 'rf-left-1'\r\n )\r\n\r\n useEffect(() => {\r\n setOn(!!defaultChecked)\r\n setTransition(defaultChecked ? 'rf-right-1' : 'rf-left-1')\r\n }, [defaultChecked])\r\n\r\n const handleToggle = (): void => {\r\n if (!(lockInTextMode && mode === Mode.text)) {\r\n setTransition(on ? 'rf-translate-x-1' : 'rf-translate-x-5')\r\n handleChange(!on)\r\n setOn(!on)\r\n }\r\n }\r\n\r\n return (\r\n <div\r\n className={`rf-flex rf-flex-row large:rf-flex-col rf-items-center rf-justify-between large:rf-justify-start large:rf-gap-1 hover:rf-cursor-pointer ${className}`}\r\n >\r\n {/* Title */}\r\n <div className='rf-capitalize large:rf-uppercase'>{title}</div>\r\n\r\n {/* Toggle */}\r\n <button\r\n className='rf-relative rf-w-12 rf-min-w-12 rf-h-6 rf-rounded-6'\r\n style={{\r\n background: 'linear-gradient(to left, #E5E6EC, #F2F3F6)',\r\n boxShadow: 'inset 3px 3px 6px #00000029'\r\n }}\r\n onClick={handleToggle}\r\n aria-label={title}\r\n >\r\n <div\r\n className={`rf-absolute rf-top-1 rf-w-4 rf-h-4 rf-rounded-half ${\r\n on ? 'rf-bg-secondary' : 'rf-bg-[#F8F8F8]'\r\n } rf-transition-all ${transition}`}\r\n style={{\r\n boxShadow: on ? '-3px -3px 3px #00000029' : '3px 3px 3px #00000029'\r\n }}\r\n />\r\n </button>\r\n </div>\r\n )\r\n}\r\n\r\nexport default Toggle\r\n","import React, { useState } from 'react'\r\n\r\ninterface ToggleProps {\r\n texts: {\r\n left: string\r\n leftId: number\r\n right: string\r\n rightId: number\r\n }\r\n colors: {\r\n text: string\r\n background: string\r\n }\r\n handleChange: (chosen: number) => void\r\n defaultChecked?: number\r\n}\r\n\r\nconst ToggleWithTexts = ({\r\n texts,\r\n colors,\r\n handleChange,\r\n defaultChecked\r\n}: ToggleProps): JSX.Element => {\r\n const [left, setLeft] = useState<boolean>(\r\n !defaultChecked || defaultChecked === texts.leftId\r\n )\r\n\r\n /**\r\n * On call :\r\n * - call parent method with either leftId or rightId depending on the leftSide parameter\r\n * - set left state\r\n * @param leftSide : boolean\r\n */\r\n const handleToggle = (leftSide: boolean): void => {\r\n handleChange(leftSide ? texts.leftId : texts.rightId)\r\n setLeft(leftSide)\r\n }\r\n\r\n return (\r\n <div\r\n className='rf-w-full rf-flex rf-flex-row rf-justify-between rf-text-size-auto rf-rounded-8 rf-cursor-pointer rf-select-none rf-shadow-[inset_0_12px_12px_-12px_#00000029,inset_0_-12px_12px_-12px_#00000029]'\r\n style={{\r\n background:\r\n 'linear-gradient(to left, #CBCBCB 0%, #9A9797 50%, #4E4C4C 100%)',\r\n color: colors.text\r\n }}\r\n >\r\n {/* Left part of the toggle */}\r\n <div\r\n className={`rf-px-4 rf-py-2 rf-uppercase rf-font-bold rf-border rf-rounded-8 ${\r\n left && 'rf-shadow-[0_0_3px_6px_#00000029]'\r\n } `}\r\n style={{\r\n background: left ? colors.background : 'transparent',\r\n borderColor: left ? colors.background : 'transparent'\r\n }}\r\n onClick={(): void => handleToggle(true)}\r\n >\r\n {texts.left}\r\n </div>\r\n\r\n {/* Right part of the toggle */}\r\n <div\r\n className={`rf-px-4 rf-py-2 rf-uppercase rf-font-bold rf-border rf-rounded-8 ${\r\n !left && 'rf-shadow-[0_0_3px_6px_#00000029]'\r\n }`}\r\n style={{\r\n background: left ? 'transparent' : colors.background,\r\n borderColor: left ? 'transparent' : colors.background\r\n }}\r\n onClick={(): void => handleToggle(false)}\r\n >\r\n {texts.right}\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default ToggleWithTexts\r\n","import React, { useEffect, useRef } from 'react'\r\nimport type { WithChildren } from '../../models/utils'\r\n\r\ntype WheelerProps = WithChildren<{\r\n className?: string\r\n handleWheel: (\r\n delta: number | { x: number; y: number },\r\n type?: string | number\r\n ) => void\r\n paramInHandle?: string | number\r\n handleBoth?: boolean\r\n xAxisOnly?: boolean\r\n}>\r\n\r\nconst Wheeler = ({\r\n className,\r\n handleWheel,\r\n paramInHandle,\r\n handleBoth,\r\n xAxisOnly,\r\n children\r\n}: WheelerProps): JSX.Element => {\r\n const ref = useRef<HTMLDivElement>(null)\r\n\r\n /**\r\n * On mouse wheel :\r\n * - check if the event has to be taken in account\r\n * - if yes, retrieve the wanted data\r\n * - prevent event default\r\n * - stop event propagation\r\n * - call parent function with delta value and paramInHandle from props if defined\r\n * @param e : WheelEvent\r\n */\r\n const internalHandleWheel = (e: WheelEvent): void => {\r\n if (xAxisOnly && e.deltaY) {\r\n return\r\n }\r\n\r\n const delta = handleBoth\r\n ? { x: e.deltaX, y: e.deltaY }\r\n : xAxisOnly\r\n ? e.deltaX\r\n : e.deltaY\r\n e.preventDefault()\r\n e.stopImmediatePropagation()\r\n paramInHandle ? handleWheel(delta, paramInHandle) : handleWheel(delta)\r\n }\r\n\r\n /**\r\n * On ref change :\r\n * - add wheel event listener, with passive = false to allow preventDefault in processing\r\n * On component unmount :\r\n * - unbind wheel event listener\r\n */\r\n useEffect(() => {\r\n if (ref.current) {\r\n ref.current.addEventListener(\r\n 'wheel',\r\n (e): void => internalHandleWheel(e),\r\n { passive: false }\r\n )\r\n }\r\n\r\n return (): void => {\r\n ref.current &&\r\n ref.current.removeEventListener('wheel', (e) => internalHandleWheel(e))\r\n }\r\n }, [ref.current])\r\n\r\n return (\r\n <div className={className} ref={ref}>\r\n {children}\r\n </div>\r\n )\r\n}\r\n\r\nexport default Wheeler\r\n","import React from 'react'\r\nimport { hooks } from 'botframework-webchat-component'\r\nimport type { POIContentType } from '../../models/attachmentTypes'\r\nimport { PhotoCameraIcon, FavoriteLightIcon } from '../Icons/DetailedPOIIcons'\r\nimport CommentsPennantMini from './DetailedAttachment/CommentsPennantMini'\r\nimport { useView } from '../Contexts/ViewContext'\r\n\r\nconst { useSendPostBack } = hooks\r\n\r\nconst ReviewsAndFavorite = ({ reviews, favorite }): JSX.Element => {\r\n return (\r\n <React.Fragment>\r\n {reviews && (\r\n <CommentsPennantMini\r\n customerReviews={reviews}\r\n className='rf-absolute rf-top-0 rf-right-2'\r\n />\r\n )}\r\n {favorite && (\r\n <FavoriteLightIcon className='rf-absolute rf-h-6 large:rf-h-8 rf-bottom-2 rf-right-2' />\r\n )}\r\n </React.Fragment>\r\n )\r\n}\r\n\r\nconst POIAttachment = ({\r\n media,\r\n title,\r\n subtitle,\r\n favorite,\r\n customerReviews,\r\n tap\r\n}: POIContentType): JSX.Element => {\r\n const sendPostBack = useSendPostBack()\r\n const { themeColors } = useView()\r\n\r\n const handleClick = (): void => {\r\n tap && sendPostBack(tap)\r\n }\r\n\r\n return (\r\n <div\r\n className='rf-w-full rf-h-full rf-flex rf-flex-col rf-rounded hover:rf-cursor-pointer'\r\n onClick={handleClick}\r\n >\r\n {media && media[0]?.url ? (\r\n <div\r\n className='rf-relative rf-w-full rf-rounded rf-aspect-video'\r\n style={{\r\n backgroundImage: `url(${media[0].url})`,\r\n backgroundSize: 'cover',\r\n backgroundRepeat: 'no-repeat',\r\n backgroundPosition: 'center'\r\n }}\r\n >\r\n <ReviewsAndFavorite reviews={customerReviews} favorite={favorite} />\r\n </div>\r\n ) : (\r\n <div className='rf-relative rf-w-full rf-bg-silver rf-rounded rf-aspect-video'>\r\n <PhotoCameraIcon className='rf-absolute rf-h-1/3 rf-top-1/3 rf-left-1/2 rf-transform -rf-translate-x-1/2' />\r\n <ReviewsAndFavorite reviews={customerReviews} favorite={favorite} />\r\n </div>\r\n )}\r\n\r\n {/* Subtitle 2 lines max / title 2 lines max */}\r\n {subtitle && (\r\n <p\r\n className='rf-mt-2 rf-font-bold rf-line-clamp-2'\r\n style={{\r\n color: themeColors.agendaColor\r\n }}\r\n >\r\n {subtitle}\r\n </p>\r\n )}\r\n <p className='rf-my-2 rf-font-bold rf-line-clamp-2'>{title || ''}</p>\r\n </div>\r\n )\r\n}\r\n\r\nexport default POIAttachment\r\n","import CommentsPennantIcon from './CommentsPennantIcon'\r\nimport FavoriteIcon from './FavoriteIcon'\r\nimport FavoriteLightIcon from './FavoriteLightIcon'\r\nimport PhoneIcon from './PhoneIcon'\r\nimport PhotoCameraIcon from './PhotoCameraIcon'\r\n\r\nexport {\r\n CommentsPennantIcon,\r\n FavoriteIcon,\r\n FavoriteLightIcon,\r\n PhoneIcon,\r\n PhotoCameraIcon\r\n}\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst CommentsPennantIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='0 0 72.258 45'\r\n className={className || 'w-6'}\r\n >\r\n <g transform='translate(-2203.071 -428.34)'>\r\n <path\r\n d='M11.129,3l2.512,5.089,5.617.821-4.064,3.959.959,5.593-5.024-2.642L6.105,18.461l.959-5.593L3,8.91l5.617-.821Z'\r\n transform='translate(2201.071 426.34)'\r\n fill='none'\r\n stroke={color || '#ffffff'}\r\n strokeLinecap='round'\r\n strokeLinejoin='round'\r\n strokeWidth='2'\r\n />\r\n <path\r\n d='M11.129,3l2.512,5.089,5.617.821-4.064,3.959.959,5.593-5.024-2.642L6.105,18.461l.959-5.593L3,8.91l5.617-.821Z'\r\n transform='translate(2255.071 426.34)'\r\n fill='none'\r\n stroke={color || '#ffffff'}\r\n strokeLinecap='round'\r\n strokeLinejoin='round'\r\n strokeWidth='2'\r\n />\r\n <path\r\n d='M28,11.225A5.775,5.775,0,1,1,22.225,17,5.774,5.774,0,0,1,28,11.225m0,24.75c8.167,0,16.775,4.015,16.775,5.775v3.025H11.225V41.75c0-1.76,8.608-5.775,16.775-5.775M28,6A11,11,0,1,0,39,17,11,11,0,0,0,28,6Zm0,24.75c-7.342,0-22,3.685-22,11V50H50V41.75C50,34.435,35.343,30.75,28,30.75Z'\r\n transform='translate(2211 423.34)'\r\n fill={color || '#ffffff'}\r\n />\r\n </g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport default CommentsPennantIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst FavoriteIcon = ({ className }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <div className={className || ''}>\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='0 0 72 72'\r\n className='rf-h-full'\r\n >\r\n <path\r\n d='M413.444,281.927a24.4,24.4,0,1,0,24.4,24.4A24.4,24.4,0,0,0,413.444,281.927Zm12.233,30.989a51.118,51.118,0,0,1-9.936,9.6l-2.3,1.654-2.3-1.654a51.118,51.118,0,0,1-9.936-9.6,17.7,17.7,0,0,1-3.462-9.826,10.357,10.357,0,0,1,10.227-10.321h.095a10.267,10.267,0,0,1,5.373,1.514,10.271,10.271,0,0,1,5.373-1.514h.095a10.357,10.357,0,0,1,10.226,10.321A17.7,17.7,0,0,1,425.677,312.916Z'\r\n transform='translate(-380.234 -271.942)'\r\n fill='#0c89a2'\r\n />\r\n <path\r\n d='M428.741,308.235h-.057a6.436,6.436,0,0,0-5.373,2.941,6.435,6.435,0,0,0-5.373-2.941h-.057a6.394,6.394,0,0,0-6.335,6.391,13.766,13.766,0,0,0,2.7,7.505,47.374,47.374,0,0,0,9.06,8.727,47.369,47.369,0,0,0,9.061-8.727,13.765,13.765,0,0,0,2.7-7.505A6.394,6.394,0,0,0,428.741,308.235Z'\r\n transform='translate(-390.101 -283.478)'\r\n fill='#cb0038'\r\n />\r\n <g>\r\n <path\r\n d='M379.123,306.092l.984-.568a3.667,3.667,0,1,1-4.851-1.228l.554,1a2.435,2.435,0,0,0-1.228,1.529,2.533,2.533,0,0,0,4.873,1.339A2.519,2.519,0,0,0,379.123,306.092Z'\r\n transform='translate(-373.354 -281.75)'\r\n fill='#161615'\r\n />\r\n <path\r\n d='M383.877,292.134a3.579,3.579,0,1,1-4.955,1.283A3.524,3.524,0,0,1,383.877,292.134Zm-.614,1.07a2.35,2.35,0,1,0,1.007,3.281A2.36,2.36,0,0,0,383.263,293.2Z'\r\n transform='translate(-375.577 -276.186)'\r\n fill='#161615'\r\n />\r\n <path\r\n d='M388.494,279.91l.851-.864,3.212,3.162a2.729,2.729,0,0,1-3.83,3.889l-3.211-3.163.85-.864,3.1,3.056a1.525,1.525,0,1,0,2.127-2.161Z'\r\n transform='translate(-378.687 -270.679)'\r\n fill='#161615'\r\n />\r\n <path\r\n d='M396.125,274.77l2.02-1.306a2.265,2.265,0,1,1,2.457,3.8l-1,.647,1.382,2.138-1.018.658Zm4.181-.008a1.092,1.092,0,0,0-1.664-.248l-.874.564,1.206,1.867.874-.565A1.092,1.092,0,0,0,400.306,274.762Z'\r\n transform='translate(-383.338 -268.046)'\r\n fill='#161615'\r\n />\r\n <path\r\n d='M418.982,268.841a3.387,3.387,0,0,1-2.494,4.305l-2.211.575-1.782-6.847,2.211-.576A3.387,3.387,0,0,1,418.982,268.841Zm-1.194.311a2.247,2.247,0,0,0-2.772-1.743l-1.056.275,1.2,4.617,1.057-.275A2.254,2.254,0,0,0,417.788,269.151Z'\r\n transform='translate(-390.516 -265.032)'\r\n fill='#161615'\r\n />\r\n <path\r\n d='M427.818,267.132l2.828-.109.044,1.151-2.827.11.073,1.9,3.132-.122.044,1.151-4.343.17-.275-7.07,4.282-.167.045,1.151-3.07.12Z'\r\n transform='translate(-396.655 -264.145)'\r\n fill='#161615'\r\n />\r\n <path\r\n d='M446.9,272.151l.56.988a3.666,3.666,0,1,1,1.268-4.839l-1.006.544a2.431,2.431,0,0,0-1.518-1.239,2.532,2.532,0,0,0-1.38,4.86A2.519,2.519,0,0,0,446.9,272.151Z'\r\n transform='translate(-403.416 -265.121)'\r\n fill='#161615'\r\n />\r\n <path\r\n d='M460.445,277.009a3.579,3.579,0,1,1-1.242-4.964A3.523,3.523,0,0,1,460.445,277.009Zm-1.064-.622a2.35,2.35,0,1,0-3.289.98A2.361,2.361,0,0,0,459.381,276.386Z'\r\n transform='translate(-408.594 -267.384)'\r\n fill='#161615'\r\n />\r\n <path\r\n d='M467.155,281.565l2.048,1.953-.8.834L466.36,282.4l-1.311,1.375,2.268,2.162-.8.834-3.145-3,4.882-5.12,3.1,2.957-.8.834-2.224-2.12Z'\r\n transform='translate(-412.827 -270.506)'\r\n fill='#161615'\r\n />\r\n <path\r\n d='M478.916,290.648l.678,1.006-3.737,2.52a2.729,2.729,0,0,1-3.052-4.525l3.738-2.521.678,1.006-3.612,2.435a1.525,1.525,0,1,0,1.7,2.514Z'\r\n transform='translate(-416.422 -274.223)'\r\n fill='#161615'\r\n />\r\n <path\r\n d='M482.854,299.49l.848,2.165a2.168,2.168,0,0,1-1.2,2.987,2.045,2.045,0,0,1-2.552-.694l-1.915,2.649-.516-1.317,1.873-2.535-.2-.518-2.485.973-.442-1.129Zm-.8,4c.649-.254.8-.835.518-1.56l-.351-.894-1.957.766.35.894C480.9,303.425,481.406,303.748,482.055,303.494Z'\r\n transform='translate(-418.479 -279.643)'\r\n fill='#161615'\r\n />\r\n </g>\r\n <g transform='translate(4.89 51.981)'>\r\n <path\r\n d='M384.888,365.352l-.9-1.038.58-.5a2.025,2.025,0,0,1-1.846-.74,3.084,3.084,0,0,1,4.657-4.019,2.09,2.09,0,0,1,.5,1.753l3.1-2.68.969,1.122Zm1.911-3.608a1.623,1.623,0,0,0-.294-1.589,1.695,1.695,0,0,0-2.562,2.211,1.621,1.621,0,0,0,1.529.524Z'\r\n transform='translate(-382.062 -357.324)'\r\n fill='#161615'\r\n />\r\n <path\r\n d='M397.773,372.316c-.066.09-.2.269-.337.442l-3.535-2.577a1.672,1.672,0,0,0,.629,1.927,2.359,2.359,0,0,0,1.648.467l-.057,1.335a3.75,3.75,0,0,1-2.392-.7,3.078,3.078,0,0,1-.733-4.342,2.949,2.949,0,1,1,4.777,3.452Zm-.893-1.293a1.481,1.481,0,0,0-2.346-1.71Z'\r\n transform='translate(-386.596 -361.465)'\r\n fill='#161615'\r\n />\r\n <path\r\n d='M412.418,369.575l1.391.51-3.215,8.768-1.391-.511Z'\r\n transform='translate(-393.963 -362.355)'\r\n fill='#161615'\r\n />\r\n <path\r\n d='M418.264,372.236l1.265.337-.784,2.936-1.265-.337Z'\r\n transform='translate(-397.592 -363.522)'\r\n fill='#161615'\r\n />\r\n <path\r\n d='M426.423,379.222c-.013.111-.039.331-.076.551l-4.344-.5a1.671,1.671,0,0,0,1.5,1.366,2.353,2.353,0,0,0,1.662-.407l.61,1.188a3.749,3.749,0,0,1-2.427.568,3.077,3.077,0,0,1-2.779-3.414,2.948,2.948,0,1,1,5.857.646Zm-1.414-.684a1.481,1.481,0,0,0-2.884-.33Zm.961-5.025-2.384,1.816-.842-1,2.343-1.895Z'\r\n transform='translate(-398.936 -363.608)'\r\n fill='#161615'\r\n />\r\n <path\r\n d='M438.911,378.258l.963,8.642-1.473.164-.382-3.425a2.092,2.092,0,0,1-1.561.933,3.084,3.084,0,0,1-.682-6.114,2.123,2.123,0,0,1,1.857.713l-.085-.761Zm-1.247,2.2a1.62,1.62,0,0,0-1.477-.655,1.694,1.694,0,0,0,.375,3.363,1.623,1.623,0,0,0,1.3-.965Z'\r\n transform='translate(-404.51 -366.163)'\r\n fill='#161615'\r\n />\r\n <path\r\n d='M447.021,379.887l-1.251-3.581,1.4-.489,1.117,3.2a1.053,1.053,0,0,0,1.5.783,1.442,1.442,0,0,0,.86-1.06l-1.288-3.686,1.4-.489,1.933,5.529-1.307.457-.281-.805a2.111,2.111,0,0,1-4.086.145Z'\r\n transform='translate(-409.996 -364.542)'\r\n fill='#161615'\r\n />\r\n <path\r\n d='M455.552,367.9a.976.976,0,1,1-.385,1.325A.97.97,0,0,1,455.552,367.9Zm.73,2.869,1.3-.714,2.819,5.132-1.3.714Z'\r\n transform='translate(-414.063 -361.567)'\r\n fill='#161615'\r\n />\r\n <path\r\n d='M463.272,367.506l.478.6a2.125,2.125,0,0,1,.809-1.818,3.086,3.086,0,0,1,3.842,4.807,2.089,2.089,0,0,1-1.764.445l2.152,2.694-1.159.926-5.43-6.8Zm2.462,2.9a1.625,1.625,0,0,0,1.6-.234,1.7,1.7,0,0,0-2.114-2.645,1.623,1.623,0,0,0-.582,1.509Z'\r\n transform='translate(-417.201 -360.651)'\r\n fill='#161615'\r\n />\r\n <path\r\n d='M478.073,357.422c.086.069.261.207.427.355l-2.719,3.423a1.67,1.67,0,0,0,1.95-.549,2.354,2.354,0,0,0,.535-1.626l1.332.111a3.751,3.751,0,0,1-.8,2.36,3.077,3.077,0,0,1-4.367.551,2.947,2.947,0,1,1,3.646-4.626Zm-1.327.837a1.481,1.481,0,0,0-1.806,2.273Z'\r\n transform='translate(-422.028 -356.717)'\r\n fill='#161615'\r\n />\r\n </g>\r\n </svg>\r\n </div>\r\n )\r\n}\r\n\r\nexport default FavoriteIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst FavoriteLightIcon = ({ className }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='0 0 56 55'\r\n className={className || 'rf-h-full'}\r\n >\r\n <g transform='translate(0.465 -0.307)'>\r\n <ellipse\r\n cx='28'\r\n cy='27.5'\r\n rx='28'\r\n ry='27.5'\r\n transform='translate(-0.465 0.307)'\r\n fill='#fff'\r\n />\r\n <path\r\n d='M449.065,485.074a24.475,24.475,0,1,0,24.476,24.476A24.475,24.475,0,0,0,449.065,485.074Zm12.272,31.086a51.307,51.307,0,0,1-9.969,9.625l-2.3,1.659-2.3-1.659a51.425,51.425,0,0,1-9.966-9.625,17.755,17.755,0,0,1-3.474-9.857,10.391,10.391,0,0,1,10.26-10.353h.1a10.28,10.28,0,0,1,5.387,1.52,10.291,10.291,0,0,1,5.39-1.52h.1A10.388,10.388,0,0,1,464.808,506.3,17.75,17.75,0,0,1,461.337,516.16Z'\r\n transform='translate(-421.48 -482.143)'\r\n fill='#0c89a2'\r\n />\r\n <path\r\n d='M445.93,489.861h-.056a6.46,6.46,0,0,0-5.39,2.947,6.45,6.45,0,0,0-5.387-2.947h-.059a6.412,6.412,0,0,0-6.353,6.409A13.817,13.817,0,0,0,431.4,503.8a47.5,47.5,0,0,0,9.086,8.752,47.479,47.479,0,0,0,9.09-8.752,13.817,13.817,0,0,0,2.712-7.529A6.413,6.413,0,0,0,445.93,489.861Z'\r\n transform='translate(-412.899 -472.11)'\r\n fill='#cb0038'\r\n />\r\n </g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport default FavoriteLightIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst PhoneIcon = ({ className }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='0 0 30 40'\r\n className={className || 'rf-h-6 rf-w-6'}\r\n >\r\n <g transform='translate(-183.86 -57.462) rotate(-21)'>\r\n <path d='M162.1,156.952a2.852,2.852,0,0,0,2.91-2.915V127.8a2.851,2.851,0,0,0-2.91-2.915H151.91A2.851,2.851,0,0,0,149,127.8v26.233a2.852,2.852,0,0,0,2.91,2.915ZM157,155.738a1.455,1.455,0,1,1,1.455-1.455A1.456,1.456,0,0,1,157,155.738Zm-2.183-29.072c0-.18.086-.322.194-.322h3.978c.106,0,.194.144.194.322v.086c0,.18-.087.322-.194.322h-3.978c-.106,0-.194-.144-.194-.322Zm-4.365,1.861h13.1V151.81h-13.1Zm0,0' />\r\n </g>\r\n </svg>\r\n )\r\n}\r\nexport default PhoneIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst PhotoCameraIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='0 0 67.258 60.532'\r\n className={className || 'rf-w-6 rf-h-6'}\r\n >\r\n <g transform='translate(15.629 13.766)'>\r\n <path\r\n d='M34.722,23.961A10.761,10.761,0,1,1,23.961,13.2,10.761,10.761,0,0,1,34.722,23.961Z'\r\n transform='translate(-5.961 -4.098)'\r\n fill={color || '#f1f1f1'}\r\n />\r\n <path\r\n d='M26.54,3,20.386,9.726H9.726A6.746,6.746,0,0,0,3,16.452V56.806a6.746,6.746,0,0,0,6.726,6.726H63.532a6.746,6.746,0,0,0,6.726-6.726V16.452a6.746,6.746,0,0,0-6.726-6.726H52.872L46.718,3ZM36.629,53.443A16.814,16.814,0,1,1,53.443,36.629,16.821,16.821,0,0,1,36.629,53.443Z'\r\n transform='translate(-18.629 -16.766)'\r\n fill={color || '#f1f1f1'}\r\n />\r\n </g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport default PhotoCameraIcon\r\n","import React, { useState, useEffect, useRef } from 'react'\r\nimport { useList } from '../../Contexts/ListContext'\r\nimport { CommentsPennantIcon } from '../../Icons/DetailedPOIIcons'\r\n\r\ntype ComponentsPennantType = {\r\n className?: string\r\n customerReviews: number\r\n}\r\n\r\nconst CommentsPennant = ({\r\n className,\r\n customerReviews\r\n}: ComponentsPennantType): JSX.Element => {\r\n const { color } = useList()\r\n const [widthInPx, setWidthInPx] = useState<number>(0)\r\n const pennantRef = useRef<HTMLDivElement>(null)\r\n\r\n useEffect(() => {\r\n if (pennantRef.current) {\r\n setWidthInPx(Math.ceil(pennantRef.current.offsetWidth / 2))\r\n }\r\n }, [pennantRef])\r\n\r\n return (\r\n <div\r\n className={`${className} rf-flex rf-flex-col rf-justify-center rf-text-white`}\r\n ref={pennantRef}\r\n >\r\n <div\r\n className='rf-flex rf-flex-col rf-items-center rf-p-1'\r\n style={{ backgroundColor: color }}\r\n >\r\n <CommentsPennantIcon className='rf-w-6 large:rf-w-8 rf-py-2 vertical:rf-py-1' />\r\n <div className='rf-font-bold rf-small-size-auto rf-text-center'>\r\n {customerReviews}/10\r\n </div>\r\n </div>\r\n <div\r\n className='rf-w-0 rf-h-0 rf-border-t-0 rf-border-x-primary rf-border-b-transparent'\r\n style={{\r\n borderLeftColor: color,\r\n borderRightColor: color,\r\n borderBottomWidth: (widthInPx * 2) / 3,\r\n borderLeftWidth: widthInPx,\r\n borderRightWidth: widthInPx\r\n }}\r\n />\r\n </div>\r\n )\r\n}\r\n\r\nexport default CommentsPennant\r\n","import React, {\r\n createContext,\r\n useContext,\r\n ReactNode,\r\n useState,\r\n useMemo,\r\n useEffect\r\n} from 'react'\r\nimport type { RetorikActivity } from '../../models/activityTypes'\r\nimport type { Filter } from '../../models/filterTypes'\r\nimport { hooks } from 'botframework-webchat-component'\r\nimport { getColorFromCategoryId } from '../../utils/getColorFromCategoryId'\r\nimport { useView } from './ViewContext'\r\n\r\nconst { useSendPostBack } = hooks\r\n\r\nexport type ListProviderProps = {\r\n children?: ReactNode\r\n}\r\n\r\nexport type ListContextType = {\r\n content: RetorikActivity | undefined\r\n filters: Filter[]\r\n selectedFilters: Filter[]\r\n color: string\r\n setContent: (x: RetorikActivity | undefined) => void\r\n setSelectedFilters: (x: Filter[]) => void\r\n resetFilters: () => void\r\n processFiltersOnChange: (x: Filter[], y?: boolean) => void\r\n setSuggestedFilter: (x: Filter) => void\r\n}\r\n\r\nconst ListContextDefaultValues: ListContextType = {\r\n content: undefined,\r\n filters: [],\r\n selectedFilters: [],\r\n color: '',\r\n setContent: () => {},\r\n setSelectedFilters: () => {},\r\n resetFilters: () => {},\r\n processFiltersOnChange: () => {},\r\n setSuggestedFilter: () => {}\r\n}\r\n\r\nexport const ListContext = createContext<ListContextType>(\r\n ListContextDefaultValues\r\n)\r\n\r\nexport function useList(): ListContextType {\r\n return useContext(ListContext)\r\n}\r\n\r\nexport function ListProvider({ children }: ListProviderProps): JSX.Element {\r\n const { themeColors } = useView()\r\n const [content, setContent] = useState<RetorikActivity | undefined>()\r\n const [filters, setFilters] = useState<Filter[]>([])\r\n const [selectedFilters, setSelectedFilters] = useState<Filter[]>([])\r\n const color = useMemo(() => {\r\n return getColorFromCategoryId(\r\n content?.channelData?.category?.id,\r\n themeColors\r\n )\r\n }, [content])\r\n const sendPostBack = useSendPostBack()\r\n\r\n const setSuggestedFilter = (filter: Filter): void => {\r\n setSelectedFilters([filter])\r\n }\r\n\r\n /**\r\n * On call :\r\n * - set selectedFilters state to empty array\r\n * - send postBack message with empty filters\r\n */\r\n const resetFilters = (): void => {\r\n setSelectedFilters([])\r\n sendPostBack({ filters: [] })\r\n }\r\n\r\n /**\r\n * On call :\r\n * - set selectedFilters and filters states to empty arrays\r\n */\r\n const totalReset = (): void => {\r\n setSelectedFilters([])\r\n setFilters([])\r\n }\r\n\r\n const processFiltersOnChange = (data: Filter[], full = false): void => {\r\n let tempFilters: Filter[] = []\r\n\r\n if (selectedFilters.length > 0) {\r\n let remainingData = [...data]\r\n // Check on each selected filter to modify if necessary\r\n selectedFilters.forEach((selectedFilter) => {\r\n let items: string[] = [...selectedFilter.items]\r\n data.forEach((filter) => {\r\n if (filter.id === selectedFilter.id) {\r\n // Special treatment for calendar filter : only 1 value allowed\r\n if (filter.id === 'Event.DateRange') {\r\n if (\r\n items.length > 0 &&\r\n filter.items.length > 0 &&\r\n items[0] === filter.items[0]\r\n ) {\r\n items = []\r\n } else {\r\n items = [...filter.items]\r\n }\r\n } else {\r\n // If the chosen filter is a full one and has already at least one item chosen, let's choose all its items\r\n if (full) {\r\n items =\r\n selectedFilter.items.length === filter.items.length\r\n ? []\r\n : [...filter.items]\r\n }\r\n // Else let's deal with the items one by one\r\n else {\r\n items = [...selectedFilter.items, ...filter.items].filter(\r\n (item) =>\r\n !(\r\n selectedFilter.items.includes(item) &&\r\n filter.items.includes(item)\r\n )\r\n )\r\n }\r\n }\r\n\r\n // Let's remove this filter from remainingData because it has been processed\r\n remainingData = remainingData.filter((fil) => fil.id !== filter.id)\r\n }\r\n })\r\n\r\n items.length > 0 &&\r\n (tempFilters = [\r\n ...tempFilters,\r\n { id: selectedFilter.id, title: selectedFilter.title, items: items }\r\n ])\r\n })\r\n\r\n // If some filters weren't in the selected filters, we add them to the selected filters\r\n remainingData.length > 0 &&\r\n (tempFilters = [...tempFilters, ...remainingData])\r\n } else {\r\n data.length > 0 && (tempFilters = data)\r\n }\r\n\r\n setSelectedFilters(tempFilters)\r\n sendPostBack({ filters: tempFilters })\r\n }\r\n\r\n const value = useMemo(\r\n () => ({\r\n content: content,\r\n filters: filters,\r\n selectedFilters: selectedFilters,\r\n color: color,\r\n setContent,\r\n setSelectedFilters,\r\n resetFilters,\r\n processFiltersOnChange,\r\n setSuggestedFilter\r\n }),\r\n [\r\n content,\r\n filters,\r\n selectedFilters,\r\n color,\r\n setContent,\r\n setSelectedFilters,\r\n resetFilters,\r\n processFiltersOnChange,\r\n setSuggestedFilter\r\n ]\r\n )\r\n\r\n /**\r\n * On content state change :\r\n * - if there is no content, reset all filters and selected filters\r\n * - if there is some content, set filters state with the content received or an empty array, and selectedFilters state with received data if there are some\r\n */\r\n useEffect(() => {\r\n if (content) {\r\n if (filters.length === 0 || content.channelData?.filters !== filters) {\r\n setFilters(content.channelData?.filters || [])\r\n }\r\n content.channelData?.selectedFilters &&\r\n setSelectedFilters(content.channelData?.selectedFilters)\r\n } else {\r\n totalReset()\r\n }\r\n }, [content])\r\n\r\n return (\r\n <React.Fragment>\r\n <ListContext.Provider value={value}>{children}</ListContext.Provider>\r\n </React.Fragment>\r\n )\r\n}\r\n","import { CategoryId } from '../models/enums'\r\n\r\nconst getColorFromCategoryId = (\r\n id: string | undefined,\r\n themeColors: any\r\n): string => {\r\n let color = themeColors.secondary\r\n if (id) {\r\n switch (id.toLowerCase()) {\r\n case CategoryId.eat:\r\n color = themeColors.whereToEatColor\r\n break\r\n case CategoryId.sleep:\r\n color = themeColors.whereToSleepColor\r\n break\r\n case CategoryId.see:\r\n color = themeColors.tobeSeenColor\r\n break\r\n case CategoryId.do:\r\n color = themeColors.tobeDoneColor\r\n break\r\n case CategoryId.localproducts:\r\n color = themeColors.localProductsColor\r\n break\r\n case CategoryId.services:\r\n color = themeColors.servicesColor\r\n break\r\n case CategoryId.agenda:\r\n color = themeColors.agendaColor\r\n break\r\n default:\r\n color = themeColors.secondary\r\n break\r\n }\r\n }\r\n\r\n return color\r\n}\r\n\r\nexport { getColorFromCategoryId }\r\n","import React from 'react'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport { hooks } from 'botframework-webchat-component'\r\nimport translation from '../../translations/poi.json'\r\n\r\nconst { useSendPostBack } = hooks\r\n\r\ninterface PaginationAttachmentProps {\r\n body: Array<{\r\n text: string\r\n }>\r\n selectAction: {\r\n data: any\r\n }\r\n}\r\n\r\nconst PaginationAttachment = ({\r\n body,\r\n selectAction\r\n}: PaginationAttachmentProps): JSX.Element => {\r\n const locale = useLocaleStore((state) => state.locale)\r\n const sendPostBack = useSendPostBack()\r\n\r\n const handleClick = (): void => {\r\n selectAction.data && sendPostBack(selectAction.data)\r\n }\r\n\r\n return (\r\n <div className='rf-w-full rf-rounded' onClick={handleClick}>\r\n <div className='rf-relative rf-w-full rf-flex rf-items-center rf-justify-center rf-bg-truewhite rf-rounded rf-aspect-video rf-underline rf-cursor-pointer'>\r\n {translation[locale]?.[body[0].text.toLowerCase()] ||\r\n translation['fr-FR'][body[0].text.toLowerCase()]}\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default PaginationAttachment\r\n","{\r\n \"fr-FR\": {\r\n \"comment\": \"avis clients\",\r\n \"route\": \"itinéraire\",\r\n \"nodata\": \"Aucun contenu ne correspond à votre recherche\",\r\n \"précédent\": \"Page précédente\",\r\n \"suivant\": \"Voir la suite\",\r\n \"download\": \"Télécharger cette fiche\",\r\n \"scanQR\": \"en scannant le QrCode\"\r\n },\r\n \"en-US\": {\r\n \"comment\": \"customer review\",\r\n \"route\": \"route\",\r\n \"nodata\": \"No content corresponds to your search\",\r\n \"précédent\": \"Previous page\",\r\n \"suivant\": \"Next page\",\r\n \"download\": \"Download this sheet\",\r\n \"scanQR\": \"by scanning the QrCode\"\r\n },\r\n \"es-ES\": {\r\n \"comment\": \"customer review\",\r\n \"route\": \"route\",\r\n \"nodata\": \"No content corresponds to your search\",\r\n \"précédent\": \"Previous page\",\r\n \"suivant\": \"Next page\",\r\n \"download\": \"Download this sheet\",\r\n \"scanQR\": \"by scanning the QrCode\"\r\n },\r\n \"de-DE\": {\r\n \"comment\": \"customer review\",\r\n \"route\": \"route\",\r\n \"nodata\": \"No content corresponds to your search\",\r\n \"précédent\": \"Previous page\",\r\n \"suivant\": \"Next page\",\r\n \"download\": \"Download this sheet\",\r\n \"scanQR\": \"by scanning the QrCode\"\r\n }\r\n}\r\n","import React from 'react'\r\n\r\nconst EmptyAttachment = (): JSX.Element => {\r\n return (\r\n <div className='rf-w-full rf-h-full rf-flex rf-flex-col rf-gap-2 rf-rounded'>\r\n <div className='rf-relative rf-w-full rf-bg-templateEmptyCard rf-rounded rf-aspect-video' />\r\n </div>\r\n )\r\n}\r\n\r\nexport default EmptyAttachment\r\n","import React, { useEffect, useState } from 'react'\r\nimport DisplayFullScreenButton from '../AnswerPanel/DisplayFullScreenButton'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport { DeviceType } from '../../models/enums'\r\n\r\ninterface ImageAttachmentProps {\r\n url: string\r\n title?: string\r\n alt?: string\r\n isMiniature?: boolean\r\n height?: number\r\n}\r\n\r\nconst ImageAttachment = ({\r\n url,\r\n title,\r\n alt,\r\n isMiniature,\r\n height\r\n}: ImageAttachmentProps): JSX.Element => {\r\n const { displaySubtitles } = useRetorik()\r\n const { currentHeight, currentDeviceType } = useView()\r\n const [maxHeight, setMaxHeight] = useState<number>(0)\r\n\r\n useEffect(() => {\r\n if (currentHeight && currentDeviceType) {\r\n switch (currentDeviceType) {\r\n case DeviceType.mobile:\r\n case DeviceType.widget:\r\n setMaxHeight(\r\n Math.floor(currentHeight * (displaySubtitles ? 0.34 : 0.5))\r\n )\r\n break\r\n case DeviceType.landscape:\r\n setMaxHeight(Math.floor(currentHeight * 0.67))\r\n break\r\n case DeviceType.borne:\r\n setMaxHeight(Math.floor(currentHeight * 0.34))\r\n break\r\n default:\r\n break\r\n }\r\n }\r\n }, [currentHeight, currentDeviceType, displaySubtitles])\r\n\r\n return (\r\n <div\r\n className='rf-w-full rf-p-4 rf-flex rf-flex-row rf-items-center rf-justify-center rf-rounded rf-bg-cardFrameBackground rf-touch-none'\r\n style={{\r\n height: height\r\n }}\r\n >\r\n <DisplayFullScreenButton url={url} />\r\n {isMiniature ? (\r\n <React.Fragment>\r\n <div className='rf-w-1/4' />\r\n <img\r\n className='rf-max-w-1/2'\r\n src={url}\r\n alt={alt || 'image'}\r\n style={{\r\n maxHeight: `calc(${maxHeight}px - 3rem)`\r\n }}\r\n />\r\n <div className='rf-w-1/4' />\r\n </React.Fragment>\r\n ) : (\r\n <img\r\n className='rf-max-w-full'\r\n src={url}\r\n alt={alt || 'image'}\r\n style={{\r\n maxHeight: `calc(${maxHeight}px - 3rem)`\r\n }}\r\n />\r\n )}\r\n {title && (\r\n <div className='rf-absolute rf-bottom-0 rf-py-2 rf-text-center rf-text-sm large:rf-text-base rf-text-cardFrameText rf-bg-cardFrameBackground rf-bg-opacity-80 rf-rounded-b rf-w-full'>\r\n {title}\r\n </div>\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default ImageAttachment\r\n","import React from 'react'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport { ZoomOutIcon } from '../Icons/Miscellaneous'\r\nimport { setFullScreenImage } from '../Contexts/utilsStore'\r\n\r\ninterface DisplayFullScreenButtonProps {\r\n url: string\r\n}\r\n\r\nconst DisplayFullScreenButton = ({\r\n url\r\n}: DisplayFullScreenButtonProps): JSX.Element => {\r\n const { themeColors } = useView()\r\n\r\n const handleClick = (): void => {\r\n setFullScreenImage(url)\r\n }\r\n\r\n return (\r\n <div\r\n className='rf-absolute rf-right-2 rf-top-2 rf-p-2 rf-border rf-rounded-lg rf-bg-cardFrameBackground rf-bg-opacity-30 rf-border-cardButtonBorderDefault hover:rf-cursor-pointer'\r\n onClick={handleClick}\r\n >\r\n <ZoomOutIcon\r\n className='rf-h-4 rf-w-4 large:rf-h-6 large:rf-w-6'\r\n color={themeColors.card.button.text.default}\r\n />\r\n </div>\r\n )\r\n}\r\n\r\nexport default DisplayFullScreenButton\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React, { useEffect, useState } from 'react'\r\nimport type { UrlData } from '../../models/linkAttachment'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport translation from '../../translations/linkattachment.json'\r\nimport { capitalizeFirstLetter } from '../../utils/capitalizeFirstLetter'\r\nimport { checkFileNameInUrl } from '../../utils/checkFileNameInUrl'\r\nimport ClassicButton from './Utils/ClassicButton'\r\nimport BorderlessButton from './Utils/BorderlessButton'\r\nimport { InfoWithCircleIcon } from '../Icons/Miscellaneous'\r\nimport QRCode from 'qrcode'\r\n\r\ninterface LinkAttachmentProps {\r\n urlData: UrlData\r\n fileName?: string\r\n qrCode?: string\r\n description?: string\r\n height?: number\r\n}\r\n\r\nconst LinkAttachment = ({\r\n urlData,\r\n fileName,\r\n qrCode,\r\n description,\r\n height\r\n}: LinkAttachmentProps): JSX.Element => {\r\n const { configuration } = useRetorik()\r\n const { locale } = useLocaleStore()\r\n !fileName && (fileName = checkFileNameInUrl(urlData.url))\r\n const title = urlData.title || fileName\r\n const [qrCodeData, setQrCodeData] = useState<string | undefined>(qrCode)\r\n\r\n /**\r\n * On call :\r\n * - get text to display depending on configuration, urlData and locale\r\n * @returns string\r\n */\r\n const getTextTodisplay = (): string => {\r\n let textToDisplay = ''\r\n const downloadText =\r\n translation[locale]?.download || translation['fr-FR'].download\r\n const gotoText = translation[locale]?.goto || translation['fr-FR'].goto\r\n const clickText = translation[locale]?.click || translation['fr-FR'].click\r\n const scanQRText =\r\n translation[locale]?.scanQR || translation['fr-FR'].scanQR\r\n\r\n if (configuration.isUsedOnBorne) {\r\n if (urlData.download) {\r\n if (urlData.title) {\r\n textToDisplay = `${downloadText} \\u00ab ${fileName} \\u00bb`\r\n } else {\r\n textToDisplay = downloadText\r\n }\r\n } else {\r\n textToDisplay = gotoText\r\n }\r\n\r\n textToDisplay += ` ${scanQRText}`\r\n } else {\r\n if (urlData.download) {\r\n if (urlData.title) {\r\n textToDisplay = `${downloadText} ${fileName}`\r\n } else {\r\n textToDisplay = downloadText\r\n }\r\n } else {\r\n textToDisplay = clickText\r\n }\r\n }\r\n\r\n return textToDisplay\r\n }\r\n\r\n /**\r\n * On component creation :\r\n * - call setQrCodeDataAsync only if used on a borne\r\n */\r\n useEffect(() => {\r\n !qrCode && configuration.isUsedOnBorne && setQrCodeDataAsync()\r\n }, [])\r\n\r\n /**\r\n * On call :\r\n * - generate a qrcode as dataURL\r\n * - set qrCodeData state with the data\r\n */\r\n const setQrCodeDataAsync = async (): Promise<void> => {\r\n const qrCodeString = await QRCode.toDataURL(urlData.url)\r\n setQrCodeData(qrCodeString)\r\n }\r\n\r\n return (\r\n <div\r\n className={`rf-w-full rf-p-[25px] rf-flex rf-flex-col rf-items-center ${\r\n title || description ? 'rf-justify-between' : 'rf-justify-around'\r\n } rf-rounded rf-bg-cardFrameBackground rf-text-cardFrameText rf-overflow-y-scroll rf-scrollbar-thin rf-touch-none`}\r\n style={{\r\n height: height\r\n }}\r\n >\r\n {title && (\r\n // Title on the left if there is a description, middle otherwise\r\n <div\r\n className={`rf-w-full rf-mb-4 ${\r\n description ? 'rf-text-left' : 'rf-text-center'\r\n } rf-title-size-auto ${\r\n configuration.isUsedOnBorne ? 'rf-truncate' : 'rf-line-clamp-2'\r\n }`}\r\n >\r\n {capitalizeFirstLetter(title)}\r\n </div>\r\n )}\r\n {configuration.isUsedOnBorne ? (\r\n <React.Fragment>\r\n <div className='rf-w-full rf-mb-4 rf-flex rf-flex-row rf-items-center rf-justify-center'>\r\n {description && <div className='rf-mb-4'>{description}</div>}\r\n {qrCodeData && (\r\n <img className='rf-h-full' src={qrCodeData} alt='QR Code' />\r\n )}\r\n </div>\r\n <div className='rf-relative rf-text-center rf-mx-8 rf-italic'>\r\n <InfoWithCircleIcon className='rf-absolute rf-top-[0.125rem] -rf-left-6 rf-h-4' />\r\n {getTextTodisplay()}\r\n </div>\r\n </React.Fragment>\r\n ) : (\r\n <React.Fragment>\r\n {description && <div className='rf-mb-4'>{description}</div>}\r\n {urlData.download &&\r\n urlData.title &&\r\n getTextTodisplay().length >= 40 ? (\r\n <BorderlessButton\r\n url={urlData.url}\r\n text={getTextTodisplay()}\r\n download={true}\r\n />\r\n ) : (\r\n <ClassicButton\r\n url={urlData.url}\r\n text={getTextTodisplay()}\r\n description={!!description}\r\n download={!!urlData.download}\r\n />\r\n )}\r\n </React.Fragment>\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default LinkAttachment\r\n","{\r\n \"fr-FR\": {\r\n \"download\": \"Télécharger\",\r\n \"goto\": \"Accéder à l'adresse\",\r\n \"click\": \"Cliquez-ici\",\r\n \"scanQR\": \"en scannant le QrCode\"\r\n },\r\n \"en-US\": {\r\n \"download\": \"Download\",\r\n \"goto\": \"Go to address\",\r\n \"click\": \"Click here\",\r\n \"scanQR\": \"by scanning the QrCode\"\r\n },\r\n \"es-ES\": {\r\n \"download\": \"Download\",\r\n \"goto\": \"Go to address\",\r\n \"click\": \"Click here\",\r\n \"scanQR\": \"by scanning the QrCode\"\r\n },\r\n \"de-DE\": {\r\n \"download\": \"Download\",\r\n \"goto\": \"Go to address\",\r\n \"click\": \"Click here\",\r\n \"scanQR\": \"by scanning the QrCode\"\r\n }\r\n}\r\n","const capitalizeFirstLetter = (text: string, locale = 'fr-FR'): string => {\r\n if (text && text.length > 0) {\r\n const first = text.charAt(0)\r\n const rest = text.slice(1)\r\n return first.toLocaleUpperCase(locale) + rest\r\n }\r\n\r\n return ''\r\n}\r\n\r\nexport { capitalizeFirstLetter }\r\n","const checkFileNameInUrl = (url: string): string | undefined => {\r\n const [lastPart] = url.split('/').slice(-1)\r\n if (lastPart && lastPart.length > 4 && lastPart.includes('.')) {\r\n return lastPart\r\n }\r\n\r\n return undefined\r\n}\r\n\r\nexport { checkFileNameInUrl }\r\n","import React from 'react'\r\nimport { ArrowRightIcon } from '../../Icons/ArrowIcons'\r\nimport { DownloadIcon } from '../../Icons/Miscellaneous'\r\n\r\ninterface ClassicButtonProps {\r\n url: string\r\n text?: string\r\n description?: boolean\r\n download?: boolean\r\n}\r\n\r\nconst ClassicButton = ({\r\n url,\r\n text,\r\n description,\r\n download\r\n}: ClassicButtonProps): JSX.Element => {\r\n return (\r\n <div\r\n className={`rf-w-full rf-flex ${\r\n description ? 'rf-justify-start' : 'rf-justify-center'\r\n }`}\r\n >\r\n <a\r\n href={url}\r\n target='_blank'\r\n rel='noopener noreferrer'\r\n className='rf-card-button rf-flex rf-flex-row rf-items-center'\r\n >\r\n <div className='rf-h-6 rf-w-6'>\r\n {download ? <DownloadIcon /> : <ArrowRightIcon />}\r\n </div>\r\n <div className='rf-ml-2 rf-truncate'>{text || ''}</div>\r\n </a>\r\n </div>\r\n )\r\n}\r\n\r\nexport default ClassicButton\r\n","import ArrowDownIcon from './ArrowDownIcon'\r\nimport ArrowIcon from './ArrowIcon'\r\nimport ArrowLeftIcon from './ArrowLeftIcon'\r\nimport ArrowRightIcon from './ArrowRightIcon'\r\nimport ArrowUpIcon from './ArrowUpIcon'\r\n\r\nexport { ArrowDownIcon, ArrowIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon }\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst ArrowDownIcon = ({ className, color }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='0 0 28 16.01'\r\n fill={color || 'currentColor'}\r\n className={className || 'rf-h-6 rf-w-6'}\r\n >\r\n <path d='M14 11.18 24.6.58a2 2 0 0 1 2.82 0 2.02 2.02 0 0 1 0 2.84l-12 12a2 2 0 0 1-2.76.05L.58 3.44A2 2 0 0 1 3.41.6Z' />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default ArrowDownIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst ArrowIcon = ({ className, color }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='0 0 43.776 39.197'\r\n className={className || 'rf-h-6 rf-w-8'}\r\n >\r\n <g transform='translate(9.939 -0.321) rotate(17)'>\r\n <path\r\n d='M28.156,0S31.392,28.156,0,28.156'\r\n transform='translate(5.721 0)'\r\n fill='none'\r\n stroke={color || '#1999b1'}\r\n strokeLinecap='round'\r\n strokeWidth='2'\r\n />\r\n <path\r\n d='M0,0,8.8,8.8l8.8-8.8'\r\n transform='translate(8.688 18.779) rotate(81)'\r\n fill='none'\r\n stroke={color || '#1999b1'}\r\n strokeLinecap='round'\r\n strokeWidth='2'\r\n />\r\n </g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport default ArrowIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst ArrowLeftIcon = ({ className, color }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n className={className || 'rf-h-6 rf-w-6'}\r\n fill='none'\r\n viewBox='0 0 24 24'\r\n stroke={color || 'currentColor'}\r\n strokeWidth={2}\r\n >\r\n <path\r\n strokeLinecap='round'\r\n strokeLinejoin='round'\r\n d='M11 17l-5-5m0 0l5-5m-5 5h12'\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default ArrowLeftIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst ArrowRightIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n className={className || 'rf-h-6 rf-w-6'}\r\n fill='none'\r\n viewBox='0 0 24 24'\r\n stroke={color || 'currentColor'}\r\n strokeWidth={2}\r\n >\r\n <path\r\n strokeLinecap='round'\r\n strokeLinejoin='round'\r\n d='M13 7l5 5m0 0l-5 5m5-5H6'\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default ArrowRightIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst ArrowUpIcon = ({ className, color }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='0 0 28 16.01'\r\n fill={color || 'currentColor'}\r\n className={className || 'rf-h-6 rf-w-6'}\r\n >\r\n <path d='M14 4.83 3.4 15.43a2 2 0 0 1-2.82 0 2.02 2.02 0 0 1 0-2.84l12-12a2 2 0 0 1 2.76-.06l12.08 12.05a2 2 0 0 1-2.83 2.83Z' />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default ArrowUpIcon\r\n","import React, { useState } from 'react'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport { ArrowRightIcon } from '../../Icons/ArrowIcons'\r\nimport { DownloadIcon } from '../../Icons/Miscellaneous'\r\n\r\ninterface BorderlessButtonProps {\r\n url: string\r\n text?: string\r\n download?: boolean\r\n}\r\n\r\nconst BorderlessButton = ({\r\n url,\r\n text,\r\n download\r\n}: BorderlessButtonProps): JSX.Element => {\r\n const { themeColors } = useView()\r\n const [hover, setHover] = useState<boolean>(false)\r\n\r\n return (\r\n <div className='rf-w-full rf-flex rf-justify-start'>\r\n <a\r\n href={url}\r\n target='_blank'\r\n rel='noopener noreferrer'\r\n className='rf-w-full rf-flex rf-flex-row rf-items-center rf-justify-start rf-text-cardButtonTextDefault'\r\n onPointerEnter={(): void => setHover(true)}\r\n onPointerLeave={(): void => setHover(false)}\r\n onClick={(): void => setHover(true)}\r\n >\r\n <div\r\n className={`rf-h-6 rf-w-6 rf-rounded ${\r\n hover\r\n ? 'rf-bg-cardButtonBackgroundHover'\r\n : 'rf-bg-cardButtonBackgroundDefault'\r\n }`}\r\n >\r\n {download ? (\r\n <DownloadIcon\r\n className='rf-h-6 rf-p-1 rf-border rf-rounded rf-border-cardButtonBorderDefault'\r\n color={\r\n hover\r\n ? themeColors.card.button.text.hover\r\n : themeColors.card.button.text.default\r\n }\r\n />\r\n ) : (\r\n <ArrowRightIcon\r\n className='rf-h-6 rf-p-1 rf-border rf-rounded rf-border-cardButtonBorderDefault'\r\n color={\r\n hover\r\n ? themeColors.card.button.text.hover\r\n : themeColors.card.button.text.default\r\n }\r\n />\r\n )}\r\n </div>\r\n <div className='rf-ml-4'>{text || ''}</div>\r\n </a>\r\n </div>\r\n )\r\n}\r\n\r\nexport default BorderlessButton\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React from 'react'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport type { UrlData } from '../../models/linkAttachment'\r\nimport { capitalizeFirstLetter } from '../../utils/capitalizeFirstLetter'\r\nimport { checkFileNameInUrl } from '../../utils/checkFileNameInUrl'\r\nimport BorderlessButton from './Utils/BorderlessButton'\r\n\r\ninterface MultiLinkAttachmentProps {\r\n urlData: Array<UrlData>\r\n title?: string\r\n description?: string\r\n height?: number\r\n}\r\n\r\nconst MultiLinkAttachment = ({\r\n urlData,\r\n title,\r\n description,\r\n height\r\n}: MultiLinkAttachmentProps): JSX.Element => {\r\n const { configuration } = useRetorik()\r\n\r\n return (\r\n <div\r\n className={`rf-w-full rf-p-[25px] rf-flex rf-flex-col rf-items-center rf-gap-2 ${\r\n title || description ? 'rf-justify-between' : 'rf-justify-around'\r\n } rf-min-h-inherit rf-rounded rf-bg-cardFrameBackground rf-text-cardFrameText rf-overflow-y-scroll rf-scrollbar-thin rf-touch-none`}\r\n style={{\r\n height: height\r\n }}\r\n >\r\n {/* Title if present */}\r\n {title && (\r\n // Title on the left if there is a description, middle otherwise\r\n <div\r\n className={`rf-w-full rf-mb-4 ${\r\n description ? 'rf-text-left' : 'rf-text-center'\r\n } rf-title-size-auto ${\r\n configuration.isUsedOnBorne ? 'rf-truncate' : 'rf-line-clamp-2'\r\n }`}\r\n >\r\n {capitalizeFirstLetter(title)}\r\n </div>\r\n )}\r\n\r\n {/* Description if present */}\r\n {description && <div className='rf-mb-4'>{description}</div>}\r\n\r\n {/* Links */}\r\n {urlData.map((data, key) => {\r\n return (\r\n <BorderlessButton\r\n key={key}\r\n url={data.url}\r\n text={data.title || checkFileNameInUrl(data.url) || data.url}\r\n download={!!data.download}\r\n />\r\n )\r\n })}\r\n </div>\r\n )\r\n}\r\n\r\nexport default MultiLinkAttachment\r\n","import React from 'react'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport { hooks } from 'botframework-webchat-component'\r\nimport { capitalizeFirstLetter } from '../../utils/capitalizeFirstLetter'\r\nimport type { Action } from '../../models/suggestedActionAttachment'\r\n\r\nconst { useSendMessage } = hooks\r\n\r\ninterface SuggestedActionAttachmentProps {\r\n title: string\r\n actions: Array<Action>\r\n history: boolean\r\n height?: number\r\n}\r\n\r\nconst SuggestedActionAttachment = ({\r\n title,\r\n actions,\r\n history,\r\n height\r\n}: SuggestedActionAttachmentProps): JSX.Element => {\r\n const { locale } = useLocaleStore()\r\n const sendMessage = useSendMessage()\r\n\r\n /**\r\n * On call :\r\n * - use botframework's useSendMessage hook to send a message containing the value\r\n * @param value : string\r\n */\r\n const handleClick = (value): void => {\r\n sendMessage(value)\r\n }\r\n\r\n return (\r\n <div\r\n className='rf-w-full rf-p-4 rf-flex rf-flex-col rf-items-center rf-justify-center rf-rounded rf-bg-cardFrameBackground'\r\n style={{\r\n height: height\r\n }}\r\n >\r\n {/* Title */}\r\n <div className='rf-w-full rf-pb-4 rf-text-center rf-text-cardFrameText rf-subtitle-size-auto'>\r\n {capitalizeFirstLetter(title, locale)}\r\n </div>\r\n <div className='rf-w-full rf-pt-4 rf-flex rf-flex-row rf-justify-center rf-items-center rf-gap-4 rf-flex-wrap'>\r\n {actions.map((action, key) => {\r\n return (\r\n <button\r\n key={key}\r\n className='rf-card-button'\r\n onClick={\r\n history\r\n ? (): void => {}\r\n : (): void => handleClick(action.action)\r\n }\r\n >\r\n {action.title || '?'}\r\n </button>\r\n )\r\n })}\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default SuggestedActionAttachment\r\n","import React from 'react'\r\nimport { hooks } from 'botframework-webchat-component'\r\nimport type { DiscoverContentType } from '../../models/attachmentTypes'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport { capitalizeFirstLetter } from '../../utils/capitalizeFirstLetter'\r\nimport { useView } from '../Contexts/ViewContext'\r\n\r\nconst { useSendPostBack } = hooks\r\n\r\nconst DiscoverAttachment = ({\r\n title,\r\n mainButtons,\r\n recommandationButton,\r\n history,\r\n height\r\n}: DiscoverContentType): JSX.Element => {\r\n const sendPostBack = useSendPostBack()\r\n const { locale } = useLocaleStore()\r\n const { isMobile } = useView()\r\n const handleClick = (event: string): void => {\r\n // tap && sendPostBack(tap)\r\n sendPostBack({ name: event, type: 'event' })\r\n }\r\n\r\n return (\r\n <div\r\n className={`rf-w-full rf-flex rf-flex-col rf-items-center rf-justify-between rf-rounded rf-bg-cardFrameBackground large:rf-p-[25px] rf-p-4 ${\r\n history && 'rf-pointer-events-none'\r\n } `}\r\n style={{\r\n height: height\r\n }}\r\n >\r\n <div className='rf-min-h-inherit rf-rounded rf-bg-cardFrameBackground rf-text-cardFrameText rf-self-start rf-title-size-auto rf-mb-2'>\r\n {capitalizeFirstLetter(title, locale)}\r\n </div>\r\n\r\n <div className='rf-w-full rf-h-full rf-flex rf-flex-row rf-justify-evenly rf-items-center rf-gap-2 large:rf-gap-4'>\r\n {mainButtons && mainButtons.length > 0 ? (\r\n mainButtons.map((button, i) => {\r\n return (\r\n <div\r\n key={i}\r\n className='rf-relative rf-card-button-discover rf-rounded rf-flex rf-flex-col rf-gap-2 large:rf-gap-4 rf-items-center'\r\n onClick={(): any => handleClick(button.EventName)}\r\n style={{\r\n flex: isMobile ? '0 1 6rem' : '0 1 8rem',\r\n boxShadow: '0px 0px 13px #0000009c'\r\n }}\r\n >\r\n <img\r\n src={button.MediaUrl}\r\n alt={button.Text}\r\n style={{ height: '50px' }}\r\n />\r\n <p className='rf-text-center rf-uppercase rf-font-bold large:rf-text-base rf-text-xsl rf-whitespace-nowrap'>\r\n {button.Text}\r\n </p>\r\n </div>\r\n )\r\n })\r\n ) : (\r\n <></>\r\n )}\r\n </div>\r\n\r\n {/* Subtitle 2 lines max / title 2 lines max */}\r\n {recommandationButton && (\r\n <p\r\n className='large:rf-mt-4 rf-font-bold rf-card-button rf-text-center rf-capitalize-first'\r\n onClick={(): any => handleClick(recommandationButton.eventName)}\r\n >\r\n {recommandationButton.text}\r\n </p>\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default DiscoverAttachment\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React from 'react'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { capitalizeFirstLetter } from '../../utils/capitalizeFirstLetter'\r\nimport BorderlessButtonMessage from './Utils/BorderlessButtonMessage'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport translation from '../../translations/suggestion.json'\r\nimport { InfoWithCircleIcon } from '../Icons/Miscellaneous'\r\nimport { useView } from '../Contexts/ViewContext'\r\n\r\ninterface SuggestionAttachmentProps {\r\n suggestions:\r\n | Array<string>\r\n | Array<{\r\n text: string\r\n differentTextTosend?: string\r\n }>\r\n title?: string\r\n description?: string\r\n height?: number\r\n history?: boolean\r\n showTutorial: boolean\r\n}\r\n\r\nconst SuggestionAttachment = ({\r\n suggestions,\r\n title,\r\n description,\r\n height,\r\n history,\r\n showTutorial\r\n}: SuggestionAttachmentProps): JSX.Element => {\r\n const { configuration } = useRetorik()\r\n const { locale } = useLocaleStore()\r\n const { themeColors } = useView()\r\n\r\n const onTutorialClick = (): void => {\r\n // TODO\r\n console.log('show tutorial')\r\n }\r\n\r\n return (\r\n <div\r\n className={`rf-w-full large:rf-p-[25px] rf-p-4 rf-flex rf-flex-col rf-items-center rf-gap-2 ${\r\n title || description ? 'rf-justify-between' : 'rf-justify-around'\r\n } rf-min-h-inherit rf-rounded rf-bg-cardFrameBackground rf-text-cardFrameText rf-overflow-y-scroll rf-scrollbar-thin rf-touch-none ${\r\n history && 'rf-pointer-events-none'\r\n } `}\r\n style={{\r\n height: height\r\n }}\r\n >\r\n {/* Title if present */}\r\n {title && (\r\n // Title on the left if there is a description, middle otherwise\r\n <div\r\n className={`rf-w-full ${\r\n description ? 'rf-text-left' : 'rf-text-center'\r\n } rf-title-size-auto ${\r\n configuration.isUsedOnBorne ? 'rf-truncate' : 'rf-line-clamp-2'\r\n }`}\r\n >\r\n {capitalizeFirstLetter(title)}\r\n </div>\r\n )}\r\n\r\n {/* Description if present */}\r\n {description && (\r\n <div className='rf-text-left rf-w-full'>{description}</div>\r\n )}\r\n\r\n {/* Links */}\r\n {suggestions?.map((data, key) => {\r\n const text = typeof data === 'string' ? data : data.text\r\n const differentTextTosend =\r\n typeof data === 'string'\r\n ? undefined\r\n : data.differentTextToSend || data.text\r\n\r\n return (\r\n <React.Fragment key={key}>\r\n <BorderlessButtonMessage\r\n text={text}\r\n differentTextTosend={differentTextTosend}\r\n />\r\n </React.Fragment>\r\n )\r\n })}\r\n {showTutorial && (\r\n <div className='rf-text-left rf-w-full rf-flex rf-items-end rf-italic'>\r\n <InfoWithCircleIcon\r\n className='rf-pr-2 rf-h-6'\r\n color={themeColors.card.button.text.default}\r\n />\r\n {translation[locale]?.needhelp || translation['fr-FR'].needhelp}{' '}\r\n {translation[locale]?.consult || translation['fr-FR'].consult}\r\n <span\r\n className='rf-pl-1 rf-underline rf-cursor-pointer'\r\n onClick={onTutorialClick}\r\n >\r\n {translation[locale]?.thetutorial ||\r\n translation['fr-FR'].thetutorial}\r\n </span>\r\n </div>\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default SuggestionAttachment\r\n","import React, { useState } from 'react'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport { ArrowRightIcon } from '../../Icons/ArrowIcons'\r\nimport { hooks } from 'botframework-webchat-component'\r\n\r\nconst { useSendPostBack } = hooks\r\n\r\ninterface BorderlessButtonMessageProps {\r\n text: string\r\n differentTextTosend?: string\r\n}\r\n\r\nconst BorderlessButtonMessage = ({\r\n text,\r\n differentTextTosend\r\n}: BorderlessButtonMessageProps): JSX.Element => {\r\n const { themeColors } = useView()\r\n const [hover, setHover] = useState<boolean>(false)\r\n const sendPostBack = useSendPostBack()\r\n\r\n const onClick = (text: string): void => {\r\n sendPostBack(text)\r\n }\r\n return (\r\n <div className='rf-w-full rf-flex rf-justify-start rf-cursor-pointer'>\r\n <div\r\n className='rf-w-full rf-flex rf-flex-row rf-items-center rf-justify-start rf-text-cardButtonTextDefault'\r\n onPointerEnter={(): void => setHover(true)}\r\n onPointerLeave={(): void => setHover(false)}\r\n onClick={(): void => {\r\n setHover(true)\r\n onClick(differentTextTosend || text)\r\n }}\r\n >\r\n <div\r\n className={`rf-h-6 rf-w-6 rf-rounded ${\r\n hover\r\n ? 'rf-bg-cardButtonBackgroundHover'\r\n : 'rf-bg-cardButtonBackgroundDefault'\r\n }`}\r\n >\r\n <ArrowRightIcon\r\n className='rf-h-6 rf-p-1 rf-border rf-rounded rf-border-cardButtonBorderDefault'\r\n color={\r\n hover\r\n ? themeColors.card.button.text.hover\r\n : themeColors.card.button.text.default\r\n }\r\n />\r\n </div>\r\n <div className='rf-ml-4'>{text || ''}</div>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default BorderlessButtonMessage\r\n","{\r\n \"fr-FR\": {\r\n \"needhelp\": \"Besoin d'aide ?\",\r\n \"consult\": \"Consultez\",\r\n \"thetutorial\": \"le tutoriel\"\r\n },\r\n \"en-US\": {\r\n \"needhelp\": \"Need help ?\",\r\n \"consult\": \"Check out\",\r\n \"thetutorial\": \"the tutorial\"\r\n },\r\n \"es-ES\": {\r\n \"needhelp\": \"Necesitar ayuda ?\",\r\n \"consult\": \"Mira\",\r\n \"thetutorial\": \"el tutorial\"\r\n },\r\n \"de-DE\": {\r\n \"needhelp\": \"Brauche Hilfe ?\",\r\n \"consult\": \"Schauen Sie sich\",\r\n \"thetutorial\": \"das Tutorial an\"\r\n }\r\n}\r\n","const activityMiddleware =\r\n () =>\r\n (next) =>\r\n (...args): JSX.Element | any => {\r\n const [{ activity }] = args\r\n if (\r\n activity &&\r\n activity.type === 'message' &&\r\n activity.attachments &&\r\n activity.attachments.length > 0 &&\r\n activity.attachments[0].contentType ===\r\n 'application/vnd.davi.retorik.card.suggestedaction' &&\r\n activity.attachments[0].content?.title?.indexOf(activity.text) > -1\r\n ) {\r\n // Hack for Suggested Action : Only show text in card, not in message\r\n activity.text = ''\r\n activity.htmlText = ''\r\n }\r\n return next(...args)\r\n }\r\n\r\nexport default activityMiddleware\r\n","import * as AC from 'adaptivecards'\r\nimport { initializeIcons } from '@fluentui/react'\r\nimport { TextBlockClass } from './Classes/TextBlockClass'\r\nimport { ToggleInputClass } from './Classes/ToggleInputClass'\r\nimport { DateInputClass } from './Classes/DateInputClass'\r\nimport { TimeInputClass } from './Classes/TimeInputClass'\r\nimport { ChoiceSetClass } from './Classes/ChoiceSetClass'\r\nimport { LikertClass } from './Classes/LikertClass'\r\nimport { ImageChoiceSetClass } from './Classes/ImageChoiceSetClass'\r\nimport { SliderClass } from './Classes/SliderClass'\r\n\r\nimport { ActionSubmitClass } from './Classes/ActionSubmitClass'\r\nimport { ActionOpenUrlClass } from './Classes/ActionOpenUrlClass'\r\nimport { ActionShowCardClass } from './Classes/ActionShowCardClass'\r\nimport { ActionToggleVisibilityClass } from './Classes/ActionToggleVisibilityClass'\r\n\r\nlet iconsInitialized = false\r\n\r\n/**\r\n * STORYBOOK : elements that have no decorator and thus don't have to be commented to build storybook :\r\n * - TextBlock\r\n * - Input.Toggle\r\n * Every other element has to be commented otherwise storybook build will fail\r\n */\r\n\r\nconst useRetorikUI = (): void => {\r\n if (!iconsInitialized) {\r\n initializeIcons()\r\n iconsInitialized = true\r\n }\r\n\r\n // Override existing elements\r\n AC.GlobalRegistry.elements.register('TextBlock', TextBlockClass)\r\n AC.GlobalRegistry.elements.register('Input.Toggle', ToggleInputClass)\r\n AC.GlobalRegistry.elements.register('Input.Date', DateInputClass)\r\n AC.GlobalRegistry.elements.register('Input.Time', TimeInputClass)\r\n AC.GlobalRegistry.elements.register('Input.ChoiceSet', ChoiceSetClass)\r\n\r\n // Register new elements\r\n AC.GlobalRegistry.elements.register(\r\n 'Retorik.ImageChoiceSet',\r\n ImageChoiceSetClass\r\n )\r\n AC.GlobalRegistry.elements.register('Retorik.Likert', LikertClass)\r\n AC.GlobalRegistry.elements.register('Retorik.Slider', SliderClass)\r\n\r\n // Override existing actions\r\n AC.GlobalRegistry.actions.register('Action.Submit', ActionSubmitClass)\r\n AC.GlobalRegistry.actions.register('Action.OpenUrl', ActionOpenUrlClass)\r\n AC.GlobalRegistry.actions.register('Action.ShowCard', ActionShowCardClass)\r\n AC.GlobalRegistry.actions.register(\r\n 'Action.ToggleVisibility',\r\n ActionToggleVisibilityClass\r\n )\r\n}\r\n\r\nexport { useRetorikUI }\r\n","import React from 'react'\r\nimport { jsxToHtmlElement } from '../../../utils/jsxToHtmlElement'\r\nimport { TextBlock } from 'adaptivecards/lib/card-elements'\r\nimport CustomTextBlock from '../TextBlock'\r\nimport { TextSize } from 'adaptivecards'\r\n\r\nexport class TextBlockClass extends TextBlock {\r\n protected internalRender(): HTMLElement {\r\n const element = jsxToHtmlElement(this.renderReact())\r\n return element\r\n }\r\n\r\n protected renderReact = (): JSX.Element => {\r\n let isTitle = false\r\n let isSubtitle = false\r\n if (this.size && this.size === TextSize.Large) {\r\n isTitle = true\r\n } else if (this.size && this.size === TextSize.Medium) {\r\n isSubtitle = true\r\n }\r\n\r\n const props = {\r\n text: this.text,\r\n isTitle: isTitle,\r\n isSubtitle: isSubtitle,\r\n size: this.size,\r\n horizontalAlignment: this.horizontalAlignment,\r\n wrap: this.wrap,\r\n maxLines: this.maxLines\r\n }\r\n return <CustomTextBlock {...props} />\r\n }\r\n}\r\n","import { createRoot } from 'react-dom/client'\r\n\r\nconst jsxToHtmlElement = (element: any): HTMLElement => {\r\n const div = document.createElement('div')\r\n div.style.width = '100%'\r\n const root = createRoot(div)\r\n root.render(element)\r\n return div\r\n}\r\n\r\nexport { jsxToHtmlElement }\r\n","import { TextSize } from 'adaptivecards'\r\nimport React, { useEffect, useState } from 'react'\r\nimport { capitalizeFirstLetter } from '../../utils/capitalizeFirstLetter'\r\n\r\ninterface TextBlockProps {\r\n text?: string\r\n isTitle?: boolean\r\n isSubtitle?: boolean\r\n size?: number\r\n horizontalAlignment?: number\r\n wrap?: boolean\r\n maxLines?: number\r\n}\r\n\r\nconst getSizeFromEnum = (size: number): string => {\r\n switch (size) {\r\n case TextSize.Small:\r\n return 'rf-small-size-auto'\r\n case TextSize.Medium:\r\n return 'rf-text-medium-size-auto'\r\n case TextSize.Large:\r\n return 'rf-text-large-size-auto'\r\n case TextSize.ExtraLarge:\r\n return 'rf-text-extralarge-size-auto'\r\n case TextSize.Default:\r\n default:\r\n return 'rf-text-size-auto'\r\n }\r\n}\r\n\r\nconst TextBlock = ({\r\n text,\r\n isTitle,\r\n isSubtitle,\r\n size,\r\n horizontalAlignment,\r\n wrap,\r\n maxLines\r\n}: TextBlockProps): JSX.Element => {\r\n const [style, setStyle] = useState<string>('')\r\n\r\n useEffect(() => {\r\n if (text) {\r\n // Text size\r\n let styleToApply = isTitle\r\n ? 'rf-title-size-auto'\r\n : isSubtitle\r\n ? 'rf-subtitle-size-auto'\r\n : size\r\n ? getSizeFromEnum(size)\r\n : 'rf-text-size-auto'\r\n\r\n // Text horizontal alignment\r\n if (horizontalAlignment) {\r\n switch (horizontalAlignment) {\r\n case 1:\r\n styleToApply += ' rf-text-center'\r\n break\r\n case 2:\r\n styleToApply += ' rf-text-right'\r\n break\r\n case 0:\r\n default:\r\n styleToApply += ' rf-text-left'\r\n break\r\n }\r\n } else {\r\n styleToApply += ' rf-text-left'\r\n }\r\n\r\n // Wrap ?\r\n wrap\r\n ? (isTitle || isSubtitle) && (styleToApply += ' rf-line-clamp-2')\r\n : (styleToApply += ' rf-truncate')\r\n\r\n // Max lines ? If this is a title it has already been set to 2 lines if wrap is not false\r\n !isTitle &&\r\n maxLines &&\r\n maxLines > 0 &&\r\n maxLines <= 10 &&\r\n (styleToApply += ` rf-line-clamp-${maxLines}`)\r\n\r\n setStyle(styleToApply)\r\n }\r\n }, [])\r\n\r\n return text ? (\r\n <div className={`rf-w-full rf-text-cardFrameText ${style}`}>\r\n {capitalizeFirstLetter(text)}\r\n </div>\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default TextBlock\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React from 'react'\r\nimport { jsxToHtmlElement } from '../../../utils/jsxToHtmlElement'\r\nimport { ToggleInput } from 'adaptivecards/lib/card-elements'\r\nimport InputToggle from '../InputToggle'\r\nimport { updateData } from '../../../utils/localStorageInputsUtils'\r\n\r\nexport class ToggleInputClass extends ToggleInput {\r\n private _value = this.defaultValue || this.valueOff\r\n public get value(): any {\r\n return this._value\r\n }\r\n\r\n public isSet(): any {\r\n return this._value\r\n }\r\n\r\n private handleChange = (on: boolean): void => {\r\n this._value = on ? this.valueOn : this.valueOff\r\n this.id && updateData(this.id, on ? this.valueOn : this.valueOff)\r\n }\r\n\r\n protected internalRender(): HTMLElement {\r\n const element = jsxToHtmlElement(this.renderReact())\r\n return element\r\n }\r\n\r\n protected renderReact = (): JSX.Element => {\r\n return this.id ? (\r\n <InputToggle\r\n id={this.id}\r\n title={this.title}\r\n handleChange={this.handleChange}\r\n valueOn={this.valueOn}\r\n defaultValue={this.defaultValue || this.valueOff}\r\n />\r\n ) : (\r\n <React.Fragment />\r\n )\r\n }\r\n}\r\n","import React, { useState } from 'react'\r\nimport { useUtilsStore } from '../Contexts/utilsStore'\r\nimport { capitalizeFirstLetter } from '../../utils/capitalizeFirstLetter'\r\nimport { checkForData } from '../../utils/localStorageInputsUtils'\r\nimport { CurrentSubView } from '../../models/enums'\r\n\r\ninterface InputToggleProps {\r\n id: string\r\n title?: string\r\n handleChange: (on: boolean) => void\r\n valueOn: string\r\n defaultValue: string\r\n}\r\n\r\nconst InputToggle = ({\r\n id,\r\n title,\r\n handleChange,\r\n valueOn,\r\n defaultValue\r\n}: InputToggleProps): JSX.Element => {\r\n const { currentSubView } = useUtilsStore()\r\n const [on, setOn] = useState<boolean>(\r\n checkForData(id, defaultValue) === valueOn\r\n )\r\n\r\n /**\r\n * On call :\r\n * - check if the component will be rendered in history, if so bypass every interaction\r\n * - call parent's handleChange method\r\n * - set on state to its opposite\r\n */\r\n const handleToggle = (): void => {\r\n if (currentSubView !== CurrentSubView.history) {\r\n handleChange(!on)\r\n setOn(!on)\r\n }\r\n }\r\n\r\n return (\r\n <div className='rf-w-full rf-flex rf-flex-row rf-items-start rf-text-size-auto rf-text-white'>\r\n <label className='rf-flex rf-flex-row rf-items-start'>\r\n <input\r\n type='checkbox'\r\n onChange={handleToggle}\r\n className='rf-toggle-custom'\r\n checked={on}\r\n />\r\n <div className='rf-input-label'>\r\n {capitalizeFirstLetter(title || id)}\r\n </div>\r\n </label>\r\n </div>\r\n )\r\n}\r\n\r\nexport default InputToggle\r\n","const checkForData = (id: string, defaultData: any): any => {\r\n let value = defaultData\r\n const currentData = JSON.parse(\r\n localStorage.getItem('Retorik.Framework.Inputs') || 'null'\r\n )\r\n\r\n if (currentData && Array.isArray(currentData)) {\r\n currentData.forEach((data) => {\r\n if (data.id === id) {\r\n value = data.value\r\n }\r\n })\r\n }\r\n\r\n return value\r\n}\r\n\r\nconst updateData = (id: string, value: any): void => {\r\n const currentData = JSON.parse(\r\n localStorage.getItem('Retorik.Framework.Inputs') || 'null'\r\n )\r\n\r\n if (currentData && Array.isArray(currentData)) {\r\n let changed = false\r\n currentData.forEach((data) => {\r\n if (data.id === id) {\r\n data.value = value\r\n changed = true\r\n }\r\n })\r\n\r\n // If some data were changed\r\n if (changed) {\r\n localStorage.setItem(\r\n 'Retorik.Framework.Inputs',\r\n JSON.stringify(currentData)\r\n )\r\n } // Otherwise, add the data and save all\r\n else {\r\n const newData = [...currentData, { id: id, value: value }]\r\n localStorage.setItem('Retorik.Framework.Inputs', JSON.stringify(newData))\r\n }\r\n } else {\r\n localStorage.setItem(\r\n 'Retorik.Framework.Inputs',\r\n JSON.stringify([{ id: id, value: value }])\r\n )\r\n }\r\n}\r\n\r\nexport { checkForData, updateData }\r\n","import React from 'react'\r\nimport { jsxToHtmlElement } from '../../../utils/jsxToHtmlElement'\r\nimport { DateInput } from 'adaptivecards/lib/card-elements'\r\nimport InputDate from '../InputDate'\r\nimport InputCalendar from '../InputCalendar'\r\nimport { updateData } from '../../../utils/localStorageInputsUtils'\r\nimport * as AC from 'adaptivecards'\r\n\r\nexport class DateInputClass extends DateInput {\r\n private _value = this.defaultValue || undefined\r\n public get value(): any {\r\n return this._value\r\n }\r\n\r\n public isSet(): any {\r\n return this._value\r\n }\r\n\r\n // Add custom property to schema\r\n static readonly calendarProperty = new AC.BoolProperty(\r\n AC.Versions.v1_0,\r\n 'calendar',\r\n false\r\n )\r\n\r\n // Calendar property accessors\r\n @AC.property(DateInputClass.calendarProperty)\r\n get calendar(): boolean {\r\n return !!this.getValue(DateInputClass.calendarProperty)\r\n }\r\n\r\n private handleChange = (value: string): void => {\r\n this._value = value\r\n this.id && updateData(this.id, value)\r\n }\r\n\r\n protected internalRender(): HTMLElement {\r\n const element = jsxToHtmlElement(this.renderReact())\r\n return element\r\n }\r\n\r\n protected renderReact = (): JSX.Element => {\r\n return this.id ? (\r\n this.calendar ? (\r\n <InputCalendar\r\n id={this.id}\r\n defaultValue={this.defaultValue}\r\n maxValue={this.max}\r\n minValue={this.min}\r\n handleChange={this.handleChange}\r\n />\r\n ) : (\r\n <InputDate\r\n id={this.id}\r\n defaultValue={this.defaultValue}\r\n maxValue={this.max}\r\n minValue={this.min}\r\n handleChange={this.handleChange}\r\n />\r\n )\r\n ) : (\r\n <React.Fragment />\r\n )\r\n }\r\n}\r\n","import React, { useEffect, useState, useMemo } from 'react'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport { useUtilsStore } from '../Contexts/utilsStore'\r\nimport { getDateAsArray, getMonthAsString } from '../../utils/getDateAsArray'\r\nimport { capitalizeFirstLetter } from '../../utils/capitalizeFirstLetter'\r\nimport { CurrentSubView } from '../../models/enums'\r\nimport { Wheeler } from '../Utils'\r\n\r\ninterface InputDateProps {\r\n id: string\r\n defaultValue?: string\r\n maxValue?: string\r\n minValue?: string\r\n handleChange: (value: string) => void\r\n}\r\n\r\n/**\r\n * Oddmonths used to calculate the max amount of days in a month\r\n */\r\nconst oddMonths = [4, 6, 9, 11]\r\n\r\nconst InputDate = ({\r\n id,\r\n defaultValue,\r\n maxValue,\r\n minValue,\r\n handleChange\r\n}: InputDateProps): JSX.Element => {\r\n const { locale } = useLocaleStore()\r\n const { currentSubView } = useUtilsStore()\r\n const [year, setYear] = useState<number>(2023)\r\n const [month, setMonth] = useState<number>(1)\r\n const [day, setDay] = useState<number>(1)\r\n\r\n const [maxYear, setMaxYear] = useState<number>(0)\r\n const [minYear, setMinYear] = useState<number>(100000)\r\n const [maxMonth, setMaxMonth] = useState<number>(12)\r\n const [minMonth, setMinMonth] = useState<number>(1)\r\n const [maxDay, setMaxDay] = useState<number>(31)\r\n const [minDay, setMinDay] = useState<number>(1)\r\n const [maxValueAsDate, setMaxValueAsDate] = useState<Date | undefined>(\r\n undefined\r\n )\r\n const [minValueAsDate, setMinValueAsDate] = useState<Date | undefined>(\r\n undefined\r\n )\r\n const [updatingDate, setUpdatingDate] = useState<boolean>(false)\r\n\r\n const [dayWheel, setDayWheel] = useState<number>(0)\r\n const [monthWheel, setMonthWheel] = useState<number>(0)\r\n const [yearWheel, setYearWheel] = useState<number>(0)\r\n\r\n const days = useMemo<number | undefined>(() => {\r\n if (month && year) {\r\n // If we check the february month, either 28 or 29 days depending on the year\r\n if (month === 2) {\r\n return year % 4 === 0 ? 29 : 28\r\n }\r\n // 30 days for oddMonths, 31 otherwise\r\n return oddMonths.includes(month) ? 30 : 31\r\n }\r\n return undefined\r\n }, [month, year])\r\n\r\n /**\r\n * On days state change :\r\n * - set day state if current day is higher than days\r\n */\r\n useEffect(() => {\r\n day && days && day > days && setDay(days)\r\n }, [days])\r\n\r\n /**\r\n * On component mount :\r\n * - set day / month / year from localStorage value if there is one, current Date otherwise\r\n * - set max values from props or current Date + 150 years otherwise\r\n */\r\n useEffect(() => {\r\n const dateAsArray = getDateAsArray(id, defaultValue)\r\n setYear(dateAsArray[0])\r\n setMonth(dateAsArray[1])\r\n setDay(dateAsArray[2])\r\n\r\n // Set min and max years\r\n const now = new Date()\r\n if (maxValue) {\r\n const maxAsDate = new Date(maxValue)\r\n setMaxValueAsDate(maxAsDate)\r\n setMaxYear(maxAsDate.getFullYear())\r\n setMaxMonth(maxAsDate.getMonth() + 1)\r\n setMaxDay(maxAsDate.getDate())\r\n } else {\r\n setMaxYear(now.getFullYear() + 150)\r\n }\r\n\r\n if (minValue) {\r\n const minAsDate = new Date(minValue)\r\n setMinValueAsDate(minAsDate)\r\n setMinYear(minAsDate.getFullYear())\r\n setMinMonth(minAsDate.getMonth() + 1)\r\n setMinDay(minAsDate.getDate())\r\n } else {\r\n setMinYear(now.getFullYear() - 150)\r\n }\r\n }, [])\r\n\r\n /**\r\n * On day / month / year state change :\r\n * - check if a day / month / year change is needed to keep the date a proper one\r\n * - for example on february, there are either 28 or 29 days depending on the year\r\n * - set the value in localStorage\r\n * - if an update is needed, set the updatingDate state to true to prevent concurrent modification, update, and set updatingdate back to false to release lock\r\n */\r\n useEffect(() => {\r\n // Check if we are in the bounds of minValue and maxValue if there are some\r\n if (!updatingDate && day && month && year) {\r\n let updating = false\r\n let dateAsString = `${year}-${month}-${day}`\r\n const date = new Date(dateAsString)\r\n if (minValue && minValueAsDate && date < minValueAsDate) {\r\n dateAsString = minValue\r\n updating = true\r\n } else if (maxValue && maxValueAsDate && date > maxValueAsDate) {\r\n dateAsString = maxValue\r\n updating = true\r\n }\r\n\r\n // Save date\r\n handleChange(dateAsString)\r\n\r\n // Update states if necessary\r\n if (updating) {\r\n setUpdatingDate(true)\r\n const dateAsArray = dateAsString.split('-')\r\n setYear(parseInt(dateAsArray[0]))\r\n setMonth(parseInt(dateAsArray[1]))\r\n setDay(parseInt(dateAsArray[2]))\r\n setUpdatingDate(false)\r\n }\r\n }\r\n }, [day, month, year])\r\n\r\n /**\r\n * On dayWheel change, if dayWheel !== 0 :\r\n * - try to update the day state\r\n * - reset dayWheel state to 0\r\n */\r\n useEffect(() => {\r\n if (dayWheel !== 0 && day && days) {\r\n if (dayWheel > 0) {\r\n day + 1 > days ? setDay(1) : setDay((day): number => day + 1)\r\n } else {\r\n day - 1 > 0 ? setDay((day): number => day - 1) : setDay(days)\r\n }\r\n // Reset dayWheel\r\n setDayWheel(0)\r\n }\r\n }, [dayWheel])\r\n\r\n /**\r\n * On monthWheel change, if monthWheel !== 0 :\r\n * - try to update the month state\r\n * - reset monthWheel state to 0\r\n */\r\n useEffect(() => {\r\n if (monthWheel !== 0 && month) {\r\n if (monthWheel > 0) {\r\n month + 1 > 12 ? setMonth(1) : setMonth((month): number => month + 1)\r\n } else {\r\n month - 1 > 0 ? setMonth((month): number => month - 1) : setMonth(12)\r\n }\r\n // Reset monthWheel\r\n setMonthWheel(0)\r\n }\r\n }, [monthWheel])\r\n\r\n /**\r\n * On yearWheel change, if yearWheel !== 0 :\r\n * - try to update the year state\r\n * - reset yearWheel state to 0\r\n */\r\n useEffect(() => {\r\n if (yearWheel !== 0 && year && minYear && maxYear) {\r\n if (yearWheel > 0) {\r\n year !== maxYear && setYear((year): number => year + 1)\r\n } else {\r\n year !== minYear && setYear((year): number => year - 1)\r\n }\r\n // Reset yearWheel\r\n setYearWheel(0)\r\n }\r\n }, [yearWheel])\r\n\r\n /**\r\n * On wheel event on day / month / year part :\r\n * - check if a hour / minute change is needed to respect minValue or maxValue\r\n * - call wheel state depending on the type, that will trigger the related day / month / year state update if possible\r\n * @param delta : number\r\n * @param type : string\r\n */\r\n const handleWheel = (delta, type): void => {\r\n if (currentSubView !== CurrentSubView.history) {\r\n switch (type) {\r\n case 'day':\r\n setDayWheel(delta)\r\n break\r\n case 'month':\r\n setMonthWheel(delta)\r\n break\r\n case 'year':\r\n setYearWheel(delta)\r\n break\r\n default:\r\n break\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * On click on a day / month / year :\r\n * - check if a hour / minute change is needed to respect minValue or maxValue\r\n * - set chosen day / month / year if it is within the accepted bounds\r\n * @param value : number\r\n * @param type : string\r\n */\r\n const handleClick = (value: number, type: string): void => {\r\n if (currentSubView !== CurrentSubView.history) {\r\n switch (type) {\r\n case 'day':\r\n day && setDay(value)\r\n break\r\n case 'month':\r\n month && value !== -1 && setMonth(value)\r\n break\r\n case 'year':\r\n year && value !== -1 && setYear(value)\r\n break\r\n default:\r\n break\r\n }\r\n }\r\n }\r\n\r\n return (\r\n <div\r\n className='rf-w-full rf-mt-4 rf-py-2 rf-flex rf-flex-row rf-justify-center rf-items-center rf-rounded-lg rf-subtitle-size-auto rf-text-formInputRadioCheckboxUncheckedBackground rf-unselectable'\r\n style={{\r\n background:\r\n 'linear-gradient(rgb(0, 0, 0, 0.5) 0%, rgb(0, 0, 0, 0.5) 34%, black 34%, black 65%, rgb(0, 0, 0, 0.5) 65%, rgb(0, 0, 0, 0.5) 100%)'\r\n }}\r\n >\r\n <input type='date' className='rf-hidden' />\r\n {year && month && day && (\r\n <React.Fragment>\r\n {/* Days */}\r\n <Wheeler\r\n className='rf-flex rf-flex-col rf-items-center rf-px-4 rf-py-1'\r\n handleWheel={handleWheel}\r\n paramInHandle='day'\r\n >\r\n <div\r\n className='rf-py-1 hover:rf-cursor-pointer'\r\n onClick={(): void =>\r\n handleClick(\r\n year === minYear && month === minMonth && day === minDay\r\n ? -1\r\n : day === 1\r\n ? days || 1\r\n : day - 1,\r\n 'day'\r\n )\r\n }\r\n >\r\n {year === minYear && month === minMonth && day === minDay\r\n ? '\\u2800'\r\n : day === 1\r\n ? `${days}`\r\n : `${day - 1}`}\r\n </div>\r\n <div className='rf-py-1 rf-text-primary'>{day}</div>\r\n <div\r\n className='rf-py-1 hover:rf-cursor-pointer'\r\n onClick={(): void =>\r\n handleClick(\r\n year === maxYear && month === maxMonth && day === maxDay\r\n ? -1\r\n : day === days\r\n ? 1\r\n : day + 1,\r\n 'day'\r\n )\r\n }\r\n >\r\n {year === maxYear && month === maxMonth && day === maxDay\r\n ? '\\u2800'\r\n : day === days\r\n ? '1'\r\n : `${day + 1}`}\r\n </div>\r\n </Wheeler>\r\n {/* Months */}\r\n <Wheeler\r\n className='rf-flex rf-flex-col rf-items-center rf-px-4 rf-py-1'\r\n handleWheel={handleWheel}\r\n paramInHandle='month'\r\n >\r\n <div\r\n className='rf-py-1 hover:rf-cursor-pointer'\r\n onClick={(): void =>\r\n handleClick(\r\n year === minYear && month === minMonth\r\n ? -1\r\n : month === 1\r\n ? 12\r\n : month - 1,\r\n 'month'\r\n )\r\n }\r\n >\r\n {year === minYear && month === minMonth\r\n ? '\\u2800'\r\n : month === 1\r\n ? `${capitalizeFirstLetter(getMonthAsString(12, locale))}`\r\n : `${capitalizeFirstLetter(\r\n getMonthAsString(month - 1, locale)\r\n )}`}\r\n </div>\r\n <div className='rf-py-1 rf-text-primary'>{`${capitalizeFirstLetter(\r\n getMonthAsString(month, locale)\r\n )}`}</div>\r\n <div\r\n className='rf-py-1 hover:rf-cursor-pointer'\r\n onClick={(): void =>\r\n handleClick(\r\n year === maxYear && month === maxMonth\r\n ? -1\r\n : month === 12\r\n ? 1\r\n : month + 1,\r\n 'month'\r\n )\r\n }\r\n >\r\n {year === maxYear && month === maxMonth\r\n ? '\\u2800'\r\n : month === 12\r\n ? `${capitalizeFirstLetter(getMonthAsString(1, locale))}`\r\n : `${capitalizeFirstLetter(\r\n getMonthAsString(month + 1, locale)\r\n )}`}\r\n </div>\r\n </Wheeler>\r\n {/* Years */}\r\n <Wheeler\r\n className='rf-flex rf-flex-col rf-items-center rf-px-4 rf-py-1'\r\n handleWheel={handleWheel}\r\n paramInHandle='year'\r\n >\r\n <div\r\n className='rf-py-1 hover:rf-cursor-pointer'\r\n onClick={(): void =>\r\n handleClick(year === minYear ? -1 : year - 1, 'year')\r\n }\r\n >\r\n {year === minYear ? '\\u2800' : year - 1}\r\n </div>\r\n <div className='rf-py-1 rf-text-primary'>{year}</div>\r\n <div\r\n className='rf-py-1 hover:rf-cursor-pointer'\r\n onClick={(): void =>\r\n handleClick(year === maxYear ? -1 : year + 1, 'year')\r\n }\r\n >\r\n {year === maxYear ? '\\u2800' : year + 1}\r\n </div>\r\n </Wheeler>\r\n </React.Fragment>\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default InputDate\r\n","import { checkForData } from './localStorageInputsUtils'\r\n\r\nconst getDateAsArray = (\r\n id: string,\r\n dateAsString: string | undefined\r\n): Array<number> => {\r\n // Test local storage first, then parameter dateAsString, finally get current date if nothing has been found\r\n const dateFromLocalStorage = checkForData(id, dateAsString)\r\n if (dateFromLocalStorage) {\r\n const resultFromLocal = processSplitDate(dateFromLocalStorage.split('-'))\r\n if (resultFromLocal) {\r\n return resultFromLocal\r\n }\r\n }\r\n\r\n const now = new Date()\r\n\r\n return [now.getFullYear(), now.getMonth() + 1, now.getDate()]\r\n}\r\n\r\nconst processSplitDate = (\r\n splitDate: Array<string>\r\n): Array<number> | undefined => {\r\n if (splitDate.length === 3) {\r\n const year = parseInt(splitDate[0])\r\n const month = parseInt(splitDate[1])\r\n const day = parseInt(splitDate[2])\r\n if (!isNaN(year) && !isNaN(month) && !isNaN(day)) {\r\n return [year, month, day]\r\n }\r\n }\r\n\r\n return undefined\r\n}\r\n\r\nconst getMonthAsString = (month: number, locale: string): string => {\r\n const date = new Date(`2000-${month}-1`).toLocaleString(locale, {\r\n month: 'long'\r\n })\r\n\r\n return date\r\n}\r\n\r\nexport { getDateAsArray, getMonthAsString }\r\n","import React, { useEffect, useState, useMemo } from 'react'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport { useUtilsStore } from '../Contexts/utilsStore'\r\nimport { getDateAsArray } from '../../utils/getDateAsArray'\r\nimport { capitalizeFirstLetter } from '../../utils/capitalizeFirstLetter'\r\nimport { CurrentSubView } from '../../models/enums'\r\nimport { ChevronLeftIcon, ChevronRightIcon } from '../Icons/ChevronIcons'\r\n\r\ninterface InputCalendarProps {\r\n id: string\r\n defaultValue?: string\r\n maxValue?: string\r\n minValue?: string\r\n handleChange: (value: string) => void\r\n isFilter?: boolean\r\n}\r\n\r\n/**\r\n * Oddmonths used to calculate the max amount of days in a month\r\n */\r\nconst oddMonths = [4, 6, 9, 11]\r\n\r\nconst InputCalendar = ({\r\n id,\r\n defaultValue,\r\n maxValue,\r\n minValue,\r\n handleChange,\r\n isFilter\r\n}: InputCalendarProps): JSX.Element => {\r\n const locale = useLocaleStore((state) => state.locale)\r\n const { currentSubView } = useUtilsStore()\r\n\r\n const [year, setYear] = useState<number>(2023)\r\n const [month, setMonth] = useState<number>(1)\r\n const [day, setDay] = useState<number>(1)\r\n\r\n const [maxYear, setMaxYear] = useState<number>(0)\r\n const [minYear, setMinYear] = useState<number>(100000)\r\n const [maxMonth, setMaxMonth] = useState<number>(12)\r\n const [minMonth, setMinMonth] = useState<number>(1)\r\n const [maxDay, setMaxDay] = useState<number>(31)\r\n const [minDay, setMinDay] = useState<number>(1)\r\n const [maxValueAsDate, setMaxValueAsDate] = useState<Date | undefined>(\r\n undefined\r\n )\r\n const [minValueAsDate, setMinValueAsDate] = useState<Date | undefined>(\r\n undefined\r\n )\r\n\r\n const [date, setDate] = useState<string>(`${year}-${month}-${day}`)\r\n\r\n /**\r\n * On month / year states change :\r\n * - calculate and return the number of days of the current month\r\n */\r\n const days = useMemo<number | undefined>(() => {\r\n if (month && year) {\r\n // If we check the february month, either 28 or 29 days depending on the year\r\n if (month === 2) {\r\n return year % 4 === 0 ? 29 : 28\r\n }\r\n // 30 days for oddMonths, 31 otherwise\r\n return oddMonths.includes(month) ? 30 : 31\r\n }\r\n return undefined\r\n }, [month, year])\r\n\r\n /**\r\n * On month / year states change :\r\n * - check which day is the first day of the month\r\n * - return the number of days of week before the first one of the month\r\n */\r\n const emptyDays = useMemo<number>(() => {\r\n const firstDay = new Date(year, month - 1, 1).toLocaleString('fr-FR', {\r\n weekday: 'long'\r\n })\r\n switch (firstDay.toLowerCase()) {\r\n case 'lundi':\r\n return 0\r\n case 'mardi':\r\n return 1\r\n case 'mercredi':\r\n return 2\r\n case 'jeudi':\r\n return 3\r\n case 'vendredi':\r\n return 4\r\n case 'samedi':\r\n return 5\r\n case 'dimanche':\r\n return 6\r\n }\r\n\r\n return 0\r\n }, [month, year])\r\n\r\n const title = useMemo<string>(() => {\r\n const newDate = new Date(year, month - 1, 1)\r\n return capitalizeFirstLetter(\r\n new Date(newDate).toLocaleString(locale, {\r\n month: 'long',\r\n year: 'numeric'\r\n })\r\n )\r\n }, [month, year])\r\n\r\n /**\r\n * On locale change :\r\n * - translate the days of week to display depending on the locale\r\n */\r\n const daysOfWeek = useMemo<Array<string>>(() => {\r\n let tempArray: Array<string> = []\r\n for (let i = 1; i < 8; i++) {\r\n // First day of May 2023 is monday, let's get each day one after another beginning by monday\r\n const newDate = new Date(2023, 4, i)\r\n tempArray = [\r\n ...tempArray,\r\n capitalizeFirstLetter(\r\n newDate.toLocaleString(locale, {\r\n weekday: 'short'\r\n })\r\n )\r\n ]\r\n }\r\n\r\n return tempArray\r\n }, [locale])\r\n\r\n /**\r\n * On component mount :\r\n * - set day / month / year from localStorage value if there is one, current Date otherwise\r\n * - set max values from props or current Date + 150 years otherwise\r\n */\r\n useEffect(() => {\r\n const dateAsArray = getDateAsArray(id, defaultValue)\r\n setYear(dateAsArray[0])\r\n setMonth(dateAsArray[1])\r\n setDay(dateAsArray[2])\r\n setDate(`${dateAsArray[0]}-${dateAsArray[1]}-${dateAsArray[2]}`)\r\n\r\n // Set min and max years\r\n const now = new Date()\r\n if (maxValue) {\r\n const maxAsDate = new Date(maxValue)\r\n setMaxValueAsDate(maxAsDate)\r\n setMaxYear(maxAsDate.getFullYear())\r\n setMaxMonth(maxAsDate.getMonth() + 1)\r\n setMaxDay(maxAsDate.getDate())\r\n } else {\r\n setMaxYear(now.getFullYear() + 150)\r\n }\r\n\r\n if (minValue) {\r\n const minAsDate = new Date(minValue)\r\n setMinValueAsDate(minAsDate)\r\n setMinYear(minAsDate.getFullYear())\r\n setMinMonth(minAsDate.getMonth() + 1)\r\n setMinDay(minAsDate.getDate())\r\n } else {\r\n setMinYear(now.getFullYear() - 150)\r\n }\r\n }, [])\r\n\r\n /**\r\n * On day / month / year state change :\r\n * - check if the date is in the boundaries of minDate / maxDate\r\n * - set the value in localStorage\r\n */\r\n useEffect(() => {\r\n // Check if we are in the bounds of minValue and maxValue if there are some\r\n // Explode date to extract each value and substract 1 to the month (begins at 0 in js Date object)\r\n const dateAsArray = date.split('-')\r\n const newDate = new Date(\r\n parseInt(dateAsArray[0]),\r\n parseInt(dateAsArray[1]) - 1,\r\n parseInt(dateAsArray[2])\r\n )\r\n\r\n if (minValue && minValueAsDate && newDate < minValueAsDate) {\r\n setDay(minDay)\r\n setMonth(minMonth)\r\n setYear(minYear)\r\n setDate(minValue)\r\n } else if (maxValue && maxValueAsDate && newDate > maxValueAsDate) {\r\n setDay(maxDay)\r\n setMonth(maxMonth)\r\n setYear(maxYear)\r\n setDate(maxValue)\r\n } else {\r\n // Save date\r\n id !== 'filterCalendar' && handleChange(date)\r\n }\r\n }, [date])\r\n\r\n const handlePreviousMonth = (): void => {\r\n if (currentSubView !== CurrentSubView.history) {\r\n if (year > minYear) {\r\n setMonth((month) => (month === 1 ? 12 : month - 1))\r\n month === 1 && setYear((year) => year - 1)\r\n } else if (year === minYear && month > minMonth) {\r\n month > 1 && setMonth((month) => month - 1)\r\n }\r\n }\r\n }\r\n\r\n const handleNextMonth = (): void => {\r\n if (currentSubView !== CurrentSubView.history) {\r\n if (year < maxYear) {\r\n setMonth((month) => (month === 12 ? 1 : month + 1))\r\n month === 12 && setYear((year) => year + 1)\r\n } else if (year === maxYear && month < maxMonth) {\r\n month < 12 && setMonth((month) => month + 1)\r\n }\r\n }\r\n }\r\n\r\n const handleClick = (value: number): void => {\r\n if (currentSubView !== CurrentSubView.history) {\r\n setDay(value)\r\n setDate(`${year}-${month}-${value}`)\r\n id === 'filterCalendar' &&\r\n handleChange(\r\n `${year}-${month < 10 ? '0' : ''}${month}-${\r\n value < 10 ? '0' : ''\r\n }${value}`\r\n )\r\n }\r\n }\r\n\r\n return (\r\n <div\r\n className={`rf-w-full rf-px-2 rf-flex rf-flex-col rf-rounded-lg ${\r\n isFilter ? 'rf-text-trueblack' : 'rf-text-truewhite'\r\n } rf-subtitle-size-auto rf-unselectable`}\r\n style={{\r\n background: isFilter ? '#FFF' : 'rgba(0, 0, 0, 0.5)'\r\n }}\r\n >\r\n {/* Month + year */}\r\n <div className='rf-w-full rf-px-4 rf-py-6 rf-flex rf-flex-row rf-justify-between rf-items-center'>\r\n <div\r\n className='rf-w-4 rf-cursor-pointer'\r\n onClick={(e): void => {\r\n e.preventDefault()\r\n e.stopPropagation()\r\n handlePreviousMonth()\r\n }}\r\n >\r\n {(year > minYear || (year === minYear && month > minMonth)) && (\r\n <ChevronLeftIcon\r\n className='rf-h-4'\r\n color={isFilter ? '#000' : '#FFF'}\r\n />\r\n )}\r\n </div>\r\n <div\r\n className={`rf-width-fill-available rf-text-center rf-title-size-auto ${\r\n isFilter ? 'rf-text-secondary' : 'rf-text-primary'\r\n }`}\r\n >\r\n {title}\r\n </div>\r\n <div\r\n className='rf-w-4 rf-cursor-pointer'\r\n onClick={(e): void => {\r\n e.preventDefault()\r\n e.stopPropagation()\r\n handleNextMonth()\r\n }}\r\n >\r\n {(year < maxYear || (year === maxYear && month < maxMonth)) && (\r\n <ChevronRightIcon\r\n className='rf-h-4'\r\n color={isFilter ? '#000' : '#FFF'}\r\n />\r\n )}\r\n </div>\r\n </div>\r\n\r\n {/* Days */}\r\n <div className='rf-w-full rf-py-6 rf-grid rf-grid-cols-7 rf-gap-4'>\r\n {/* Days of week */}\r\n {daysOfWeek.map((weekDay, key) => {\r\n return (\r\n <div\r\n key={key}\r\n className='rf-flex rf-justify-center rf-items-center rf-aspect-square'\r\n >\r\n {weekDay}\r\n </div>\r\n )\r\n })}\r\n\r\n {/* Empty days */}\r\n {[...Array(emptyDays)].map((e, key) => {\r\n return (\r\n <div key={(key + 1) * 10} className='rf-aspect-square'>\r\n {e || '\\u2800'}\r\n </div>\r\n )\r\n })}\r\n\r\n {/* Days */}\r\n {[...Array(days)].map((e, key) => {\r\n return (\r\n <div\r\n key={(key + 1) * 100}\r\n className={`rf-flex rf-justify-center rf-items-center rf-aspect-square ${\r\n key + 1 === day &&\r\n parseInt(date.split('-')[1]) === month &&\r\n parseInt(date.split('-')[0]) === year\r\n ? `rf-font-bold rf-text-trueblack ${\r\n isFilter ? 'rf-bg-secondary' : 'rf-bg-primary'\r\n } rf-rounded-half`\r\n : year === maxYear && month === maxMonth && key + 1 > maxDay\r\n ? 'rf-text-formInputRadioCheckboxUncheckedBackground'\r\n : 'rf-cursor-pointer'\r\n }`}\r\n onClick={(e): void => {\r\n e.preventDefault()\r\n e.stopPropagation()\r\n handleClick(key + 1)\r\n }}\r\n >\r\n {e || key + 1}\r\n </div>\r\n )\r\n })}\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default InputCalendar\r\n","import React from 'react'\r\nimport { jsxToHtmlElement } from '../../../utils/jsxToHtmlElement'\r\nimport { TimeInput } from 'adaptivecards/lib/card-elements'\r\nimport InputTime from '../InputTime'\r\nimport { updateData } from '../../../utils/localStorageInputsUtils'\r\n\r\nexport class TimeInputClass extends TimeInput {\r\n private _value = this.defaultValue || undefined\r\n public get value(): any {\r\n return this._value\r\n }\r\n\r\n public isSet(): any {\r\n return this._value\r\n }\r\n\r\n private handleChange = (value: string): void => {\r\n this._value = value\r\n this.id && updateData(this.id, value)\r\n }\r\n\r\n protected internalRender(): HTMLElement {\r\n const element = jsxToHtmlElement(this.renderReact())\r\n return element\r\n }\r\n\r\n protected renderReact = (): JSX.Element => {\r\n return this.id ? (\r\n <InputTime\r\n id={this.id}\r\n defaultValue={this.defaultValue}\r\n maxValue={this.max}\r\n minValue={this.min}\r\n handleChange={this.handleChange}\r\n />\r\n ) : (\r\n <React.Fragment />\r\n )\r\n }\r\n}\r\n","import React, { useEffect, useState } from 'react'\r\nimport { useUtilsStore } from '../Contexts/utilsStore'\r\nimport { checkForData } from '../../utils/localStorageInputsUtils'\r\nimport { CurrentSubView } from '../../models/enums'\r\nimport Wheeler from '../Utils/Wheeler'\r\n\r\ninterface InputTimeProps {\r\n id: string\r\n defaultValue?: string\r\n maxValue?: string\r\n minValue?: string\r\n handleChange: (value: string) => void\r\n}\r\n\r\nconst InputTime = ({\r\n id,\r\n defaultValue,\r\n maxValue,\r\n minValue,\r\n handleChange\r\n}: InputTimeProps): JSX.Element => {\r\n const { currentSubView } = useUtilsStore()\r\n const [hour, setHour] = useState<number>(12)\r\n const [minute, setMinute] = useState<number>(0)\r\n\r\n const [maxHour, setMaxHour] = useState<number>(23)\r\n const [minHour, setMinHour] = useState<number>(0)\r\n const [maxMinute, setMaxMinute] = useState<number>(59)\r\n const [minMinute, setMinMinute] = useState<number>(0)\r\n\r\n const [updatingTime, setUpdatingTime] = useState<boolean>(false)\r\n\r\n const [hourWheel, setHourWheel] = useState<number>(0)\r\n const [minuteWheel, setMinuteWheel] = useState<number>(0)\r\n\r\n /**\r\n * On component mount :\r\n * - set hour / minute from localStorage value if there is one, or defaultValue, or 12:00 if no other data\r\n * - set maxHour and maxMinute states if maxValue prop is set\r\n * - set minHour and minMinute states if minValue prop is set\r\n */\r\n useEffect(() => {\r\n // Set hour and minute from localstorage or defaultvalue if one of those is set\r\n const timeFromLocalStorage = checkForData(id, null)\r\n const timeAsArray: Array<string> = timeFromLocalStorage\r\n ? timeFromLocalStorage.split(':')\r\n : defaultValue\r\n ? defaultValue.split(':')\r\n : []\r\n\r\n if (timeAsArray.length === 2) {\r\n !isNaN(parseInt(timeAsArray[0])) && setHour(parseInt(timeAsArray[0]))\r\n !isNaN(parseInt(timeAsArray[1])) && setMinute(parseInt(timeAsArray[1]))\r\n }\r\n\r\n // Set min and max times\r\n if (maxValue) {\r\n const maxTimeAsArray = maxValue.split(':')\r\n setMaxHour(parseInt(maxTimeAsArray[0]))\r\n setMaxMinute(parseInt(maxTimeAsArray[1]))\r\n }\r\n\r\n if (minValue) {\r\n const minTimeAsArray = minValue.split(':')\r\n setMinHour(parseInt(minTimeAsArray[0]))\r\n setMinMinute(parseInt(minTimeAsArray[1]))\r\n }\r\n }, [])\r\n\r\n /**\r\n * On hour / minute state change :\r\n * - check if a hour / minute change is needed to respect minValue or maxValue\r\n * - set the value in localStorage\r\n * - if an update is needed, set the updatingTime state to true to prevent concurrent modification, update, and set updatingTime back to false to release lock\r\n */\r\n useEffect(() => {\r\n // Check if we are in the bounds of minValue and maxValue if there are some\r\n if (!updatingTime && hour !== undefined && minute !== undefined) {\r\n let updating = false\r\n // Deal with hours and minutes lower than 10 : add a '0' before to keep 2-characters length for each\r\n const tempHour = hour < 10 ? `0${hour}` : hour\r\n const tempMinute = minute < 10 ? `0${minute}` : minute\r\n let timeAsString = `${tempHour}:${tempMinute}`\r\n // Check if the time is lower than the minimal value if given, or greater than the maximal one if given\r\n if (\r\n minValue &&\r\n (hour < minHour || (hour === minHour && minute < minMinute))\r\n ) {\r\n timeAsString = minValue\r\n updating = true\r\n } else if (\r\n maxValue &&\r\n (hour > maxHour || (hour === maxHour && minute > maxMinute))\r\n ) {\r\n timeAsString = maxValue\r\n updating = true\r\n }\r\n\r\n // Save time\r\n handleChange(timeAsString)\r\n\r\n // Update states if necessary\r\n if (updating) {\r\n setUpdatingTime(true)\r\n const timeAsArray = timeAsString.split(':')\r\n setHour(parseInt(timeAsArray[0]))\r\n setMinute(parseInt(timeAsArray[1]))\r\n setUpdatingTime(false)\r\n }\r\n }\r\n }, [hour, minute])\r\n\r\n /**\r\n * On hourWheel change, if hourWheel !== 0 :\r\n * - try to update the hour state\r\n * - reset hourWheel state to 0\r\n */\r\n useEffect(() => {\r\n if (hourWheel !== 0 && hour !== undefined) {\r\n if (hourWheel > 0) {\r\n hour + 1 > 23 ? setHour(0) : setHour((hour): number => hour + 1)\r\n } else {\r\n hour - 1 < 0 ? setHour(23) : setHour((hour): number => hour - 1)\r\n }\r\n // Reset dayWheel\r\n setHourWheel(0)\r\n }\r\n }, [hourWheel])\r\n\r\n /**\r\n * On minuteWheel change, if minuteWheel !== 0 :\r\n * - try to update the minute state\r\n * - reset minuteWheel state to 0\r\n */\r\n useEffect(() => {\r\n if (minuteWheel !== 0 && minute !== undefined) {\r\n if (minuteWheel > 0) {\r\n minute + 1 > 59\r\n ? setMinute(0)\r\n : setMinute((minute): number => minute + 1)\r\n } else {\r\n minute - 1 < 0\r\n ? setMinute(59)\r\n : setMinute((minute): number => minute - 1)\r\n }\r\n // Reset monthWheel\r\n setMinuteWheel(0)\r\n }\r\n }, [minuteWheel])\r\n\r\n /**\r\n * On wheel event on hour / minute part :\r\n * - check if the component will be rendered in history, if so bypass every interaction\r\n * - call wheel state depending on the type, that will trigger the related hour / minute state update if possible\r\n * @param delta : number\r\n * @param type : string\r\n */\r\n const handleWheel = (delta, type): void => {\r\n if (currentSubView !== CurrentSubView.history) {\r\n switch (type) {\r\n case 'hour':\r\n setHourWheel(delta)\r\n break\r\n case 'minute':\r\n setMinuteWheel(delta)\r\n break\r\n default:\r\n break\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * On click on a hour / minute :\r\n * - check if the component will be rendered in history, if so bypass every interaction\r\n * - set chosen hour / minute if it is within the accepted bounds\r\n * @param value : number\r\n * @param type : string\r\n */\r\n const handleClick = (value: number, type: string): void => {\r\n if (currentSubView !== CurrentSubView.history) {\r\n switch (type) {\r\n case 'hour':\r\n hour !== undefined && value !== -1 && setHour(value)\r\n break\r\n case 'minute':\r\n minute !== undefined && value !== -1 && setMinute(value)\r\n break\r\n default:\r\n break\r\n }\r\n }\r\n }\r\n\r\n return (\r\n <div\r\n className='rf-w-full rf-mt-4 rf-py-2 rf-flex rf-flex-row rf-justify-center rf-items-center rf-rounded-lg rf-subtitle-size-auto rf-text-formInputRadioCheckboxUncheckedBackground rf-unselectable'\r\n style={{\r\n background:\r\n 'linear-gradient(rgb(0, 0, 0, 0.5) 0%, rgb(0, 0, 0, 0.5) 34%, black 34%, black 65%, rgb(0, 0, 0, 0.5) 65%, rgb(0, 0, 0, 0.5) 100%)'\r\n }}\r\n >\r\n <input type='time' className='rf-hidden' />\r\n {hour !== undefined && minute !== undefined && (\r\n <React.Fragment>\r\n {/* Hours */}\r\n <Wheeler\r\n className='rf-flex rf-flex-col rf-items-center rf-pr-1 rf-py-1'\r\n handleWheel={handleWheel}\r\n paramInHandle='hour'\r\n >\r\n <div\r\n className='rf-py-1 hover:rf-cursor-pointer'\r\n onClick={(): void =>\r\n handleClick(\r\n minValue && hour === minHour\r\n ? -1\r\n : hour === 0\r\n ? 23\r\n : hour - 1,\r\n 'hour'\r\n )\r\n }\r\n >\r\n {minValue && hour === minHour\r\n ? '\\u2800'\r\n : hour === 0\r\n ? '23'\r\n : hour < 11\r\n ? `0${hour - 1}`\r\n : hour - 1}\r\n </div>\r\n <div className='rf-py-1 rf-text-primary'>\r\n {hour < 10 ? `0${hour}` : hour}\r\n </div>\r\n <div\r\n className='rf-py-1 hover:rf-cursor-pointer'\r\n onClick={(): void =>\r\n handleClick(\r\n maxValue && hour === maxHour\r\n ? -1\r\n : hour === 23\r\n ? 0\r\n : hour + 1,\r\n 'hour'\r\n )\r\n }\r\n >\r\n {maxValue && hour === maxHour\r\n ? '\\u2800'\r\n : hour === 23\r\n ? '00'\r\n : hour < 9\r\n ? `0${hour + 1}`\r\n : hour + 1}\r\n </div>\r\n </Wheeler>\r\n\r\n {/* Empty column with colon in the middle element */}\r\n <div className='rf-flex rf-flex-col rf-items-center rf-py-1'>\r\n <div>{'\\u2800'}</div>\r\n <div className='rf-text-primary'>:</div>\r\n <div>{'\\u2800'}</div>\r\n </div>\r\n\r\n {/* Minutes */}\r\n <Wheeler\r\n className='rf-flex rf-flex-col rf-items-center rf-pl-1 rf-py-1'\r\n handleWheel={handleWheel}\r\n paramInHandle='minute'\r\n >\r\n <div\r\n className='rf-py-1 hover:rf-cursor-pointer'\r\n onClick={(): void =>\r\n handleClick(\r\n minValue && hour === minHour && minute === minMinute\r\n ? -1\r\n : minute === 0\r\n ? 59\r\n : minute - 1,\r\n 'minute'\r\n )\r\n }\r\n >\r\n {minValue && hour === minHour && minute === minMinute\r\n ? '\\u2800'\r\n : minute === 0\r\n ? '59'\r\n : minute < 11\r\n ? `0${minute - 1}`\r\n : minute - 1}\r\n </div>\r\n <div className='rf-py-1 rf-text-primary'>\r\n {minute < 10 ? `0${minute}` : minute}\r\n </div>\r\n <div\r\n className='rf-py-1 hover:rf-cursor-pointer'\r\n onClick={(): void =>\r\n handleClick(\r\n maxValue && hour === maxHour && minute === maxMinute\r\n ? -1\r\n : minute === 59\r\n ? 0\r\n : minute + 1,\r\n 'minute'\r\n )\r\n }\r\n >\r\n {maxValue && hour === maxHour && minute === maxMinute\r\n ? '\\u2800'\r\n : minute < 9\r\n ? `0${minute + 1}`\r\n : minute === 59\r\n ? '00'\r\n : minute + 1}\r\n </div>\r\n </Wheeler>\r\n </React.Fragment>\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default InputTime\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React from 'react'\r\nimport { jsxToHtmlElement } from '../../../utils/jsxToHtmlElement'\r\nimport { updateData } from '../../../utils/localStorageInputsUtils'\r\nimport Radio from '../ChoiceSet/Radio'\r\nimport RadioAsButton from '../ChoiceSet/RadioAsButton'\r\nimport Checkbox from '../ChoiceSet/Checkbox'\r\nimport CheckboxAsButton from '../ChoiceSet/CheckboxAsButton'\r\nimport Select from '../ChoiceSet/Select'\r\nimport * as AC from 'adaptivecards'\r\n\r\ninterface Choice {\r\n title: string\r\n value: string\r\n}\r\n\r\nexport class ChoiceSetClass extends AC.ChoiceSetInput {\r\n private _value\r\n\r\n static readonly JsonTypeName = 'ChoiceSetClass'\r\n\r\n getJsonTypeName(): string {\r\n return ChoiceSetClass.JsonTypeName\r\n }\r\n\r\n // Add custom preperties to schema\r\n static readonly splitProperty = new AC.BoolProperty(\r\n AC.Versions.v1_0,\r\n 'split',\r\n false\r\n )\r\n\r\n static readonly displayAsButtonProperty = new AC.BoolProperty(\r\n AC.Versions.v1_0,\r\n 'asButtons',\r\n false\r\n )\r\n\r\n // Split property accessors\r\n @AC.property(ChoiceSetClass.splitProperty)\r\n get split(): boolean {\r\n return !!this.getValue(ChoiceSetClass.splitProperty)\r\n }\r\n\r\n set split(value: boolean) {\r\n if (this.split !== value) {\r\n this.setValue(ChoiceSetClass.splitProperty, value)\r\n this.updateLayout()\r\n }\r\n }\r\n\r\n // AsButtons property accessors\r\n @AC.property(ChoiceSetClass.displayAsButtonProperty)\r\n get asButtons(): boolean {\r\n return !!this.getValue(ChoiceSetClass.displayAsButtonProperty)\r\n }\r\n\r\n set asButtons(value: boolean) {\r\n if (this.asButtons !== value) {\r\n this.setValue(ChoiceSetClass.displayAsButtonProperty, value)\r\n this.updateLayout()\r\n }\r\n }\r\n\r\n public get value(): any {\r\n return this._value\r\n }\r\n\r\n public isSet(): any {\r\n return this._value\r\n }\r\n\r\n private handleSelectOne = (value: string | undefined): void => {\r\n this._value = value\r\n this.id && updateData(this.id, value)\r\n }\r\n\r\n private handleSelect = (choice: Choice): void => {\r\n this._value = choice.value\r\n this.id && updateData(this.id, choice.value)\r\n }\r\n\r\n private handleChangeCheckbox = (value: Array<string>): void => {\r\n this._value = value\r\n this.id && updateData(this.id, value)\r\n }\r\n\r\n protected internalRender(): HTMLElement {\r\n const element = jsxToHtmlElement(this.renderReact())\r\n return element\r\n }\r\n\r\n protected renderReact = (): JSX.Element => {\r\n // Return empty fragment if no id provided\r\n if (!this.id) {\r\n return <React.Fragment />\r\n }\r\n\r\n // Check if we use checkboxes, radio buttons or select input\r\n let inputType = 'select'\r\n if (this.asButtons) {\r\n inputType = this.isMultiSelect ? 'checkboxbuttons' : 'radiobuttons'\r\n } else if (!this.isCompact) {\r\n inputType = this.isMultiSelect ? 'checkbox' : 'radio'\r\n }\r\n\r\n switch (inputType) {\r\n case 'select':\r\n break\r\n case 'checkbox':\r\n this._value = []\r\n return (\r\n <Checkbox\r\n id={this.id}\r\n choices={this.choices}\r\n split={this.split}\r\n handleChangeCheckbox={this.handleChangeCheckbox}\r\n />\r\n )\r\n case 'radio':\r\n return (\r\n <Radio\r\n id={this.id}\r\n choices={this.choices}\r\n split={this.split}\r\n handleSelect={this.handleSelectOne}\r\n />\r\n )\r\n case 'checkboxbuttons':\r\n return (\r\n <CheckboxAsButton\r\n id={this.id}\r\n choices={this.choices}\r\n handleChangeCheckbox={this.handleChangeCheckbox}\r\n />\r\n )\r\n case 'radiobuttons':\r\n return (\r\n <RadioAsButton\r\n id={this.id}\r\n choices={this.choices}\r\n handleSelect={this.handleSelectOne}\r\n />\r\n )\r\n }\r\n\r\n return (\r\n <Select\r\n id={this.id}\r\n choices={this.choices}\r\n placeholder={this.placeholder}\r\n handleSelect={this.handleSelect}\r\n />\r\n )\r\n }\r\n}\r\n","import React, { useEffect, useState } from 'react'\r\nimport { useUtilsStore } from '../../Contexts/utilsStore'\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\nimport { checkForData } from '../../../utils/localStorageInputsUtils'\r\nimport { CurrentSubView } from '../../../models/enums'\r\n\r\ninterface RadioProps {\r\n id: string\r\n choices: any\r\n split: boolean\r\n handleSelect: (value: string) => void\r\n}\r\n\r\nconst Radio = ({\r\n id,\r\n choices,\r\n split,\r\n handleSelect\r\n}: RadioProps): JSX.Element => {\r\n const { currentSubView } = useUtilsStore()\r\n const [display, setDisplay] = useState<Array<any>>([])\r\n const [chosen, setChosen] = useState<string>(checkForData(id, ''))\r\n\r\n /**\r\n * On choices prop change :\r\n * - if choices is defined, fill display state with choices value\r\n */\r\n useEffect(() => {\r\n if (choices) {\r\n if (split) {\r\n const nbRows = Math.ceil(choices.length / 2)\r\n setDisplay([choices.slice(0, nbRows), choices.slice(nbRows)])\r\n } else {\r\n setDisplay(choices)\r\n }\r\n }\r\n }, [choices])\r\n\r\n /**\r\n * On call:\r\n * - check if the component will be rendered in history, if so bypass every interaction\r\n * - fill chosen state with value\r\n * - call parent's handleSelect method\r\n * @param value : string\r\n */\r\n const handleChange = (value: string): void => {\r\n if (currentSubView !== CurrentSubView.history) {\r\n setChosen(value)\r\n handleSelect(value)\r\n }\r\n }\r\n\r\n return display && display.length > 0 ? (\r\n split ? (\r\n <div className='rf-w-full rf-mt-4 rf-flex rf-flex-row rf-text-size-auto rf-text-white'>\r\n {/* First column */}\r\n <div className='rf-w-1/2 rf-flex rf-flex-col rf-items-start'>\r\n {display[0].map((choice, key) => {\r\n return (\r\n <div\r\n key={key}\r\n className='rf-w-full rf-flex rf-flex-row rf-items-start rf-mb-3'\r\n >\r\n <input\r\n type='radio'\r\n value={choice.value}\r\n checked={choice.value === chosen}\r\n className='rf-radio-custom'\r\n onChange={(): void => handleChange(choice.value)}\r\n />\r\n <label\r\n htmlFor={`radio-${key}`}\r\n className='rf-input-label rf-mr-2 rf-max-w-[calc(100%-2rem)]'\r\n >\r\n {capitalizeFirstLetter(choice.title)}\r\n </label>\r\n </div>\r\n )\r\n })}\r\n </div>\r\n\r\n {/* Second column */}\r\n <div className='rf-w-1/2 rf-flex rf-flex-col rf-items-start'>\r\n {display[1].map((choice, key) => {\r\n return (\r\n <div\r\n key={key}\r\n className='rf-w-full rf-flex rf-flex-row rf-items-start rf-mb-3'\r\n >\r\n <input\r\n type='radio'\r\n value={choice.value}\r\n checked={choice.value === chosen}\r\n className='rf-radio-custom'\r\n onChange={(): void => handleChange(choice.value)}\r\n />\r\n <label\r\n htmlFor={`radio-${key}`}\r\n className='rf-input-label rf-mr-2 rf-max-w-[calc(100%-2rem)]'\r\n >\r\n {capitalizeFirstLetter(choice.title)}\r\n </label>\r\n </div>\r\n )\r\n })}\r\n </div>\r\n </div>\r\n ) : (\r\n <div className='rf-w-full rf-mt-4 rf-text-size-auto rf-text-white'>\r\n {display.map((choice, key) => {\r\n return (\r\n <div\r\n key={key}\r\n className='rf-w-full rf-flex rf-flex-row rf-items-start rf-mb-3'\r\n >\r\n <input\r\n type='radio'\r\n value={choice.value}\r\n checked={choice.value === chosen}\r\n className='rf-radio-custom'\r\n onChange={(): void => handleChange(choice.value)}\r\n />\r\n <label\r\n htmlFor={`radio-${key}`}\r\n className='rf-input-label rf-mr-2 rf-max-w-[calc(100%-2rem)]'\r\n >\r\n {capitalizeFirstLetter(choice.title)}\r\n </label>\r\n </div>\r\n )\r\n })}\r\n </div>\r\n )\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default Radio\r\n","import React, { useEffect, useState } from 'react'\r\nimport { useUtilsStore } from '../../Contexts/utilsStore'\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\nimport { checkForData } from '../../../utils/localStorageInputsUtils'\r\nimport { CurrentSubView } from '../../../models/enums'\r\n\r\ninterface RadioAsButtonProps {\r\n id: string\r\n choices: any\r\n handleSelect: (value: string) => void\r\n}\r\n\r\nconst RadioAsButton = ({\r\n id,\r\n choices,\r\n handleSelect\r\n}: RadioAsButtonProps): JSX.Element => {\r\n const { currentSubView } = useUtilsStore()\r\n const [display, setDisplay] = useState<Array<any>>([])\r\n const [chosen, setChosen] = useState<string>(checkForData(id, ''))\r\n\r\n /**\r\n * On choices prop change :\r\n * - if choices is defined, fill display state with choices value\r\n */\r\n useEffect(() => {\r\n choices && setDisplay(choices)\r\n }, [choices])\r\n\r\n /**\r\n * On call:\r\n * - check if the component will be rendered in history, if so bypass every interaction\r\n * - fill chosen state with value\r\n * - call parent's handleSelect method\r\n * @param value : string\r\n */\r\n const handleChange = (value: string): void => {\r\n if (currentSubView !== CurrentSubView.history) {\r\n setChosen(value)\r\n handleSelect(value)\r\n }\r\n }\r\n\r\n return display && display.length > 0 ? (\r\n <div className='rf-w-full rf-mt-4 rf-flex rf-flex-row rf-flex-wrap rf-justify-center rf-items-center rf-text-size-auto rf-text-white'>\r\n {display.map((choice, key) => {\r\n return (\r\n <label\r\n key={key}\r\n className={`rf-mx-2 rf-flex rf-justify-center rf-items-center rf-px-4 rf-py-2 large:rf-px-5 large:rf-py-3 rf-border rf-rounded-lg ${\r\n choice.value === chosen\r\n ? 'rf-bg-formInputButtonBackgroundHover rf-text-formInputButtonTextHover rf-border-formInputButtonBorderHover'\r\n : 'rf-bg-formInputButtonBackgroundDefault rf-text-formInputButtonTextDefault rf-border-formInputButtonBorderDefault'\r\n } rf-mb-4 hover:rf-cursor-pointer`}\r\n >\r\n <input\r\n type='radio'\r\n value={choice.value}\r\n checked={choice.value === chosen}\r\n className='rf-input-hidden'\r\n onChange={(): void => handleChange(choice.value)}\r\n />\r\n {capitalizeFirstLetter(choice.title)}\r\n </label>\r\n )\r\n })}\r\n </div>\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default RadioAsButton\r\n","import React, { useEffect, useState } from 'react'\r\nimport { useUtilsStore } from '../../Contexts/utilsStore'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\nimport { checkForData } from '../../../utils/localStorageInputsUtils'\r\nimport { CurrentSubView } from '../../../models/enums'\r\nimport { FeatherCheckIcon } from '../../Icons/Miscellaneous'\r\n\r\ninterface CheckboxProps {\r\n id: string\r\n choices: any\r\n split?: boolean\r\n handleChangeCheckbox: (value: Array<string>) => void\r\n}\r\n\r\nconst Checkbox = ({\r\n id,\r\n choices,\r\n split,\r\n handleChangeCheckbox\r\n}: CheckboxProps): JSX.Element => {\r\n const { themeColors } = useView()\r\n const { currentSubView } = useUtilsStore()\r\n const [display, setDisplay] = useState<Array<any>>([])\r\n const [chosen, setChosen] = useState<Array<string>>(checkForData(id, []))\r\n\r\n /**\r\n * On choices prop change :\r\n * - if choices is defined, fill display state with choices value\r\n */\r\n useEffect(() => {\r\n if (choices) {\r\n if (split) {\r\n const nbRows = Math.ceil(choices.length / 2)\r\n setDisplay([choices.slice(0, nbRows), choices.slice(nbRows)])\r\n } else {\r\n setDisplay(choices)\r\n }\r\n }\r\n }, [choices])\r\n\r\n /**\r\n * On chosen state change :\r\n * - call parent's handleChangeCheckbox method\r\n */\r\n useEffect(() => {\r\n handleChangeCheckbox(chosen)\r\n }, [chosen])\r\n\r\n /**\r\n * On call :\r\n * - check if the component will be rendered in history, if so bypass every interaction\r\n * - check for checked / unchecked values and fill chosen state with these\r\n * - call parent's handleChangeCheckbox method\r\n * @param value : string\r\n */\r\n const handleChange = (value: string): void => {\r\n if (currentSubView !== CurrentSubView.history) {\r\n let tempChosen = [...chosen]\r\n if (tempChosen.includes(value)) {\r\n tempChosen = tempChosen.filter((chosenValue) => chosenValue !== value)\r\n } else {\r\n tempChosen = [...tempChosen, value]\r\n }\r\n setChosen(tempChosen)\r\n }\r\n }\r\n\r\n return display && display.length > 0 ? (\r\n split ? (\r\n <div className='rf-w-full rf-mt-4 rf-flex rf-flex-row rf-text-size-auto rf-text-white'>\r\n {/* First column */}\r\n <div className='rf-w-1/2 rf-pr-2 rf-flex rf-flex-col rf-items-start'>\r\n {display[0].map((choice, key) => {\r\n return (\r\n <div key={key} className='rf-relative rf-mb-3'>\r\n <label className='rf-w-full rf-flex rf-flex-row rf-items-start'>\r\n <input\r\n type='checkbox'\r\n value={choice.value}\r\n checked={chosen.includes(choice.value)}\r\n onChange={(): void => handleChange(choice.value)}\r\n className='rf-checkbox-custom'\r\n />\r\n {chosen.includes(choice.value) && (\r\n <FeatherCheckIcon\r\n className='rf-absolute rf-left-1 rf-top-1 rf-h-4 rf-w-4 large:rf-h-5 large:rf-w-5 large-vertical:rf-h-6 large-vertical:rf-w-6 rf-transition-all'\r\n color={\r\n themeColors.formInput.inputRadioCheckbox.checked.item\r\n }\r\n />\r\n )}\r\n <div className='rf-input-label rf-mr-2 rf-max-w-[calc(100%-2rem)]'>\r\n {capitalizeFirstLetter(choice.title)}\r\n </div>\r\n </label>\r\n </div>\r\n )\r\n })}\r\n </div>\r\n\r\n {/* Second column */}\r\n <div className='rf-w-1/2 rf-flex rf-flex-col rf-items-start'>\r\n {display[1].map((choice, key) => {\r\n return (\r\n <div key={key} className='rf-relative rf-mb-3'>\r\n <label className='rf-w-full rf-flex rf-flex-row rf-items-start'>\r\n <input\r\n type='checkbox'\r\n value={choice.value}\r\n checked={chosen.includes(choice.value)}\r\n onChange={(): void => handleChange(choice.value)}\r\n className='rf-checkbox-custom'\r\n />\r\n {chosen.includes(choice.value) && (\r\n <FeatherCheckIcon\r\n className='rf-absolute rf-left-1 rf-top-1 rf-h-4 rf-w-4 large:rf-h-5 large:rf-w-5 large-vertical:rf-h-6 large-vertical:rf-w-6 rf-transition-all'\r\n color={\r\n themeColors.formInput.inputRadioCheckbox.checked.item\r\n }\r\n />\r\n )}\r\n <div className='rf-input-label rf-mr-2 rf-max-w-[calc(100%-2rem)]'>\r\n {capitalizeFirstLetter(choice.title)}\r\n </div>\r\n </label>\r\n </div>\r\n )\r\n })}\r\n </div>\r\n </div>\r\n ) : (\r\n <div className='rf-w-full rf-mt-4 rf-flex rf-flex-col rf-items-start rf-text-size-auto rf-text-white'>\r\n {display.map((choice, key) => {\r\n return (\r\n <div key={key} className='rf-relative rf-mb-3'>\r\n <label className='rf-w-full rf-flex rf-flex-row rf-items-start'>\r\n <input\r\n type='checkbox'\r\n value={choice.value}\r\n checked={chosen.includes(choice.value)}\r\n onChange={(): void => handleChange(choice.value)}\r\n className='rf-checkbox-custom'\r\n />\r\n {chosen.includes(choice.value) && (\r\n <FeatherCheckIcon\r\n className='rf-absolute rf-left-1 rf-top-1 rf-h-4 rf-w-4 large:rf-h-5 large:rf-w-5 large-vertical:rf-h-6 large-vertical:rf-w-6 rf-transition-all'\r\n color={\r\n themeColors.formInput.inputRadioCheckbox.checked.item\r\n }\r\n />\r\n )}\r\n <div className='rf-input-label rf-mr-2 rf-max-w-[calc(100%-2rem)]'>\r\n {capitalizeFirstLetter(choice.title)}\r\n </div>\r\n </label>\r\n </div>\r\n )\r\n })}\r\n </div>\r\n )\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default Checkbox\r\n","import React, { useEffect, useState } from 'react'\r\nimport { useUtilsStore } from '../../Contexts/utilsStore'\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\nimport { checkForData } from '../../../utils/localStorageInputsUtils'\r\nimport { CurrentSubView } from '../../../models/enums'\r\n\r\ninterface CheckboxAsButtonProps {\r\n id: string\r\n choices: any\r\n handleChangeCheckbox: (value: Array<string>) => void\r\n}\r\n\r\nconst CheckboxAsButton = ({\r\n id,\r\n choices,\r\n handleChangeCheckbox\r\n}: CheckboxAsButtonProps): JSX.Element => {\r\n const { currentSubView } = useUtilsStore()\r\n const [display, setDisplay] = useState<Array<any>>([])\r\n const [chosen, setChosen] = useState<Array<string>>(checkForData(id, []))\r\n\r\n /**\r\n * On choices prop change :\r\n * - if choices is defined, fill display state with choices value\r\n */\r\n useEffect(() => {\r\n choices && setDisplay(choices)\r\n }, [choices])\r\n\r\n /**\r\n * On chosen state change :\r\n * - call parent's handleChangeCheckbox method\r\n */\r\n useEffect(() => {\r\n handleChangeCheckbox(chosen)\r\n }, [chosen])\r\n\r\n /**\r\n * On call :\r\n * - check if the component will be rendered in history, if so bypass every interaction\r\n * - check for checked / unchecked values and fill chosen state with these\r\n * - call parent's handleChangeCheckbox method\r\n * @param value : string\r\n */\r\n const handleChange = (value: string): void => {\r\n if (currentSubView !== CurrentSubView.history) {\r\n let tempChosen = [...chosen]\r\n if (tempChosen.includes(value)) {\r\n tempChosen = tempChosen.filter((chosenValue) => chosenValue !== value)\r\n } else {\r\n tempChosen = [...tempChosen, value]\r\n }\r\n setChosen(tempChosen)\r\n }\r\n }\r\n\r\n return display && display.length > 0 ? (\r\n <div className='rf-w-full rf-mt-4 rf-flex rf-flex-row rf-flex-wrap rf-justify-center rf-items-center rf-text-size-auto'>\r\n {display.map((choice, key) => {\r\n return (\r\n <label\r\n key={key}\r\n className={`rf-mx-2 rf-flex rf-justify-center rf-items-center rf-px-4 rf-py-2 large:rf-px-5 large:rf-py-3 rf-border rf-rounded-lg ${\r\n chosen.includes(choice.value)\r\n ? 'rf-bg-formInputButtonBackgroundHover rf-text-formInputButtonTextHover rf-border-formInputButtonBorderHover'\r\n : 'rf-bg-formInputButtonBackgroundDefault rf-text-formInputButtonTextDefault rf-border-formInputButtonBorderDefault'\r\n } rf-mb-4 hover:rf-cursor-pointer`}\r\n >\r\n <input\r\n type='checkbox'\r\n value={choice.value}\r\n checked={chosen.includes(choice.value)}\r\n className='rf-input-hidden'\r\n onChange={(): void => handleChange(choice.value)}\r\n />\r\n {capitalizeFirstLetter(choice.title)}\r\n </label>\r\n )\r\n })}\r\n </div>\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default CheckboxAsButton\r\n","import React, { useEffect, useState } from 'react'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport { useUtilsStore } from '../../Contexts/utilsStore'\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\nimport translation from '../../../translations/inputs.json'\r\nimport { checkForData } from '../../../utils/localStorageInputsUtils'\r\nimport { CurrentSubView } from '../../../models/enums'\r\nimport { ArrowDownIcon } from '../../Icons/ArrowIcons'\r\n\r\ninterface SelectProps {\r\n id: string\r\n choices: any\r\n placeholder?: string\r\n handleSelect: (choice: Choice) => void\r\n}\r\n\r\ninterface Choice {\r\n title: string\r\n value: string\r\n}\r\n\r\nconst Select = ({\r\n id,\r\n choices,\r\n placeholder,\r\n handleSelect\r\n}: SelectProps): JSX.Element => {\r\n const { locale } = useLocaleStore()\r\n const { currentSubView } = useUtilsStore()\r\n const [display, setDisplay] = useState<Array<any>>([])\r\n const [open, setOpen] = useState<boolean>(false)\r\n const [chosen, setChosen] = useState<Choice | null>(checkLocalStorage())\r\n\r\n /**\r\n * On call :\r\n * - check if a choice's value matches to one in local storage if there is one\r\n * - return either the choice that matches, or null if no match\r\n * @returns Choice | null\r\n */\r\n function checkLocalStorage(): Choice | null {\r\n const existing = choices.filter(\r\n (choice: Choice) => choice.value === checkForData(id, null)\r\n )\r\n\r\n return existing.length > 0 ? existing[0] : null\r\n }\r\n\r\n /**\r\n * On choices prop change :\r\n * - if choices is defined, fill display state with choices value\r\n */\r\n useEffect(() => {\r\n choices && setDisplay(choices)\r\n }, [choices])\r\n\r\n /**\r\n * On call :\r\n * - set open state to its contrary\r\n */\r\n const toggleOpen = (): void => {\r\n setOpen(!open)\r\n }\r\n\r\n /**\r\n * On call :\r\n * - check if the component will be rendered in history, if so bypass every interaction\r\n * - fill chosen state with choice value\r\n * - call parent's handleSelect method\r\n * - call toggleOpen method\r\n * @param choice : Choice\r\n */\r\n const handleChange = (choice: Choice): void => {\r\n if (currentSubView !== CurrentSubView.history) {\r\n setChosen(choice)\r\n handleSelect(choice)\r\n toggleOpen()\r\n }\r\n }\r\n\r\n return display && display.length > 0 ? (\r\n <div className='rf-w-full rf-mt-4 rf-text-size-auto rf-text-formInputTextDefault'>\r\n <div\r\n onClick={toggleOpen}\r\n className={`rf-w-full rf-flex rf-flex-row rf-justify-between rf-items-center rf-p-4 rf-border-2 rf-rounded ${\r\n open\r\n ? 'rf-border-formInputRadioCheckboxCheckedBorder'\r\n : 'rf-border-formInputRadioCheckboxUncheckedBorder'\r\n } rf-bg-formInputRadioCheckboxUncheckedBackground`}\r\n >\r\n <div className='rf-truncate'>\r\n {chosen?.title ||\r\n placeholder ||\r\n translation[locale]?.choose ||\r\n translation['fr-FR'].choose}\r\n </div>\r\n <div className='rf-h-2'>\r\n <ArrowDownIcon className='rf-h-full' />\r\n </div>\r\n </div>\r\n {open && (\r\n <ul\r\n className='rf-mt-1 rf-max-h-48 rf-pl-0 rf-w-full rf-rounded rf-border-2 rf-border-formInputRadioCheckboxUncheckedBorder rf-bg-formInputRadioCheckboxUncheckedBackground rf-overflow-y-scroll rf-scrollbar-thin'\r\n style={{\r\n listStyle: 'none'\r\n }}\r\n >\r\n {display.map((choice, key) => {\r\n return (\r\n <li\r\n key={key}\r\n onClick={(): void => handleChange(choice)}\r\n className='rf-px-4 rf-py-2 hover:rf-text-formInputRadioCheckboxCheckedItem hover:rf-bg-formInputRadioCheckboxCheckedBackground'\r\n >\r\n {capitalizeFirstLetter(choice.title)}\r\n </li>\r\n )\r\n })}\r\n </ul>\r\n )}\r\n </div>\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default Select\r\n","{\r\n \"fr-FR\": {\r\n \"choose\": \"Choisissez une réponse\",\r\n \"submit\": \"valider\"\r\n },\r\n \"en-US\": {\r\n \"choose\": \"Choose an answer\",\r\n \"submit\": \"submit\"\r\n },\r\n \"es-ES\": {\r\n \"choose\": \"Choose an answer\",\r\n \"submit\": \"submit\"\r\n },\r\n \"de-DE\": {\r\n \"choose\": \"Choose an answer\",\r\n \"submit\": \"submit\"\r\n }\r\n}\r\n","import React from 'react'\r\nimport { jsxToHtmlElement } from '../../../utils/jsxToHtmlElement'\r\nimport Likert from '../CustomElements/Likert'\r\nimport * as AC from 'adaptivecards'\r\nimport { updateData } from '../../../utils/localStorageInputsUtils'\r\n\r\nexport class LikertClass extends AC.Input {\r\n private _value = this.ratingMin\r\n\r\n static readonly JsonTypeName = 'Retorik.Likert'\r\n\r\n getJsonTypeName(): string {\r\n return LikertClass.JsonTypeName\r\n }\r\n\r\n public get value(): any {\r\n return this._value\r\n }\r\n\r\n public isSet(): any {\r\n return this._value\r\n }\r\n\r\n static readonly ratingMinProperty = new AC.NumProperty(\r\n AC.Versions.v1_0,\r\n 'ratingMin',\r\n 1\r\n )\r\n\r\n static readonly ratingMaxProperty = new AC.NumProperty(\r\n AC.Versions.v1_0,\r\n 'ratingMax',\r\n 5\r\n )\r\n\r\n static readonly emojisProperty = new AC.StringArrayProperty(\r\n AC.Versions.v1_0,\r\n 'emojis',\r\n []\r\n )\r\n\r\n static readonly strokeColorProperty = new AC.StringProperty(\r\n AC.Versions.v1_0,\r\n 'strokeColor',\r\n true\r\n )\r\n\r\n // ratingMin property accessors\r\n @AC.property(LikertClass.ratingMinProperty)\r\n get ratingMin(): number {\r\n return this.getValue(LikertClass.ratingMinProperty) || ''\r\n }\r\n\r\n set ratingMin(val: number) {\r\n if (this.ratingMin !== val) {\r\n this.setValue(LikertClass.ratingMinProperty, val)\r\n }\r\n }\r\n\r\n // ratingMax property accessors\r\n @AC.property(LikertClass.ratingMaxProperty)\r\n get ratingMax(): number {\r\n return this.getValue(LikertClass.ratingMaxProperty) || ''\r\n }\r\n\r\n set ratingMax(val: number) {\r\n if (this.ratingMax !== val) {\r\n this.setValue(LikertClass.ratingMaxProperty, val)\r\n }\r\n }\r\n\r\n // emojis property accessors\r\n @AC.property(LikertClass.emojisProperty)\r\n get emojis(): Array<string> {\r\n return this.getValue(LikertClass.emojisProperty) || ''\r\n }\r\n\r\n set emojis(val: Array<string>) {\r\n if (this.emojis !== val) {\r\n this.setValue(LikertClass.emojisProperty, val)\r\n }\r\n }\r\n\r\n // strokeColor property accessors\r\n @AC.property(LikertClass.strokeColorProperty)\r\n get strokeColor(): string {\r\n return this.getValue(LikertClass.strokeColorProperty) || ''\r\n }\r\n\r\n set strokeColor(val: string) {\r\n if (this.strokeColor !== val) {\r\n this.setValue(LikertClass.strokeColorProperty, val)\r\n }\r\n }\r\n\r\n private handleChange = (value: number): void => {\r\n this._value = value\r\n this.id && updateData(this.id, value)\r\n }\r\n\r\n protected internalRender(): HTMLElement {\r\n const element = jsxToHtmlElement(this.renderReact())\r\n return element\r\n }\r\n\r\n protected renderReact = (): JSX.Element => {\r\n return this.id ? (\r\n <Likert\r\n id={this.id}\r\n ratingMin={this.ratingMin}\r\n ratingMax={this.ratingMax}\r\n emojis={this.emojis}\r\n strokeColor={this.strokeColor}\r\n handleChange={this.handleChange}\r\n />\r\n ) : (\r\n <React.Fragment />\r\n )\r\n }\r\n}\r\n","import React, { useEffect, useState } from 'react'\r\nimport { useUtilsStore } from '../../Contexts/utilsStore'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport { checkForData } from '../../../utils/localStorageInputsUtils'\r\nimport { CurrentSubView } from '../../../models/enums'\r\n\r\ninterface LikertProps {\r\n id: string\r\n ratingMin?: number\r\n ratingMax: number\r\n emojis: Array<string>\r\n strokeColor?: string\r\n handleChange: (value: number) => void\r\n}\r\n\r\ninterface Dataset {\r\n emoji: string\r\n value: number\r\n}\r\n\r\n/**\r\n * Default data if not given in props :\r\n * - defaultEmoji = default displayed object\r\n */\r\nconst defaultEmoji = '🟊'\r\n\r\n// emoji examples ['🟊', '♠', '✺', 'Ϙ', '◎', '₱', '😔', '😐', '😀']\r\n\r\nconst Likert = ({\r\n id,\r\n ratingMin,\r\n ratingMax,\r\n emojis,\r\n strokeColor,\r\n handleChange\r\n}: LikertProps): JSX.Element => {\r\n const { themeColors } = useView()\r\n const { currentSubView } = useUtilsStore()\r\n const [data, setData] = useState<Array<Dataset>>([])\r\n const [rating, setRating] = useState(checkForData(id, ratingMin || 0))\r\n const [hover, setHover] = useState(0)\r\n const hoverColor = strokeColor || themeColors.formInput.likert.hover\r\n\r\n /**\r\n * On component mount :\r\n * - create array of Dataset to be mapped for display\r\n * - set stroke color if given in props\r\n */\r\n useEffect(() => {\r\n const min = ratingMin || 0\r\n const range = min <= 0 ? Math.abs(min) + ratingMax + 1 : ratingMax\r\n let dataArray: Array<Dataset> = []\r\n // If there are as many emojis as values, let's use them all\r\n if (emojis.length === range) {\r\n for (let i = 0; i < range; i++) {\r\n dataArray = [...dataArray, { emoji: emojis[i], value: min + i }]\r\n }\r\n }\r\n // Otherwise, let's use only the first emoji for each value\r\n else {\r\n for (let i = 0; i < range; i++) {\r\n dataArray = [\r\n ...dataArray,\r\n { emoji: emojis[0] || defaultEmoji, value: min + i }\r\n ]\r\n }\r\n }\r\n\r\n setData(dataArray)\r\n }, [])\r\n\r\n /**\r\n * On element click :\r\n * - check if the component will be rendered in history, if so bypass every interaction\r\n * - call parent function from props with the value retrieved\r\n * - set rating\r\n */\r\n const handleClick = (value: number): void => {\r\n if (currentSubView !== CurrentSubView.history) {\r\n handleChange(value)\r\n setRating(value)\r\n }\r\n }\r\n\r\n return (\r\n <div className='rf-my-4 rf-flex rf-flex-row rf-flex-nowrap rf-justify-center rf-items-center rf-title-large-size-auto'>\r\n {data.map((tuple, index) => {\r\n return (\r\n <div\r\n key={index}\r\n className='rf-px-1 rf-likert-custom'\r\n style={{\r\n color:\r\n tuple.value <= (hover || rating)\r\n ? hoverColor\r\n : themeColors.formInput.likert.default\r\n }}\r\n onClick={(): void => handleClick(tuple.value)}\r\n onMouseEnter={(): void => setHover(tuple.value)}\r\n onMouseLeave={(): void => setHover(rating)}\r\n >\r\n {tuple.emoji}\r\n </div>\r\n )\r\n })}\r\n </div>\r\n )\r\n}\r\n\r\nexport default Likert\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React from 'react'\r\nimport { jsxToHtmlElement } from '../../../utils/jsxToHtmlElement'\r\nimport * as AC from 'adaptivecards'\r\nimport { ChoiceWithUrl } from './ChoiceWithUrl'\r\nimport MultiSelect from '../ChoiceSetImages/MultiSelect'\r\nimport MonoSelect from '../ChoiceSetImages/MonoSelect'\r\nimport { updateData } from '../../../utils/localStorageInputsUtils'\r\n\r\nexport class ImageChoiceSetClass extends AC.Input {\r\n private _value\r\n\r\n static readonly JsonTypeName = 'Retorik.ImageChoiceSet'\r\n\r\n getJsonTypeName(): string {\r\n return ImageChoiceSetClass.JsonTypeName\r\n }\r\n\r\n // Add custom preperties to schema\r\n static readonly isMultiSelectProperty = new AC.BoolProperty(\r\n AC.Versions.v1_0,\r\n 'isMultiSelect',\r\n false\r\n )\r\n\r\n static readonly smallImagesProperty = new AC.BoolProperty(\r\n AC.Versions.v1_0,\r\n 'smallImages',\r\n false\r\n )\r\n\r\n static readonly showCaptionsProperty = new AC.BoolProperty(\r\n AC.Versions.v1_0,\r\n 'showCaptions',\r\n false\r\n )\r\n\r\n static readonly choicesWithUrlProperty =\r\n new AC.SerializableObjectCollectionProperty(\r\n AC.Versions.v1_0,\r\n 'choicesWithUrl',\r\n ChoiceWithUrl\r\n )\r\n\r\n // multiSelect property accessors\r\n @AC.property(ImageChoiceSetClass.isMultiSelectProperty)\r\n get isMultiSelect(): boolean {\r\n return !!this.getValue(ImageChoiceSetClass.isMultiSelectProperty)\r\n }\r\n\r\n set isMultiSelect(value: boolean) {\r\n if (this.isMultiSelect !== value) {\r\n this.setValue(ImageChoiceSetClass.isMultiSelectProperty, value)\r\n this.updateLayout()\r\n }\r\n }\r\n\r\n // smallImages property accessors\r\n @AC.property(ImageChoiceSetClass.smallImagesProperty)\r\n get smallImages(): boolean {\r\n return !!this.getValue(ImageChoiceSetClass.smallImagesProperty)\r\n }\r\n\r\n set smallImages(value: boolean) {\r\n if (this.smallImages !== value) {\r\n this.setValue(ImageChoiceSetClass.smallImagesProperty, value)\r\n this.updateLayout()\r\n }\r\n }\r\n\r\n // showCaptions property accessors\r\n @AC.property(ImageChoiceSetClass.showCaptionsProperty)\r\n get showCaptions(): boolean {\r\n return !!this.getValue(ImageChoiceSetClass.showCaptionsProperty)\r\n }\r\n\r\n set showCaptions(value: boolean) {\r\n if (this.smallImages !== value) {\r\n this.setValue(ImageChoiceSetClass.showCaptionsProperty, value)\r\n this.updateLayout()\r\n }\r\n }\r\n\r\n // choicesWithUrl property accessors\r\n @AC.property(ImageChoiceSetClass.choicesWithUrlProperty)\r\n get choicesWithUrl(): ChoiceWithUrl {\r\n return this.getValue(ImageChoiceSetClass.choicesWithUrlProperty) || []\r\n }\r\n\r\n set choicesWithUrl(value: ChoiceWithUrl) {\r\n if (this.choicesWithUrl !== value) {\r\n this.setValue(ImageChoiceSetClass.choicesWithUrlProperty, value)\r\n this.updateLayout()\r\n }\r\n }\r\n\r\n public get value(): any {\r\n return this._value\r\n }\r\n\r\n public isSet(): any {\r\n return this._value\r\n }\r\n\r\n private handleSelectOne = (value: string | undefined): void => {\r\n this._value = value\r\n this.id && updateData(this.id, value)\r\n }\r\n\r\n private handleChangeCheckbox = (value: Array<string>): void => {\r\n this._value = value\r\n this.id && updateData(this.id, value)\r\n }\r\n\r\n protected internalRender(): HTMLElement {\r\n const element = jsxToHtmlElement(this.renderReact())\r\n return element\r\n }\r\n\r\n protected renderReact = (): JSX.Element => {\r\n if (!this.id) {\r\n return <React.Fragment />\r\n }\r\n\r\n if (this.isMultiSelect) {\r\n this._value = []\r\n return (\r\n <MultiSelect\r\n id={this.id}\r\n choices={this.choicesWithUrl}\r\n smallImages={this.smallImages}\r\n showCaptions={this.showCaptions}\r\n handleSelect={this.handleChangeCheckbox}\r\n />\r\n )\r\n } else {\r\n return (\r\n <MonoSelect\r\n id={this.id}\r\n choices={this.choicesWithUrl}\r\n smallImages={this.smallImages}\r\n showCaptions={this.showCaptions}\r\n handleSelect={this.handleSelectOne}\r\n />\r\n )\r\n }\r\n }\r\n}\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport * as AC from 'adaptivecards'\r\n\r\nexport class ChoiceWithUrl extends AC.SerializableObject {\r\n static readonly JsonTypeName = 'ChoiceWithUrl'\r\n\r\n getJsonTypeName(): string {\r\n return ChoiceWithUrl.JsonTypeName\r\n }\r\n\r\n getSchemaKey(): string {\r\n return ChoiceWithUrl.JsonTypeName\r\n }\r\n\r\n static readonly titleProperty = new AC.StringProperty(\r\n AC.Versions.v1_0,\r\n 'title',\r\n true\r\n )\r\n\r\n static readonly valueProperty = new AC.StringProperty(\r\n AC.Versions.v1_0,\r\n 'value',\r\n true\r\n )\r\n\r\n // Add url property to schema\r\n static readonly urlProperty = new AC.StringProperty(\r\n AC.Versions.v1_0,\r\n 'url',\r\n true\r\n )\r\n\r\n @AC.property(ChoiceWithUrl.titleProperty)\r\n get title(): string {\r\n return this.getValue(ChoiceWithUrl.titleProperty) || ''\r\n }\r\n\r\n set title(val: string) {\r\n if (this.title !== val) {\r\n this.setValue(ChoiceWithUrl.titleProperty, val)\r\n }\r\n }\r\n\r\n @AC.property(ChoiceWithUrl.valueProperty)\r\n get value(): string {\r\n return this.getValue(ChoiceWithUrl.valueProperty) || ''\r\n }\r\n\r\n set value(val: string) {\r\n if (this.value !== val) {\r\n this.setValue(ChoiceWithUrl.valueProperty, val)\r\n }\r\n }\r\n\r\n @AC.property(ChoiceWithUrl.urlProperty)\r\n get url(): string {\r\n return this.getValue(ChoiceWithUrl.urlProperty) || ''\r\n }\r\n\r\n set url(val: string) {\r\n if (this.url !== val) {\r\n this.setValue(ChoiceWithUrl.urlProperty, val)\r\n }\r\n }\r\n\r\n constructor(title?: string, value?: string, url?: string) {\r\n super()\r\n this.title = title || ''\r\n this.value = value || ''\r\n this.url = url || ''\r\n }\r\n}\r\n","import React, { useEffect, useState } from 'react'\r\nimport { useUtilsStore } from '../../Contexts/utilsStore'\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\nimport { checkForData } from '../../../utils/localStorageInputsUtils'\r\nimport { CurrentSubView } from '../../../models/enums'\r\n\r\ninterface MultiSelectProps {\r\n id: string\r\n choices: any\r\n smallImages: boolean\r\n showCaptions: boolean\r\n handleSelect: (value: Array<string>) => void\r\n}\r\n\r\nconst MultiSelect = ({\r\n id,\r\n choices,\r\n smallImages,\r\n showCaptions,\r\n handleSelect\r\n}: MultiSelectProps): JSX.Element => {\r\n const { currentSubView } = useUtilsStore()\r\n const [display, setDisplay] = useState<Array<any>>([])\r\n const [chosen, setChosen] = useState<Array<string>>(checkForData(id, []))\r\n const [overflow, setOverflow] = useState<boolean>(false)\r\n const [style, setStyle] = useState<string>('')\r\n\r\n /**\r\n * On choices props change :\r\n * - fill display state with choices value\r\n * - set overflow and style states depending on the smallImages boolean prop and the number of choices\r\n */\r\n useEffect(() => {\r\n if (choices) {\r\n setDisplay(choices)\r\n if (smallImages) {\r\n if (choices.length > 6) {\r\n setOverflow(true)\r\n setStyle(\r\n 'rf-flex rf-flex-row rf-justify-start rf-align-center rf-overflow-x-scroll rf-pb-4'\r\n )\r\n } else {\r\n setOverflow(false)\r\n setStyle('rf-grid rf-grid-rows-2 rf-grid-cols-3')\r\n }\r\n } else {\r\n if (choices.length > 2) {\r\n setOverflow(true)\r\n setStyle(\r\n 'rf-flex rf-flex-row rf-justify-start rf-align-center rf-overflow-x-scroll rf-pb-4'\r\n )\r\n } else {\r\n setOverflow(false)\r\n setStyle('rf-grid rf-grid-rows-1 rf-grid-cols-2')\r\n }\r\n }\r\n }\r\n }, [choices])\r\n\r\n /**\r\n * On chosen state change :\r\n * - call parent's handleChangeCheckbox method\r\n */\r\n useEffect(() => {\r\n handleSelect(chosen)\r\n }, [chosen])\r\n\r\n /**\r\n * On call:\r\n * - check if the component will be rendered in history, if so bypass every interaction\r\n * - check for checked / unchecked values and fill chosen state with these\r\n * - call parent's handleSelect method\r\n * @param value : string\r\n */\r\n const handleChange = (value: string): void => {\r\n if (currentSubView !== CurrentSubView.history) {\r\n let tempChosen = [...chosen]\r\n if (tempChosen.includes(value)) {\r\n tempChosen = tempChosen.filter((chosenValue) => chosenValue !== value)\r\n } else {\r\n tempChosen = [...tempChosen, value]\r\n }\r\n setChosen(tempChosen)\r\n }\r\n }\r\n\r\n return display && display.length > 0 ? (\r\n <div\r\n className={`rf-w-full rf-gap-4 rf-text-size-auto rf-text-white ${style} rf-scrollbar-x-custom`}\r\n >\r\n {display.map((choice, key) => {\r\n return (\r\n <div\r\n key={key}\r\n className={`rf-flex rf-flex-col rf-items-start ${\r\n overflow && 'rf-flex-[0_0_40%]'\r\n }`}\r\n >\r\n <label\r\n className={`rf-w-full rf-h-full rf-flex rf-justify-center rf-items-center rf-border-2 rf-rounded-lg ${\r\n chosen.includes(choice.value)\r\n ? 'rf-border-primary'\r\n : 'rf-border-formInputRadioCheckboxUncheckedBorder'\r\n } hover:rf-cursor-pointer rf-aspect-square rf-overflow-hidden`}\r\n >\r\n <img src={choice.url} className='rf-max-w-full rf-max-h-full' />\r\n <input\r\n type='checkbox'\r\n value={choice.value}\r\n checked={chosen.includes(choice.value)}\r\n className='rf-input-hidden'\r\n onChange={(): void => handleChange(choice.value)}\r\n />\r\n </label>\r\n {showCaptions && (\r\n <div className='rf-mt-2 rf-truncate'>\r\n {capitalizeFirstLetter(choice.title)}\r\n </div>\r\n )}\r\n </div>\r\n )\r\n })}\r\n </div>\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default MultiSelect\r\n","import React, { useEffect, useState } from 'react'\r\nimport { useUtilsStore } from '../../Contexts/utilsStore'\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\nimport { checkForData } from '../../../utils/localStorageInputsUtils'\r\nimport { CurrentSubView } from '../../../models/enums'\r\n\r\ninterface MonoSelectProps {\r\n id: string\r\n choices: any\r\n smallImages: boolean\r\n showCaptions: boolean\r\n handleSelect: (value: string) => void\r\n}\r\n\r\nconst MonoSelect = ({\r\n id,\r\n choices,\r\n smallImages,\r\n showCaptions,\r\n handleSelect\r\n}: MonoSelectProps): JSX.Element => {\r\n const { currentSubView } = useUtilsStore()\r\n const [display, setDisplay] = useState<Array<any>>([])\r\n const [chosen, setChosen] = useState<string>(checkForData(id, ''))\r\n const [overflow, setOverflow] = useState<boolean>(false)\r\n const [style, setStyle] = useState<string>('')\r\n\r\n /**\r\n * On choices props change :\r\n * - fill display state with choices value\r\n * - set overflow and style states depending on the smallImages boolean prop and the number of choices\r\n */\r\n useEffect(() => {\r\n if (choices) {\r\n setDisplay(choices)\r\n if (smallImages) {\r\n if (choices.length > 6) {\r\n setOverflow(true)\r\n setStyle(\r\n 'rf-flex rf-flex-row rf-justify-start rf-align-center rf-overflow-x-scroll rf-pb-4'\r\n )\r\n } else {\r\n setOverflow(false)\r\n setStyle(\r\n `rf-grid ${choices.length > 3 && 'rf-grid-rows-2'} rf-grid-cols-3`\r\n )\r\n }\r\n } else {\r\n if (choices.length > 2) {\r\n setOverflow(true)\r\n setStyle(\r\n 'rf-flex rf-flex-row rf-justify-start rf-align-center rf-overflow-x-scroll rf-pb-4'\r\n )\r\n } else {\r\n setOverflow(false)\r\n setStyle('rf-grid rf-grid-rows-1 rf-grid-cols-2')\r\n }\r\n }\r\n }\r\n }, [choices])\r\n\r\n /**\r\n * On call:\r\n * - check if the component will be rendered in history, if so bypass every interaction\r\n * - fill chosen state with value\r\n * - call parent's handleSelect method\r\n * @param value : string\r\n */\r\n const handleChange = (value: string): void => {\r\n if (currentSubView !== CurrentSubView.history) {\r\n setChosen(value)\r\n handleSelect(value)\r\n }\r\n }\r\n\r\n return display && display.length > 0 ? (\r\n <div\r\n className={`rf-w-full rf-gap-4 rf-text-size-auto rf-text-white ${style} rf-scrollbar-x-custom`}\r\n >\r\n {display.map((choice, key) => {\r\n return (\r\n <div\r\n key={key}\r\n className={`rf-flex rf-flex-col rf-items-start ${\r\n overflow && 'rf-flex-[0_0_40%]'\r\n }`}\r\n >\r\n <label\r\n className={`rf-w-full rf-h-full rf-flex rf-justify-center rf-items-center rf-border-2 rf-rounded-lg ${\r\n choice.value === chosen\r\n ? 'rf-border-primary'\r\n : 'rf-border-formInputRadioCheckboxUncheckedBorder'\r\n } hover:rf-cursor-pointer rf-aspect-square rf-overflow-hidden`}\r\n >\r\n <img src={choice.url} className='rf-max-w-full rf-max-h-full' />\r\n <input\r\n type='radio'\r\n value={choice.value}\r\n checked={choice.value === chosen}\r\n className='rf-input-hidden'\r\n onChange={(): void => handleChange(choice.value)}\r\n />\r\n </label>\r\n {showCaptions && (\r\n <div className='rf-mt-2 rf-truncate'>\r\n {capitalizeFirstLetter(choice.title)}\r\n </div>\r\n )}\r\n </div>\r\n )\r\n })}\r\n </div>\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default MonoSelect\r\n","import React from 'react'\r\nimport { jsxToHtmlElement } from '../../../utils/jsxToHtmlElement'\r\nimport Slider from '../CustomElements/Slider'\r\nimport * as AC from 'adaptivecards'\r\nimport { updateData } from '../../../utils/localStorageInputsUtils'\r\n\r\nexport class SliderClass extends AC.Input {\r\n private _value =\r\n this.minValue && this.maxValue\r\n ? Math.floor((this.minValue + this.maxValue) / 2)\r\n : 50\r\n\r\n public get value(): any {\r\n return this._value\r\n }\r\n\r\n public isSet(): any {\r\n return this._value\r\n }\r\n\r\n static readonly JsonTypeName = 'Retorik.Slider'\r\n\r\n getJsonTypeName(): string {\r\n return SliderClass.JsonTypeName\r\n }\r\n\r\n // Add custom properties to schema\r\n static readonly minValueProperty = new AC.NumProperty(\r\n AC.Versions.v1_0,\r\n 'minValue'\r\n )\r\n\r\n static readonly maxValueProperty = new AC.NumProperty(\r\n AC.Versions.v1_0,\r\n 'maxValue'\r\n )\r\n\r\n static readonly minLabelProperty = new AC.StringProperty(\r\n AC.Versions.v1_0,\r\n 'minLabel',\r\n true\r\n )\r\n\r\n static readonly maxLabelProperty = new AC.StringProperty(\r\n AC.Versions.v1_0,\r\n 'maxLabel',\r\n true\r\n )\r\n\r\n // minValue property accessors\r\n @AC.property(SliderClass.minValueProperty)\r\n get minValue(): number {\r\n return this.getValue(SliderClass.minValueProperty)\r\n }\r\n\r\n set minValue(value: number) {\r\n if (this.minValue !== value) {\r\n this.setValue(SliderClass.minValueProperty, value)\r\n this.updateLayout()\r\n }\r\n }\r\n\r\n // maxValue property accessors\r\n @AC.property(SliderClass.maxValueProperty)\r\n get maxValue(): number {\r\n return this.getValue(SliderClass.maxValueProperty)\r\n }\r\n\r\n set maxValue(value: number) {\r\n if (this.maxValue !== value) {\r\n this.setValue(SliderClass.maxValueProperty, value)\r\n this.updateLayout()\r\n }\r\n }\r\n\r\n // minLabel property accessors\r\n @AC.property(SliderClass.minLabelProperty)\r\n get minLabel(): string {\r\n return this.getValue(SliderClass.minLabelProperty)\r\n }\r\n\r\n set minLabel(value: string) {\r\n if (this.minLabel !== value) {\r\n this.setValue(SliderClass.minLabelProperty, value)\r\n this.updateLayout()\r\n }\r\n }\r\n\r\n // maxLabel property accessors\r\n @AC.property(SliderClass.maxLabelProperty)\r\n get maxLabel(): string {\r\n return this.getValue(SliderClass.maxLabelProperty)\r\n }\r\n\r\n set maxLabel(value: string) {\r\n if (this.maxLabel !== value) {\r\n this.setValue(SliderClass.maxLabelProperty, value)\r\n this.updateLayout()\r\n }\r\n }\r\n\r\n private handleChange = (value: number): void => {\r\n this._value = value\r\n this.id && updateData(this.id, value)\r\n }\r\n\r\n protected internalRender(): HTMLElement {\r\n const element = jsxToHtmlElement(this.renderReact())\r\n return element\r\n }\r\n\r\n protected renderReact = (): JSX.Element => {\r\n return this.id ? (\r\n <Slider\r\n id={this.id}\r\n minValue={this.minValue}\r\n maxValue={this.maxValue}\r\n minLabel={this.minLabel}\r\n maxLabel={this.maxLabel}\r\n handleChangeSlider={this.handleChange}\r\n />\r\n ) : (\r\n <React.Fragment />\r\n )\r\n }\r\n}\r\n","import React, { useState } from 'react'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport { useUtilsStore } from '../../Contexts/utilsStore'\r\nimport { checkForData } from '../../../utils/localStorageInputsUtils'\r\nimport { CurrentSubView } from '../../../models/enums'\r\n\r\ninterface SliderProps {\r\n id: string\r\n minValue?: number\r\n maxValue?: number\r\n minLabel?: string\r\n maxLabel?: string\r\n handleChangeSlider: (value: number) => void\r\n}\r\n\r\nconst Slider = ({\r\n id,\r\n minValue,\r\n maxValue,\r\n minLabel,\r\n maxLabel,\r\n handleChangeSlider\r\n}: SliderProps): JSX.Element => {\r\n const { themeColors } = useView()\r\n const { currentSubView } = useUtilsStore()\r\n const [sliderValue, setSliderValue] = useState<number>(\r\n checkForData(id, ((minValue || 0) + (maxValue || 100)) / 2)\r\n )\r\n const [sliderStyle, setSliderStyle] = useState<string>(\r\n `linear-gradient(to right, ${themeColors.primary} ${\r\n ((sliderValue - (minValue || 0)) /\r\n ((maxValue || 100) - (minValue || 0))) *\r\n 100\r\n }%, #7878805C ${\r\n ((sliderValue - (minValue || 0)) /\r\n ((maxValue || 100) - (minValue || 0))) *\r\n 100\r\n }%)`\r\n )\r\n\r\n /**\r\n * On slider value change :\r\n * - check if the component will be rendered in history, if so bypass every interaction\r\n * - set sliderValue state\r\n * - call parent function with event value\r\n * @param e : changeEvent\r\n */\r\n const handleChange = (e): void => {\r\n if (currentSubView !== CurrentSubView.history) {\r\n setSliderValue(e.target.value)\r\n handleChangeSlider(e.target.value)\r\n }\r\n }\r\n\r\n /**\r\n * On value input in slider :\r\n * - check if the component will be rendered in history, if so bypass every interaction\r\n * - get value as percentage\r\n * - set the slider color depending on the percentage obtained\r\n * @param e : inputEvent\r\n */\r\n const handleOnInput = (e): void => {\r\n if (currentSubView !== CurrentSubView.history) {\r\n // Value as percentage, we substract minValue up and down to get the right percentage if minValue !== 0\r\n const valPourcentage =\r\n ((e.target.value - (minValue || 0)) /\r\n (e.target.max - (minValue || 0))) *\r\n 100\r\n setSliderStyle(\r\n `linear-gradient(to right, ${themeColors.primary} ${valPourcentage}%, #7878805C ${valPourcentage}%)`\r\n )\r\n }\r\n }\r\n\r\n return (\r\n <div\r\n className={`rf-w-full rf-px-6 rf-pt-14 ${\r\n minLabel || maxLabel ? 'rf-pb-5' : 'rf-pb-14'\r\n } rf-rounded-lg rf-text-size-auto rf-text-white`}\r\n style={{ background: 'rgba(0, 0, 0, 0.5)' }}\r\n >\r\n {/* Range input */}\r\n <input\r\n style={{ background: sliderStyle }}\r\n onInput={handleOnInput}\r\n onChange={handleChange}\r\n value={sliderValue}\r\n type='range'\r\n min={minValue || 0}\r\n max={maxValue || 100}\r\n className='rf-slider-custom'\r\n />\r\n\r\n {/* Labels */}\r\n {(minLabel || maxLabel) && (\r\n <div className='rf-w-full rf-mt-5 rf-flex rf-flex-row rf-justify-between rf-items-center'>\r\n {minLabel && <div>{minLabel}</div>}\r\n {maxLabel &&\r\n (minLabel ? (\r\n <div>{maxLabel}</div>\r\n ) : (\r\n <React.Fragment>\r\n {/* If there is only the max label, create a div with empty character inside to have 2 elements, to use parent's flex justify-between property */}\r\n <div>{'\\u2800'}</div>\r\n <div>{maxLabel}</div>\r\n </React.Fragment>\r\n ))}\r\n </div>\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default Slider\r\n","import React from 'react'\r\nimport { jsxToHtmlElement } from '../../../utils/jsxToHtmlElement'\r\nimport * as AC from 'adaptivecards'\r\nimport ActionButton from '../ActionButton'\r\n\r\nexport class ActionSubmitClass extends AC.SubmitAction {\r\n private internalRenderedElement: HTMLElement = document.createElement('div')\r\n\r\n static readonly fullWidthProperty = new AC.BoolProperty(\r\n AC.Versions.v1_0,\r\n 'fullWidth',\r\n false\r\n )\r\n\r\n static readonly positionProperty = new AC.StringProperty(\r\n AC.Versions.v1_0,\r\n 'position',\r\n true,\r\n undefined,\r\n 'left'\r\n )\r\n\r\n static readonly displayProperty = new AC.StringProperty(\r\n AC.Versions.v1_0,\r\n 'display',\r\n true,\r\n undefined,\r\n 'button'\r\n )\r\n\r\n // fullWidth property accessors\r\n @AC.property(ActionSubmitClass.fullWidthProperty)\r\n get fullWidth(): boolean {\r\n return this.getValue(ActionSubmitClass.fullWidthProperty)\r\n }\r\n\r\n set fullWidth(value: boolean) {\r\n if (this.fullWidth !== value) {\r\n this.setValue(ActionSubmitClass.fullWidthProperty, value)\r\n }\r\n }\r\n\r\n // position property accessors\r\n @AC.property(ActionSubmitClass.positionProperty)\r\n get position(): string {\r\n return this.getValue(ActionSubmitClass.positionProperty)\r\n }\r\n\r\n set position(value: string) {\r\n if (this.position !== value) {\r\n this.setValue(ActionSubmitClass.positionProperty, value)\r\n }\r\n }\r\n\r\n // display property accessors\r\n @AC.property(ActionSubmitClass.displayProperty)\r\n get display(): string {\r\n return this.getValue(ActionSubmitClass.displayProperty)\r\n }\r\n\r\n set display(value: string) {\r\n if (this.display !== value) {\r\n this.setValue(ActionSubmitClass.displayProperty, value)\r\n }\r\n }\r\n\r\n get renderedElement(): HTMLElement {\r\n return this.internalRenderedElement\r\n }\r\n\r\n public render(): void {\r\n this.internalRenderedElement = jsxToHtmlElement(this.renderReact())\r\n }\r\n\r\n protected renderReact = (): JSX.Element => {\r\n const props = {\r\n onClick: (): void => this.execute(),\r\n text: this.title,\r\n fullWidth: this.fullWidth,\r\n position: this.position,\r\n display: this.display\r\n }\r\n\r\n return <ActionButton {...props} />\r\n }\r\n}\r\n","import React, { useEffect, useState } from 'react'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport { capitalizeFirstLetter } from '../../utils/capitalizeFirstLetter'\r\nimport translation from '../../translations/inputs.json'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport { DEFAULT_LANGUAGE_DATA } from '../../models/constants'\r\nimport { ArrowRightIcon } from '../Icons/ArrowIcons'\r\nimport { useUtilsStore } from '../Contexts/utilsStore'\r\nimport { CurrentSubView } from '../../models/enums'\r\n\r\ninterface ActionButtonProps {\r\n text?: string\r\n fullWidth: boolean\r\n position: string\r\n display: string\r\n onClick: () => void\r\n}\r\n\r\nconst ActionButton = ({\r\n text,\r\n fullWidth,\r\n position,\r\n display,\r\n onClick\r\n}: ActionButtonProps): JSX.Element => {\r\n const { currentSubView } = useUtilsStore()\r\n const { locale } = useLocaleStore()\r\n const { themeColors } = useView()\r\n const [style, setStyle] = useState<string>()\r\n const [hover, setHover] = useState<boolean>(false)\r\n\r\n useEffect(() => {\r\n // Set width : full or fit\r\n let temp = fullWidth ? 'rf-w-full' : 'rf-w-fit'\r\n // Set position if not in full width\r\n if (!fullWidth && position) {\r\n switch (position) {\r\n case 'right':\r\n temp += ' rf-float-right'\r\n break\r\n case 'center':\r\n temp += ' rf-mx-auto'\r\n break\r\n case 'left':\r\n default:\r\n break\r\n }\r\n }\r\n\r\n setStyle(temp)\r\n }, [])\r\n\r\n const handleClick = (): void => {\r\n if (currentSubView !== CurrentSubView.history) {\r\n setHover(true)\r\n onClick()\r\n }\r\n }\r\n\r\n const handleEnter = (): void => {\r\n if (currentSubView !== CurrentSubView.history) {\r\n setHover(true)\r\n }\r\n }\r\n\r\n const handleLeave = (): void => {\r\n if (currentSubView !== CurrentSubView.history) {\r\n setHover(false)\r\n }\r\n }\r\n\r\n return text && display.toLowerCase() === 'link' ? (\r\n <div\r\n className={`rf-w-full rf-mt-2 rf-flex rf-justify-start rf-items-center rf-text-cardButtonTextDefault ${\r\n currentSubView !== CurrentSubView.history && 'rf-cursor-pointer'\r\n }`}\r\n onPointerEnter={handleEnter}\r\n onPointerLeave={handleLeave}\r\n onClick={handleClick}\r\n >\r\n <div\r\n className={`rf-h-6 rf-w-6 rf-rounded ${\r\n hover\r\n ? 'rf-bg-cardButtonBackgroundHover'\r\n : 'rf-bg-cardButtonBackgroundDefault'\r\n }`}\r\n >\r\n <ArrowRightIcon\r\n className='rf-h-6 rf-p-1 rf-border rf-rounded rf-border-cardButtonBorderDefault'\r\n color={\r\n hover\r\n ? themeColors.card.button.text.hover\r\n : themeColors.card.button.text.default\r\n }\r\n />\r\n </div>\r\n <div className='rf-ml-4'>{capitalizeFirstLetter(text)}</div>\r\n </div>\r\n ) : (\r\n <div\r\n className={` ${\r\n currentSubView !== CurrentSubView.history\r\n ? 'rf-card-button'\r\n : 'rf-card-button-history'\r\n } rf-mt-2 ${fullWidth ? 'rf-text-center' : 'rf-text-left'} ${style}`}\r\n onClick={handleClick}\r\n >\r\n {capitalizeFirstLetter(\r\n text ||\r\n translation[locale]?.submit ||\r\n translation[DEFAULT_LANGUAGE_DATA.default].submit\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default ActionButton\r\n","import React from 'react'\r\nimport { jsxToHtmlElement } from '../../../utils/jsxToHtmlElement'\r\nimport * as AC from 'adaptivecards'\r\nimport ActionButton from '../ActionButton'\r\n\r\nexport class ActionOpenUrlClass extends AC.OpenUrlAction {\r\n private internalRenderedElement: HTMLElement = document.createElement('div')\r\n\r\n static readonly fullWidthProperty = new AC.BoolProperty(\r\n AC.Versions.v1_0,\r\n 'fullWidth',\r\n false\r\n )\r\n\r\n static readonly positionProperty = new AC.StringProperty(\r\n AC.Versions.v1_0,\r\n 'position',\r\n true,\r\n undefined,\r\n 'left'\r\n )\r\n\r\n static readonly displayProperty = new AC.StringProperty(\r\n AC.Versions.v1_0,\r\n 'display',\r\n true,\r\n undefined,\r\n 'button'\r\n )\r\n\r\n // fullWidth property accessors\r\n @AC.property(ActionOpenUrlClass.fullWidthProperty)\r\n get fullWidth(): boolean {\r\n return this.getValue(ActionOpenUrlClass.fullWidthProperty)\r\n }\r\n\r\n set fullWidth(value: boolean) {\r\n if (this.fullWidth !== value) {\r\n this.setValue(ActionOpenUrlClass.fullWidthProperty, value)\r\n }\r\n }\r\n\r\n // position property accessors\r\n @AC.property(ActionOpenUrlClass.positionProperty)\r\n get position(): string {\r\n return this.getValue(ActionOpenUrlClass.positionProperty)\r\n }\r\n\r\n set position(value: string) {\r\n if (this.position !== value) {\r\n this.setValue(ActionOpenUrlClass.positionProperty, value)\r\n }\r\n }\r\n\r\n // display property accessors\r\n @AC.property(ActionOpenUrlClass.displayProperty)\r\n get display(): string {\r\n return this.getValue(ActionOpenUrlClass.displayProperty)\r\n }\r\n\r\n set display(value: string) {\r\n if (this.display !== value) {\r\n this.setValue(ActionOpenUrlClass.displayProperty, value)\r\n }\r\n }\r\n\r\n get renderedElement(): HTMLElement {\r\n return this.internalRenderedElement\r\n }\r\n\r\n public render(): void {\r\n this.internalRenderedElement = jsxToHtmlElement(this.renderReact())\r\n }\r\n\r\n protected renderReact = (): JSX.Element => {\r\n const props = {\r\n onClick: (): void => this.execute(),\r\n text: this.title,\r\n fullWidth: this.fullWidth,\r\n position: this.position,\r\n display: this.display\r\n }\r\n return <ActionButton {...props} />\r\n }\r\n}\r\n","import React from 'react'\r\nimport { jsxToHtmlElement } from '../../../utils/jsxToHtmlElement'\r\nimport * as AC from 'adaptivecards'\r\nimport ActionButton from '../ActionButton'\r\n\r\nexport class ActionShowCardClass extends AC.ShowCardAction {\r\n private internalRenderedElement: HTMLElement = document.createElement('div')\r\n\r\n static readonly fullWidthProperty = new AC.BoolProperty(\r\n AC.Versions.v1_0,\r\n 'fullWidth',\r\n false\r\n )\r\n\r\n static readonly positionProperty = new AC.StringProperty(\r\n AC.Versions.v1_0,\r\n 'position',\r\n true,\r\n undefined,\r\n 'left'\r\n )\r\n\r\n static readonly displayProperty = new AC.StringProperty(\r\n AC.Versions.v1_0,\r\n 'display',\r\n true,\r\n undefined,\r\n 'button'\r\n )\r\n\r\n // fullWidth property accessors\r\n @AC.property(ActionShowCardClass.fullWidthProperty)\r\n get fullWidth(): boolean {\r\n return this.getValue(ActionShowCardClass.fullWidthProperty)\r\n }\r\n\r\n set fullWidth(value: boolean) {\r\n if (this.fullWidth !== value) {\r\n this.setValue(ActionShowCardClass.fullWidthProperty, value)\r\n }\r\n }\r\n\r\n // position property accessors\r\n @AC.property(ActionShowCardClass.positionProperty)\r\n get position(): string {\r\n return this.getValue(ActionShowCardClass.positionProperty)\r\n }\r\n\r\n set position(value: string) {\r\n if (this.position !== value) {\r\n this.setValue(ActionShowCardClass.positionProperty, value)\r\n }\r\n }\r\n\r\n // display property accessors\r\n @AC.property(ActionShowCardClass.displayProperty)\r\n get display(): string {\r\n return this.getValue(ActionShowCardClass.displayProperty)\r\n }\r\n\r\n set display(value: string) {\r\n if (this.display !== value) {\r\n this.setValue(ActionShowCardClass.displayProperty, value)\r\n }\r\n }\r\n\r\n get renderedElement(): HTMLElement {\r\n return this.internalRenderedElement\r\n }\r\n\r\n public render(): void {\r\n this.internalRenderedElement = jsxToHtmlElement(this.renderReact())\r\n }\r\n\r\n protected renderReact = (): JSX.Element => {\r\n const props = {\r\n onClick: (): void => this.execute(),\r\n text: this.title,\r\n fullWidth: this.fullWidth,\r\n position: this.position,\r\n display: this.display\r\n }\r\n return <ActionButton {...props} />\r\n }\r\n}\r\n","import React from 'react'\r\nimport { jsxToHtmlElement } from '../../../utils/jsxToHtmlElement'\r\nimport * as AC from 'adaptivecards'\r\nimport ActionButton from '../ActionButton'\r\n\r\nexport class ActionToggleVisibilityClass extends AC.ToggleVisibilityAction {\r\n private internalRenderedElement: HTMLElement = document.createElement('div')\r\n\r\n static readonly fullWidthProperty = new AC.BoolProperty(\r\n AC.Versions.v1_0,\r\n 'fullWidth',\r\n false\r\n )\r\n\r\n static readonly positionProperty = new AC.StringProperty(\r\n AC.Versions.v1_0,\r\n 'position',\r\n true,\r\n undefined,\r\n 'left'\r\n )\r\n\r\n static readonly displayProperty = new AC.StringProperty(\r\n AC.Versions.v1_0,\r\n 'display',\r\n true,\r\n undefined,\r\n 'button'\r\n )\r\n\r\n // fullWidth property accessors\r\n @AC.property(ActionToggleVisibilityClass.fullWidthProperty)\r\n get fullWidth(): boolean {\r\n return this.getValue(ActionToggleVisibilityClass.fullWidthProperty)\r\n }\r\n\r\n set fullWidth(value: boolean) {\r\n if (this.fullWidth !== value) {\r\n this.setValue(ActionToggleVisibilityClass.fullWidthProperty, value)\r\n }\r\n }\r\n\r\n // position property accessors\r\n @AC.property(ActionToggleVisibilityClass.positionProperty)\r\n get position(): string {\r\n return this.getValue(ActionToggleVisibilityClass.positionProperty)\r\n }\r\n\r\n set position(value: string) {\r\n if (this.position !== value) {\r\n this.setValue(ActionToggleVisibilityClass.positionProperty, value)\r\n }\r\n }\r\n\r\n // display property accessors\r\n @AC.property(ActionToggleVisibilityClass.displayProperty)\r\n get display(): string {\r\n return this.getValue(ActionToggleVisibilityClass.displayProperty)\r\n }\r\n\r\n set display(value: string) {\r\n if (this.display !== value) {\r\n this.setValue(ActionToggleVisibilityClass.displayProperty, value)\r\n }\r\n }\r\n\r\n get renderedElement(): HTMLElement {\r\n return this.internalRenderedElement\r\n }\r\n\r\n public render(): void {\r\n this.internalRenderedElement = jsxToHtmlElement(this.renderReact())\r\n }\r\n\r\n protected renderReact = (): JSX.Element => {\r\n const props = {\r\n onClick: (): void => this.execute(),\r\n text: this.title,\r\n fullWidth: this.fullWidth,\r\n position: this.position,\r\n display: this.display\r\n }\r\n return <ActionButton {...props} />\r\n }\r\n}\r\n","import React, { useEffect } from 'react'\r\nimport useLastEventActivity from '../../hooks/useLastEventActivity'\r\nimport { CurrentSubView, Mode } from '../../models/enums'\r\nimport type { ChatbotData } from '../../models/types'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport HomeView from '../Views/HomeView'\r\nimport NewsView from '../Views/NewsView'\r\nimport WarningBeforeNewsView from '../Views/WarningBeforeNewsView'\r\nimport {\r\n useActivities,\r\n useGetKeyByActivity\r\n} from 'botframework-webchat-api/lib/hooks'\r\nimport { WebChatActivity } from 'botframework-webchat-core'\r\nimport { RetorikActivity } from '../../models/activityTypes'\r\n\r\ninterface RetorikRouterProps {\r\n chatbotData: ChatbotData\r\n externalComponents?: Array<{ name: string; component: JSX.Element }>\r\n}\r\n\r\nconst RetorikRouter = (props: RetorikRouterProps): JSX.Element => {\r\n const {\r\n setCurrentSubView,\r\n mode,\r\n configuration: { isUsedOnBorne }\r\n } = useRetorik()\r\n const {\r\n route,\r\n setRoute,\r\n homeActivityKey,\r\n setHomeActivityKey,\r\n setShowHomeAttachments\r\n } = useView()\r\n const getKeyByActivity = useGetKeyByActivity()\r\n const [activities] = useActivities()\r\n const lastEvent = useLastEventActivity()\r\n\r\n useEffect(() => {\r\n if (lastEvent && lastEvent.type === 'event') {\r\n switch (lastEvent.name) {\r\n case 'news.ShowFlashInfo':\r\n setRoute('news')\r\n break\r\n case 'weather.ShowWeather':\r\n setCurrentSubView(CurrentSubView.weather)\r\n break\r\n default:\r\n break\r\n }\r\n }\r\n }, [lastEvent])\r\n\r\n useEffect(() => {\r\n if (!homeActivityKey) {\r\n const firstActivityId = activities\r\n .slice()\r\n .find(\r\n (activity) =>\r\n activity.type === 'message' && activity.from?.role === 'bot'\r\n )?.replyToId\r\n let attachments: WebChatActivity | undefined\r\n if (firstActivityId) {\r\n attachments = activities\r\n .filter((activity) => activity.replyToId === firstActivityId)\r\n .reverse()\r\n .find(\r\n (act: RetorikActivity) =>\r\n act.attachments && act.attachments.length > 0\r\n )\r\n const key = attachments ? getKeyByActivity(attachments) : undefined\r\n setHomeActivityKey(key)\r\n }\r\n }\r\n\r\n activities &&\r\n activities.length > 0 &&\r\n (activities[activities.length - 1].from?.role === 'bot' ||\r\n activities.some((a) => (a as any).name === 'setUser')) &&\r\n setShowHomeAttachments(undefined)\r\n }, [activities])\r\n\r\n return (\r\n <React.Fragment>\r\n {route === 'home' && <HomeView {...props} />}\r\n {route === 'news' &&\r\n (mode === Mode.vocal || !!isUsedOnBorne ? (\r\n <NewsView {...props} />\r\n ) : (\r\n <WarningBeforeNewsView propsToTransfer={props} />\r\n ))}\r\n </React.Fragment>\r\n )\r\n}\r\n\r\nexport default RetorikRouter\r\n","import { hooks } from 'botframework-webchat'\r\nimport type { RetorikActivity } from '../models/activityTypes'\r\n\r\nconst { useActivities } = hooks\r\n\r\nconst useLastEventActivity = (): RetorikActivity | undefined => {\r\n const [activities] = useActivities()\r\n\r\n return activities\r\n .slice()\r\n .reverse()\r\n .find((activity) => activity.type === 'event')\r\n}\r\n\r\nexport default useLastEventActivity\r\n","import React, { useState, useEffect, useMemo } from 'react'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport { useSpeech } from '../Contexts/SpeechContext'\r\nimport { useUtilsStore } from '../Contexts/utilsStore'\r\n\r\nimport type { ChatbotData, Queue } from '../../models/types'\r\n\r\nimport ChatbotProvider from '@davi-ai/body-engine-sprite'\r\nimport Background from '../Common/Background'\r\nimport UserRequest from '../AnswerPanel/UserRequest'\r\nimport Subtitle from '../Utils/Subtitle'\r\nimport Logo from '../Common/Logo'\r\nimport BotResponse from '../AnswerPanel/BotResponse'\r\nimport useAnimationQueue from '../../hooks/useAnimationQueue'\r\nimport RetorikLogo from '../Common/RetorikLogo'\r\nimport SubViews from './SubViews'\r\nimport { Mode } from '../../models/enums'\r\nimport { ConversationPanel } from '../AnswerPanel/ConversationPanel'\r\nimport MenuDisplayer from '../Menu/MenuDisplayer'\r\n\r\ninterface HomeViewProps {\r\n chatbotData: ChatbotData\r\n externalComponents?: Array<{ name: string; component: JSX.Element }>\r\n}\r\n\r\nconst HomeView = ({\r\n chatbotData,\r\n externalComponents\r\n}: HomeViewProps): JSX.Element => {\r\n const { configuration, agentData } = useRetorik()\r\n const { mode } = useRetorik()\r\n const { configurations, isMobile, setDisplayControls } = useView()\r\n const displayAgent = useUtilsStore((state) => state.displayAgent)\r\n const displayData = useMemo(() => {\r\n return configurations.views.home\r\n }, [configurations])\r\n const lastAnimationQueue = useAnimationQueue()\r\n const { speaking } = useSpeech()\r\n const [animationQueue, setAnimationQueue] = useState<Queue>([])\r\n\r\n useEffect(() => {\r\n lastAnimationQueue && setAnimationQueue(lastAnimationQueue)\r\n }, [lastAnimationQueue])\r\n\r\n useEffect(() => {\r\n setDisplayControls(!configuration.hideControls)\r\n }, [])\r\n\r\n return (\r\n <React.Fragment>\r\n {/* Background */}\r\n <Background config={displayData.background} />\r\n\r\n {/* Logo */}\r\n {configuration?.logo &&\r\n (!isMobile || (isMobile && mode !== Mode.text)) && <Logo />}\r\n\r\n {/* Chatbot + Subtitles */}\r\n {(!isMobile || (isMobile && mode !== Mode.text)) &&\r\n chatbotData &&\r\n agentData &&\r\n displayAgent && (\r\n <React.Fragment>\r\n <div className='rf-relative rf-col-start-1 rf-col-end-9 large:rf-col-end-6 large-vertical:rf-col-end-9 rf-row-span-full rf-self-end rf-h-full'>\r\n <ChatbotProvider\r\n licence='licence'\r\n agentData={agentData}\r\n height={chatbotData?.height}\r\n size={chatbotData?.size}\r\n speak={speaking}\r\n animationQueue={animationQueue}\r\n setAnimationQueue={setAnimationQueue}\r\n />\r\n </div>\r\n <Subtitle />\r\n </React.Fragment>\r\n )}\r\n\r\n {/* Activity input / output */}\r\n {configuration?.answerpanel !== false && (\r\n <React.Fragment>\r\n <UserRequest />\r\n {mode === Mode.vocal ? <BotResponse /> : <ConversationPanel />}\r\n </React.Fragment>\r\n )}\r\n\r\n {/* Menus */}\r\n <MenuDisplayer hideMenu={configuration?.hideMenu} />\r\n\r\n {/* Miscellaneous */}\r\n <SubViews externalComponents={externalComponents} />\r\n\r\n {/* Retorik Logo on right bottom */}\r\n {!configuration?.hideRetorikLogo && <RetorikLogo />}\r\n </React.Fragment>\r\n )\r\n}\r\n\r\nexport default HomeView\r\n","import React, { useState, useEffect, ReactEventHandler, useRef } from 'react'\r\nimport BackgroundVideo from '../Utils/BackgroundVideo'\r\nimport Webcam from 'react-webcam'\r\nimport type { BackgroundOptions } from '../../models/types'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport useRefDimensions from '../../hooks/useRefDimensions'\r\n\r\ntype BackgroundProps = {\r\n config: BackgroundOptions\r\n videoLoop?: boolean\r\n videoMuted?: boolean\r\n onVideoEnded?: ReactEventHandler<HTMLVideoElement>\r\n onVideoCanPlay?: ReactEventHandler<HTMLVideoElement>\r\n}\r\n\r\nconst Background = ({\r\n config,\r\n videoLoop,\r\n videoMuted,\r\n onVideoEnded,\r\n onVideoCanPlay\r\n}: BackgroundProps): JSX.Element => {\r\n const webcamRotation = useView().configurations.webcamRotation\r\n const [isWebcamAllowed, setIsWebcamAllowed] = useState<boolean>(false)\r\n const imageRef = useRef<HTMLImageElement>(null)\r\n const dimensions = useRefDimensions(imageRef)\r\n const source: {\r\n facingMode?: string | { exact: string }\r\n deviceId?: string\r\n } = {}\r\n const [videoDimensions, setVideoDimensions] = useState<{\r\n width?: number\r\n height?: number\r\n }>(dimensions)\r\n const [rotation, setRotation] = useState<string>('')\r\n const [webcamSizeStyle, setWebcamSizeStyle] = useState<{\r\n width?: string\r\n height?: string\r\n }>({})\r\n const blurValue = {\r\n '--rf-blur-background': config.blur !== undefined ? `${config.blur}px` : '0'\r\n } as React.CSSProperties\r\n\r\n if (config.style === 'webcam' && config.webcam) {\r\n switch (config.webcam) {\r\n case 'back':\r\n source.facingMode = { exact: 'environment' }\r\n break\r\n case 'front':\r\n case undefined:\r\n source.facingMode = 'user'\r\n break\r\n default:\r\n source.deviceId = config.webcam\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n if (config.style === 'webcam') {\r\n askForWebcamPermission()\r\n }\r\n }, [])\r\n\r\n const askForWebcamPermission = async (): Promise<void> => {\r\n navigator?.mediaDevices &&\r\n navigator.mediaDevices\r\n .getUserMedia({ video: true })\r\n .then(() => {\r\n setIsWebcamAllowed(true)\r\n })\r\n .catch((error) => {\r\n console.log(error)\r\n setIsWebcamAllowed(false)\r\n })\r\n }\r\n\r\n useEffect(\r\n function updateVideoDimensions() {\r\n if (config.style === 'webcam') {\r\n if (!webcamRotation || webcamRotation % 180 === 0) {\r\n setVideoDimensions(dimensions)\r\n } else {\r\n setVideoDimensions({\r\n height: dimensions.width,\r\n width: dimensions.height\r\n })\r\n }\r\n }\r\n },\r\n [dimensions]\r\n )\r\n\r\n useEffect(\r\n function updateRotation() {\r\n switch (webcamRotation) {\r\n case 90:\r\n setRotation('rf-rotate-90 rf-origin-center')\r\n setWebcamSizeStyle({\r\n width: '100vh',\r\n height: '100vw'\r\n })\r\n break\r\n case -90:\r\n setRotation('rf--rotate-90 rf-origin-center')\r\n setWebcamSizeStyle({\r\n width: '100vh',\r\n height: '100vw'\r\n })\r\n break\r\n case 180:\r\n setRotation('rf-rotate-180 rf-origin-center')\r\n setWebcamSizeStyle({})\r\n break\r\n default:\r\n setRotation('')\r\n setWebcamSizeStyle({})\r\n break\r\n }\r\n },\r\n [webcamRotation]\r\n )\r\n\r\n return (\r\n <React.Fragment>\r\n {config.image && (\r\n <img\r\n ref={imageRef}\r\n src={config.image}\r\n alt='background image'\r\n className='rf-col-span-full rf-row-span-full rf-w-full rf-h-full rf-object-cover rf-filter rf-blur-background'\r\n style={blurValue}\r\n />\r\n )}\r\n {config.style === 'video' && config.video && (\r\n <BackgroundVideo\r\n source={config.video}\r\n loop={!!videoLoop}\r\n muted={!!videoMuted}\r\n onVideoEnded={onVideoEnded}\r\n onVideoCanPlay={onVideoCanPlay}\r\n style={blurValue}\r\n />\r\n )}\r\n {config.style === 'webcam' && isWebcamAllowed && (\r\n <Webcam\r\n className={`rf-relative rf-col-span-full rf-row-span-full rf-overflow-hidden rf-max-w-none rf-w-screen rf-h-screen rf-filter rf-blur-background rf-border rf-self-center rf-justify-self-center rf-object-cover ${rotation}`}\r\n {...videoDimensions}\r\n style={{\r\n ...blurValue,\r\n ...webcamSizeStyle\r\n }}\r\n audio={false}\r\n videoConstraints={{ ...source, ...videoDimensions }}\r\n />\r\n )}\r\n </React.Fragment>\r\n )\r\n}\r\n\r\nexport default Background\r\n","import React, { ReactEventHandler, useEffect, useRef } from 'react'\r\nimport { useView } from '../Contexts/ViewContext'\r\n\r\ninterface BackgroundVideoProps {\r\n source: string\r\n style?: React.CSSProperties\r\n loop?: boolean\r\n muted?: boolean\r\n onVideoEnded?: ReactEventHandler<HTMLVideoElement>\r\n onVideoCanPlay?: ReactEventHandler<HTMLVideoElement>\r\n}\r\n\r\nconst BackgroundVideo = ({\r\n source,\r\n style,\r\n loop,\r\n muted,\r\n onVideoEnded,\r\n onVideoCanPlay\r\n}: BackgroundVideoProps): JSX.Element => {\r\n const { currentHeight, currentWidth } = useView()\r\n const videoRef = useRef<HTMLVideoElement>(null)\r\n\r\n useEffect(() => {\r\n if (videoRef.current) {\r\n videoRef.current.pause()\r\n videoRef.current.load()\r\n videoRef.current.play()\r\n }\r\n }, [videoRef])\r\n\r\n return (\r\n <video\r\n ref={videoRef}\r\n id='retorik-background-video'\r\n className='rf-relative rf-col-span-full rf-row-span-full rf-object-cover rf-overflow-hidden rf-filter rf-blur-background'\r\n onEnded={onVideoEnded}\r\n onError={onVideoEnded}\r\n onCanPlay={onVideoCanPlay}\r\n autoPlay\r\n loop={loop}\r\n muted={muted}\r\n style={{\r\n ...style,\r\n height: currentHeight,\r\n width: currentWidth\r\n }}\r\n >\r\n <source src={source} />\r\n </video>\r\n )\r\n}\r\n\r\nexport default BackgroundVideo\r\n","import React, { useEffect, useState } from 'react'\r\n\r\ntype Dimensions = {\r\n width: number\r\n height: number\r\n}\r\n\r\nconst useRefDimensions = (ref: React.RefObject<HTMLElement>): Dimensions => {\r\n const [dimensions, setDimensions] = useState<Dimensions>({\r\n width: 1,\r\n height: 1\r\n })\r\n const [windowSize, setWindowSize] = useState<{\r\n width: number\r\n height: number\r\n }>({ width: window.innerWidth, height: window.innerHeight })\r\n const handleResize = (): void => {\r\n setWindowSize({ width: window.innerWidth, height: window.innerHeight })\r\n }\r\n useEffect(() => {\r\n window.addEventListener('resize', handleResize)\r\n if (ref.current) {\r\n const { width, height } = ref.current.getBoundingClientRect()\r\n setDimensions({ width, height })\r\n }\r\n return (): void => window.removeEventListener('resize', handleResize)\r\n }, [ref, windowSize])\r\n return dimensions\r\n}\r\n\r\nexport default useRefDimensions\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React from 'react'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport { DeviceType, Mode } from '../../models/enums'\r\nimport VoiceInput from './VoiceInput'\r\nimport SendTextBox from '../Utils/SendTextBox'\r\n\r\nconst UserRequest = (): JSX.Element => {\r\n const { mode } = useRetorik()\r\n const { isMobile, currentDeviceType, mediumLandscape } = useView()\r\n\r\n return (\r\n <React.Fragment>\r\n {!isMobile && (\r\n <div\r\n className={`rf-relative rf-h-full\r\n ${\r\n currentDeviceType === DeviceType.borne && mode === Mode.vocal\r\n ? 'rf-w-4/9'\r\n : 'rf-w-3/5'\r\n }\r\n ${\r\n mode === Mode.text && mediumLandscape\r\n ? 'rf-col-start-4'\r\n : 'rf-col-start-5'\r\n } rf-col-span-full rf-row-start-1 ${\r\n mode === Mode.text ? 'rf-row-end-4' : 'rf-row-end-5'\r\n } rf-py-4\r\n large-vertical:rf-col-start-1 large-vertical:rf-col-span-full large-vertical:rf-row-start-5 large-vertical:rf-row-end-7\r\n large-vertical:rf-py-5\r\n rf-flex rf-flex-col rf-justify-self-center rf-justify-end rf-text-size-auto rf-text-trueblack`}\r\n id='retorik-userRequest'\r\n >\r\n {mode === Mode.text ? (\r\n <SendTextBox withButton={true} />\r\n ) : (\r\n <VoiceInput />\r\n )}\r\n </div>\r\n )}\r\n </React.Fragment>\r\n )\r\n}\r\n\r\nexport default UserRequest\r\n","import React, { useEffect, useState, useRef } from 'react'\r\nimport { hooks } from 'botframework-webchat'\r\nimport { useView } from '../Contexts/ViewContext'\r\n\r\nconst { useDictateState, useDictateInterims } = hooks\r\n\r\ninterface VoiceInputProps {\r\n className?: string\r\n setListening?: (x: boolean) => void\r\n}\r\n\r\nconst VoiceInput = ({\r\n className,\r\n setListening\r\n}: VoiceInputProps): JSX.Element => {\r\n const { isMobile } = useView()\r\n const dictateState = useDictateState()[0]\r\n const [dictateInterims] = useDictateInterims()\r\n const [textToDisplay, setTextToDisplay] = useState<string>('\\u2800')\r\n const [hideText, setHideText] = useState<boolean>(true)\r\n const timerRef: React.MutableRefObject<any> = useRef(null)\r\n\r\n useEffect(() => {\r\n if (dictateState === 2 || dictateState === 3) {\r\n if (dictateInterims.length > 0 && dictateInterims[0].length > 0) {\r\n setHideText(false)\r\n }\r\n } else {\r\n timerRef &&\r\n (timerRef.current = setTimeout(() => {\r\n setHideText(true)\r\n setTextToDisplay('\\u2800')\r\n setListening && setListening(false)\r\n }, 1500))\r\n }\r\n\r\n return (): void => {\r\n timerRef && clearTimeout(timerRef.current)\r\n }\r\n }, [dictateState, dictateInterims])\r\n\r\n /**\r\n * On dictateInterims change :\r\n * - update textToDisplay state\r\n */\r\n useEffect(() => {\r\n dictateInterims[0] && setTextToDisplay(dictateInterims[0])\r\n }, [dictateInterims])\r\n\r\n return !hideText ? (\r\n isMobile ? (\r\n <p className={className}>{textToDisplay}</p>\r\n ) : (\r\n <div className='rf-w-full rf-px-4 rf-py-3 rf-subtitle-size-auto rf-font-bold rf-text-truewhite rf-text-shadow-black'>\r\n {textToDisplay}\r\n </div>\r\n )\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default VoiceInput\r\n","import React from 'react'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\n\r\ninterface LogoProps {\r\n className?: string\r\n}\r\n\r\nconst Logo = ({ className }: LogoProps): JSX.Element => {\r\n const { configuration } = useRetorik()\r\n\r\n return configuration.logo?.src ? (\r\n <div\r\n className={`${\r\n className || 'rf-absolute rf-m-4 large:rf-m-8 rf-top-0 rf-left-0'\r\n }`}\r\n >\r\n <img\r\n src={configuration.logo?.src}\r\n alt='Logo'\r\n className='rf-max-h-12 rf-max-w-16 large:rf-max-h-28 large:rf-max-w-[12rem] large-vertical:rf-max-h-36'\r\n />\r\n </div>\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default Logo\r\n","/* eslint-disable no-unused-expressions */\r\nimport React, { useEffect, useState } from 'react'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport { useSpeech } from '../Contexts/SpeechContext'\r\nimport { hooks } from 'botframework-webchat'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { useUtilsStore, setListClosed } from '../Contexts/utilsStore'\r\nimport useCurrentOrLastPlayedActivity from '../../hooks/useCurrentOrLastPlayedActivity'\r\nimport ListTemplate from '../Templates/List'\r\nimport Attachments from '../Attachments/Attachments'\r\n\r\nconst { useSendBoxSpeechInterimsVisible } = hooks\r\n\r\nconst BotResponse = (): JSX.Element => {\r\n const { showHomeAttachments } = useView()\r\n const { speaking } = useSpeech()\r\n const activity = useCurrentOrLastPlayedActivity()\r\n const { displaySubtitles } = useRetorik()\r\n const listClosed = useUtilsStore((state) => state.listClosed)\r\n const [interimsVisible] = useSendBoxSpeechInterimsVisible()\r\n const [list, setList] = useState<boolean>()\r\n const [rowSpanVertical, setRowSpanVertical] = useState<string>(\r\n 'rf-row-span-6 small-mobile:rf-row-span-7'\r\n )\r\n\r\n useEffect(() => {\r\n setRowSpanVertical(\r\n displaySubtitles && speaking\r\n ? 'rf-row-span-5 small-mobile:rf-row-span-6'\r\n : 'rf-row-span-6 small-mobile:rf-row-span-7'\r\n )\r\n }, [displaySubtitles, speaking])\r\n\r\n useEffect(() => {\r\n if (activity) {\r\n if (\r\n activity.attachmentLayout?.toLowerCase() === 'davilist' ||\r\n (activity.attachmentLayout !== 'carousel' &&\r\n activity.attachments &&\r\n activity.attachments.length > 1)\r\n ) {\r\n setList(true)\r\n } else {\r\n setList(false)\r\n }\r\n }\r\n }, [activity])\r\n\r\n return showHomeAttachments &&\r\n (showHomeAttachments as any).attachments?.length > 0 ? (\r\n <div\r\n id='retorik-botResponse'\r\n className={`rf-relative rf-w-full rf-h-full\r\n rf-col-start-1 large-vertical:rf-col-start-1 large:rf-col-start-5 rf-col-span-full\r\n rf-row-start-6 small-mobile:rf-row-start-5 large:rf-row-start-5 large-vertical:rf-row-start-7 ${rowSpanVertical} large:rf-row-span-full large-vertical:rf-row-span-4\r\n rf-overflow-y-scroll rf-scrollbar-thin\r\n `}\r\n >\r\n <div className='rf-w-full rf-h-full rf-flex rf-justify-center'>\r\n <Attachments activity={showHomeAttachments} />\r\n </div>\r\n </div>\r\n ) : activity?.type === 'message' ? (\r\n list ? (\r\n !interimsVisible && !listClosed ? (\r\n <ListTemplate\r\n activity={activity}\r\n onClose={(): void => setListClosed(true)}\r\n />\r\n ) : (\r\n <React.Fragment />\r\n )\r\n ) : (\r\n <div\r\n id='retorik-botResponse'\r\n className={`rf-relative rf-w-full rf-h-full\r\n rf-col-start-1 large-vertical:rf-col-start-1 large:rf-col-start-5 rf-col-span-full\r\n rf-row-start-6 small-mobile:rf-row-start-5 large:rf-row-start-5 large-vertical:rf-row-start-7 ${rowSpanVertical} large:rf-row-span-full large-vertical:rf-row-span-4\r\n rf-overflow-y-scroll rf-scrollbar-thin\r\n `}\r\n >\r\n <div className='rf-w-full rf-h-full rf-flex rf-justify-center'>\r\n {!!activity?.attachments?.length && (\r\n <Attachments activity={activity} />\r\n )}\r\n </div>\r\n </div>\r\n )\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default BotResponse\r\n","import { hooks } from 'botframework-webchat'\r\nimport { useSpeech } from '../components/Contexts/SpeechContext'\r\nimport type { RetorikActivity } from '../models/activityTypes'\r\n\r\nconst { useActivities } = hooks\r\n\r\nexport default function useCurrentOrLastPlayedActivity():\r\n | RetorikActivity\r\n | undefined {\r\n const [activities] = useActivities()\r\n const { currentPlaying } = useSpeech()\r\n const { endedActivities } = useSpeech()\r\n\r\n if (!currentPlaying) {\r\n if (endedActivities.length > 0) {\r\n return (\r\n activities.find(\r\n (activity) =>\r\n activity.id === endedActivities[endedActivities.length - 1]\r\n ) || undefined\r\n )\r\n }\r\n } else {\r\n return currentPlaying\r\n }\r\n\r\n return undefined\r\n}\r\n","import React from 'react'\r\nimport type { RetorikActivity } from '../../models/activityTypes'\r\nimport ListContextProvider from '../Contexts/ListContextProvider'\r\nimport ListContent from '../Display/List'\r\n\r\ninterface ListProps {\r\n activity?: RetorikActivity\r\n onClose?: () => void\r\n}\r\n\r\nconst List = ({ activity, onClose }: ListProps): JSX.Element => {\r\n return (\r\n <ListContextProvider>\r\n <ListContent activity={activity} onClose={onClose} />\r\n </ListContextProvider>\r\n )\r\n}\r\n\r\nexport default List\r\n","import React from 'react'\r\nimport { ListProvider } from './ListContext'\r\n\r\nconst ListContextProvider = ({ children }): JSX.Element => {\r\n return <ListProvider>{children}</ListProvider>\r\n}\r\n\r\nexport default ListContextProvider\r\n","import React, { useEffect, useState, useRef } from 'react'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport { useList } from '../Contexts/ListContext'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport { capitalizeFirstLetter } from '../../utils/capitalizeFirstLetter'\r\nimport { useUtilsStore, setLastListActivity } from '../Contexts/utilsStore'\r\nimport { Mode } from '../../models/enums'\r\nimport Template from '../Templates/FullScreenRemoteClosing'\r\nimport Title from './Parts/Title'\r\nimport FilterLarge from './Parts/FilterLarge'\r\nimport FilterMobile from './Parts/FilterMobile'\r\nimport ChosenItem from './Parts/Filter/ChosenItem'\r\nimport ListContainer from './Parts/ListContainer'\r\nimport Suggestions from './Parts/Suggestions'\r\n\r\nconst List = ({ activity, onClose }): JSX.Element => {\r\n const { mode } = useRetorik()\r\n const { isMobile } = useView()\r\n const { content, filters, selectedFilters, setContent } = useList()\r\n const { locale } = useLocaleStore()\r\n const { lastListActivity } = useUtilsStore()\r\n const [mobileFiltersOpened, setMobileFiltersOpened] = useState<boolean>(false)\r\n const [largeFilterOpenedKey, setLargeFilterOpenedKey] = useState<\r\n number | undefined\r\n >(undefined)\r\n const scrollRef = useRef<HTMLDivElement>(null)\r\n\r\n /**\r\n * On call :\r\n * - set ListContext's content state to undefined\r\n */\r\n const handleClose = (): void => {\r\n onClose && onClose()\r\n setContent(undefined)\r\n }\r\n\r\n /**\r\n * On activity prop change :\r\n * - check if the activity has already been displayed or not, using utilsStore's lastListActivity state\r\n * - if the activity hasn't been displayed yet, set ListContext's content state with the activity\r\n * On component unmount :\r\n * - set utilsStore's lastListActivity state to the current activity's id\r\n */\r\n useEffect(() => {\r\n activity && activity.id !== lastListActivity && setContent(activity)\r\n\r\n return (): void => {\r\n activity?.id && setLastListActivity(activity.id)\r\n }\r\n }, [activity])\r\n\r\n /**\r\n * On call :\r\n * - scroll to the scrollRef HTML element at the top of the view\r\n */\r\n const scrollToRef = (): void => {\r\n if (scrollRef && scrollRef.current !== null) {\r\n scrollRef.current.scrollIntoView({\r\n behavior: 'smooth'\r\n })\r\n }\r\n }\r\n\r\n /**\r\n * On content change :\r\n * - call scrollToRef method\r\n */\r\n useEffect(() => {\r\n const timer =\r\n content && isMobile\r\n ? setTimeout(() => {\r\n scrollToRef()\r\n }, 100)\r\n : null\r\n\r\n return (): void => {\r\n timer && clearTimeout(timer)\r\n }\r\n }, [content])\r\n\r\n return content ? (\r\n <Template\r\n className='large:rf-px-16 rf-flex rf-flex-col large:rf-h-full'\r\n handleClose={handleClose}\r\n onClick={\r\n isMobile\r\n ? (): void => {}\r\n : (): void => setLargeFilterOpenedKey(undefined)\r\n }\r\n remoteCloseButtonZIndex='rf-z-util'\r\n >\r\n {isMobile && filters.length > 0 && (\r\n <FilterMobile\r\n setFiltersOpened={setMobileFiltersOpened}\r\n handleClose={handleClose}\r\n />\r\n )}\r\n\r\n <div className='rf-w-full rf-overflow-y-scroll rf-scrollbar-hidden'>\r\n <div ref={scrollRef} />\r\n <div\r\n className={`${\r\n mobileFiltersOpened ? 'rf-hidden' : 'rf-flex'\r\n } rf-flex-col rf-items-start large:rf-pt-16 large-vertical:rf-pt-[20vh]`}\r\n >\r\n {content.text && (\r\n <Title\r\n className='rf-ml-2 rf-mt-8 large:rf-ml-0 large:rf-mt-0'\r\n title={capitalizeFirstLetter(content.text, locale)}\r\n numberOfResults={content.channelData?.numberOfResults || 0}\r\n />\r\n )}\r\n\r\n {!isMobile && filters.length > 0 && (\r\n <FilterLarge\r\n openedFilterKey={largeFilterOpenedKey}\r\n setOpenedFilterKey={setLargeFilterOpenedKey}\r\n />\r\n )}\r\n\r\n {isMobile && (\r\n <div className='rf-flex rf-flex-row rf-mx-2 rf-gap-2 rf-mb-2 rf-flex-wrap'>\r\n {selectedFilters?.map((chosenFilter, key1) => {\r\n return chosenFilter.items.map((name, key2) => {\r\n return (\r\n <ChosenItem\r\n className='rf-px-2'\r\n key={`${key1}-${key2}`}\r\n name={name}\r\n parent={{\r\n id: chosenFilter.id,\r\n title: chosenFilter.title\r\n }}\r\n />\r\n )\r\n })\r\n })}\r\n </div>\r\n )}\r\n\r\n <ListContainer\r\n hasFilterOrSuggestedAction={\r\n filters.length > 0 ||\r\n content.suggestedActions?.actions?.length > 0\r\n }\r\n />\r\n\r\n {content.suggestedActions?.actions &&\r\n content.suggestedActions.actions.length > 0 && (\r\n <Suggestions\r\n className={`rf-px-2 ${\r\n mode === Mode.text ? 'rf-mb-28' : 'rf-mb-16'\r\n } large:rf-px-0 large:rf-mb-4`}\r\n suggestions={content.suggestedActions.actions}\r\n handleClose={handleClose}\r\n />\r\n )}\r\n </div>\r\n </div>\r\n </Template>\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default List\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React from 'react'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport { DeviceType } from '../../models/enums'\r\nimport type { TemplateDefaultProps } from '../../models/types'\r\nimport { FullScreenRemote } from '.'\r\nimport CloseButton from '../Common/CloseButton'\r\nimport AbsoluteLargeClosingButton from '../Utils/AbsoluteLargeClosingButton'\r\nimport { BackButton } from '../Menu/Common'\r\n\r\ntype FullScreenRemoteClosingProps = TemplateDefaultProps & {\r\n closeButtonClassName?: string\r\n remoteCloseButtonZIndex?: string\r\n mobileReturnTitle?: string\r\n handleClose: () => void\r\n onClick?: () => void\r\n}\r\n\r\nconst FullScreenRemoteClosing = ({\r\n className,\r\n background,\r\n closeButtonClassName,\r\n remoteCloseButtonZIndex,\r\n mobileReturnTitle,\r\n handleClose,\r\n onClick,\r\n children\r\n}: FullScreenRemoteClosingProps): JSX.Element => {\r\n const { currentDeviceType, isMobile } = useView()\r\n\r\n return (\r\n <React.Fragment>\r\n <FullScreenRemote\r\n className={className}\r\n background={background}\r\n onClick={onClick}\r\n >\r\n {/* Close button for landscape and borne modes */}\r\n {currentDeviceType === DeviceType.landscape && (\r\n <CloseButton\r\n onClick={handleClose}\r\n className={closeButtonClassName}\r\n showLabel={true}\r\n />\r\n )}\r\n\r\n {/* Close button for mobile / widget modes if it is especilly demanded */}\r\n {isMobile && mobileReturnTitle && (\r\n <BackButton\r\n title={mobileReturnTitle}\r\n handleBack={handleClose}\r\n className='rf-p-4 rf-text-size-auto'\r\n />\r\n )}\r\n\r\n {children}\r\n </FullScreenRemote>\r\n\r\n {currentDeviceType === DeviceType.borne && (\r\n <AbsoluteLargeClosingButton\r\n dashboardVisible={true}\r\n zIndexClassname={remoteCloseButtonZIndex}\r\n onClick={handleClose}\r\n />\r\n )}\r\n </React.Fragment>\r\n )\r\n}\r\n\r\nexport default FullScreenRemoteClosing\r\n","import Desktop from './Desktop'\r\nimport FullScreen from './FullScreen'\r\nimport FullScreenMobile from './FullScreenMobile'\r\nimport FullScreenRemote from './FullScreenRemote'\r\nimport FullScreenRemoteClosing from './FullScreenRemoteClosing'\r\nimport Grid from './Grid'\r\nimport List from './List'\r\nimport SubMenu from './SubMenu'\r\nimport SubMenuClosing from './SubMenuClosing'\r\n\r\nexport {\r\n Desktop,\r\n FullScreen,\r\n FullScreenMobile,\r\n FullScreenRemote,\r\n FullScreenRemoteClosing,\r\n Grid,\r\n List,\r\n SubMenu,\r\n SubMenuClosing\r\n}\r\n","import React from 'react'\r\nimport type { TemplateDefaultProps } from '../../models/types'\r\n\r\nconst Desktop = ({\r\n className,\r\n background,\r\n children\r\n}: TemplateDefaultProps): JSX.Element => {\r\n return (\r\n <div\r\n className={`rf-z-dropdown rf-relative rf-col-start-5 rf-col-end-13 rf-row-start-1 rf-row-span-full rf-w-3/5 rf-justify-self-center tactile:rf-pt-1/5 rf-flex rf-flex-col rf-justify-start rf-items-center rf-bg-templateBackground rf-shadow-[3px_3px_6px_#00000029] rf-overflow-y-scroll rf-scrollbar-hidden ${className}`}\r\n style={{ background: background || '' }}\r\n >\r\n {children}\r\n </div>\r\n )\r\n}\r\n\r\nexport default Desktop\r\n","import React, { useState, useEffect } from 'react'\r\nimport type { TemplateDefaultProps } from '../../models/types'\r\nimport { Depth } from '../../models/enums'\r\n\r\nconst FullScreen = ({\r\n className,\r\n depth,\r\n background,\r\n children\r\n}: TemplateDefaultProps): JSX.Element => {\r\n const [zindex, setzindex] = useState<string>('rf-z-ui')\r\n\r\n useEffect(() => {\r\n switch (depth) {\r\n case Depth.background:\r\n setzindex('rf-z-background')\r\n break\r\n case Depth.util:\r\n setzindex('rf-z-util')\r\n break\r\n case Depth.chatbot:\r\n setzindex('rf-z-chatbot')\r\n break\r\n case Depth.ui:\r\n setzindex('rf-z-ui')\r\n break\r\n case Depth.dropdown:\r\n setzindex('rf-z-dropdown')\r\n break\r\n case Depth.overlay:\r\n setzindex('rf-z-overlay')\r\n break\r\n case Depth.modal:\r\n setzindex('rf-z-modal')\r\n break\r\n case Depth.exitwidget:\r\n setzindex('rf-z-exitwidget')\r\n break\r\n case Depth.menu:\r\n setzindex('rf-z-menu')\r\n break\r\n default:\r\n setzindex('rf-z-dropdown')\r\n break\r\n }\r\n }, [depth])\r\n\r\n return (\r\n <div\r\n className={`rf-relative ${zindex} rf-col-start-1 rf-col-span-full rf-row-start-1 rf-row-span-full rf-text-trueblack ${className}`}\r\n style={{\r\n background:\r\n background || 'linear-gradient(to right bottom, #F8F8FC , #E1E2E8)'\r\n }}\r\n >\r\n {children}\r\n </div>\r\n )\r\n}\r\n\r\nexport default FullScreen\r\n","import React from 'react'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport type { TemplateDefaultProps } from '../../models/types'\r\nimport { FullScreen } from '.'\r\n\r\nconst FullScreenMobile = ({\r\n className,\r\n depth,\r\n background,\r\n children\r\n}: TemplateDefaultProps): JSX.Element => {\r\n const { isMobile, displayControls } = useView()\r\n\r\n return (\r\n <FullScreen\r\n className={`${\r\n isMobile && displayControls && 'rf-mb-12'\r\n } rf-p-4 rf-flex rf-flex-col ${className}`}\r\n depth={depth}\r\n background={background || '#FFFFFF'}\r\n >\r\n {children}\r\n </FullScreen>\r\n )\r\n}\r\n\r\nexport default FullScreenMobile\r\n","import React from 'react'\r\nimport type { TemplateDefaultProps } from '../../models/types'\r\n\r\nconst FullScreenRemote = ({\r\n className,\r\n background,\r\n onClick,\r\n children\r\n}: TemplateDefaultProps): JSX.Element => {\r\n return (\r\n <div\r\n className={`rf-z-util rf-relative rf-overflow-y-scroll rf-scrollbar-hidden rf-text-black rf-text-size-auto rf-bg-templateBackground large:rf-mr-30 rf-col-span-full rf-row-span-full ${className}`}\r\n style={{ background: background || '' }}\r\n onClick={onClick ? (): void => onClick() : (): void => {}}\r\n >\r\n {children}\r\n </div>\r\n )\r\n}\r\n\r\nexport default FullScreenRemote\r\n","import React from 'react'\r\nimport type { WithChildren } from '../../models/utils'\r\n\r\nconst Grid = ({ children }: WithChildren): JSX.Element => {\r\n return (\r\n <div className='rf-grid rf-grid-cols-2 large:rf-grid-cols-5 large-vertical:rf-grid-cols-3 rf-gap-4 large:rf-gap-6'>\r\n {React.Children.map(children, (child) => {\r\n return child\r\n })}\r\n </div>\r\n )\r\n}\r\n\r\nexport default Grid\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React from 'react'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport type { TemplateDefaultProps } from '../../models/types'\r\nimport { Depth, DeviceType } from '../../models/enums'\r\nimport { Desktop, FullScreenMobile, FullScreenRemote } from '.'\r\nimport Logo from '../Common/Logo'\r\nimport AbsoluteLargeClosingButton from '../Utils/AbsoluteLargeClosingButton'\r\n\r\nconst SubMenu = ({\r\n background,\r\n onClick,\r\n children\r\n}: TemplateDefaultProps): JSX.Element => {\r\n const { currentDeviceType, isMobile } = useView()\r\n\r\n return (\r\n <React.Fragment>\r\n {/* Closing button over remote on large displays */}\r\n {!isMobile && onClick && (\r\n <AbsoluteLargeClosingButton\r\n dashboardVisible={true}\r\n zIndexClassname='rf-z-util'\r\n onClick={onClick}\r\n />\r\n )}\r\n\r\n {currentDeviceType === DeviceType.borne ? (\r\n <FullScreenRemote\r\n className='rf-z-dropdown rf-flex rf-flex-col rf-pt-[25vh] rf-pb-[15vh] rf-justify-start rf-items-center rf-shadow-[20px_3px_20px_#00000029] rf-overflow-y-scroll rf-scrollbar-hidden'\r\n background={background || '#FFFFFF'}\r\n >\r\n <Logo />\r\n {children}\r\n </FullScreenRemote>\r\n ) : currentDeviceType === DeviceType.landscape ? (\r\n <Desktop background={background || '#FFFFFF'}>{children}</Desktop>\r\n ) : (\r\n <FullScreenMobile depth={Depth.dropdown}>{children}</FullScreenMobile>\r\n )}\r\n </React.Fragment>\r\n )\r\n}\r\n\r\nexport default SubMenu\r\n","import React from 'react'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport useCloseButtonTop from '../../hooks/useCloseButtonTop'\r\nimport DashboardButton from '../Menu/Remote/DashboardButton'\r\n\r\ninterface AbsoluteLargeClosingButtonProps {\r\n dashboardVisible: boolean\r\n zIndexClassname?: string\r\n onClick: () => void\r\n}\r\n\r\nconst AbsoluteLargeClosingButton = ({\r\n dashboardVisible,\r\n zIndexClassname,\r\n onClick\r\n}: AbsoluteLargeClosingButtonProps): JSX.Element => {\r\n const { isMobile } = useView()\r\n const top = useCloseButtonTop()\r\n\r\n return isMobile ? (\r\n <React.Fragment />\r\n ) : (\r\n <div\r\n className={`rf-absolute rf-w-24 rf-flex rf-justify-center rf-right-0 ${zIndexClassname}`}\r\n style={{\r\n top: top\r\n }}\r\n >\r\n <DashboardButton dashboardVisible={dashboardVisible} onClick={onClick} />\r\n </div>\r\n )\r\n}\r\n\r\nexport default AbsoluteLargeClosingButton\r\n","import { useState, useEffect } from 'react'\r\nimport { useRetorik } from '../components/Contexts/RetorikContext'\r\nimport { useView } from '../components/Contexts/ViewContext'\r\nimport { DeviceType } from '../models/enums'\r\n\r\nconst useCloseButtonTop = (): string | number => {\r\n const { configuration } = useRetorik()\r\n const { currentDeviceType, isTactile } = useView()\r\n const [top, setTop] = useState<number | string>(200)\r\n\r\n /**\r\n * On currentDeviceType change :\r\n * - switch on currentDeviceType and check for tactile\r\n * - set top state to the value in configuration if given, or a default one\r\n */\r\n useEffect(() => {\r\n switch (currentDeviceType) {\r\n case DeviceType.landscape: {\r\n if (isTactile) {\r\n setTop(configuration.remote?.desktopTactile || '9.75rem')\r\n } else {\r\n setTop(configuration.remote?.desktop || '9.75rem')\r\n }\r\n break\r\n }\r\n case DeviceType.borne:\r\n setTop(configuration.remote?.verticalTactile || 'calc(50% - 11.25rem)')\r\n break\r\n default:\r\n setTop(200)\r\n break\r\n }\r\n }, [currentDeviceType])\r\n\r\n return top\r\n}\r\n\r\nexport default useCloseButtonTop\r\n","import React, { useState, useEffect } from 'react'\r\nimport { DashboardIcon } from '../../Icons/MenuIcons'\r\nimport translation from '../../../translations/menu.json'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport { CloseIcon } from '../../Icons/Miscellaneous'\r\n\r\ninterface DashboardButtonProps {\r\n dashboardVisible: boolean\r\n onClick: () => void\r\n}\r\n\r\nconst DashboardButton = ({\r\n dashboardVisible,\r\n onClick\r\n}: DashboardButtonProps): JSX.Element => {\r\n const { locale } = useLocaleStore()\r\n const [label, setLabel] = useState<string>('')\r\n\r\n useEffect(() => {\r\n setLabel(\r\n dashboardVisible\r\n ? translation[locale]?.close || translation['fr-FR'].close\r\n : translation[locale]?.menu || translation['fr-FR'].menu\r\n )\r\n }, [])\r\n\r\n return (\r\n <button\r\n className='rf-w-18 rf-h-18 rf-mb-6 rf-flex rf-flex-col rf-justify-center rf-items-center rf-bg-truewhite rf-text-xsm rf-text-trueblack rf-border rf-border-menuBorder rf-rounded-half hover:rf-cursor-pointer rf-shadow-[0_3px_6px_#606267]'\r\n aria-label={label}\r\n onClick={onClick}\r\n >\r\n <div className='rf-uppercase'>{label}</div>\r\n {dashboardVisible ? (\r\n <CloseIcon className='rf-h-6 rf-w-6' />\r\n ) : (\r\n <DashboardIcon className='rf-h-6 rf-w-6' />\r\n )}\r\n </button>\r\n )\r\n}\r\n\r\nexport default DashboardButton\r\n","import DashboardIcon from './DashboardIcon'\r\nimport KeyboardIcon from './KeyboardIcon'\r\nimport MicrophoneIcon from './MicrophoneIcon'\r\nimport MicrophoneIconOn from './MicrophoneIconOn'\r\nimport MicrophoneIconOff from './MicrophoneIconOff'\r\n\r\nexport {\r\n DashboardIcon,\r\n KeyboardIcon,\r\n MicrophoneIcon,\r\n MicrophoneIconOn,\r\n MicrophoneIconOff\r\n}\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst DashboardIcon = ({ className, color }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n fill={color || 'currentColor'}\r\n className={className || 'w-6'}\r\n viewBox='0 0 27.93 16.72'\r\n >\r\n <path d='M1.23 2.46a1.23 1.23 0 1 1 0-2.46h25.46a1.23 1.23 0 1 1 0 2.46H1.23ZM1.23 9.59a1.23 1.23 0 1 1 0-2.46h25.46a1.23 1.23 0 1 1 0 2.46H1.23ZM1.23 16.72a1.23 1.23 0 1 1 0-2.46h25.46a1.23 1.23 0 1 1 0 2.46H1.23Z' />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default DashboardIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst KeyboardIcon = ({ className, color }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n xmlnsXlink='http://www.w3.org/1999/xlink'\r\n viewBox='0 0 22.5 15'\r\n className={className || 'w-6'}\r\n >\r\n <defs>\r\n <filter id='Icon_awesome-keyboard'>\r\n <feOffset dy='3' in='SourceAlpha' />\r\n <feGaussianBlur stdDeviation='3' result='blur' />\r\n <feFlood floodOpacity='0.161' result='color' />\r\n <feComposite operator='out' in='SourceGraphic' in2='blur' />\r\n <feComposite operator='in' in='color' />\r\n <feComposite operator='in' in2='SourceGraphic' />\r\n </filter>\r\n </defs>\r\n <g>\r\n <path\r\n d='M20.625,19.5H1.875A1.875,1.875,0,0,1,0,17.625V6.375A1.875,1.875,0,0,1,1.875,4.5h18.75A1.875,1.875,0,0,1,22.5,6.375v11.25A1.875,1.875,0,0,1,20.625,19.5ZM5,9.031V7.469A.469.469,0,0,0,4.531,7H2.969a.469.469,0,0,0-.469.469V9.031a.469.469,0,0,0,.469.469H4.531A.469.469,0,0,0,5,9.031Zm3.75,0V7.469A.469.469,0,0,0,8.281,7H6.719a.469.469,0,0,0-.469.469V9.031a.469.469,0,0,0,.469.469H8.281A.469.469,0,0,0,8.75,9.031Zm3.75,0V7.469A.469.469,0,0,0,12.031,7H10.469A.469.469,0,0,0,10,7.469V9.031a.469.469,0,0,0,.469.469h1.563A.469.469,0,0,0,12.5,9.031Zm3.75,0V7.469A.469.469,0,0,0,15.781,7H14.219a.469.469,0,0,0-.469.469V9.031a.469.469,0,0,0,.469.469h1.563A.469.469,0,0,0,16.25,9.031Zm3.75,0V7.469A.469.469,0,0,0,19.531,7H17.969a.469.469,0,0,0-.469.469V9.031a.469.469,0,0,0,.469.469h1.563A.469.469,0,0,0,20,9.031ZM6.875,12.781V11.219a.469.469,0,0,0-.469-.469H4.844a.469.469,0,0,0-.469.469v1.563a.469.469,0,0,0,.469.469H6.406A.469.469,0,0,0,6.875,12.781Zm3.75,0V11.219a.469.469,0,0,0-.469-.469H8.594a.469.469,0,0,0-.469.469v1.563a.469.469,0,0,0,.469.469h1.563A.469.469,0,0,0,10.625,12.781Zm3.75,0V11.219a.469.469,0,0,0-.469-.469H12.344a.469.469,0,0,0-.469.469v1.563a.469.469,0,0,0,.469.469h1.562A.469.469,0,0,0,14.375,12.781Zm3.75,0V11.219a.469.469,0,0,0-.469-.469H16.094a.469.469,0,0,0-.469.469v1.563a.469.469,0,0,0,.469.469h1.563A.469.469,0,0,0,18.125,12.781ZM5,16.531V14.969a.469.469,0,0,0-.469-.469H2.969a.469.469,0,0,0-.469.469v1.563A.469.469,0,0,0,2.969,17H4.531A.469.469,0,0,0,5,16.531Zm11.25,0V14.969a.469.469,0,0,0-.469-.469H6.719a.469.469,0,0,0-.469.469v1.563A.469.469,0,0,0,6.719,17h9.063A.469.469,0,0,0,16.25,16.531Zm3.75,0V14.969a.469.469,0,0,0-.469-.469H17.969a.469.469,0,0,0-.469.469v1.563a.469.469,0,0,0,.469.469h1.563A.469.469,0,0,0,20,16.531Z'\r\n transform='translate(0 -4.5)'\r\n fill={color || '#a4a7af'}\r\n />\r\n <g\r\n transform='matrix(1, 0, 0, 1, 0, 0)'\r\n filter='url(#Icon_awesome-keyboard)'\r\n >\r\n <path\r\n d='M20.625,19.5H1.875A1.875,1.875,0,0,1,0,17.625V6.375A1.875,1.875,0,0,1,1.875,4.5h18.75A1.875,1.875,0,0,1,22.5,6.375v11.25A1.875,1.875,0,0,1,20.625,19.5ZM5,9.031V7.469A.469.469,0,0,0,4.531,7H2.969a.469.469,0,0,0-.469.469V9.031a.469.469,0,0,0,.469.469H4.531A.469.469,0,0,0,5,9.031Zm3.75,0V7.469A.469.469,0,0,0,8.281,7H6.719a.469.469,0,0,0-.469.469V9.031a.469.469,0,0,0,.469.469H8.281A.469.469,0,0,0,8.75,9.031Zm3.75,0V7.469A.469.469,0,0,0,12.031,7H10.469A.469.469,0,0,0,10,7.469V9.031a.469.469,0,0,0,.469.469h1.563A.469.469,0,0,0,12.5,9.031Zm3.75,0V7.469A.469.469,0,0,0,15.781,7H14.219a.469.469,0,0,0-.469.469V9.031a.469.469,0,0,0,.469.469h1.563A.469.469,0,0,0,16.25,9.031Zm3.75,0V7.469A.469.469,0,0,0,19.531,7H17.969a.469.469,0,0,0-.469.469V9.031a.469.469,0,0,0,.469.469h1.563A.469.469,0,0,0,20,9.031ZM6.875,12.781V11.219a.469.469,0,0,0-.469-.469H4.844a.469.469,0,0,0-.469.469v1.563a.469.469,0,0,0,.469.469H6.406A.469.469,0,0,0,6.875,12.781Zm3.75,0V11.219a.469.469,0,0,0-.469-.469H8.594a.469.469,0,0,0-.469.469v1.563a.469.469,0,0,0,.469.469h1.563A.469.469,0,0,0,10.625,12.781Zm3.75,0V11.219a.469.469,0,0,0-.469-.469H12.344a.469.469,0,0,0-.469.469v1.563a.469.469,0,0,0,.469.469h1.562A.469.469,0,0,0,14.375,12.781Zm3.75,0V11.219a.469.469,0,0,0-.469-.469H16.094a.469.469,0,0,0-.469.469v1.563a.469.469,0,0,0,.469.469h1.563A.469.469,0,0,0,18.125,12.781ZM5,16.531V14.969a.469.469,0,0,0-.469-.469H2.969a.469.469,0,0,0-.469.469v1.563A.469.469,0,0,0,2.969,17H4.531A.469.469,0,0,0,5,16.531Zm11.25,0V14.969a.469.469,0,0,0-.469-.469H6.719a.469.469,0,0,0-.469.469v1.563A.469.469,0,0,0,6.719,17h9.063A.469.469,0,0,0,16.25,16.531Zm3.75,0V14.969a.469.469,0,0,0-.469-.469H17.969a.469.469,0,0,0-.469.469v1.563a.469.469,0,0,0,.469.469h1.563A.469.469,0,0,0,20,16.531Z'\r\n transform='translate(0 -4.5)'\r\n fill='#fff'\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport default KeyboardIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst MicrophoneIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n xmlnsXlink='http://www.w3.org/1999/xlink'\r\n className={className || 'rf-h-6'}\r\n viewBox='0 0 14.426 20.983'\r\n >\r\n <defs>\r\n <filter id='Icon_awesome-microphone'>\r\n <feOffset dy='3' in='SourceAlpha' />\r\n <feGaussianBlur stdDeviation='3' result='blur' />\r\n <feFlood floodOpacity='0.161' result='color' />\r\n <feComposite operator='out' in='SourceGraphic' in2='blur' />\r\n <feComposite operator='in' in='color' />\r\n <feComposite operator='in' in2='SourceGraphic' />\r\n </filter>\r\n </defs>\r\n <g>\r\n <path\r\n d='M7.213,14.426a3.934,3.934,0,0,0,3.934-3.934V3.934a3.934,3.934,0,1,0-7.869,0v6.557A3.934,3.934,0,0,0,7.213,14.426ZM13.77,7.869h-.656a.656.656,0,0,0-.656.656v1.967a5.252,5.252,0,0,1-5.77,5.22,5.405,5.405,0,0,1-4.722-5.454V8.524a.656.656,0,0,0-.656-.656H.656A.656.656,0,0,0,0,8.524V10.17a7.439,7.439,0,0,0,6.229,7.446v1.4h-2.3a.656.656,0,0,0-.656.656v.656a.656.656,0,0,0,.656.656h6.557a.656.656,0,0,0,.656-.656v-.656a.656.656,0,0,0-.656-.656H8.2V17.632a7.22,7.22,0,0,0,6.229-7.14V8.524A.656.656,0,0,0,13.77,7.869Z'\r\n fill={color || '#a4a7af'}\r\n />\r\n <g\r\n transform='matrix(1, 0, 0, 1, 0, 0)'\r\n filter='url(#Icon_awesome-microphone)'\r\n >\r\n <path\r\n d='M7.213,14.426a3.934,3.934,0,0,0,3.934-3.934V3.934a3.934,3.934,0,1,0-7.869,0v6.557A3.934,3.934,0,0,0,7.213,14.426ZM13.77,7.869h-.656a.656.656,0,0,0-.656.656v1.967a5.252,5.252,0,0,1-5.77,5.22,5.405,5.405,0,0,1-4.722-5.454V8.524a.656.656,0,0,0-.656-.656H.656A.656.656,0,0,0,0,8.524V10.17a7.439,7.439,0,0,0,6.229,7.446v1.4h-2.3a.656.656,0,0,0-.656.656v.656a.656.656,0,0,0,.656.656h6.557a.656.656,0,0,0,.656-.656v-.656a.656.656,0,0,0-.656-.656H8.2V17.632a7.22,7.22,0,0,0,6.229-7.14V8.524A.656.656,0,0,0,13.77,7.869Z'\r\n fill='#fff'\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport default MicrophoneIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst MicrophoneIconOn = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n className={className || 'rf-h-6 rf-w-8'}\r\n viewBox='0 0 21.055 18.479'\r\n >\r\n <g transform='translate(-44.181 -45.388)'>\r\n <rect\r\n width='8.229'\r\n height='18.479'\r\n rx='2'\r\n transform='translate(44.181 45.388)'\r\n fill={color || '#ff6462'}\r\n />\r\n <rect\r\n width='8.229'\r\n height='18.479'\r\n rx='2'\r\n transform='translate(57.007 45.388)'\r\n fill={color || '#ff6462'}\r\n />\r\n </g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport default MicrophoneIconOn\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst MicrophoneIconOff = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n className={className || 'rf-h-6 rf-w-6'}\r\n viewBox='0 0 19 19'\r\n >\r\n <circle cx='9.5' cy='9.5' r='9.5' fill={color || '#ff6462'} />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default MicrophoneIconOff\r\n","import React from 'react'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport type { TemplateDefaultProps } from '../../models/types'\r\nimport translation from '../../translations/menu.json'\r\nimport { capitalizeFirstLetter } from '../../utils/capitalizeFirstLetter'\r\nimport { SubMenu as Template } from '.'\r\nimport { BackButton } from '../Menu/Common'\r\n\r\ntype SubMenuClosingProps = TemplateDefaultProps & {\r\n className?: string\r\n handleClose: () => void\r\n backIsConversation?: boolean\r\n title?: string\r\n}\r\n\r\nconst SubMenuClosing = ({\r\n className,\r\n background,\r\n handleClose,\r\n backIsConversation,\r\n title,\r\n children\r\n}: SubMenuClosingProps): JSX.Element => {\r\n const { locale } = useLocaleStore()\r\n const { isMobile } = useView()\r\n\r\n return (\r\n <Template background={background} onClick={handleClose}>\r\n {/* Back button for mobile / widget / non-tactile desktop */}\r\n <BackButton\r\n title={\r\n backIsConversation\r\n ? translation[locale]?.backconversation ||\r\n translation['fr-FR'].backconversation\r\n : isMobile\r\n ? translation[locale]?.back || translation['fr-FR'].back\r\n : translation[locale]?.backconversation ||\r\n translation['fr-FR'].backconversation\r\n }\r\n handleBack={handleClose}\r\n className='rf-relative large:rf-absolute large-tactile:rf-hidden rf-pb-6 large:rf-left-4 large:rf-top-8 rf-text-size-auto'\r\n />\r\n <div\r\n className={`rf-w-full large:rf-w-fit large:rf-max-w-full large-vertical:rf-max-w-2/3 large:rf-px-6 rf-flex rf-flex-col large-vertical:rf-text-size-auto rf-overflow-y-scroll rf-scrollbar-hidden ${className}`}\r\n >\r\n {/* Back button for large tactiles */}\r\n <BackButton\r\n title={\r\n translation[locale]?.backconversation ||\r\n translation['fr-FR'].backconversation\r\n }\r\n handleBack={handleClose}\r\n className='rf-hidden large-tactile:rf-flex rf-pt-4 rf-pb-6'\r\n />\r\n\r\n {/* Title is given in props */}\r\n {title && (\r\n <div className='large:rf-mt-20 large-tactile:rf-mt-0 rf-mb-6 rf-title-bold-size-auto rf-font-bold'>\r\n {capitalizeFirstLetter(title)}\r\n </div>\r\n )}\r\n\r\n {children}\r\n </div>\r\n </Template>\r\n )\r\n}\r\n\r\nexport default SubMenuClosing\r\n","import BackButton from './BackButton'\r\nimport Dashboard from './Dashboard'\r\nimport HistoryButton from './HistoryButton'\r\nimport LanguageButton from './LanguageButton'\r\nimport MicrophoneButton from './MicrophoneButton'\r\nimport Parameters from './Parameters'\r\nimport ParameterButton from './ParameterButton'\r\nimport TutorialButton from './TutorialButton'\r\n\r\nexport {\r\n BackButton,\r\n Dashboard,\r\n HistoryButton,\r\n LanguageButton,\r\n MicrophoneButton,\r\n Parameters,\r\n ParameterButton,\r\n TutorialButton\r\n}\r\n","import React from 'react'\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\nimport { ArrowLeftIcon } from '../../Icons/ArrowIcons'\r\n\r\ninterface BackButtonProps {\r\n title: string\r\n className?: string\r\n handleBack: () => void\r\n}\r\n\r\nconst BackButton = ({\r\n title,\r\n className,\r\n handleBack\r\n}: BackButtonProps): JSX.Element => {\r\n return (\r\n <button\r\n className={`rf-flex rf-flex-row rf-items-center ${className}`}\r\n onClick={handleBack}\r\n aria-label={title}\r\n >\r\n <ArrowLeftIcon className='rf-w-8' />\r\n <div className='rf-ml-1'>{capitalizeFirstLetter(title)}</div>\r\n </button>\r\n )\r\n}\r\n\r\nexport default BackButton\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React from 'react'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport { FullScreen } from '../../Templates'\r\nimport AbsoluteLargeClosingButton from '../../Utils/AbsoluteLargeClosingButton'\r\nimport Logo from '../../Common/Logo'\r\nimport DisplayViews from '../ViewsDisplay/DisplayViews'\r\nimport DisplaySubViews from '../ViewsDisplay/DisplaySubViews'\r\n\r\ninterface DashboardProps {\r\n toggleDashboard?: () => void\r\n}\r\n\r\nconst Dashboard = ({ toggleDashboard }: DashboardProps): JSX.Element => {\r\n const { isMobile } = useView()\r\n\r\n /**\r\n * On call :\r\n * - if the parent method toggleDashboard is defined, call it\r\n */\r\n const handleClick = (): void => {\r\n toggleDashboard && toggleDashboard()\r\n }\r\n\r\n return isMobile ? (\r\n <div className='rf-w-full rf-px-5 rf-pt-4 rf-flex rf-flex-col rf-justify-start'>\r\n <DisplayViews conditionalHandleClick={handleClick} />\r\n </div>\r\n ) : (\r\n <FullScreen>\r\n <div className='rf-h-full rf-w-full rf-flex rf-justify-center rf-items-center'>\r\n {/* Logo */}\r\n <Logo />\r\n\r\n <div className='rf-relative rf-h-full rf-max-w-7/10 rf-flex rf-flex-col rf-items-start rf-gap-8'>\r\n {/* Available views */}\r\n <div className='rf-min-h-2/5 rf-py-4 rf-mt-auto rf-flex rf-flex-col rf-gap-8 rf-overflow-y-scroll rf-scrollbar-hidden'>\r\n <DisplayViews handleClick={toggleDashboard} />\r\n </div>\r\n\r\n {/* Available subviews */}\r\n <div className='rf-h-3/10 rf-flex rf-flex-row rf-items-center rf-flex-wrap rf-gap-8'>\r\n <DisplaySubViews handleClick={toggleDashboard} />\r\n </div>\r\n </div>\r\n </div>\r\n\r\n {/* Closing button */}\r\n <AbsoluteLargeClosingButton\r\n dashboardVisible={true}\r\n onClick={handleClick}\r\n />\r\n </FullScreen>\r\n )\r\n}\r\n\r\nexport default Dashboard\r\n","import React, { useEffect, useState } from 'react'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport { DEFAULT_VIEWS } from '../../../models/constants'\r\nimport DisplayGenerator from './DisplayGenerator'\r\nimport { useRetorik } from '../../Contexts/RetorikContext'\r\nimport type { BaseMenu, CustomMenu } from '../../../models/types'\r\n\r\ninterface DisplayViewsProps {\r\n handleClick?: () => void\r\n conditionalHandleClick?: () => void\r\n}\r\n\r\nconst DisplayViews = ({\r\n handleClick,\r\n conditionalHandleClick\r\n}: DisplayViewsProps): JSX.Element => {\r\n const { currentDeviceType, isMobile } = useView()\r\n const { configuration } = useRetorik()\r\n const [finalMenu, setFinalMenu] = useState<Array<Array<JSX.Element>>>([])\r\n\r\n const buildMenu = (\r\n menu: Array<BaseMenu | CustomMenu>\r\n ): Array<JSX.Element> => {\r\n let fullMenu: Array<JSX.Element> = []\r\n menu.forEach((currentMenu) => {\r\n // If the menu has 'icon' as key, it's a CustomMenu. Otherwise it's a BaseMenu\r\n if (Object.keys(currentMenu).includes('icon')) {\r\n const customCurrentMenu = currentMenu as CustomMenu\r\n fullMenu.push(\r\n <DisplayGenerator\r\n type='CustomMenu'\r\n indice={customCurrentMenu.indice}\r\n label={customCurrentMenu.label}\r\n icon={customCurrentMenu.icon}\r\n device={currentDeviceType}\r\n handleClick={(): void => {\r\n if (customCurrentMenu.clickHandler) {\r\n customCurrentMenu.clickHandler()\r\n }\r\n handleClick && handleClick()\r\n }}\r\n customDisplay={customCurrentMenu.customDisplay}\r\n conditionalHandleClick={\r\n customCurrentMenu.closeParametersOnClickInMobileMode\r\n ? conditionalHandleClick\r\n : undefined\r\n }\r\n />\r\n )\r\n } else {\r\n fullMenu.push(\r\n <DisplayGenerator\r\n type='BaseMenu'\r\n indice={currentMenu.indice}\r\n view={(currentMenu as BaseMenu).view}\r\n device={currentDeviceType}\r\n handleClick={handleClick}\r\n conditionalHandleClick={conditionalHandleClick}\r\n />\r\n )\r\n }\r\n })\r\n\r\n fullMenu = fullMenu.sort(\r\n (a: any, b: any) => a.props.indice - b.props.indice\r\n )\r\n return fullMenu\r\n }\r\n\r\n useEffect(() => {\r\n const tempFinalMenu: Array<Array<JSX.Element>> = []\r\n // Basic menu\r\n tempFinalMenu.push(\r\n buildMenu(\r\n configuration && configuration.baseMenu\r\n ? [...configuration.baseMenu]\r\n : [...DEFAULT_VIEWS]\r\n )\r\n )\r\n\r\n // Custom menus\r\n if (\r\n configuration &&\r\n configuration.customMenu &&\r\n configuration.customMenu.length > 0\r\n ) {\r\n if (Array.isArray(configuration.customMenu[0])) {\r\n configuration.customMenu.forEach((menuArray) => {\r\n tempFinalMenu.push(buildMenu(menuArray))\r\n })\r\n } else {\r\n tempFinalMenu.push(\r\n buildMenu(configuration.customMenu as Array<CustomMenu>)\r\n )\r\n }\r\n }\r\n\r\n setFinalMenu(tempFinalMenu)\r\n }, [])\r\n\r\n return (\r\n <React.Fragment>\r\n {finalMenu.map((line: Array<JSX.Element>, key) => {\r\n return isMobile ? (\r\n <div\r\n key={key}\r\n className={`${\r\n key === 0 && 'rf-pb-4'\r\n } rf-flex rf-flex-col rf-items-center`}\r\n >\r\n {/* Separation line between menu containers */}\r\n {key !== 0 && (\r\n <div className='rf-h-6 -rf-mx-6 rf-width-fill-available rf-bg-[#F0F0F0] rf-border-y rf-border-y-menuBorder' />\r\n )}\r\n {line.map((e: JSX.Element, subkey) => {\r\n return <React.Fragment key={subkey}>{e}</React.Fragment>\r\n })}\r\n </div>\r\n ) : (\r\n <div\r\n key={key}\r\n className='rf-flex rf-flex-row rf-items-center rf-flex-wrap rf-gap-8'\r\n >\r\n {line.map((e: JSX.Element, subkey) => {\r\n return <React.Fragment key={subkey}>{e}</React.Fragment>\r\n })}\r\n </div>\r\n )\r\n })}\r\n </React.Fragment>\r\n )\r\n}\r\n\r\nexport default DisplayViews\r\n","import React, { useState, useEffect } from 'react'\r\nimport { useGetActivityByKey } from 'botframework-webchat-api/lib/hooks'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport { AvailableViews, CurrentSubView } from '../../../models/enums'\r\nimport translation from '../../../translations/views.json'\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\nimport { mobileDisplays } from '../../../models/constants'\r\nimport DisplayIcon from './DisplayIcon'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport { useRetorik } from '../../Contexts/RetorikContext'\r\nimport type { LocalizedStrings } from '../../../models/types'\r\n\r\ninterface DisplayGeneratorProps {\r\n indice: number\r\n view: number\r\n device: number\r\n handleClick?: () => void\r\n conditionalHandleClick?: () => void\r\n type: string\r\n}\r\n\r\ninterface CustomMenuDisplayGeneratorProps {\r\n indice: number\r\n label: LocalizedStrings | string\r\n device: number\r\n handleClick?: () => void\r\n conditionalHandleClick?: () => void\r\n icon: JSX.Element\r\n customDisplay?: string\r\n type: string\r\n}\r\n\r\nfunction instanceOfDisplayGeneratorProps(\r\n object: any\r\n): object is DisplayGeneratorProps {\r\n return 'view' in object && object.type === 'BaseMenu'\r\n}\r\n\r\nfunction instanceOfCustomMenuDisplayGeneratorProps(\r\n object: any\r\n): object is CustomMenuDisplayGeneratorProps {\r\n return 'icon' in object && object.type === 'CustomMenu'\r\n}\r\n\r\nconst DisplayGenerator = (\r\n props: DisplayGeneratorProps | CustomMenuDisplayGeneratorProps\r\n): JSX.Element => {\r\n const locale = useLocaleStore((state) => state.locale)\r\n const getActivityByKey = useGetActivityByKey()\r\n const { setRoute, isMobile, homeActivityKey, setShowHomeAttachments } =\r\n useView()\r\n const { setCurrentSubView, setCustomView } = useRetorik()\r\n const [label, setLabel] = useState<string>('')\r\n\r\n /**\r\n * On component mount :\r\n * - set label state depending on the locale\r\n */\r\n useEffect(() => {\r\n if (instanceOfDisplayGeneratorProps(props)) {\r\n setLabel(\r\n translation[locale]?.[props.view.toString()] ||\r\n translation['fr-FR'][props.view.toString()]\r\n )\r\n } else if (instanceOfCustomMenuDisplayGeneratorProps(props)) {\r\n if (props.label && typeof props.label === 'string') {\r\n setLabel(props.label)\r\n } else if (props.label && typeof props.label === 'object') {\r\n setLabel(props.label[locale])\r\n }\r\n }\r\n }, [locale])\r\n\r\n /**\r\n * On call :\r\n * - switch on chosen view\r\n * - either display an overlaying page or redirect to another view\r\n * - if handleClick is defined, call it\r\n */\r\n const handleClickOnCard = (): void => {\r\n if (instanceOfDisplayGeneratorProps(props)) {\r\n switch (props.view) {\r\n case AvailableViews.home:\r\n homeActivityKey &&\r\n setShowHomeAttachments(getActivityByKey(homeActivityKey))\r\n isMobile &&\r\n props.conditionalHandleClick &&\r\n props.conditionalHandleClick()\r\n break\r\n case AvailableViews.news:\r\n setRoute('news')\r\n break\r\n case AvailableViews.weather:\r\n setCurrentSubView(CurrentSubView.weather)\r\n break\r\n case AvailableViews.emergency:\r\n setCurrentSubView(CurrentSubView.emergency)\r\n break\r\n }\r\n } else if (instanceOfCustomMenuDisplayGeneratorProps(props)) {\r\n // Call props' closing function in mobile mode if asked by the custom component\r\n isMobile && props.conditionalHandleClick && props.conditionalHandleClick()\r\n // Display custom component if present\r\n if (props.customDisplay) {\r\n setCurrentSubView(CurrentSubView.custom)\r\n setCustomView({\r\n view: props.customDisplay,\r\n title: label,\r\n icon: props.icon\r\n })\r\n }\r\n }\r\n props.handleClick && props.handleClick()\r\n }\r\n\r\n return mobileDisplays.includes(props.device) ? (\r\n /* On mobile / widget : display available views as lines */\r\n <button\r\n className={`rf-w-full rf-py-3 rf-flex rf-flex-row rf-items-center ${\r\n props.indice !== 0 && 'rf-border-t rf-border-t-menuBorder'\r\n }`}\r\n onClick={handleClickOnCard}\r\n aria-label={label}\r\n >\r\n {instanceOfDisplayGeneratorProps(props) ? (\r\n <DisplayIcon view={props.view} />\r\n ) : (\r\n <DisplayIcon\r\n icon={props.icon}\r\n className='rf-max-h-6 rf-max-w-6 rf-flex rf-items-center'\r\n />\r\n )}\r\n <div className='rf-ml-4 rf-font-bold'>{capitalizeFirstLetter(label)}</div>\r\n </button>\r\n ) : (\r\n /* On desktop / borne : display available views as buttons at the center of the screen */\r\n <button\r\n className='rf-h-36 rf-w-36 rf-p-4 rf-flex rf-flex-col rf-items-center rf-justify-between rf-rounded rf-shadow-[3px_3px_16px_#00000029]'\r\n style={{\r\n background: 'linear-gradient(to left top, #F2F3F6, #E5E6EC)'\r\n }}\r\n onClick={handleClickOnCard}\r\n aria-label={label}\r\n >\r\n {instanceOfDisplayGeneratorProps(props) ? (\r\n <DisplayIcon view={props.view} className='rf-h-16' />\r\n ) : (\r\n <DisplayIcon icon={props.icon} className='rf-h-16 rf-w-16 rf-flex' />\r\n )}\r\n <div className='rf-uppercase rf-text-[#575F6B] rf-text-xs large-vertical:rf-text-basecustomuppercase'>\r\n {label}\r\n </div>\r\n </button>\r\n )\r\n}\r\n\r\nexport default DisplayGenerator\r\n","{\r\n \"fr-FR\": {\r\n \"1\": \"accueil\",\r\n \"2\": \"chaîne info live\",\r\n \"3\": \"météo\",\r\n \"4\": \"numéros d'urgence\",\r\n \"1000\": \"historique\",\r\n \"1001\": \"tutoriel\"\r\n },\r\n \"en-US\": {\r\n \"1\": \"home\",\r\n \"2\": \"live info channel\",\r\n \"3\": \"weather\",\r\n \"4\": \"emergency numbers\",\r\n \"1000\": \"history\",\r\n \"1001\": \"tutorial\"\r\n },\r\n \"es-ES\": {\r\n \"1\": \"home\",\r\n \"2\": \"live info channel\",\r\n \"3\": \"weather\",\r\n \"4\": \"emergency numbers\",\r\n \"1000\": \"history\",\r\n \"1001\": \"tutorial\"\r\n },\r\n \"de-DE\": {\r\n \"1\": \"home\",\r\n \"2\": \"live info channel\",\r\n \"3\": \"weather\",\r\n \"4\": \"emergency numbers\",\r\n \"1000\": \"history\",\r\n \"1001\": \"tutorial\"\r\n }\r\n}\r\n","import React from 'react'\r\nimport { AvailableViews, AvailableSubViews } from '../../../models/enums'\r\nimport * as Icons from '../../Icons/ViewIcons'\r\nimport * as ParameterIcons from '../../Icons/ParameterIcons'\r\n\r\ninterface DisplayIconProps {\r\n view?: number\r\n icon?: JSX.Element\r\n className?: string\r\n}\r\n\r\nconst DisplayIcon = ({\r\n view,\r\n icon,\r\n className\r\n}: DisplayIconProps): JSX.Element => {\r\n if (view) {\r\n return view === AvailableViews.home ? (\r\n <Icons.HomeIcon className={className} />\r\n ) : view === AvailableViews.news ? (\r\n <Icons.NewsChannelIcon className={className} />\r\n ) : view === AvailableViews.weather ? (\r\n <Icons.WeatherIcon className={className} />\r\n ) : view === AvailableViews.emergency ? (\r\n <Icons.EmergencyIcon className={className} />\r\n ) : view === AvailableSubViews.history ? (\r\n <ParameterIcons.HistoryIcon className={className} />\r\n ) : view === AvailableSubViews.tutorial ? (\r\n <ParameterIcons.TutorialIcon className={className} />\r\n ) : (\r\n <Icons.InteractiveMapIcon className={className} />\r\n )\r\n } else if (icon) {\r\n return <div className={className}>{icon}</div>\r\n }\r\n return <></>\r\n}\r\n\r\nexport default DisplayIcon\r\n","import EmergencyIcon from './EmergencyIcon'\r\nimport HomeIcon from './HomeIcon'\r\nimport InteractiveMapIcon from './InteractiveMapIcon'\r\nimport NewsChannelIcon from './NewsChannelIcon'\r\nimport WeatherIcon from './WeatherIcon'\r\n\r\nexport {\r\n EmergencyIcon,\r\n HomeIcon,\r\n InteractiveMapIcon,\r\n NewsChannelIcon,\r\n WeatherIcon\r\n}\r\n","/* eslint-disable react/self-closing-comp */\r\nimport React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst EmergencyIcon = ({ className, color }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n version='1.1'\r\n xmlns='http://www.w3.org/2000/svg'\r\n xmlnsXlink='http://www.w3.org/1999/xlink'\r\n x='0px'\r\n y='0px'\r\n className={className || 'rf-h-6 rf-w-6'}\r\n viewBox='0 0 512 512'\r\n xmlSpace='preserve'\r\n >\r\n <g fill={color || '#1999B1'}>\r\n <path\r\n d='M294.4,182.4h34.1v34.1c0,3.9,3.1,7,7,7h47c3.9,0,7-3.1,7-7v-34.1h34.1c3.9,0,7-3.1,7-7v-47c0-3.9-3.1-7-7-7h-34.1V87.3\r\n\t\tc0-3.9-3.1-7-7-7h-47c-3.9,0-7,3.1-7,7v34.1h-34.1c-3.9,0-7,3.1-7,7v47C287.4,179.3,290.6,182.4,294.4,182.4z M301.4,135.4h34.1\r\n\t\tc3.9,0,7-3.1,7-7V94.3h33v34.1c0,3.9,3.1,7,7,7h34.1v33h-34.1c-3.9,0-7,3.1-7,7v34.1h-33v-34.1c0-3.9-3.1-7-7-7h-34.1V135.4z'\r\n />\r\n <path\r\n d='M218.1,285.1c0.1,3.8,3.2,6.8,6.9,6.8c0.9,0,95.2,1.1,133.1,1.1c78.5,0,142.5-63.9,142.5-142.5S436.7,8.2,358.1,8.2\r\n\t\tc-78.5,0-142.5,63.9-142.5,142.5C215.7,186.8,218.1,284.2,218.1,285.1z M358.1,22.2c70.8,0,128.5,57.6,128.5,128.5\r\n\t\tS429,279.1,358.1,279.1c-31.9,0-103.8-0.8-126.2-1c-0.5-22.8-2.3-97-2.3-127.4C229.7,79.8,287.3,22.2,358.1,22.2z'\r\n />\r\n <path\r\n d='M191.5,94c1,0.5,2,0.7,3,0.7c2.6,0,5.1-1.5,6.3-4c0.2-0.4,21.5-45.1,51-70.9c2.9-2.5,3.2-7,0.7-9.9c-2.5-2.9-7-3.2-9.9-0.7\r\n\t\tc-31.8,27.7-53.6,73.5-54.5,75.5C186.5,88.2,188,92.3,191.5,94z'\r\n />\r\n <path\r\n d='M176.6,60.1c1.1,0.6,2.2,0.8,3.3,0.8c2.5,0,4.9-1.3,6.2-3.7c0.1-0.2,13.2-24.6,27.9-36.4c3-2.4,3.5-6.8,1.1-9.8\r\n\t\tc-2.4-3-6.8-3.5-9.8-1.1c-16.9,13.6-30.9,39.6-31.5,40.7C171.9,54.1,173.2,58.3,176.6,60.1z'\r\n />\r\n <path\r\n d='M490.2,255.8c-0.3,0.4-34.6,36.1-70.7,51.3c-3.6,1.5-5.2,5.6-3.7,9.2c1.1,2.7,3.7,4.3,6.5,4.3c0.9,0,1.8-0.2,2.7-0.5\r\n\t\tc38.9-16.3,73.9-53,75.4-54.6c2.7-2.8,2.5-7.2-0.3-9.9S492.8,253,490.2,255.8z'\r\n />\r\n <path\r\n d='M503.6,292.4c-2.7-2.8-7.1-2.9-9.9-0.2c-0.2,0.2-20.3,19.2-37.9,25.8c-3.6,1.4-5.5,5.4-4.1,9c1.1,2.8,3.7,4.5,6.6,4.5\r\n\t\tc0.8,0,1.6-0.1,2.5-0.4c20.3-7.6,41.8-27.9,42.7-28.8C506.2,299.6,506.3,295.2,503.6,292.4z'\r\n />\r\n <path\r\n d='M490.2,372.5c-1.6-0.5-40.7-13.2-71.4,4c-16,9-26.7,24.2-31.6,45.4c-12.9,55-48.2,58-85.6,52l17.2-10\r\n\t\tc18.4-10.7,24.7-34.4,14-52.8L302.5,359c-10.7-18.4-34.4-24.7-52.8-14l-36.7,21.3c-0.2,0.1-0.3,0.2-0.5,0.3c-0.1,0-6.4,4-17.1,1.6\r\n\t\tc-12.6-2.7-32.6-14.3-56.7-53.7c-22-39.9-22.4-62.9-18.8-75.2c3.1-10.5,9.4-14.3,10.1-14.7c0.2-0.1,0.2-0.1,0.4-0.2l36.7-21.3\r\n\t\tc18.4-10.7,24.7-34.4,14-52.8L151,98.2c-10.7-18.4-34.4-24.7-52.8-14L60.8,106c-0.1,0-0.2,0.1-0.2,0.1c-1.5,1-38.1,24.6-48.6,67\r\n\t\tC-4,237.2,63,350,65.9,354.7c0.3,0.6,0.8,1.1,1.2,1.5c0.1,0.6,0.4,1.2,0.7,1.8c2.7,4.8,67.5,118.9,131,136.8\r\n\t\tc42.1,11.8,80.7-8.2,82.3-9c0.1,0,0.2-0.1,0.2-0.1l2.4-1.4c0.7,0.5,1.6,0.9,2.5,1c12.3,2.5,25.9,4.8,39.4,4.8\r\n\t\tc8.5,0,17-0.9,25.2-3.4c25.4-7.6,42.2-28.3,50-61.7c4-17.1,12.3-29.3,24.8-36.3c25.3-14.2,59.9-3.1,60.2-3c3.7,1.2,7.6-0.8,8.8-4.4\r\n\t\tC495.9,377.7,493.9,373.8,490.2,372.5z M256.8,357.2c11.7-6.8,26.8-2.8,33.7,8.9l30.3,52.1c6.8,11.7,2.8,26.8-8.9,33.7l-9.5,5.5\r\n\t\tc-39.1-34.5-52.5-80.7-55.8-94.2L256.8,357.2z M202.6,481.4C144.7,465.1,80.7,352.3,80,351.2c-0.4-0.6-0.8-1.2-1.3-1.7\r\n\t\tc-0.2-0.7-0.4-1.4-0.8-2c-0.7-1.1-66.9-112.5-52.4-171c8.9-35.9,40.5-57.3,42.4-58.5l14.6-8.5c1.8,7,5.2,18,10.9,30.9\r\n\t\tc1.6,3.5,5.7,5.1,9.2,3.6c0.2-0.1,0.5-0.2,0.7-0.4c3-1.8,4.3-5.6,2.9-8.9c-6.6-14.8-9.8-27-11.1-32.6l10.1-5.9\r\n\t\tc11.7-6.8,26.8-2.8,33.7,8.9l30.3,52.1c6.8,11.7,2.8,26.8-8.9,33.7l-9.6,5.6c-11.1-9.9-21-21.4-29.5-34.5c-2.1-3.2-6.4-4.1-9.7-2\r\n\t\tc-3.2,2.1-4.1,6.5-2,9.7c8.3,12.7,17.9,24.2,28.6,34.2l-14.2,8.2c-2.2,1.1-12.1,7-16.9,22.3c-6.6,21-0.5,49.1,18,83.7\r\n\t\tc0.2,0.5,0.4,1,0.6,1.4c0.4,0.7,0.8,1.3,1.2,2c0.4,0.7,0.7,1.3,1.1,2c0.3,0.5,0.6,0.9,0.9,1.3c20.9,33.2,42.3,52.4,63.8,57.1\r\n\t\tc15.7,3.4,25.7-2.3,27.7-3.6l13.7-7.9c4.7,18.1,19,60.2,55.7,94.3l-15.1,8.8C272.4,474.6,238.4,491.5,202.6,481.4z'\r\n />\r\n </g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport default EmergencyIcon\r\n","/* eslint-disable react/self-closing-comp */\r\nimport React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst HomeIcon = ({ className, color }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n className={className || 'rf-h-6 rf-w-6'}\r\n viewBox='0 0 25 25'\r\n >\r\n <path\r\n d='M39.908,31.05l-4.784-4.784V21.032a.312.312,0,0,0-.312-.312H31.887a.312.312,0,0,0-.312.312v1.685L27.72,18.861a.312.312,0,0,0-.441,0L15.091,31.05a.312.312,0,1,0,.441.441L17.925,29.1V42.483a.312.312,0,0,0,.312.312h6.825a.312.312,0,0,0,.312-.312V35.97h4.252v6.514a.312.312,0,0,0,.312.312h6.825a.312.312,0,0,0,.312-.312V29.1l2.393,2.393a.312.312,0,1,0,.441-.441ZM32.2,21.344h2.3v4.3l-2.3-2.3Zm4.252,20.827h-6.2V35.658a.312.312,0,0,0-.312-.312H25.062a.312.312,0,0,0-.312.312v6.514h-6.2v-13.7L27.5,19.523l4.167,4.167h0l2.925,2.925h0l1.859,1.859Z'\r\n transform='translate(-15 -18.77)'\r\n fill={color || '#1999b1'}\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default HomeIcon\r\n","/* eslint-disable react/self-closing-comp */\r\nimport React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst InteractiveMapIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n version='1.1'\r\n xmlns='http://www.w3.org/2000/svg'\r\n xmlnsXlink='http://www.w3.org/1999/xlink'\r\n x='0px'\r\n y='0px'\r\n className={className || 'rf-h-6 rf-w-6'}\r\n viewBox='0 0 512 512'\r\n xmlSpace='preserve'\r\n >\r\n <g fill={color || '#1999B1'}>\r\n <g>\r\n <path\r\n d='M256,93.297c-14.021,0-27.516,4.218-39.025,12.198c-3.402,2.359-4.262,7.05-1.921,10.478\r\n c2.342,3.428,6.998,4.294,10.4,1.936c9.004-6.243,19.566-9.543,30.546-9.543c29.754,0,53.96,24.388,53.96,54.365\r\n c0,29.977-24.206,54.366-53.96,54.366c-29.754,0-53.96-24.389-53.96-54.366c0-8.843,2.038-17.273,6.057-25.055\r\n c1.906-3.692,0.482-8.241-3.182-10.161c-3.665-1.919-8.178-0.486-10.085,3.206c-5.067,9.812-7.746,20.881-7.746,32.01\r\n C187.085,201.018,218,232.166,256,232.166s68.915-31.148,68.915-69.435C324.915,124.445,294,93.297,256,93.297z'\r\n />\r\n </g>\r\n </g>\r\n <g fill={color || '#1999B1'}>\r\n <g>\r\n <path\r\n d='M511.426,501.571l-73.804-178.665c-1.16-2.809-3.883-4.639-6.903-4.639h-73.547\r\n c14.305-19.498,26.212-38.919,35.511-57.988c16.48-33.794,24.835-66.613,24.835-97.547C417.517,73.001,345.061,0,256,0\r\n S94.483,73.001,94.483,162.731c0,30.934,8.355,63.754,24.835,97.547c9.298,19.069,21.205,38.491,35.511,57.988H81.282\r\n c-3.02,0-5.744,1.831-6.903,4.639L24.087,444.651c-1.587,3.842,0.217,8.252,4.03,9.85c0.94,0.394,1.912,0.581,2.87,0.581\r\n c2.93,0,5.711-1.746,6.906-4.641l7.176-17.372h50.906l-26.38,63.862H18.69l7.647-18.513c1.587-3.842-0.217-8.252-4.03-9.85\r\n c-3.815-1.601-8.191,0.219-9.777,4.06L0.575,501.571c-0.961,2.325-0.705,4.981,0.683,7.075c1.386,2.095,3.72,3.354,6.22,3.354\r\n h497.044c2.499,0,4.834-1.259,6.221-3.354C512.13,506.552,512.387,503.896,511.426,501.571z M109.439,162.731\r\n c0-81.422,65.747-147.663,146.561-147.663S402.561,81.31,402.561,162.731c0,34.143-11.775,88.703-66.245,158.231\r\n c-0.055,0.065-0.104,0.134-0.156,0.201c-2.782,3.547-5.672,7.132-8.681,10.757c-29.932,36.062-60.222,62.395-71.48,71.751\r\n c-11.225-9.324-41.372-35.525-71.283-71.518c-3.084-3.711-6.042-7.38-8.889-11.01c-0.046-0.058-0.089-0.118-0.137-0.175\r\n C121.222,251.445,109.439,196.887,109.439,162.731z M86.269,333.335h50.907l-18.568,44.948H67.702L86.269,333.335z\r\n M129.997,496.932l46.741-113.148l133.014,113.148H129.997z M332.935,496.932L332.935,496.932l-154.352-131.3\r\n c-1.822-1.551-4.27-2.132-6.584-1.566c-2.316,0.565-4.228,2.21-5.143,4.427l-53.057,128.438H85.795l28.296-68.502\r\n c0.961-2.325,0.705-4.98-0.683-7.075c-1.386-2.095-3.721-3.354-6.221-3.354H51.296l10.182-24.65h62.118\r\n c3.02,0,5.744-1.831,6.903-4.639l22.876-55.377h12.978c2.253,2.83,4.543,5.661,6.894,8.491\r\n c38.585,46.43,76.578,76.239,78.177,77.486c1.348,1.051,2.962,1.575,4.576,1.575s3.229-0.525,4.576-1.575\r\n c0.879-0.685,12.757-10.009,29.673-25.96h84.681c4.13,0,7.478-3.373,7.478-7.534s-3.348-7.534-7.478-7.534h-69.269\r\n c10.368-10.503,21.7-22.749,33.093-36.457c2.351-2.83,4.642-5.66,6.894-8.491h80.083l18.567,44.948h-39.457\r\n c-4.13,0-7.478,3.373-7.478,7.534s3.347,7.534,7.478,7.534h45.681l10.182,24.65h-154.07c-3.121,0-5.913,1.952-7.006,4.898\r\n c-1.091,2.946-0.253,6.265,2.104,8.326l75.133,65.707H332.935z M399.681,496.932l-73.024-63.862H466.93l26.381,63.862H399.681z'\r\n />\r\n </g>\r\n </g>\r\n <g></g>\r\n <g></g>\r\n <g></g>\r\n <g></g>\r\n <g></g>\r\n <g></g>\r\n <g></g>\r\n <g></g>\r\n <g></g>\r\n <g></g>\r\n <g></g>\r\n <g></g>\r\n <g></g>\r\n <g></g>\r\n <g></g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport default InteractiveMapIcon\r\n","/* eslint-disable react/self-closing-comp */\r\nimport React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst NewsChannelIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n version='1.1'\r\n xmlns='http://www.w3.org/2000/svg'\r\n xmlnsXlink='http://www.w3.org/1999/xlink'\r\n x='0px'\r\n y='0px'\r\n viewBox='0 0 512 512'\r\n className={className || 'rf-h-6 rf-w-6'}\r\n xmlSpace='preserve'\r\n >\r\n <g fill={color || '#1999B1'}>\r\n <path\r\n d='M500.9,13.5H325.3c-3.9,0-7,3.1-7,7v142.4c0,3.9,3.1,7,7,7h39.6v41.4c0,2.7,1.6,5.2,4,6.3c0.9,0.4,2,0.7,3,0.7\r\n\t\tc1.6,0,3.2-0.6,4.5-1.6l55.5-46.8h68.9c3.9,0,7-3.1,7-7V20.5C507.9,16.6,504.8,13.5,500.9,13.5z M493.9,155.9h-64.5\r\n\t\tc-1.6,0-3.2,0.6-4.5,1.6l-46,38.7v-33.4c0-3.9-3.1-7-7-7h-39.6V27.5h161.6V155.9z'\r\n />\r\n <path d='M386.2,66h28.2c3.9,0,7-3.1,7-7s-3.1-7-7-7h-28.2c-3.9,0-7,3.1-7,7S382.3,66,386.2,66z' />\r\n <path d='M436.7,66h32.6c3.9,0,7-3.1,7-7s-3.1-7-7-7h-32.6c-3.9,0-7,3.1-7,7S432.8,66,436.7,66z' />\r\n <path d='M355.6,98.5h113.7c3.9,0,7-3.1,7-7s-3.1-7-7-7H355.6c-3.9,0-7,3.1-7,7S351.7,98.5,355.6,98.5z' />\r\n <path d='M355.6,130.8h113.7c3.9,0,7-3.1,7-7s-3.1-7-7-7H355.6c-3.9,0-7,3.1-7,7S351.7,130.8,355.6,130.8z' />\r\n <path\r\n d='M335.4,277.7c-17-4.2-47.9-12.2-60.2-15.4c0.7-1.7,0.7-3.6-0.1-5.4c-0.9-2-2.6-3.5-4.7-4l-40.8-10.2v-12.9\r\n\t\tc18.6-11.3,32.3-30.3,37-52.8h12.9c12.1,0,21.9-9.8,21.9-21.9s-9.8-21.9-21.9-21.9h-12c4.4-7.2,16.2-28.5,16.6-48.9\r\n\t\tc0.4-26.5-29.5-49.5-37.6-53.3c-1.1-0.5-2.8-1.6-4.9-2.8c-10-5.9-28.6-16.9-50.6-16.9c-32.8,0.1-55.2,25-56.1,26.1\r\n\t\tc-0.4,0.5-0.8,1-1,1.6C112,43.2,95.5,62.5,95.5,85.6c0,3.1,0.3,6.3,0.9,9.5c0.1,0.4,0.2,0.9,0.4,1.3l14.7,36.8h-9.8\r\n\t\tc-12.1,0-21.9,9.8-21.9,21.9s9.8,21.9,21.9,21.9h12.9c4.7,22.5,18.4,41.5,36.9,52.8v12.9l-40.8,10.2c-2.1,0.5-3.9,2-4.7,4\r\n\t\tc-0.8,1.8-0.8,3.8,0,5.5l-62.7,16.7c0,0-0.1,0-0.1,0c-1.1,0.3-26.8,8.1-26.8,42.2v140.6c0,0.3,0,0.6,0.1,0.8\r\n\t\tc1.8,14.9,12.5,43,40.2,43h299.3c3.9,0,7-3.1,7-7l0-177.9C362.9,319.3,362.1,284.3,335.4,277.7z M258.1,264.3l-29.1,52l-25.1-27.9\r\n\t\tc16.2-5.9,23.6-21.6,25.5-31.3L258.1,264.3z M287.4,155.1c0,4.4-3.5,7.9-7.9,7.9h-11.2c0-1,0.1-2.1,0.1-3.1c0-4.4-0.2-8.6-0.6-12.7\r\n\t\th11.7C283.9,147.2,287.4,150.7,287.4,155.1z M109.5,85.6c0-18.5,15.1-33.6,33.6-33.6c12.2,0,23.5,6.7,29.4,17.4\r\n\t\tc1.9,3.4,6.1,4.6,9.5,2.7c3.4-1.9,4.6-6.1,2.7-9.5c-6.6-12-18-20.4-31.1-23.4c8-6.1,21.3-13.9,37.3-13.9c18.2,0,34,9.3,43.4,14.9\r\n\t\tc2.5,1.5,4.4,2.6,6.1,3.4c5.1,2.4,29.8,21.3,29.6,40.4c-0.2,11.4-5.1,23.7-9.4,32.4c-2.6-6.8-5.8-13.6-9.8-20.7\r\n\t\tc-1.1-2-3.1-3.3-5.4-3.5c-2.2-0.2-4.5,0.6-6,2.3c-0.2,0.2-20,22.1-49,22.2c-28.9-0.2-48.8-22-49-22.2c-1.5-1.7-3.7-2.6-6-2.3\r\n\t\tc-2.3,0.2-4.3,1.5-5.4,3.5c-4.2,7.4-7.5,14.4-10.1,21.5l-10.1-25.4C109.7,89.8,109.5,87.6,109.5,85.6z M101.7,163\r\n\t\tc-4.4,0-7.9-3.5-7.9-7.9s3.5-7.9,7.9-7.9h11.7c-0.4,4.1-0.6,8.3-0.6,12.7c0,1,0,2.1,0.1,3.1H101.7z M126.8,159.9\r\n\t\tc0-17.8,3.5-33,11.5-49.3c9.5,7.9,27.7,19.9,51.7,20.2c0.1,0,0.2,0,0.3,0c0.1,0,0.2,0,0.3,0c0.1,0,0.2,0,0.3,0c0.1,0,0.2,0,0.3,0\r\n\t\tc24-0.3,42.3-12.3,51.7-20.2c8,16.3,11.5,31.5,11.5,49.3c0,36.8-28.6,66.8-63.8,67C155.4,226.7,126.8,196.7,126.8,159.9z\r\n\t\t M189.5,240.9c0.2,0,0.5,0,0.7,0c0.1,0,0.3,0,0.4,0c0.1,0,0.3,0,0.4,0c0.3,0,0.5,0,0.7,0c8.3-0.2,16.3-1.7,23.9-4.4v17.8\r\n\t\tc-0.8,3.5-5.8,22.1-25,22.3c-19.3-0.2-24.3-18.9-25.1-22.3v-17.9C173,239.2,181.1,240.7,189.5,240.9z M151.8,257.1\r\n\t\tc1.9,9.7,9.3,25.4,25.5,31.3l-25.1,27.9l-29.1-52L151.8,257.1z M209.4,445.8c2.1,0.8,8.2,4.2,8.2,16.5v29.4h-53.8v-45.9H209.4z\r\n\t\t M208.3,369.8h-34.6v-15.2c0-9.5,7.8-17.3,17.3-17.3s17.3,7.8,17.3,17.3V369.8z M219.9,383.8V403H159v-19.3H219.9z M199.9,417v14.8\r\n\t\th-18.8V417H199.9z M348.9,491.7h-56.1V381.6c0-3.9-3.1-7-7-7s-7,3.1-7,7v110.1h-47.2v-29.4c0-13-5.1-20.5-9.3-24.5\r\n\t\tc-3.2-3-6.4-4.5-8.4-5.2V417h13c3.9,0,7-3.1,7-7v-33.3c0-3.9-3.1-7-7-7h-4.6v-15.2c0-17.3-14-31.3-31.3-31.3s-31.3,14-31.3,31.3\r\n\t\tv15.2H152c-3.9,0-7,3.1-7,7V410c0,3.9,3.1,7,7,7h15.2v14.8h-65.8v-49.8c0-3.9-3.1-7-7-7s-7,3.1-7,7v56.8c0,3.9,3.1,7,7,7h55.5v45.9\r\n\t\tH56.6c-21.1,0-25.7-26.6-26.3-30.3V321.3c0-23.1,15.7-28.4,16.6-28.7l66-17.5l31.7,56.6c1.1,2,3.1,3.3,5.3,3.5c0.3,0,0.5,0,0.8,0\r\n\t\tc2,0,3.9-0.8,5.2-2.3l34.5-38.4l34.5,38.4c1.3,1.5,3.2,2.3,5.2,2.3c0.3,0,0.5,0,0.8,0c2.2-0.2,4.2-1.6,5.3-3.5l31.8-56.7\r\n\t\tc8.6,2.2,44.9,11.7,63.9,16.4c15.9,3.9,16.8,28.5,16.8,29.6V491.7z'\r\n />\r\n </g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport default NewsChannelIcon\r\n","/* eslint-disable react/self-closing-comp */\r\nimport React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst WeatherIcon = ({ className, color }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n version='1.1'\r\n xmlns='http://www.w3.org/2000/svg'\r\n xmlnsXlink='http://www.w3.org/1999/xlink'\r\n x='0px'\r\n y='0px'\r\n className={className || 'rf-h-6 rf-w-6'}\r\n viewBox='0 0 512 512'\r\n xmlSpace='preserve'\r\n >\r\n <g fill={color || '#1999B1'}>\r\n <g>\r\n <path\r\n d='M439.2,385.3c0.7-3.5,1-7,1-10.6c0-31.2-25.4-56.5-56.5-56.5c-6.5,0-13,1.1-19.1,3.3c-1.4-3.6-3-7.1-4.8-10.4\r\n\t\t\tC392,287.3,411,249.8,411,209.6c0-69.5-56.5-126-126-126c-69.5,0-126,56.5-126,126c0,5.7,0.4,11.3,1.1,16.9\r\n\t\t\tc-16.7,9.5-30,24.6-37.2,43c-5.5-1.9-11.4-2.9-17.3-2.9c-29.1,0-52.7,23.6-52.7,52.7c0,3.2,0.3,6.4,0.9,9.5\r\n\t\t\tc-20.8,10.3-34.5,31.8-34.5,55.3c0,34,27.6,61.6,61.6,61.6c0.7,0.2,1.4,0.3,2.1,0.3h26.1c2.9,15.6,10.3,29.9,21.6,41.4\r\n\t\t\tc14.2,14.4,33,22.8,53.2,23.7c0.8,0.3,1.6,0.4,2.5,0.4h221.5c0.8,0,1.5-0.1,2.2-0.3c0,0,0.1,0,0.1,0c36.5,0,66.2-29.7,66.2-66.2\r\n\t\t\tC476.6,419.5,461.8,396.3,439.2,385.3z M173.1,209.6c0-61.7,50.2-112,112-112s112,50.2,112,112c0,35.4-16.7,68.5-44.8,89.6\r\n\t\t\tc-17-22.6-44-36.7-73.4-36.7c-0.1,0-0.1,0-0.2,0c-14.3-28.8-43.8-47.2-76.2-47.2c-10,0-19.7,1.8-28.8,5.1\r\n\t\t\tC173.3,216.7,173.1,213.2,173.1,209.6z M85.4,432c-0.8-0.3-1.7-0.4-2.5-0.4c-0.6,0-1.2,0-1.8,0c-26.3,0-47.6-21.4-47.6-47.6\r\n\t\t\tc0-19.8,12.5-37.8,31.1-44.7c3.5-1.3,5.4-5.1,4.3-8.6c-1.1-3.7-1.7-7.6-1.7-11.5c0-21.3,17.4-38.7,38.7-38.7\r\n\t\t\tc6.3,0,12.6,1.6,18.2,4.5c1.9,1,4.1,1.1,6,0.3c1.9-0.8,3.4-2.5,4-4.5c8.6-30.4,36.8-51.6,68.4-51.6c25.2,0,48.2,13.3,61,34.5\r\n\t\t\tc-42.5,7.2-75.1,43.8-76.2,88c-43.7,0.3-79.2,35.9-79.2,79.7c0,0.2,0,0.4,0,0.6H85.4z M410.3,497.2c-0.7,0-1.3,0-2-0.1\r\n\t\t\tc-0.9,0-1.8,0.1-2.6,0.4H188.9c-0.7-0.2-1.4-0.4-2.2-0.4c-17.4-0.3-33.6-7.2-45.8-19.6c-12.2-12.4-18.9-28.8-18.9-46.1\r\n\t\t\tc0-36.2,29.5-65.7,65.7-65.7c1.9,0,3.9,0.1,6,0.3c2,0.2,4-0.5,5.5-1.9s2.2-3.4,2.1-5.4c-0.1-1.6-0.1-3.1-0.1-4.5\r\n\t\t\tc0-42.8,34.8-77.7,77.7-77.7c34.6,0,65.3,23.2,74.7,56.4c0.6,2,2,3.7,4,4.5c1.9,0.8,4.2,0.7,6-0.3c6.1-3.3,13-5,20-5\r\n\t\t\tc23.5,0,42.5,19.1,42.5,42.5c0,4.3-0.6,8.6-1.9,12.6c-1.1,3.6,0.8,7.3,4.3,8.6c20.4,7.6,34.1,27.2,34.1,49\r\n\t\t\tC462.6,473.8,439.2,497.2,410.3,497.2z'\r\n />\r\n <path d='M485.4,203.6H443c-3.9,0-7,3.1-7,7s3.1,7,7,7h42.4c3.9,0,7-3.1,7-7S489.3,203.6,485.4,203.6z' />\r\n <path d='M84.6,217.6h42.4c3.9,0,7-3.1,7-7s-3.1-7-7-7H84.6c-3.9,0-7,3.1-7,7S80.7,217.6,84.6,217.6z' />\r\n <path d='M284.7,58.9c3.9,0,7-3.1,7-7V9.5c0-3.9-3.1-7-7-7s-7,3.1-7,7v42.4C277.7,55.7,280.8,58.9,284.7,58.9z' />\r\n <path\r\n d='M360,79.4c1.1,0.6,2.3,0.9,3.5,0.9c2.4,0,4.8-1.3,6.1-3.5l21.2-36.7c1.9-3.3,0.8-7.6-2.6-9.6\r\n\t\t\ts-7.6-0.8-9.6,2.6l-21.2,36.7C355.5,73.2,356.7,77.4,360,79.4z'\r\n />\r\n <path\r\n d='M199.7,76.8c1.3,2.2,3.6,3.5,6.1,3.5c1.2,0,2.4-0.3,3.5-0.9c3.3-1.9,4.5-6.2,2.6-9.6l-21.2-36.7\r\n\t\t\tc-1.9-3.3-6.2-4.5-9.6-2.6s-4.5,6.2-2.6,9.6L199.7,76.8z'\r\n />\r\n <path\r\n d='M107.8,116.6l36.7,21.2c1.1,0.6,2.3,0.9,3.5,0.9c2.4,0,4.8-1.3,6.1-3.5c1.9-3.3,0.8-7.6-2.6-9.6l-36.7-21.2\r\n\t\t\tc-3.3-1.9-7.6-0.8-9.6,2.6S104.5,114.7,107.8,116.6z'\r\n />\r\n <path\r\n d='M422.3,138.7c1.2,0,2.4-0.3,3.5-0.9l36.7-21.2c3.3-1.9,4.5-6.2,2.6-9.6c-1.9-3.3-6.2-4.5-9.6-2.6l-36.7,21.2\r\n\t\t\tc-3.3,1.9-4.5,6.2-2.6,9.6C417.5,137.5,419.9,138.7,422.3,138.7z'\r\n />\r\n <path\r\n d='M416.5,286.6c-1.9,3.3-0.8,7.6,2.6,9.6l36.7,21.2c1.1,0.6,2.3,0.9,3.5,0.9c2.4,0,4.8-1.3,6.1-3.5\r\n\t\t\tc1.9-3.3,0.8-7.6-2.6-9.6l-36.7-21.2C422.8,282.1,418.5,283.3,416.5,286.6z'\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport default WeatherIcon\r\n","import HistoryIcon from './HistoryIcon'\r\nimport LanguageIcon from './LanguageIcon'\r\nimport ParametersIcon from './ParametersIcon'\r\nimport TutorialIcon from './TutorialIcon'\r\n\r\nexport { HistoryIcon, LanguageIcon, ParametersIcon, TutorialIcon }\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst HistoryIcon = ({ className, color }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n xmlnsXlink='http://www.w3.org/1999/xlink'\r\n className={className || 'rf-w-6 rf-flex-1'}\r\n viewBox='0 0 14 14'\r\n >\r\n <defs>\r\n <filter id='Icon_awesome-history'>\r\n <feOffset dy='3' in='SourceAlpha' />\r\n <feGaussianBlur stdDeviation='3' result='blur' />\r\n <feFlood floodOpacity='0.161' result='color' />\r\n <feComposite operator='out' in='SourceGraphic' in2='blur' />\r\n <feComposite operator='in' in='color' />\r\n <feComposite operator='in' in2='SourceGraphic' />\r\n </filter>\r\n </defs>\r\n <g>\r\n <path\r\n d='M14.562,7.549A7,7,0,0,1,3.169,13.013a.677.677,0,0,1-.052-1.005l.318-.318a.679.679,0,0,1,.9-.056A5.194,5.194,0,1,0,4,3.778L5.437,5.211a.452.452,0,0,1-.319.771h-4.1A.452.452,0,0,1,.563,5.53v-4.1a.452.452,0,0,1,.771-.319L2.727,2.5A7,7,0,0,1,14.562,7.549ZM9.456,9.773l.277-.356a.677.677,0,0,0-.119-.951L8.466,7.572V4.627a.677.677,0,0,0-.677-.677H7.337a.677.677,0,0,0-.677.677V8.456L8.505,9.892A.677.677,0,0,0,9.456,9.773Z'\r\n transform='translate(-0.563 -0.563)'\r\n fill={color || '#a4a7af'}\r\n />\r\n <g\r\n transform='matrix(1, 0, 0, 1, 0, 0)'\r\n filter='url(#Icon_awesome-history)'\r\n >\r\n <path\r\n d='M14.562,7.549A7,7,0,0,1,3.169,13.013a.677.677,0,0,1-.052-1.005l.318-.318a.679.679,0,0,1,.9-.056A5.194,5.194,0,1,0,4,3.778L5.437,5.211a.452.452,0,0,1-.319.771h-4.1A.452.452,0,0,1,.563,5.53v-4.1a.452.452,0,0,1,.771-.319L2.727,2.5A7,7,0,0,1,14.562,7.549ZM9.456,9.773l.277-.356a.677.677,0,0,0-.119-.951L8.466,7.572V4.627a.677.677,0,0,0-.677-.677H7.337a.677.677,0,0,0-.677.677V8.456L8.505,9.892A.677.677,0,0,0,9.456,9.773Z'\r\n transform='translate(-0.56 -0.56)'\r\n fill='#fff'\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport default HistoryIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst LanguageIcon = ({ className, color }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n className={className || 'w-6'}\r\n viewBox='0 0 21 21'\r\n >\r\n <path\r\n d='M13.49,3A10.5,10.5,0,1,0,24,13.5,10.495,10.495,0,0,0,13.49,3Zm7.277,6.3h-3.1A16.432,16.432,0,0,0,16.22,5.562,8.431,8.431,0,0,1,20.766,9.3ZM13.5,5.142A14.791,14.791,0,0,1,15.505,9.3H11.494A14.791,14.791,0,0,1,13.5,5.142ZM5.373,15.6a8.213,8.213,0,0,1,0-4.2H8.922a17.341,17.341,0,0,0-.147,2.1,17.341,17.341,0,0,0,.147,2.1Zm.861,2.1h3.1a16.432,16.432,0,0,0,1.449,3.738A8.386,8.386,0,0,1,6.234,17.7Zm3.1-8.4h-3.1A8.386,8.386,0,0,1,10.78,5.562,16.432,16.432,0,0,0,9.331,9.3ZM13.5,21.858A14.791,14.791,0,0,1,11.494,17.7h4.011A14.791,14.791,0,0,1,13.5,21.858ZM15.957,15.6H11.043a15.448,15.448,0,0,1-.168-2.1,15.314,15.314,0,0,1,.168-2.1h4.914a15.314,15.314,0,0,1,.168,2.1A15.448,15.448,0,0,1,15.957,15.6Zm.262,5.838A16.431,16.431,0,0,0,17.668,17.7h3.1a8.431,8.431,0,0,1-4.546,3.738ZM18.078,15.6a17.341,17.341,0,0,0,.147-2.1,17.341,17.341,0,0,0-.147-2.1h3.549a8.213,8.213,0,0,1,0,4.2Z'\r\n transform='translate(-3 -3)'\r\n fill={color || '#90939a'}\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default LanguageIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst ParametersIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n xmlnsXlink='http://www.w3.org/1999/xlink'\r\n className={className || 'rf-h-6 rf-w-6'}\r\n viewBox='0 0 27.005 27.012'\r\n >\r\n <defs>\r\n <filter id='Icon_ionic-ios-settings'>\r\n <feOffset dy='3' in='SourceAlpha' />\r\n <feGaussianBlur stdDeviation='3' result='blur' />\r\n <feFlood floodOpacity='0.161' result='color' />\r\n <feComposite operator='out' in='SourceGraphic' in2='blur' />\r\n <feComposite operator='in' in='color' />\r\n <feComposite operator='in' in2='SourceGraphic' />\r\n </filter>\r\n </defs>\r\n <g>\r\n <path\r\n d='M29.276,18a3.475,3.475,0,0,1,2.229-3.242,13.774,13.774,0,0,0-1.667-4.016,3.522,3.522,0,0,1-1.414.3,3.467,3.467,0,0,1-3.172-4.881A13.733,13.733,0,0,0,21.245,4.5a3.472,3.472,0,0,1-6.484,0,13.774,13.774,0,0,0-4.016,1.667,3.467,3.467,0,0,1-3.172,4.881,3.407,3.407,0,0,1-1.414-.3A14.079,14.079,0,0,0,4.5,14.768a3.474,3.474,0,0,1,.007,6.484,13.774,13.774,0,0,0,1.667,4.016,3.469,3.469,0,0,1,4.578,4.578,13.855,13.855,0,0,0,4.016,1.667,3.466,3.466,0,0,1,6.47,0,13.774,13.774,0,0,0,4.016-1.667,3.472,3.472,0,0,1,4.578-4.578A13.855,13.855,0,0,0,31.5,21.252,3.492,3.492,0,0,1,29.276,18Zm-11.21,5.619A5.626,5.626,0,1,1,23.692,18,5.625,5.625,0,0,1,18.066,23.622Z'\r\n transform='translate(-4.5 -4.5)'\r\n fill={color || '#a4a7af'}\r\n />\r\n <g\r\n transform='matrix(1, 0, 0, 1, 0, 0)'\r\n filter='url(#Icon_ionic-ios-settings)'\r\n >\r\n <path\r\n d='M29.276,18a3.475,3.475,0,0,1,2.229-3.242,13.774,13.774,0,0,0-1.667-4.016,3.522,3.522,0,0,1-1.414.3,3.467,3.467,0,0,1-3.172-4.881A13.733,13.733,0,0,0,21.245,4.5a3.472,3.472,0,0,1-6.484,0,13.774,13.774,0,0,0-4.016,1.667,3.467,3.467,0,0,1-3.172,4.881,3.407,3.407,0,0,1-1.414-.3A14.079,14.079,0,0,0,4.5,14.768a3.474,3.474,0,0,1,.007,6.484,13.774,13.774,0,0,0,1.667,4.016,3.469,3.469,0,0,1,4.578,4.578,13.855,13.855,0,0,0,4.016,1.667,3.466,3.466,0,0,1,6.47,0,13.774,13.774,0,0,0,4.016-1.667,3.472,3.472,0,0,1,4.578-4.578A13.855,13.855,0,0,0,31.5,21.252,3.492,3.492,0,0,1,29.276,18Zm-11.21,5.619A5.626,5.626,0,1,1,23.692,18,5.625,5.625,0,0,1,18.066,23.622Z'\r\n transform='translate(-4.5 -4.5)'\r\n fill='#fff'\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport default ParametersIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst TutorialIcon = ({ className, color }: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n xmlnsXlink='http://www.w3.org/1999/xlink'\r\n className={className || 'rf-h-6 rf-w-6'}\r\n viewBox='0 0 21.039 21.039'\r\n >\r\n <defs>\r\n <filter id='Icon_ionic-ios-help-buoy'>\r\n <feOffset dy='3' in='SourceAlpha' />\r\n <feGaussianBlur stdDeviation='3' result='blur' />\r\n <feFlood floodOpacity='0.161' result='color' />\r\n <feComposite operator='out' in='SourceGraphic' in2='blur' />\r\n <feComposite operator='in' in='color' />\r\n <feComposite operator='in' in2='SourceGraphic' />\r\n </filter>\r\n </defs>\r\n <g data-type='innerShadowGroup'>\r\n <path\r\n id='Icon_ionic-ios-help-buoy-2'\r\n data-name='Icon ionic-ios-help-buoy'\r\n d='M13.894,3.375A10.519,10.519,0,1,0,24.414,13.894,10.518,10.518,0,0,0,13.894,3.375Zm2.761,1.841a9.126,9.126,0,0,1,5.917,5.917l-4.491.3a4.856,4.856,0,0,0-1.714-1.72Zm-9.2,2.24a9.038,9.038,0,0,1,3.677-2.24l.288,4.5a4.968,4.968,0,0,0-1.714,1.714l-4.5-.3A9.139,9.139,0,0,1,7.456,7.456Zm3.677,15.117a9.126,9.126,0,0,1-5.917-5.917l4.5-.288a4.9,4.9,0,0,0,1.709,1.709Zm2.761-5.239a3.439,3.439,0,1,1,3.439-3.439A3.443,3.443,0,0,1,13.894,17.333Zm6.438,3a9.072,9.072,0,0,1-3.677,2.24l-.3-4.5a4.872,4.872,0,0,0,1.725-1.73l4.491.3A9.056,9.056,0,0,1,20.332,20.332Z'\r\n transform='translate(-3.375 -3.375)'\r\n fill={color || '#a4a7af'}\r\n />\r\n <g\r\n transform='matrix(1, 0, 0, 1, 0, 0)'\r\n filter='url(#Icon_ionic-ios-help-buoy)'\r\n >\r\n <path\r\n d='M13.894,3.375A10.519,10.519,0,1,0,24.414,13.894,10.518,10.518,0,0,0,13.894,3.375Zm2.761,1.841a9.126,9.126,0,0,1,5.917,5.917l-4.491.3a4.856,4.856,0,0,0-1.714-1.72Zm-9.2,2.24a9.038,9.038,0,0,1,3.677-2.24l.288,4.5a4.968,4.968,0,0,0-1.714,1.714l-4.5-.3A9.139,9.139,0,0,1,7.456,7.456Zm3.677,15.117a9.126,9.126,0,0,1-5.917-5.917l4.5-.288a4.9,4.9,0,0,0,1.709,1.709Zm2.761-5.239a3.439,3.439,0,1,1,3.439-3.439A3.443,3.443,0,0,1,13.894,17.333Zm6.438,3a9.072,9.072,0,0,1-3.677,2.24l-.3-4.5a4.872,4.872,0,0,0,1.725-1.73l4.491.3A9.056,9.056,0,0,1,20.332,20.332Z'\r\n transform='translate(-3.38 -3.38)'\r\n fill='#fff'\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport default TutorialIcon\r\n","import React, { useEffect, useState } from 'react'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport { DEFAULT_SUB_VIEWS } from '../../../models/constants'\r\nimport DisplaySubGenerator from './DisplaySubGenerator'\r\nimport { useRetorik } from '../../Contexts/RetorikContext'\r\nimport { BaseSubMenu, CustomMenu } from '../../../models/types'\r\n\r\ninterface DisplaySubViewsProps {\r\n handleClick?: () => void\r\n conditionalHandleClick?: () => void\r\n}\r\n\r\nconst DisplaySubViews = ({\r\n handleClick,\r\n conditionalHandleClick\r\n}: DisplaySubViewsProps): JSX.Element => {\r\n const { currentDeviceType, isMobile } = useView()\r\n const { configuration } = useRetorik()\r\n const [subMenu, setSubMenu] = useState<Array<JSX.Element>>([])\r\n\r\n const buildMenu = (\r\n menu: Array<BaseSubMenu | CustomMenu>\r\n ): Array<JSX.Element> => {\r\n let fullMenu: Array<JSX.Element> = []\r\n menu.forEach((currentMenu) => {\r\n // If the menu has 'icon' as key, it's a CustomMenu. Otherwise it's a BaseSubMenu\r\n if (Object.keys(currentMenu).includes('icon')) {\r\n const customCurrentMenu = currentMenu as CustomMenu\r\n fullMenu.push(\r\n <DisplaySubGenerator\r\n type='CustomMenu'\r\n indice={customCurrentMenu.indice}\r\n label={customCurrentMenu.label}\r\n icon={customCurrentMenu.icon}\r\n device={currentDeviceType}\r\n handleClick={(): void => {\r\n if (customCurrentMenu.clickHandler) {\r\n customCurrentMenu.clickHandler()\r\n }\r\n handleClick && handleClick()\r\n }}\r\n customDisplay={customCurrentMenu.customDisplay}\r\n conditionalHandleClick={\r\n customCurrentMenu.closeParametersOnClickInMobileMode\r\n ? conditionalHandleClick\r\n : undefined\r\n }\r\n />\r\n )\r\n } else {\r\n // In mobile mode, we only push custom items, base items (history / tutorial) have their own render\r\n !isMobile &&\r\n fullMenu.push(\r\n <DisplaySubGenerator\r\n type='BaseMenu'\r\n indice={currentMenu.indice}\r\n view={(currentMenu as BaseSubMenu).view}\r\n device={currentDeviceType}\r\n handleClick={handleClick}\r\n />\r\n )\r\n }\r\n })\r\n\r\n fullMenu = fullMenu.sort(\r\n (a: any, b: any) => a.props.indice - b.props.indice\r\n )\r\n return fullMenu\r\n }\r\n\r\n useEffect(() => {\r\n // Handle custom submenus\r\n if (configuration && configuration.subMenu) {\r\n setSubMenu(buildMenu(configuration.subMenu))\r\n } else {\r\n setSubMenu(buildMenu(DEFAULT_SUB_VIEWS))\r\n }\r\n }, [])\r\n\r\n return (\r\n <React.Fragment>\r\n {subMenu.map((e: JSX.Element, key) => {\r\n return <React.Fragment key={key}>{e}</React.Fragment>\r\n })}\r\n </React.Fragment>\r\n )\r\n}\r\n\r\nexport default DisplaySubViews\r\n","import React, { useState, useEffect } from 'react'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport { useRetorik } from '../../Contexts/RetorikContext'\r\nimport { AvailableSubViews, CurrentSubView } from '../../../models/enums'\r\nimport translation from '../../../translations/views.json'\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\nimport { mobileDisplays } from '../../../models/constants'\r\nimport DisplayIcon from './DisplayIcon'\r\nimport type { LocalizedStrings } from '../../../models/types'\r\n\r\ninterface DisplaySubGeneratorProps {\r\n indice: number\r\n view: number\r\n device: number\r\n handleClick?: () => void\r\n type: string\r\n}\r\n\r\ninterface CustomMenuDisplaySubGeneratorProps {\r\n indice: number\r\n label: LocalizedStrings | string\r\n device: number\r\n handleClick?: () => void\r\n conditionalHandleClick?: () => void\r\n icon: JSX.Element\r\n customDisplay?: string\r\n type: string\r\n}\r\n\r\nfunction instanceOfDisplayGeneratorProps(\r\n object: any\r\n): object is DisplaySubGeneratorProps {\r\n return 'view' in object && object.type === 'BaseMenu'\r\n}\r\n\r\nfunction instanceOfCustomMenuDisplayGeneratorProps(\r\n object: any\r\n): object is CustomMenuDisplaySubGeneratorProps {\r\n return 'icon' in object && object.type === 'CustomMenu'\r\n}\r\n\r\nconst DisplaySubGenerator = (\r\n props: DisplaySubGeneratorProps | CustomMenuDisplaySubGeneratorProps\r\n): JSX.Element => {\r\n const locale = useLocaleStore((state) => state.locale)\r\n const { setCurrentSubView, setCustomView } = useRetorik()\r\n const { isMobile } = useView()\r\n const [label, setLabel] = useState<string>('')\r\n\r\n /**\r\n * On component mount :\r\n * - set label state depending on the locale\r\n */\r\n useEffect(() => {\r\n if (instanceOfDisplayGeneratorProps(props)) {\r\n setLabel(\r\n translation[locale]?.[props.view.toString()] ||\r\n translation['fr-FR'][props.view.toString()]\r\n )\r\n } else if (instanceOfCustomMenuDisplayGeneratorProps(props)) {\r\n if (props.label && typeof props.label === 'string') {\r\n setLabel(props.label)\r\n } else if (props.label && typeof props.label === 'object') {\r\n setLabel(props.label[locale])\r\n }\r\n }\r\n }, [locale])\r\n\r\n /**\r\n * On call :\r\n * - switch on chosen view\r\n * - either display an overlaying page or redirect to another view\r\n * - if handleClick is defined, call it\r\n */\r\n const handleClickOnCard = (): void => {\r\n if (instanceOfDisplayGeneratorProps(props)) {\r\n switch (props.view) {\r\n case AvailableSubViews.history:\r\n setCurrentSubView(CurrentSubView.history)\r\n break\r\n case AvailableSubViews.tutorial:\r\n console.log('Tutorial')\r\n break\r\n }\r\n } else if (instanceOfCustomMenuDisplayGeneratorProps(props)) {\r\n // Call props' closing function in mobile mode if asked by the custom component\r\n isMobile && props.conditionalHandleClick && props.conditionalHandleClick()\r\n if (props.customDisplay) {\r\n setCurrentSubView(CurrentSubView.custom)\r\n setCustomView({\r\n view: props.customDisplay,\r\n title: label,\r\n icon: props.icon\r\n })\r\n }\r\n }\r\n\r\n props.handleClick && props.handleClick()\r\n }\r\n\r\n return mobileDisplays.includes(props.device) ? (\r\n /* On mobile / widget : display available views as lines, without icons */\r\n <button\r\n className={`rf-w-full rf-py-4 rf-flex rf-flex-row rf-items-center ${\r\n props.indice !== 0 && 'rf-border-t rf-border-t-menuBorder'\r\n }`}\r\n onClick={handleClickOnCard}\r\n aria-label={label}\r\n >\r\n {capitalizeFirstLetter(label)}\r\n </button>\r\n ) : (\r\n /* On desktop / borne : display available views as buttons at the center of the screen */\r\n <button\r\n className='rf-h-24 rf-w-24 rf-p-4 rf-flex rf-flex-col rf-items-center rf-justify-between rf-rounded rf-shadow-[3px_3px_16px_#00000029]'\r\n style={{\r\n background: 'linear-gradient(to left top, #F2F3F6, #E5E6EC)'\r\n }}\r\n onClick={handleClickOnCard}\r\n aria-label={label}\r\n >\r\n {instanceOfDisplayGeneratorProps(props) ? (\r\n <DisplayIcon view={props.view} className='rf-h-8' />\r\n ) : (\r\n <DisplayIcon icon={props.icon} className='rf-h-8 rf-w-8 rf-flex' />\r\n )}\r\n <div className='rf-uppercase rf-text-[#575F6B] rf-text-xs'>{label}</div>\r\n </button>\r\n )\r\n}\r\n\r\nexport default DisplaySubGenerator\r\n","import React from 'react'\r\nimport { useRetorik } from '../../Contexts/RetorikContext'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport translation from '../../../translations/menu.json'\r\nimport ParameterButton from './ParameterButton'\r\nimport { CurrentSubView } from '../../../models/enums'\r\n\r\ninterface HistoryButtonProps {\r\n handleBack?: () => void\r\n}\r\n\r\nconst HistoryButton = ({ handleBack }: HistoryButtonProps): JSX.Element => {\r\n const { locale } = useLocaleStore()\r\n const { themeColors } = useView()\r\n const { currentSubView, setCurrentSubView } = useRetorik()\r\n\r\n /**\r\n * On call :\r\n * - call parent's handleBack method if defined\r\n * - change RetorikContext's currentSubView state\r\n */\r\n const handleClick = (): void => {\r\n handleBack && handleBack()\r\n setCurrentSubView(\r\n currentSubView === CurrentSubView.history\r\n ? CurrentSubView.none\r\n : CurrentSubView.history\r\n )\r\n }\r\n\r\n return (\r\n <ParameterButton\r\n title={translation[locale]?.history || translation['fr-FR'].history}\r\n icon='history'\r\n color={\r\n currentSubView === CurrentSubView.history\r\n ? themeColors.secondary\r\n : '#A4A7AF'\r\n }\r\n onClick={handleClick}\r\n />\r\n )\r\n}\r\n\r\nexport default HistoryButton\r\n","import React from 'react'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport languageInMotherTongue from '../../../translations/languageCodeToMotherTongue.json'\r\nimport * as Icons from '../../Icons/ParameterIcons'\r\nimport { ChevronRightIcon } from '../../Icons/ChevronIcons'\r\n\r\ninterface ParameterButtonProps {\r\n title: string\r\n color?: string\r\n icon: string\r\n onClick: () => void\r\n}\r\n\r\nconst ParameterButton = ({\r\n title,\r\n color,\r\n icon,\r\n onClick\r\n}: ParameterButtonProps): JSX.Element => {\r\n const { locale } = useLocaleStore()\r\n const { isMobile } = useView()\r\n\r\n return isMobile ? (\r\n <button\r\n className={`rf-w-full rf-py-4 rf-flex rf-flex-row ${\r\n icon === 'lang' ? 'rf-justify-between' : 'rf-justify-start'\r\n } rf-items-center rf-border-t rf-border-t-menuBorder rf-capitalize`}\r\n onClick={onClick}\r\n aria-label={title}\r\n >\r\n {title}\r\n {icon === 'lang' && (\r\n <div className='rf-flex rf-flex-row rf-items-center'>\r\n <div className='rf-mr-3 rf-text-lightgray rf-normal-case'>\r\n {languageInMotherTongue[locale]}\r\n </div>\r\n <ChevronRightIcon className='rf-h-4' />\r\n </div>\r\n )}\r\n </button>\r\n ) : (\r\n <button\r\n className='rf-width-fill-available rf-mx-3 rf-py-2 rf-flex rf-flex-row rf-justify-center rf-items-center rf-rounded-lg'\r\n style={{\r\n color: color || '#A4A7AF',\r\n background: 'linear-gradient(to left top, #F2F3F6, #E5E6EC)',\r\n boxShadow: '2px 2px 6px #00000029'\r\n }}\r\n onClick={onClick}\r\n aria-label={title}\r\n >\r\n {/* Icon */}\r\n {icon === 'tutorial' ? (\r\n <Icons.TutorialIcon className='rf-h-3 tactile:rf-h-4' color={color} />\r\n ) : icon === 'history' ? (\r\n <Icons.HistoryIcon className='rf-h-3 tactile:rf-h-4' color={color} />\r\n ) : icon === 'lang' ? (\r\n <Icons.LanguageIcon className='rf-h-3 tactile:rf-h-4' color={color} />\r\n ) : (\r\n <React.Fragment />\r\n )}\r\n\r\n {/* Title */}\r\n <div className='rf-ml-1 rf-uppercase'>{title}</div>\r\n </button>\r\n )\r\n}\r\n\r\nexport default ParameterButton\r\n","{\r\n \"aa\": \"Qafar\",\r\n \"aa-DJ\": \"Qafar (Yabuuti)\",\r\n \"aa-ER\": \"Qafar (Eretria)\",\r\n \"aa-ET\": \"Qafar (Otobbia)\",\r\n \"af\": \"Afrikaans\",\r\n \"af-NA\": \"Afrikaans (Namibië)\",\r\n \"af-ZA\": \"Afrikaans (Suid-Afrika)\",\r\n \"agq\": \"Aghem\",\r\n \"agq-CM\": \"Aghem (Kàmàlûŋ)\",\r\n \"ak\": \"Akan\",\r\n \"ak-GH\": \"Akan (Gaana)\",\r\n \"am\": \"አማርኛ\",\r\n \"am-ET\": \"አማርኛ (ኢትዮጵያ)\",\r\n \"ar\": \"العربية\",\r\n \"ar-001\": \"العربية (العالم)\",\r\n \"ar-AE\": \"العربية (الإمارات العربية المتحدة)\",\r\n \"ar-BH\": \"العربية (البحرين)\",\r\n \"ar-DJ\": \"العربية (جيبوتي)\",\r\n \"ar-DZ\": \"العربية (الجزائر)\",\r\n \"ar-EG\": \"العربية (مصر)\",\r\n \"ar-ER\": \"العربية (إريتريا)\",\r\n \"ar-IL\": \"العربية (إسرائيل)\",\r\n \"ar-IQ\": \"العربية (العراق)\",\r\n \"ar-JO\": \"العربية (الأردن)\",\r\n \"ar-KM\": \"العربية (جزر القمر)\",\r\n \"ar-KW\": \"العربية (الكويت)\",\r\n \"ar-LB\": \"العربية (لبنان)\",\r\n \"ar-LY\": \"العربية (ليبيا)\",\r\n \"ar-MA\": \"العربية (المملكة المغربية)\",\r\n \"ar-MR\": \"العربية (موريتانيا)\",\r\n \"arn\": \"Mapudungun\",\r\n \"arn-CL\": \"Mapudungun (Chile)\",\r\n \"ar-OM\": \"العربية (عمان)\",\r\n \"ar-PS\": \"العربية (السلطة الفلسطينية)\",\r\n \"ar-QA\": \"العربية (قطر)\",\r\n \"ar-SA\": \"العربية (المملكة العربية السعودية)\",\r\n \"ar-SD\": \"العربية (السودان)\",\r\n \"ar-SO\": \"العربية (الصومال)\",\r\n \"ar-SS\": \"العربية (جنوب السودان)\",\r\n \"ar-SY\": \"العربية (سوريا)\",\r\n \"ar-TD\": \"العربية (تشاد)\",\r\n \"ar-TN\": \"العربية (تونس)\",\r\n \"ar-YE\": \"العربية (اليمن)\",\r\n \"as\": \"অসমীয়া\",\r\n \"asa\": \"Kipare\",\r\n \"asa-TZ\": \"Kipare (Tadhania)\",\r\n \"as-IN\": \"অসমীয়া (ভাৰত)\",\r\n \"ast\": \"asturianu\",\r\n \"ast-ES\": \"asturianu (España)\",\r\n \"az\": \"azərbaycan\",\r\n \"az-Cyrl\": \"Азәрбајҹан дили\",\r\n \"az-Cyrl-AZ\": \"азәрбајҹан (Азәрбајҹан)\",\r\n \"az-Latn\": \"azərbaycan\",\r\n \"az-Latn-AZ\": \"azərbaycan (Azərbaycan)\",\r\n \"ba\": \"Башҡорт\",\r\n \"ba-RU\": \"Башҡорт (Рәсәй)\",\r\n \"bas\": \"Ɓàsàa\",\r\n \"bas-CM\": \"Ɓàsàa (Kàmɛ̀rûn)\",\r\n \"be\": \"Беларуская\",\r\n \"be-BY\": \"Беларуская (Беларусь)\",\r\n \"bem\": \"Ichibemba\",\r\n \"bem-ZM\": \"Ichibemba (Zambia)\",\r\n \"bez\": \"Hibena\",\r\n \"bez-TZ\": \"Hibena (Hutanzania)\",\r\n \"bg\": \"български\",\r\n \"bg-BG\": \"български (България)\",\r\n \"bin\": \"Ẹ̀dó\",\r\n \"bin-NG\": \"Ẹ̀dó (Nigeria)\",\r\n \"bm\": \"bamanakan\",\r\n \"bm-Latn\": \"bamanakan\",\r\n \"bm-Latn-ML\": \"bamanakan (Mali)\",\r\n \"bn\": \"বাংলা\",\r\n \"bn-BD\": \"বাংলা (বাংলাদেশ)\",\r\n \"bn-IN\": \"বাংলা (ভারত)\",\r\n \"bo\": \"བོད་ཡིག\",\r\n \"bo-CN\": \"བོད་ཡིག (ཀྲུང་ཧྭ་མི་དམངས་སྤྱི་མཐུན་རྒྱལ་ཁབ།)\",\r\n \"bo-IN\": \"བོད་སྐད་ (རྒྱ་གར་)\",\r\n \"br\": \"brezhoneg\",\r\n \"br-FR\": \"brezhoneg (Frañs)\",\r\n \"brx\": \"बड़ो\",\r\n \"brx-IN\": \"बड़ो (भारत)\",\r\n \"bs\": \"bosanski\",\r\n \"bs-Cyrl\": \"босански\",\r\n \"bs-Cyrl-BA\": \"босански (Босна и Херцеговина)\",\r\n \"bs-Latn\": \"bosanski\",\r\n \"bs-Latn-BA\": \"bosanski (Bosna i Hercegovina)\",\r\n \"byn\": \"ብሊን\",\r\n \"byn-ER\": \"ብሊን (ኤርትራ)\",\r\n \"ca\": \"català\",\r\n \"ca-AD\": \"català (Andorra)\",\r\n \"ca-ES\": \"català (català)\",\r\n \"ca-ES-valencia\": \"valencià (Espanya)\",\r\n \"ca-FR\": \"català (França)\",\r\n \"ca-IT\": \"català (Itàlia)\",\r\n \"ce\": \"нохчийн\",\r\n \"ce-RU\": \"нохчийн (Росси)\",\r\n \"cgg\": \"Rukiga\",\r\n \"cgg-UG\": \"Rukiga (Uganda)\",\r\n \"chr\": \"ᏣᎳᎩ\",\r\n \"chr-Cher\": \"ᏣᎳᎩ\",\r\n \"chr-Cher-US\": \"ᏣᎳᎩ (ᏌᏊ ᎢᏳᎾᎵᏍᏔᏅ ᏍᎦᏚᎩ)\",\r\n \"co\": \"Corsu\",\r\n \"co-FR\": \"Corsu (Francia)\",\r\n \"cs\": \"čeština\",\r\n \"cs-CZ\": \"čeština (Česko)\",\r\n \"cu\": \"церковнослове́нскїй\",\r\n \"cu-RU\": \"церковнослове́нскїй (рѡссі́а)\",\r\n \"cy\": \"Cymraeg\",\r\n \"cy-GB\": \"Cymraeg (Y Deyrnas Unedig)\",\r\n \"da\": \"dansk\",\r\n \"da-DK\": \"dansk (Danmark)\",\r\n \"da-GL\": \"dansk (Grønland)\",\r\n \"dav\": \"Kitaita\",\r\n \"dav-KE\": \"Kitaita (Kenya)\",\r\n \"de\": \"Deutsch\",\r\n \"de-AT\": \"Deutsch (Österreich)\",\r\n \"de-BE\": \"Deutsch (Belgien)\",\r\n \"de-CH\": \"Deutsch (Schweiz)\",\r\n \"de-DE\": \"Deutsch (Deutschland)\",\r\n \"de-IT\": \"Deutsch (Italien)\",\r\n \"de-LI\": \"Deutsch (Liechtenstein)\",\r\n \"de-LU\": \"Deutsch (Luxemburg)\",\r\n \"dje\": \"Zarmaciine\",\r\n \"dje-NE\": \"Zarmaciine (Nižer)\",\r\n \"dsb\": \"dolnoserbšćina\",\r\n \"dsb-DE\": \"dolnoserbšćina (Nimska)\",\r\n \"dua\": \"duálá\",\r\n \"dua-CM\": \"duálá (Cameroun)\",\r\n \"dv\": \"ދިވެހިބަސް\",\r\n \"dv-MV\": \"ދިވެހިބަސް (ދިވެހި ރާއްޖެ)\",\r\n \"dyo\": \"joola\",\r\n \"dyo-SN\": \"joola (Senegal)\",\r\n \"dz\": \"རྫོང་ཁ\",\r\n \"dz-BT\": \"རྫོང་ཁ (འབྲུག)\",\r\n \"ebu\": \"Kĩembu\",\r\n \"ebu-KE\": \"Kĩembu (Kenya)\",\r\n \"ee\": \"Eʋegbe\",\r\n \"ee-GH\": \"Eʋegbe (Ghana nutome)\",\r\n \"ee-TG\": \"Eʋegbe (Togo nutome)\",\r\n \"el\": \"Ελληνικά\",\r\n \"el-CY\": \"Ελληνικά (Κύπρος)\",\r\n \"el-GR\": \"Ελληνικά (Ελλάδα)\",\r\n \"en\": \"English\",\r\n \"en-001\": \"English (World)\",\r\n \"en-029\": \"English (Caribbean)\",\r\n \"en-150\": \"English (Europe)\",\r\n \"en-AG\": \"English (Antigua and Barbuda)\",\r\n \"en-AI\": \"English (Anguilla)\",\r\n \"en-AS\": \"English (American Samoa)\",\r\n \"en-AT\": \"English (Austria)\",\r\n \"en-AU\": \"English (Australia)\",\r\n \"en-BB\": \"English (Barbados)\",\r\n \"en-BE\": \"English (Belgium)\",\r\n \"en-BI\": \"English (Burundi)\",\r\n \"en-BM\": \"English (Bermuda)\",\r\n \"en-BS\": \"English (Bahamas)\",\r\n \"en-BW\": \"English (Botswana)\",\r\n \"en-BZ\": \"English (Belize)\",\r\n \"en-CA\": \"English (Canada)\",\r\n \"en-CC\": \"English (Cocos (Keeling) Islands)\",\r\n \"en-CH\": \"English (Switzerland)\",\r\n \"en-CK\": \"English (Cook Islands)\",\r\n \"en-CM\": \"English (Cameroon)\",\r\n \"en-CX\": \"English (Christmas Island)\",\r\n \"en-CY\": \"English (Cyprus)\",\r\n \"en-DE\": \"English (Germany)\",\r\n \"en-DK\": \"English (Denmark)\",\r\n \"en-DM\": \"English (Dominica)\",\r\n \"en-ER\": \"English (Eritrea)\",\r\n \"en-FI\": \"English (Finland)\",\r\n \"en-FJ\": \"English (Fiji)\",\r\n \"en-FK\": \"English (Falkland Islands)\",\r\n \"en-FM\": \"English (Micronesia)\",\r\n \"en-GB\": \"English (United Kingdom)\",\r\n \"en-GD\": \"English (Grenada)\",\r\n \"en-GG\": \"English (Guernsey)\",\r\n \"en-GH\": \"English (Ghana)\",\r\n \"en-GI\": \"English (Gibraltar)\",\r\n \"en-GM\": \"English (Gambia)\",\r\n \"en-GU\": \"English (Guam)\",\r\n \"en-GY\": \"English (Guyana)\",\r\n \"en-HK\": \"English (Hong Kong SAR)\",\r\n \"en-ID\": \"English (Indonesia)\",\r\n \"en-IE\": \"English (Ireland)\",\r\n \"en-IL\": \"English (Israel)\",\r\n \"en-IM\": \"English (Isle of Man)\",\r\n \"en-IN\": \"English (India)\",\r\n \"en-IO\": \"English (British Indian Ocean Territory)\",\r\n \"en-JE\": \"English (Jersey)\",\r\n \"en-JM\": \"English (Jamaica)\",\r\n \"en-KE\": \"English (Kenya)\",\r\n \"en-KI\": \"English (Kiribati)\",\r\n \"en-KN\": \"English (Saint Kitts and Nevis)\",\r\n \"en-KY\": \"English (Cayman Islands)\",\r\n \"en-LC\": \"English (Saint Lucia)\",\r\n \"en-LR\": \"English (Liberia)\",\r\n \"en-LS\": \"English (Lesotho)\",\r\n \"en-MG\": \"English (Madagascar)\",\r\n \"en-MH\": \"English (Marshall Islands)\",\r\n \"en-MO\": \"English (Macao SAR)\",\r\n \"en-MP\": \"English (Northern Mariana Islands)\",\r\n \"en-MS\": \"English (Montserrat)\",\r\n \"en-MT\": \"English (Malta)\",\r\n \"en-MU\": \"English (Mauritius)\",\r\n \"en-MW\": \"English (Malawi)\",\r\n \"en-MY\": \"English (Malaysia)\",\r\n \"en-NA\": \"English (Namibia)\",\r\n \"en-NF\": \"English (Norfolk Island)\",\r\n \"en-NG\": \"English (Nigeria)\",\r\n \"en-NL\": \"English (Netherlands)\",\r\n \"en-NR\": \"English (Nauru)\",\r\n \"en-NU\": \"English (Niue)\",\r\n \"en-NZ\": \"English (New Zealand)\",\r\n \"en-PG\": \"English (Papua New Guinea)\",\r\n \"en-PH\": \"English (Philippines)\",\r\n \"en-PK\": \"English (Pakistan)\",\r\n \"en-PN\": \"English (Pitcairn Islands)\",\r\n \"en-PR\": \"English (Puerto Rico)\",\r\n \"en-PW\": \"English (Palau)\",\r\n \"en-RW\": \"English (Rwanda)\",\r\n \"en-SB\": \"English (Solomon Islands)\",\r\n \"en-SC\": \"English (Seychelles)\",\r\n \"en-SD\": \"English (Sudan)\",\r\n \"en-SE\": \"English (Sweden)\",\r\n \"en-SG\": \"English (Singapore)\",\r\n \"en-SH\": \"English (St Helena, Ascension, Tristan da Cunha)\",\r\n \"en-SI\": \"English (Slovenia)\",\r\n \"en-SL\": \"English (Sierra Leone)\",\r\n \"en-SS\": \"English (South Sudan)\",\r\n \"en-SX\": \"English (Sint Maarten)\",\r\n \"en-SZ\": \"English (Swaziland)\",\r\n \"en-TC\": \"English (Turks and Caicos Islands)\",\r\n \"en-TK\": \"English (Tokelau)\",\r\n \"en-TO\": \"English (Tonga)\",\r\n \"en-TT\": \"English (Trinidad and Tobago)\",\r\n \"en-TV\": \"English (Tuvalu)\",\r\n \"en-TZ\": \"English (Tanzania)\",\r\n \"en-UG\": \"English (Uganda)\",\r\n \"en-UM\": \"English (U.S. Outlying Islands)\",\r\n \"en-US\": \"English (United States)\",\r\n \"en-VC\": \"English (Saint Vincent and the Grenadines)\",\r\n \"en-VG\": \"English (British Virgin Islands)\",\r\n \"en-VI\": \"English (U.S. Virgin Islands)\",\r\n \"en-VU\": \"English (Vanuatu)\",\r\n \"en-WS\": \"English (Samoa)\",\r\n \"en-ZA\": \"English (South Africa)\",\r\n \"en-ZM\": \"English (Zambia)\",\r\n \"en-ZW\": \"English (Zimbabwe)\",\r\n \"eo\": \"esperanto\",\r\n \"eo-001\": \"esperanto (World)\",\r\n \"es\": \"español\",\r\n \"es-419\": \"español (Latinoamérica)\",\r\n \"es-AR\": \"español (Argentina)\",\r\n \"es-BO\": \"español (Bolivia)\",\r\n \"es-BR\": \"español (Brasil)\",\r\n \"es-BZ\": \"español (Belice)\",\r\n \"es-CL\": \"español (Chile)\",\r\n \"es-CO\": \"español (Colombia)\",\r\n \"es-CR\": \"español (Costa Rica)\",\r\n \"es-CU\": \"español (Cuba)\",\r\n \"es-DO\": \"español (República Dominicana)\",\r\n \"es-EC\": \"español (Ecuador)\",\r\n \"es-ES\": \"español (España, alfabetización internacional)\",\r\n \"es-GQ\": \"español (Guinea Ecuatorial)\",\r\n \"es-GT\": \"español (Guatemala)\",\r\n \"es-HN\": \"español (Honduras)\",\r\n \"es-MX\": \"español (México)\",\r\n \"es-NI\": \"español (Nicaragua)\",\r\n \"es-PA\": \"español (Panamá)\",\r\n \"es-PE\": \"español (Perú)\",\r\n \"es-PH\": \"español (Filipinas)\",\r\n \"es-PR\": \"español (Puerto Rico)\",\r\n \"es-PY\": \"español (Paraguay)\",\r\n \"es-SV\": \"español (El Salvador)\",\r\n \"es-US\": \"español (Estados Unidos)\",\r\n \"es-UY\": \"español (Uruguay)\",\r\n \"es-VE\": \"español (Venezuela)\",\r\n \"et\": \"eesti\",\r\n \"et-EE\": \"eesti (Eesti)\",\r\n \"eu\": \"euskara\",\r\n \"eu-ES\": \"euskara (euskara)\",\r\n \"ewo\": \"ewondo\",\r\n \"ewo-CM\": \"ewondo (Kamərún)\",\r\n \"fa\": \"فارسی\",\r\n \"fa-IR\": \"فارسی (ایران)\",\r\n \"ff\": \"Fulah\",\r\n \"ff-CM\": \"Pulaar (Kameruun)\",\r\n \"ff-GN\": \"Pulaar (Gine)\",\r\n \"ff-Latn\": \"Fulah\",\r\n \"ff-Latn-SN\": \"Fulah (Sénégal)\",\r\n \"ff-MR\": \"Pulaar (Muritani)\",\r\n \"ff-NG\": \"Pulaar (Nigeria)\",\r\n \"fi\": \"suomi\",\r\n \"fi-FI\": \"suomi (Suomi)\",\r\n \"fil\": \"Filipino\",\r\n \"fil-PH\": \"Filipino (Pilipinas)\",\r\n \"fo\": \"føroyskt\",\r\n \"fo-DK\": \"føroyskt (Danmark)\",\r\n \"fo-FO\": \"føroyskt (Føroyar)\",\r\n \"fr\": \"français\",\r\n \"fr-029\": \"français (caraïbes)\",\r\n \"fr-BE\": \"français (Belgique)\",\r\n \"fr-BF\": \"français (Burkina Faso)\",\r\n \"fr-BI\": \"français (Burundi)\",\r\n \"fr-BJ\": \"français (Bénin)\",\r\n \"fr-BL\": \"français (Saint-Barthélemy)\",\r\n \"fr-CA\": \"français (Canada)\",\r\n \"fr-CD\": \"français (Congo, République démocratique du)\",\r\n \"fr-CF\": \"français (République centrafricaine)\",\r\n \"fr-CG\": \"français (Congo)\",\r\n \"fr-CH\": \"français (Suisse)\",\r\n \"fr-CI\": \"français (Côte d’Ivoire)\",\r\n \"fr-CM\": \"français (Cameroun)\",\r\n \"fr-DJ\": \"français (Djibouti)\",\r\n \"fr-DZ\": \"français (Algérie)\",\r\n \"fr-FR\": \"français (France)\",\r\n \"fr-GA\": \"français (Gabon)\",\r\n \"fr-GF\": \"français (Guyane française)\",\r\n \"fr-GN\": \"français (Guinée)\",\r\n \"fr-GP\": \"français (Guadeloupe)\",\r\n \"fr-GQ\": \"français (Guinée équatoriale)\",\r\n \"fr-HT\": \"français (Haïti)\",\r\n \"fr-KM\": \"français (Comores)\",\r\n \"fr-LU\": \"français (Luxembourg)\",\r\n \"fr-MA\": \"français (Maroc)\",\r\n \"fr-MC\": \"français (Monaco)\",\r\n \"fr-MF\": \"français (Saint-Martin)\",\r\n \"fr-MG\": \"français (Madagascar)\",\r\n \"fr-ML\": \"français (Mali)\",\r\n \"fr-MQ\": \"français (Martinique)\",\r\n \"fr-MR\": \"français (Mauritanie)\",\r\n \"fr-MU\": \"français (Maurice)\",\r\n \"fr-NC\": \"français (Nouvelle-Calédonie)\",\r\n \"fr-NE\": \"français (Niger)\",\r\n \"fr-PF\": \"français (Polynésie française)\",\r\n \"fr-PM\": \"français (Saint-Pierre-et-Miquelon)\",\r\n \"fr-RE\": \"français (La Réunion)\",\r\n \"fr-RW\": \"français (Rwanda)\",\r\n \"fr-SC\": \"français (Seychelles)\",\r\n \"fr-SN\": \"français (Sénégal)\",\r\n \"fr-SY\": \"français (Syrie)\",\r\n \"fr-TD\": \"français (Tchad)\",\r\n \"fr-TG\": \"français (Togo)\",\r\n \"fr-TN\": \"français (Tunisie)\",\r\n \"fr-VU\": \"français (Vanuatu)\",\r\n \"fr-WF\": \"français (Wallis-et-Futuna)\",\r\n \"fr-YT\": \"français (Mayotte)\",\r\n \"fur\": \"furlan\",\r\n \"fur-IT\": \"furlan (Italie)\",\r\n \"fy\": \"Frysk\",\r\n \"fy-NL\": \"Frysk (Nederlân)\",\r\n \"ga\": \"Gaeilge\",\r\n \"ga-IE\": \"Gaeilge (Éire)\",\r\n \"gd\": \"Gàidhlig\",\r\n \"gd-GB\": \"Gàidhlig (An Rìoghachd Aonaichte)\",\r\n \"gl\": \"galego\",\r\n \"gl-ES\": \"galego (galego)\",\r\n \"gn\": \"Avañe’ẽ\",\r\n \"gn-PY\": \"Avañe’ẽ (Paraguái)\",\r\n \"gsw\": \"Schwiizertüütsch\",\r\n \"gsw-CH\": \"Schwiizertüütsch (Schwiiz)\",\r\n \"gsw-FR\": \"Elsässisch (Frànkrisch)\",\r\n \"gsw-LI\": \"Schwiizertüütsch (Liächteschtäi)\",\r\n \"gu\": \"ગુજરાતી\",\r\n \"gu-IN\": \"ગુજરાતી (ભારત)\",\r\n \"guz\": \"Ekegusii\",\r\n \"guz-KE\": \"Ekegusii (Kenya)\",\r\n \"gv\": \"Gaelg\",\r\n \"gv-IM\": \"Gaelg (Ellan Vannin)\",\r\n \"ha\": \"Hausa\",\r\n \"ha-Latn\": \"Hausa\",\r\n \"ha-Latn-GH\": \"Hausa (Gana)\",\r\n \"ha-Latn-NE\": \"Hausa (Nijar)\",\r\n \"ha-Latn-NG\": \"Hausa (Najeriya)\",\r\n \"haw\": \"ʻŌlelo Hawaiʻi\",\r\n \"haw-US\": \"ʻŌlelo Hawaiʻi (ʻAmelika Hui Pū ʻIa)\",\r\n \"he\": \"עברית\",\r\n \"he-IL\": \"עברית (ישראל)\",\r\n \"hi\": \"हिन्दी\",\r\n \"hi-IN\": \"हिन्दी (भारत)\",\r\n \"hr\": \"hrvatski\",\r\n \"hr-BA\": \"hrvatski (Bosna i Hercegovina)\",\r\n \"hr-HR\": \"hrvatski (Hrvatska)\",\r\n \"hsb\": \"hornjoserbšćina\",\r\n \"hsb-DE\": \"hornjoserbšćina (Němska)\",\r\n \"hu\": \"magyar\",\r\n \"hu-HU\": \"magyar (Magyarország)\",\r\n \"hy\": \"Հայերեն\",\r\n \"hy-AM\": \"Հայերեն (Հայաստան)\",\r\n \"ia\": \"interlingua\",\r\n \"ia-001\": \"interlingua (World)\",\r\n \"ia-FR\": \"interlingua (Francia)\",\r\n \"ibb\": \"Ibibio-Efik\",\r\n \"ibb-NG\": \"Ibibio-Efik (Nigeria)\",\r\n \"id\": \"Indonesia\",\r\n \"id-ID\": \"Indonesia (Indonesia)\",\r\n \"ig\": \"Igbo\",\r\n \"ig-NG\": \"Igbo (Naịjịrịa)\",\r\n \"ii\": \"ꆈꌠꁱꂷ\",\r\n \"ii-CN\": \"ꆈꌠꁱꂷ (ꍏꉸꏓꂱꇭꉼꇩ)\",\r\n \"is\": \"íslenska\",\r\n \"is-IS\": \"íslenska (Ísland)\",\r\n \"it\": \"italiano\",\r\n \"it-CH\": \"italiano (Svizzera)\",\r\n \"it-IT\": \"italiano (Italia)\",\r\n \"it-SM\": \"italiano (San Marino)\",\r\n \"it-VA\": \"italiano (Città del Vaticano)\",\r\n \"iu\": \"Inuktitut\",\r\n \"iu-Cans\": \"ᐃᓄᒃᑎᑐᑦ\",\r\n \"iu-Cans-CA\": \"ᐃᓄᒃᑎᑐᑦ (ᑲᓇᑕᒥ)\",\r\n \"iu-Latn\": \"Inuktitut\",\r\n \"iu-Latn-CA\": \"Inuktitut (Kanatami)\",\r\n \"ja\": \"日本語\",\r\n \"ja-JP\": \"日本語 (日本)\",\r\n \"jgo\": \"Ndaꞌa\",\r\n \"jgo-CM\": \"Ndaꞌa (Kamɛlûn)\",\r\n \"jmc\": \"Kimachame\",\r\n \"jmc-TZ\": \"Kimachame (Tanzania)\",\r\n \"jv\": \"Basa Jawa\",\r\n \"jv-Java\": \"ꦧꦱꦗꦮ\",\r\n \"jv-Java-ID\": \"ꦧꦱꦗꦮ (Indonesia)\",\r\n \"jv-Latn\": \"Basa Jawa\",\r\n \"jv-Latn-ID\": \"Basa Jawa (Indonesia)\",\r\n \"ka\": \"ქართული\",\r\n \"kab\": \"Taqbaylit\",\r\n \"kab-DZ\": \"Taqbaylit (Lezzayer)\",\r\n \"ka-GE\": \"ქართული (საქართველო)\",\r\n \"kam\": \"Kikamba\",\r\n \"kam-KE\": \"Kikamba (Kenya)\",\r\n \"kde\": \"Chimakonde\",\r\n \"kde-TZ\": \"Chimakonde (Tanzania)\",\r\n \"kea\": \"kabuverdianu\",\r\n \"kea-CV\": \"kabuverdianu (Kabu Verdi)\",\r\n \"khq\": \"Koyra ciini\",\r\n \"khq-ML\": \"Koyra ciini (Maali)\",\r\n \"ki\": \"Gikuyu\",\r\n \"ki-KE\": \"Gikuyu (Kenya)\",\r\n \"kk\": \"қазақ тілі\",\r\n \"kkj\": \"kakɔ\",\r\n \"kkj-CM\": \"kakɔ (Kamɛrun)\",\r\n \"kk-KZ\": \"қазақ тілі (Қазақстан)\",\r\n \"kl\": \"kalaallisut\",\r\n \"kl-GL\": \"kalaallisut (Kalaallit Nunaat)\",\r\n \"kln\": \"Kalenjin\",\r\n \"kln-KE\": \"Kalenjin (Emetab Kenya)\",\r\n \"km\": \"ភាសាខ្មែរ\",\r\n \"km-KH\": \"ភាសាខ្មែរ (កម្ពុជា)\",\r\n \"kn\": \"ಕನ್ನಡ\",\r\n \"kn-IN\": \"ಕನ್ನಡ (ಭಾರತ)\",\r\n \"ko\": \"한국어\",\r\n \"kok\": \"कोंकणी\",\r\n \"kok-IN\": \"कोंकणी (भारत)\",\r\n \"ko-KP\": \"한국어 (조선민주주의인민공화국)\",\r\n \"ko-KR\": \"한국어(대한민국)\",\r\n \"kr\": \"Kanuri\",\r\n \"kr-NG\": \"Kanuri (Nigeria)\",\r\n \"ks\": \"کٲشُر\",\r\n \"ks-Arab\": \"کٲشُر\",\r\n \"ks-Arab-IN\": \"کٲشُر (اَربی)\",\r\n \"ksb\": \"Kishambaa\",\r\n \"ksb-TZ\": \"Kishambaa (Tanzania)\",\r\n \"ks-Deva\": \"कॉशुर\",\r\n \"ks-Deva-IN\": \"कॉशुर\",\r\n \"ksf\": \"rikpa\",\r\n \"ksf-CM\": \"rikpa (kamɛrún)\",\r\n \"ksh\": \"Kölsch\",\r\n \"ksh-DE\": \"Kölsch (Doütschland)\",\r\n \"ku\": \"کوردیی ناوەڕاست\",\r\n \"ku-Arab\": \"کوردیی ناوەڕاست\",\r\n \"ku-Arab-IQ\": \"کوردیی ناوەڕاست (عێراق)\",\r\n \"ku-Arab-IR\": \"کوردی (ئێران)\",\r\n \"kw\": \"kernewek\",\r\n \"kw-GB\": \"kernewek (Rywvaneth Unys)\",\r\n \"ky\": \"Кыргыз\",\r\n \"ky-KG\": \"Кыргыз (Кыргызстан)\",\r\n \"la\": \"lingua latīna\",\r\n \"la-001\": \"lingua latīna (World)\",\r\n \"lag\": \"Kɨlaangi\",\r\n \"lag-TZ\": \"Kɨlaangi (Taansanía)\",\r\n \"lb\": \"Lëtzebuergesch\",\r\n \"lb-LU\": \"Lëtzebuergesch (Lëtzebuerg)\",\r\n \"lg\": \"Luganda\",\r\n \"lg-UG\": \"Luganda (Yuganda)\",\r\n \"lkt\": \"Lakȟólʼiyapi\",\r\n \"lkt-US\": \"Lakȟólʼiyapi (Mílahaŋska Tȟamákȟočhe)\",\r\n \"ln\": \"lingála\",\r\n \"ln-AO\": \"lingála (Angóla)\",\r\n \"ln-CD\": \"lingála (Republíki ya Kongó Demokratíki)\",\r\n \"ln-CF\": \"lingála (Repibiki ya Afríka ya Káti)\",\r\n \"ln-CG\": \"lingála (Kongo)\",\r\n \"lo\": \"ລາວ\",\r\n \"lo-LA\": \"ລາວ (ລາວ)\",\r\n \"lrc\": \"لۊری شومالی\",\r\n \"lrc-IQ\": \"لۊری شومالی (Iraq)\",\r\n \"lrc-IR\": \"لۊری شومالی (Iran)\",\r\n \"lt\": \"lietuvių\",\r\n \"lt-LT\": \"lietuvių (Lietuva)\",\r\n \"lu\": \"Tshiluba\",\r\n \"lu-CD\": \"Tshiluba (Ditunga wa Kongu)\",\r\n \"luo\": \"Dholuo\",\r\n \"luo-KE\": \"Dholuo (Kenya)\",\r\n \"luy\": \"Luluhia\",\r\n \"luy-KE\": \"Luluhia (Kenya)\",\r\n \"lv\": \"latviešu\",\r\n \"lv-LV\": \"latviešu (Latvija)\",\r\n \"mas\": \"Maa\",\r\n \"mas-KE\": \"Maa (Kenya)\",\r\n \"mas-TZ\": \"Maa (Tansania)\",\r\n \"mer\": \"Kĩmĩrũ\",\r\n \"mer-KE\": \"Kĩmĩrũ (Kenya)\",\r\n \"mfe\": \"kreol morisien\",\r\n \"mfe-MU\": \"kreol morisien (Moris)\",\r\n \"mg\": \"Malagasy\",\r\n \"mgh\": \"Makua\",\r\n \"mgh-MZ\": \"Makua (Umozambiki)\",\r\n \"mg-MG\": \"Malagasy (Madagasikara)\",\r\n \"mgo\": \"metaʼ\",\r\n \"mgo-CM\": \"metaʼ (Kamalun)\",\r\n \"mi\": \"te reo Māori\",\r\n \"mi-NZ\": \"te reo Māori (Aotearoa)\",\r\n \"mk\": \"македонски\",\r\n \"mk-MK\": \"македонски (Република Македонија)\",\r\n \"ml\": \"മലയാളം\",\r\n \"ml-IN\": \"മലയാളം (ഇന്ത്യ)\",\r\n \"mn\": \"монгол\",\r\n \"mn-Cyrl\": \"монгол\",\r\n \"mni\": \"মৈতৈলোন্\",\r\n \"mni-IN\": \"মৈতৈলোন্ (India)\",\r\n \"mn-MN\": \"монгол (Монгол)\",\r\n \"mn-Mong\": \"ᠮᠣᠩᠭᠣᠤᠯ ᠬᠡᠯᠡ\",\r\n \"mn-Mong-CN\": \"ᠮᠣᠩᠭᠣᠤᠯ ᠬᠡᠯᠡ (ᠪᠦᠭᠦᠳᠡ ᠨᠠᠢᠷᠠᠮᠳᠠᠬᠤ ᠳᠤᠮᠳᠠᠳᠤ ᠠᠷᠠᠳ ᠣᠯᠣᠰ)\",\r\n \"mn-Mong-MN\": \"ᠮᠣᠩᠭᠣᠯ ᠬᠡᠯᠡ (ᠮᠣᠩᠭᠣᠯ ᠣᠯᠣᠰ)\",\r\n \"moh\": \"Kanien’kéha\",\r\n \"moh-CA\": \"Kanien'kéha\",\r\n \"mr\": \"मराठी\",\r\n \"mr-IN\": \"मराठी (भारत)\",\r\n \"ms\": \"Melayu\",\r\n \"ms-BN\": \"Melayu (Brunei)\",\r\n \"ms-MY\": \"Melayu (Malaysia)\",\r\n \"ms-SG\": \"Melayu (Singapura)\",\r\n \"mt\": \"Malti\",\r\n \"mt-MT\": \"Malti (Malta)\",\r\n \"mua\": \"MUNDAŊ\",\r\n \"mua-CM\": \"MUNDAŊ (kameruŋ)\",\r\n \"my\": \"ဗမာ\",\r\n \"my-MM\": \"မြန်မာ (မြန်မာ)\",\r\n \"mzn\": \"مازرونی\",\r\n \"mzn-IR\": \"مازرونی (ایران)\",\r\n \"naq\": \"Khoekhoegowab\",\r\n \"naq-NA\": \"Khoekhoegowab (Namibiab)\",\r\n \"nb\": \"norsk bokmål\",\r\n \"nb-NO\": \"norsk bokmål (Norge)\",\r\n \"nb-SJ\": \"norsk bokmål (Svalbard og Jan Mayen)\",\r\n \"nd\": \"isiNdebele\",\r\n \"nds\": \"Neddersass’sch\",\r\n \"nds-DE\": \"Neddersass’sch (Düütschland)\",\r\n \"nds-NL\": \"Neddersass’sch (Nedderlannen)\",\r\n \"nd-ZW\": \"isiNdebele (Zimbabwe)\",\r\n \"ne\": \"नेपाली\",\r\n \"ne-IN\": \"नेपाली (भारत)\",\r\n \"ne-NP\": \"नेपाली (नेपाल)\",\r\n \"nl\": \"Nederlands\",\r\n \"nl-AW\": \"Nederlands (Aruba)\",\r\n \"nl-BE\": \"Nederlands (België)\",\r\n \"nl-BQ\": \"Nederlands (Bonaire, Sint Eustatius en Saba)\",\r\n \"nl-CW\": \"Nederlands (Curaçao)\",\r\n \"nl-NL\": \"Nederlands (Nederland)\",\r\n \"nl-SR\": \"Nederlands (Suriname)\",\r\n \"nl-SX\": \"Nederlands (Sint-Maarten)\",\r\n \"nmg\": \"Kwasio\",\r\n \"nmg-CM\": \"Kwasio (Kamerun)\",\r\n \"nn\": \"nynorsk\",\r\n \"nnh\": \"Shwóŋò ngiembɔɔn\",\r\n \"nnh-CM\": \"Shwóŋò ngiembɔɔn (Kàmalûm)\",\r\n \"nn-NO\": \"nynorsk (Noreg)\",\r\n \"no\": \"norsk\",\r\n \"nqo\": \"ߒߞߏ\",\r\n \"nqo-GN\": \"ߒߞߏ (ߖߌ߬ߣߍ߬ ߞߊ߲ߓߍ߲)\",\r\n \"nr\": \"isiNdebele\",\r\n \"nr-ZA\": \"isiNdebele (South Africa)\",\r\n \"nso\": \"Sesotho sa Leboa\",\r\n \"nso-ZA\": \"Sesotho sa Leboa (Afrika Borwa)\",\r\n \"nus\": \"Thok Nath\",\r\n \"nus-SS\": \"Thok Nath (South Sudan)\",\r\n \"nyn\": \"Runyankore\",\r\n \"nyn-UG\": \"Runyankore (Uganda)\",\r\n \"oc\": \"Occitan\",\r\n \"oc-FR\": \"Occitan (França)\",\r\n \"om\": \"Oromoo\",\r\n \"om-ET\": \"Oromoo (Itoophiyaa)\",\r\n \"om-KE\": \"Oromoo (Keeniyaa)\",\r\n \"or\": \"ଓଡ଼ିଆ\",\r\n \"or-IN\": \"ଓଡ଼ିଆ (ଭାରତ)\",\r\n \"os\": \"ирон\",\r\n \"os-GE\": \"ирон (Гуырдзыстон)\",\r\n \"os-RU\": \"ирон (Уӕрӕсе)\",\r\n \"pa\": \"ਪੰਜਾਬੀ\",\r\n \"pa-Arab\": \"پنجابی\",\r\n \"pa-Arab-PK\": \"پنجابی (پاکستان)\",\r\n \"pa-Guru\": \"ਪੰਜਾਬੀ\",\r\n \"pa-IN\": \"ਪੰਜਾਬੀ (ਭਾਰਤ)\",\r\n \"pap\": \"Papiamentu\",\r\n \"pap-029\": \"Papiamentu (Caribbean)\",\r\n \"pl\": \"polski\",\r\n \"pl-PL\": \"polski (Polska)\",\r\n \"prg\": \"prūsiskan\",\r\n \"prg-001\": \"prūsiskan (swītai)\",\r\n \"prs\": \"درى\",\r\n \"prs-AF\": \"درى (افغانستان)\",\r\n \"ps\": \"پښتو\",\r\n \"ps-AF\": \"پښتو (افغانستان)\",\r\n \"pt\": \"português\",\r\n \"pt-AO\": \"português (Angola)\",\r\n \"pt-BR\": \"português (Brasil)\",\r\n \"pt-CH\": \"português (Suíça)\",\r\n \"pt-CV\": \"português (Cabo Verde)\",\r\n \"pt-GQ\": \"português (Guiné Equatorial)\",\r\n \"pt-GW\": \"português (Guiné-Bissau)\",\r\n \"pt-LU\": \"português (Luxemburgo)\",\r\n \"pt-MO\": \"português (RAE de Macau)\",\r\n \"pt-MZ\": \"português (Moçambique)\",\r\n \"pt-PT\": \"português (Portugal)\",\r\n \"pt-ST\": \"português (São Tomé e Príncipe)\",\r\n \"pt-TL\": \"português (Timor-Leste)\",\r\n \"quc\": \"K'iche'\",\r\n \"quc-Latn\": \"K'iche'\",\r\n \"quc-Latn-GT\": \"K'iche' (Guatemala)\",\r\n \"quz\": \"Runasimi\",\r\n \"quz-BO\": \"Runasimi (Bolivia)\",\r\n \"quz-EC\": \"Runasimi (Ecuador)\",\r\n \"quz-PE\": \"Runasimi (Perú)\",\r\n \"rm\": \"rumantsch\",\r\n \"rm-CH\": \"rumantsch (Svizra)\",\r\n \"rn\": \"Ikirundi\",\r\n \"rn-BI\": \"Ikirundi (Uburundi)\",\r\n \"ro\": \"română\",\r\n \"rof\": \"Kihorombo\",\r\n \"rof-TZ\": \"Kihorombo (Tanzania)\",\r\n \"ro-MD\": \"română (Republica Moldova)\",\r\n \"ro-RO\": \"română (România)\",\r\n \"ru\": \"русский\",\r\n \"ru-BY\": \"русский (Беларусь)\",\r\n \"ru-KG\": \"русский (Киргизия)\",\r\n \"ru-KZ\": \"русский (Казахстан)\",\r\n \"ru-MD\": \"русский (Молдова)\",\r\n \"ru-RU\": \"русский (Россия)\",\r\n \"ru-UA\": \"русский (Украина)\",\r\n \"rw\": \"Kinyarwanda\",\r\n \"rwk\": \"Kiruwa\",\r\n \"rwk-TZ\": \"Kiruwa (Tanzania)\",\r\n \"rw-RW\": \"Kinyarwanda (U Rwanda)\",\r\n \"sa\": \"संस्कृत\",\r\n \"sah\": \"Саха\",\r\n \"sah-RU\": \"Саха (Россия)\",\r\n \"sa-IN\": \"संस्कृत (भारतम्)\",\r\n \"saq\": \"Kisampur\",\r\n \"saq-KE\": \"Kisampur (Kenya)\",\r\n \"sbp\": \"Ishisangu\",\r\n \"sbp-TZ\": \"Ishisangu (Tansaniya)\",\r\n \"sd\": \"سنڌي\",\r\n \"sd-Arab\": \"سنڌي\",\r\n \"sd-Arab-PK\": \"سنڌي (پاکستان)\",\r\n \"sd-Deva\": \"सिन्धी\",\r\n \"sd-Deva-IN\": \"सिन्धी (India)\",\r\n \"se\": \"davvisámegiella\",\r\n \"se-FI\": \"davvisámegiella (Suopma)\",\r\n \"seh\": \"sena\",\r\n \"seh-MZ\": \"sena (Moçambique)\",\r\n \"se-NO\": \"davvisámegiella (Norga)\",\r\n \"ses\": \"Koyraboro senni\",\r\n \"se-SE\": \"davvisámegiella (Ruoŧŧa)\",\r\n \"ses-ML\": \"Koyraboro senni (Maali)\",\r\n \"sg\": \"Sängö\",\r\n \"sg-CF\": \"Sängö (Ködörösêse tî Bêafrîka)\",\r\n \"shi\": \"ⵜⴰⵛⵍⵃⵉⵜ\",\r\n \"shi-Latn\": \"Tashelḥiyt\",\r\n \"shi-Latn-MA\": \"Tashelḥiyt (lmɣrib)\",\r\n \"shi-Tfng\": \"ⵜⴰⵛⵍⵃⵉⵜ\",\r\n \"shi-Tfng-MA\": \"ⵜⴰⵛⵍⵃⵉⵜ (ⵍⵎⵖⵔⵉⴱ)\",\r\n \"si\": \"සිංහල\",\r\n \"si-LK\": \"සිංහල (ශ්‍රී ලංකාව)\",\r\n \"sk\": \"slovenčina\",\r\n \"sk-SK\": \"slovenčina (Slovensko)\",\r\n \"sl\": \"slovenščina\",\r\n \"sl-SI\": \"slovenščina (Slovenija)\",\r\n \"sma\": \"åarjelsaemiengïele\",\r\n \"sma-NO\": \"åarjelsaemiengïele (Nöörje)\",\r\n \"sma-SE\": \"åarjelsaemiengïele (Sveerje)\",\r\n \"smj\": \"julevusámegiella\",\r\n \"smj-NO\": \"julevusámegiella (Vuodna)\",\r\n \"smj-SE\": \"julevusámegiella (Svierik)\",\r\n \"smn\": \"anarâškielâ\",\r\n \"smn-FI\": \"anarâškielâ (Suomâ)\",\r\n \"sms\": \"sää´mǩiõll\",\r\n \"sms-FI\": \"sää´mǩiõll (Lää´ddjânnam)\",\r\n \"sn\": \"chiShona\",\r\n \"sn-Latn\": \"chiShona (Latin)\",\r\n \"sn-Latn-ZW\": \"chiShona (Zimbabwe)\",\r\n \"so\": \"Soomaali\",\r\n \"so-DJ\": \"Soomaali (Jabuuti)\",\r\n \"so-ET\": \"Soomaali (Itoobiya)\",\r\n \"so-KE\": \"Soomaali (Kiiniya)\",\r\n \"so-SO\": \"Soomaali (Soomaaliya)\",\r\n \"sq\": \"shqip\",\r\n \"sq-AL\": \"shqip (Shqipëri)\",\r\n \"sq-MK\": \"shqip (Republika e Maqedonisë)\",\r\n \"sq-XK\": \"shqip (Kosovë)\",\r\n \"sr\": \"srpski\",\r\n \"sr-Cyrl\": \"српски\",\r\n \"sr-Cyrl-BA\": \"српски (Босна и Херцеговина)\",\r\n \"sr-Cyrl-ME\": \"српски (Црна Гора)\",\r\n \"sr-Cyrl-RS\": \"српски (Србија)\",\r\n \"sr-Cyrl-XK\": \"српски (Косово)\",\r\n \"sr-Latn\": \"srpski\",\r\n \"sr-Latn-BA\": \"srpski (Bosna i Hercegovina)\",\r\n \"sr-Latn-ME\": \"srpski (Crna Gora)\",\r\n \"sr-Latn-RS\": \"srpski (Srbija)\",\r\n \"sr-Latn-XK\": \"srpski (Kosovo)\",\r\n \"ss\": \"Siswati\",\r\n \"ss-SZ\": \"siSwati (Swaziland)\",\r\n \"ssy\": \"Saho\",\r\n \"ssy-ER\": \"Saho (Eretria)\",\r\n \"ss-ZA\": \"siSwati (South Africa)\",\r\n \"st\": \"Sesotho\",\r\n \"st-LS\": \"Sesotho (Lesotho)\",\r\n \"st-ZA\": \"Sesotho (South Africa)\",\r\n \"sv\": \"svenska\",\r\n \"sv-AX\": \"svenska (Åland)\",\r\n \"sv-FI\": \"svenska (Finland)\",\r\n \"sv-SE\": \"svenska (Sverige)\",\r\n \"sw\": \"Kiswahili\",\r\n \"sw-CD\": \"Kiswahili (Jamhuri ya Kidemokrasia ya Kongo)\",\r\n \"sw-KE\": \"Kiswahili (Kenya)\",\r\n \"sw-TZ\": \"Kiswahili (Tanzania)\",\r\n \"sw-UG\": \"Kiswahili (Uganda)\",\r\n \"syr\": \"ܣܘܪܝܝܐ\",\r\n \"syr-SY\": \"ܣܘܪܝܝܐ (ܣܘܪܝܐ)\",\r\n \"ta\": \"தமிழ்\",\r\n \"ta-IN\": \"தமிழ் (இந்தியா)\",\r\n \"ta-LK\": \"தமிழ் (இலங்கை)\",\r\n \"ta-MY\": \"தமிழ் (மலேசியா)\",\r\n \"ta-SG\": \"தமிழ் (சிங்கப்பூர்)\",\r\n \"te\": \"తెలుగు\",\r\n \"te-IN\": \"తెలుగు (భారత దేశం)\",\r\n \"teo\": \"Kiteso\",\r\n \"teo-KE\": \"Kiteso (Kenia)\",\r\n \"teo-UG\": \"Kiteso (Uganda)\",\r\n \"tg\": \"Тоҷикӣ\",\r\n \"tg-Cyrl\": \"тоҷикӣ\",\r\n \"tg-Cyrl-TJ\": \"тоҷикӣ (Тоҷикистон)\",\r\n \"th\": \"ไทย\",\r\n \"th-TH\": \"ไทย (ไทย)\",\r\n \"ti\": \"ትግርኛ\",\r\n \"ti-ER\": \"ትግርኛ (ኤርትራ)\",\r\n \"ti-ET\": \"ትግርኛ (ኢትዮጵያ)\",\r\n \"tig\": \"ትግረ\",\r\n \"tig-ER\": \"ትግረ (ኤርትራ)\",\r\n \"tk\": \"Türkmen dili\",\r\n \"tk-TM\": \"Türkmen dili (Türkmenistan)\",\r\n \"tn\": \"Setswana\",\r\n \"tn-BW\": \"Setswana (Botswana)\",\r\n \"tn-ZA\": \"Setswana (Aforika Borwa)\",\r\n \"to\": \"lea fakatonga\",\r\n \"to-TO\": \"lea fakatonga (Tonga)\",\r\n \"tr\": \"Türkçe\",\r\n \"tr-CY\": \"Türkçe (Kıbrıs)\",\r\n \"tr-TR\": \"Türkçe (Türkiye)\",\r\n \"ts\": \"Xitsonga\",\r\n \"ts-ZA\": \"Xitsonga (South Africa)\",\r\n \"tt\": \"Татар\",\r\n \"tt-RU\": \"Татар (Россия)\",\r\n \"twq\": \"Tasawaq senni\",\r\n \"twq-NE\": \"Tasawaq senni (Nižer)\",\r\n \"tzm\": \"Tamaziɣt n laṭlaṣ\",\r\n \"tzm-Arab\": \"أطلس المركزية التامازيتية\",\r\n \"tzm-Arab-MA\": \"أطلس المركزية التامازيتية (Morocco)\",\r\n \"tzm-Latn\": \"Tamaziɣt n laṭlaṣ\",\r\n \"tzm-Latn-DZ\": \"Tamaziɣt n laṭlaṣ (Djazaïr)\",\r\n \"tzm-Latn-MA\": \"Tamaziɣt n laṭlaṣ (Meṛṛuk)\",\r\n \"tzm-Tfng\": \"ⵜⴰⵎⴰⵣⵉⵖⵜ\",\r\n \"tzm-Tfng-MA\": \"ⵜⴰⵎⴰⵣⵉⵖⵜ (ⵍⵎⵖⵔⵉⴱ)\",\r\n \"ug\": \"ئۇيغۇرچە\",\r\n \"ug-CN\": \"ئۇيغۇرچە (جۇڭخۇا خەلق جۇمھۇرىيىتى)\",\r\n \"uk\": \"українська\",\r\n \"uk-UA\": \"українська (Україна)\",\r\n \"ur\": \"اُردو\",\r\n \"ur-IN\": \"اردو (بھارت)\",\r\n \"ur-PK\": \"اُردو (پاکستان)\",\r\n \"uz\": \"o‘zbek\",\r\n \"uz-Arab\": \"اوزبیک\",\r\n \"uz-Arab-AF\": \"اوزبیک (افغانستان)\",\r\n \"uz-Cyrl\": \"ўзбекча\",\r\n \"uz-Cyrl-UZ\": \"ўзбекча (Ўзбекистон)\",\r\n \"uz-Latn\": \"o‘zbek\",\r\n \"uz-Latn-UZ\": \"o‘zbek (Oʻzbekiston)\",\r\n \"vai\": \"ꕙꔤ\",\r\n \"vai-Latn\": \"Vai\",\r\n \"vai-Latn-LR\": \"Vai (Laibhiya)\",\r\n \"vai-Vaii\": \"ꕙꔤ\",\r\n \"vai-Vaii-LR\": \"ꕙꔤ (ꕞꔤꔫꕩ)\",\r\n \"ve\": \"Tshivenḓa\",\r\n \"ve-ZA\": \"Tshivenḓa (South Africa)\",\r\n \"vi\": \"Tiếng Việt\",\r\n \"vi-VN\": \"Tiếng Việt (Việt Nam)\",\r\n \"vo\": \"Volapük\",\r\n \"vo-001\": \"Volapük (World)\",\r\n \"vun\": \"Kyivunjo\",\r\n \"vun-TZ\": \"Kyivunjo (Tanzania)\",\r\n \"wae\": \"Walser\",\r\n \"wae-CH\": \"Walser (Schwiz)\",\r\n \"wal\": \"ወላይታቱ\",\r\n \"wal-ET\": \"ወላይታቱ (ኢትዮጵያ)\",\r\n \"wo\": \"Wolof\",\r\n \"wo-SN\": \"Wolof (Senegaal)\",\r\n \"xh\": \"isiXhosa\",\r\n \"xh-ZA\": \"isiXhosa (eMzantsi Afrika)\",\r\n \"xog\": \"Olusoga\",\r\n \"xog-UG\": \"Olusoga (Yuganda)\",\r\n \"yav\": \"nuasue\",\r\n \"yav-CM\": \"nuasue (Kemelún)\",\r\n \"yi\": \"ייִדיש\",\r\n \"yi-001\": \"ייִדיש (וועלט)\",\r\n \"yo\": \"Èdè Yorùbá\",\r\n \"yo-BJ\": \"Èdè Yorùbá (Orílɛ́ède Bɛ̀nɛ̀)\",\r\n \"yo-NG\": \"Èdè Yorùbá (Orílẹ́ède Nàìjíríà)\",\r\n \"zgh\": \"ⵜⴰⵎⴰⵣⵉⵖⵜ\",\r\n \"zgh-Tfng\": \"ⵜⴰⵎⴰⵣⵉⵖⵜ\",\r\n \"zgh-Tfng-MA\": \"ⵜⴰⵎⴰⵣⵉⵖⵜ (ⵍⵎⵖⵔⵉⴱ)\",\r\n \"zh\": \"中文\",\r\n \"zh-CHS\": \"中文(简体) 旧版\",\r\n \"zh-CHT\": \"中文(繁體) 舊版\",\r\n \"zh-CN\": \"中文(中国)\",\r\n \"zh-Hans\": \"中文(简体)\",\r\n \"zh-Hans-HK\": \"中文 (香港特别行政区)\",\r\n \"zh-Hans-MO\": \"中文 (澳门特别行政区)\",\r\n \"zh-Hant\": \"中文(繁體)\",\r\n \"zh-HK\": \"中文(香港特別行政區)\",\r\n \"zh-MO\": \"中文(澳門特別行政區)\",\r\n \"zh-SG\": \"中文(新加坡)\",\r\n \"zh-TW\": \"中文(台灣)\",\r\n \"zu\": \"isiZulu\",\r\n \"zu-ZA\": \"isiZulu (iNingizimu Afrika)\"\r\n}\r\n","import React, { useEffect, useState } from 'react'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport { useRetorik } from '../../Contexts/RetorikContext'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport translation from '../../../translations/menu.json'\r\nimport languageInMotherTongue from '../../../translations/languageCodeToMotherTongue.json'\r\nimport { getMainLocale } from '../../../utils/checkLocale'\r\nimport ParameterButton from './ParameterButton'\r\nimport { CurrentSubView } from '../../../models/enums'\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\n\r\nconst LanguageButton = (): JSX.Element => {\r\n const { locale, supported } = useLocaleStore()\r\n const { themeColors, isMobile } = useView()\r\n const { currentSubView, setCurrentSubView } = useRetorik()\r\n const [mainLocale, setMainLocale] = useState<string>(\r\n getMainLocale(locale).toUpperCase()\r\n )\r\n\r\n useEffect(() => {\r\n setMainLocale(getMainLocale(locale).toUpperCase())\r\n }, [locale])\r\n\r\n /**\r\n * On call :\r\n * - change RetorikContext's currentSubView state\r\n */\r\n const handleClick = (): void => {\r\n setCurrentSubView(\r\n currentSubView === CurrentSubView.languages\r\n ? CurrentSubView.none\r\n : CurrentSubView.languages\r\n )\r\n }\r\n\r\n return supported.length > 1 ? (\r\n isMobile ? (\r\n <ParameterButton\r\n title={translation[locale]?.lang || translation['fr-FR'].lang}\r\n icon='lang'\r\n color={\r\n currentSubView === CurrentSubView.languages\r\n ? themeColors.secondary\r\n : '#A4A7AF'\r\n }\r\n onClick={handleClick}\r\n />\r\n ) : (\r\n <button\r\n className='rf-absolute rf-bottom-16 rf-right-0 rf-px-3 rf-pl-2 rf-pr-8 rf-flex rf-flex-row rf-items-center rf-rounded-l-lg'\r\n style={{\r\n background: 'linear-gradient(#F8F8FC, #EDEEF3)'\r\n }}\r\n onClick={handleClick}\r\n >\r\n {/* Flag */}\r\n <div className='rf-h-8 rf-mr-2'>\r\n <img\r\n className='rf-h-full'\r\n src={`https://flagsapi.com/${mainLocale}/flat/64.png`}\r\n />\r\n </div>\r\n\r\n {/* Texts */}\r\n <div className='rf-flex rf-flex-col rf-items-start rf-text-xsm'>\r\n <div className='rf-text-trueblack'>\r\n {capitalizeFirstLetter(\r\n translation[locale]?.singleLang || translation['fr-FR'].singleLang\r\n )}\r\n </div>\r\n <div className='rf-text-lightgray'>\r\n {capitalizeFirstLetter(languageInMotherTongue[locale])}\r\n </div>\r\n </div>\r\n </button>\r\n )\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default LanguageButton\r\n","// Check if the locale in the current browser is in the array of available locales\r\nconst checkLocaleFromBrowser = (allLanguages: string[]): string | undefined => {\r\n const navLang = navigator?.language\r\n if (navLang && allLanguages && allLanguages.length > 0) {\r\n let res: string | undefined\r\n // Navigator language can be 2-chars\r\n if (navLang.length === 2) {\r\n res = allLanguages.find((language) => {\r\n return (\r\n language.substring(3, 5).toLowerCase() ===\r\n navigator.language.toLowerCase()\r\n )\r\n })\r\n } else {\r\n res = allLanguages.find((language) => {\r\n return language.toLowerCase() === navigator.language.toLowerCase()\r\n })\r\n }\r\n\r\n if (res) return res\r\n }\r\n\r\n return undefined\r\n}\r\n\r\nexport const checkLocale = (languageData, localeConfig): string => {\r\n if (localeConfig) {\r\n // Use localeConfig.default if available and supported\r\n if (\r\n localeConfig.default &&\r\n languageData.all.includes(localeConfig.default)\r\n ) {\r\n return localeConfig.default\r\n }\r\n\r\n // else, use browser locale if config say so\r\n if (localeConfig.getDefaultFromBrowser) {\r\n const browserLocale: string | undefined = checkLocaleFromBrowser(\r\n languageData.all\r\n )\r\n if (browserLocale) return browserLocale\r\n }\r\n }\r\n\r\n // else, use default from languageData\r\n return languageData.default\r\n}\r\n\r\nexport const getMainLocale = (locale: string): string => {\r\n const split = locale.split('-')\r\n return split.length > 0 ? split[1] : split[0]\r\n}\r\n","import React, { useCallback, useEffect, useState } from 'react'\r\nimport { hooks } from 'botframework-webchat'\r\nimport { useRetorik } from '../../Contexts/RetorikContext'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport { setFullScreenImage } from '../../Contexts/utilsStore'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport translation from '../../../translations/menu.json'\r\nimport animation from '../../../assets/lottie/recording.json'\r\nimport getMicrophonePermission from '../../../utils/getMicrophonePermission'\r\nimport { Player } from '@lottiefiles/react-lottie-player'\r\nimport Modal from '../../Common/Modal'\r\nimport * as Icons from '../../Icons/MenuIcons'\r\nimport { CurrentSubView } from '../../../models/enums'\r\n\r\nconst { useMicrophoneButtonClick, useSendBoxSpeechInterimsVisible } = hooks\r\n\r\ninterface MicrophoneButtonProps {\r\n openMicrophone?: boolean\r\n}\r\n\r\nconst MicrophoneButton = ({\r\n openMicrophone\r\n}: MicrophoneButtonProps): JSX.Element => {\r\n const { isMobile, themeColors } = useView()\r\n const { locale } = useLocaleStore()\r\n const { setCurrentSubView } = useRetorik()\r\n const microphoneClick = useMicrophoneButtonClick()\r\n const [interimsVisible] = useSendBoxSpeechInterimsVisible()\r\n const [allowed, setAllowed] = useState<boolean>(false)\r\n const [message, setMessage] = useState<string>('')\r\n const [playerRef, setPlayerRef] = useState<any>(null)\r\n\r\n const handleClick = useCallback((): void => {\r\n if (!allowed) {\r\n askPermission()\r\n } else {\r\n startListening()\r\n }\r\n }, [allowed, microphoneClick])\r\n\r\n useEffect(() => {\r\n openMicrophone && handleClick()\r\n }, [])\r\n\r\n /**\r\n * On interimsVisible change :\r\n * - if the interims are visible (waiting for user's speak input), play the lottie animation\r\n * - if the interims are not visible (user's speak ended), stop the lottie animation\r\n * - remove subviews if visible\r\n * - remove fullscreen image if there is one\r\n */\r\n useEffect(() => {\r\n if (interimsVisible) {\r\n playerRef && playerRef.lottie.play()\r\n } else {\r\n playerRef && playerRef.lottie.stop()\r\n }\r\n\r\n setCurrentSubView(CurrentSubView.none)\r\n setFullScreenImage(undefined)\r\n }, [interimsVisible, playerRef])\r\n\r\n useEffect(() => {\r\n if (allowed) {\r\n closeModal()\r\n startListening()\r\n }\r\n }, [allowed])\r\n\r\n const startListening = (): void => {\r\n microphoneClick()\r\n }\r\n\r\n const closeModal = (): void => {\r\n setMessage('')\r\n }\r\n\r\n const askPermission = (): Promise<void> => {\r\n setMessage(\r\n translation[locale]?.allowMicrophone ||\r\n 'Give your browser permission to use microphone to continue'\r\n )\r\n return getMicrophonePermission()\r\n .then((permission) => {\r\n setAllowed(permission)\r\n })\r\n .catch(console.log)\r\n }\r\n\r\n return (\r\n <React.Fragment>\r\n <button\r\n className={`rf-relative large:rf-w-full large:rf-h-auto rf-aspect-square rf-flex rf-justify-center rf-items-center rf-border ${\r\n interimsVisible\r\n ? isMobile\r\n ? 'rf-h-12 rf-border-[#00000029]'\r\n : 'rf-border-[#00000029]'\r\n : isMobile\r\n ? 'rf-h-8 rf-border-none'\r\n : 'rf-border-menuBorder'\r\n } rf-rounded-half rf-overflow-hidden`}\r\n onClick={handleClick}\r\n aria-label='microphone'\r\n style={{\r\n boxShadow: interimsVisible\r\n ? 'inset 0 0 6px 3px#00000029'\r\n : isMobile\r\n ? undefined\r\n : '0 0 20px 1px #A4A7AF80',\r\n WebkitMaskImage: interimsVisible\r\n ? '-webkit-radial-gradient(white, black)'\r\n : undefined\r\n }}\r\n >\r\n <div className='rf-absolute rf-h-full rf-w-full rf-flex rf-justify-end'>\r\n {interimsVisible && (\r\n <Player\r\n lottieRef={(instance): void => {\r\n setPlayerRef({ lottie: instance })\r\n }}\r\n loop\r\n src={animation}\r\n className='rf-w-full'\r\n />\r\n )}\r\n </div>\r\n {interimsVisible ? (\r\n <Icons.MicrophoneIconOn className='rf-h-3 rf-w-3 large:rf-h-4 large:rf-w-4' />\r\n ) : (\r\n <Icons.MicrophoneIcon\r\n className='rf-h-5 rf-w-5'\r\n color={themeColors.secondary}\r\n />\r\n )}\r\n </button>\r\n\r\n <Modal isOpened={!!message} onClose={closeModal}>\r\n {message}\r\n </Modal>\r\n </React.Fragment>\r\n )\r\n}\r\n\r\nexport default MicrophoneButton\r\n","{\r\n \"v\": \"5.7.4\",\r\n \"fr\": 29.9700012207031,\r\n \"ip\": 0,\r\n \"op\": 45.0000018328876,\r\n \"w\": 256,\r\n \"h\": 256,\r\n \"nm\": \"vibe\",\r\n \"ddd\": 0,\r\n \"assets\": [],\r\n \"layers\": [\r\n {\r\n \"ddd\": 0,\r\n \"ind\": 1,\r\n \"ty\": 4,\r\n \"nm\": \"Calque de forme 1\",\r\n \"sr\": 1,\r\n \"ks\": {\r\n \"o\": {\r\n \"a\": 0,\r\n \"k\": 100,\r\n \"ix\": 11\r\n },\r\n \"r\": {\r\n \"a\": 0,\r\n \"k\": 0,\r\n \"ix\": 10\r\n },\r\n \"p\": {\r\n \"a\": 0,\r\n \"k\": [128, 128, 0],\r\n \"ix\": 2,\r\n \"l\": 2\r\n },\r\n \"a\": {\r\n \"a\": 0,\r\n \"k\": [0, 0, 0],\r\n \"ix\": 1,\r\n \"l\": 2\r\n },\r\n \"s\": {\r\n \"a\": 0,\r\n \"k\": [100, 100, 100],\r\n \"ix\": 6,\r\n \"l\": 2\r\n }\r\n },\r\n \"ao\": 0,\r\n \"shapes\": [\r\n {\r\n \"ty\": \"gr\",\r\n \"it\": [\r\n {\r\n \"ind\": 0,\r\n \"ty\": \"sh\",\r\n \"ix\": 1,\r\n \"ks\": {\r\n \"a\": 1,\r\n \"k\": [\r\n {\r\n \"i\": {\r\n \"x\": 0.833,\r\n \"y\": 0.833\r\n },\r\n \"o\": {\r\n \"x\": 0.167,\r\n \"y\": 0.167\r\n },\r\n \"t\": 0,\r\n \"s\": [\r\n {\r\n \"i\": [\r\n [30.504, 0],\r\n [26.499, -0.285],\r\n [23.25, 0],\r\n [0, 0],\r\n [0, -1],\r\n [0, 0],\r\n [0, 0],\r\n [20.501, 0],\r\n [22.747, -0.37]\r\n ],\r\n \"o\": [\r\n [-29.75, 0],\r\n [-23.25, 0.25],\r\n [-22.103, 0],\r\n [0, 0],\r\n [0, 1],\r\n [0, 0],\r\n [0, 0],\r\n [-18.75, 0],\r\n [-30.75, 0.5]\r\n ],\r\n \"v\": [\r\n [3.25, -10.25],\r\n [-49.5, 103],\r\n [-92.5, 39],\r\n [-129, 128.25],\r\n [-129.5, 167.5],\r\n [128.75, 171.75],\r\n [129.75, 127.75],\r\n [100.25, 65.5],\r\n [54.75, 110]\r\n ],\r\n \"c\": true\r\n }\r\n ]\r\n },\r\n {\r\n \"i\": {\r\n \"x\": 0.833,\r\n \"y\": 0.833\r\n },\r\n \"o\": {\r\n \"x\": 0.167,\r\n \"y\": 0.167\r\n },\r\n \"t\": 8,\r\n \"s\": [\r\n {\r\n \"i\": [\r\n [30.504, 0],\r\n [26.499, -0.285],\r\n [23.25, 0],\r\n [0, 0],\r\n [0, -1],\r\n [0, 0],\r\n [0, 0],\r\n [20.501, 0],\r\n [22.747, -0.37]\r\n ],\r\n \"o\": [\r\n [-29.75, 0],\r\n [-23.25, 0.25],\r\n [-22.103, 0],\r\n [0, 0],\r\n [0, 1],\r\n [0, 0],\r\n [0, 0],\r\n [-18.75, 0],\r\n [-30.75, 0.5]\r\n ],\r\n \"v\": [\r\n [3.25, 31.25],\r\n [-49.5, 103],\r\n [-92.5, 81],\r\n [-129, 128.25],\r\n [-129.5, 167.5],\r\n [128.75, 171.75],\r\n [129.75, 127.75],\r\n [100.25, 18],\r\n [54.75, 110]\r\n ],\r\n \"c\": true\r\n }\r\n ]\r\n },\r\n {\r\n \"i\": {\r\n \"x\": 0.833,\r\n \"y\": 0.833\r\n },\r\n \"o\": {\r\n \"x\": 0.167,\r\n \"y\": 0.167\r\n },\r\n \"t\": 16,\r\n \"s\": [\r\n {\r\n \"i\": [\r\n [30.504, 0],\r\n [26.499, -0.285],\r\n [23.25, 0],\r\n [0, 0],\r\n [0, -1],\r\n [0, 0],\r\n [0, 0],\r\n [20.501, 0],\r\n [22.747, -0.37]\r\n ],\r\n \"o\": [\r\n [-29.75, 0],\r\n [-23.25, 0.25],\r\n [-22.103, 0],\r\n [0, 0],\r\n [0, 1],\r\n [0, 0],\r\n [0, 0],\r\n [-18.75, 0],\r\n [-30.75, 0.5]\r\n ],\r\n \"v\": [\r\n [3.247, 87.636],\r\n [-49.5, 62.5],\r\n [-92.5, 8.144],\r\n [-129, 128.25],\r\n [-129.5, 167.5],\r\n [128.75, 171.75],\r\n [129.75, 10.5],\r\n [100.25, 84.403],\r\n [54.75, 36.25]\r\n ],\r\n \"c\": true\r\n }\r\n ]\r\n },\r\n {\r\n \"i\": {\r\n \"x\": 0.833,\r\n \"y\": 0.833\r\n },\r\n \"o\": {\r\n \"x\": 0.167,\r\n \"y\": 0.167\r\n },\r\n \"t\": 23,\r\n \"s\": [\r\n {\r\n \"i\": [\r\n [30.504, 0],\r\n [26.499, -0.285],\r\n [23.25, 0],\r\n [0, 0],\r\n [0, -1],\r\n [0, 0],\r\n [0, 0],\r\n [20.501, 0],\r\n [22.747, -0.37]\r\n ],\r\n \"o\": [\r\n [-29.75, 0],\r\n [-23.25, 0.25],\r\n [-22.103, 0],\r\n [0, 0],\r\n [0, 1],\r\n [0, 0],\r\n [0, 0],\r\n [-18.75, 0],\r\n [-30.75, 0.5]\r\n ],\r\n \"v\": [\r\n [3.249, 51.758],\r\n [-49.5, 103],\r\n [-92.5, 48.989],\r\n [-129, -22],\r\n [-129.5, 167.5],\r\n [128.75, 171.75],\r\n [129.75, 19.75],\r\n [100.25, 93.847],\r\n [54.75, -2]\r\n ],\r\n \"c\": true\r\n }\r\n ]\r\n },\r\n {\r\n \"i\": {\r\n \"x\": 0.833,\r\n \"y\": 0.833\r\n },\r\n \"o\": {\r\n \"x\": 0.167,\r\n \"y\": 0.167\r\n },\r\n \"t\": 31,\r\n \"s\": [\r\n {\r\n \"i\": [\r\n [30.504, 0],\r\n [26.498, -0.285],\r\n [23.25, 0],\r\n [0, 0],\r\n [0, -1],\r\n [0, 0],\r\n [0, 0],\r\n [20.501, 0],\r\n [22.747, -0.37]\r\n ],\r\n \"o\": [\r\n [-29.75, 0],\r\n [-23.25, 0.25],\r\n [-22.103, 0],\r\n [0, 0],\r\n [0, 1],\r\n [0, 0],\r\n [0, 0],\r\n [-18.75, 0],\r\n [-30.75, 0.5]\r\n ],\r\n \"v\": [\r\n [3.249, -34.148],\r\n [-49.5, 39.75],\r\n [-92.5, 90.277],\r\n [-129, 128.25],\r\n [-129.5, 167.5],\r\n [128.75, 171.75],\r\n [129.75, 127.75],\r\n [100.25, 33.052],\r\n [54.75, 110]\r\n ],\r\n \"c\": true\r\n }\r\n ]\r\n },\r\n {\r\n \"i\": {\r\n \"x\": 0.833,\r\n \"y\": 0.833\r\n },\r\n \"o\": {\r\n \"x\": 0.167,\r\n \"y\": 0.167\r\n },\r\n \"t\": 38,\r\n \"s\": [\r\n {\r\n \"i\": [\r\n [30.504, 0],\r\n [26.499, -0.285],\r\n [23.25, 0],\r\n [0, 0],\r\n [0, -1],\r\n [0, 0],\r\n [0, 0],\r\n [20.501, 0],\r\n [22.747, -0.37]\r\n ],\r\n \"o\": [\r\n [-29.75, 0],\r\n [-23.25, 0.25],\r\n [-22.103, 0],\r\n [0, 0],\r\n [0, 1],\r\n [0, 0],\r\n [0, 0],\r\n [-18.75, 0],\r\n [-30.75, 0.5]\r\n ],\r\n \"v\": [\r\n [3.249, 23.747],\r\n [-49.5, -21.5],\r\n [-92.5, 115.754],\r\n [-129, 62.5],\r\n [-129.5, 167.5],\r\n [128.75, 171.75],\r\n [129.75, 127.75],\r\n [100.25, 90.836],\r\n [54.75, 110]\r\n ],\r\n \"c\": true\r\n }\r\n ]\r\n },\r\n {\r\n \"t\": 45.0000018328876,\r\n \"s\": [\r\n {\r\n \"i\": [\r\n [30.504, 0],\r\n [26.499, -0.285],\r\n [23.25, 0],\r\n [0, 0],\r\n [0, -1],\r\n [0, 0],\r\n [0, 0],\r\n [20.501, 0],\r\n [22.747, -0.37]\r\n ],\r\n \"o\": [\r\n [-29.75, 0],\r\n [-23.25, 0.25],\r\n [-22.103, 0],\r\n [0, 0],\r\n [0, 1],\r\n [0, 0],\r\n [0, 0],\r\n [-18.75, 0],\r\n [-30.75, 0.5]\r\n ],\r\n \"v\": [\r\n [3.25, -10.25],\r\n [-49.5, 103],\r\n [-92.5, 39],\r\n [-129, 128.25],\r\n [-129.5, 167.5],\r\n [128.75, 171.75],\r\n [129.75, 127.75],\r\n [100.25, 65.5],\r\n [54.75, 110]\r\n ],\r\n \"c\": true\r\n }\r\n ]\r\n }\r\n ],\r\n \"ix\": 2\r\n },\r\n \"nm\": \"Tracé 1\",\r\n \"mn\": \"ADBE Vector Shape - Group\",\r\n \"hd\": false\r\n },\r\n {\r\n \"ty\": \"st\",\r\n \"c\": {\r\n \"a\": 0,\r\n \"k\": [1, 1, 1, 1],\r\n \"ix\": 3\r\n },\r\n \"o\": {\r\n \"a\": 0,\r\n \"k\": 19,\r\n \"ix\": 4\r\n },\r\n \"w\": {\r\n \"a\": 0,\r\n \"k\": 0,\r\n \"ix\": 5\r\n },\r\n \"lc\": 1,\r\n \"lj\": 1,\r\n \"ml\": 4,\r\n \"bm\": 0,\r\n \"nm\": \"Contour 1\",\r\n \"mn\": \"ADBE Vector Graphic - Stroke\",\r\n \"hd\": false\r\n },\r\n {\r\n \"ty\": \"fl\",\r\n \"c\": {\r\n \"a\": 0,\r\n \"k\": [0, 0, 0, 1],\r\n \"ix\": 4\r\n },\r\n \"o\": {\r\n \"a\": 0,\r\n \"k\": 19,\r\n \"ix\": 5\r\n },\r\n \"r\": 1,\r\n \"bm\": 0,\r\n \"nm\": \"Fond 1\",\r\n \"mn\": \"ADBE Vector Graphic - Fill\",\r\n \"hd\": false\r\n },\r\n {\r\n \"ty\": \"tr\",\r\n \"p\": {\r\n \"a\": 0,\r\n \"k\": [0, 0],\r\n \"ix\": 2\r\n },\r\n \"a\": {\r\n \"a\": 0,\r\n \"k\": [0, 0],\r\n \"ix\": 1\r\n },\r\n \"s\": {\r\n \"a\": 0,\r\n \"k\": [100, 100],\r\n \"ix\": 3\r\n },\r\n \"r\": {\r\n \"a\": 0,\r\n \"k\": 0,\r\n \"ix\": 6\r\n },\r\n \"o\": {\r\n \"a\": 0,\r\n \"k\": 100,\r\n \"ix\": 7\r\n },\r\n \"sk\": {\r\n \"a\": 0,\r\n \"k\": 0,\r\n \"ix\": 4\r\n },\r\n \"sa\": {\r\n \"a\": 0,\r\n \"k\": 0,\r\n \"ix\": 5\r\n },\r\n \"nm\": \"Transformer \"\r\n }\r\n ],\r\n \"nm\": \"Forme 1\",\r\n \"np\": 3,\r\n \"cix\": 2,\r\n \"bm\": 0,\r\n \"ix\": 1,\r\n \"mn\": \"ADBE Vector Group\",\r\n \"hd\": false\r\n }\r\n ],\r\n \"ip\": 0,\r\n \"op\": 45.0000018328876,\r\n \"st\": 0,\r\n \"bm\": 0\r\n },\r\n {\r\n \"ddd\": 0,\r\n \"ind\": 2,\r\n \"ty\": 4,\r\n \"nm\": \"Calque de forme 2\",\r\n \"sr\": 1,\r\n \"ks\": {\r\n \"o\": {\r\n \"a\": 0,\r\n \"k\": 100,\r\n \"ix\": 11\r\n },\r\n \"r\": {\r\n \"a\": 0,\r\n \"k\": 0,\r\n \"ix\": 10\r\n },\r\n \"p\": {\r\n \"a\": 0,\r\n \"k\": [128, 128, 0],\r\n \"ix\": 2,\r\n \"l\": 2\r\n },\r\n \"a\": {\r\n \"a\": 0,\r\n \"k\": [0, 0, 0],\r\n \"ix\": 1,\r\n \"l\": 2\r\n },\r\n \"s\": {\r\n \"a\": 0,\r\n \"k\": [100, 100, 100],\r\n \"ix\": 6,\r\n \"l\": 2\r\n }\r\n },\r\n \"ao\": 0,\r\n \"shapes\": [\r\n {\r\n \"ty\": \"gr\",\r\n \"it\": [\r\n {\r\n \"ind\": 0,\r\n \"ty\": \"sh\",\r\n \"ix\": 1,\r\n \"ks\": {\r\n \"a\": 1,\r\n \"k\": [\r\n {\r\n \"i\": {\r\n \"x\": 0.833,\r\n \"y\": 0.833\r\n },\r\n \"o\": {\r\n \"x\": 0.167,\r\n \"y\": 0.167\r\n },\r\n \"t\": 0,\r\n \"s\": [\r\n {\r\n \"i\": [\r\n [30.504, 0],\r\n [26.499, -0.285],\r\n [23.25, 0],\r\n [0, 0],\r\n [0, -1],\r\n [0, 0],\r\n [0, 0],\r\n [20.501, 0],\r\n [22.747, -0.37]\r\n ],\r\n \"o\": [\r\n [-29.75, 0],\r\n [-23.25, 0.25],\r\n [-22.103, 0],\r\n [0, 0],\r\n [0, 1],\r\n [0, 0],\r\n [0, 0],\r\n [-18.75, 0],\r\n [-30.75, 0.5]\r\n ],\r\n \"v\": [\r\n [3.25, 104.5],\r\n [-49.5, 68.5],\r\n [-92.5, 108.5],\r\n [-129, 4.75],\r\n [-129.5, 167.5],\r\n [128.75, 171.75],\r\n [129.75, 53],\r\n [100.25, 110.5],\r\n [54.75, 38.25]\r\n ],\r\n \"c\": true\r\n }\r\n ]\r\n },\r\n {\r\n \"i\": {\r\n \"x\": 0.833,\r\n \"y\": 0.833\r\n },\r\n \"o\": {\r\n \"x\": 0.167,\r\n \"y\": 0.167\r\n },\r\n \"t\": 8,\r\n \"s\": [\r\n {\r\n \"i\": [\r\n [30.504, 0],\r\n [26.499, -0.285],\r\n [23.25, 0],\r\n [0, 0],\r\n [0, -1],\r\n [0, 0],\r\n [0, 0],\r\n [20.501, 0],\r\n [22.747, -0.37]\r\n ],\r\n \"o\": [\r\n [-29.75, 0],\r\n [-23.25, 0.25],\r\n [-22.103, 0],\r\n [0, 0],\r\n [0, 1],\r\n [0, 0],\r\n [0, 0],\r\n [-18.75, 0],\r\n [-30.75, 0.5]\r\n ],\r\n \"v\": [\r\n [3.25, 48.5],\r\n [-49.5, -11.5],\r\n [-92.5, 44],\r\n [-129, 116],\r\n [-129.5, 167.5],\r\n [128.75, 171.75],\r\n [129.75, 125.5],\r\n [100.25, 62.5],\r\n [54.749, 95.5]\r\n ],\r\n \"c\": true\r\n }\r\n ]\r\n },\r\n {\r\n \"i\": {\r\n \"x\": 0.833,\r\n \"y\": 0.833\r\n },\r\n \"o\": {\r\n \"x\": 0.167,\r\n \"y\": 0.167\r\n },\r\n \"t\": 16,\r\n \"s\": [\r\n {\r\n \"i\": [\r\n [30.504, 0],\r\n [26.499, -0.285],\r\n [23.25, 0],\r\n [0, 0],\r\n [0, -1],\r\n [0, 0],\r\n [0, 0],\r\n [20.501, 0],\r\n [22.747, -0.37]\r\n ],\r\n \"o\": [\r\n [-29.75, 0],\r\n [-23.25, 0.25],\r\n [-22.103, 0],\r\n [0, 0],\r\n [0, 1],\r\n [0, 0],\r\n [0, 0],\r\n [-18.75, 0],\r\n [-30.75, 0.5]\r\n ],\r\n \"v\": [\r\n [3.25, 27],\r\n [-49.502, 94.547],\r\n [-92.5, 55],\r\n [-129, -19.068],\r\n [-129.5, 167.5],\r\n [128.75, 171.75],\r\n [129.75, 125],\r\n [100.25, 110.5],\r\n [54.749, -63.236]\r\n ],\r\n \"c\": true\r\n }\r\n ]\r\n },\r\n {\r\n \"i\": {\r\n \"x\": 0.833,\r\n \"y\": 0.833\r\n },\r\n \"o\": {\r\n \"x\": 0.167,\r\n \"y\": 0.167\r\n },\r\n \"t\": 23,\r\n \"s\": [\r\n {\r\n \"i\": [\r\n [30.504, 0],\r\n [26.499, -0.285],\r\n [23.25, 0],\r\n [0, 0],\r\n [0, -1],\r\n [0, 0],\r\n [0, 0],\r\n [20.501, 0],\r\n [22.747, -0.37]\r\n ],\r\n \"o\": [\r\n [-29.75, 0],\r\n [-23.25, 0.25],\r\n [-22.103, 0],\r\n [0, 0],\r\n [0, 1],\r\n [0, 0],\r\n [0, 0],\r\n [-18.75, 0],\r\n [-30.75, 0.5]\r\n ],\r\n \"v\": [\r\n [3.25, 70],\r\n [-49.501, 1.079],\r\n [-92.5, 120.5],\r\n [-129, 57.802],\r\n [-129.5, 167.5],\r\n [128.75, 171.75],\r\n [129.75, -0.19],\r\n [100.25, 65.5],\r\n [54.749, 45.01]\r\n ],\r\n \"c\": true\r\n }\r\n ]\r\n },\r\n {\r\n \"i\": {\r\n \"x\": 0.833,\r\n \"y\": 0.833\r\n },\r\n \"o\": {\r\n \"x\": 0.167,\r\n \"y\": 0.167\r\n },\r\n \"t\": 31,\r\n \"s\": [\r\n {\r\n \"i\": [\r\n [30.504, 0],\r\n [26.499, -0.285],\r\n [23.25, 0],\r\n [0, 0],\r\n [0, -1],\r\n [0, 0],\r\n [0, 0],\r\n [20.501, 0],\r\n [22.747, -0.37]\r\n ],\r\n \"o\": [\r\n [-29.75, 0],\r\n [-23.25, 0.25],\r\n [-22.103, 0],\r\n [0, 0],\r\n [0, 1],\r\n [0, 0],\r\n [0, 0],\r\n [-18.75, 0],\r\n [-30.75, 0.5]\r\n ],\r\n \"v\": [\r\n [3.25, 22.75],\r\n [-49.501, 80.531],\r\n [-92.5, 33],\r\n [-129, 114.922],\r\n [-129.5, 167.5],\r\n [128.75, 171.75],\r\n [129.75, -17.129],\r\n [100.25, 106.25],\r\n [54.747, 69.109]\r\n ],\r\n \"c\": true\r\n }\r\n ]\r\n },\r\n {\r\n \"i\": {\r\n \"x\": 0.833,\r\n \"y\": 0.833\r\n },\r\n \"o\": {\r\n \"x\": 0.167,\r\n \"y\": 0.167\r\n },\r\n \"t\": 38,\r\n \"s\": [\r\n {\r\n \"i\": [\r\n [30.504, 0],\r\n [26.499, -0.285],\r\n [23.25, 0],\r\n [0, 0],\r\n [0, -1],\r\n [0, 0],\r\n [0, 0],\r\n [20.501, 0],\r\n [22.747, -0.37]\r\n ],\r\n \"o\": [\r\n [-29.75, 0],\r\n [-23.25, 0.25],\r\n [-22.103, 0],\r\n [0, 0],\r\n [0, 1],\r\n [0, 0],\r\n [0, 0],\r\n [-18.75, 0],\r\n [-30.75, 0.5]\r\n ],\r\n \"v\": [\r\n [3.25, 104.5],\r\n [-49.501, 68.115],\r\n [-92.5, 106.017],\r\n [-129, 129.414],\r\n [-129.5, 167.5],\r\n [128.75, 171.75],\r\n [129.75, 63.44],\r\n [100.25, -1.2],\r\n [54.748, 66.851]\r\n ],\r\n \"c\": true\r\n }\r\n ]\r\n },\r\n {\r\n \"t\": 45.0000018328876,\r\n \"s\": [\r\n {\r\n \"i\": [\r\n [30.504, 0],\r\n [26.499, -0.285],\r\n [23.25, 0],\r\n [0, 0],\r\n [0, -1],\r\n [0, 0],\r\n [0, 0],\r\n [20.501, 0],\r\n [22.747, -0.37]\r\n ],\r\n \"o\": [\r\n [-29.75, 0],\r\n [-23.25, 0.25],\r\n [-22.103, 0],\r\n [0, 0],\r\n [0, 1],\r\n [0, 0],\r\n [0, 0],\r\n [-18.75, 0],\r\n [-30.75, 0.5]\r\n ],\r\n \"v\": [\r\n [3.25, 104.5],\r\n [-49.5, 68.5],\r\n [-92.5, 108.5],\r\n [-129, 4.75],\r\n [-129.5, 167.5],\r\n [128.75, 171.75],\r\n [129.75, 53],\r\n [100.25, 110.5],\r\n [54.75, 38.25]\r\n ],\r\n \"c\": true\r\n }\r\n ]\r\n }\r\n ],\r\n \"ix\": 2\r\n },\r\n \"nm\": \"Tracé 1\",\r\n \"mn\": \"ADBE Vector Shape - Group\",\r\n \"hd\": false\r\n },\r\n {\r\n \"ty\": \"st\",\r\n \"c\": {\r\n \"a\": 0,\r\n \"k\": [1, 1, 1, 1],\r\n \"ix\": 3\r\n },\r\n \"o\": {\r\n \"a\": 0,\r\n \"k\": 19,\r\n \"ix\": 4\r\n },\r\n \"w\": {\r\n \"a\": 0,\r\n \"k\": 0,\r\n \"ix\": 5\r\n },\r\n \"lc\": 1,\r\n \"lj\": 1,\r\n \"ml\": 4,\r\n \"bm\": 0,\r\n \"nm\": \"Contour 1\",\r\n \"mn\": \"ADBE Vector Graphic - Stroke\",\r\n \"hd\": false\r\n },\r\n {\r\n \"ty\": \"fl\",\r\n \"c\": {\r\n \"a\": 0,\r\n \"k\": [0, 0, 0, 1],\r\n \"ix\": 4\r\n },\r\n \"o\": {\r\n \"a\": 0,\r\n \"k\": 19,\r\n \"ix\": 5\r\n },\r\n \"r\": 1,\r\n \"bm\": 0,\r\n \"nm\": \"Fond 1\",\r\n \"mn\": \"ADBE Vector Graphic - Fill\",\r\n \"hd\": false\r\n },\r\n {\r\n \"ty\": \"tr\",\r\n \"p\": {\r\n \"a\": 0,\r\n \"k\": [0, 0],\r\n \"ix\": 2\r\n },\r\n \"a\": {\r\n \"a\": 0,\r\n \"k\": [0, 0],\r\n \"ix\": 1\r\n },\r\n \"s\": {\r\n \"a\": 0,\r\n \"k\": [100, 100],\r\n \"ix\": 3\r\n },\r\n \"r\": {\r\n \"a\": 0,\r\n \"k\": 0,\r\n \"ix\": 6\r\n },\r\n \"o\": {\r\n \"a\": 0,\r\n \"k\": 100,\r\n \"ix\": 7\r\n },\r\n \"sk\": {\r\n \"a\": 0,\r\n \"k\": 0,\r\n \"ix\": 4\r\n },\r\n \"sa\": {\r\n \"a\": 0,\r\n \"k\": 0,\r\n \"ix\": 5\r\n },\r\n \"nm\": \"Transformer \"\r\n }\r\n ],\r\n \"nm\": \"Forme 1\",\r\n \"np\": 3,\r\n \"cix\": 2,\r\n \"bm\": 0,\r\n \"ix\": 1,\r\n \"mn\": \"ADBE Vector Group\",\r\n \"hd\": false\r\n }\r\n ],\r\n \"ip\": 0,\r\n \"op\": 45.0000018328876,\r\n \"st\": 0,\r\n \"bm\": 0\r\n }\r\n ],\r\n \"markers\": []\r\n}\r\n","const getMicrophonePermission = async (): Promise<boolean> => {\r\n try {\r\n return navigator.mediaDevices\r\n .getUserMedia({ audio: true })\r\n .then((stream) => {\r\n return !!stream\r\n })\r\n } catch (error) {\r\n console.log(error)\r\n return false\r\n }\r\n}\r\n\r\nexport default getMicrophonePermission\r\n","import React, { useEffect, useRef } from 'react'\r\nimport type { WithChildren } from '../../models/utils'\r\nimport CloseButton from './CloseButton'\r\n\r\ntype ModalProps = WithChildren<{\r\n isOpened: boolean\r\n onClose: () => void\r\n colorClasses?: string\r\n}>\r\n\r\nconst Modal = ({\r\n isOpened,\r\n onClose,\r\n colorClasses,\r\n children\r\n}: ModalProps): JSX.Element => {\r\n const modalRef = useRef<HTMLDialogElement>(null)\r\n\r\n useEffect(() => {\r\n if (isOpened) {\r\n modalRef.current && modalRef.current.showModal()\r\n } else {\r\n modalRef.current && modalRef.current.close()\r\n }\r\n }, [isOpened])\r\n\r\n return (\r\n <dialog\r\n onCancel={onClose}\r\n className={`rf-absolute backdrop:rf-bg-black/50 rf-left-0 rf-w-[45ch] rf-max-w-[70vw] rf-px-4 rf-rounded ${\r\n colorClasses ||\r\n 'rf-bg-truewhite rf-border rf-border-red-700 rf-text-red-700'\r\n } rf-font-semibold rf-text-center`}\r\n ref={modalRef}\r\n onClick={onClose}\r\n >\r\n <div\r\n className='rf-flex rf-flex-col rf-p-6'\r\n onClick={(event): void => event?.stopPropagation()}\r\n >\r\n {children}\r\n <CloseButton onClick={onClose} />\r\n </div>\r\n </dialog>\r\n )\r\n}\r\n\r\nexport default Modal\r\n","import React from 'react'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport translation from '../../translations/common.json'\r\nimport { CloseIcon } from '../Icons/Miscellaneous'\r\n\r\ninterface CloseButtonProps {\r\n onClick: (event?: React.MouseEvent) => void\r\n label?: string\r\n className?: string\r\n showLabel?: boolean\r\n}\r\n\r\nconst CloseButton = ({\r\n onClick,\r\n label,\r\n className,\r\n showLabel\r\n}: CloseButtonProps): JSX.Element => {\r\n const { locale } = useLocaleStore()\r\n\r\n return (\r\n <button\r\n aria-label={\r\n label || translation[locale]?.close || translation['fr-FR'].close\r\n }\r\n onClick={onClick}\r\n className={`${className} rf-absolute rf-flex rf-flex-col rf-items-center rf-right-0 rf-top-0 rf-p-2`}\r\n >\r\n <CloseIcon className='rf-h-6 rf-w-6' />\r\n {showLabel && (\r\n <div className='rf-text-[0.5rem] rf-uppercase'>\r\n {label || translation[locale]?.close || translation['fr-FR'].close}\r\n </div>\r\n )}\r\n </button>\r\n )\r\n}\r\n\r\nexport default CloseButton\r\n","{\r\n \"fr-FR\": {\r\n \"close\": \"Fermer\"\r\n },\r\n \"en-US\": {\r\n \"close\": \"Close\"\r\n },\r\n \"es-ES\": {\r\n \"close\": \"Close\"\r\n },\r\n \"de-DE\": {\r\n \"close\": \"Close\"\r\n }\r\n}\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React from 'react'\r\nimport { useSpeech } from '../../Contexts/SpeechContext'\r\nimport { useRetorik } from '../../Contexts/RetorikContext'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport translation from '../../../translations/menu.json'\r\nimport { HistoryButton, LanguageButton, TutorialButton } from '.'\r\nimport { Toggle } from '../../Utils'\r\nimport DisplaySubViews from '../ViewsDisplay/DisplaySubViews'\r\nimport { Mode } from '../../../models/enums'\r\n\r\ninterface ParametersProps {\r\n handleBack?: () => void\r\n}\r\n\r\nconst Parameters = ({ handleBack }: ParametersProps): JSX.Element => {\r\n const { locale } = useLocaleStore()\r\n const { mode, displaySubtitles, setDisplaySubtitles } = useRetorik()\r\n const { muted, setMuted } = useSpeech()\r\n const { isMobile } = useView()\r\n\r\n const handleSoundChange = (val: boolean) => {\r\n setMuted(!val)\r\n }\r\n\r\n return (\r\n <React.Fragment>\r\n {/* Sound */}\r\n <Toggle\r\n className='rf-py-3 large:rf-py-0'\r\n title={translation[locale]?.sound || translation['fr-FR'].sound}\r\n handleChange={handleSoundChange}\r\n defaultChecked={!muted}\r\n />\r\n\r\n {/* Separating line only in mobile / widget modes */}\r\n {isMobile && (\r\n <div className='rf-h-0 rf-w-full rf-border-t rf-border-t-menuBorder' />\r\n )}\r\n\r\n {/* Subtitle */}\r\n {mode !== Mode.text && (\r\n <Toggle\r\n className='rf-py-3 large:rf-py-0'\r\n title={translation[locale]?.subtitle || translation['fr-FR'].subtitle}\r\n handleChange={setDisplaySubtitles}\r\n defaultChecked={displaySubtitles}\r\n />\r\n )}\r\n\r\n {/* Languages / Tutorial / History */}\r\n {isMobile && (\r\n <React.Fragment>\r\n <LanguageButton />\r\n <TutorialButton handleBack={handleBack} />\r\n <HistoryButton handleBack={handleBack} />\r\n <DisplaySubViews handleClick={handleBack} />\r\n </React.Fragment>\r\n )}\r\n </React.Fragment>\r\n )\r\n}\r\n\r\nexport default Parameters\r\n","import React from 'react'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport translation from '../../../translations/menu.json'\r\nimport ParameterButton from './ParameterButton'\r\n// import { useSendMessage } from 'botframework-webchat-api/lib/hooks'\r\n\r\ninterface TutorialButtonProps {\r\n handleBack?: () => void\r\n}\r\n\r\nconst TutorialButton = ({ handleBack }: TutorialButtonProps): JSX.Element => {\r\n // const sendMessage = useSendMessage()\r\n const { locale } = useLocaleStore()\r\n\r\n const handleClick = (): void => {\r\n handleBack && handleBack()\r\n console.log('Launch tutorial')\r\n // sendMessage('conseil', 'speech')\r\n }\r\n\r\n return (\r\n <ParameterButton\r\n title={translation[locale]?.tutorial || translation['fr-FR'].tutorial}\r\n icon='tutorial'\r\n onClick={handleClick}\r\n />\r\n )\r\n}\r\n\r\nexport default TutorialButton\r\n","import React from 'react'\r\nimport translation from '../../../translations/template.json'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\n\r\ntype TitleProps = {\r\n className?: string\r\n title: string\r\n numberOfResults?: number\r\n}\r\n\r\nconst Title = ({\r\n className,\r\n title,\r\n numberOfResults\r\n}: TitleProps): JSX.Element => {\r\n const { locale } = useLocaleStore((state) => ({\r\n locale: state.locale\r\n }))\r\n\r\n return (\r\n <div\r\n className={`rf-mb-4 rf-flex rf-flex-col rf-items-start rf-justify-center large:rf-flex-row large:rf-items-baseline large:rf-justify-start ${className}`}\r\n >\r\n <div className='rf-text-3xl large:rf-text-5xl rf-font-bold'>{title}</div>\r\n {numberOfResults !== undefined && (\r\n <div className='rf-text-gray large:rf-ml-4'>\r\n {numberOfResults}{' '}\r\n {numberOfResults > 1\r\n ? translation[locale]?.results || 'results'\r\n : translation[locale]?.result || 'result'}\r\n </div>\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default Title\r\n","{\r\n \"fr-FR\": {\r\n \"result\": \"résultat\",\r\n \"results\": \"résultats\",\r\n \"all\": \"tous\",\r\n \"filter\": \"Filtrer\",\r\n \"reset\": \"effacer tout\",\r\n \"showresults\": \"Afficher les résultats\",\r\n \"suggestiontitle\": \"Suggestions de recherches\",\r\n \"reminder\": \"N'oubliez pas,\\n je peux répondre à vos questions.\"\r\n },\r\n \"en-US\": {\r\n \"result\": \"result\",\r\n \"results\": \"results\",\r\n \"all\": \"all\",\r\n \"filter\": \"Filter\",\r\n \"reset\": \"reset filters\",\r\n \"showresults\": \"Show results\",\r\n \"suggestiontitle\": \"Research suggestions\",\r\n \"reminder\": \"Don't forget,\\n I can answer your questions.\"\r\n },\r\n \"es-ES\": {\r\n \"result\": \"result\",\r\n \"results\": \"results\",\r\n \"all\": \"all\",\r\n \"filter\": \"Filter\",\r\n \"reset\": \"reset filters\",\r\n \"showresults\": \"Show results\",\r\n \"suggestiontitle\": \"Research suggestions\",\r\n \"reminder\": \"Don't forget,\\n I can answer your questions.\"\r\n },\r\n \"de-DE\": {\r\n \"result\": \"result\",\r\n \"results\": \"results\",\r\n \"all\": \"all\",\r\n \"filter\": \"Filter\",\r\n \"reset\": \"reset filters\",\r\n \"showresults\": \"Show results\",\r\n \"suggestiontitle\": \"Research suggestions\",\r\n \"reminder\": \"Don't forget,\\n I can answer your questions.\"\r\n }\r\n}","import React from 'react'\r\nimport { useList } from '../../Contexts/ListContext'\r\nimport ChosenItem from './Filter/ChosenItem'\r\nimport FilterItem from './Filter/FilterItem'\r\n\r\ntype FilterLargeProps = {\r\n className?: string\r\n openedFilterKey?: number\r\n setOpenedFilterKey: (key: number | undefined) => void\r\n}\r\n\r\nconst FilterLarge = ({\r\n className,\r\n openedFilterKey,\r\n setOpenedFilterKey\r\n}: FilterLargeProps): JSX.Element => {\r\n const { filters, selectedFilters } = useList()\r\n\r\n const closeOpenedFilters = (key: number | undefined): void => {\r\n setOpenedFilterKey(key)\r\n }\r\n\r\n return (\r\n <div className={`rf-flex rf-flex-col rf-justify-start ${className}`}>\r\n <div className='rf-relative rf-flex rf-flex-row rf-flex-wrap'>\r\n {filters.map((filter, key) => {\r\n return (\r\n <FilterItem\r\n key={key}\r\n identifier={key + 1}\r\n opened={(openedFilterKey && key + 1 === openedFilterKey) === true}\r\n filter={filter}\r\n closeOpenedFilters={closeOpenedFilters}\r\n />\r\n )\r\n })}\r\n </div>\r\n <div className='rf-flex rf-flex-row rf-my-2 rf-flex-wrap'>\r\n {selectedFilters?.map((chosenFilter, key1) => {\r\n return chosenFilter.items.map((name, key2) => {\r\n return (\r\n <ChosenItem\r\n className='rf-px-4 rf-mr-2 rf-mb-1'\r\n key={`${key1}-${key2}`}\r\n name={name}\r\n parent={{ id: chosenFilter.id, title: chosenFilter.title }}\r\n />\r\n )\r\n })\r\n })}\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default FilterLarge\r\n","import React from 'react'\r\nimport { useList } from '../../../Contexts/ListContext'\r\nimport { useLocaleStore } from '../../../Contexts/localeStore'\r\nimport { capitalizeFirstLetter } from '../../../../utils/capitalizeFirstLetter'\r\nimport { CloseIcon } from '../../../Icons/Miscellaneous'\r\n\r\ntype ChosenItemProps = {\r\n className?: string\r\n name: string\r\n parent: {\r\n id: string\r\n title: string\r\n }\r\n}\r\n\r\nconst ChosenItem = ({\r\n className,\r\n name,\r\n parent\r\n}: ChosenItemProps): JSX.Element => {\r\n const { processFiltersOnChange } = useList()\r\n const { locale } = useLocaleStore((state) => ({\r\n locale: state.locale\r\n }))\r\n\r\n return (\r\n <div\r\n className={`rf-py-1 rf-text-size-auto rf-text-white rf-bg-gray hover:rf-cursor-pointer rf-rounded-lg rf-flex rf-flex-row rf-items-center rf-justify-center ${className}`}\r\n onClick={(): void =>\r\n processFiltersOnChange([\r\n {\r\n ...parent,\r\n items: [name]\r\n }\r\n ])\r\n }\r\n >\r\n <div className='rf-mr-2 large:rf-mr-3'>\r\n {parent.id === 'Event.DateRange'\r\n ? `${name.substring(8, 10)}/${name.substring(5, 7)}/${name.substring(\r\n 0,\r\n 4\r\n )}`\r\n : capitalizeFirstLetter(name, locale)}\r\n </div>\r\n <CloseIcon className='rf-h-3 rf-w-3' />\r\n </div>\r\n )\r\n}\r\n\r\nexport default ChosenItem\r\n","import React, { useEffect, useState } from 'react'\r\nimport { useLocaleStore } from '../../../Contexts/localeStore'\r\nimport { useView } from '../../../Contexts/ViewContext'\r\nimport type { Filter } from '../../../../models/filterTypes'\r\nimport { ArrowUpIcon, ArrowDownIcon } from '../../../Icons/ArrowIcons'\r\nimport { capitalizeFirstLetter } from '../../../../utils/capitalizeFirstLetter'\r\nimport SubFilter from './SubFilter'\r\nimport SubFilterAll from './SubFilterAll'\r\nimport SubFilterCalendar from './SubFilterCalendar'\r\n\r\ntype FilterItemProps = {\r\n identifier: number\r\n className?: string\r\n opened?: boolean\r\n filter: Filter\r\n closeOpenedFilters: (key: number | undefined) => void\r\n}\r\n\r\nconst FilterItem = ({\r\n className,\r\n identifier,\r\n opened,\r\n filter,\r\n closeOpenedFilters\r\n}: FilterItemProps): JSX.Element => {\r\n const { locale } = useLocaleStore((state) => ({\r\n locale: state.locale\r\n }))\r\n const { isMobile } = useView()\r\n const [style, setStyle] = useState<string>('')\r\n\r\n useEffect(() => {\r\n opened\r\n ? setStyle('rf-bg-truewhite rf-text-black rf-border-black')\r\n : setStyle('rf-bg-templateBackground rf-text-gray rf-border-gray')\r\n }, [opened])\r\n\r\n const handleOpen = (e: React.MouseEvent): void => {\r\n e.preventDefault()\r\n e.stopPropagation()\r\n closeOpenedFilters(opened ? undefined : identifier)\r\n }\r\n\r\n return (\r\n <div className='rf-relative rf-mt-1'>\r\n <div\r\n className={`rf-px-4 rf-py-3 rf-mr-4 large-vertical:rf-py-4 ${style} rf-border rf-rounded-lg hover:rf-cursor-pointer rf-flex rf-flex-row rf-items-center rf-justify-center ${className}`}\r\n onClick={(e): void => handleOpen(e)}\r\n >\r\n <div className='rf-mr-3'>\r\n {capitalizeFirstLetter(filter.title, locale)}\r\n </div>\r\n {opened ? <ArrowUpIcon /> : <ArrowDownIcon />}\r\n </div>\r\n {opened && (\r\n <div\r\n className='rf-absolute rf-left-0 rf-top-110 rf-z-util rf-w-max rf-py-1 rf-px-4 rf-text-black rf-border rf-rounded-lg rf-border-black rf-bg-truewhite rf-flex rf-flex-col rf-items-center rf-justify-center'\r\n style={{\r\n transform:\r\n filter.id === 'Event.DateRange' && !isMobile\r\n ? 'translate(-20%, -20%) scale(0.6, 0.6)'\r\n : ''\r\n }}\r\n >\r\n {filter.id === 'Event.DateRange' ? (\r\n <SubFilterCalendar\r\n parent={{ id: filter.id, title: filter.title }}\r\n />\r\n ) : (\r\n <React.Fragment>\r\n <SubFilterAll fullParent={filter} />\r\n {filter.items.map((item, key) => {\r\n return (\r\n <SubFilter\r\n key={key}\r\n name={item}\r\n parent={{ id: filter.id, title: filter.title }}\r\n />\r\n )\r\n })}\r\n </React.Fragment>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default FilterItem\r\n","import React from 'react'\r\nimport { useList } from '../../../Contexts/ListContext'\r\nimport { useLocaleStore } from '../../../Contexts/localeStore'\r\nimport { capitalizeFirstLetter } from '../../../../utils/capitalizeFirstLetter'\r\nimport CheckBox from '../../../Utils/CheckBox'\r\n\r\ntype SubFilterProps = {\r\n className?: string\r\n name: string\r\n parent: {\r\n id: string\r\n title: string\r\n }\r\n}\r\n\r\nconst SubFilter = ({\r\n className,\r\n name,\r\n parent\r\n}: SubFilterProps): JSX.Element => {\r\n const { selectedFilters, processFiltersOnChange } = useList()\r\n const { locale } = useLocaleStore((state) => ({\r\n locale: state.locale\r\n }))\r\n\r\n return (\r\n <div\r\n className={`rf-w-full rf-pt-4 large:rf-py-1 rf-flex rf-justify-between rf-items-center ${className}`}\r\n >\r\n {capitalizeFirstLetter(name, locale)}\r\n <CheckBox\r\n className='rf-rounded large:rf-ml-8'\r\n iconClassName='rf-w-4 rf-h-4 large:rf-p-min1 large:rf-w-6 large:rf-h-6'\r\n checked={\r\n selectedFilters.filter(\r\n (filter) =>\r\n filter.title === parent.title && filter.items.includes(name)\r\n ).length === 1\r\n }\r\n onClick={(): void =>\r\n processFiltersOnChange([\r\n {\r\n ...parent,\r\n items: [name]\r\n }\r\n ])\r\n }\r\n />\r\n </div>\r\n )\r\n}\r\n\r\nexport default SubFilter\r\n","import React, { useEffect, useState } from 'react'\r\nimport { FeatherCheckIcon } from '../Icons/Miscellaneous'\r\n\r\ntype CheckBoxProps = {\r\n className?: string\r\n iconClassName?: string\r\n checked?: boolean\r\n onClick?: () => void\r\n}\r\n\r\nconst CheckBox = ({\r\n className,\r\n iconClassName,\r\n checked,\r\n onClick\r\n}: CheckBoxProps): JSX.Element => {\r\n const [bgColor, setBgColor] = useState<string>(\r\n checked ? 'rf-bg-secondary' : 'rf-bg-truewhite'\r\n )\r\n\r\n useEffect(() => {\r\n setBgColor(checked ? 'rf-bg-secondary' : 'rf-bg-truewhite')\r\n }, [checked])\r\n\r\n const handleClick = (e: React.MouseEvent): void => {\r\n e.preventDefault()\r\n e.stopPropagation()\r\n onClick && onClick()\r\n }\r\n\r\n return (\r\n <div\r\n className={`rf-w-6 rf-h-6 rf-min-w-6 rf-min-h-6 rf-flex rf-justify-center rf-items-center rf-border rf-border-templateCheckboxBorder hover:rf-cursor-pointer ${bgColor} ${className}`}\r\n onClick={(e): void => handleClick(e)}\r\n >\r\n <FeatherCheckIcon className={iconClassName} />\r\n </div>\r\n )\r\n}\r\n\r\nexport default CheckBox\r\n","import React from 'react'\r\nimport { useList } from '../../../Contexts/ListContext'\r\nimport type { Filter } from '../../../../models/filterTypes'\r\nimport translation from '../../../../translations/template.json'\r\nimport { useLocaleStore } from '../../../Contexts/localeStore'\r\nimport { capitalizeFirstLetter } from '../../../../utils/capitalizeFirstLetter'\r\nimport CheckBox from '../../../Utils/CheckBox'\r\n\r\ntype SubFilterProps = {\r\n className?: string\r\n fullParent: Filter\r\n}\r\n\r\nconst SubFilterAll = ({\r\n className,\r\n fullParent\r\n}: SubFilterProps): JSX.Element => {\r\n const { selectedFilters, processFiltersOnChange } = useList()\r\n const { locale } = useLocaleStore()\r\n\r\n return (\r\n <div\r\n className={`rf-w-full rf-py-4 large:rf-py-1 rf-flex rf-justify-between rf-items-center ${className}`}\r\n >\r\n {capitalizeFirstLetter(\r\n translation[locale]?.all || translation['fr-FR'].all,\r\n locale\r\n )}\r\n <CheckBox\r\n className='rf-rounded large:rf-ml-8'\r\n iconClassName='rf-w-4 rf-h-4 large:rf-p-min1 large:rf-w-6 large:rf-h-6'\r\n checked={\r\n selectedFilters.filter(\r\n (filter) =>\r\n filter.title === fullParent.title &&\r\n filter.items.length === fullParent.items.length\r\n ).length === 1\r\n }\r\n onClick={(): void => processFiltersOnChange([{ ...fullParent }], true)}\r\n />\r\n </div>\r\n )\r\n}\r\n\r\nexport default SubFilterAll\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React from 'react'\r\nimport { useList } from '../../../Contexts/ListContext'\r\nimport InputCalendar from '../../../CustomAdaptiveCard/InputCalendar'\r\n\r\ntype SubFilterCalendarProps = {\r\n parent: {\r\n id: string\r\n title: string\r\n }\r\n}\r\n\r\nconst SubFilterCalendar = ({ parent }: SubFilterCalendarProps): JSX.Element => {\r\n const { selectedFilters, processFiltersOnChange } = useList()\r\n\r\n const handleCalendarChange = (newDate: string): void => {\r\n processFiltersOnChange([\r\n {\r\n ...parent,\r\n items: [newDate]\r\n }\r\n ])\r\n }\r\n\r\n return (\r\n <div className='rf-w-full rf-pt-4 large:rf-py-1 rf-flex rf-justify-between rf-items-center'>\r\n <InputCalendar\r\n id='filterCalendar'\r\n handleChange={handleCalendarChange}\r\n defaultValue={selectedFilters\r\n .find(\r\n (filter) =>\r\n filter.id === 'Event.DateRange' && filter.items.length > 0\r\n )\r\n ?.items[0].substring(0, 11)}\r\n isFilter={true}\r\n />\r\n </div>\r\n )\r\n}\r\n\r\nexport default SubFilterCalendar\r\n","import React, { useEffect, useState } from 'react'\r\nimport { useList } from '../../Contexts/ListContext'\r\nimport type { Filter } from '../../../models/filterTypes'\r\nimport { FeatherFilterIcon } from '../../Icons/Miscellaneous'\r\nimport translation from '../../../translations/template.json'\r\nimport menuTranslation from '../../../translations/menu.json'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport MobileFilterPage from './Filter/MobileFilterPage'\r\nimport MobileSubFilterPage from './Filter/MobileSubFilterPage'\r\nimport MobileDisplayResult from './Filter/MobileDisplayResults'\r\nimport { BackButton } from '../../Menu/Common'\r\n\r\ntype FilterMobileProps = {\r\n className?: string\r\n setFiltersOpened: (opened: boolean) => void\r\n handleClose: () => void\r\n}\r\n\r\nconst FilterMobile = ({\r\n className,\r\n setFiltersOpened,\r\n handleClose\r\n}: FilterMobileProps): JSX.Element => {\r\n const { resetFilters } = useList()\r\n const { locale } = useLocaleStore()\r\n const [open, setOpen] = useState<boolean>(false)\r\n const [currentOpened, setCurrentOpened] = useState<Filter | undefined>(\r\n undefined\r\n )\r\n\r\n useEffect(() => {\r\n setFiltersOpened(open)\r\n }, [open])\r\n\r\n const handleClick = (): void => {\r\n setOpen(true)\r\n }\r\n\r\n const handleReturn = (): void => {\r\n setOpen(false)\r\n }\r\n\r\n const handleReset = (): void => {\r\n setOpen(false)\r\n resetFilters && resetFilters()\r\n }\r\n\r\n const closeCurrentSubFilters = (): void => {\r\n setCurrentOpened(undefined)\r\n }\r\n\r\n const handleDisplayResults = (): void => {\r\n setCurrentOpened(undefined)\r\n setOpen(false)\r\n }\r\n\r\n return !open ? (\r\n <div\r\n className={`large:rf-hidden rf-w-full rf-py-4 rf-px-4 rf-flex rf-flex-row rf-justify-between rf-items-center rf-bg-truewhite rf-shadow-[0_0_15px_0_silver] ${className}`}\r\n >\r\n <BackButton\r\n title={\r\n menuTranslation[locale]?.backconversation ||\r\n menuTranslation['fr-FR'].backconversation\r\n }\r\n handleBack={handleClose}\r\n className='rf-relative rf-text-size-auto'\r\n />\r\n <button\r\n className='rf-px-4 rf-py-1 rf-flex rf-flex-row rf-items-center rf-border rf-rounded-lg rf-border-black'\r\n onClick={handleClick}\r\n >\r\n <FeatherFilterIcon className='rf-h-4 rf-w-4' />\r\n <div className='rf-ml-2'>\r\n {translation[locale]?.filter || translation['fr-FR'].filter}\r\n </div>\r\n </button>\r\n </div>\r\n ) : (\r\n <div className='rf-absolute rf-z-util large:rf-hidden rf-top-0 rf-left-0 rf-w-full rf-min-h-full rf-overflow-y-scroll rf-scrollbar-hidden rf-bg-truewhite rf-flex rf-flex-col rf-justify-between'>\r\n <div className='rf-flex rf-flex-col rf-justify-start rf-align-center'>\r\n {currentOpened ? (\r\n <MobileSubFilterPage\r\n filter={currentOpened}\r\n close={closeCurrentSubFilters}\r\n resetFilters={handleReset}\r\n />\r\n ) : (\r\n <MobileFilterPage\r\n setCurrentOpened={setCurrentOpened}\r\n close={handleReturn}\r\n resetFilters={handleReset}\r\n />\r\n )}\r\n </div>\r\n {/* Button to display results */}\r\n <MobileDisplayResult onClick={handleDisplayResults} />\r\n </div>\r\n )\r\n}\r\n\r\nexport default FilterMobile\r\n","import React from 'react'\r\nimport { useList } from '../../../Contexts/ListContext'\r\nimport type { Filter } from '../../../../models/filterTypes'\r\nimport translation from '../../../../translations/template.json'\r\nimport { useLocaleStore } from '../../../Contexts/localeStore'\r\nimport { capitalizeFirstLetter } from '../../../../utils/capitalizeFirstLetter'\r\nimport { ChevronRightIcon } from '../../../Icons/ChevronIcons'\r\nimport MobileUpperBand from './MobileUpperBand'\r\n\r\ntype MobileFilterProps = {\r\n close: () => void\r\n resetFilters: () => void\r\n setCurrentOpened: (filter: Filter) => void\r\n}\r\n\r\nconst MobileFilterPage = ({\r\n close,\r\n resetFilters,\r\n setCurrentOpened\r\n}: MobileFilterProps): JSX.Element => {\r\n const { filters, processFiltersOnChange } = useList()\r\n const { locale } = useLocaleStore((state) => ({\r\n locale: state.locale\r\n }))\r\n\r\n const handleSelectAllAndOpen = (filter: Filter): void => {\r\n processFiltersOnChange([filter], true)\r\n setCurrentOpened(filter)\r\n }\r\n\r\n return (\r\n <React.Fragment>\r\n {/* Upper band with left arrow + text + reset on the right */}\r\n <MobileUpperBand\r\n title={translation[locale]?.filter || 'Filter'}\r\n handleReset={resetFilters}\r\n handleReturn={close}\r\n />\r\n <div className='rf-w-full rf-px-2'>\r\n {filters.map((filter, key) => {\r\n return (\r\n <div\r\n key={key}\r\n className={`rf-py-4 rf-text-xl rf-font-semibold rf-flex rf-justify-between rf-items-center rf-cursor-pointer ${\r\n key !== 0 && 'rf-border-t rf-border-t-[#CBC9C9]'\r\n }`}\r\n onClick={(): void => setCurrentOpened(filter)}\r\n >\r\n {capitalizeFirstLetter(filter.title, locale)}\r\n <div className='rf-flex rf-items-center'>\r\n {filter.id !== 'Event.DateRange' && (\r\n <div\r\n className='rf-text-sm rf-text-gray rf-mr-5'\r\n onClick={(): void => handleSelectAllAndOpen(filter)}\r\n >\r\n {capitalizeFirstLetter(\r\n translation[locale]?.all || 'all',\r\n locale\r\n )}\r\n </div>\r\n )}\r\n <ChevronRightIcon className='rf-h-5' color='#000' />\r\n </div>\r\n </div>\r\n )\r\n })}\r\n </div>\r\n </React.Fragment>\r\n )\r\n}\r\n\r\nexport default MobileFilterPage\r\n","import React from 'react'\r\nimport translation from '../../../../translations/template.json'\r\nimport { useLocaleStore } from '../../../Contexts/localeStore'\r\nimport { ArrowLeftIcon } from '../../../Icons/ArrowIcons'\r\n\r\ntype MobileUpperBandProps = {\r\n title: string\r\n handleReset: (() => void) | undefined\r\n handleReturn: () => void\r\n}\r\n\r\nconst MobileUpperBand = ({\r\n title,\r\n handleReset,\r\n handleReturn\r\n}: MobileUpperBandProps): JSX.Element => {\r\n const { locale } = useLocaleStore()\r\n\r\n return (\r\n <div className='rf-w-full rf-py-4 rf-px-4 rf-flex rf-justify-between rf-items-center rf-border-b rf-border-b-black'>\r\n <button\r\n className='rf-flex rf-flex-row rf-items-center rf-text-size-auto'\r\n onClick={handleReturn}\r\n >\r\n <ArrowLeftIcon className='rf-w-8' />\r\n <div className='rf-ml-1'>{title}</div>\r\n </button>\r\n <div\r\n className='rf-text-xsm rf-uppercase rf-text-secondary rf-underline'\r\n onClick={handleReset}\r\n >\r\n {translation[locale]?.reset || translation['fr-FR'].reset}\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default MobileUpperBand\r\n","import React from 'react'\r\nimport type { Filter } from '../../../../models/filterTypes'\r\nimport { useLocaleStore } from '../../../Contexts/localeStore'\r\nimport { capitalizeFirstLetter } from '../../../../utils/capitalizeFirstLetter'\r\nimport MobileUpperBand from './MobileUpperBand'\r\nimport SubFilter from './SubFilter'\r\nimport SubFilterAll from './SubFilterAll'\r\nimport SubFilterCalendar from './SubFilterCalendar'\r\n\r\ntype MobileSubFilterProps = {\r\n filter: Filter\r\n close: () => void\r\n resetFilters: () => void\r\n}\r\n\r\nconst MobileSubFilterPage = ({\r\n filter,\r\n close,\r\n resetFilters\r\n}: MobileSubFilterProps): JSX.Element => {\r\n const { locale } = useLocaleStore((state) => ({\r\n locale: state.locale\r\n }))\r\n\r\n return (\r\n <React.Fragment>\r\n {/* Upper band with left arrow + text + reset on the right */}\r\n <MobileUpperBand\r\n title={capitalizeFirstLetter(filter.title, locale)}\r\n handleReset={resetFilters}\r\n handleReturn={close}\r\n />\r\n <div className='rf-w-full rf-px-2'>\r\n {filter.id === 'Event.DateRange' ? (\r\n <SubFilterCalendar parent={{ id: filter.id, title: filter.title }} />\r\n ) : (\r\n <React.Fragment>\r\n <SubFilterAll\r\n className='rf-text-xl rf-border-b rf-border-b-silver'\r\n fullParent={filter}\r\n />\r\n {filter.items.map((item, key) => {\r\n return (\r\n <SubFilter\r\n key={key}\r\n className='rf-text-xl'\r\n name={item}\r\n parent={{ id: filter.id, title: filter.title }}\r\n />\r\n )\r\n })}\r\n </React.Fragment>\r\n )}\r\n </div>\r\n </React.Fragment>\r\n )\r\n}\r\n\r\nexport default MobileSubFilterPage\r\n","import React from 'react'\r\nimport { useLocaleStore } from '../../../Contexts/localeStore'\r\nimport { useRetorik } from '../../../Contexts/RetorikContext'\r\nimport translation from '../../../../translations/template.json'\r\nimport { Mode } from '../../../../models/enums'\r\n\r\ntype MobileDisplayResultProps = {\r\n onClick: () => void\r\n}\r\n\r\nconst MobileDisplayResult = ({\r\n onClick\r\n}: MobileDisplayResultProps): JSX.Element => {\r\n const { locale } = useLocaleStore((state) => ({\r\n locale: state.locale\r\n }))\r\n const { mode } = useRetorik()\r\n\r\n return (\r\n <div\r\n className={`rf-w-full rf-pt-8 ${\r\n mode === Mode.text ? 'rf-mb-30' : 'rf-mb-16'\r\n } rf-flex rf-justify-center rf-justify-self-end`}\r\n >\r\n <button\r\n className='rf-py-4 rf-px-6 rf-font-bold rf-text-secondary rf-border-2 rf-rounded-lg rf-border-secondary'\r\n onClick={onClick}\r\n >\r\n {translation[locale]?.showresults || 'Show results'}\r\n </button>\r\n </div>\r\n )\r\n}\r\n\r\nexport default MobileDisplayResult\r\n","import React, { useEffect, useRef, useState } from 'react'\r\nimport { useList } from '../../Contexts/ListContext'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport type { DirectLineAttachment } from 'botframework-webchat-core'\r\nimport {\r\n CONTENT_TYPE_EMPTY,\r\n CONTENT_TYPE_POI,\r\n CONTENT_TYPE_PAGINATION\r\n} from '../../../models/attachmentTypes'\r\nimport { useRenderAttachment } from 'botframework-webchat-api/lib/hooks'\r\nimport { DeviceType } from '../../../models/enums'\r\nimport translation from '../../../translations/poi.json'\r\nimport GridTemplate from '../../Templates/Grid'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\n\r\ninterface ListContainerProps {\r\n hasFilterOrSuggestedAction: boolean\r\n}\r\n\r\nconst ListContainer = ({\r\n hasFilterOrSuggestedAction\r\n}: ListContainerProps): JSX.Element => {\r\n const locale = useLocaleStore((state) => state.locale)\r\n const { content } = useList()\r\n const { currentDeviceType, isMobile } = useView()\r\n const [contentToDisplay, setContentToDisplay] = useState<\r\n DirectLineAttachment[]\r\n >([])\r\n const [landscapeStyle, setLandscapeStyle] = useState<string>('large:rf-h-3/5')\r\n const [limitToFill, setLimitToFill] = useState<number>(0)\r\n const renderAttachment = useRenderAttachment()\r\n const scrollRef = useRef<HTMLDivElement>(null)\r\n\r\n useEffect(() => {\r\n setLandscapeStyle(hasFilterOrSuggestedAction ? 'large:rf-h-[60vh]' : '')\r\n }, [hasFilterOrSuggestedAction])\r\n\r\n useEffect(() => {\r\n switch (currentDeviceType) {\r\n case DeviceType.landscape:\r\n setLimitToFill(10)\r\n break\r\n case DeviceType.borne:\r\n setLimitToFill(9)\r\n break\r\n case DeviceType.mobile:\r\n case DeviceType.widget:\r\n setLimitToFill(0)\r\n break\r\n }\r\n }, [currentDeviceType])\r\n\r\n useEffect(() => {\r\n if (content?.attachments && content.attachments.length > 0) {\r\n // Transform first and last attachments if they are 'previous' or 'next' cards\r\n if (content.attachments[0].contentType !== CONTENT_TYPE_POI) {\r\n content.attachments[0].contentType = CONTENT_TYPE_PAGINATION\r\n }\r\n if (\r\n content.attachments.length > 2 &&\r\n content.attachments[content.attachments.length - 1].contentType !==\r\n CONTENT_TYPE_POI\r\n ) {\r\n content.attachments[content.attachments.length - 1].contentType =\r\n CONTENT_TYPE_PAGINATION\r\n }\r\n // On a mobile device, if there is an odd number of attachments, we put a grey one at the end\r\n if (isMobile && content.attachments.length % 2 !== 0) {\r\n setContentToDisplay([\r\n ...content?.attachments,\r\n { contentType: CONTENT_TYPE_EMPTY }\r\n ])\r\n }\r\n // On a landscape device, we fill with grey cards if less than 10 attachments, same on borne device with less than 9\r\n else if (content.attachments.length < limitToFill) {\r\n const tempAttachments = [...content.attachments]\r\n let i = content.attachments.length\r\n while (i < limitToFill) {\r\n tempAttachments.push({ contentType: CONTENT_TYPE_EMPTY })\r\n i++\r\n }\r\n setContentToDisplay(tempAttachments)\r\n } else {\r\n setContentToDisplay(content.attachments)\r\n }\r\n } else {\r\n setContentToDisplay([])\r\n }\r\n }, [content, limitToFill])\r\n\r\n /**\r\n * On call :\r\n * - scroll to the scrollRef HTML element at the top of the view\r\n */\r\n const scrollToRef = (): void => {\r\n if (scrollRef && scrollRef.current !== null) {\r\n scrollRef.current.scrollIntoView({\r\n behavior: 'smooth'\r\n })\r\n }\r\n }\r\n\r\n /**\r\n * On content change :\r\n * - call scrollToRef method if we are not in mobile mobe\r\n */\r\n useEffect(() => {\r\n const timer =\r\n content && !isMobile\r\n ? setTimeout(() => {\r\n scrollToRef()\r\n }, 100)\r\n : null\r\n\r\n return (): void => {\r\n timer && clearTimeout(timer)\r\n }\r\n }, [content])\r\n\r\n return content ? (\r\n <div\r\n className={`rf-w-full rf-mb-8 ${landscapeStyle} large-vertical:rf-h-[50vh] rf-overflow-y-visible large:rf-overflow-y-scroll rf-scrollbar-hidden ${\r\n !isMobile && 'rf-opacity-gradient-b-thin'\r\n } rf-px-2 large:rf-px-0 rf-pb-8 large:rf-pb-16`}\r\n >\r\n <div ref={scrollRef} />\r\n <GridTemplate>\r\n {contentToDisplay.length === 0 ? (\r\n <div>\r\n {translation[locale]?.nodata || translation['fr-FR'].nodata}\r\n </div>\r\n ) : (\r\n contentToDisplay.map((attachment, key) => {\r\n return (\r\n <div key={key}>\r\n {renderAttachment({ activity: content, attachment })}\r\n </div>\r\n )\r\n })\r\n )}\r\n </GridTemplate>\r\n </div>\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default ListContainer\r\n","import React from 'react'\r\nimport { useList } from '../../Contexts/ListContext'\r\nimport translation from '../../../translations/template.json'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport VocalReminder from './Suggestions/VocalReminder'\r\nimport SuggestionsItem from './Suggestions/SuggestionsItem'\r\nimport { hooks } from 'botframework-webchat-component'\r\nimport type { Filter } from '../../../models/filterTypes'\r\n\r\nconst { useSendPostBack } = hooks\r\n\r\ninterface Suggestion {\r\n title: string\r\n value: {\r\n filter: Filter\r\n results?: number | string\r\n }\r\n}\r\n\r\ninterface SuggestionsProps {\r\n className?: string\r\n suggestions: Suggestion[]\r\n handleClose: () => void\r\n}\r\n\r\nconst Suggestions = ({\r\n className,\r\n suggestions,\r\n handleClose\r\n}: SuggestionsProps): JSX.Element => {\r\n const sendPostBack = useSendPostBack()\r\n const { setSuggestedFilter } = useList()\r\n const { locale } = useLocaleStore()\r\n\r\n const handleClick = (value: Filter): void => {\r\n setSuggestedFilter(value)\r\n sendPostBack({ filters: [value] })\r\n }\r\n\r\n return (\r\n <div className={`rf-flex rf-flex-col rf-items-start ${className}`}>\r\n {/* Title */}\r\n <div className='rf-text-3xl large:rf-text-5xl rf-font-bold rf-mb-5'>\r\n {translation[locale]?.suggestiontitle ||\r\n translation['fr-FR'].suggestiontitle}\r\n </div>\r\n {/* Research suggestions + Image of Lea to redirect to vocal conversation */}\r\n <div className='rf-flex rf-flex-row rf-flex-wrap'>\r\n <div className='rf-flex rf-flex-row rf-flex-wrap'>\r\n {suggestions.map((suggestion, key) => {\r\n return (\r\n <SuggestionsItem\r\n key={key}\r\n title={suggestion.title}\r\n value={suggestion.value.filter}\r\n results={\r\n suggestion.value.results !== undefined\r\n ? suggestion.value.results\r\n : 'NC'\r\n }\r\n handleClick={handleClick}\r\n />\r\n )\r\n })}\r\n </div>\r\n <VocalReminder handleClose={handleClose} className='large:rf-ml-12' />\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default Suggestions\r\n","import React from 'react'\r\nimport translation from '../../../../translations/template.json'\r\nimport { useLocaleStore } from '../../../Contexts/localeStore'\r\nimport { ArrowIcon } from '../../../Icons/ArrowIcons'\r\nimport { imageFiles } from '../../../../utils/imageFiles'\r\n\r\ninterface VocalReminderProps {\r\n className?: string\r\n handleClose: () => void\r\n}\r\n\r\nconst VocalReminder = ({\r\n className,\r\n handleClose\r\n}: VocalReminderProps): JSX.Element => {\r\n const { locale } = useLocaleStore((state) => ({\r\n locale: state.locale\r\n }))\r\n\r\n return (\r\n <div\r\n className={`hover:rf-cursor-pointer rf-flex rf-flex-row rf-items-start ${className}`}\r\n onClick={handleClose}\r\n >\r\n <img src={imageFiles.leaMini} className='rf-h-12' />\r\n <div className='rf-flex rf-flex-col rf-align-start rf-justify-start'>\r\n <div className='rf-flex rf-flex-col rf-pl-2'>\r\n {(translation[locale]?.reminder || translation['fr-FR']?.reminder)\r\n .split('\\n')\r\n .map((line, key) => {\r\n return <div key={key}>{line}</div>\r\n })}\r\n </div>\r\n <ArrowIcon />\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default VocalReminder\r\n","import React from 'react'\r\nimport type { Filter } from '../../../../models/filterTypes'\r\nimport { capitalizeFirstLetter } from '../../../../utils/capitalizeFirstLetter'\r\nimport { useLocaleStore } from '../../../Contexts/localeStore'\r\n\r\ntype SuggestionsItemProps = {\r\n className?: string\r\n title: string\r\n value: Filter\r\n results?: number | string\r\n handleClick: (value: Filter) => void\r\n}\r\n\r\nconst SuggestionsItem = ({\r\n className,\r\n title,\r\n value,\r\n results,\r\n handleClick\r\n}: SuggestionsItemProps): JSX.Element => {\r\n const { locale } = useLocaleStore()\r\n\r\n return (\r\n <button\r\n onClick={(): void => handleClick(value)}\r\n className={`rf-h-fit rf-px-4 rf-py-3 rf-mr-4 rf-mb-4 large-vertical:rf-py-4 rf-border rf-rounded-lg rf-bg-templateBackground rf-text-black rf-border-black hover:rf-cursor-pointer rf-flex rf-flex-row rf-items-center rf-justify-center ${className}`}\r\n aria-label={title}\r\n >\r\n {capitalizeFirstLetter(title, locale)}\r\n <div className='rf-ml-6 rf-text-gray'>{results || 0}</div>\r\n </button>\r\n )\r\n}\r\n\r\nexport default SuggestionsItem\r\n","import React, { useEffect, useMemo, useRef, useState } from 'react'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { useRenderAttachment } from 'botframework-webchat-api/lib/hooks'\r\nimport { Mode } from '../../models/enums'\r\nimport Card from '../AnswerPanel/Card'\r\nimport Carousel from '../AnswerPanel/Carousel'\r\n\r\ninterface AttachmentsProps {\r\n activity: any\r\n history?: boolean\r\n}\r\n\r\nconst classNameText = 'rf-max-h-full'\r\nconst classNameVocal =\r\n 'rf-w-11/12 large:rf-w-3/5 large-vertical:rf-w-4/9 rf-min-w-11/12 large:rf-min-w-3/5 large-vertical:rf-min-w-4/9 rf-max-h-full'\r\n\r\nconst Attachments = ({ activity, history }: AttachmentsProps): JSX.Element => {\r\n const renderAttachment = useRenderAttachment()\r\n const { mode } = useRetorik()\r\n const attachments = useMemo<Array<any>>(() => {\r\n return activity?.attachments || []\r\n }, [activity])\r\n const className = useMemo<string>(() => {\r\n return mode === Mode.text ? classNameText : classNameVocal\r\n }, [mode])\r\n const [height, setHeight] = useState<number>(0)\r\n const carouselRef: React.MutableRefObject<HTMLDivElement | null> =\r\n useRef(null)\r\n const timerRef: React.MutableRefObject<any> = useRef(null)\r\n\r\n /**\r\n * On activity props change :\r\n * - reset height by setting height state to 0\r\n * - after a short timeout, get the max height from the rendered carousel, and put it into height state\r\n */\r\n useEffect(() => {\r\n setHeight(0)\r\n timerRef &&\r\n (timerRef.current = setTimeout(() => {\r\n if (carouselRef.current) {\r\n setHeight(carouselRef.current.clientHeight)\r\n }\r\n }, 300))\r\n\r\n return (): void => timerRef && clearTimeout(timerRef.current)\r\n }, [activity])\r\n\r\n return (\r\n <React.Fragment>\r\n {attachments?.length > 1 ? (\r\n height !== 0 ? (\r\n // Displayed carousel with cards having all the same min-height\r\n <Carousel history={history}>\r\n {attachments.map((attachment, key) => {\r\n return (\r\n <Card key={key} className='rf-w-full'>\r\n {renderAttachment({\r\n activity: activity,\r\n attachment: attachment,\r\n history: history,\r\n height: height\r\n })}\r\n </Card>\r\n )\r\n })}\r\n </Carousel>\r\n ) : (\r\n // Test carousel used to retrieve the highest height from all cards to be used to display the 'right' carousel\r\n <Carousel ref={carouselRef} history={history}>\r\n {attachments.map((attachment, key) => {\r\n return (\r\n <Card key={(key + 1) * 100} className='rf-w-full'>\r\n {renderAttachment({\r\n activity: activity,\r\n attachment: attachment\r\n })}\r\n </Card>\r\n )\r\n })}\r\n </Carousel>\r\n )\r\n ) : (\r\n <Card className={history ? 'rf-w-full' : className}>\r\n {renderAttachment({\r\n activity: activity,\r\n attachment: attachments[0],\r\n history: history\r\n })}\r\n </Card>\r\n )}\r\n </React.Fragment>\r\n )\r\n}\r\n\r\nexport default Attachments\r\n","import React, { useRef, useState, useEffect } from 'react'\r\nimport type { WithChildren } from '../../models/utils'\r\nimport { ScrollButton } from './ScrollButton'\r\n\r\ntype CardProps = WithChildren<{\r\n className?: string\r\n shadow?: boolean\r\n}>\r\n\r\nconst Card = ({\r\n children,\r\n className,\r\n shadow = false\r\n}: CardProps): JSX.Element => {\r\n const [scrollButtonDisplay, setScrollButtonDisplay] = useState<boolean>(false)\r\n const [scrollButtonDirection, setScrollButtonDirection] = useState<\r\n 'top' | 'bottom'\r\n >('bottom')\r\n const botEndRef = useRef<HTMLDivElement>(null)\r\n const cardRef = useRef<HTMLDivElement>(null)\r\n\r\n const ScrollHandler = (\r\n to: 'bottom' | 'top',\r\n from: 'newMessage' | 'button'\r\n ): void => {\r\n if (to === 'bottom') {\r\n setScrollButtonDirection('top')\r\n } else {\r\n setScrollButtonDirection('bottom')\r\n }\r\n if (\r\n from === 'button' &&\r\n botEndRef &&\r\n botEndRef.current !== null &&\r\n to === 'bottom'\r\n ) {\r\n botEndRef.current.scrollIntoView({\r\n behavior: 'smooth'\r\n })\r\n } else if (to === 'top' && cardRef && cardRef.current) {\r\n cardRef.current.children[1].scrollIntoView({\r\n behavior: 'smooth'\r\n })\r\n }\r\n }\r\n\r\n const handleScroll = (): void => {\r\n if (cardRef.current) {\r\n const parentHeight = (cardRef.current as HTMLDivElement).parentElement\r\n ?.clientHeight\r\n const scrollHeight = (cardRef.current as HTMLDivElement).scrollHeight\r\n const scrollTop = (cardRef.current as HTMLDivElement).scrollTop\r\n // const offsetHeight = (cardRef.current as HTMLDivElement).offsetHeight\r\n const clientHeight = (cardRef.current as HTMLDivElement).clientHeight\r\n if (parentHeight && scrollHeight > parentHeight) {\r\n if (scrollHeight - scrollTop < clientHeight + 10) {\r\n setScrollButtonDisplay(true)\r\n setScrollButtonDirection('top')\r\n } else {\r\n setScrollButtonDisplay(true)\r\n setScrollButtonDirection('bottom')\r\n }\r\n } else {\r\n setScrollButtonDisplay(false)\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * On DragStart event call :\r\n * - prevent default behaviour and stop propagation of the event\r\n * - this is to prevent image dragging while trying to swipe in a carousel\r\n * @param e : React.DragEvent\r\n */\r\n const handleDragStart = (e: React.DragEvent): void => {\r\n e.preventDefault()\r\n e.stopPropagation()\r\n }\r\n\r\n // Check scroll at component first render\r\n useEffect(() => {\r\n const timer = setTimeout(() => {\r\n handleScroll()\r\n }, 500)\r\n\r\n return (): void => timer && clearTimeout(timer)\r\n }, [])\r\n\r\n return (\r\n <div\r\n className={`rf-relative rf-max-h-full rf-flex rf-flex-col rf-text-size-auto rf-unselectable ${className}`}\r\n draggable\r\n onDragStart={handleDragStart}\r\n style={{\r\n pointerEvents: 'all'\r\n }}\r\n >\r\n <div\r\n className='rf-w-full rf-max-h-full rf-rounded rf-border rf-border-cardFrameBorder rf-flex rf-flex-col rf-content-around rf-justify-start rf-overflow-y-auto rf-scrollbar-thin rf-touch-none'\r\n ref={cardRef}\r\n onScroll={(): void => handleScroll()}\r\n >\r\n <ScrollButton\r\n direction={scrollButtonDirection}\r\n display={scrollButtonDisplay}\r\n ScrollHandler={ScrollHandler}\r\n setPreventScroll={(): void => {}}\r\n className='rf-absolute rf-z-ui rf-bottom-1 rf-right-6 rf-w-9 rf-h-9 rf-cursor-pointer rf-bg-[#00000050] rf-p-[7px_12px] rf-rounded-[20px] rf-flex'\r\n />\r\n {children}\r\n <div ref={botEndRef} />\r\n </div>\r\n {shadow && (\r\n <div className='rf-relative rf--bottom-2 rf-h-0 rf-w-11/12 rf-mx-auto rf-shadow-card' />\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default Card\r\n","import React from 'react'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport useFullscreenImage from '../../hooks/useFullscreenImage'\r\nimport ScrollButtonIcon from '../Icons/ScrollButton/ScrollButtonIcon'\r\n\r\ninterface ScrollButtonProps {\r\n direction: 'top' | 'bottom'\r\n display: boolean\r\n ScrollHandler: (to: 'bottom' | 'top', from: 'newMessage' | 'button') => void\r\n setPreventScroll: (value: boolean) => void\r\n className: string\r\n}\r\n\r\nconst ScrollButton = ({\r\n direction,\r\n display,\r\n ScrollHandler,\r\n setPreventScroll,\r\n className\r\n}: ScrollButtonProps): JSX.Element => {\r\n const { themeColors } = useView()\r\n const fullScreenImage = useFullscreenImage()\r\n\r\n const handleClick = (): void => {\r\n setPreventScroll(true)\r\n if (direction === 'top') {\r\n ScrollHandler('top', 'button')\r\n console.log('handleClick - top')\r\n } else {\r\n console.log('handleClick - bottom')\r\n ScrollHandler('bottom', 'button')\r\n }\r\n }\r\n return (\r\n <>\r\n {display && !fullScreenImage ? (\r\n <div id='ScrollButton' className={className} onClick={handleClick}>\r\n <ScrollButtonIcon\r\n className={`${\r\n direction === 'top' ? 'rf-rotate-0' : 'rf-rotate-180'\r\n }`}\r\n color={themeColors.primary}\r\n />\r\n </div>\r\n ) : (\r\n <></>\r\n )}\r\n </>\r\n )\r\n}\r\n\r\nexport { ScrollButton }\r\n","import { hooks } from 'botframework-webchat'\r\nimport { useUtilsStore } from '../components/Contexts/utilsStore'\r\n\r\nconst { useActivities } = hooks\r\n\r\nconst useFullscreenImage = (): string | undefined => {\r\n const [activities] = useActivities()\r\n const { fullScreenImage } = useUtilsStore()\r\n\r\n if (fullScreenImage) {\r\n return fullScreenImage\r\n }\r\n\r\n if (activities && activities.length > 0) {\r\n const lastActivity = activities.slice(-1)[0] as any\r\n if (\r\n lastActivity.type === 'event' &&\r\n lastActivity.name === 'hospitality.ShowImage' &&\r\n lastActivity.value\r\n ) {\r\n return lastActivity.value\r\n }\r\n }\r\n\r\n return undefined\r\n}\r\n\r\nexport default useFullscreenImage\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst ScrollButtonIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n version='1.1'\r\n id='Layer_1'\r\n xmlns='http://www.w3.org/2000/svg'\r\n x='0px'\r\n y='0px'\r\n viewBox='0 0 100 100'\r\n className={className}\r\n >\r\n <path\r\n id='Icon_ionic-ios-arrow-down'\r\n fill={color}\r\n className='st0'\r\n d='M 49.948 29.033 L 13.413 65.414 C 10.792 68.035 6.323 68.188 3.702 65.414 C 3.702 65.414 3.702 65.414 3.702 65.414 C 1.081 62.639 1.081 58.322 3.702 55.702 L 45.015 14.388 C 47.636 11.767 51.798 11.767 54.573 14.233 L 96.195 55.856 C 98.97 58.477 98.97 62.947 96.195 65.568 C 93.574 68.343 89.103 68.343 86.484 65.568 L 49.948 29.033 Z'\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default ScrollButtonIcon\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React, { useEffect, useMemo, useRef, useState } from 'react'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport useCurrentOrLastPlayedActivity from '../../hooks/useCurrentOrLastPlayedActivity'\r\nimport type { WithChildren } from '../../models/utils'\r\nimport { DeviceType, Mode } from '../../models/enums'\r\nimport { Wheeler } from '../Utils'\r\nimport Swiper from '../Utils/Swiper'\r\n\r\ntype CarouselProps = WithChildren<{\r\n ref?: any\r\n direction?: 'horizontal' | 'vertical'\r\n history?: boolean\r\n}>\r\n\r\n// Cards' width coefficients depending on the mode and display type\r\nconst widthCoefficients = {\r\n textAndVocalMobile: 0.9,\r\n vocalDesktop: 0.6,\r\n vocalBorne: 0.45\r\n}\r\n\r\nconst defaultTransitionDuration = '300ms'\r\nconst velocityBreakpoint = 0.5\r\n\r\nconst Carousel = React.forwardRef<HTMLDivElement, CarouselProps>(\r\n ({ direction, history, children }, ref) => {\r\n const { mode } = useRetorik()\r\n const { currentDeviceType, isMobile, showHomeAttachments } = useView()\r\n const activity = useCurrentOrLastPlayedActivity()\r\n const nbCards = React.Children.count(children)\r\n const gap = useMemo<number>(() => {\r\n return isMobile ? 0.3 : 1\r\n }, [currentDeviceType])\r\n const coefficient = useMemo<number>(() => {\r\n return mode === Mode.vocal\r\n ? currentDeviceType === DeviceType.landscape\r\n ? history\r\n ? widthCoefficients.textAndVocalMobile\r\n : widthCoefficients.vocalDesktop\r\n : currentDeviceType === DeviceType.borne\r\n ? history\r\n ? widthCoefficients.vocalDesktop\r\n : widthCoefficients.vocalBorne\r\n : widthCoefficients.textAndVocalMobile\r\n : widthCoefficients.textAndVocalMobile\r\n }, [mode, currentDeviceType])\r\n const [cardWidth, setCardWidth] = useState<number>(\r\n currentDeviceType === DeviceType.widget\r\n ? 400 * coefficient\r\n : window.innerWidth * coefficient\r\n )\r\n const [cardHeight, setCardHeight] = useState<number>()\r\n const [currentCard, setCurrentCard] = useState<number>(0)\r\n const [currentPadding, setCurrentPadding] = useState<number>()\r\n const [translation, setTranslation] = useState<string>('')\r\n const [transitionDuration, setTransitionDuration] = useState<string>('1ms')\r\n const [gridTemplateColumn, setGridTemplateColumn] = useState<string>(\r\n direction !== 'vertical' ? `repeat(${nbCards}, ${cardWidth}px)` : ''\r\n )\r\n const [gridTemplateRow, setGridTemplateRow] = useState<string>(\r\n direction === 'vertical'\r\n ? `repeat(${nbCards}, ${(cardWidth * 10) / 16}px)`\r\n : ''\r\n )\r\n const [wheeling, setWheeling] = useState<number>(0)\r\n const divRef: React.MutableRefObject<HTMLDivElement | null> = useRef(null)\r\n const timerRef: React.MutableRefObject<any> = useRef(null)\r\n\r\n /**\r\n * On cards container reference, mode / currentDeviceType states change :\r\n * - calculate the cards' width depending on the coefficient\r\n * - calculate the cards' height depending on the width (use a 16/10 format). Only used in vertical disposition\r\n * - set the currentPadding state to have centered cards in horizontal disposition\r\n * - set cardWidth, cardHeight and gridTemplateRow / gridTemplateColumn (depending on direction) states\r\n * On component unmount :\r\n * - clear timeout\r\n */\r\n useEffect(() => {\r\n if (divRef.current) {\r\n const newCardWidth = Math.floor(\r\n divRef.current.clientWidth * coefficient\r\n )\r\n const newCardHeight = Math.ceil((newCardWidth * 10) / 16)\r\n // Space needed to center to cards\r\n setCurrentPadding(((1 - coefficient) * divRef.current.clientWidth) / 2)\r\n // Cards' width (all dispositions) and height (only used in vertical disposition)\r\n setCardWidth(newCardWidth)\r\n setCardHeight(newCardHeight)\r\n direction === 'vertical'\r\n ? setGridTemplateRow(`repeat(${nbCards}, ${newCardHeight}px)`)\r\n : setGridTemplateColumn(`repeat(${nbCards}, ${newCardWidth}px)`)\r\n\r\n setCurrentCard(0)\r\n }\r\n\r\n return (): void => timerRef && clearTimeout(timerRef.current)\r\n }, [divRef, coefficient, currentDeviceType, activity?.id])\r\n\r\n /**\r\n * On currentCard, cardWidth, cardHeight, currentPadding states change :\r\n * - set translation state depending on the direction\r\n */\r\n useEffect(() => {\r\n if (\r\n currentCard !== undefined &&\r\n cardWidth !== undefined &&\r\n cardHeight !== undefined &&\r\n currentPadding !== undefined\r\n ) {\r\n direction === 'vertical'\r\n ? setTranslation(\r\n `translateY(calc(-${currentCard * cardHeight}px - ${\r\n currentCard * gap\r\n }rem))`\r\n )\r\n : setTranslation(\r\n `translateX(calc(-${currentCard * cardWidth}px - ${\r\n currentCard * gap\r\n }rem + ${currentPadding}px))`\r\n )\r\n }\r\n }, [currentCard, cardWidth, cardHeight, currentPadding])\r\n\r\n /**\r\n * On wheeling state change :\r\n * - call either onSwipeRight or onSwipeLeft (with high values to enter the right part of the if condition), depending on the wheeling value (positive or negative)\r\n */\r\n useEffect(() => {\r\n wheeling &&\r\n (wheeling > 0 ? onSwipeLeft(1000, 1000) : onSwipeRight(1000, 1000))\r\n }, [wheeling])\r\n\r\n useEffect(() => {\r\n if (showHomeAttachments) {\r\n setCurrentCard(0)\r\n }\r\n }, [showHomeAttachments])\r\n\r\n /**\r\n * On call :\r\n * - set translation to its initial state\r\n */\r\n const resetPosition = (): void => {\r\n cardWidth &&\r\n setTranslation(\r\n `translateX(calc(-${currentCard * cardWidth}px - ${\r\n currentCard * gap\r\n }rem + ${currentPadding}px))`\r\n )\r\n }\r\n\r\n /**\r\n * On call :\r\n * - simulate a bounce effect by translating 1/10 of the width of a card in a sense, and then back\r\n * @param left : boolean\r\n */\r\n const bounce = (left?: boolean): void => {\r\n if (cardWidth) {\r\n setTransitionDuration(defaultTransitionDuration)\r\n setTranslation(\r\n `translateX(calc(-${currentCard * cardWidth}px - ${\r\n currentCard * gap\r\n }rem + ${currentPadding}px ${left ? '-' : '+'} ${cardWidth / 10}px))`\r\n )\r\n\r\n timerRef &&\r\n (timerRef.current = setTimeout(() => {\r\n setTranslation(\r\n `translateX(calc(-${currentCard * cardWidth}px - ${\r\n currentCard * gap\r\n }rem + ${currentPadding}px`\r\n )\r\n }, 300))\r\n }\r\n }\r\n\r\n /**\r\n * On call :\r\n * - check if the current card is not already the last one\r\n * - check the distance of the swipe, if it's higher than half a card's width, add 1 to currentCard state\r\n * - check the velocity of the swipe, if it's higher than the limit, add 1 to currentCard state by 0.1 velocity over the limit, otherwise add 1\r\n * @param distance : number\r\n * @param elpasedTime : number\r\n */\r\n const onSwipeLeft = (distance: number, elapsedTime: number): void => {\r\n const velocity = Math.abs(distance / elapsedTime)\r\n setTransitionDuration(defaultTransitionDuration)\r\n if (currentCard !== nbCards - 1 && cardWidth) {\r\n if (Math.abs(distance) > cardWidth / 2) {\r\n setCurrentCard((card) => card + 1)\r\n } else {\r\n const velocityDifference = Math.round(\r\n (velocity - velocityBreakpoint) * 10\r\n )\r\n const nextCard =\r\n currentCard + (velocityDifference > 0 ? velocityDifference : 1)\r\n\r\n setCurrentCard(nextCard < nbCards ? nextCard : nbCards - 1)\r\n }\r\n } else {\r\n distance === 1000 && elapsedTime === 1000\r\n ? bounce(true)\r\n : resetPosition()\r\n }\r\n }\r\n\r\n /**\r\n * On call :\r\n * - check if the current card is not already the first one\r\n * - check the distance of the swipe, if it's higher than half a card's width, substract 1 from currentCard state\r\n * - check the velocity of the swipe, if it's higher than the limit, substract 1 to currentCard state by 0.1 velocity over the limit, otherwise substract 1\r\n * @param distance : number\r\n * @param elpasedTime : number\r\n */\r\n const onSwipeRight = (distance: number, elapsedTime: number): void => {\r\n const velocity = Math.abs(distance / elapsedTime)\r\n setTransitionDuration(defaultTransitionDuration)\r\n if (currentCard !== 0 && cardWidth) {\r\n if (Math.abs(distance) > cardWidth / 2) {\r\n setCurrentCard((card) => card - 1)\r\n } else {\r\n const velocityDifference = Math.round(\r\n (velocity - velocityBreakpoint) * 10\r\n )\r\n const nextCard =\r\n currentCard - (velocityDifference > 0 ? velocityDifference : 1)\r\n setCurrentCard(nextCard >= 0 ? nextCard : 0)\r\n }\r\n } else {\r\n distance === 1000 && elapsedTime === 1000 ? bounce() : resetPosition()\r\n }\r\n }\r\n\r\n /**\r\n * On call :\r\n * - check if the translation is available (inside allowed bounds)\r\n * - if available, set transitionDuration state to '0ms' and then update translation state to the default distance - received distance param\r\n * @param distance : number\r\n */\r\n const onSwiping = (distance: number): void => {\r\n const available =\r\n currentCard === 0 || currentCard === nbCards - 1\r\n ? checkSwipingAvailable(distance, gap)\r\n : true\r\n if (cardWidth !== undefined) {\r\n setTransitionDuration('0ms')\r\n if (available) {\r\n if (\r\n currentCard !== undefined &&\r\n cardHeight !== undefined &&\r\n currentPadding !== undefined\r\n ) {\r\n setTranslation(\r\n `translateX(calc(-${currentCard * cardWidth}px - ${\r\n currentCard * gap\r\n }rem + ${currentPadding}px - ${distance}px))`\r\n )\r\n }\r\n } else {\r\n const bounceLimit = cardWidth / 3\r\n if (Math.abs(distance) <= bounceLimit / 2) {\r\n setTranslation(\r\n `translateX(calc(-${currentCard * cardWidth}px - ${\r\n currentCard * gap\r\n }rem + ${currentPadding}px - ${\r\n distance * (1 - Math.abs(distance) / bounceLimit)\r\n }px))`\r\n )\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * On call :\r\n * - calculate the max length allowed\r\n * - calculate the future length depending on the distance\r\n * - check if the future length is inside the available bounds and return a boolean\r\n * @param distance : number\r\n * @param gap : number\r\n * @returns boolean\r\n */\r\n const checkSwipingAvailable = (distance: number, gap: number): boolean => {\r\n if (currentCard !== undefined && cardWidth && currentPadding) {\r\n const maxLength =\r\n (nbCards - 1) * cardWidth + (nbCards - 1) * gap + currentPadding\r\n const currentLength =\r\n currentCard * cardWidth +\r\n currentCard *\r\n gap *\r\n parseFloat(getComputedStyle(document.documentElement).fontSize) +\r\n currentPadding +\r\n distance\r\n\r\n return !(currentLength < currentPadding || currentLength > maxLength)\r\n }\r\n\r\n return false\r\n }\r\n\r\n /**\r\n * On call :\r\n * - call onSwipeLeft method\r\n * @param distance : number\r\n */\r\n const onSwipeTop = (distance: number, elapsedTime: number): void => {\r\n onSwipeLeft(distance, elapsedTime)\r\n }\r\n\r\n /**\r\n * On call :\r\n * - call onSwipeRight method\r\n * @param distance : number\r\n */\r\n const onSwipeBottom = (distance: number, elapsedTime: number): void => {\r\n onSwipeRight(distance, elapsedTime)\r\n }\r\n\r\n /**\r\n * On click event fire :\r\n * - set transitionDuration state to default value\r\n * - update currentCard state with the key parameter\r\n * @param key : number\r\n */\r\n const handleClick = (key: number): void => {\r\n setTransitionDuration(defaultTransitionDuration)\r\n setCurrentCard(key)\r\n }\r\n\r\n /**\r\n * On wheel event fire :\r\n * - check which axis has been triggered (x or y) to get its value\r\n * - set wheeling state to a positive or negative unique value (here Date.now() is used as unique)\r\n * @param delta : number\r\n */\r\n const handleWheel = (delta): void => {\r\n if (delta !== undefined) {\r\n setWheeling(delta > 0 ? Date.now() : -Date.now())\r\n }\r\n }\r\n\r\n return (\r\n <div\r\n ref={divRef}\r\n className='rf-w-full rf-flex rf-flex-col'\r\n style={{\r\n pointerEvents: 'all'\r\n }}\r\n >\r\n <Wheeler\r\n className='rf-w-full'\r\n handleWheel={handleWheel}\r\n xAxisOnly={true}\r\n >\r\n <Swiper\r\n direction={direction || 'horizontal'}\r\n onSwiping={onSwiping}\r\n onSwipeLeft={onSwipeLeft}\r\n onSwipeRight={onSwipeRight}\r\n onSwipeTop={onSwipeTop}\r\n onSwipeBottom={onSwipeBottom}\r\n className={\r\n direction === 'vertical'\r\n ? 'rf-flex rf-justify-center'\r\n : mode === Mode.vocal && !isMobile\r\n ? history\r\n ? 'rf-opacity-gradient-l-thin'\r\n : 'rf-opacity-gradient-l'\r\n : ''\r\n }\r\n >\r\n <div\r\n ref={ref}\r\n className={`rf-relative ${\r\n direction === 'vertical' ? 'rf-h-max' : 'rf-w-max'\r\n } rf-transition-transform`}\r\n style={{\r\n display: 'grid',\r\n gridTemplateColumns:\r\n direction === 'vertical'\r\n ? `${cardWidth}px`\r\n : gridTemplateColumn,\r\n gridTemplateRows: gridTemplateRow,\r\n gap: isMobile ? '0.3rem' : '1rem',\r\n transitionTimingFunction: 'linear',\r\n transitionDuration: transitionDuration,\r\n transform: translation\r\n }}\r\n >\r\n {children}\r\n </div>\r\n </Swiper>\r\n </Wheeler>\r\n\r\n {/* Buttons under the carousel for direct access to a specific card */}\r\n <div className='rf-w-full rf-py-3 rf-flex rf-flex-row rf-justify-center rf-gap-1'>\r\n {React.Children.map(children, (_child, key) => {\r\n return (\r\n <button\r\n key={key}\r\n className={`rf-w-3 rf-h-3 rf-border rf-border-trueblack rf-rounded-half ${\r\n key === currentCard ? 'rf-bg-primary' : 'rf-bg-truewhite'\r\n }`}\r\n onClick={(): void => handleClick(key)}\r\n />\r\n )\r\n })}\r\n </div>\r\n </div>\r\n )\r\n }\r\n)\r\n\r\nexport default Carousel\r\n","import React, { useState, useEffect } from 'react'\r\nimport type { WithChildren } from '../../models/utils'\r\n\r\ntype SwiperProps = WithChildren<{\r\n direction: 'horizontal' | 'vertical'\r\n onSwiping: (distance: number) => void\r\n onSwipeLeft: (distance: number, elapsedTime: number) => void\r\n onSwipeRight: (distance: number, elapsedTime: number) => void\r\n onSwipeTop: (distance: number, elapsedTime: number) => void\r\n onSwipeBottom: (distance: number, elapsedTime: number) => void\r\n className?: string\r\n}>\r\n\r\n// The required distance between touchStart and touchEnd to be detected as a swipe\r\nconst minSwipeDistance = 30\r\n\r\nconst Swiper = ({\r\n direction,\r\n onSwiping,\r\n onSwipeLeft,\r\n onSwipeRight,\r\n onSwipeTop,\r\n onSwipeBottom,\r\n className,\r\n children\r\n}: SwiperProps): JSX.Element => {\r\n const [moveStart, setMoveStart] = useState<number | null>(null)\r\n const [moveEnd, setMoveEnd] = useState<number | null>(null)\r\n const [timeStart, setTimeStart] = useState<number>(0)\r\n\r\n /**\r\n * On moveEnd state change :\r\n * - set swiping distance to moveStart - moveEnd\r\n */\r\n useEffect(() => {\r\n if (moveStart && moveEnd) {\r\n const distance = moveStart - moveEnd\r\n onSwiping(distance)\r\n }\r\n }, [moveEnd])\r\n\r\n /**\r\n * On PointerDown event fire :\r\n * - set timeStart state to current timestamp\r\n * - reset moveEnd state to null to prevent activation on single touch\r\n * - set moveStart state with the current X or Y position depending on the direction prop\r\n * @param e : React.PointerEvent\r\n */\r\n const onPointerDown = (e: React.PointerEvent): void => {\r\n setTimeStart(Date.now())\r\n setMoveEnd(null)\r\n setMoveStart(direction === 'horizontal' ? e.clientX : e.clientY)\r\n }\r\n\r\n /**\r\n * On PointerMove event fire :\r\n * - set moveEnd state with the current X or Y position depending on the direction prop\r\n * @param e : React.PointerEvent\r\n */\r\n const onPointerMove = (e: React.PointerEvent): void => {\r\n setMoveEnd(direction === 'horizontal' ? e.clientX : e.clientY)\r\n }\r\n\r\n /**\r\n * On PointerUp event fire :\r\n * - calculate the distance between move start and end\r\n * - prevent default behaviour and propagation of the event if the distance is large enough (prevent unwanted touch/click at the end of a slide)\r\n * - call the parent method depending on the distance and the direction, or reset position if the distance is too small\r\n * - reset moveStart state to null\r\n */\r\n const onPointerUp = (e: React.PointerEvent): void => {\r\n if (moveStart && moveEnd) {\r\n const elapsedTime = Date.now() - timeStart\r\n const distance = moveStart - moveEnd\r\n if (distance > minSwipeDistance) {\r\n e.preventDefault()\r\n e.stopPropagation()\r\n direction === 'horizontal'\r\n ? onSwipeLeft(distance, elapsedTime)\r\n : onSwipeTop(distance, elapsedTime)\r\n } else if (distance < -minSwipeDistance) {\r\n e.preventDefault()\r\n e.stopPropagation()\r\n direction === 'horizontal'\r\n ? onSwipeRight(distance, elapsedTime)\r\n : onSwipeBottom(distance, elapsedTime)\r\n } else {\r\n onSwiping(0)\r\n }\r\n }\r\n\r\n setMoveStart(null)\r\n }\r\n\r\n return (\r\n <div\r\n className={`rf-relative rf-w-full rf-overflow-hidden ${className}`}\r\n onPointerDown={onPointerDown}\r\n onPointerUp={onPointerUp}\r\n onPointerMove={onPointerMove}\r\n onPointerLeave={onPointerUp}\r\n >\r\n {children}\r\n </div>\r\n )\r\n}\r\n\r\nexport default Swiper\r\n","import { useEffect, useState } from 'react'\r\nimport type { Queue } from '../models/types'\r\nimport useLastBotActivity from './useLastBotActivity'\r\nimport type { RetorikActivity } from '../models/activityTypes'\r\n\r\nexport default function useAnimationQueue(): Queue | undefined {\r\n const [lastBotActivity]: Array<RetorikActivity | undefined> =\r\n useLastBotActivity()\r\n const [animationQueue, setAnimationQueue] = useState<Queue>()\r\n\r\n const handleEvent = (e: CustomEvent): void => {\r\n e.detail && setAnimationQueue(e.detail.queue)\r\n }\r\n\r\n useEffect(() => {\r\n document.addEventListener('sendPlayAnimationEvent', handleEvent)\r\n }, [])\r\n\r\n useEffect(() => {\r\n if (lastBotActivity?.meta?.queue && lastBotActivity.meta.queue.length > 0) {\r\n setAnimationQueue(lastBotActivity.meta.queue)\r\n }\r\n }, [lastBotActivity])\r\n\r\n return animationQueue\r\n}\r\n","import { hooks } from 'botframework-webchat'\r\nimport type { RetorikActivity } from '../models/activityTypes'\r\n\r\nconst { useActivities } = hooks\r\n\r\nexport default function useLastBotActivity(): Array<\r\n RetorikActivity | undefined\r\n> {\r\n const [activities] = useActivities()\r\n const lastBotActivity = activities\r\n .slice()\r\n .reverse()\r\n .find(({ from: { role }, type }) => role === 'bot' && type === 'message')\r\n\r\n return [lastBotActivity]\r\n}\r\n","import React from 'react'\r\nimport { RetorikLogoIcon } from '../Icons/Miscellaneous'\r\n\r\nconst RetorikLogo = (): JSX.Element => {\r\n return (\r\n <a\r\n href='https://davi.ai/retorik'\r\n title='Retorik by Davi'\r\n target='_blank'\r\n rel='noreferrer'\r\n className='rf-hidden large:rf-block rf-relative rf-col-start-1 rf-col-span-full rf-row-start-12 rf-row-span-1 rf-self-end rf-justify-self-start'\r\n >\r\n <RetorikLogoIcon className='rf-ml-4 rf-mb-4 rf-h-14' />\r\n </a>\r\n )\r\n}\r\n\r\nexport default RetorikLogo\r\n","import React, { useEffect, useState } from 'react'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport HistoryList from '../History/HistoryList'\r\nimport LanguageChoice from '../Language/LanguageChoice'\r\nimport AttachmentDetails from '../Attachments/AttachmentDetail'\r\nimport FullScreenImage from '../Attachments/Utils/FullScreenImage'\r\nimport Weather from '../Weather/Weather'\r\nimport { CurrentSubView, RetorikEvent } from '../../models/enums'\r\nimport CustomView from './CustomView'\r\nimport {\r\n setCurrentCustomView,\r\n setCurrentSubView,\r\n setRetorikEvent\r\n} from '../Contexts/utilsStore'\r\nimport useShowMap from '../../hooks/useShowMap'\r\nimport { CustomMenu } from '../../models/types'\r\nimport Emergency from '../Emergency/Emergency'\r\nimport useShowEmergency from '../../hooks/useShowEmergency'\r\n\r\nconst SubViews = ({ externalComponents }): JSX.Element => {\r\n const { currentSubView, customView } = useRetorik()\r\n const { configuration } = useRetorik()\r\n const showMap = useShowMap()\r\n const showEmergency = useShowEmergency()\r\n const [displayCustomComponent, setDisplayCustomComponent] =\r\n useState<boolean>(true)\r\n\r\n useEffect(() => {\r\n if (showMap && currentSubView !== CurrentSubView.custom) {\r\n if (externalComponents && externalComponents.length > 0) {\r\n const component = (\r\n externalComponents as Array<{ name: string; component: JSX.Element }>\r\n )?.find((e) => e.name === 'mapDisplay')\r\n if (component && component.component) {\r\n if (configuration.baseMenu || configuration.customMenu) {\r\n let allMenus: Array<CustomMenu> = []\r\n configuration.baseMenu &&\r\n // Filter on 'icon' key to get only CustomMenu items\r\n (allMenus = [...configuration.baseMenu].filter((m) =>\r\n Object.keys(m).includes('icon')\r\n ) as CustomMenu[])\r\n if (\r\n configuration.customMenu &&\r\n configuration.customMenu.length > 0\r\n ) {\r\n if (Array.isArray(configuration.customMenu[0])) {\r\n const tempCustomMenu = configuration.customMenu as [\r\n CustomMenu[]\r\n ]\r\n tempCustomMenu.forEach((menu: CustomMenu[]) => {\r\n allMenus = [...allMenus, ...menu]\r\n })\r\n } else {\r\n allMenus = [\r\n ...allMenus,\r\n ...(configuration.customMenu as CustomMenu[])\r\n ]\r\n }\r\n }\r\n\r\n const customMenuMap = allMenus.find(\r\n (c) => c.customDisplay && c.customDisplay === 'mapDisplay'\r\n )\r\n if (customMenuMap) {\r\n console.log(component.component)\r\n if (\r\n customView &&\r\n customView.view === customMenuMap.customDisplay\r\n ) {\r\n } else {\r\n setCurrentCustomView(customMenuMap)\r\n }\r\n setRetorikEvent(RetorikEvent.DetailViewOpen)\r\n setCurrentSubView(CurrentSubView.custom)\r\n setDisplayCustomComponent(true)\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }, [showMap])\r\n\r\n useEffect(() => {\r\n if (showEmergency) {\r\n setCurrentSubView(CurrentSubView.emergency)\r\n }\r\n }, [showEmergency])\r\n\r\n useEffect(() => {\r\n if (currentSubView !== CurrentSubView.none) {\r\n setRetorikEvent(RetorikEvent.DetailViewOpen)\r\n } else {\r\n setRetorikEvent(RetorikEvent.DetailViewClose)\r\n }\r\n\r\n if (currentSubView !== CurrentSubView.custom) {\r\n setDisplayCustomComponent(false)\r\n } else {\r\n setDisplayCustomComponent(true)\r\n }\r\n }, [currentSubView])\r\n return (\r\n <React.Fragment>\r\n {currentSubView === CurrentSubView.history ? (\r\n <HistoryList />\r\n ) : currentSubView === CurrentSubView.languages ? (\r\n <LanguageChoice />\r\n ) : currentSubView === CurrentSubView.weather ? (\r\n <Weather />\r\n ) : currentSubView === CurrentSubView.emergency ? (\r\n <Emergency />\r\n ) : (\r\n <React.Fragment />\r\n )}\r\n\r\n <CustomView\r\n display={displayCustomComponent}\r\n externalComponents={externalComponents}\r\n customView={customView?.view}\r\n title={customView?.title}\r\n icon={customView?.icon}\r\n setDisplayCustomComponent={setDisplayCustomComponent}\r\n />\r\n\r\n <AttachmentDetails />\r\n <FullScreenImage />\r\n </React.Fragment>\r\n )\r\n}\r\n\r\nexport default SubViews\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React, { useEffect, useRef } from 'react'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport useMessageActivities from '../../hooks/useMessageActivities'\r\nimport translation from '../../translations/history.json'\r\nimport { SubMenuClosing as Template } from '../Templates'\r\nimport HistoryItem from './HistoryItem'\r\nimport { CurrentSubView, DeviceType } from '../../models/enums'\r\nimport { useView } from '../Contexts/ViewContext'\r\n\r\nconst HistoryList = (): JSX.Element => {\r\n const { setCurrentSubView } = useRetorik()\r\n const { currentDeviceType } = useView()\r\n const { locale } = useLocaleStore()\r\n const activities = useMessageActivities()\r\n const scrollRef = useRef<HTMLDivElement>(null)\r\n\r\n /**\r\n * On call :\r\n * - scroll to the scrollRef HTML element at the bottom of the view\r\n */\r\n const scrollToRef = (): void => {\r\n if (scrollRef && scrollRef.current !== null) {\r\n scrollRef.current.scrollIntoView({\r\n behavior: 'smooth'\r\n })\r\n }\r\n }\r\n\r\n /**\r\n * On component mount :\r\n * - call scrollToRef method\r\n */\r\n useEffect(() => {\r\n setTimeout(() => {\r\n scrollToRef()\r\n }, 200)\r\n }, [])\r\n\r\n const handleClose = (): void => {\r\n setCurrentSubView(CurrentSubView.none)\r\n }\r\n\r\n return (\r\n <Template\r\n handleClose={handleClose}\r\n backIsConversation={true}\r\n title={translation[locale]?.title || translation['fr-FR'].title}\r\n >\r\n <div\r\n className={`rf-pb-4 rf-overflow-y-scroll ${\r\n currentDeviceType === DeviceType.borne\r\n ? 'rf-scrollbar-thin'\r\n : 'rf-scrollbar-hidden'\r\n }`}\r\n >\r\n {/* History items */}\r\n {activities.map((activity, key) => {\r\n return <HistoryItem key={key} activity={activity} />\r\n })}\r\n <div ref={scrollRef} />\r\n </div>\r\n </Template>\r\n )\r\n}\r\n\r\nexport default HistoryList\r\n","import { hooks } from 'botframework-webchat'\r\nimport type { HistoryActivity, RetorikActivity } from '../models/activityTypes'\r\n\r\nconst { useActivities } = hooks\r\n\r\nexport default function useMessageActivities(): Array<HistoryActivity> {\r\n const [allActivities] = useActivities()\r\n // processedId contains the ids of the activities already processed (because useActivities gives duplicate activities with different state depending on if it's been spoken or not )\r\n const processedId: Array<string> = []\r\n const history: HistoryActivity[] = []\r\n const activities = allActivities\r\n .slice()\r\n .filter(({ type }) => type === 'message')\r\n activities.forEach((activity) => {\r\n if (activity.id && !processedId.includes(activity.id)) {\r\n processedId.push(activity.id)\r\n // Check if this is a question or an answer (questions from the user don't have a replyToId field)\r\n if (activity.replyToId) {\r\n const question: HistoryActivity | undefined = history.find(\r\n (historyItem) => historyItem.question.id === activity.replyToId\r\n )\r\n if (question) {\r\n question.answers.push(activity)\r\n } else {\r\n // Get answer's timestamp or create a new one if none present\r\n const timestamp =\r\n activity.localTimestamp ||\r\n activity.timestamp ||\r\n Date.now().toString()\r\n\r\n const newQuestion: RetorikActivity = {\r\n id: activity.id,\r\n type: 'message',\r\n text: '',\r\n channelData: {\r\n 'webchat:sequence-id': 1\r\n },\r\n timestamp: timestamp,\r\n localTimestamp: timestamp,\r\n from: {\r\n id: 'bot',\r\n role: 'bot'\r\n }\r\n }\r\n\r\n history.push({\r\n question: newQuestion,\r\n answers: [activity]\r\n })\r\n }\r\n } else {\r\n history.push({\r\n question: activity,\r\n answers: []\r\n })\r\n }\r\n }\r\n })\r\n\r\n return history\r\n}\r\n","{\r\n \"fr-FR\": {\r\n \"title\": \"historique de conversation\"\r\n },\r\n \"en-US\": {\r\n \"title\": \"chat history\"\r\n },\r\n \"es-ES\": {\r\n \"title\": \"chat history\"\r\n },\r\n \"de-DE\": {\r\n \"title\": \"chat history\"\r\n }\r\n}\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React from 'react'\r\nimport type { HistoryActivity } from '../../models/activityTypes'\r\nimport HistoryQA from './HistoryQA'\r\n\r\ninterface HistoryItemProps {\r\n activity: HistoryActivity\r\n}\r\n\r\nconst HistoryItem = ({ activity }: HistoryItemProps): JSX.Element => {\r\n return (\r\n <div className='rf-mb-4 rf-flex rf-flex-col rf-justify-start rf-items-start rf-gap-4 rf-text-size-auto'>\r\n {/* Question */}\r\n {activity?.question && activity.question.type === 'message' && (\r\n <HistoryQA activity={activity.question} isQuestion={true} />\r\n )}\r\n\r\n {/* Answers */}\r\n {activity.answers.map((answer, j) => {\r\n return answer.type === 'message' ? (\r\n <HistoryQA key={j} activity={answer} isQuestion={false} />\r\n ) : (\r\n <React.Fragment />\r\n )\r\n })}\r\n </div>\r\n )\r\n}\r\n\r\nexport default HistoryItem\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React from 'react'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport type { RetorikActivity } from '../../models/activityTypes'\r\nimport { getTextWithoutSpeechMarkdown } from '../../utils/speechMarkdownUtils'\r\nimport Attachments from '../Attachments/Attachments'\r\n\r\ninterface HistoryQAProps {\r\n activity: RetorikActivity\r\n isQuestion: boolean\r\n}\r\n\r\nconst HistoryQA = ({ activity, isQuestion }: HistoryQAProps): JSX.Element => {\r\n const { locale } = useLocaleStore()\r\n const { isMobile } = useView()\r\n const time = activity.localTimestamp\r\n ? new Date(activity.localTimestamp)\r\n : activity.timestamp\r\n ? new Date(activity.timestamp)\r\n : new Date()\r\n\r\n return activity.text || !!activity.attachments?.length ? (\r\n <div\r\n className={`${\r\n isMobile ? 'rf-w-full' : 'rf-max-w-full'\r\n } rf-flex rf-flex-col rf-gap-1`}\r\n >\r\n {/* Time */}\r\n <div className='rf-text-[#9A9A9A]'>\r\n {time.toLocaleString(locale, {\r\n hour: 'numeric',\r\n minute: 'numeric'\r\n })}\r\n </div>\r\n\r\n {/* Question or Answer */}\r\n <div\r\n className={`${\r\n isQuestion\r\n ? 'rf-text-textModePanelConversationUser'\r\n : 'rf-text-textModePanelConversationBot'\r\n }`}\r\n >\r\n {activity.htmlText ? (\r\n <div\r\n dangerouslySetInnerHTML={{\r\n __html: activity.htmlText\r\n }}\r\n />\r\n ) : activity.text ? (\r\n getTextWithoutSpeechMarkdown(activity.text)\r\n ) : (\r\n ''\r\n )}\r\n {/* Display attachments if there are some and the display mode wasn't a list */}\r\n {!!activity.attachments?.length &&\r\n !(\r\n activity.attachmentLayout &&\r\n activity.attachmentLayout.toLowerCase() === 'davilist'\r\n ) && (\r\n <div\r\n className={`rf-w-full rf-min-h-16 rf-overflow-x-hidden rf-overflow-y-auto ${\r\n activity.text && 'rf-pt-4'\r\n }`}\r\n >\r\n <Attachments activity={activity} history={true} />\r\n </div>\r\n )}\r\n </div>\r\n </div>\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default HistoryQA\r\n","import React, { useState } from 'react'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { useLocaleStore, setLocale } from '../Contexts/localeStore'\r\nimport translation from '../../translations/language.json'\r\nimport languageInMotherTongue from '../../translations/languageCodeToMotherTongue.json'\r\nimport { capitalizeFirstLetter } from '../../utils/capitalizeFirstLetter'\r\nimport { SubMenuClosing as Template } from '../Templates'\r\nimport { Radio } from '../Utils'\r\nimport { CurrentSubView } from '../../models/enums'\r\n\r\nconst LanguageChoice = (): JSX.Element => {\r\n const { setCurrentSubView } = useRetorik()\r\n const { locale, supported } = useLocaleStore()\r\n const [currentLanguage, setCurrentLanguage] = useState<string>(locale)\r\n\r\n const handleClose = (): void => {\r\n setCurrentSubView(CurrentSubView.none)\r\n }\r\n\r\n const handleChange = (language: string): void => {\r\n setCurrentLanguage(language)\r\n }\r\n\r\n const handleSelect = (language: string): void => {\r\n setLocale(language)\r\n handleClose()\r\n }\r\n\r\n return (\r\n <Template handleClose={handleClose}>\r\n {/* Title */}\r\n <div className='large:rf-mt-[20vh] large-tactile:rf-mt-0 rf-title-bold-size-auto rf-font-bold'>\r\n {capitalizeFirstLetter(\r\n translation[locale]?.change || translation['fr-FR'].change\r\n )}\r\n </div>\r\n\r\n {/* Subtitle */}\r\n <div className='rf-text-lightgray rf-pt-1 rf-pb-2'>\r\n {capitalizeFirstLetter(\r\n translation[locale]?.select || translation['fr-FR'].select\r\n )}\r\n </div>\r\n\r\n {/* Languages */}\r\n {supported.map((language, key) => {\r\n return (\r\n <div\r\n key={key}\r\n className={`rf-w-full rf-py-4 rf-border-t rf-border-t-menuBorder ${\r\n key === 0 && 'large:rf-border-t-0'\r\n }`}\r\n >\r\n <Radio\r\n title={languageInMotherTongue[language]}\r\n checked={language === currentLanguage}\r\n handleChange={(): void => handleChange(language)}\r\n />\r\n </div>\r\n )\r\n })}\r\n\r\n {/* Validation button */}\r\n <div className='rf-w-full rf-mt-8 rf-flex rf-justify-center'>\r\n <button\r\n className='rf-px-8 rf-py-3 rf-text-secondary rf-font-bold rf-border-2 rf-border-secondary rf-rounded-lg'\r\n onClick={(): void => handleSelect(currentLanguage)}\r\n >\r\n {capitalizeFirstLetter(\r\n translation[locale]?.validate || translation['fr-FR'].validate\r\n )}\r\n </button>\r\n </div>\r\n </Template>\r\n )\r\n}\r\n\r\nexport default LanguageChoice\r\n","{\r\n \"fr-FR\": {\r\n \"change\": \"changer la langue\",\r\n \"select\": \"sélectionnez la langue de votre choix\",\r\n \"validate\": \"valider\"\r\n },\r\n \"en-US\": {\r\n \"change\": \"change the language\",\r\n \"select\": \"select the language you want to use\",\r\n \"validate\": \"validate\"\r\n },\r\n \"es-ES\": {\r\n \"change\": \"change the language\",\r\n \"select\": \"select the language you want to use\",\r\n \"validate\": \"validate\"\r\n },\r\n \"de-DE\": {\r\n \"change\": \"change the language\",\r\n \"select\": \"select the language you want to use\",\r\n \"validate\": \"validate\"\r\n }\r\n}\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React, { useEffect, useState } from 'react'\r\nimport useShowPOI from '../../hooks/useShowPOI'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\n\r\nimport type { POIContentType } from '../../models/attachmentTypes'\r\nimport { getColorFromCategoryId } from '../../utils/getColorFromCategoryId'\r\nimport { getColorWithTransparency } from '../../utils/colorUtils'\r\nimport { Mode, RetorikEvent } from '../../models/enums'\r\n\r\nimport Template from '../Templates/FullScreenRemoteClosing'\r\nimport DetailedTitle from './DetailedAttachment/DetailedTitle'\r\nimport DetailedText from './DetailedAttachment/DetailedText'\r\nimport DetailedMedia from './DetailedAttachment/DetailedMedia'\r\nimport DetailedAddress from './DetailedAttachment/DetailedAddress'\r\nimport DownloadSheet from './DetailedAttachment/DownloadSheet'\r\nimport { setRetorikEvent } from '../Contexts/utilsStore'\r\n\r\nconst AttachmentDetails = (): JSX.Element => {\r\n const askForDetailedPOI = useShowPOI()\r\n const { mode } = useRetorik()\r\n const { themeColors, isMobile } = useView()\r\n const [content, setContent] = useState<POIContentType | undefined>(undefined)\r\n const [color, setColor] = useState<string>(themeColors.secondary)\r\n const [colorWithTransparency, setColorWithTransparency] = useState<string>(\r\n 'rgba(25, 153, 177, 0.5)'\r\n )\r\n\r\n useEffect(() => {\r\n setContent(askForDetailedPOI)\r\n if (askForDetailedPOI) {\r\n setRetorikEvent(RetorikEvent.DetailViewOpen)\r\n }\r\n }, [askForDetailedPOI])\r\n\r\n /**\r\n * On content change :\r\n * - retrieve the color for the category by calling getColorFromCategoryId\r\n * - set color state\r\n */\r\n useEffect(() => {\r\n if (content && content.category?.id) {\r\n setColor(getColorFromCategoryId(content.category.id, themeColors))\r\n }\r\n }, [content])\r\n\r\n /**\r\n * On color props change :\r\n * - set colorWithTransparency state by calling getColorWithTransparency method with a transparency of 0.5\r\n */\r\n useEffect(() => {\r\n color && setColorWithTransparency(getColorWithTransparency(color, 0.5))\r\n }, [color])\r\n\r\n const handleClose = (): void => {\r\n setContent(undefined)\r\n setRetorikEvent(RetorikEvent.DetailViewClose)\r\n }\r\n\r\n return content ? (\r\n <Template\r\n handleClose={handleClose}\r\n className='rf-z-detailedPOI'\r\n closeButtonClassName='rf-z-util'\r\n remoteCloseButtonZIndex='rf-z-detailedPOI'\r\n >\r\n {/* Window containing data */}\r\n <div className='rf-relative rf-flex rf-flex-row vertical:rf-flex-col large:rf-h-full'>\r\n <div className='rf-px-6 large:rf-px-8 rf-w-2/3 vertical:rf-w-full rf-mb-4 large:rf-mb-0 rf-flex rf-flex-col rf-border-r rf-border-r-silver vertical:rf-border-r-0'>\r\n {/* Title + category */}\r\n <DetailedTitle\r\n category={content.category}\r\n title={content.title}\r\n infoBanner={content.infoBanner}\r\n color={color}\r\n customerReviews={content.customerReviews}\r\n favorite={content.favorite}\r\n handleClose={handleClose}\r\n />\r\n <div className='rf-flex rf-flex-col large:rf-flex-row'>\r\n {/* Text + other data */}\r\n <DetailedText\r\n text={content.text}\r\n otherInformations={content.otherInformations}\r\n color={color}\r\n url={content.downloadUri}\r\n />\r\n {/* Media + comment if there is at least one media or comment */}\r\n {((content.media && content.media.length > 0) ||\r\n content.review) && (\r\n <DetailedMedia\r\n media={content.media}\r\n review={content.review}\r\n color={color}\r\n />\r\n )}\r\n </div>\r\n </div>\r\n <DetailedAddress\r\n address={content.address}\r\n phoneNumber={content.phoneNumber}\r\n coordinates={content.coordinates}\r\n color={color}\r\n colorWithTransparency={colorWithTransparency}\r\n customerReviews={content.customerReviews}\r\n url={content.downloadUri}\r\n />\r\n {isMobile && (\r\n <div className={mode === Mode.text ? 'rf-mb-28' : 'rf-mb-16'}>\r\n {content.downloadUri && (\r\n <DownloadSheet\r\n className='rf-justify-center'\r\n url={content.downloadUri}\r\n />\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n </Template>\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default AttachmentDetails\r\n","import { hooks } from 'botframework-webchat'\r\n\r\nconst { useActivities } = hooks\r\n\r\nconst useShowPOI = (): any => {\r\n const [activities] = useActivities()\r\n\r\n if (activities && activities.length > 0) {\r\n const lastActivity = activities.slice(-1)[0] as any\r\n if (\r\n lastActivity.type === 'event' &&\r\n lastActivity.name === 'hospitality.ShowPointOfInterest' &&\r\n lastActivity.value\r\n ) {\r\n return lastActivity.value\r\n }\r\n }\r\n\r\n return undefined\r\n}\r\n\r\nexport default useShowPOI\r\n","interface ColorRGB {\r\n r: number\r\n g: number\r\n b: number\r\n}\r\n\r\nconst getColorWithTransparency = (\r\n color: string,\r\n transparency: number\r\n): string => {\r\n let tempColorObject: ColorRGB | null = null\r\n try {\r\n tempColorObject = color.includes('rgb')\r\n ? rgbToObject(color)\r\n : hexToRgb(color)\r\n } catch (error) {\r\n console.log(error)\r\n }\r\n\r\n if (tempColorObject) {\r\n return `rgba(${tempColorObject.r}, ${tempColorObject.g}, ${tempColorObject.b}, ${transparency})`\r\n }\r\n\r\n return color\r\n}\r\n\r\nconst getColorForLinearGradient = (color: string): string => {\r\n let tempColorObject: ColorRGB | null = null\r\n try {\r\n tempColorObject = color.includes('rgb')\r\n ? rgbToObject(color)\r\n : hexToRgb(color)\r\n } catch (error) {\r\n console.log(error)\r\n }\r\n\r\n if (tempColorObject) {\r\n return `rgba(${tempColorObject.r / 2}, ${tempColorObject.g / 2}, ${\r\n tempColorObject.b / 2\r\n })`\r\n }\r\n\r\n return color\r\n}\r\n\r\nconst rgbToObject = (rgb: string): ColorRGB | null => {\r\n // Replace unwanted characters\r\n rgb = rgb.replace('rgb(', '')\r\n rgb = rgb.replace(')', '')\r\n rgb = rgb.replace(' ', '')\r\n\r\n const stringArray = rgb.split(',')\r\n\r\n return (\r\n {\r\n r: parseInt(stringArray[0], 16),\r\n g: parseInt(stringArray[1], 16),\r\n b: parseInt(stringArray[2], 16)\r\n } || null\r\n )\r\n}\r\n\r\nconst hexToRgb = (hex: string): ColorRGB | null => {\r\n // Remove '#' char if present\r\n if (hex.charAt(0) === '#') {\r\n hex = hex.slice(1)\r\n }\r\n\r\n // Transform if shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\r\n if (hex.length === 3) {\r\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2]\r\n }\r\n\r\n return (\r\n {\r\n r: parseInt(hex.slice(0, 2), 16),\r\n g: parseInt(hex.slice(2, 4), 16),\r\n b: parseInt(hex.slice(4), 16)\r\n } || null\r\n )\r\n}\r\n\r\nexport { getColorWithTransparency, getColorForLinearGradient, hexToRgb }\r\n","import React from 'react'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport translation from '../../../translations/menu.json'\r\nimport CommentsPennant from './CommentsPennant'\r\nimport { FavoriteIcon } from '../../Icons/DetailedPOIIcons'\r\nimport { BackButton } from '../../Menu/Common'\r\n\r\ntype DetailedTitleProps = {\r\n category?: {\r\n id: string\r\n label: string\r\n }\r\n title?: string\r\n infoBanner?: string\r\n color?: string\r\n customerReviews?: number\r\n favorite?: boolean\r\n handleClose: () => void\r\n}\r\n\r\nconst DetailedTitle = ({\r\n category,\r\n title,\r\n infoBanner,\r\n color,\r\n customerReviews,\r\n favorite,\r\n handleClose\r\n}: DetailedTitleProps): JSX.Element => {\r\n const { locale } = useLocaleStore()\r\n const { isMobile } = useView()\r\n\r\n return (\r\n <div className='rf-relative rf-pb-4 rf-flex-col rf-items-start rf-justify-center'>\r\n {/* Category + comments' pennant */}\r\n {customerReviews && (\r\n <CommentsPennant\r\n className='rf-absolute rf-hidden large-vertical:rf-block rf-top-0 rf-right-0'\r\n color={color}\r\n customerReviews={customerReviews}\r\n />\r\n )}\r\n <div className='rf-w-full rf-flex rf-flex-row rf-justify-between rf-items-start'>\r\n {isMobile && (\r\n <BackButton\r\n title={translation[locale]?.back || translation['fr-FR'].back}\r\n handleBack={handleClose}\r\n className='rf-relative rf-mt-4 rf-text-size-auto'\r\n />\r\n )}\r\n <div\r\n className='rf-uppercase rf-w-fit rf-py-2 large:rf-py-3 rf-px-4 rf-bg-black rf-text-primary'\r\n style={{ color: color }}\r\n >\r\n {category?.label || 'category'}\r\n </div>\r\n </div>\r\n\r\n {/* 'Favorite' icon + title */}\r\n <div className='rf-py-6 rf-title-large-bold-size-auto large-vertical:rf-pt-[16.67%] rf-flex rf-flex-row rf-items-center rf-font-bold'>\r\n {favorite && <FavoriteIcon className='rf-h-16 rf-w-20 rf-pr-4' />}\r\n {title || ''}\r\n </div>\r\n\r\n {/* Informations Banner */}\r\n {infoBanner && (\r\n <div\r\n className='rf-py-1 rf-px-4 rf-subtitle-size-auto rf-bg-primary rf-text-truewhite'\r\n style={{ backgroundColor: color }}\r\n >\r\n {infoBanner}\r\n </div>\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default DetailedTitle\r\n","import React, { useState, useEffect, useRef } from 'react'\r\nimport { CommentsPennantIcon } from '../../Icons/DetailedPOIIcons'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport translation from '../../../translations/poi.json'\r\n\r\ntype ComponentsPennantType = {\r\n className?: string\r\n color?: string\r\n customerReviews: number\r\n}\r\n\r\nconst CommentsPennant = ({\r\n className,\r\n color,\r\n customerReviews\r\n}: ComponentsPennantType): JSX.Element => {\r\n const locale = useLocaleStore((state) => state.locale)\r\n const [widthInPx, setWidthInPx] = useState<number>(0)\r\n const pennantRef = useRef<HTMLDivElement>(null)\r\n\r\n useEffect(() => {\r\n if (pennantRef.current) {\r\n setWidthInPx(Math.ceil(pennantRef.current.offsetWidth / 2))\r\n }\r\n }, [pennantRef])\r\n\r\n return (\r\n <div\r\n className={`${className} rf-flex rf-flex-col rf-justify-center rf-text-white`}\r\n ref={pennantRef}\r\n >\r\n <div\r\n className='rf-flex rf-flex-col rf-items-center rf-p-2 rf-bg-primary'\r\n style={{ backgroundColor: color }}\r\n >\r\n <CommentsPennantIcon className='rf-w-12 large:rf-w-14 large-vertical:rf-w-16 rf-pb-2' />\r\n <div className='rf-flex-col rf-text-center rf-text-size-auto rf-uppercase'>\r\n {translation[locale]?.comment ? (\r\n translation[locale]?.comment.split(' ').map((word, index) => {\r\n return <div key={index}>{word}</div>\r\n })\r\n ) : (\r\n <React.Fragment>\r\n <div>customer</div>\r\n <div>reviews</div>\r\n </React.Fragment>\r\n )}\r\n </div>\r\n <div className='rf-font-bold rf-subtitle-size-auto'>\r\n {customerReviews}/10\r\n </div>\r\n </div>\r\n <div\r\n className='rf-w-0 rf-h-0 rf-border-t-0 rf-border-x-primary rf-border-b-transparent'\r\n style={{\r\n borderLeftColor: color,\r\n borderRightColor: color,\r\n borderBottomWidth: (widthInPx * 2) / 3,\r\n borderLeftWidth: widthInPx,\r\n borderRightWidth: widthInPx\r\n }}\r\n />\r\n </div>\r\n )\r\n}\r\n\r\nexport default CommentsPennant\r\n","import React, { useEffect, useRef, useState, useMemo } from 'react'\r\nimport { useRetorik } from '../../Contexts/RetorikContext'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport DownloadSheet from './DownloadSheet'\r\nimport DownloadQR from './DownloadQR'\r\nimport { DeviceType } from '../../../models/enums'\r\n\r\ntype DetailedTextProps = {\r\n text?: string\r\n otherInformations?: Array<{\r\n title: string\r\n content: string | Array<string>\r\n }>\r\n color?: string\r\n url?: string\r\n}\r\n\r\nconst DetailedText = ({\r\n text,\r\n otherInformations,\r\n color,\r\n url\r\n}: DetailedTextProps): JSX.Element => {\r\n const { configuration } = useRetorik()\r\n const { currentDeviceType } = useView()\r\n const textRef = useRef<HTMLDivElement>(null)\r\n const otherInformationsRef = useRef<HTMLDivElement>(null)\r\n const [opacityStyle, setOpacityStyle] = useState<string | undefined>('')\r\n const [otherOpacityStyle, setOtherOpacityStyle] = useState<\r\n string | undefined\r\n >('')\r\n const processedText = useMemo<string>(() => {\r\n if (text) {\r\n return text.replaceAll('\\n', '<br>')\r\n }\r\n\r\n return ''\r\n }, [text])\r\n\r\n /**\r\n * On textRef change :\r\n * - check if textRef.current is defined\r\n * - if scrollHeight > clientHeight, call handleScroll\r\n * - if scrollHeight <= clientHeight, set opacityStyle state to undefined\r\n */\r\n useEffect(() => {\r\n if (textRef.current) {\r\n if (textRef.current.scrollHeight > textRef.current.clientHeight) {\r\n handleScroll()\r\n } else {\r\n setOpacityStyle(undefined)\r\n }\r\n }\r\n }, [textRef])\r\n\r\n useEffect(() => {\r\n if (otherInformationsRef.current) {\r\n if (\r\n otherInformationsRef.current.scrollHeight >\r\n otherInformationsRef.current.clientHeight\r\n ) {\r\n handleOtherScroll()\r\n } else {\r\n setOtherOpacityStyle(undefined)\r\n }\r\n }\r\n }, [otherInformationsRef])\r\n\r\n /**\r\n * On call :\r\n * - check if textRef.current is defined\r\n * - set opacityStyle state depending on scroll height and current scrolling\r\n */\r\n const handleScroll = (): void => {\r\n if (textRef.current) {\r\n const maxScroll =\r\n textRef.current.scrollHeight - textRef.current.clientHeight\r\n const percentage = Math.ceil((textRef.current.scrollTop / maxScroll) * 40)\r\n setOpacityStyle(\r\n `linear-gradient(to bottom, black ${\r\n 60 + percentage\r\n }%, transparent 100%)`\r\n )\r\n }\r\n }\r\n\r\n const handleOtherScroll = (): void => {\r\n if (otherInformationsRef.current) {\r\n const maxScroll =\r\n otherInformationsRef.current.scrollHeight -\r\n otherInformationsRef.current.clientHeight\r\n const percentage = Math.ceil(\r\n (otherInformationsRef.current.scrollTop / maxScroll) * 30\r\n )\r\n setOtherOpacityStyle(\r\n `linear-gradient(to bottom, black ${\r\n 70 + percentage\r\n }%, transparent 100%)`\r\n )\r\n }\r\n }\r\n\r\n return (\r\n <div className='rf-flex rf-flex-col large:rf-pr-4 large:rf-min-w-1/2 rf-items-start'>\r\n {processedText && (\r\n <div\r\n ref={textRef}\r\n className='rf-max-h-[30vh] rf-font-medium rf-overflow-y-scroll rf-mb-4 rf-scroll-pb-8 rf-scrollbar-hidden'\r\n style={{\r\n WebkitMaskImage: opacityStyle\r\n }}\r\n onScroll={handleScroll}\r\n dangerouslySetInnerHTML={{ __html: processedText }}\r\n />\r\n )}\r\n {otherInformations && otherInformations.length > 0 && (\r\n <div\r\n ref={otherInformationsRef}\r\n className='rf-max-h-[18vh] rf-flex rf-flex-col rf-justify-start rf-text-lightgray rf-overflow-y-scroll rf-mb-4 rf-scroll-pb-8 rf-scrollbar-hidden'\r\n style={{\r\n WebkitMaskImage: otherOpacityStyle\r\n }}\r\n onScroll={handleOtherScroll}\r\n >\r\n {otherInformations.map((information, key) => {\r\n const tempContent = Array.isArray(information.content)\r\n ? information.content.join(' | ')\r\n : information.content\r\n const htmlContent = tempContent.replaceAll('\\n', '<br>')\r\n\r\n return (\r\n <React.Fragment key={key}>\r\n <div\r\n className='rf-mt-4'\r\n style={{\r\n color: color || 'rgb(25, 153, 177)'\r\n }}\r\n >\r\n {information.title}\r\n </div>\r\n <div dangerouslySetInnerHTML={{ __html: htmlContent }} />\r\n </React.Fragment>\r\n )\r\n })}\r\n </div>\r\n )}\r\n\r\n {/* Downloading button or Qrcode in landscape mode */}\r\n {currentDeviceType === DeviceType.landscape &&\r\n url &&\r\n (configuration.isUsedOnBorne ? (\r\n <DownloadQR url={url} />\r\n ) : (\r\n <DownloadSheet url={url} />\r\n ))}\r\n </div>\r\n )\r\n}\r\n\r\nexport default DetailedText\r\n","import React from 'react'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport translation from '../../../translations/poi.json'\r\nimport { DownloadIcon } from '../../Icons/Miscellaneous'\r\n\r\ninterface DownloadSheetProps {\r\n className?: string\r\n url: string\r\n}\r\n\r\nconst DownloadSheet = ({ className, url }: DownloadSheetProps): JSX.Element => {\r\n const locale = useLocaleStore((state) => state.locale)\r\n\r\n return (\r\n <div className={`${className} rf-w-full rf-flex`}>\r\n <a\r\n href={url}\r\n className='rf-px-5 rf-py-3 rf-h-fit rf-flex rf-flex-row rf-items-center rf-mt-8 rf-mb-16 large:rf-my-8 rf-border-2 rf-border-black rf-rounded-lg hover:rf-bg-truewhite rf-cursor-pointer rf-font-bold'\r\n >\r\n <DownloadIcon className='rf-h-6 rf-w-6 rf-mr-1' />\r\n {translation[locale]?.download || translation['fr-FR'].download}\r\n </a>\r\n </div>\r\n )\r\n}\r\n\r\nexport default DownloadSheet\r\n","import React, { useEffect, useState } from 'react'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport translation from '../../../translations/poi.json'\r\nimport QRCode from 'qrcode'\r\n\r\ninterface DownloadQRProps {\r\n url: string\r\n}\r\n\r\nconst DownloadQR = ({ url }: DownloadQRProps): JSX.Element => {\r\n const locale = useLocaleStore((state) => state.locale)\r\n const [qrCodeData, setQrCodeData] = useState<string | undefined>(undefined)\r\n\r\n useEffect(() => {\r\n setQrCodeDataAsync()\r\n }, [])\r\n\r\n const setQrCodeDataAsync = async (): Promise<void> => {\r\n const qrCodeString = await QRCode.toDataURL(url)\r\n setQrCodeData(qrCodeString)\r\n }\r\n\r\n return (\r\n <div className='rf-w-full rf-flex rf-flex-col rf-items-start large-vertical:rf-items-center'>\r\n {`${translation[locale]?.download || translation['fr-FR'].download} ${\r\n translation[locale]?.scanQR || translation['fr-FR'].scanQR\r\n }`}\r\n {qrCodeData && (\r\n <div className='large-vertical:rf-mt-4 desktop:rf-scale-75'>\r\n <img src={qrCodeData} alt='QR Code' />\r\n </div>\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default DownloadQR\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React, { useEffect, useMemo, useState } from 'react'\r\nimport type { Review } from '../../../models/attachmentTypes'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport { imageFiles } from '../../../utils/imageFiles'\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\nimport { Carousel } from '../../Utils'\r\nimport { DeviceType } from '../../../models/enums'\r\n\r\ninterface DetailedMediaProps {\r\n media?: [\r\n {\r\n url?: string\r\n title?: string\r\n credits?: string\r\n }\r\n ]\r\n review?: Review\r\n color?: string\r\n}\r\n\r\ninterface Media {\r\n type?: number\r\n url: string\r\n alt?: string\r\n}\r\n\r\nconst DetailedMedia = ({\r\n media,\r\n review,\r\n color\r\n}: DetailedMediaProps): JSX.Element => {\r\n const { currentWidth, isMobile, currentDeviceType } = useView()\r\n const [landscapeImage, setLandscapeImage] = useState<boolean>(false)\r\n const [carouselMedia, setCarouselMedia] = useState<Array<Media>>([])\r\n const maxHeight = useMemo<string | number>(() => {\r\n const remToPx = parseFloat(\r\n getComputedStyle(document.documentElement).fontSize\r\n )\r\n\r\n return isMobile\r\n ? (currentWidth - 2 * remToPx) * (10 / 16)\r\n : currentDeviceType === DeviceType.borne\r\n ? (currentWidth / 2 - 3 * remToPx) * (10 / 16)\r\n : '33vh'\r\n }, [currentDeviceType])\r\n\r\n useEffect(() => {\r\n if (media && media.length > 0) {\r\n let tempMedia: Array<Media> = []\r\n media.forEach((med) => {\r\n med.url &&\r\n (tempMedia = [\r\n ...tempMedia,\r\n { url: med.url, alt: med.title || 'media' }\r\n ])\r\n })\r\n setCarouselMedia(tempMedia)\r\n }\r\n }, [media])\r\n\r\n /**\r\n * On review change :\r\n * - check if the review contains a picture url\r\n * - if so, create an Image with this url, and check if its width is larger than its height\r\n * - set landscapeImage state with the result\r\n */\r\n useEffect(() => {\r\n if (review?.picture?.url) {\r\n const getImageData = async (): Promise<void> => {\r\n const image = new Image()\r\n image.onload = (): void => {\r\n setLandscapeImage(image.width > image.height)\r\n }\r\n image.src = review?.picture?.url || ''\r\n }\r\n getImageData()\r\n }\r\n }, [review])\r\n\r\n return (\r\n <div className='large:rf-min-w-1/2 large:rf-pl-4 rf-flex rf-flex-col rf-items-center'>\r\n {/* Image */}\r\n {carouselMedia && carouselMedia.length > 0 && (\r\n <div className='rf-relative rf-flex rf-justify-center rf-mb-4 rf-overflow-x-hidden'>\r\n <Carousel\r\n medias={carouselMedia}\r\n controls={true}\r\n timer={3000}\r\n color={color}\r\n maxHeight={maxHeight}\r\n />\r\n </div>\r\n )}\r\n\r\n {/* Comment data */}\r\n {review && review.comment && (\r\n <div className='rf-w-full rf-p-4 large:rf-mb-4 rf-flex rf-flex-col rf-gap-4 rf-bg-truewhite rf-rounded-lg rf-shadow-[0_3px_6px_#00000029]'>\r\n {/* Comment */}\r\n <div className='rf-text-lightgray'>{review.comment}</div>\r\n\r\n {/* Author image / name / capacity */}\r\n {(review.picture || review.author) && (\r\n <div className='rf-flex rf-flex-row rf-items-center'>\r\n {review.picture && (\r\n <div className='rf-h-12 rf-w-12 rf-min-w-12 large:rf-h-16 large:rf-w-16 large:rf-min-w-16 large-vertical:rf-h-24 large-vertical:rf-w-24 large-vertical:rf-min-w-24 rf-mr-4 rf-flex rf-items-center rf-rounded-half rf-overflow-hidden'>\r\n <img\r\n src={review.picture.url || imageFiles.noimage}\r\n alt={review.picture.description || 'auteur'}\r\n className={\r\n landscapeImage ? 'rf-h-full rf-max-w-none' : 'rf-w-full'\r\n }\r\n />\r\n </div>\r\n )}\r\n {review.author && (\r\n <div className='rf-flex rf-flex-col rf-items-start'>\r\n <p className='rf-font-bold'>\r\n {capitalizeFirstLetter(review.author.name || '')}\r\n </p>\r\n <p className='rf-italic'>\r\n {capitalizeFirstLetter(review.author.capacity || '')}\r\n </p>\r\n </div>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default DetailedMedia\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React from 'react'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport { useRetorik } from '../../Contexts/RetorikContext'\r\nimport ShowPhoneNumber from './ShowPhoneNumber'\r\nimport CommentsPennant from './CommentsPennant'\r\nimport Map from './Map'\r\nimport type { Coordinates } from '../../../models/attachmentTypes'\r\nimport { DeviceType } from '../../../models/enums'\r\nimport DownloadSheet from './DownloadSheet'\r\nimport DownloadQR from './DownloadQR'\r\n\r\ntype DetailedAddressProps = {\r\n address?: string\r\n phoneNumber?: string\r\n coordinates?: Coordinates\r\n color?: string\r\n colorWithTransparency?: string\r\n customerReviews?: number\r\n url?: string\r\n}\r\n\r\nconst DetailedAddress = ({\r\n address,\r\n phoneNumber,\r\n coordinates,\r\n color,\r\n colorWithTransparency,\r\n customerReviews,\r\n url\r\n}: DetailedAddressProps): JSX.Element => {\r\n const { currentWidth, currentDeviceType, isMobile } = useView()\r\n const { configuration } = useRetorik()\r\n\r\n return (\r\n <div className='rf-relative rf-w-1/3 vertical:rf-w-full large:rf-bg-truewhite rf-flex rf-flex-col large-vertical:rf-flex-row'>\r\n {/* Pennant with comments */}\r\n {customerReviews && (\r\n <CommentsPennant\r\n className='rf-absolute large-vertical:rf-hidden rf-top-0 rf-left-1/2 rf--translate-x-1/2'\r\n color={color}\r\n customerReviews={customerReviews}\r\n />\r\n )}\r\n\r\n {/* Address + phone number */}\r\n <div\r\n className={`rf-px-6 rf-flex rf-flex-col large-vertical:rf-w-1/2 rf-items-center rf-text-center ${\r\n customerReviews\r\n ? currentDeviceType !== DeviceType.borne\r\n ? 'rf-bg-truewhite rf-justify-start'\r\n : 'rf-bg-truewhite rf-justify-center'\r\n : 'rf-justify-center'\r\n }`}\r\n style={{\r\n height: isMobile\r\n ? customerReviews\r\n ? currentWidth\r\n : undefined\r\n : currentDeviceType === DeviceType.landscape\r\n ? coordinates && coordinates.latitude && coordinates.longitude\r\n ? '50%'\r\n : '100%'\r\n : 'calc(50vw - 3rem)'\r\n }}\r\n >\r\n <div\r\n className={\r\n customerReviews && currentDeviceType !== DeviceType.borne\r\n ? currentDeviceType === DeviceType.landscape\r\n ? 'rf-pt-[26vh] rf-pb-12'\r\n : 'rf-pt-11/20 rf-pb-12'\r\n : 'rf-py-12'\r\n }\r\n >\r\n {address || ''}\r\n </div>\r\n {phoneNumber && <ShowPhoneNumber phoneNumber={phoneNumber} />}\r\n\r\n {/* QRcode to download data in borne mode */}\r\n {coordinates &&\r\n coordinates.latitude &&\r\n coordinates.longitude &&\r\n currentDeviceType === DeviceType.borne &&\r\n url &&\r\n (configuration.isUsedOnBorne ? (\r\n <DownloadQR url={url} />\r\n ) : (\r\n <DownloadSheet className='rf-justify-center' url={url} />\r\n ))}\r\n </div>\r\n\r\n {/* Map if coordinates are given / download button in borne mode if no coordinate */}\r\n {coordinates && coordinates.latitude && coordinates.longitude ? (\r\n <div\r\n className='rf-relative large-vertical:rf-w-1/2'\r\n style={{\r\n height: isMobile\r\n ? currentWidth\r\n : currentDeviceType === DeviceType.landscape\r\n ? '50%'\r\n : 'calc(50vw - 3rem)'\r\n }}\r\n >\r\n <Map\r\n latitude={coordinates.latitude}\r\n longitude={coordinates.longitude}\r\n color={color}\r\n colorWithTransparency={colorWithTransparency}\r\n />\r\n </div>\r\n ) : currentDeviceType === DeviceType.borne ? (\r\n <div className='rf-flex rf-justify-center rf-items-center rf-h-[calc(50vw-3rem)] rf-w-1/2'>\r\n {url &&\r\n (configuration.isUsedOnBorne ? (\r\n <DownloadQR url={url} />\r\n ) : (\r\n <DownloadSheet className='rf-justify-center' url={url} />\r\n ))}\r\n </div>\r\n ) : (\r\n <React.Fragment />\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default DetailedAddress\r\n","import React, { useState } from 'react'\r\nimport { PhoneIcon } from '../../Icons/DetailedPOIIcons'\r\n\r\ntype ShowPhoneNumberPorps = {\r\n phoneNumber: string\r\n}\r\n\r\nconst ShowPhoneNumber = ({\r\n phoneNumber\r\n}: ShowPhoneNumberPorps): JSX.Element => {\r\n const [show, setShow] = useState<boolean>(false)\r\n\r\n return (\r\n <button\r\n onClick={(): void => setShow(!show)}\r\n className='rf-px-5 rf-py-3 rf-mb-8 rf-flex rf-flex-row rf-items-center rf-border-2 rf-border-black rf-rounded-lg hover:rf-bg-truewhite rf-font-bold'\r\n >\r\n <PhoneIcon className='rf-h-6 rf-w-6 rf-mr-2' />\r\n {show ? phoneNumber : 'Afficher le numéro'}\r\n </button>\r\n )\r\n}\r\n\r\nexport default ShowPhoneNumber\r\n","import React, { useEffect, useState, useRef } from 'react'\r\nimport { useRetorik } from '../../Contexts/RetorikContext'\r\nimport { MapContainer, TileLayer, Marker, GeoJSON } from 'react-leaflet'\r\nimport Routes from './Routes'\r\nimport MapUser from './MapUser'\r\nimport type { FeatureCollection } from 'geojson'\r\nimport type { GeoJSON as GeoJSONType } from 'leaflet'\r\nimport L from 'leaflet'\r\nimport iconShadow from 'leaflet/dist/images/marker-shadow.png'\r\nimport { imageFiles } from '../../../utils/imageFiles'\r\n\r\ntype MapProps = {\r\n latitude: number\r\n longitude: number\r\n color?: string\r\n colorWithTransparency?: string\r\n}\r\n\r\nconst userIcon = L.icon({\r\n iconUrl: `${imageFiles.mapDeparture}`,\r\n shadowUrl: iconShadow,\r\n iconSize: [32, 41],\r\n iconAnchor: [16, 41]\r\n})\r\n\r\nconst Map = ({\r\n latitude,\r\n longitude,\r\n color,\r\n colorWithTransparency\r\n}: MapProps): JSX.Element => {\r\n const { configuration } = useRetorik()\r\n const [mapLayerData, setMapLayerData] = useState<\r\n FeatureCollection | undefined\r\n >(undefined)\r\n const geoJsonLayer = useRef<GeoJSONType | null>(null)\r\n const coordinates =\r\n configuration.position?.latitude && configuration.position?.longitude\r\n ? [\r\n [configuration.position.longitude, configuration.position.latitude],\r\n [longitude, latitude]\r\n ]\r\n : undefined\r\n\r\n useEffect(() => {\r\n if (geoJsonLayer.current) {\r\n mapLayerData && geoJsonLayer.current.clearLayers().addData(mapLayerData)\r\n }\r\n }, [mapLayerData])\r\n\r\n return (\r\n <React.Fragment>\r\n <MapContainer\r\n center={[latitude, longitude]}\r\n zoom={12}\r\n scrollWheelZoom={false}\r\n style={{ height: '100%', width: '100%', zIndex: 0 }}\r\n >\r\n <TileLayer url='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' />\r\n <Marker position={[latitude, longitude]} />\r\n {configuration.position?.latitude &&\r\n configuration.position?.longitude && (\r\n <Marker\r\n position={[\r\n configuration.position.latitude,\r\n configuration.position.longitude\r\n ]}\r\n icon={userIcon}\r\n />\r\n )}\r\n {mapLayerData && <GeoJSON ref={geoJsonLayer} data={mapLayerData} />}\r\n <MapUser\r\n configurationPosition={[\r\n configuration.position?.latitude || latitude,\r\n configuration.position?.longitude || longitude\r\n ]}\r\n coordinates={[latitude, longitude]}\r\n data={mapLayerData}\r\n />\r\n </MapContainer>\r\n {coordinates && (\r\n <Routes\r\n coordinates={coordinates}\r\n setMapLayerData={setMapLayerData}\r\n color={color}\r\n colorWithTransparency={colorWithTransparency}\r\n />\r\n )}\r\n </React.Fragment>\r\n )\r\n}\r\n\r\nexport default Map\r\n","import React, { useEffect, useState } from 'react'\r\nimport RoutesItem from './RoutesItem'\r\nimport { openRoute, openRouteAPIKey } from '../../../models/constants'\r\nimport type { FeatureCollection } from 'geojson'\r\n\r\ntype RoutesProps = {\r\n coordinates: number[][]\r\n setMapLayerData: (data: FeatureCollection | undefined) => void\r\n color?: string\r\n colorWithTransparency?: string\r\n}\r\n\r\nconst Routes = ({\r\n coordinates,\r\n setMapLayerData,\r\n color,\r\n colorWithTransparency\r\n}: RoutesProps): JSX.Element => {\r\n const [drivingCar, setDrivingCar] = useState<FeatureCollection | undefined>(\r\n undefined\r\n )\r\n const [cyclingRegular, setCyclingRegular] = useState<\r\n FeatureCollection | undefined\r\n >(undefined)\r\n const [footWalking, setFootWalking] = useState<FeatureCollection | undefined>(\r\n undefined\r\n )\r\n const [currentChosen, setCurrentChosen] = useState<string | undefined>(\r\n undefined\r\n )\r\n\r\n /**\r\n * On component mount :\r\n * - call methods to retrieve data from openroute API\r\n */\r\n useEffect(() => {\r\n calculateForProfile('driving-car')\r\n calculateForProfile('cycling-regular')\r\n calculateForProfile('foot-walking')\r\n }, [])\r\n\r\n /**\r\n * On currentChosen state change :\r\n * - switch on currentChosen value to display the associated data on the map\r\n */\r\n useEffect(() => {\r\n switch (currentChosen) {\r\n case 'drivingCar':\r\n drivingCar && drivingCar.features && setMapLayerData(drivingCar)\r\n break\r\n case 'cyclingRegular':\r\n cyclingRegular &&\r\n cyclingRegular.features &&\r\n setMapLayerData(cyclingRegular)\r\n break\r\n case 'footWalking':\r\n footWalking && footWalking.features && setMapLayerData(footWalking)\r\n break\r\n default:\r\n break\r\n }\r\n }, [currentChosen])\r\n\r\n /**\r\n * On drivingCar state change :\r\n * - if driving car data were retrieved and no course has been chosen, set curretnChosen state to 'driving-car'\r\n */\r\n useEffect(() => {\r\n drivingCar && !currentChosen && setCurrentChosen('drivingCar')\r\n }, [drivingCar])\r\n\r\n /**\r\n * On call :\r\n * - call the openroute API to retrieve data for the current course\r\n * @param profile : string\r\n */\r\n const calculateForProfile = async (profile: string): Promise<void> => {\r\n const url = `${openRoute}/${profile}/geojson`\r\n const data = await fetch(url, {\r\n method: 'POST',\r\n headers: {\r\n Authorization: openRouteAPIKey,\r\n 'Content-Type': 'application/json'\r\n },\r\n body: JSON.stringify({ coordinates: coordinates })\r\n })\r\n .then((result) => {\r\n return result.json()\r\n })\r\n .catch(() => {\r\n return null\r\n })\r\n\r\n if (data && !data.error) {\r\n switch (profile) {\r\n case 'driving-car':\r\n setDrivingCar(data)\r\n break\r\n case 'cycling-regular':\r\n setCyclingRegular(data)\r\n break\r\n case 'foot-walking':\r\n setFootWalking(data)\r\n break\r\n default:\r\n break\r\n }\r\n }\r\n }\r\n\r\n return drivingCar || cyclingRegular || footWalking ? (\r\n <div className='rf-absolute rf-bottom-0 rf-left-1/2 -rf-translate-x-1/2 rf-grid rf-grid-cols-routes rf-border rf-border-x-truewhite rf-border-t-0 rf-bg-truewhite rf-text-xs large:rf-text-sm rf-shadow-[0_-5px_10px_silver,-5px_0_10px_silver,5px_0_10px_silver]'>\r\n <RoutesItem\r\n summary={{\r\n type: 'drivingCar',\r\n distance:\r\n drivingCar?.features && drivingCar.features.length > 0\r\n ? drivingCar.features[0].properties?.summary?.distance\r\n : undefined,\r\n duration:\r\n drivingCar?.features && drivingCar.features.length > 0\r\n ? drivingCar.features[0].properties?.summary?.duration\r\n : undefined\r\n }}\r\n chosen={currentChosen === 'drivingCar'}\r\n color={color}\r\n colorWithTransparency={colorWithTransparency}\r\n onClick={setCurrentChosen}\r\n />\r\n <RoutesItem\r\n summary={{\r\n type: 'cyclingRegular',\r\n distance:\r\n cyclingRegular?.features && cyclingRegular.features.length > 0\r\n ? cyclingRegular.features[0].properties?.summary?.distance\r\n : undefined,\r\n duration:\r\n cyclingRegular?.features && cyclingRegular.features.length > 0\r\n ? cyclingRegular.features[0].properties?.summary?.duration\r\n : undefined\r\n }}\r\n // eslint-disable-next-line react/jsx-boolean-value\r\n middle={true}\r\n chosen={currentChosen === 'cyclingRegular'}\r\n color={color}\r\n colorWithTransparency={colorWithTransparency}\r\n onClick={setCurrentChosen}\r\n />\r\n <RoutesItem\r\n summary={{\r\n type: 'footWalking',\r\n distance:\r\n footWalking?.features && footWalking.features.length > 0\r\n ? footWalking.features[0].properties?.summary?.distance\r\n : undefined,\r\n duration:\r\n footWalking?.features && footWalking.features.length > 0\r\n ? footWalking.features[0].properties?.summary?.duration\r\n : undefined\r\n }}\r\n chosen={currentChosen === 'footWalking'}\r\n color={color}\r\n colorWithTransparency={colorWithTransparency}\r\n onClick={setCurrentChosen}\r\n />\r\n </div>\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default Routes\r\n","import React from 'react'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport getDistanceAsString from '../../../utils/getDistanceAsString'\r\nimport getTimeAsString from '../../../utils/getTimeAsString'\r\nimport translation from '../../../translations/poi.json'\r\nimport * as Icons from '../../Icons/MapIcons'\r\n\r\ninterface Summary {\r\n type: string\r\n distance?: number\r\n duration?: number\r\n}\r\n\r\ninterface RoutesItemProps {\r\n summary: Summary\r\n middle?: boolean\r\n chosen?: boolean\r\n color?: string\r\n colorWithTransparency?: string\r\n onClick: (type: string) => void\r\n}\r\n\r\nconst RoutesItem = ({\r\n summary,\r\n middle,\r\n chosen,\r\n color,\r\n colorWithTransparency,\r\n onClick\r\n}: RoutesItemProps): JSX.Element => {\r\n const { locale } = useLocaleStore()\r\n const topBorders = middle\r\n ? 'rf-border rf-border-x-silver rf-border-y-transparent'\r\n : ''\r\n const bottomBorders = middle\r\n ? 'rf-border-x-truewhite'\r\n : 'rf-border-x-transparent'\r\n\r\n return (\r\n <div\r\n className='rf-flex rf-flex-col rf-justify-end hover:rf-cursor-pointer'\r\n onClick={(): void => onClick(summary.type)}\r\n >\r\n <div\r\n className={`rf-h-full rf-pr-2 rf-flex rf-flex-row rf-items-center rf-bg-opacity-50 ${topBorders}`}\r\n style={{\r\n backgroundColor: chosen\r\n ? colorWithTransparency || 'rgba(25, 153, 177, 0.5)'\r\n : undefined\r\n }}\r\n >\r\n <div className='rf-py-2 rf-flex rf-justify-center rf-items-center'>\r\n {summary.type === 'drivingCar' && (\r\n <Icons.DrivingCarIcon className='rf-w-8 rf-mx-2' />\r\n )}\r\n {summary.type === 'cyclingRegular' && (\r\n <Icons.CyclingRegularIcon className='rf-w-8 rf-mx-2' />\r\n )}\r\n {summary.type === 'footWalking' && (\r\n <Icons.FootWalkingIcon className='rf-w-8 rf-ml-1' />\r\n )}\r\n </div>\r\n <div className='rf-flex rf-py-1 rf-flex-col rf-justify-center rf-items-center'>\r\n <div className='rf-whitespace-nowrap'>\r\n {getDistanceAsString(summary?.distance)}\r\n </div>\r\n <div className='rf-whitespace-nowrap'>\r\n {getTimeAsString(summary?.duration)}\r\n </div>\r\n </div>\r\n </div>\r\n <div\r\n className={`rf-py-[0.1rem] rf-text-center rf-uppercase rf-border rf-border-t-0 rf-text-truewhite ${bottomBorders}`}\r\n style={{ backgroundColor: color || '#1999B1' }}\r\n >\r\n {translation[locale]?.route || translation['fr-FR'].route}\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default RoutesItem\r\n","const getDistanceAsString = (distance: number | undefined): string => {\r\n if (typeof distance !== 'number') {\r\n return 'NC'\r\n }\r\n\r\n if (distance <= 0) return '0 m'\r\n if (distance < 1) return `${distance * 100} cm`\r\n if (distance < 1000) return `${distance} m`\r\n if (distance >= 1000) return `${(Math.ceil(distance / 1000) * 10) / 10} km`\r\n\r\n return 'NC'\r\n}\r\n\r\nexport default getDistanceAsString\r\n","const getTimeAsString = (time: number | undefined): string => {\r\n if (typeof time !== 'number') {\r\n return 'NC'\r\n }\r\n\r\n if (time < 1) return 'NC'\r\n if (time < 60) return `${time} s`\r\n if (time < 3600) return `${Math.ceil(time / 60)} min`\r\n if (time === 3600) return `1 H`\r\n if (time > 3600) {\r\n const hours = Math.floor(time / 3600)\r\n return `${hours} H ${Math.ceil((time - hours * 3600) / 60)} min`\r\n }\r\n\r\n return 'NC'\r\n}\r\n\r\nexport default getTimeAsString\r\n","import CyclingRegularIcon from './CyclingRegularIcon'\r\nimport DrivingCarIcon from './DrivingCarIcon'\r\nimport FootWalkingIcon from './FootWalkingIcon'\r\n\r\nexport { CyclingRegularIcon, DrivingCarIcon, FootWalkingIcon }\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst CyclingRegularIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='0 0 34.168 29.135'\r\n className={className || 'rf-w-8 rf-h-8'}\r\n >\r\n <g transform='translate(0.5 -1.484)'>\r\n <path\r\n d='M20.5,6.789a2.645,2.645,0,1,0-2.645-2.645A2.653,2.653,0,0,0,20.5,6.789Zm-13.885,8.6a6.612,6.612,0,1,0,0,13.224,6.612,6.612,0,1,0,0-13.224Zm0,11.24a4.628,4.628,0,1,1,0-9.257,4.628,4.628,0,1,1,0,9.257ZM14.282,13.4l3.174-3.174,1.058,1.058a9.264,9.264,0,0,0,6.744,2.777V11.418A6.57,6.57,0,0,1,20.5,9.434L17.984,6.922a3.242,3.242,0,0,0-2.116-.793,2.219,2.219,0,0,0-1.851.793l-3.7,3.7a2.611,2.611,0,0,0-.793,1.851,2.219,2.219,0,0,0,.793,1.851l4.232,3.7v6.612h2.645v-8.2Zm10.843,1.984A6.612,6.612,0,1,0,31.737,22,6.548,6.548,0,0,0,25.125,15.385Zm0,11.24A4.628,4.628,0,1,1,29.753,22,4.685,4.685,0,0,1,25.125,26.625Z'\r\n transform='translate(0 0.484)'\r\n fill={color || '#fff'}\r\n stroke='#000'\r\n strokeLinecap='round'\r\n strokeLinejoin='round'\r\n strokeWidth='1'\r\n />\r\n </g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport default CyclingRegularIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst DrivingCarIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='0 0 34.168 29.135'\r\n className={className || 'rf-w-8 rf-h-8'}\r\n >\r\n <path\r\n id='car'\r\n d='M32.385,71.254H28.507L27.43,68.559A7.217,7.217,0,0,0,20.7,64H12.471a7.219,7.219,0,0,0-6.735,4.559L4.658,71.254H.781a.777.777,0,0,0-.754.966l.389,1.554a.777.777,0,0,0,.754.589h1.3a4.116,4.116,0,0,0-1.43,3.109V80.58A4.111,4.111,0,0,0,2.076,83.3v3.5a2.073,2.073,0,0,0,2.072,2.072H6.221A2.073,2.073,0,0,0,8.293,86.8V84.725h16.58V86.8a2.073,2.073,0,0,0,2.072,2.072h2.072A2.073,2.073,0,0,0,31.09,86.8V83.3a4.109,4.109,0,0,0,1.036-2.716V77.471A4.118,4.118,0,0,0,30.7,74.362H32a.777.777,0,0,0,.754-.589l.389-1.554a.778.778,0,0,0-.754-.966ZM9.584,70.1a3.109,3.109,0,0,1,2.887-1.954H20.7A3.109,3.109,0,0,1,23.582,70.1l1.291,3.227H8.293ZM6.221,80.567a2.066,2.066,0,1,1,0-4.132,3.987,3.987,0,0,1,3.109,3.1c0,1.24-1.865,1.033-3.109,1.033Zm20.725,0c-1.243,0-3.109.207-3.109-1.033a3.987,3.987,0,0,1,3.109-3.1,2.066,2.066,0,1,1,0,4.132Z'\r\n transform='translate(0.501 -63.5)'\r\n fill={color || '#fff'}\r\n stroke='#000'\r\n strokeWidth='1'\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default DrivingCarIcon\r\n","import React from 'react'\r\nimport type { IconDefaultProps } from '../../../models/types'\r\n\r\nconst FootWalkingIcon = ({\r\n className,\r\n color\r\n}: IconDefaultProps): JSX.Element => {\r\n return (\r\n <svg\r\n xmlns='http://www.w3.org/2000/svg'\r\n viewBox='-6 0 34.168 29.135'\r\n className={className || 'rf-w-8 rf-h-8'}\r\n >\r\n <path\r\n d='M11.4,5.249A2.625,2.625,0,1,0,8.772,2.625,2.625,2.625,0,0,0,11.4,5.249ZM16.564,13.4l-1.274-.645-.53-1.608A5.962,5.962,0,0,0,9.171,7c-1.968-.005-3.057.552-5.1,1.378A5.216,5.216,0,0,0,1.352,10.9l-.366.744a1.755,1.755,0,0,0,.776,2.346,1.726,1.726,0,0,0,2.324-.782l.366-.744a1.738,1.738,0,0,1,.9-.842l1.465-.591-.831,3.319A3.512,3.512,0,0,0,6.8,17.568l3.275,3.576a3.529,3.529,0,0,1,.815,1.515l1,4.008a1.75,1.75,0,0,0,3.4-.848l-1.214-4.866a3.5,3.5,0,0,0-.815-1.515l-2.488-2.718.94-3.756.3.9a3.487,3.487,0,0,0,1.733,2.023l1.274.645a1.726,1.726,0,0,0,2.324-.782,1.77,1.77,0,0,0-.782-2.351ZM4.048,21.1a3.393,3.393,0,0,1-.776,1.176L.538,25.01a1.75,1.75,0,1,0,2.472,2.477l3.248-3.248a3.554,3.554,0,0,0,.776-1.176l.738-1.848c-3.024-3.3-2.116-2.286-2.592-2.936L4.048,21.1Z'\r\n transform='translate(0.612 0.5)'\r\n fill={color || '#fff'}\r\n stroke='#000'\r\n strokeWidth='1'\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default FootWalkingIcon\r\n","import React, { useEffect } from 'react'\r\nimport { useMap } from 'react-leaflet'\r\nimport type { LatLngTuple } from 'leaflet'\r\nimport type { FeatureCollection } from 'geojson'\r\n\r\ntype MapUserProps = {\r\n configurationPosition: LatLngTuple\r\n coordinates: LatLngTuple\r\n data: FeatureCollection | undefined\r\n}\r\n\r\nconst MapUser = ({\r\n configurationPosition,\r\n coordinates,\r\n data\r\n}: MapUserProps): JSX.Element => {\r\n const map = useMap()\r\n\r\n useEffect(() => {\r\n if (configurationPosition !== coordinates) {\r\n const coords1: LatLngTuple = [...configurationPosition]\r\n const coords2: LatLngTuple = [...coordinates]\r\n if (configurationPosition[0] > coordinates[0]) {\r\n coords2[0] -= (configurationPosition[0] - coordinates[0]) / 2\r\n } else {\r\n coords1[0] -= (coordinates[0] - configurationPosition[0]) / 2\r\n }\r\n\r\n map.flyToBounds([coords1, coords2])\r\n } else {\r\n map.flyToBounds([configurationPosition, coordinates])\r\n }\r\n }, [data])\r\n\r\n return <React.Fragment />\r\n}\r\n\r\nexport default MapUser\r\n","import React, { useEffect, useState } from 'react'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport { useRetorik } from '../../Contexts/RetorikContext'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport { setFullScreenImage } from '../../Contexts/utilsStore'\r\nimport { Mode } from '../../../models/enums'\r\nimport translation from '../../../translations/menu.json'\r\nimport useFullscreenImage from '../../../hooks/useFullscreenImage'\r\nimport Template from '../../Templates/FullScreenRemoteClosing'\r\n\r\nconst FullScreenImage = (): JSX.Element => {\r\n const locale = useLocaleStore((state) => state.locale)\r\n const fullScreenImage = useFullscreenImage()\r\n const { mode } = useRetorik()\r\n const { isMobile } = useView()\r\n const [content, setContent] = useState<string | undefined>()\r\n\r\n useEffect(() => {\r\n setContent(fullScreenImage)\r\n }, [fullScreenImage])\r\n\r\n const handleClose = (): void => {\r\n setFullScreenImage(undefined)\r\n }\r\n\r\n return content ? (\r\n <Template\r\n handleClose={handleClose}\r\n mobileReturnTitle={\r\n translation[locale]?.backconversation ||\r\n translation['fr-FR'].backconversation\r\n }\r\n >\r\n <div\r\n className={`rf-h-full rf-w-full ${\r\n isMobile ? (mode === Mode.text ? 'rf-mb-28' : 'rf-mb-16') : 'rf-pt-12'\r\n } rf-px-8 rf-pb-12 rf-flex rf-justify-center rf-items-center`}\r\n >\r\n <img className='rf-max-h-full rf-max-w-full' src={content} />\r\n </div>\r\n </Template>\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default FullScreenImage\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React from 'react'\r\nimport WeatherContent from '@davi-ai/retorik-weather'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport { AvailableViews, CurrentSubView, Depth } from '../../models/enums'\r\nimport { FullScreen, FullScreenMobile } from '../Templates'\r\nimport MobileTopContainer from '../Utils/SubView/MobileTopContainer'\r\nimport LargeIconAndTitle from '../Utils/SubView/LargeIconAndTitle'\r\nimport AbsoluteLargeClosingButton from '../Utils/AbsoluteLargeClosingButton'\r\n\r\ninterface WeatherProps {\r\n handleClose?: () => void\r\n}\r\n\r\nconst Weather = ({ handleClose }: WeatherProps): JSX.Element => {\r\n const { locale } = useLocaleStore()\r\n const { configuration, setCurrentSubView } = useRetorik()\r\n const { currentDeviceType, isMobile } = useView()\r\n\r\n /**\r\n * On call :\r\n * - set RetorikContext's displayWeather state to false\r\n */\r\n const handleBack = (): void => {\r\n handleClose ? handleClose() : setCurrentSubView(CurrentSubView.none)\r\n }\r\n\r\n return isMobile ? (\r\n <FullScreenMobile depth={Depth.dropdown} background='#FFFFFF'>\r\n {/* Top container : back button + weather icon + title */}\r\n <MobileTopContainer\r\n subView={AvailableViews.weather}\r\n className='rf-border-b rf-border-b-menuBorder'\r\n handleBack={handleBack}\r\n />\r\n\r\n {/* Weather data */}\r\n <WeatherContent\r\n locale={locale}\r\n deviceType={currentDeviceType}\r\n position={{\r\n latitude: configuration.position?.latitude || 0,\r\n longitude: configuration.position?.longitude || 0\r\n }}\r\n />\r\n </FullScreenMobile>\r\n ) : (\r\n <FullScreen\r\n depth={Depth.dropdown}\r\n background='linear-gradient(to right bottom, #F2F8F8FC , #F2E1E2E8)'\r\n >\r\n <div className='rf-h-full rf-w-full rf-flex rf-flex-col rf-items-center'>\r\n {/* Weather icon + text */}\r\n <LargeIconAndTitle subView={AvailableViews.weather} />\r\n\r\n {/* Weather data */}\r\n <WeatherContent\r\n locale={locale}\r\n deviceType={currentDeviceType}\r\n position={{\r\n latitude: configuration.position?.latitude || 0,\r\n longitude: configuration.position?.longitude || 0\r\n }}\r\n />\r\n </div>\r\n\r\n {/* Closing button */}\r\n <AbsoluteLargeClosingButton\r\n dashboardVisible={true}\r\n onClick={handleBack}\r\n />\r\n </FullScreen>\r\n )\r\n}\r\n\r\nexport default Weather\r\n","import React from 'react'\r\nimport translation from '../../../translations/menu.json'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport { BackButton } from '../../Menu/Common'\r\nimport MobileIconAndTitle from './MobileIconAndTitle'\r\n\r\ninterface MobileTopContainerProps {\r\n subView?: number\r\n className?: string\r\n handleBack: () => void\r\n}\r\n\r\nconst MobileTopContainer = ({\r\n subView,\r\n className,\r\n handleBack\r\n}: MobileTopContainerProps): JSX.Element => {\r\n const { locale } = useLocaleStore()\r\n\r\n return (\r\n <React.Fragment>\r\n <BackButton\r\n title={translation[locale]?.back || translation['fr-FR'].back}\r\n className='rf-text-sm'\r\n handleBack={handleBack}\r\n />\r\n {subView && (\r\n <MobileIconAndTitle subView={subView} className={className} />\r\n )}\r\n </React.Fragment>\r\n )\r\n}\r\n\r\nexport default MobileTopContainer\r\n","import React from 'react'\r\nimport { AvailableViews } from '../../../models/enums'\r\nimport translation from '../../../translations/views.json'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport * as Icons from '../../Icons/ViewIcons'\r\n\r\ninterface MobileIconAndTitleProps {\r\n subView: number\r\n className?: string\r\n}\r\n\r\nconst iconClassname = 'rf-h-8 rf-w-8'\r\n\r\nconst MobileIconAndTitle = ({\r\n subView,\r\n className\r\n}: MobileIconAndTitleProps): JSX.Element => {\r\n const { locale } = useLocaleStore()\r\n\r\n return (\r\n <div\r\n className={`large:rf-hidden rf-py-2 rf-flex rf-flex-row rf-items-end ${className}`}\r\n >\r\n {/* Icon */}\r\n {subView === AvailableViews.weather ? (\r\n <Icons.WeatherIcon className={iconClassname} />\r\n ) : subView === AvailableViews.emergency ? (\r\n <Icons.EmergencyIcon className={iconClassname} />\r\n ) : (\r\n <React.Fragment />\r\n )}\r\n {/* Title */}\r\n <div className='rf-ml-2 rf-capitalize rf-subtitle-size-auto'>\r\n {translation[locale]?.[subView] || translation['fr-FR'][subView]}\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default MobileIconAndTitle\r\n","import React from 'react'\r\nimport { AvailableViews } from '../../../models/enums'\r\nimport translation from '../../../translations/views.json'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport * as Icons from '../../Icons/ViewIcons'\r\n\r\ninterface LargeIconAndTitleProps {\r\n subView: number\r\n className?: string\r\n}\r\n\r\nconst iconClassname =\r\n 'rf-h-16 rf-w-16 large-vertical:rf-h-24 large-vertical:rf-w-24'\r\n\r\nconst LargeIconAndTitle = ({\r\n subView,\r\n className\r\n}: LargeIconAndTitleProps): JSX.Element => {\r\n const { locale } = useLocaleStore()\r\n\r\n return (\r\n <div\r\n className={`rf-hidden large:rf-flex rf-w-full rf-pt-4 large-vertical:rf-pt-8 rf-pl-4 large-vertical:rf-pl-0 rf-flex-row rf-justify-start large-vertical:rf-justify-center rf-items-center ${className}`}\r\n >\r\n {/* Icon */}\r\n {subView === AvailableViews.weather ? (\r\n <Icons.WeatherIcon className={iconClassname} />\r\n ) : subView === AvailableViews.emergency ? (\r\n <Icons.EmergencyIcon className={iconClassname} />\r\n ) : (\r\n <React.Fragment />\r\n )}\r\n {/* Title */}\r\n <div className='rf-ml-2 rf-uppercase rf-text-[#575F6B] rf-subtitle-size-auto'>\r\n {translation[locale]?.[subView] || translation['fr-FR'][subView]}\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default LargeIconAndTitle\r\n","import React, { useMemo } from 'react'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { CurrentSubView, Depth } from '../../models/enums'\r\nimport { capitalizeFirstLetter } from '../../utils/capitalizeFirstLetter'\r\nimport { FullScreen } from '../Templates'\r\nimport translation from '../../translations/menu.json'\r\nimport { BackButton } from '../Menu/Common'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport AbsoluteLargeClosingButton from '../Utils/AbsoluteLargeClosingButton'\r\n\r\nconst CustomView = ({\r\n customView,\r\n title,\r\n icon,\r\n externalComponents,\r\n display,\r\n setDisplayCustomComponent\r\n}): JSX.Element => {\r\n const { locale } = useLocaleStore()\r\n const { isMobile, displayControls } = useView()\r\n const { setCurrentSubView } = useRetorik()\r\n /* const [componentToDisplay, setComponentToDisplay] = useState<JSX.Element>(\r\n <></>\r\n ) */\r\n\r\n const handleBack = (): void => {\r\n setCurrentSubView(CurrentSubView.none)\r\n setDisplayCustomComponent(false)\r\n }\r\n const iconClassname =\r\n 'rf-h-16 rf-w-16 large-vertical:rf-h-24 large-vertical:rf-w-24'\r\n const iconClassnameMobile = 'rf-h-8 rf-w-8'\r\n\r\n const componentToDisplay: JSX.Element = useMemo(() => {\r\n if (customView && customView.length > 0) {\r\n if (externalComponents) {\r\n const component = (\r\n externalComponents as Array<{ name: string; component: JSX.Element }>\r\n )?.find((e) => e.name === customView)\r\n if (component && component.component) {\r\n console.log(component.component)\r\n return component.component\r\n }\r\n }\r\n }\r\n return <></>\r\n }, [customView])\r\n\r\n return (\r\n <FullScreen\r\n className={`${!display && 'rf-hidden'} ${\r\n isMobile && displayControls ? 'rf-mb-12' : 'rf-mb-0'\r\n }`}\r\n depth={Depth.modal}\r\n background='#FFFFFF'\r\n >\r\n {/* title */}\r\n <div className='rf-absolute rf-z-util rf-w-full rf-top-0 rf-left-0'>\r\n {/* Mobile display */}\r\n <div className='large:rf-hidden rf-p-4 rf-flex rf-flex-col'>\r\n <BackButton\r\n title={translation[locale]?.back || translation['fr-FR'].back}\r\n className='rf-text-sm'\r\n handleBack={handleBack}\r\n />\r\n <div className='large:rf-hidden rf-py-2 rf-flex rf-flex-row rf-items-end undefined'>\r\n {icon ? <div className={iconClassnameMobile}>{icon} </div> : <></>}\r\n <div className='rf-ml-2 rf-capitalize rf-subtitle-size-auto'>\r\n {title ? capitalizeFirstLetter(title) : <></>}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div className='rf-hidden large:rf-flex rf-w-full rf-pt-4 large-vertical:rf-pt-8 rf-pl-4 large-vertical:rf-pl-0 rf-flex-row rf-justify-start large-vertical:rf-justify-center rf-items-center'>\r\n {icon ? <div className={iconClassname}>{icon} </div> : <></>}\r\n <div className='rf-ml-2 rf-uppercase rf-subtitle-size-auto'>\r\n {title ? capitalizeFirstLetter(title) : <></>}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n {componentToDisplay}\r\n\r\n {/* Closing button in large mode */}\r\n <AbsoluteLargeClosingButton dashboardVisible onClick={handleBack} />\r\n </FullScreen>\r\n )\r\n}\r\n\r\nexport default CustomView\r\n","import { hooks } from 'botframework-webchat'\r\n\r\nconst { useActivities } = hooks\r\n\r\nconst useShowMap = (): boolean => {\r\n const [activities] = useActivities()\r\n if (activities && activities.length > 0) {\r\n const lastActivity = activities.slice(-1)[0] as any\r\n if (\r\n lastActivity.type === 'event' &&\r\n lastActivity.name === 'Hospitality.ShowMap'\r\n ) {\r\n return true\r\n }\r\n }\r\n\r\n return false\r\n}\r\n\r\nexport default useShowMap\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React from 'react'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport { CurrentSubView, Depth } from '../../models/enums'\r\nimport { FullScreen, SubMenuClosing } from '../Templates'\r\nimport AbsoluteLargeClosingButton from '../Utils/AbsoluteLargeClosingButton'\r\nimport { EmergencyContent } from './EmergencyContent'\r\n\r\ninterface EmergencyProps {\r\n handleClose?: () => void\r\n}\r\n\r\nconst Emergency = ({ handleClose }: EmergencyProps): JSX.Element => {\r\n const { setCurrentSubView } = useRetorik()\r\n const { isMobile } = useView()\r\n\r\n const handleBack = (): void => {\r\n handleClose ? handleClose() : setCurrentSubView(CurrentSubView.none)\r\n }\r\n\r\n return isMobile ? (\r\n <SubMenuClosing\r\n handleClose={handleBack}\r\n backIsConversation={false}\r\n className='rf-height-fill-available -rf-mb-4'\r\n >\r\n {/* Emergency data */}\r\n <EmergencyContent />\r\n </SubMenuClosing>\r\n ) : (\r\n <FullScreen\r\n depth={Depth.dropdown}\r\n background='linear-gradient(to right bottom, #F2F8F8FC , #F2E1E2E8)'\r\n >\r\n <div className='rf-h-full rf-w-full rf-flex rf-flex-col rf-items-center rf-justify-center rf-gap-12'>\r\n {/* Emergency data */}\r\n <EmergencyContent />\r\n </div>\r\n\r\n {/* Closing button */}\r\n <AbsoluteLargeClosingButton\r\n dashboardVisible={true}\r\n onClick={handleBack}\r\n />\r\n </FullScreen>\r\n )\r\n}\r\n\r\nexport default Emergency\r\n","import React, { useEffect, useState } from 'react'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { fetchEmergencyData } from '../../utils/fetchEmergencyData'\r\nimport { EmergencyTypes } from '../../models/emergencyTypes'\r\nimport * as Icons from '../Icons/ViewIcons'\r\nimport translation from '../../translations/views.json'\r\nimport emergencyTranslation from '../../translations/emergency.json'\r\nimport { AvailableViews } from '../../models/enums'\r\nimport Animation2 from '../Loader/Animation2'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\n\r\nconst EmergencyContent = (): JSX.Element => {\r\n const locale = useLocaleStore((state) => state.locale)\r\n const { addressData } = useRetorik()\r\n const { isMobile } = useView()\r\n const [municipalPoliceNumber, setMunicipalPoliceNumber] = useState<string>('')\r\n const [localHospitalName, setLocalHospitalName] = useState<string>('')\r\n const [localHospitalNumber, setLocalHospitalNumber] = useState<string>('')\r\n const [poisonControlNumber, setPoisonControlNumber] = useState<string>('')\r\n const [loading, setLoading] = useState<boolean>(true)\r\n const subView = AvailableViews.emergency\r\n\r\n useEffect(() => {\r\n const getData = async (): Promise<void> => {\r\n const data: EmergencyTypes = await fetchEmergencyData(addressData)\r\n if (data) {\r\n setMunicipalPoliceNumber(data.municipalPoliceNumber)\r\n setLocalHospitalName(data.localHospitalName)\r\n setLocalHospitalNumber(data.localHospitalNumber)\r\n setPoisonControlNumber(data.poisonControlNumber)\r\n }\r\n setLoading(false)\r\n }\r\n getData()\r\n }, [addressData])\r\n\r\n return (\r\n <>\r\n <div\r\n className={`rf-flex rf-flex-col rf-items-center ${\r\n isMobile\r\n ? 'rf-justify-center rf-gap-2'\r\n : 'rf-justify-end rf-flex-[2_1_0%] rf-gap-9'\r\n }`}\r\n >\r\n <Icons.EmergencyIcon className='rf-h-9 rf-w-9 large:rf-h-16 large:rf-w-16' />\r\n <h3 className='rf-text-verylarge-size-auto rf-font-bold rf-capitalize-first rf-text-center'>\r\n {translation[locale]?.[subView] || translation['fr-FR'][subView]}\r\n </h3>\r\n </div>\r\n <div\r\n className='rf-w-full rf-flex rf-flex-col rf-items-center rf-flex-[4_1_0%] rf-justify-evenly'\r\n style={{\r\n background: isMobile\r\n ? 'transparent'\r\n : 'transparent linear-gradient(291deg, #F2F3F6 0%, #E5E6EC 100%) 0% 0% no-repeat padding-box',\r\n boxShadow: isMobile\r\n ? ''\r\n : '#ffff -3px -3px 16px, rgb(0 0 0 / 25%) 0px 2px 10px 0px'\r\n }}\r\n >\r\n {loading ? (\r\n <>\r\n <div className='rf-w-6 rf-h-6 rf-mb-16'>\r\n <Animation2\r\n color='gray'\r\n loaderColor='#1999b1'\r\n backgroundColor='transparent'\r\n />\r\n </div>\r\n </>\r\n ) : (\r\n <>\r\n <div\r\n className={`rf-w-full rf-grid ${\r\n isMobile\r\n ? 'rf-grid-cols-2 rf-gap-8 rf-mt-10 rf-mb-8'\r\n : 'rf-grid-cols-4 rf-divide-x'\r\n } `}\r\n style={{ padding: isMobile ? '' : '0 10%' }}\r\n >\r\n <div className='rf-flex rf-flex-col rf-items-center rf-gap-2'>\r\n <p className='rf-text-xl rf-font-bold rf-uppercase'>\r\n {emergencyTranslation[locale]?.samu ||\r\n emergencyTranslation['fr-FR'].samu}\r\n </p>\r\n <p className='rf-text-5xl large:rf-text-6xl rf-font-bold'>15</p>\r\n </div>\r\n <div\r\n className={`rf-flex rf-flex-col rf-items-center ${\r\n isMobile ? '' : 'rf-border-l rf-border-[#C7C6C6]'\r\n } rf-gap-2`}\r\n >\r\n <p className='rf-text-xl rf-font-bold rf-uppercase'>\r\n {emergencyTranslation[locale]?.police ||\r\n emergencyTranslation['fr-FR'].police}\r\n </p>\r\n <p className='rf-text-5xl large:rf-text-6xl rf-font-bold'>17</p>\r\n </div>\r\n <div\r\n className={`rf-flex rf-flex-col rf-items-center ${\r\n isMobile ? '' : 'rf-border-l rf-border-[#C7C6C6]'\r\n } rf-gap-2`}\r\n >\r\n <p className='rf-text-xl rf-font-bold rf-uppercase'>\r\n {emergencyTranslation[locale]?.firefighter ||\r\n emergencyTranslation['fr-FR'].firefighter}\r\n </p>\r\n <p className='rf-text-5xl large:rf-text-6xl rf-font-bold'>18</p>\r\n </div>\r\n <div\r\n className={`rf-flex rf-flex-col rf-items-center ${\r\n isMobile ? '' : 'rf-border-l rf-border-[#C7C6C6]'\r\n } rf-gap-2`}\r\n >\r\n <p className='rf-text-xl rf-font-bold rf-uppercase'>\r\n {emergencyTranslation[locale]?.general ||\r\n emergencyTranslation['fr-FR'].general}\r\n </p>\r\n <p className='rf-text-5xl large:rf-text-6xl rf-font-bold'>\r\n 112\r\n </p>\r\n </div>\r\n </div>\r\n <div\r\n className={`rf-flex rf-items-start ${\r\n isMobile ? 'rf-flex-col' : 'rf-gap-12'\r\n } `}\r\n >\r\n <div>\r\n {municipalPoliceNumber && municipalPoliceNumber.length > 0 && (\r\n <p className='rf-text-xl rf-py-2'>\r\n Police municipale :{' '}\r\n <span className='rf-font-bold'>\r\n {municipalPoliceNumber}\r\n </span>\r\n </p>\r\n )}\r\n <p className='rf-text-xl rf-py-2'>\r\n Sans abris (appel gratuit) :{' '}\r\n <span className='rf-font-bold'>115</span>\r\n </p>\r\n <p className='rf-text-xl rf-py-2'>\r\n Urgences européennes :{' '}\r\n <span className='rf-font-bold'>118</span>\r\n </p>\r\n </div>\r\n <div>\r\n {localHospitalName && localHospitalName.length > 0 && (\r\n <p className='rf-text-xl rf-py-2'>\r\n Hôpital {localHospitalName} :{' '}\r\n <span className='rf-font-bold'>{localHospitalNumber}</span>\r\n </p>\r\n )}\r\n {poisonControlNumber && poisonControlNumber.length > 0 && (\r\n <p className='rf-text-xl rf-py-2'>\r\n Centre anti-poison :{' '}\r\n <span className='rf-font-bold'>{poisonControlNumber}</span>\r\n </p>\r\n )}\r\n </div>\r\n </div>\r\n </>\r\n )}\r\n </div>\r\n {!isMobile && <div className='rf-flex-1' />}\r\n </>\r\n )\r\n}\r\n\r\nexport { EmergencyContent }\r\n","import {\r\n hospitalityApiAddress,\r\n webchatTokenRetrievalAddress\r\n} from '../models/constants'\r\nimport { EmergencyTypes } from '../models/emergencyTypes'\r\nimport type { AddressData } from '../models/types'\r\nimport processPrefix from './studioRetorikAddressFromPrefix'\r\n\r\nasync function fetchEmergencyData(data: AddressData): Promise<EmergencyTypes> {\r\n // baseURI is used for retrocompatibility\r\n let fullAddress = ''\r\n if (data.baseURI) {\r\n fullAddress = data.baseURI\r\n } else {\r\n fullAddress = `${processPrefix(data.prefix)}/${data.tenant}`\r\n }\r\n if (fullAddress.indexOf(`/${webchatTokenRetrievalAddress}`) > -1) {\r\n fullAddress = fullAddress.replace(`/${webchatTokenRetrievalAddress}`, '')\r\n }\r\n fullAddress += `/${hospitalityApiAddress}`\r\n const res = await fetch(fullAddress)\r\n const token = await res.json()\r\n\r\n return token\r\n}\r\n\r\nexport { fetchEmergencyData }\r\n","{\r\n \"fr-FR\": {\r\n \"samu\": \"samu\",\r\n \"police\": \"police\",\r\n \"firefighter\": \"pompiers\",\r\n \"general\": \"général\"\r\n },\r\n \"en-US\": {\r\n \"samu\": \"maeu\",\r\n \"police\": \"police\",\r\n \"firefighter\": \"firefighters\",\r\n \"general\": \"general\"\r\n },\r\n \"es-ES\": {\r\n \"samu\": \"samu\",\r\n \"police\": \"policía\",\r\n \"firefighter\": \"bomberos\",\r\n \"general\": \"general\"\r\n },\r\n \"de-DE\": {\r\n \"samu\": \"samu\",\r\n \"police\": \"polizei\",\r\n \"firefighter\": \"feuerwehrleute\",\r\n \"general\": \"allgemein\"\r\n }\r\n}\r\n","import React from 'react'\r\n\r\nconst Animation2 = ({ color, loaderColor, backgroundColor }): JSX.Element => {\r\n return (\r\n <svg\r\n aria-hidden='true'\r\n className='rf-inline rf-w-8 rf-h-8 rf-mr-2 rf-animate-spin '\r\n viewBox='0 0 100 101'\r\n fill='none'\r\n xmlns='http://www.w3.org/2000/svg'\r\n style={{ backgroundColor: backgroundColor }}\r\n >\r\n <path\r\n d='M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z'\r\n fill='currentColor'\r\n style={{ fill: color }}\r\n />\r\n <path\r\n d='M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z'\r\n fill='currentFill'\r\n style={{ fill: loaderColor }}\r\n />\r\n </svg>\r\n )\r\n}\r\n\r\nexport default Animation2\r\n","import { hooks } from 'botframework-webchat'\r\n\r\nconst { useActivities } = hooks\r\n\r\nconst useShowEmergency = (): boolean => {\r\n const [activities] = useActivities()\r\n if (activities && activities.length > 0) {\r\n const lastActivity = activities.slice(-1)[0] as any\r\n if (\r\n lastActivity.type === 'event' &&\r\n lastActivity.name === 'Hospitality.ShowEmergency'\r\n ) {\r\n return true\r\n }\r\n }\r\n\r\n return false\r\n}\r\n\r\nexport default useShowEmergency\r\n","import React, { useEffect, useMemo, useRef, useState } from 'react'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport { useWidgetStore } from '../Contexts/widgetStore'\r\nimport { useUtilsStore, setListClosed } from '../Contexts/utilsStore'\r\nimport useActivitiesTextMode from '../../hooks/useActivitiesTextMode'\r\nimport type {\r\n HistoryActivity,\r\n RetorikActivity\r\n} from '../../models/activityTypes'\r\nimport { DeviceType } from '../../models/enums'\r\nimport { getTextWithoutSpeechMarkdown } from '../../utils/speechMarkdownUtils'\r\nimport Attachments from '../Attachments/Attachments'\r\nimport ListTemplate from '../Templates/List'\r\nimport { ScrollButton } from './ScrollButton'\r\nimport { ConversationHeader } from '../Menu/Mobile/ConversationHeader'\r\n\r\n/**\r\n * On call :\r\n * - check if the activity data need a display as list to be triggered\r\n * @param activity : RetorikActivity\r\n * @returns boolean\r\n */\r\nfunction checkListDisplay(activity?: RetorikActivity): boolean {\r\n return (\r\n (activity &&\r\n (activity.attachmentLayout?.toLowerCase() === 'davilist' ||\r\n (activity.attachmentLayout !== 'carousel' &&\r\n activity.attachments &&\r\n activity.attachments.length > 1))) ||\r\n false\r\n )\r\n}\r\n\r\nconst ConversationPanel = (): JSX.Element => {\r\n const activities = useActivitiesTextMode()\r\n const { open } = useWidgetStore()\r\n const { isMobile, currentDeviceType, showHomeAttachments, mediumLandscape } =\r\n useView()\r\n const listClosed = useUtilsStore((state) => state.listClosed)\r\n const { configuration, agentData } = useRetorik()\r\n const [list, setList] = useState<boolean>()\r\n const [scrollButtonDisplay, setScrollButtonDisplay] = useState<boolean>(false)\r\n const [scrollButtonDirection, setScrollButtonDirection] = useState<\r\n 'top' | 'bottom'\r\n >('bottom')\r\n const retorikConversationRef = useRef<HTMLDivElement>(null)\r\n const [preventScroll, setPreventScroll] = useState<boolean>(false)\r\n const userQuestion = useMemo<RetorikActivity | undefined>(() => {\r\n if (activities && activities.length > 0 && !isMobile) {\r\n const lastActivity = activities[activities.length - 1]\r\n\r\n return lastActivity.question.text ? lastActivity.question : undefined\r\n } else {\r\n return undefined\r\n }\r\n }, [activities])\r\n\r\n const botResponses = useMemo<Array<RetorikActivity> | undefined>(() => {\r\n if (activities && activities.length > 0 && !isMobile) {\r\n const lastActivity = activities[activities.length - 1]\r\n\r\n return lastActivity.answers\r\n } else {\r\n return undefined\r\n }\r\n }, [activities])\r\n\r\n const botEndRef = useRef<HTMLDivElement>(null)\r\n const timerRef = useRef<NodeJS.Timeout | null>(null)\r\n\r\n const activitiesNumberWithResponse = useMemo<number>(() => {\r\n let number = 0\r\n activities.forEach((element) => {\r\n number += element.answers.length + 1\r\n })\r\n return number\r\n }, [activities])\r\n const [opacityStyle, setOpacityStyle] = useState<string | undefined>('')\r\n\r\n const handleScroll = (): void => {\r\n if (retorikConversationRef.current) {\r\n const scrollHeight = (retorikConversationRef.current as HTMLDivElement)\r\n .scrollHeight\r\n const scrollTop = (retorikConversationRef.current as HTMLDivElement)\r\n .scrollTop\r\n const offsetHeight = (retorikConversationRef.current as HTMLDivElement)\r\n .offsetHeight\r\n const clientHeight = (retorikConversationRef.current as HTMLDivElement)\r\n .clientHeight\r\n if (scrollHeight > offsetHeight) {\r\n setScrollButtonDisplay(true)\r\n if (scrollHeight - scrollTop === clientHeight) {\r\n setScrollButtonDirection('top')\r\n } else if (scrollHeight - scrollTop < clientHeight + 10) {\r\n setScrollButtonDirection('top')\r\n } else {\r\n setScrollButtonDirection('bottom')\r\n }\r\n }\r\n\r\n const maxScroll = scrollHeight - clientHeight\r\n const percentage = Math.ceil((scrollTop / maxScroll) * 15)\r\n setOpacityStyle(\r\n `linear-gradient(to top, black ${100 - percentage}%, transparent 100%)`\r\n )\r\n }\r\n }\r\n\r\n /**\r\n * On call :\r\n * - scroll to the botEndRef HTML element at the bottom of the view\r\n */\r\n const ScrollHandler = (\r\n to: 'bottom' | 'top',\r\n from: 'newMessage' | 'button'\r\n ): void => {\r\n if (to === 'bottom') {\r\n setScrollButtonDirection('top')\r\n } else {\r\n setScrollButtonDirection('bottom')\r\n }\r\n if (\r\n (!preventScroll || from === 'button') &&\r\n botEndRef &&\r\n botEndRef.current !== null &&\r\n to === 'bottom'\r\n ) {\r\n botEndRef.current.scrollIntoView({\r\n behavior: 'smooth'\r\n })\r\n } else if (\r\n to === 'top' &&\r\n retorikConversationRef &&\r\n retorikConversationRef.current\r\n ) {\r\n retorikConversationRef.current.children[1].scrollIntoView({\r\n behavior: 'smooth'\r\n })\r\n }\r\n }\r\n\r\n useEffect(() => {\r\n timerRef.current && clearTimeout(timerRef.current)\r\n\r\n timerRef.current = setTimeout(() => {\r\n ScrollHandler('bottom', 'newMessage')\r\n }, 100)\r\n\r\n return (): void => {\r\n timerRef.current && clearTimeout(timerRef.current)\r\n }\r\n }, [\r\n activitiesNumberWithResponse,\r\n retorikConversationRef?.current?.scrollHeight\r\n ])\r\n\r\n /**\r\n * On retorikConversationRef change :\r\n * - check if retorikConversationRef.current is defined\r\n * - if scrollHeight > clientHeight, call handleScroll\r\n * - if scrollHeight <= clientHeight, set opacityStyle state to undefined\r\n */\r\n useEffect(() => {\r\n if (retorikConversationRef.current) {\r\n if (\r\n retorikConversationRef.current.scrollHeight >\r\n retorikConversationRef.current.clientHeight\r\n ) {\r\n handleScroll()\r\n } else {\r\n setOpacityStyle(undefined)\r\n }\r\n }\r\n }, [retorikConversationRef])\r\n\r\n /**\r\n * On call :\r\n * - set listClosed state to true\r\n */\r\n const onCloseList = (): void => {\r\n setListClosed(true)\r\n }\r\n\r\n /**\r\n * On call :\r\n * - scroll to the botEndRef HTML element at the bottom of the view\r\n * - check if there is an activity in need of List display\r\n * - set list state depending on the check's result\r\n */\r\n useEffect(() => {\r\n setPreventScroll(false)\r\n\r\n if (isMobile) {\r\n const answers =\r\n activities && activities.length > 0\r\n ? activities[activities.length - 1].answers\r\n : []\r\n setList(\r\n answers.some((activity: RetorikActivity) => checkListDisplay(activity))\r\n )\r\n } else {\r\n botResponses &&\r\n setList(\r\n botResponses.some((activity: RetorikActivity) =>\r\n checkListDisplay(activity)\r\n )\r\n )\r\n }\r\n }, [activitiesNumberWithResponse])\r\n\r\n useEffect(() => {\r\n if ((listClosed || showHomeAttachments) && botEndRef.current) {\r\n const timer = setTimeout(() => {\r\n ScrollHandler('bottom', 'newMessage')\r\n }, 100)\r\n return (): void => timer && clearTimeout(timer)\r\n }\r\n\r\n return (): void => {}\r\n }, [listClosed, showHomeAttachments])\r\n\r\n return (\r\n <>\r\n {(userQuestion || botResponses || isMobile) &&\r\n (list && !listClosed ? (\r\n isMobile ? (\r\n <ListTemplate\r\n activity={activities[activities.length - 1].answers.find(\r\n (activity: RetorikActivity) => checkListDisplay(activity)\r\n )}\r\n onClose={onCloseList}\r\n />\r\n ) : (\r\n <ListTemplate\r\n activity={botResponses?.find((activity: RetorikActivity) =>\r\n checkListDisplay(activity)\r\n )}\r\n onClose={onCloseList}\r\n />\r\n )\r\n ) : (\r\n <div\r\n className={`rf-relative rf-max-h-full ${\r\n isMobile && 'rf-h-full'\r\n } rf-bg-textModePanelBackground ${\r\n mediumLandscape ? 'rf-col-start-4' : 'rf-col-start-5'\r\n } vertical:rf-col-start-1 rf-col-span-full vertical:rf-w-full rf-row-start-4 rf-row-end-13 large-vertical:rf-row-start-7 large-vertical:rf-row-span-6 rf-self-start rf-overflow-hidden\r\n vertical:rf-row-start-1 vertical:rf-row-span-full vertical:rf-overflow-x-auto rf-justify-self-center large:rf-w-3/5 rf-flex rf-flex-col large:rf-rounded`}\r\n >\r\n {isMobile && (\r\n <ConversationHeader\r\n agentName={agentData?.name}\r\n companyName={configuration?.companyName}\r\n subCompanyMessage={configuration?.subCompanyMessage}\r\n imageUrl={agentData?.portrait}\r\n />\r\n )}\r\n <div\r\n ref={retorikConversationRef}\r\n id='retorik-conversation'\r\n className={`rf-relative rf-max-h-full rf-bg-textModePanelBackground rf-py-4 rf-overflow-y-scroll rf-scrollbar-thin ${\r\n isMobile && 'rf-self-auto rf-mb-26 rf-h-full'\r\n }\r\n vertical:rf-overflow-x-auto rf-justify-self-center rf-flex rf-flex-col rf-text-size-auto rf-text-trueblack rf-shadow-[3px_3px_6px_#00000029]`}\r\n style={{\r\n WebkitMaskImage:\r\n currentDeviceType === DeviceType.mobile\r\n ? opacityStyle\r\n : undefined\r\n }}\r\n onScroll={handleScroll}\r\n >\r\n <ScrollButton\r\n direction={scrollButtonDirection}\r\n display={isMobile && scrollButtonDisplay && open}\r\n ScrollHandler={ScrollHandler}\r\n setPreventScroll={setPreventScroll}\r\n className='rf-fixed rf-z-ui rf-bottom-40 rf-right-6 rf-w-9 rf-h-9 rf-cursor-pointer rf-bg-[#00000050] rf-p-[7px_12px] rf-rounded-[20px] rf-flex'\r\n />\r\n {isMobile ? (\r\n <MultipleActivites history={activities} />\r\n ) : (\r\n <SingleMessage\r\n userQuestion={userQuestion}\r\n botResponses={botResponses}\r\n />\r\n )}\r\n <div ref={botEndRef} />\r\n </div>\r\n </div>\r\n ))}\r\n </>\r\n )\r\n}\r\n\r\ninterface SingleMessageProps {\r\n userQuestion: RetorikActivity | undefined\r\n botResponses: Array<RetorikActivity> | undefined\r\n userClassName?: string\r\n}\r\nconst SingleMessage = ({\r\n userQuestion,\r\n botResponses,\r\n userClassName = ''\r\n}: SingleMessageProps): JSX.Element => {\r\n const locale = useLocaleStore((state) => state.locale)\r\n const { isMobile, showHomeAttachments } = useView()\r\n\r\n const userQuestionTime = userQuestion\r\n ? userQuestion.localTimestamp\r\n ? new Date(userQuestion.localTimestamp)\r\n : userQuestion.timestamp\r\n ? new Date(userQuestion.timestamp)\r\n : new Date()\r\n : undefined\r\n\r\n return isMobile || !showHomeAttachments ? (\r\n <React.Fragment>\r\n {userQuestion && userQuestion.text && (\r\n <div\r\n id='retorik-userQuestion'\r\n className={`rf-text-textModePanelConversationUser rf-animate-slideBottom rf-flex rf-flex-col rf-justify-start rf-text-size-auto rf-gap-2 ${userClassName}`}\r\n key={userQuestion.id}\r\n >\r\n {/* Time */}\r\n {isMobile && userQuestionTime && (\r\n <div className='rf-px-4 rf-text-[#9A9A9A]'>\r\n {userQuestionTime.toLocaleString(locale, {\r\n hour: 'numeric',\r\n minute: 'numeric'\r\n })}\r\n </div>\r\n )}\r\n\r\n {/* Text */}\r\n <div className='rf-px-4'>{userQuestion.text}</div>\r\n </div>\r\n )}\r\n\r\n {botResponses && (\r\n <div\r\n id='retorik-botResponses'\r\n className={`${\r\n userQuestion && 'rf-pt-4'\r\n } rf-flex rf-flex-col rf-text-size-auto rf-gap-2`}\r\n >\r\n {botResponses.map((activity, key) => {\r\n const answerTime = activity.localTimestamp\r\n ? new Date(activity.localTimestamp)\r\n : activity.timestamp\r\n ? new Date(activity.timestamp)\r\n : new Date()\r\n\r\n return (\r\n <React.Fragment key={key}>\r\n <BotMessageActivity\r\n activity={activity}\r\n answerTime={answerTime}\r\n isMobile={isMobile}\r\n mappingKey={key}\r\n locale={locale}\r\n />\r\n </React.Fragment>\r\n )\r\n })}\r\n </div>\r\n )}\r\n </React.Fragment>\r\n ) : (showHomeAttachments as any).attachments?.length > 0 ? (\r\n <div className='rf-pt-4 rf-flex rf-flex-col rf-text-size-auto rf-gap-2'>\r\n <Attachments activity={showHomeAttachments} />\r\n </div>\r\n ) : (\r\n <></>\r\n )\r\n}\r\n\r\ninterface MultipleActivitesProps {\r\n history: Array<HistoryActivity> | undefined\r\n}\r\nconst MultipleActivites = ({\r\n history\r\n}: MultipleActivitesProps): JSX.Element => {\r\n const { showHomeAttachments } = useView()\r\n\r\n return (\r\n <>\r\n {history &&\r\n history.map((history: HistoryActivity, index: number) => {\r\n return (\r\n <React.Fragment key={index}>\r\n <SingleMessage\r\n userClassName='rf-pt-3'\r\n userQuestion={history.question}\r\n botResponses={history.answers}\r\n />\r\n </React.Fragment>\r\n )\r\n })}\r\n {showHomeAttachments &&\r\n (showHomeAttachments as any).attachments?.length > 0 && (\r\n <div className='rf-pt-4 rf-flex rf-flex-col rf-text-size-auto rf-gap-2'>\r\n <Attachments activity={showHomeAttachments} />\r\n </div>\r\n )}\r\n </>\r\n )\r\n}\r\n\r\nconst BotMessageActivity = ({\r\n isMobile,\r\n answerTime,\r\n locale,\r\n activity,\r\n mappingKey\r\n}): JSX.Element => {\r\n return (\r\n <div\r\n className={`${\r\n mappingKey > 0 && 'rf-pt-2'\r\n } rf-text-textModePanelConversationBot rf-animate-slideBottom rf-flex rf-flex-col rf-items-start rf-gap-2`}\r\n >\r\n {/* Time */}\r\n {isMobile && (\r\n <div className='rf-px-4 rf-text-[#9A9A9A]'>\r\n {answerTime.toLocaleString(locale, {\r\n hour: 'numeric',\r\n minute: 'numeric'\r\n })}\r\n </div>\r\n )}\r\n\r\n {/* Text */}\r\n {activity.htmlText ? (\r\n <div\r\n className='rf-px-4'\r\n dangerouslySetInnerHTML={{\r\n __html: activity.htmlText\r\n }}\r\n />\r\n ) : activity.text ? (\r\n <div className='rf-px-4'>\r\n {getTextWithoutSpeechMarkdown(activity.text)}\r\n </div>\r\n ) : (\r\n <React.Fragment />\r\n )}\r\n\r\n {/* Attachments */}\r\n {!!activity?.attachments?.length && !checkListDisplay(activity) && (\r\n <div\r\n className={`rf-w-full ${\r\n activity.attachments.length <= 1 && 'rf-px-4'\r\n } rf-flex rf-flex-col rf-gap-2`}\r\n >\r\n <Attachments activity={activity} />\r\n </div>\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport { ConversationPanel }\r\n","import { create } from 'zustand'\r\n\r\ninterface WidgetStore {\r\n widgetDisplayType: string\r\n open: boolean\r\n loaded: boolean\r\n}\r\n\r\nexport const useWidgetStore = create<WidgetStore>()(() => {\r\n return {\r\n widgetDisplayType: 'large',\r\n open: false,\r\n loaded: false\r\n }\r\n})\r\n\r\nexport const openWidget = (): void => {\r\n useWidgetStore.setState({\r\n open: true,\r\n loaded: true\r\n })\r\n}\r\n\r\nexport const closeWidget = (): void => {\r\n useWidgetStore.setState({\r\n open: false,\r\n loaded: true\r\n })\r\n}\r\n\r\nexport const toggleWidget = (): void => {\r\n const open = useWidgetStore.getState().open\r\n useWidgetStore.setState({\r\n open: !open,\r\n loaded: true\r\n })\r\n}\r\n\r\nexport const toggleDisplay = (): void => {\r\n const displayType = useWidgetStore.getState().widgetDisplayType\r\n useWidgetStore.setState({\r\n widgetDisplayType: displayType === 'large' ? 'thumbnail' : 'large'\r\n })\r\n}\r\n","import { hooks } from 'botframework-webchat'\r\nimport type { HistoryActivity, RetorikActivity } from '../models/activityTypes'\r\n\r\nconst { useActivities } = hooks\r\n\r\nexport default function useActivitiesTextMode(): Array<HistoryActivity> {\r\n const [allActivities] = useActivities()\r\n // processedId contains the ids of the activities already processed (because useActivities gives duplicate activities with different state depending on if it's been spoken or not )\r\n const processedId: Array<string> = []\r\n const history: HistoryActivity[] = []\r\n const activities = allActivities\r\n .slice()\r\n .filter(({ type }) => type === 'message')\r\n\r\n activities.forEach((activity) => {\r\n if (activity.id && !processedId.includes(activity.id)) {\r\n processedId.push(activity.id)\r\n // Check if this is a question or an answer (questions from the user don't have a replyToId field)\r\n if (activity.replyToId) {\r\n const question: HistoryActivity | undefined = history.find(\r\n (historyItem) => historyItem.question.id === activity.replyToId\r\n )\r\n if (question) {\r\n question.answers.push(activity)\r\n } else {\r\n // Get answer's timestamp or create a new one if none present\r\n const timestamp =\r\n activity.localTimestamp ||\r\n activity.timestamp ||\r\n Date.now().toString()\r\n\r\n const newQuestion: RetorikActivity = {\r\n id: activity.id,\r\n type: 'message',\r\n text: '',\r\n channelData: {\r\n 'webchat:sequence-id': 1\r\n },\r\n timestamp: timestamp,\r\n localTimestamp: timestamp,\r\n from: {\r\n id: 'bot',\r\n role: 'bot'\r\n }\r\n }\r\n\r\n history.push({\r\n question: newQuestion,\r\n answers: [activity]\r\n })\r\n }\r\n } else {\r\n // If the activity has a value, it is a need for further informations that don't need to be displayed\r\n !(activity as RetorikActivity).value &&\r\n history.push({\r\n question: activity,\r\n answers: []\r\n })\r\n }\r\n }\r\n })\r\n\r\n return history\r\n}\r\n","import React from 'react'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport translation from '../../../translations/menu.json'\r\n\r\ninterface ConversationHeaderProps {\r\n agentName?: string\r\n companyName?: string\r\n subCompanyMessage?: string\r\n imageUrl?: string\r\n}\r\n\r\nconst ConversationHeader = ({\r\n agentName = 'Léa',\r\n companyName = 'Davi',\r\n subCompanyMessage,\r\n imageUrl = ''\r\n}: ConversationHeaderProps): JSX.Element => {\r\n const { themeColors } = useView()\r\n const { locale } = useLocaleStore()\r\n\r\n return (\r\n <div\r\n id='retorik-conversation-header'\r\n className='rf-w-full rf-h-fit rf-grid rf-grid-cols-4 rf-grid-rows-headerContainer rf-bg-truewhite'\r\n >\r\n {/* Avatar */}\r\n <div className='rf-col-start-1 rf-col-end-2 rf-row-start-1 rf-row-end-4 rf-flex rf-items-center rf-px-2 rf-py-2'>\r\n <img\r\n src={imageUrl}\r\n alt='Agent'\r\n className='rf-w-full rf-aspect-square rf-rounded-half rf-border-secondary rf-border-2 rf-bg-truewhite'\r\n />\r\n </div>\r\n\r\n {/* Company */}\r\n <div\r\n className='rf-col-start-2 rf-col-span-full rf-row-start-1 rf-row-end-2 rf-flex rf-items-end rf-font-bold'\r\n style={{\r\n color: themeColors.companyName\r\n }}\r\n >\r\n {companyName}\r\n </div>\r\n\r\n {/* Agent Title */}\r\n <div className='rf-col-start-2 rf-col-span-full rf-row-start-3 rf-row-end-4 rf-flex rf-items-start rf-text-sm rf-italic'>\r\n {subCompanyMessage ||\r\n `${agentName} ${\r\n translation[locale]?.answer || translation['fr-FR'].answer\r\n }`}\r\n </div>\r\n\r\n <div className='rf-col-start-2 rf-col-span-full rf-row-start-2 rf-row-end-3 -rf-ml-2 rf-flex rf-items-center'>\r\n <hr className='rf-h-1 rf-bg-gray-200 rf-border-0 rf-w-full rf-shadow-[0_3px_6px_rgba(0,0,0,0.16)] rf-mb-1' />\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport { ConversationHeader }\r\n","import React from 'react'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport RemoteContainer from './Remote/RemoteContainer'\r\nimport MobileContainer from './Mobile/MobileContainer'\r\nimport { LanguageButton } from './Common'\r\n\r\ninterface MenuDisplayerProps {\r\n hideMenu?: boolean\r\n}\r\n\r\nconst MenuDisplayer = ({ hideMenu }: MenuDisplayerProps): JSX.Element => {\r\n const { isMobile, displayControls } = useView()\r\n\r\n return !displayControls ? (\r\n <React.Fragment />\r\n ) : isMobile ? (\r\n <MobileContainer hideMenu={!!hideMenu} />\r\n ) : (\r\n <React.Fragment>\r\n <RemoteContainer hideMenu={!!hideMenu} />\r\n <LanguageButton />\r\n </React.Fragment>\r\n )\r\n}\r\n\r\nexport default MenuDisplayer\r\n","import React, { useState } from 'react'\r\nimport useCloseButtonTop from '../../../hooks/useCloseButtonTop'\r\nimport { CurrentSubView } from '../../../models/enums'\r\nimport { useRetorik } from '../../Contexts/RetorikContext'\r\nimport { Dashboard } from '../Common'\r\nimport DashboardButton from './DashboardButton'\r\nimport Remote from './Remote'\r\n\r\nconst RemoteContainer = ({ hideMenu = false }): JSX.Element => {\r\n const { setCurrentSubView } = useRetorik()\r\n const top = useCloseButtonTop()\r\n const [dashboardOpened, setDashboardOpened] = useState<boolean>(false)\r\n\r\n /**\r\n * On call :\r\n * - close subview if one is opened and if the parameter is false / undefined\r\n * - toggle dashboardOpened state\r\n * @param doNotCloseViews : boolean\r\n */\r\n const toggleDashboard = (doNotCloseViews?: boolean): void => {\r\n !doNotCloseViews && setCurrentSubView(CurrentSubView.none)\r\n setDashboardOpened(!dashboardOpened)\r\n }\r\n\r\n return (\r\n <React.Fragment>\r\n <div\r\n className='rf-absolute rf-hidden large:rf-flex rf-flex-col rf-items-center rf-justify-start rf-w-24 rf-right-0 rf-text-xsm rf-text-trueblack'\r\n style={{\r\n top: top\r\n }}\r\n >\r\n {/* Dashboard button */}\r\n {!hideMenu && (\r\n <DashboardButton\r\n dashboardVisible={false}\r\n onClick={(): void => toggleDashboard()}\r\n />\r\n )}\r\n\r\n {/* Remote */}\r\n <Remote />\r\n </div>\r\n\r\n {/* Dashboard */}\r\n {dashboardOpened && (\r\n <Dashboard toggleDashboard={(): void => toggleDashboard(true)} />\r\n )}\r\n </React.Fragment>\r\n )\r\n}\r\n\r\nexport default RemoteContainer\r\n","import React from 'react'\r\nimport Mode from './Mode'\r\nimport { Parameters } from '../Common'\r\n\r\nconst Remote = (): JSX.Element => {\r\n return (\r\n <div\r\n id='retorik-framework-remote'\r\n className='rf-w-full rf-pt-3 rf-pb-4 rf-flex rf-flex-col rf-items-center rf-rounded-l-lg rf-shadow-[0_3px_6px_#606267]'\r\n style={{\r\n background: 'linear-gradient(#F8F8FC, #EDEEF3)'\r\n }}\r\n >\r\n {/* Modes + vocal input button */}\r\n <Mode />\r\n\r\n {/* Separation line */}\r\n <div className='rf-w-[90%] rf-mb-4 rf-border-b-2 rf-border-b-[#C4C5C8]' />\r\n\r\n {/* Parameters */}\r\n <div className='rf-w-full rf-flex rf-flex-col rf-justify-center rf-gap-5 large-vertical:rf-gap-6'>\r\n <Parameters />\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default Remote\r\n","import React, { useState } from 'react'\r\nimport { useRetorik } from '../../Contexts/RetorikContext'\r\nimport { useView } from '../../Contexts/ViewContext'\r\nimport { hooks } from 'botframework-webchat'\r\nimport { Mode as ModeEnum } from '../../../models/enums'\r\nimport MicrophoneButton from '../Common/MicrophoneButton'\r\nimport { KeyboardIcon, MicrophoneIcon } from '../../Icons/MenuIcons'\r\n\r\nconst { useMicrophoneButtonClick, useSendBoxSpeechInterimsVisible } = hooks\r\n\r\nconst Mode = (): JSX.Element => {\r\n const { mode, setMode, setCanFocusSendBox } = useRetorik()\r\n const { themeColors } = useView()\r\n const [fromTextToVocal, setFromTextToVocal] = useState<boolean>(false)\r\n const microphoneClick = useMicrophoneButtonClick()\r\n const [interimsVisible] = useSendBoxSpeechInterimsVisible()\r\n\r\n const toggleMode = (newMode: number): void => {\r\n setFromTextToVocal(true)\r\n if (newMode === ModeEnum.text) {\r\n interimsVisible && microphoneClick()\r\n setCanFocusSendBox(true)\r\n }\r\n setMode(newMode)\r\n }\r\n\r\n return (\r\n <div className='rf-w-full rf-px-4 rf-grid rf-grid-cols-1 rf-grid-rows-2 rf-items-center'>\r\n {/* Vocal mode button */}\r\n <div className='rf-w-full rf-flex rf-justify-center'>\r\n {mode === ModeEnum.text ? (\r\n <button\r\n className='rf-w-full rf-aspect-square rf-flex rf-justify-center rf-items-center rf-border rf-border-menuBorder rf-rounded-half rf-shadow-[0_0_20px_1px_#A4A7AF80]'\r\n onClick={(): void => toggleMode(ModeEnum.vocal)}\r\n aria-label='vocal mode'\r\n >\r\n <MicrophoneIcon\r\n className='rf-h-5 rf-w-5 tactile:rf-h-6 tactile:rf-w-6'\r\n color='#A4A7AF'\r\n />\r\n </button>\r\n ) : (\r\n <MicrophoneButton openMicrophone={fromTextToVocal} />\r\n )}\r\n </div>\r\n\r\n {/* Text mode button */}\r\n <button\r\n className='rf-flex rf-justify-center rf-items-center'\r\n onClick={(): void => toggleMode(ModeEnum.text)}\r\n aria-label='text mode'\r\n >\r\n <KeyboardIcon\r\n className='rf-h-5 rf-w-5 large-vertical:rf-h-6 large-vertical:rf-w-6'\r\n color={mode === ModeEnum.text ? themeColors.secondary : '#A4A7AF'}\r\n />\r\n </button>\r\n </div>\r\n )\r\n}\r\n\r\nexport default Mode\r\n","import React, { useState } from 'react'\r\nimport { CurrentSubView, Depth } from '../../../models/enums'\r\nimport { useRetorik } from '../../Contexts/RetorikContext'\r\nimport { FullScreen } from '../../Templates'\r\nimport Mobile from './Mobile'\r\nimport ParametersAndDashboardContainer from './ParametersAndDashboardContainer'\r\n\r\ninterface MobileContainerProps {\r\n hideMenu: boolean\r\n}\r\n\r\nconst MobileContainer = ({ hideMenu }: MobileContainerProps): JSX.Element => {\r\n const { setCurrentSubView } = useRetorik()\r\n const [parametersOpened, setParametersOpened] = useState<boolean>(false)\r\n\r\n const toggleParameters = (): void => {\r\n setCurrentSubView(CurrentSubView.none)\r\n setParametersOpened(!parametersOpened)\r\n }\r\n\r\n return (\r\n <FullScreen\r\n className='large:rf-hidden rf-p-0 rf-m-0 rf-flex rf-flex-col-reverse rf-pointer-events-none vertical:rf-row-start-0 vertical:rf-row-end-13'\r\n depth={Depth.ui}\r\n background='transparent'\r\n >\r\n {/* Menu */}\r\n <Mobile\r\n parametersOpened={parametersOpened}\r\n toggleParameters={toggleParameters}\r\n />\r\n\r\n {/* Parameters */}\r\n {parametersOpened && (\r\n <ParametersAndDashboardContainer\r\n handleBack={toggleParameters}\r\n hideMenu={hideMenu}\r\n />\r\n )}\r\n </FullScreen>\r\n )\r\n}\r\n\r\nexport default MobileContainer\r\n","import React, { useState } from 'react'\r\nimport { useRetorik } from '../../Contexts/RetorikContext'\r\nimport { hooks } from 'botframework-webchat'\r\nimport { DeviceType, Mode } from '../../../models/enums'\r\nimport SendTextBox from '../../Utils/SendTextBox'\r\nimport ModeButton from './ModeButton'\r\nimport { MicrophoneButton } from '../Common'\r\nimport VoiceInput from '../../AnswerPanel/VoiceInput'\r\nimport { useView } from '../../Contexts/ViewContext'\r\n\r\nconst { useMicrophoneButtonClick, useSendBoxSpeechInterimsVisible } = hooks\r\n\r\ninterface MobileProps {\r\n parametersOpened: boolean\r\n toggleParameters: () => void\r\n}\r\n\r\nconst Mobile = ({\r\n parametersOpened,\r\n toggleParameters\r\n}: MobileProps): JSX.Element => {\r\n const { mode, setMode, setCanFocusSendBox } = useRetorik()\r\n const { currentDeviceType } = useView()\r\n const [fromTextToVocal, setFromTextToVocal] = useState<boolean>(false)\r\n const microphoneClick = useMicrophoneButtonClick()\r\n const [interimsVisible] = useSendBoxSpeechInterimsVisible()\r\n\r\n const toggleMode = (newMode: number): void => {\r\n // If the parameters are opened, no action\r\n if (!parametersOpened) {\r\n setFromTextToVocal(true)\r\n if (newMode === Mode.text) {\r\n interimsVisible && microphoneClick()\r\n setCanFocusSendBox(true)\r\n }\r\n setMode(newMode)\r\n }\r\n }\r\n\r\n const handleDashboardClick = (): void => {\r\n toggleParameters()\r\n }\r\n\r\n return (\r\n <div\r\n id='retorik-framework-menu'\r\n className='rf-w-full rf-h-fit rf-flex rf-flex-col-reverse rf-border-t rf-border-t-menuBorder rf-pointer-events-auto'\r\n style={{\r\n background: 'linear-gradient(to right, #F8F8FC, #EDEEF3)'\r\n }}\r\n >\r\n {/* Main buttons : text / vocal / parameters */}\r\n <div className='rf-w-full rf-grid rf-flex-1 rf-h-full rf-grid-cols-3 rf-min-h-12 rf-grid-rows-1 rf-justify-center rf-items-end'>\r\n {/* Text */}\r\n <ModeButton\r\n label='text'\r\n selected={parametersOpened ? false : mode === Mode.text}\r\n onClick={toggleMode}\r\n />\r\n\r\n {/* Vocal / Microphone */}\r\n {mode === Mode.vocal ? (\r\n <div className='rf-py-2 rf-w-full rf-flex rf-justify-center'>\r\n <MicrophoneButton openMicrophone={fromTextToVocal} />\r\n </div>\r\n ) : (\r\n <ModeButton label='vocal' selected={false} onClick={toggleMode} />\r\n )}\r\n\r\n {/* Parameters */}\r\n <ModeButton\r\n label='dashboard'\r\n selected={parametersOpened}\r\n onClick={handleDashboardClick}\r\n />\r\n </div>\r\n\r\n {/* Input textbox */}\r\n {!parametersOpened && mode === Mode.text && (\r\n <SendTextBox\r\n className='rf-mx-3 rf-mt-2'\r\n withButton={currentDeviceType !== DeviceType.mobile}\r\n />\r\n )}\r\n\r\n {/* Speech interims */}\r\n {!parametersOpened && mode === Mode.vocal && (\r\n <VoiceInput className='rf-w-full rf-px-6 rf-py-2' />\r\n )}\r\n </div>\r\n )\r\n}\r\n\r\nexport default Mobile\r\n","import React from 'react'\r\nimport { Mode } from '../../../models/enums'\r\nimport {\r\n DashboardIcon,\r\n KeyboardIcon,\r\n MicrophoneIcon\r\n} from '../../Icons/MenuIcons'\r\nimport { useView } from '../../Contexts/ViewContext'\r\n\r\ninterface ModeButtonProps {\r\n label: string\r\n selected: boolean\r\n onClick: (mode: number) => void\r\n}\r\n\r\nconst ModeButton = ({\r\n label,\r\n selected,\r\n onClick\r\n}: ModeButtonProps): JSX.Element => {\r\n const { themeColors } = useView()\r\n\r\n return (\r\n <button\r\n className='rf-grid rf-w-full rf-h-12 rf-pb-4 rf-justify-center rf-items-end'\r\n onClick={(): void => onClick(Mode[label])}\r\n aria-label={label}\r\n >\r\n {label === 'vocal' ? (\r\n <MicrophoneIcon className='rf-h-5' color='#A4A7AF' />\r\n ) : label === 'text' ? (\r\n <KeyboardIcon\r\n className='rf-h-4'\r\n color={selected ? themeColors.secondary : '#A4A7AF'}\r\n />\r\n ) : (\r\n <DashboardIcon\r\n className='rf-h-[0.875rem]'\r\n color={selected ? themeColors.secondary : '#A4A7AF'}\r\n />\r\n )}\r\n </button>\r\n )\r\n}\r\n\r\nexport default ModeButton\r\n","import React from 'react'\r\nimport { useLocaleStore } from '../../Contexts/localeStore'\r\nimport translation from '../../../translations/menu.json'\r\nimport { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter'\r\nimport { BackButton, Dashboard, Parameters } from '../Common'\r\n\r\ninterface ParametersAndDashboardContainerProps {\r\n handleBack: () => void\r\n hideMenu: boolean\r\n}\r\n\r\nconst ParametersAndDashboardContainer = ({\r\n handleBack,\r\n hideMenu = false\r\n}: ParametersAndDashboardContainerProps): JSX.Element => {\r\n const { locale } = useLocaleStore()\r\n\r\n return (\r\n <div className='rf-w-full rf-h-full rf-flex rf-flex-col rf-py-4 rf-bg-truewhite rf-overflow-y-hidden rf-pointer-events-auto'>\r\n {/* Back to conversation button */}\r\n <BackButton\r\n title={\r\n translation[locale]?.backconversation ||\r\n translation['fr-FR'].backconversation\r\n }\r\n className='rf-px-4 rf-text-sm'\r\n handleBack={handleBack}\r\n />\r\n\r\n <div className='rf-w-full rf-flex-rf-flex-col rf-overflow-y-scroll rf-scrollbar-hidden'>\r\n {/* Dashboard */}\r\n {!hideMenu && (\r\n <React.Fragment>\r\n <Dashboard toggleDashboard={handleBack} />\r\n <div className='rf-h-6 rf-bg-[#F0F0F0] rf-border-y rf-border-y-menuBorder' />\r\n </React.Fragment>\r\n )}\r\n\r\n {/* Parameters container */}\r\n <div className='rf-w-full rf-px-5 rf-flex rf-flex-col rf-justify-start'>\r\n {/* Title */}\r\n <div className='rf-py-4 rf-text-lightgray'>\r\n {capitalizeFirstLetter(\r\n translation[locale]?.parameters || translation['fr-FR'].parameters\r\n )}\r\n </div>\r\n\r\n {/* Parameters */}\r\n <Parameters handleBack={handleBack} />\r\n </div>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default ParametersAndDashboardContainer\r\n","/* eslint-disable react/jsx-boolean-value */\r\nimport React, { useState, useEffect, useRef } from 'react'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport { useSpeech } from '../Contexts/SpeechContext'\r\nimport ChatbotProvider from '@davi-ai/body-engine-sprite'\r\nimport useAnimationQueue from '../../hooks/useAnimationQueue'\r\nimport type { NewsConfig, ChatbotData, Queue } from '../../models/types'\r\nimport translation from '../../translations/menu.json'\r\n\r\nimport Background from '../Common/Background'\r\nimport Time from '../News/Time'\r\nimport News from '../News/News'\r\nimport Weather from '../Weather/Weather'\r\nimport AbsoluteLargeClosingButton from '../Utils/AbsoluteLargeClosingButton'\r\nimport { BackButton } from '../Menu/Common'\r\nimport { DeviceType } from '../../models/enums'\r\n\r\ninterface NewsViewProps {\r\n chatbotData: ChatbotData\r\n hideMenu?: boolean\r\n isRetorikNews?: boolean\r\n handleEndedWithoutloop?: () => void\r\n}\r\n\r\n// Steps enum\r\nenum Steps {\r\n opening = 1,\r\n news,\r\n events,\r\n weather,\r\n ending\r\n}\r\n\r\nconst NewsView = ({\r\n chatbotData,\r\n hideMenu,\r\n isRetorikNews,\r\n handleEndedWithoutloop\r\n}: NewsViewProps): JSX.Element => {\r\n const locale = useLocaleStore((state) => state.locale)\r\n const { configuration, agentData } = useRetorik()\r\n const {\r\n configurations,\r\n setRoute,\r\n isMobile,\r\n currentDeviceType,\r\n setDisplayControls\r\n } = useView()\r\n const [displayData, setDisplayData] = useState<NewsConfig>(\r\n configurations.views.news || configurations.views.home\r\n )\r\n const { speaking } = useSpeech()\r\n const lastAnimationQueue = useAnimationQueue()\r\n const [animationQueue, setAnimationQueue] = useState<Queue>([])\r\n const [step, setStep] = useState<number>(\r\n configurations.views.news?.openingVideo ? Steps.opening : Steps.news\r\n )\r\n const timerRef: React.MutableRefObject<any> = useRef(null)\r\n const newsEndedTimerRef: React.MutableRefObject<any> = useRef(null)\r\n\r\n /**\r\n * On call :\r\n * - if the component is news-only, return\r\n * - else set ViewContext's route state to 'home'\r\n */\r\n const handleBack = (): void => {\r\n if (isRetorikNews) {\r\n return\r\n }\r\n setRoute('home')\r\n }\r\n\r\n useEffect(() => {\r\n setDisplayControls(false)\r\n }, [])\r\n\r\n /**\r\n * On step change :\r\n * - switch on the current step to launch corresponding processing\r\n * On component unmount :\r\n * - clear timerRef timeout\r\n */\r\n useEffect(() => {\r\n switch (step) {\r\n case Steps.opening: {\r\n const videoUrl = configurations.views.news?.openingVideo\r\n videoUrl\r\n ? setViewContextCurrentConfiguration(videoUrl as string)\r\n : setStep(Steps.news)\r\n break\r\n }\r\n case Steps.news:\r\n setDisplayData(configurations.views.news || configurations.views.home)\r\n break\r\n case Steps.events:\r\n break\r\n case Steps.weather:\r\n // If the position is known, display the weather page during 10 seconds, otherwise switch to the next step directly\r\n configuration.position?.latitude && configuration.position?.longitude\r\n ? (timerRef.current = setTimeout(() => {\r\n setStep(Steps.ending)\r\n }, 10000))\r\n : setStep(Steps.ending)\r\n break\r\n case Steps.ending: {\r\n const videoUrl = configurations.views.news?.openingVideo\r\n videoUrl\r\n ? setViewContextCurrentConfiguration(videoUrl as string)\r\n : exitNewsOrLoop()\r\n break\r\n }\r\n default:\r\n break\r\n }\r\n\r\n return (): void => {\r\n timerRef && clearTimeout(timerRef.current)\r\n newsEndedTimerRef && clearTimeout(newsEndedTimerRef.current)\r\n }\r\n }, [step])\r\n\r\n useEffect(() => {\r\n lastAnimationQueue && setAnimationQueue(lastAnimationQueue)\r\n }, [lastAnimationQueue])\r\n\r\n /**\r\n * On call :\r\n * - set the current display configuration to have the given video as background\r\n * @param videoUrl\r\n */\r\n const setViewContextCurrentConfiguration = (videoUrl: string): void => {\r\n setDisplayData({\r\n ...configurations.views.news,\r\n background: {\r\n video: videoUrl,\r\n style: 'video',\r\n blur: 0\r\n }\r\n })\r\n }\r\n\r\n /**\r\n * On call :\r\n * - send the event 'newsEnded' used in retorik Kiosk\r\n * - if the component is news-only :\r\n * + if 'loop' is explicitly set to false, call props' handleEndedWithoutloop method if defined. Call handleBack method otherwise\r\n * + if 'loop' is not false, loop by setting step state to Steps.news\r\n * - or else if 'loop' parameter in configuration is true, get back to Steps.news step. Call handleBack method otherwise\r\n */\r\n const exitNewsOrLoop = (): void => {\r\n // Send event 'newsEnded'\r\n const endEvent = new Event('newsEnded')\r\n document.dispatchEvent(endEvent)\r\n // Relaunch from the start if this is a news-only component and loop hasn't explicitly been set to false\r\n isRetorikNews\r\n ? displayData.loop !== false\r\n ? setStep(Steps.news)\r\n : handleEndedWithoutloop\r\n ? handleEndedWithoutloop()\r\n : handleBack()\r\n : // Relaunch from the start if the loop is activated, otherwise get back to homepage\r\n displayData.loop\r\n ? setStep(Steps.news)\r\n : handleBack()\r\n }\r\n\r\n /**\r\n * On video end :\r\n * - if we are at the opening step, let's set the step state to Steps.news to launch the news\r\n * - if we are at the ending step, call exitNewsOrLoop function\r\n */\r\n const handleVideoEnd = (): void => {\r\n switch (step) {\r\n case Steps.opening:\r\n setStep(Steps.news)\r\n break\r\n case Steps.ending:\r\n exitNewsOrLoop()\r\n break\r\n }\r\n }\r\n\r\n /**\r\n * On news end :\r\n * - wait 3 seconds\r\n * - get to the next step (Steps.events)\r\n */\r\n const handleNewsEnd = (): void => {\r\n newsEndedTimerRef &&\r\n (newsEndedTimerRef.current = setTimeout(() => {\r\n // setStep(Steps.events)\r\n setStep(Steps.weather)\r\n }, 3000))\r\n }\r\n\r\n return (\r\n <React.Fragment>\r\n <Background\r\n config={displayData.background}\r\n videoLoop={false}\r\n videoMuted={false}\r\n onVideoEnded={handleVideoEnd}\r\n />\r\n\r\n {/* Timer + back button in mobile / widget mode */}\r\n {isMobile && !isRetorikNews && !hideMenu ? (\r\n <div className='rf-relative rf-z-util rf-col-start-1 rf-col-span-full rf-row-start-1 rf-flex rf-flex-col rf-gap-2 rf-items-start'>\r\n <BackButton\r\n title={translation[locale]?.back || translation['fr-FR'].back}\r\n handleBack={handleBack}\r\n className='rf-pr-2 rf-mt-4 rf-ml-4 rf-text-size-auto rf-bg-truewhite rf-rounded-lg'\r\n />\r\n <Time belowReturnButton={true} />\r\n </div>\r\n ) : (\r\n <Time />\r\n )}\r\n\r\n {/* News step */}\r\n {step === Steps.news && agentData && (\r\n <React.Fragment>\r\n {chatbotData && (\r\n <div\r\n className={`rf-relative rf-col-start-1 vertical:rf-col-span-full rf-col-span-5 rf-row-start-1 rf-row-span-full rf-self-end ${\r\n currentDeviceType === DeviceType.widget\r\n ? 'rf-h-full'\r\n : 'rf-h-screen'\r\n }`}\r\n >\r\n <ChatbotProvider\r\n licence='licence'\r\n agentData={agentData}\r\n height={chatbotData?.height}\r\n size={chatbotData?.size}\r\n speak={speaking}\r\n animationQueue={animationQueue}\r\n setAnimationQueue={setAnimationQueue}\r\n />\r\n </div>\r\n )}\r\n <News\r\n intervalInSeconds={\r\n displayData.intervalInSeconds\r\n ? (displayData.intervalInSeconds as number)\r\n : undefined\r\n }\r\n onEnd={handleNewsEnd}\r\n isRetorikNews={isRetorikNews}\r\n />\r\n </React.Fragment>\r\n )}\r\n\r\n {step === Steps.weather && <Weather handleClose={handleBack} />}\r\n\r\n {/* Closing button if it needs to be displayed */}\r\n {!hideMenu && (\r\n <AbsoluteLargeClosingButton\r\n dashboardVisible={true}\r\n onClick={handleBack}\r\n />\r\n )}\r\n </React.Fragment>\r\n )\r\n}\r\n\r\nexport default NewsView\r\n","import React, { useEffect, useState, useRef } from 'react'\r\nimport translation from '../../translations/news.json'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\n\r\ninterface TimeProps {\r\n belowReturnButton?: boolean\r\n}\r\n\r\nconst Time = ({ belowReturnButton }: TimeProps): JSX.Element => {\r\n const { locale } = useLocaleStore()\r\n const [time, setTime] = useState<string>('')\r\n const timerRef: React.MutableRefObject<any> = useRef(null)\r\n\r\n /**\r\n * Set current time (hours and minutes) depending on the locale (ex: adds AM/PM when needed)\r\n */\r\n const setCurrentTime = (): void => {\r\n const now = new Date()\r\n setTime(\r\n now.toLocaleTimeString(locale, {\r\n hour: '2-digit',\r\n minute: '2-digit'\r\n })\r\n )\r\n }\r\n\r\n /**\r\n * On component mount :\r\n * - set time\r\n * - set interval for time update\r\n * On component unmount :\r\n * - clear interval\r\n */\r\n useEffect(() => {\r\n setCurrentTime()\r\n timerRef && (timerRef.current = setInterval(setCurrentTime, 1000))\r\n\r\n return (): void => timerRef && clearInterval(timerRef.current)\r\n }, [])\r\n\r\n return (\r\n <div\r\n className={`rf-relative ${\r\n belowReturnButton\r\n ? 'rf-ml-4'\r\n : 'rf-col-start-1 rf-col-span-2 rf-row-start-1 rf-row-span-2 rf-self-start rf-justify-self-start rf-m-4 large:rf-m-8'\r\n }`}\r\n >\r\n <div className='rf-w-fit rf-h-fit rf-flex rf-flex-col rf-justify-start rf-items-start rf-text-white'>\r\n {/* Text 'Live' + round */}\r\n <div className='rf-w-full rf-text-size-auto rf-px-3 rf-py-0 large:rf-px-4 large:rf-py-1 rf-text-center rf-font-semibold rf-bg-red-600 rf-whitespace-nowrap'>\r\n {`${(\r\n translation[locale]?.live || translation['fr-FR'].live\r\n ).toLocaleUpperCase(locale)} \\u25cf`}\r\n </div>\r\n {/* Time */}\r\n <div className='rf-w-full rf-title-size-auto rf-px-3 rf-py-0 large:rf-px-4 large:rf-py-1 rf-text-center rf-font-bold rf-bg-blue-500'>\r\n {time}\r\n </div>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default Time\r\n","{\r\n \"fr-FR\": {\r\n \"warningtext\": \"Vous allez accéder à la chaîne info, le son de votre appareil va être activé\",\r\n \"warningcontinue\": \"Continuer\",\r\n \"warningback\": \"Annuler\",\r\n \"live\": \"direct\",\r\n \"continuous\": \"en continu\"\r\n },\r\n \"en-US\": {\r\n \"warningtext\": \"You are about to access the information channel, the sound of your device will be activated\",\r\n \"warningcontinue\": \"Continue\",\r\n \"warningback\": \"Abort\",\r\n \"live\": \"live\",\r\n \"continuous\": \"continuous\"\r\n },\r\n \"es-ES\": {\r\n \"warningtext\": \"You are about to access the information channel, the sound of your device will be activated\",\r\n \"warningcontinue\": \"Continue\",\r\n \"warningback\": \"Abort\",\r\n \"live\": \"live\",\r\n \"continuous\": \"continuous\"\r\n },\r\n \"de-DE\": {\r\n \"warningtext\": \"You are about to access the information channel, the sound of your device will be activated\",\r\n \"warningcontinue\": \"Continue\",\r\n \"warningback\": \"Abort\",\r\n \"live\": \"live\",\r\n \"continuous\": \"continuous\"\r\n }\r\n}\r\n","import React, { useEffect, useMemo, useState, useRef } from 'react'\r\nimport { useSpeech } from '../Contexts/SpeechContext'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport SpeakNews from './SpeakNews'\r\nimport createPonyfill from '@davi-ai/web-speech-cognitive-services-davi/lib/SpeechServices'\r\nimport type { Image, Media } from '../../models/attachmentTypes'\r\nimport Banner from './Banner'\r\nimport Carousel from '../Utils/Carousel'\r\nimport useNews from '../../hooks/useNews'\r\nimport { useSendEvent } from 'botframework-webchat-api/lib/hooks'\r\n\r\ntype NewsProps = {\r\n intervalInSeconds?: number\r\n onEnd: () => void\r\n isRetorikNews?: boolean\r\n}\r\n\r\nconst News = ({\r\n intervalInSeconds = 3,\r\n onEnd,\r\n isRetorikNews\r\n}: NewsProps): JSX.Element => {\r\n const { newsAttachments, activity } = useNews()\r\n const { route, isMobile } = useView()\r\n const { ponyfillCredentials } = useSpeech()\r\n const news = useMemo(() => {\r\n return newsAttachments.map((newsAttachement) => newsAttachement.content)\r\n }, [newsAttachments])\r\n const sendEvent = useSendEvent()\r\n const [current, setCurrent] = useState<number>(0)\r\n const [voicesLoaded, setVoicesLoaded] = useState<boolean>(false)\r\n const timerRef: React.MutableRefObject<any> = useRef(null)\r\n\r\n const ponyfill = useMemo(\r\n () => createPonyfill({ credentials: ponyfillCredentials }),\r\n [ponyfillCredentials]\r\n )\r\n\r\n useEffect(() => {\r\n if (!newsAttachments.length) {\r\n sendEvent('news.getAllNews', null)\r\n }\r\n\r\n return (): void => timerRef && clearTimeout(timerRef.current)\r\n }, [])\r\n\r\n const onVoicesChanged = (): void => {\r\n setVoicesLoaded(\r\n Array.isArray(ponyfill.speechSynthesis.getVoices()) &&\r\n ponyfill.speechSynthesis.getVoices().length > 0\r\n )\r\n }\r\n\r\n useEffect(() => {\r\n if (voicesLoaded === true) return\r\n if (\r\n ponyfill &&\r\n Array.isArray(ponyfill.speechSynthesis.getVoices()) &&\r\n ponyfill.speechSynthesis.getVoices().length > 0\r\n ) {\r\n onVoicesChanged()\r\n } else if (ponyfill) {\r\n ponyfill.speechSynthesis.onvoiceschanged = onVoicesChanged\r\n }\r\n }, [ponyfill])\r\n\r\n const currentMedia = useMemo<Array<Image | Media>>(() => {\r\n const currentNew = news[current]\r\n if (currentNew) {\r\n if (currentNew.media && currentNew.media.length > 0) {\r\n return currentNew.media\r\n } else if (currentNew.image && currentNew.image.url) {\r\n return [currentNew.image]\r\n }\r\n }\r\n\r\n return []\r\n }, [news, current])\r\n\r\n const handleEnd = (): void => {\r\n if (current < news.length - 1) {\r\n const delay =\r\n current < news.length - 1 ? intervalInSeconds : intervalInSeconds * 3\r\n timerRef && clearTimeout(timerRef.current)\r\n if (route === 'news' || isRetorikNews) {\r\n timerRef.current = setTimeout(next, delay * 1000)\r\n }\r\n } else {\r\n onEnd()\r\n }\r\n }\r\n\r\n const next = (): void => {\r\n const next = (current + 1) % news.length\r\n changeNews(next)\r\n }\r\n\r\n const changeNews = (next: number): void => {\r\n setCurrent(next)\r\n }\r\n\r\n return news.length > 0 && voicesLoaded && current >= 0 ? (\r\n <React.Fragment>\r\n {/* Speech process */}\r\n <SpeakNews\r\n news={news[current]}\r\n onEnd={handleEnd}\r\n ponyfill={ponyfill}\r\n activity={activity}\r\n />\r\n\r\n {/* Carousel in landscape / borne display */}\r\n {!isMobile && (\r\n <div\r\n className='rf-relative\r\n rf-col-start-5 rf-col-span-3 rf-row-start-1 rf-row-span-9\r\n large-vertical:rf-col-start-2 large-vertical:rf-col-end-8 large-vertical:rf-row-start-7 large-vertical:rf-row-end-11\r\n rf-flex rf-justify-center rf-items-center'\r\n >\r\n {currentMedia.length > 0 && (\r\n <Carousel\r\n className='rf-max-h-4/5 large-vertical:rf-max-h-11/12 rf-max-w-full'\r\n medias={\r\n news[current].media || [news[current].image || { url: '' }]\r\n }\r\n />\r\n )}\r\n </div>\r\n )}\r\n\r\n {/* Lower banner with title / subtitle / text */}\r\n <Banner news={news[current]} />\r\n </React.Fragment>\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default News\r\n","import React, { useEffect, useState } from 'react'\r\nimport type { NewsContent } from '../../models/attachmentTypes'\r\nimport RetorikSpeech from '../Speech/RetorikSpeech'\r\nimport { useSpeech } from '../Contexts/SpeechContext'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport createUtterance from '../../utils/createUtterance'\r\nimport type { Ponyfill, CreateUtteranceParams } from '../../models/speechTypes'\r\nimport type { RetorikActivity } from '../../models/activityTypes'\r\nimport { selectVoice } from '../../utils/selectVoice'\r\n\r\ntype SpeakNewsProps = {\r\n news: NewsContent\r\n onEnd: () => void\r\n ponyfill: Ponyfill\r\n activity: RetorikActivity | undefined\r\n}\r\n\r\nconst SpeakNews = ({\r\n news,\r\n onEnd,\r\n ponyfill,\r\n activity\r\n}: SpeakNewsProps): JSX.Element | null => {\r\n const { voice, customVoice, setSpeaking } = useSpeech()\r\n const { agentData } = useRetorik()\r\n const defaultLocale = useLocaleStore((state) => state.locale)\r\n const [utterance, setUtterance] = useState<SpeechSynthesisUtterance | null>(\r\n null\r\n )\r\n\r\n const getVoiceAfterCheckingActivityLocale = (\r\n activityLocale: string\r\n ): SpeechSynthesisVoice | null => {\r\n return activityLocale === defaultLocale\r\n ? voice\r\n : selectVoice(\r\n ponyfill.speechSynthesis.getVoices(),\r\n activityLocale,\r\n customVoice,\r\n agentData\r\n )\r\n }\r\n\r\n useEffect(() => {\r\n if (ponyfill) {\r\n const tempActivity = {\r\n ...activity,\r\n speak: `${news.title}, <break/> ${news.subtitle}: <break/> ${news.text}`\r\n }\r\n const utteranceParams: CreateUtteranceParams = {\r\n ponyfill: ponyfill,\r\n voice: getVoiceAfterCheckingActivityLocale(\r\n activity?.locale || defaultLocale\r\n ),\r\n activity: tempActivity,\r\n locale: activity?.locale || defaultLocale\r\n }\r\n setUtterance(createUtterance({ ...utteranceParams }))\r\n }\r\n\r\n return (): void => setUtterance(null)\r\n }, [news])\r\n\r\n const handleStart = (): void => {\r\n setSpeaking(true)\r\n const startEvent = new Event('retorikSpeakStart')\r\n document.dispatchEvent(startEvent)\r\n }\r\n\r\n const handleEnd = (): void => {\r\n setSpeaking(false)\r\n const stopEvent = new Event('retorikSpeakStop')\r\n document.dispatchEvent(stopEvent)\r\n onEnd()\r\n }\r\n\r\n return utterance ? (\r\n <RetorikSpeech\r\n ponyfill={ponyfill}\r\n onEnd={handleEnd}\r\n onError={handleEnd}\r\n onStart={handleStart}\r\n utterance={utterance}\r\n />\r\n ) : null\r\n}\r\n\r\nexport default SpeakNews\r\n","import React, { useEffect, useRef, useState } from 'react'\r\nimport type { Ponyfill, Boundary } from '../../models/speechTypes'\r\nimport type { SpeechSynthesisUtterance } from '@davi-ai/web-speech-cognitive-services-davi/lib/SpeechServices'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { useSpeech } from '../Contexts/SpeechContext'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport LoaderCallToAction from '../Loader/LoaderCallToAction'\r\n\r\ninterface RetorikSpeechProps {\r\n ponyfill: Ponyfill\r\n onEnd?: () => void\r\n onError?: () => void\r\n onStart?: () => void\r\n utterance?: SpeechSynthesisUtterance\r\n appAvailable: boolean\r\n}\r\n\r\nconst RetorikSpeech = ({\r\n ponyfill,\r\n onEnd,\r\n onError,\r\n onStart,\r\n utterance,\r\n appAvailable\r\n}: RetorikSpeechProps): JSX.Element => {\r\n const { loaderClosed, setLoaderClosed } = useRetorik()\r\n const { muted, setBoundaryData } = useSpeech()\r\n const { route } = useView()\r\n const timerRef: React.MutableRefObject<any> = useRef(null)\r\n const [boundaries, setBoundaries] = useState<Array<Boundary>>()\r\n\r\n /**\r\n * On utterance.text prop change : add start / end / error behaviour to the utterance, and start it\r\n */\r\n useEffect(() => {\r\n if (utterance) {\r\n utterance.onstart = (): void => {\r\n handleStart()\r\n }\r\n\r\n utterance.onend = (): void => {\r\n setBoundaries([])\r\n handleEnd()\r\n }\r\n\r\n utterance.onerror = (event): void => {\r\n handleError(event)\r\n }\r\n\r\n if (route !== 'news') {\r\n utterance.onsynthesiscompleted = (): void => {\r\n const endBoundary: Boundary = {\r\n word: '',\r\n startTime: 0,\r\n endTime: 0,\r\n boundaryType: 'EndBoundary'\r\n }\r\n\r\n setBoundaries((prevData) => {\r\n return prevData ? [...prevData, endBoundary] : [endBoundary]\r\n })\r\n }\r\n\r\n utterance.onboundary = (event): void => {\r\n if (event.boundaryType !== 'Viseme') {\r\n // Get the current word and its start time and end time.\r\n const word = event.name\r\n const startTime = event.elapsedTime\r\n const endTime = event.elapsedTime + event.duration\r\n const boundaryType = event.boundaryType\r\n // Update the boundaryData state with the new data.\r\n setBoundaries((prevData) => {\r\n return [\r\n ...(prevData ?? []),\r\n { word, startTime, endTime, boundaryType }\r\n ]\r\n })\r\n }\r\n }\r\n }\r\n\r\n /*\r\n utterance.onmark = (event): void => {\r\n // TODO\r\n }\r\n\r\n utterance.onviseme = (event): void => {\r\n // TODO\r\n }\r\n */\r\n\r\n muted && ponyfill.speechSynthesis.mute()\r\n ponyfill.speechSynthesis.speak(utterance)\r\n }\r\n\r\n return (): void => {\r\n ponyfill.speechSynthesis.cancel()\r\n timerRef && clearTimeout(timerRef.current)\r\n }\r\n }, [utterance?.text])\r\n\r\n useEffect(() => {\r\n if (boundaries && boundaries.length > 0) {\r\n setBoundaryData(boundaries)\r\n } else {\r\n setBoundaryData([])\r\n }\r\n }, [boundaries])\r\n\r\n useEffect(() => {\r\n if (ponyfill.speechSynthesis) {\r\n muted\r\n ? ponyfill.speechSynthesis.mute()\r\n : ponyfill.speechSynthesis.unmute()\r\n }\r\n }, [muted])\r\n\r\n /**\r\n * On call :\r\n * - call parent's onStart method if defined\r\n */\r\n const handleStart = (): void => {\r\n onStart && onStart()\r\n }\r\n\r\n /**\r\n * On call :\r\n * - call parent's onEnd method if defined\r\n */\r\n const handleEnd = (): void => {\r\n onEnd && onEnd()\r\n }\r\n\r\n /**\r\n * On call :\r\n * - log the error\r\n * - call parent's onError method if defined\r\n */\r\n const handleError = (error): void => {\r\n console.log('Error : ', error)\r\n onError && onError()\r\n setBoundaries([])\r\n }\r\n\r\n /**\r\n * On call :\r\n * - create basic utterance to be read to prime audio output\r\n * - MANDATORY FOR SAFARI IN VOCAL MODE\r\n */\r\n const primeRetorikSpeech = (): void => {\r\n const ssml =\r\n '<speak version=\"1.0\" xmlns=\"http://www.w3.org/2001/10/synthesis\" xmlns:mstts=\"https://www.w3.org/2001/mstts\" xml:lang=\"fr-FR\"><voice name=\"Microsoft Server Speech Text to Speech Voice (fr-FR, BrigitteNeural)\"><prosody volume=\"-100%\">Bonjour</prosody></voice></speak>'\r\n const primeUtterance = new ponyfill.SpeechSynthesisUtterance(ssml)\r\n primeUtterance.onsynthesiscompleted = (): void => setLoaderClosed(true)\r\n ponyfill.speechSynthesis.speak(primeUtterance)\r\n // Send animation start event to secure animation not playing on safari if permissions are not sufficient\r\n window.dispatchEvent(new Event('retorikSpiritEnginePlay'))\r\n }\r\n\r\n return appAvailable || loaderClosed ? (\r\n <React.Fragment />\r\n ) : (\r\n <LoaderCallToAction handleValidation={primeRetorikSpeech} />\r\n )\r\n}\r\n\r\nRetorikSpeech.defaultProps = {\r\n ponyfill: undefined,\r\n onEnd: undefined,\r\n onError: undefined,\r\n onStart: undefined,\r\n utterance: undefined,\r\n appAvailable: false\r\n}\r\n\r\nexport default RetorikSpeech\r\n","import React, { useState, useEffect, useRef } from 'react'\r\nimport { useLocaleStore } from '../..'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport translation from '../../translations/loader.json'\r\nimport ToggleWithTexts from '../Utils/ToggleWithTexts'\r\nimport Animation from './Animation'\r\nimport useRefDimensions from '../../hooks/useRefDimensions'\r\nimport { Mode } from '../../models/enums'\r\nimport { RetorikLogoIcon } from '../Icons/Miscellaneous'\r\n\r\nconst LoaderCallToAction = ({ handleValidation }): JSX.Element => {\r\n const {\r\n mode,\r\n setMode,\r\n configuration: { loaderInformationTexts, hideRetorikLogo }\r\n } = useRetorik()\r\n const { locale } = useLocaleStore()\r\n const { themeColors, isMobile } = useView()\r\n const [textSize, setTextSize] = useState<string>('landscape')\r\n const container = useRef<HTMLDivElement>(null)\r\n const dimensions = useRefDimensions(container)\r\n const [hover, setHover] = useState<boolean>(false)\r\n const animationColor = {\r\n '--rf-color-loader-animation': themeColors.loader.animation\r\n } as React.CSSProperties\r\n\r\n /**\r\n * On container dimension change :\r\n * - check which display mode is active (mobile, borne , landscape)\r\n * - set text size depending on the display mode\r\n */\r\n useEffect(() => {\r\n let isPortrait = true\r\n if (\r\n !(\r\n dimensions.width &&\r\n dimensions.height &&\r\n dimensions.width < dimensions.height\r\n )\r\n ) {\r\n isPortrait = false\r\n }\r\n\r\n if (dimensions.width && dimensions.width > 600) {\r\n setTextSize(isPortrait ? 'rf-text-lgcustom' : 'rf-text-basecustom')\r\n } else {\r\n setTextSize('rf-text-sm')\r\n }\r\n }, [dimensions])\r\n\r\n const handleChange = (modeId: number): void => {\r\n const tempMode = modeId === 1 ? Mode.vocal : Mode.text\r\n setMode(tempMode)\r\n }\r\n\r\n return (\r\n <div\r\n className={`rf-absolute rf-z-modal rf-top-0 rf-left-0 rf-h-full rf-w-full rf-flex rf-flex-col rf-items-center ${textSize}`}\r\n ref={container}\r\n style={{\r\n background: themeColors.loader.background,\r\n ...animationColor\r\n }}\r\n >\r\n {/* Animation + Text */}\r\n <div className='rf-w-full rf-h-1/2 rf-pb-6 rf-flex rf-flex-col rf-items-center rf-justify-end'>\r\n {/* Animation */}\r\n <div className='rf-w-6 rf-h-6 rf-mb-16'>\r\n <Animation />\r\n </div>\r\n {/* Text */}\r\n <div\r\n className='rf-text-center'\r\n style={{\r\n color: themeColors.loader.text\r\n }}\r\n >\r\n {/* First line of informations */}\r\n {loaderInformationTexts?.vocal.top &&\r\n loaderInformationTexts.text.top ? (\r\n <p>\r\n {mode === Mode.vocal\r\n ? loaderInformationTexts?.vocal.top\r\n : loaderInformationTexts.text.top}\r\n </p>\r\n ) : (\r\n <p>\r\n {mode === Mode.vocal\r\n ? translation[locale]?.loader.optimal ||\r\n translation['fr-FR'].loader.optimal\r\n : translation[locale]?.loader.classic ||\r\n translation['fr-FR'].loader.classic}\r\n </p>\r\n )}\r\n\r\n {/* Second line of informations */}\r\n {loaderInformationTexts?.vocal.top &&\r\n loaderInformationTexts.text.top ? (\r\n loaderInformationTexts?.vocal.bottom &&\r\n loaderInformationTexts.text.bottom && (\r\n <p className='rf-font-bold'>\r\n {mode === Mode.vocal\r\n ? loaderInformationTexts?.vocal.bottom\r\n : loaderInformationTexts.text.bottom}\r\n </p>\r\n )\r\n ) : (\r\n <p className='rf-font-bold'>\r\n {mode === Mode.vocal\r\n ? translation[locale]?.loader.vocal ||\r\n translation['fr-FR'].loader.vocal\r\n : translation[locale]?.loader.text ||\r\n translation['fr-FR'].loader.text}\r\n </p>\r\n )}\r\n </div>\r\n </div>\r\n\r\n {/* Button + Logo */}\r\n <div\r\n className={`rf-w-full rf-h-1/2 rf-flex rf-flex-col ${\r\n hideRetorikLogo ? 'rf-justify-start' : 'rf-justify-between'\r\n } rf-items-center`}\r\n >\r\n <div className='rf-flex rf-flex-col rf-items-center'>\r\n {/* Toggle button with both modes */}\r\n <ToggleWithTexts\r\n texts={{\r\n left:\r\n translation[locale]?.modes.vocal ||\r\n translation['fr-FR'].modes.vocal,\r\n leftId: 1,\r\n right:\r\n translation[locale]?.modes.text ||\r\n translation['fr-FR'].modes.text,\r\n rightId: 2\r\n }}\r\n colors={themeColors.loader.toggle}\r\n defaultChecked={mode}\r\n handleChange={handleChange}\r\n />\r\n {/* Validation button or step text */}\r\n <button\r\n className='rf-font-bold rf-border-2 rf-rounded-lg rf-px-6 rf-py-3 rf-mt-8'\r\n style={{\r\n color: hover\r\n ? themeColors.loader.button.text.hover\r\n : themeColors.loader.button.text.default,\r\n borderColor: hover\r\n ? themeColors.loader.button.border.hover\r\n : themeColors.loader.button.border.default,\r\n background: hover\r\n ? themeColors.loader.button.background.hover\r\n : themeColors.loader.button.background.default\r\n }}\r\n onClick={handleValidation}\r\n onMouseEnter={(): void => setHover(true)}\r\n onMouseLeave={(): void => setHover(false)}\r\n >\r\n {translation[locale]?.loaderValidation ||\r\n translation['fr-FR'].loaderValidation}\r\n </button>\r\n </div>\r\n {/* Logo */}\r\n {!hideRetorikLogo &&\r\n (isMobile ? (\r\n <RetorikLogoIcon className='rf-mb-10 rf-h-14' />\r\n ) : (\r\n <div className='rf-w-full rf-flex rf-justify-start'>\r\n <RetorikLogoIcon className='rf-ml-4 rf-mb-4 rf-h-14' />\r\n </div>\r\n ))}\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default LoaderCallToAction\r\n","{\r\n \"fr-FR\": {\r\n \"loader\": {\r\n \"optimal\": \"Pour une expérience optimale,\",\r\n \"classic\": \"Pour une expérience plus classique\",\r\n \"vocal\": \"j'échange de vive voix avec l'agent.\",\r\n \"text\": \"j'échange à l'écrit avec l'agent.\"\r\n },\r\n \"loaderValidation\": \"Démarrer la conversation\",\r\n \"modes\": {\r\n \"vocal\": \"mode vocal\",\r\n \"text\": \"mode texte\"\r\n },\r\n \"locale\": \"vérification de la langue\",\r\n \"supported\": \"vérification des langues disponibles\",\r\n \"store\": \"création du store\",\r\n \"directline\": \"connection au directline\",\r\n \"ponyfill\": \"création du ponyfill\",\r\n \"addressdata\": \"récupération des données\"\r\n },\r\n \"en-US\": {\r\n \"loader\": {\r\n \"optimal\": \"For an optimal experience,\",\r\n \"classic\": \"For a more classical experience,\",\r\n \"vocal\": \"I communicate by speaking with the agent.\",\r\n \"text\": \"I communicate by text with the agent.\"\r\n },\r\n \"loaderValidation\": \"Start conversation\",\r\n \"modes\": {\r\n \"vocal\": \"vocal mode\",\r\n \"text\": \"text mode\"\r\n },\r\n \"locale\": \"checking locale\",\r\n \"supported\": \"checking supported locales\",\r\n \"store\": \"creating store\",\r\n \"directline\": \"connecting directline\",\r\n \"ponyfill\": \"ponyfilling\",\r\n \"addressdata\": \"retrieving data\"\r\n },\r\n \"es-ES\": {\r\n \"loader\": {\r\n \"optimal\": \"For an optimal experience,\",\r\n \"classic\": \"For a more classical experience,\",\r\n \"vocal\": \"I communicate by speaking with the agent.\",\r\n \"text\": \"I communicate by text with the agent.\"\r\n },\r\n \"loaderValidation\": \"Start conversation\",\r\n \"modes\": {\r\n \"vocal\": \"vocal mode\",\r\n \"text\": \"text mode\"\r\n },\r\n \"locale\": \"checking locale\",\r\n \"supported\": \"checking supported locales\",\r\n \"store\": \"creating store\",\r\n \"directline\": \"connecting directline\",\r\n \"ponyfill\": \"ponyfilling\",\r\n \"addressdata\": \"retrieving data\"\r\n },\r\n \"de-DE\": {\r\n \"loader\": {\r\n \"optimal\": \"For an optimal experience,\",\r\n \"classic\": \"For a more classical experience,\",\r\n \"vocal\": \"I communicate by speaking with the agent.\",\r\n \"text\": \"I communicate by text with the agent.\"\r\n },\r\n \"loaderValidation\": \"Start conversation\",\r\n \"modes\": {\r\n \"vocal\": \"vocal mode\",\r\n \"text\": \"text mode\"\r\n },\r\n \"locale\": \"checking locale\",\r\n \"supported\": \"checking supported locales\",\r\n \"store\": \"creating store\",\r\n \"directline\": \"connecting directline\",\r\n \"ponyfill\": \"ponyfilling\",\r\n \"addressdata\": \"retrieving data\"\r\n }\r\n}\r\n","import React from 'react'\r\n\r\nconst Animation = (): JSX.Element => {\r\n return (\r\n <div className='rf-relative rf-loader rf-animate-loader rf-h-6 -rf-top-6 rf-rounded-half' />\r\n )\r\n}\r\n\r\nexport default Animation\r\n","import { SpeechMarkdown } from '@davi-ai/speechmarkdown-davi-js'\r\nimport type { CreateUtteranceParams } from '../models/speechTypes'\r\n\r\nconst buildSSML = (activity, speechMarkdownParser): string => {\r\n const textParsedAsSSML = speechMarkdownParser.toSSML(\r\n activity.speak || activity.text\r\n )\r\n\r\n return (\r\n `<speak version=\"1.0\" xmlns=\"http://www.w3.org/2001/10/synthesis\" xmlns:mstts=\"https://www.w3.org/2001/mstts\" xmlns:emo=\"http://www.w3.org/2009/10/emotionml\" xml:lang=\"${activity.locale}\">` +\r\n textParsedAsSSML +\r\n '</speak>'\r\n )\r\n}\r\n\r\nexport default function createUtterance({\r\n ponyfill,\r\n activity,\r\n voice,\r\n locale\r\n}: CreateUtteranceParams): SpeechSynthesisUtterance {\r\n const { SpeechSynthesisUtterance } = ponyfill\r\n\r\n // If there is no text to be read, create an empty utterance that will be put in the array of ended activities\r\n if (!voice || (!activity.speak && !activity.text)) {\r\n return new SpeechSynthesisUtterance()\r\n }\r\n\r\n const options = {\r\n platform: 'microsoft-azure',\r\n includeSpeakTag: false,\r\n globalVoiceAndLang: {\r\n voice: voice.name,\r\n lang: voice.name.toLowerCase().includes('multilingual')\r\n ? locale\r\n : undefined\r\n }\r\n }\r\n const speechMarkdownParser = new SpeechMarkdown(options)\r\n\r\n const utterance = new SpeechSynthesisUtterance(\r\n buildSSML(activity, speechMarkdownParser)\r\n )\r\n\r\n return utterance\r\n}\r\n","const selectVoice = (\r\n voices,\r\n locale,\r\n customVoice,\r\n agentData\r\n): SpeechSynthesisVoice | null => {\r\n let voice: SpeechSynthesisVoice | null = null\r\n // Check if a custom voice is defined in the props\r\n if (customVoice) {\r\n if (customVoice.voice) {\r\n // Search voice with its full name (ex: AriaNeural, GuyNeural)\r\n const neuralVoice = new RegExp(customVoice.voice, 'iu')\r\n voice = voices.find(\r\n ({ name }) => neuralVoice.test(name) || name === customVoice.voice\r\n )\r\n } else if (customVoice.gender) {\r\n // Search voice depending on given gender and locale\r\n voice = voices.find(({ gender, lang }) => {\r\n return (\r\n gender.toLowerCase() === customVoice?.gender?.toLowerCase() &&\r\n lang === locale\r\n )\r\n })\r\n }\r\n }\r\n // Get voice depending on locale and gender\r\n if (!voice) {\r\n voice = voices.find(({ gender, lang }) => {\r\n return (\r\n gender.toLowerCase() ===\r\n (agentData?.gender?.toLowerCase() || 'female') && lang === locale\r\n )\r\n })\r\n }\r\n // No voice found, fall back to US default voices : female => Aria / male => Guy\r\n if (!voice) {\r\n const genderedVoice =\r\n agentData?.gender?.toLowerCase() === 'female' ? 'AriaNeural' : 'GuyNeural'\r\n const neuralVoice = new RegExp(genderedVoice, 'iu')\r\n voice = voices.find(({ name }) => neuralVoice.test(name))\r\n }\r\n\r\n return voice\r\n}\r\n\r\nexport { selectVoice }\r\n","import React, { useEffect, useRef, useState } from 'react'\r\nimport type { NewsContent } from '../../models/attachmentTypes'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport { capitalizeFirstLetter } from '../../utils/capitalizeFirstLetter'\r\nimport translation from '../../translations/news.json'\r\n\r\ninterface BannerProps {\r\n news: NewsContent\r\n}\r\n\r\nconst Banner = ({ news }: BannerProps): JSX.Element => {\r\n const { locale } = useLocaleStore()\r\n const { currentWidth, isMobile } = useView()\r\n const timerRef: React.MutableRefObject<any> = useRef(null)\r\n const [scrollDuration, setScrollDuration] = useState<number>(0)\r\n const [imageSize, setImageSize] = useState<number>(0)\r\n const elementRef = useRef<HTMLDivElement>(null)\r\n\r\n /**\r\n * Set animation for text horizontal scrolling if necessary\r\n */\r\n const updateDuration = (): void => {\r\n // Reset animation\r\n setScrollDuration(0)\r\n // Set animation, after a 1s timeout\r\n timerRef &&\r\n (timerRef.current = setTimeout(() => {\r\n setScrollDuration(Math.floor(news.text.length / 11))\r\n }, 1000))\r\n }\r\n\r\n /**\r\n * On news props change :\r\n * - call updateDuration function\r\n * On component unmount :\r\n * - clear timeout\r\n */\r\n useEffect(() => {\r\n updateDuration()\r\n\r\n return (): void => timerRef && clearTimeout(timerRef.current)\r\n }, [news])\r\n\r\n /**\r\n * On ref change :\r\n * - set the width of the image container equal to the category container's width\r\n */\r\n useEffect(() => {\r\n elementRef.current && setImageSize(elementRef.current.clientWidth)\r\n }, [elementRef])\r\n\r\n return (\r\n <div className='rf-h-fit rf-col-start-1 rf-col-span-full rf-row-start-9 large:rf-row-start-10 rf-row-span-3 large:rf-mb-6 rf-flex rf-flex-col rf-self-end rf-items-center rf-glass-background rf-text-white'>\r\n {/* Category + Title */}\r\n <div className='rf-w-full rf-flex rf-flex-row rf-justify-start rf-text-size-auto'>\r\n <div\r\n className='rf-px-4 rf-pb-2 rf-pt-2 large:rf-pt-3 rf-font-bold rf-bg-red-600 rf-whitespace-nowrap'\r\n ref={elementRef}\r\n >\r\n {(\r\n news.category ||\r\n translation[locale]?.continuous ||\r\n translation['fr-FR'].continuous\r\n ).toLocaleUpperCase(locale)}\r\n </div>\r\n <div className='rf-px-4 rf-mb-2 rf-mt-2 large:rf-mt-3 rf-font-bold rf-line-clamp-1'>\r\n {news.title && news.title.toLocaleUpperCase(locale)}\r\n </div>\r\n </div>\r\n\r\n {/* Subtitle + image in mobile / borne mode */}\r\n <div className='rf-w-full rf-h-fit rf-flex rf-flex-row rf-justify-start'>\r\n {isMobile && news.image?.url && (\r\n <div\r\n style={{\r\n minWidth: `${imageSize}px`,\r\n backgroundImage: `url(${news.image?.url})`,\r\n backgroundSize: 'cover',\r\n backgroundRepeat: 'no-repeat',\r\n backgroundPosition: 'center'\r\n }}\r\n />\r\n )}\r\n <div className='rf-px-4 rf-my-2 large:rf-my-3 rf-title-large-size-auto rf-line-clamp-2'>\r\n {news.subtitle ? capitalizeFirstLetter(news.subtitle) : '...'}\r\n </div>\r\n </div>\r\n\r\n {/* Text */}\r\n <div\r\n className='rf-w-full rf-pr-4 rf-py-4 rf-subtitle-size-auto rf-text-black rf-bg-white rf-overflow-clip'\r\n style={{\r\n paddingLeft: currentWidth\r\n }}\r\n >\r\n {scrollDuration !== 0 ? (\r\n <p\r\n className='rf-w-max rf-whitespace-nowrap rf-animate-hScroll'\r\n style={{\r\n animation: `rf-hScroll ${scrollDuration}s infinite linear`,\r\n paddingRight: currentWidth\r\n }}\r\n >\r\n {news.text ? capitalizeFirstLetter(news.text) : '...'}\r\n </p>\r\n ) : (\r\n <p className='rf-w-max rf-whitespace-nowrap'>\r\n {news.text ? capitalizeFirstLetter(news.text) : '...'}\r\n </p>\r\n )}\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default Banner\r\n","import { useActivities } from 'botframework-webchat-api/lib/hooks'\r\nimport { CONTENT_TYPE_NEWS, NewsContent } from '../models/attachmentTypes'\r\nimport type { RetorikActivity } from '../models/activityTypes'\r\n\r\ntype NewsAttachment = {\r\n contentType: string\r\n content: NewsContent\r\n}\r\n\r\nconst useNews = (): {\r\n newsAttachments: Array<NewsAttachment>\r\n activity?: RetorikActivity\r\n} => {\r\n const [activities] = useActivities()\r\n if (!activities.length) {\r\n return { newsAttachments: [] }\r\n }\r\n const activity = activities[activities.length - 1] as any\r\n\r\n if (\r\n !activity ||\r\n !(activity.type === 'event') ||\r\n !activity.attachments?.length\r\n ) {\r\n return { newsAttachments: [], activity }\r\n }\r\n\r\n const newsAttachments: NewsAttachment[] = []\r\n activity.attachments.forEach((attachment) => {\r\n if (attachment.contentType === CONTENT_TYPE_NEWS) {\r\n newsAttachments.push({\r\n contentType: CONTENT_TYPE_NEWS,\r\n content: attachment.content || ''\r\n })\r\n }\r\n })\r\n\r\n return { newsAttachments, activity }\r\n}\r\n\r\nexport default useNews\r\n","import React, { useEffect, useState } from 'react'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport translation from '../../translations/news.json'\r\nimport backButtonTranslation from '../../translations/menu.json'\r\nimport type { ChatbotData } from '../../models/types'\r\nimport NewsView from './NewsView'\r\nimport { BackButton } from '../Menu/Common'\r\n\r\ninterface WarningBeforeNewsViewProps {\r\n propsToTransfer: {\r\n chatbotData: ChatbotData\r\n hideMenu?: boolean\r\n isRetorikNews?: boolean\r\n handleEndedWithoutloop?: () => void\r\n }\r\n}\r\n\r\nconst WarningBeforeNewsView = ({\r\n propsToTransfer\r\n}: WarningBeforeNewsViewProps): JSX.Element => {\r\n const { setRoute } = useView()\r\n const locale = useLocaleStore((state) => state.locale)\r\n const [waiting, setWaiting] = useState<boolean>(true)\r\n\r\n useEffect(() => {\r\n setWaiting(true)\r\n }, [])\r\n\r\n const handleClick = (goHome: boolean): void => {\r\n goHome ? setRoute('home') : setWaiting(false)\r\n }\r\n\r\n return waiting ? (\r\n <div className='rf-relative rf-z-util rf-col-start-1 rf-col-span-full rf-row-start-1 rf-row-span-full rf-flex rf-flex-col rf-gap-4 rf-justify-center rf-items-center rf-bg-truewhite'>\r\n <BackButton\r\n title={\r\n backButtonTranslation[locale]?.back ||\r\n backButtonTranslation['fr-FR'].back\r\n }\r\n handleBack={(): void => handleClick(true)}\r\n className='rf-absolute rf-top-4 rf-left-4 rf-text-size-auto'\r\n />\r\n\r\n <p className='rf-px-4 rf-text-center'>\r\n {translation[locale]?.warningtext || translation['fr-FR'].warningtext}\r\n </p>\r\n <button\r\n className='rf-card-button-secondary'\r\n onClick={(): void => handleClick(false)}\r\n >\r\n {translation[locale]?.warningcontinue ||\r\n translation['fr-FR'].warningcontinue}\r\n </button>\r\n <button\r\n className='rf-card-button-secondary'\r\n onClick={(): void => handleClick(true)}\r\n >\r\n {translation[locale]?.warningback || translation['fr-FR'].warningback}\r\n </button>\r\n </div>\r\n ) : (\r\n <NewsView {...propsToTransfer} />\r\n )\r\n}\r\n\r\nexport default WarningBeforeNewsView\r\n","import React, { useEffect, useRef, useState } from 'react'\r\nimport useRefDimensions from '../../hooks/useRefDimensions'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport type { ThemeColors } from '../../models/colorTypes'\r\nimport { ContainerParent, DeviceType } from '../../models/enums'\r\nimport useCurrentPagination from '../../hooks/useCurrentPagination'\r\nimport { mobileBreakpoint } from '../../models/constants'\r\nimport type { WithChildren } from '../../models/utils'\r\nimport { isMobile } from 'react-device-detect'\r\n\r\ntype ContainerProps = WithChildren<{\r\n fullSize: boolean\r\n width?: number | string\r\n height?: number | string\r\n colors: ThemeColors\r\n parent: number\r\n}>\r\n\r\nconst Container = ({\r\n fullSize,\r\n width,\r\n height,\r\n children,\r\n colors,\r\n parent\r\n}: ContainerProps): JSX.Element => {\r\n const {\r\n currentDeviceType,\r\n isTactile,\r\n setCurrentDeviceType,\r\n setCurrentHeight,\r\n setCurrentWidth\r\n } = useView()\r\n const {\r\n configuration: { doNotDetectDeviceFromUserAgent }\r\n } = useRetorik()\r\n const container = useRef<HTMLDivElement>(null)\r\n const dimensions = useRefDimensions(container)\r\n const [portrait, setPortrait] = useState<string>('')\r\n const [large, setLarge] = useState<string>('')\r\n // Call useCurrentPagination to update data sent to store. Do not remove\r\n const pagination = useCurrentPagination()\r\n\r\n /**\r\n * On pagination change :\r\n * - save current pagination in localstorage to be used in custom store\r\n */\r\n useEffect(() => {\r\n // Add pagination to local storage to be used in botframework store\r\n localStorage.setItem(\r\n 'Retorik.Framework.Pagination',\r\n JSON.stringify(pagination)\r\n )\r\n }, [pagination])\r\n\r\n let widthStyle = {}\r\n if (width === 'full') {\r\n widthStyle = { width: '100%' }\r\n } else if (typeof width === 'number') {\r\n widthStyle = { width: `${width}px` }\r\n } else if (typeof width === 'string') {\r\n widthStyle = { width: width }\r\n }\r\n\r\n let heightStyle = {}\r\n if (height === 'full') {\r\n heightStyle = { height: '100%', flexGrow: 1 }\r\n } else if (typeof height === 'number') {\r\n heightStyle = { height: `${height}px` }\r\n } else if (typeof height === 'string') {\r\n heightStyle = { height: height }\r\n }\r\n\r\n if (currentDeviceType === DeviceType.mobile) {\r\n heightStyle = {\r\n height: window.innerHeight,\r\n minHeight: window.innerHeight,\r\n maxHeight: window.innerHeight\r\n }\r\n }\r\n\r\n const checkPortrait = (width: number, height: number): boolean => {\r\n if (width && height && width < height) {\r\n setPortrait('rf-portrait')\r\n } else {\r\n setPortrait('')\r\n return false\r\n }\r\n\r\n return true\r\n }\r\n\r\n /**\r\n * On dimensions change :\r\n * - check and set the classes in the main div that will allow us to use tailwind variants\r\n * - set the main div dimensions in context\r\n */\r\n useEffect(() => {\r\n // Widget mode => portrait only\r\n if (parent === ContainerParent.widget) {\r\n setPortrait('rf-portrait')\r\n setLarge('')\r\n setCurrentDeviceType(DeviceType.widget)\r\n }\r\n // If we don't want to use the userAgent to get the device type\r\n else if (doNotDetectDeviceFromUserAgent) {\r\n const isPortrait = checkPortrait(dimensions.width, dimensions.height)\r\n\r\n if (isPortrait) {\r\n if (dimensions.width > mobileBreakpoint) {\r\n setLarge('rf-large')\r\n setCurrentDeviceType(DeviceType.borne)\r\n } else {\r\n setLarge('')\r\n setCurrentDeviceType(DeviceType.mobile)\r\n }\r\n } else {\r\n if (dimensions.height > mobileBreakpoint) {\r\n setLarge('rf-large')\r\n setCurrentDeviceType(DeviceType.landscape)\r\n } else {\r\n setLarge('')\r\n setCurrentDeviceType(DeviceType.mobile)\r\n }\r\n }\r\n }\r\n // If we use the userAgent to get the device type\r\n else {\r\n if (isMobile) {\r\n setPortrait('rf-portrait')\r\n setLarge('')\r\n setCurrentDeviceType(DeviceType.mobile)\r\n } else {\r\n const isPortrait = checkPortrait(dimensions.width, dimensions.height)\r\n\r\n // Check for 'rf-large' class\r\n setLarge('rf-large')\r\n setCurrentDeviceType(\r\n isPortrait ? DeviceType.borne : DeviceType.landscape\r\n )\r\n }\r\n }\r\n\r\n dimensions.height && setCurrentHeight(dimensions.height)\r\n dimensions.width && setCurrentWidth(dimensions.width)\r\n }, [dimensions])\r\n\r\n const customColors = {\r\n '--rf-color-primary': colors.primary,\r\n '--rf-color-secondary': colors.secondary,\r\n '--rf-color-black': colors.black,\r\n '--rf-color-whereToEatColor': colors.whereToEatColor,\r\n '--rf-color-whereToSleepColor': colors.whereToSleepColor,\r\n '--rf-color-tobeSeenColor': colors.tobeSeenColor,\r\n '--rf-color-tobeDoneColor': colors.tobeDoneColor,\r\n '--rf-color-localProductsColor': colors.localProductsColor,\r\n '--rf-color-servicesColor': colors.servicesColor,\r\n '--rf-color-cardFrameBackground': colors.card.frame.background,\r\n '--rf-color-cardFrameBorder': colors.card.frame.border,\r\n '--rf-color-cardFrameText': colors.card.frame.text,\r\n '--rf-color-cardButtonBackgroundDefault':\r\n colors.card.button.background.default,\r\n '--rf-color-cardButtonBackgroundHover': colors.card.button.background.hover,\r\n '--rf-color-cardButtonBorderDefault': colors.card.button.border.default,\r\n '--rf-color-cardButtonBorderHover': colors.card.button.border.hover,\r\n '--rf-color-cardButtonTextDefault': colors.card.button.text.default,\r\n '--rf-color-cardButtonTextHover': colors.card.button.text.hover,\r\n '--rf-color-cardButtonDiscoverBackgroundDefault':\r\n colors.card.discoverButton.background.default,\r\n '--rf-color-cardButtonDiscoverBackgroundHover':\r\n colors.card.discoverButton.background.hover,\r\n '--rf-color-cardButtonDiscoverBorderDefault':\r\n colors.card.discoverButton.border.default,\r\n '--rf-color-cardButtonDiscoverBorderHover':\r\n colors.card.discoverButton.border.hover,\r\n '--rf-color-cardButtonDiscoverTextDefault':\r\n colors.card.discoverButton.text.default,\r\n '--rf-color-cardButtonDiscoverTextHover':\r\n colors.card.discoverButton.text.hover,\r\n '--rf-color-textModePanelBackground': colors.textMode.panel.background,\r\n '--rf-color-textModePanelBorder': colors.textMode.panel.border,\r\n '--rf-color-textModePanelConversationUser':\r\n colors.textMode.panel.conversationUser,\r\n '--rf-color-textModePanelConversationBot':\r\n colors.textMode.panel.conversationBot,\r\n '--rf-color-vocalModeSubtitlesText': colors.vocalMode.subtitles.text,\r\n '--rf-color-vocalModeSubtitlesBackground':\r\n colors.vocalMode.subtitles.background,\r\n '--rf-color-formInputTextDefault': colors.formInput.text.default,\r\n '--rf-color-formInputTextHover': colors.formInput.text.hover,\r\n '--rf-color-formInputRadioCheckboxUncheckedBackground':\r\n colors.formInput.inputRadioCheckbox.unchecked.background,\r\n '--rf-color-formInputRadioCheckboxUncheckedBorder':\r\n colors.formInput.inputRadioCheckbox.unchecked.border,\r\n '--rf-color-formInputRadioCheckboxCheckedBackground':\r\n colors.formInput.inputRadioCheckbox.checked.background,\r\n '--rf-color-formInputRadioCheckboxCheckedBorder':\r\n colors.formInput.inputRadioCheckbox.checked.border,\r\n '--rf-color-formInputRadioCheckboxCheckedItem':\r\n colors.formInput.inputRadioCheckbox.checked.item,\r\n '--rf-color-formInputButtonBackgroundDefault':\r\n colors.formInput.inputButton.background.default,\r\n '--rf-color-formInputButtonBackgroundHover':\r\n colors.formInput.inputButton.background.hover,\r\n '--rf-color-formInputButtonBorderDefault':\r\n colors.formInput.inputButton.border.default,\r\n '--rf-color-formInputButtonBorderHover':\r\n colors.formInput.inputButton.border.hover,\r\n '--rf-color-formInputButtonTextDefault':\r\n colors.formInput.inputButton.text.default,\r\n '--rf-color-formInputButtonTextHover':\r\n colors.formInput.inputButton.text.hover\r\n } as React.CSSProperties\r\n\r\n return (\r\n <div\r\n id='retorik-container'\r\n ref={container}\r\n className={`rf-relative ${\r\n fullSize ? 'rf-w-screen rf-h-screen' : 'rf-w-full rf-h-full'\r\n } rf-max-w-screen rf-max-h-screen rf-grid rf-grid-cols-8 rf-grid-rows-container rf-bg-transparent rf-text-trueblack rf-font-default ${portrait} ${large} ${\r\n isTactile && 'rf-tactile'\r\n } rf-overflow-hidden`}\r\n style={{\r\n ...widthStyle,\r\n ...heightStyle,\r\n ...customColors\r\n }}\r\n >\r\n {children}\r\n </div>\r\n )\r\n}\r\n\r\nexport default Container\r\n","import { useState, useEffect } from 'react'\r\nimport { useRetorik } from '../components/Contexts/RetorikContext'\r\nimport { useView } from '../components/Contexts/ViewContext'\r\nimport { DeviceType } from '../models/enums'\r\n\r\nexport default function useCurrentPagination(): number {\r\n const { configuration } = useRetorik()\r\n const { currentDeviceType } = useView()\r\n const [currentPagination, setCurrentPagination] = useState<number>(10)\r\n\r\n useEffect(() => {\r\n if (configuration && currentDeviceType) {\r\n switch (currentDeviceType) {\r\n case DeviceType.borne:\r\n setCurrentPagination(configuration.pagination?.borne || 15)\r\n break\r\n case DeviceType.landscape:\r\n setCurrentPagination(configuration.pagination?.landscape || 20)\r\n break\r\n case DeviceType.mobile:\r\n case DeviceType.widget:\r\n setCurrentPagination(configuration.pagination?.mobile || 12)\r\n break\r\n default:\r\n break\r\n }\r\n } else {\r\n setCurrentPagination(10)\r\n }\r\n }, [configuration, currentDeviceType])\r\n\r\n return currentPagination\r\n}\r\n","import React, { useEffect, useState } from 'react'\r\nimport { RetorikProvider } from './RetorikContext'\r\nimport { SpeechProvider, SpeechProviderProps } from './SpeechContext'\r\nimport { ViewProvider } from './ViewContext'\r\nimport type { ViewsProviderProps } from './ViewContext'\r\nimport { TelemetryProvider } from './TelemetryContext'\r\nimport fetchAgentData from '../../utils/fetchAgentData'\r\nimport type { AddressData, AgentData, Configuration } from '../../models/types'\r\nimport { checkLocale } from '../../utils/checkLocale'\r\nimport LocaleChangeEventListener from '../Utils/LocaleChangeEventListener'\r\nimport {\r\n useLocaleStore,\r\n setLocale,\r\n fetchSupportedLanguages\r\n} from './localeStore'\r\n\r\ntype ContextProviderProps = {\r\n skipLoader?: boolean\r\n mode: number\r\n config: Configuration\r\n addressData: AddressData\r\n agentSource:\r\n | string\r\n | {\r\n url: string\r\n name?: string\r\n }\r\n isConfigUpdated: boolean\r\n} & SpeechProviderProps &\r\n ViewsProviderProps\r\n\r\nconst ContextProvider = ({\r\n skipLoader,\r\n mode,\r\n viewsConfiguration,\r\n config,\r\n customVoice,\r\n addressData,\r\n agentSource,\r\n ponyfillFactoryCredentials,\r\n themeColors,\r\n children,\r\n isConfigUpdated\r\n}: ContextProviderProps): JSX.Element | null => {\r\n const [agentManifest, setAgentManifest] = useState<AgentData>(null)\r\n const { locale, supported, defaultLocale } = useLocaleStore()\r\n\r\n /**\r\n * On component mount :\r\n * - fetch supported languages on studio retorik\r\n */\r\n useEffect(() => {\r\n fetchSupportedLanguages(addressData)\r\n }, [])\r\n\r\n /**\r\n * On supported state change :\r\n * - set locale state depending on data retrieved after fetching available languages and data from config prop\r\n */\r\n useEffect(() => {\r\n if (supported.length) {\r\n setLocale(\r\n checkLocale({ all: supported, default: defaultLocale }, config.locales)\r\n )\r\n }\r\n }, [supported, config, isConfigUpdated])\r\n /**\r\n * On agentSource prop change :\r\n * - fetch agent data from the url present in agentSource prop\r\n * - set the agent's name if present in agentSource prop\r\n * - set agentManifest state\r\n */\r\n useEffect(() => {\r\n const getData = async (): Promise<void> => {\r\n const url =\r\n typeof agentSource === 'string' ? agentSource : agentSource.url\r\n const data = await fetchAgentData(url)\r\n data &&\r\n typeof agentSource !== 'string' &&\r\n agentSource.name &&\r\n (data.name = agentSource.name)\r\n\r\n setAgentManifest(data)\r\n }\r\n getData()\r\n }, [agentSource])\r\n\r\n return locale && supported && agentManifest ? (\r\n <ViewProvider\r\n viewsConfiguration={viewsConfiguration}\r\n themeColors={themeColors}\r\n >\r\n <RetorikProvider\r\n skipLoader={skipLoader}\r\n chosenMode={mode}\r\n config={config}\r\n currentLocale={locale}\r\n allLocales={supported}\r\n agentManifest={agentManifest}\r\n addressData={addressData}\r\n >\r\n <SpeechProvider\r\n ponyfillFactoryCredentials={ponyfillFactoryCredentials}\r\n customVoice={customVoice}\r\n >\r\n <TelemetryProvider enabled={!(config.enableTelemetry === false)}>\r\n {children}\r\n <LocaleChangeEventListener />\r\n </TelemetryProvider>\r\n </SpeechProvider>\r\n </RetorikProvider>\r\n </ViewProvider>\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default ContextProvider\r\n","import React, { createContext, useContext, ReactNode, useMemo } from 'react'\r\nimport { useRetorik } from './RetorikContext'\r\n\r\nimport opentelemetry, {\r\n Attributes,\r\n SpanStatusCode,\r\n Tracer\r\n} from '@opentelemetry/api'\r\nimport { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http'\r\nimport {\r\n BatchSpanProcessor,\r\n WebTracerProvider\r\n} from '@opentelemetry/sdk-trace-web'\r\nimport { Resource } from '@opentelemetry/resources'\r\nimport { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'\r\nimport { telemetryAddress } from '../../models/constants'\r\n\r\nexport type TelemetryProviderProps = {\r\n enabled: boolean\r\n children?: ReactNode\r\n}\r\n\r\ntype TelemetryContextType = {\r\n enabled: boolean\r\n tracer: Tracer | undefined\r\n sendErrorTrace: (x: Error) => void\r\n}\r\n\r\nconst TelemetryContextDefaultValues: TelemetryContextType = {\r\n enabled: true,\r\n tracer: undefined,\r\n sendErrorTrace: () => {}\r\n}\r\n\r\nexport const TelemetryContext = createContext<TelemetryContextType>(\r\n TelemetryContextDefaultValues\r\n)\r\n\r\nexport function useTelemetry(): TelemetryContextType {\r\n return useContext(TelemetryContext)\r\n}\r\n\r\nexport function TelemetryProvider({\r\n enabled,\r\n children\r\n}: TelemetryProviderProps): JSX.Element {\r\n const { addressData } = useRetorik()\r\n const tracer = useMemo<Tracer | undefined>(() => {\r\n if (enabled) {\r\n const exporter = new OTLPTraceExporter({\r\n url: telemetryAddress,\r\n headers: {},\r\n concurrencyLimit: 1\r\n })\r\n\r\n const provider = new WebTracerProvider({\r\n resource: new Resource({\r\n [SemanticResourceAttributes.SERVICE_NAME]: 'retorik-framework'\r\n })\r\n })\r\n const processor = new BatchSpanProcessor(exporter)\r\n\r\n provider.addSpanProcessor(processor)\r\n provider.register()\r\n\r\n return opentelemetry.trace.getTracer('retorik-framework')\r\n }\r\n\r\n return undefined\r\n }, [enabled])\r\n\r\n const getCommonAttributes = (): Attributes => {\r\n let tenant = ''\r\n if (addressData.tenant) {\r\n tenant = addressData.prefix\r\n ? `${addressData.tenant} (${addressData.prefix})`\r\n : addressData.tenant\r\n }\r\n\r\n return {\r\n tenant: tenant,\r\n currentURL: window.location.toString()\r\n }\r\n }\r\n\r\n const sendErrorTrace = (error: Error): void => {\r\n if (tracer) {\r\n const span = tracer.startSpan('Error')\r\n\r\n span.recordException(error)\r\n span.setStatus({\r\n code: SpanStatusCode.ERROR,\r\n message: `${error.message}`\r\n })\r\n\r\n span.setAttributes(getCommonAttributes())\r\n\r\n span.end()\r\n }\r\n }\r\n\r\n const value = useMemo(\r\n () => ({\r\n enabled,\r\n tracer,\r\n sendErrorTrace\r\n }),\r\n [enabled, tracer]\r\n )\r\n\r\n return (\r\n <React.Fragment>\r\n <TelemetryContext.Provider value={value}>\r\n {children}\r\n </TelemetryContext.Provider>\r\n </React.Fragment>\r\n )\r\n}\r\n","import type { AgentData } from '../models/types'\r\n\r\n// Get data from the json file located at the root of the folder at the address agentUrl\r\nexport default async (agentUrl): Promise<AgentData> => {\r\n const responseData = await fetch(`${agentUrl}/manifest.json`)\r\n .then((data) => {\r\n return data.json()\r\n })\r\n .then((json) => {\r\n return json\r\n })\r\n .catch((error) => {\r\n console.log(error)\r\n return null\r\n })\r\n\r\n // Set urls to retrieve the animations and a portrait of the agent\r\n if (responseData !== null) {\r\n responseData.url = agentUrl\r\n responseData.portrait = agentUrl + '/' + responseData.portrait\r\n }\r\n\r\n return responseData\r\n}\r\n","import { defaultThemeDark, defaultThemeLight } from '../models/colors'\r\nimport type { RetorikThemeColors, ThemeColors } from '../models/colorTypes'\r\n\r\nconst deepMerge = (target, source): ThemeColors => {\r\n const isObject = (obj): boolean => obj && typeof obj === 'object'\r\n\r\n if (!isObject(target) || !isObject(source)) {\r\n return source\r\n }\r\n\r\n Object.keys(source).forEach((key) => {\r\n const targetValue = target[key]\r\n const sourceValue = source[key]\r\n\r\n if (targetValue) {\r\n if (Array.isArray(targetValue) && Array.isArray(sourceValue)) {\r\n source[key] = targetValue.concat(sourceValue)\r\n } else if (isObject(targetValue) && isObject(sourceValue)) {\r\n source[key] = deepMerge(targetValue, sourceValue)\r\n } else {\r\n source[key] = targetValue\r\n }\r\n }\r\n })\r\n\r\n return source\r\n}\r\n\r\nconst getThemeColors = (colors?: RetorikThemeColors): ThemeColors => {\r\n let defaultColors: ThemeColors =\r\n colors?.theme === 'light' ? defaultThemeLight : defaultThemeDark\r\n defaultColors = deepMerge(colors, defaultColors)\r\n\r\n return defaultColors\r\n}\r\n\r\nexport default getThemeColors\r\n","import React, { useEffect, useState, useMemo, useRef } from 'react'\r\nimport { useSpeech } from '../Contexts/SpeechContext'\r\nimport { useRetorik } from '../Contexts/RetorikContext'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport { useSpeechCancelStore, setCancel } from '../Contexts/speechCancelStore'\r\nimport { createSpeechSynthesisPonyfill } from '@davi-ai/web-speech-cognitive-services-davi/lib/SpeechServices'\r\nimport createUtterance from '../../utils/createUtterance'\r\nimport RetorikSpeech from './RetorikSpeech'\r\nimport {\r\n useMarkActivityAsSpoken,\r\n useDictateState\r\n} from 'botframework-webchat-api/lib/hooks'\r\nimport { useMicrophoneButtonClick } from 'botframework-webchat-component/lib/hooks'\r\nimport { Constants } from 'botframework-webchat-core'\r\nimport useLastBotActivity from '../../hooks/useLastBotActivity'\r\nimport checkLastbotActivity from '../../utils/checkLastbotActivity'\r\nimport { selectVoice } from '../../utils/selectVoice'\r\nimport type { CreateUtteranceParams } from '../../models/speechTypes'\r\nimport type { RetorikActivity } from '../../models/activityTypes'\r\n\r\nconst {\r\n DictateState: { WILL_START }\r\n} = Constants\r\n\r\nconst SpeechManager = (): JSX.Element | null => {\r\n const {\r\n voice,\r\n customVoice,\r\n setVoice,\r\n setSpeaking,\r\n currentPlaying,\r\n setCurrentPlaying,\r\n currentReplyToId,\r\n setCurrentReplyToId,\r\n queuedActivities,\r\n setQueuedActivities,\r\n endedActivities,\r\n setEndedActivities,\r\n ponyfillCredentials,\r\n setBoundaryData\r\n } = useSpeech()\r\n const { route } = useView()\r\n const locale = useLocaleStore((state) => state.locale)\r\n const {\r\n appAvailable,\r\n agentData,\r\n configuration: { preventExpectedInputHint }\r\n } = useRetorik()\r\n const { cancel } = useSpeechCancelStore()\r\n const dictateState = useDictateState()[0]\r\n const microphoneButtonClick = useMicrophoneButtonClick()\r\n const [lastBotActivity] = useLastBotActivity()\r\n const markAsSpoken = useMarkActivityAsSpoken()\r\n const [utterance, setUtterance] = useState<SpeechSynthesisUtterance | null>(\r\n null\r\n )\r\n const [utteranceEnded, setUtteranceEnded] = useState<boolean>(false)\r\n const [currentActivity, setCurrentActivity] = useState<RetorikActivity>()\r\n const timerRef: React.MutableRefObject<any> = useRef(null)\r\n\r\n const ponyfill = useMemo(() => {\r\n return createSpeechSynthesisPonyfill({\r\n credentials: ponyfillCredentials\r\n })\r\n }, [ponyfillCredentials])\r\n\r\n const onVoicesChanged = (): void => {\r\n const voices = ponyfill.speechSynthesis.getVoices()\r\n if (voices && Array.isArray(voices) && voices.length > 0) {\r\n setVoice(\r\n selectVoice(\r\n ponyfill.speechSynthesis.getVoices(),\r\n locale,\r\n customVoice,\r\n agentData\r\n )\r\n )\r\n }\r\n }\r\n\r\n /**\r\n * Check activity locale in case of voice change during the speech, to keep the language defined in activity\r\n * instead of switching languages between answers that are written in the same language\r\n * @param activityLocale : string\r\n * @returns SpeechSynthesisVoice | null\r\n */\r\n const getVoiceAfterCheckingActivityLocale = (\r\n activityLocale: string\r\n ): SpeechSynthesisVoice | null => {\r\n return activityLocale === locale\r\n ? voice\r\n : selectVoice(\r\n ponyfill.speechSynthesis.getVoices(),\r\n activityLocale,\r\n customVoice,\r\n agentData\r\n )\r\n }\r\n\r\n useEffect(() => {\r\n if (ponyfill) {\r\n const voices = ponyfill.speechSynthesis.getVoices()\r\n if (voices && Array.isArray(voices) && voices.length > 0) {\r\n setVoice(\r\n selectVoice(\r\n ponyfill.speechSynthesis.getVoices(),\r\n locale,\r\n customVoice,\r\n agentData\r\n )\r\n )\r\n } else {\r\n ponyfill.speechSynthesis.onvoiceschanged = onVoicesChanged\r\n }\r\n }\r\n }, [ponyfill, customVoice, agentData, locale])\r\n\r\n /**\r\n * On call (used with the 'cancelSpeech' event is fired) :\r\n * - set speechCancelStore's cancel state to false\r\n */\r\n const cancelSpeech = (): void => {\r\n setCancel(true)\r\n }\r\n\r\n /**\r\n * On component mount :\r\n * - attach event listener to 'cancelSpeech' event\r\n * On component unmount :\r\n * - reset the timer\r\n * - detach the event listener\r\n */\r\n useEffect(() => {\r\n // Event called from the outside to cancel speech\r\n document.addEventListener('cancelSpeech', cancelSpeech)\r\n\r\n return (): void => {\r\n timerRef && clearTimeout(timerRef.current)\r\n document.removeEventListener('cancelSpeech', cancelSpeech)\r\n }\r\n }, [])\r\n\r\n /**\r\n * On ViewContext's route state change :\r\n * - when we toggle from a view to another, we reset the data related to speech\r\n */\r\n useEffect(() => {\r\n setSpeaking(false)\r\n setBoundaryData([])\r\n const ended = [...endedActivities]\r\n if (currentPlaying) {\r\n markAsSpoken(currentPlaying)\r\n // Add played activity id to context's endedActivities\r\n ended.length > 10 && ended.splice(0, 1)\r\n currentPlaying.id && ended.push(currentPlaying.id)\r\n setEndedActivities(ended)\r\n }\r\n setCurrentPlaying(undefined)\r\n setQueuedActivities([])\r\n setCancel(false)\r\n setUtterance(null)\r\n }, [route])\r\n\r\n /**\r\n * On RetorikContext's appAvailable state change :\r\n * - appAvailable is set to true after the user interacted with the loader and every needed element is loaded\r\n * - no utterance is created while appAvailable isn't true\r\n * - if during the waiting time, some activities were queued, when appAvailable comes to true, let's begin creating the utterances and playing them\r\n */\r\n useEffect(() => {\r\n if (appAvailable && queuedActivities.length > 0) {\r\n const activity = queuedActivities[0]\r\n setCurrentActivity(activity)\r\n const params: CreateUtteranceParams = {\r\n ponyfill,\r\n activity: activity,\r\n voice: getVoiceAfterCheckingActivityLocale(activity.locale || locale),\r\n locale: activity.locale || locale\r\n }\r\n const queue = [...queuedActivities]\r\n queue.splice(0, 1)\r\n setQueuedActivities(queue)\r\n setUtterance(createUtterance({ ...params }))\r\n }\r\n }, [appAvailable])\r\n\r\n /**\r\n * On speechCancelStore's cancel state change :\r\n * - if there is currently non utterance being played, reset cancel state to false\r\n * - if an utterance is being played, set it to null to stop playing and prevent data in queue from being played\r\n * - setting an utterance to null will trigger the handleUtteranceEnded method automatically\r\n */\r\n useEffect(() => {\r\n cancel && !utterance && setCancel(false)\r\n cancel && utterance && setUtterance(null)\r\n }, [cancel])\r\n\r\n /**\r\n * On lastBotActivity, ponyfill, voicesLoaded states change :\r\n * - check if the ponyfill is created and the voices loaded\r\n * - if the app is not available yet, put the activity in the queue if it is not yet inside\r\n * - NB: an activity can be received once from the directline, but can be found several times in the activities in the botframework\r\n * this is because it is processed multiple times if there is something to speak (channelDate empty, then channelData with {speak: true})\r\n * - if an utterance is being played, process the new one (do nothing / put it in the queue / stop the current one and play the new one)\r\n * - if an utterance has to be created, create it and set the utterance state\r\n */\r\n useEffect(() => {\r\n if (ponyfill) {\r\n if (lastBotActivity && lastBotActivity.id) {\r\n let createNewUtterance = false\r\n if (!appAvailable) {\r\n if (!currentReplyToId) {\r\n setCurrentReplyToId(lastBotActivity.replyToId)\r\n setQueuedActivities([lastBotActivity])\r\n } else {\r\n if (currentReplyToId === lastBotActivity.replyToId) {\r\n let count = 0\r\n if (queuedActivities.length > 0) {\r\n queuedActivities.forEach((activity: RetorikActivity) => {\r\n if (activity.id === lastBotActivity.id) {\r\n count++\r\n }\r\n })\r\n }\r\n\r\n if (count === 0) {\r\n setQueuedActivities([...queuedActivities, lastBotActivity])\r\n }\r\n } else {\r\n setCurrentReplyToId(lastBotActivity.replyToId)\r\n setQueuedActivities([lastBotActivity])\r\n }\r\n }\r\n }\r\n // If there is currently an utterance playing, verify if the replyToId is the same, if so queue the new utterance, else change the utterance with the new one\r\n else if (currentActivity) {\r\n const returnCode = checkLastbotActivity(\r\n lastBotActivity,\r\n currentActivity,\r\n currentReplyToId,\r\n queuedActivities,\r\n endedActivities\r\n )\r\n\r\n const queue = [...queuedActivities]\r\n switch (returnCode) {\r\n case 0:\r\n break\r\n case 1:\r\n // Add the activity to the queue\r\n queue.push(lastBotActivity)\r\n setQueuedActivities(queue)\r\n break\r\n case 2:\r\n // Stop current activity and play the new one\r\n setQueuedActivities([])\r\n createNewUtterance = true\r\n break\r\n }\r\n } else {\r\n createNewUtterance = !endedActivities.includes(lastBotActivity.id)\r\n }\r\n\r\n if (createNewUtterance) {\r\n setCurrentActivity(lastBotActivity)\r\n setCurrentReplyToId(lastBotActivity.replyToId)\r\n const params: CreateUtteranceParams = {\r\n ponyfill,\r\n activity: lastBotActivity,\r\n voice: getVoiceAfterCheckingActivityLocale(\r\n lastBotActivity.locale || locale\r\n ),\r\n locale: lastBotActivity.locale || locale\r\n }\r\n\r\n setUtterance(createUtterance({ ...params }))\r\n }\r\n }\r\n }\r\n }, [lastBotActivity, ponyfill])\r\n\r\n /**\r\n * On utteranceEnded state change :\r\n * - if the state is true, an utterance just ended, so the steps are :\r\n * - call the handleEnded method\r\n * - set utteranceEnded state to false to wait for another utterance end\r\n */\r\n useEffect(() => {\r\n if (utteranceEnded) {\r\n handleEnded()\r\n setUtteranceEnded(false)\r\n }\r\n }, [utteranceEnded])\r\n\r\n /**\r\n * On call :\r\n * - set speaking state to true\r\n * - clear timerref timeout\r\n * - set currentPlaying and currentReplyToId states after a small delay to prevent make sure that the display will happen after the speech has begun\r\n */\r\n const handleUtteranceStart = (): void => {\r\n setSpeaking(true)\r\n timerRef && clearTimeout(timerRef.current)\r\n timerRef.current = setTimeout(() => {\r\n setCurrentPlaying(currentActivity)\r\n }, 10)\r\n }\r\n\r\n /**\r\n * On call :\r\n * - set speaking state to false\r\n * - set utteranceEnded state to true\r\n */\r\n const handleUtteranceEnd = (): void => {\r\n setSpeaking(false)\r\n setUtteranceEnded(true)\r\n }\r\n\r\n /**\r\n * On call :\r\n * - check if opening the microphone by using inputHint: \"expectingInput\" is not disabled\r\n * - check if the current dictate state is WILL_START\r\n * - if all conditions are fulfilled, call microphoneButtonClick hook\r\n * - if the microphone isn't allowed in the navigator, the method will fail\r\n */\r\n const checkDictateState = (): void => {\r\n !preventExpectedInputHint &&\r\n dictateState === WILL_START &&\r\n microphoneButtonClick()\r\n }\r\n\r\n /**\r\n * On call :\r\n * - update the states related to the ende activity\r\n * - check if the end of the utterance was called by a cancel or not\r\n * - if it wasn't a cancel, deal with the queue\r\n * - if this was the last activity of the queue, check if the microphone has to be opened automatically (inputHint = expectingInput)\r\n */\r\n const handleEnded = (): void => {\r\n let nextUtterance: SpeechSynthesisUtterance | null = null\r\n const ended = [...endedActivities]\r\n if (currentPlaying) {\r\n // Add played activity id to context's endedActivities\r\n ended.length > 10 && ended.splice(0, 1)\r\n currentPlaying.id && ended.push(currentPlaying.id)\r\n }\r\n setCurrentPlaying(undefined)\r\n setEndedActivities(ended)\r\n // Check if the audio ended because of a cancel call\r\n if (cancel) {\r\n setQueuedActivities([])\r\n setCancel(false)\r\n } else {\r\n // Launch next activity in the queue and remove it from the queue\r\n if (queuedActivities.length > 0) {\r\n const activity = queuedActivities[0]\r\n setCurrentActivity(activity)\r\n const params: CreateUtteranceParams = {\r\n ponyfill,\r\n activity: activity,\r\n voice: getVoiceAfterCheckingActivityLocale(activity.locale || locale),\r\n locale: activity.locale || locale\r\n }\r\n nextUtterance = createUtterance({ ...params })\r\n const queue = [...queuedActivities]\r\n queue.splice(0, 1)\r\n setQueuedActivities(queue)\r\n } else {\r\n checkDictateState()\r\n }\r\n }\r\n\r\n setUtterance(nextUtterance)\r\n }\r\n\r\n return appAvailable ? (\r\n utterance ? (\r\n <div id='rf-retorik-speech'>\r\n <RetorikSpeech\r\n ponyfill={ponyfill}\r\n utterance={utterance}\r\n onStart={handleUtteranceStart}\r\n onError={handleUtteranceEnd}\r\n onEnd={handleUtteranceEnd}\r\n />\r\n </div>\r\n ) : null\r\n ) : (\r\n <div id='rf-retorik-speech'>\r\n <RetorikSpeech ponyfill={ponyfill} appAvailable={appAvailable} />\r\n </div>\r\n )\r\n}\r\n\r\nexport default SpeechManager\r\n","import type { RetorikActivity } from '../models/activityTypes'\r\n\r\n/* Return codes:\r\n 0 => do nothing\r\n 1 => add to queue\r\n 2 => stop current activity + change to the one tested\r\n*/\r\n\r\nconst checkLastbotActivity = (\r\n lastbotActivity,\r\n currentPlaying,\r\n currentReplyToId,\r\n queuedActivities,\r\n endedActivities\r\n): 0 | 1 | 2 => {\r\n // Check if the activity is the one currently being played\r\n if (lastbotActivity.id === currentPlaying.id) {\r\n return 0\r\n }\r\n // Check if the activity has already been ended\r\n if (endedActivities.includes(lastbotActivity.id)) {\r\n return 0\r\n }\r\n // Check if the activity has the same replyToId than the one currently being played\r\n if (lastbotActivity.replyToId === currentReplyToId) {\r\n // Check if the activity is already in the queue\r\n let count = 0\r\n if (queuedActivities.length > 0) {\r\n queuedActivities.forEach((activity: RetorikActivity) => {\r\n if (activity.id === lastbotActivity.id) {\r\n count++\r\n }\r\n })\r\n }\r\n\r\n if (count === 0) {\r\n return 1\r\n } else {\r\n return 0\r\n }\r\n } else {\r\n return 2\r\n }\r\n}\r\n\r\nexport default checkLastbotActivity\r\n","import React from 'react'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport { useView } from '../Contexts/ViewContext'\r\nimport translation from '../../translations/mobileLandscapePreventer.json'\r\nimport { rotatingPhoneFromVerticalToHorizontalPosition } from '../../models/urlEncodedImages'\r\n\r\nconst MobileLandscapePreventer = (): JSX.Element => {\r\n const locale = useLocaleStore((state) => state.locale)\r\n const { isMobileLandscape } = useView()\r\n\r\n return isMobileLandscape ? (\r\n <div className='rf-absolute rf-w-full rf-h-full rf-z-exitwidget rf-flex rf-flex-col rf-items-center rf-bg-truewhite'>\r\n {/* Image */}\r\n <div className='rf-h-1/2 rf-flex rf-items-end rf-pb-4'>\r\n <img\r\n className='rf-h-2/3'\r\n src={rotatingPhoneFromVerticalToHorizontalPosition}\r\n />\r\n </div>\r\n\r\n {/* Texts */}\r\n <div className='rf-h-1/2 rf-pt-4 rf-flex rf-flex-col rf-items-center'>\r\n <div className='rf-font-semibold rf-text-xl'>\r\n {translation[locale]?.firstline || translation['fr-FR'].firstline}\r\n </div>\r\n <div className='rf-font-bold rf-text-3xl'>\r\n {translation[locale]?.secondline || translation['fr-FR'].secondline}\r\n </div>\r\n </div>\r\n </div>\r\n ) : (\r\n <React.Fragment />\r\n )\r\n}\r\n\r\nexport default MobileLandscapePreventer\r\n","{\r\n \"fr-FR\": {\r\n \"firstline\": \"Pour une expérience optimale,\",\r\n \"secondline\": \"basculez votre écran\"\r\n },\r\n \"en-US\": {\r\n \"firstline\": \"For an optimal experience,\",\r\n \"secondline\": \"flip your screen\"\r\n },\r\n \"es-ES\": {\r\n \"firstline\": \"For an optimal experience,\",\r\n \"secondline\": \"flip your screen\"\r\n },\r\n \"de-DE\": {\r\n \"firstline\": \"For an optimal experience,\",\r\n \"secondline\": \"flip your screen\"\r\n }\r\n}\r\n","const rotatingPhoneFromVerticalToHorizontalPosition =\r\n 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAO4AAADuCAYAAAA+7jsiAAAABHNCSVQICAgIfAhkiAAAF/VJREFUeF7tXQkUdVMVzixjGSLCrwwViZCIIqm0pEJRMrRSmSIqJZZVi0pL0aC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jqYlwKIh/AMMxYQ56c/Dbk3Ba3UtLHOIifN7WExPejWhNtKfIJfaljLhfRDnsrs4Kybxo4vLbmvswDHB5FSdhpxSuKea4btM/gZS+DG1tiTe/KTG8D67zj1VktUDeoc0y4r4Gvv69wN8f4hp3uPAkfPbmov0VoVxdUVancT5zHJQT9H8JZU+1J+Ef043QotaWY9i85ZJMEQKjfuS8Dy8aHyVxSWBJNwiQtPxj4m4LefHWedYNIiplZOvE56VLSzDiYu6PQZtOLxT01RB4JZLx9njlguR8luXaackUIjDutvIUYFI2HMJby99COYbKvYD5XChphwCnv5Gkm0K5IPsNJeb4h8nOtKJF1+08UO4QCIwjLivBKYXDubshKjUFTr4NdTx7CuqpKpYgUIW4fMbi8y53EZRMFgH2Gu8APX2ybqj0SSNQhbj0kenYEfL+wftJ+z2N5XPdLY8oKVzmNY2ATHOdqxJ3iBH3vuHMorWnGbSO634PyuNeRJ+Geppy2jEMKi6LQF3iDvNykj8n93OrDY4t8sAvHsUgaYcAb4U50YU9xtwUgLsGeppy2a52yp0Mgf8DujwcdkiK8zwAAAAASUVORK5CYII='\r\n\r\nexport { rotatingPhoneFromVerticalToHorizontalPosition }\r\n","import React from 'react'\r\nimport { useTelemetry } from '../Contexts/TelemetryContext'\r\nimport { ErrorBoundary } from 'react-error-boundary'\r\nimport ErrorFallback from './ErrorFallback'\r\n\r\nconst ErrorCollector = ({ children }): JSX.Element => {\r\n const { sendErrorTrace } = useTelemetry()\r\n\r\n return (\r\n <ErrorBoundary FallbackComponent={ErrorFallback} onError={sendErrorTrace}>\r\n {children}\r\n </ErrorBoundary>\r\n )\r\n}\r\n\r\nexport default ErrorCollector\r\n","import React from 'react'\r\nimport { useLocaleStore } from '../Contexts/localeStore'\r\nimport translation from '../../translations/error.json'\r\n\r\nconst ErrorFallback = ({ resetErrorBoundary }): JSX.Element => {\r\n const locale = useLocaleStore((state) => state.locale)\r\n const handleReset = () => {\r\n resetErrorBoundary()\r\n window.location.reload()\r\n }\r\n\r\n return (\r\n <div className='rf-h-full rf-w-full rf-flex rf-flex-col rf-justify-center rf-items-center rf-gap-2'>\r\n <p className='rf-uppercase'>\r\n {translation[locale]?.title || translation['fr-FR'].title}\r\n </p>\r\n <button onClick={handleReset} className='rf-border rf-px-4'>\r\n {translation[locale]?.button || translation['fr-FR'].button}\r\n </button>\r\n </div>\r\n )\r\n}\r\n\r\nexport default ErrorFallback\r\n","{\r\n \"fr-FR\": {\r\n \"title\": \"une erreur est survenue\",\r\n \"button\": \"Relancer l'application\"\r\n },\r\n \"en-US\": {\r\n \"title\": \"An error occurred\",\r\n \"button\": \"Launch the application again\"\r\n },\r\n \"es-ES\": {\r\n \"title\": \"An error occurred\",\r\n \"button\": \"Launch the application again\"\r\n },\r\n \"de-DE\": {\r\n \"title\": \"An error occurred\",\r\n \"button\": \"Launch the application again\"\r\n }\r\n}\r\n","import React, { useEffect, useState } from 'react'\r\nimport type { WidgetConfiguration, WidgetFrame } from '../models/types'\r\nimport type { RetorikMainComponentProps } from '../models/retorikTypes'\r\nimport { CloseIcon } from './Icons/Miscellaneous'\r\nimport ShadowRoot from './Common/ShadowRoot'\r\nimport RetorikContainer from './Common/RetorikContainer'\r\nimport {\r\n getWidgetBorderStyle,\r\n getWidgetButtonStyle\r\n} from '../utils/getWidgetStyles'\r\nimport translation from '../translations/widget.json'\r\nimport { widgetDefault } from '../models/colors'\r\nimport {\r\n useWidgetStore,\r\n openWidget,\r\n closeWidget,\r\n toggleWidget,\r\n toggleDisplay\r\n} from './Contexts/widgetStore'\r\nimport { ContainerParent } from '../models/enums'\r\n\r\nwindow.Retorik = {\r\n ...window.Retorik,\r\n openWidget,\r\n closeWidget,\r\n toggleWidget,\r\n toggleDisplay\r\n}\r\n\r\ntype RetorikWidgetProps = {\r\n widgetConfig: WidgetConfiguration\r\n}\r\n\r\nconst RetorikWidget = (\r\n props: RetorikMainComponentProps & RetorikWidgetProps\r\n): JSX.Element => {\r\n // --------- /!\\ -----------\r\n // Ne mettre ici que de la logique spécifique au widget\r\n // Ce qui est commun avec RetorikAgent ou autres doit aller dans RetorikComposer ou ContextProvider\r\n // -------------------------\r\n\r\n const { open, loaded, widgetDisplayType } = useWidgetStore()\r\n const [currentConfiguration, setCurrentConfiguration] = useState<\r\n WidgetFrame | undefined\r\n >(props.widgetConfig?.large)\r\n const [widgetButton, setWidgetButton] = useState<string>('')\r\n const [widgetBorder, setWidgetBorder] = useState<string>('')\r\n const [mobileWidth, setMobileWidth] = useState<boolean>(\r\n window.innerWidth < 600\r\n )\r\n const [frameStyle, setFrameStyle] = useState<Record<string, any>>({})\r\n\r\n const handleResize = (): void => {\r\n setMobileWidth(window.innerWidth < 600)\r\n }\r\n\r\n useEffect(() => {\r\n setWidgetButton(getWidgetButtonStyle(props.widgetConfig?.button))\r\n window.addEventListener('resize', handleResize)\r\n\r\n return (): void => window.removeEventListener('resize', handleResize)\r\n }, [])\r\n\r\n useEffect(() => {\r\n mobileWidth\r\n ? setFrameStyle({\r\n width: open ? '100%' : '0px',\r\n height: '100%'\r\n })\r\n : setFrameStyle({\r\n top: currentConfiguration?.position?.top,\r\n bottom: currentConfiguration?.position?.bottom\r\n ? currentConfiguration?.position?.bottom\r\n : currentConfiguration?.position?.top ||\r\n currentConfiguration?.position?.left ||\r\n currentConfiguration?.position?.right\r\n ? undefined\r\n : '1rem',\r\n left: currentConfiguration?.position?.left,\r\n right: currentConfiguration?.position?.right\r\n ? currentConfiguration?.position?.right\r\n : currentConfiguration?.position?.top ||\r\n currentConfiguration?.position?.bottom ||\r\n currentConfiguration?.position?.left\r\n ? undefined\r\n : '1rem',\r\n borderColor: currentConfiguration?.border?.color || widgetDefault.rgb\r\n })\r\n }, [mobileWidth, currentConfiguration])\r\n\r\n useEffect(() => {\r\n switch (widgetDisplayType) {\r\n case 'large':\r\n setCurrentConfiguration(props.widgetConfig?.large)\r\n setWidgetBorder(getWidgetBorderStyle(props.widgetConfig?.large?.border))\r\n break\r\n case 'thumbnail':\r\n setCurrentConfiguration(\r\n props.widgetConfig?.thumbnail || props.widgetConfig?.large\r\n )\r\n setWidgetBorder(\r\n getWidgetBorderStyle(\r\n props.widgetConfig?.thumbnail?.border ||\r\n props.widgetConfig?.large?.border\r\n )\r\n )\r\n break\r\n default:\r\n break\r\n }\r\n }, [widgetDisplayType])\r\n\r\n return (\r\n <ShadowRoot>\r\n {props.widgetConfig?.button?.display !== false && (\r\n <button\r\n className={`rf-fixed rf-px-2 rf-flex rf-flex-row rf-items-center ${widgetButton}`}\r\n style={{\r\n color: props.widgetConfig?.button?.text?.color || widgetDefault.rgb,\r\n backgroundColor:\r\n props.widgetConfig?.button?.background?.color || 'transparent',\r\n borderWidth:\r\n props.widgetConfig?.button?.border?.thickness !== undefined\r\n ? `${props.widgetConfig?.button?.border?.thickness}px`\r\n : '1px',\r\n borderColor:\r\n props.widgetConfig?.button?.border?.color || widgetDefault.rgb,\r\n top: props.widgetConfig?.button?.position?.top,\r\n bottom: props.widgetConfig?.button?.position?.bottom\r\n ? props.widgetConfig?.button?.position?.bottom\r\n : props.widgetConfig?.button?.position?.top ||\r\n props.widgetConfig?.button?.position?.left ||\r\n props.widgetConfig?.button?.position?.right\r\n ? undefined\r\n : '1rem',\r\n left: props.widgetConfig?.button?.position?.left,\r\n right: props.widgetConfig?.button?.position?.right\r\n ? props.widgetConfig?.button?.position?.right\r\n : props.widgetConfig?.button?.position?.top ||\r\n props.widgetConfig?.button?.position?.bottom ||\r\n props.widgetConfig?.button?.position?.left\r\n ? undefined\r\n : '1rem'\r\n }}\r\n onClick={toggleWidget}\r\n id='retorik-widget-button'\r\n >\r\n {/* Image on the left if there is a URL and either position = 'left' or no position */}\r\n {props.widgetConfig?.button?.image?.url &&\r\n props.widgetConfig?.button?.image?.position !== 'right' && (\r\n <img\r\n className={`${\r\n props.widgetConfig?.button?.image.marginY === false\r\n ? ''\r\n : 'rf-my-1'\r\n }`}\r\n src={`${props.widgetConfig.button.image.url}`}\r\n alt='Retorik widget'\r\n style={{\r\n height: props.widgetConfig?.button?.image.height || '2rem'\r\n }}\r\n />\r\n )}\r\n {/* Text content */}\r\n <div className='rf-py-2 rf-ml-1'>\r\n {props.widgetConfig?.button?.text?.content ||\r\n (navigator.language && translation[navigator.language]?.button) ||\r\n translation['fr-FR'].button}\r\n </div>\r\n {/* Image on the right if there is a URL and position = 'right' */}\r\n {props.widgetConfig?.button?.image?.url &&\r\n props.widgetConfig?.button?.image?.position === 'right' && (\r\n <img\r\n className={`${\r\n props.widgetConfig?.button?.image.marginY === false\r\n ? ''\r\n : 'rf-my-1'\r\n }`}\r\n src={`${props.widgetConfig.button.image.url}`}\r\n alt='Retorik widget'\r\n style={{\r\n height: props.widgetConfig?.button?.image.height || '2rem'\r\n }}\r\n />\r\n )}\r\n </button>\r\n )}\r\n {loaded && (\r\n <div\r\n className={`rf-fixed rf-pt-8 rf-height-fill-available rf-transition-all rf-overflow-hidden ${\r\n mobileWidth ? 'rf-max-w-[100vw]' : 'rf-max-w-[600px]'\r\n }`}\r\n style={{\r\n ...frameStyle,\r\n width: open\r\n ? mobileWidth\r\n ? '100%'\r\n : currentConfiguration?.width || '400px'\r\n : '0px',\r\n height:\r\n currentConfiguration?.height || (mobileWidth ? '100%' : '630px')\r\n }}\r\n data-testid='widget-wrapper'\r\n >\r\n <button\r\n onClick={toggleWidget}\r\n aria-label='Close'\r\n className='rf-absolute rf-z-exitwidget rf-flex rf-right-0 rf-top-0 rf-p-1 rf-bg-truewhite rf-border rf-border-trueblack rf-rounded-lg'\r\n >\r\n <CloseIcon className='rf-h-4 rf-w-4' color='#000000' />\r\n </button>\r\n <div\r\n className={`rf-relative rf-h-full rf-w-full rf-overflow-hidden ${\r\n !mobileWidth && widgetBorder\r\n }`}\r\n style={{\r\n borderColor: frameStyle.borderColor\r\n }}\r\n >\r\n <RetorikContainer\r\n {...{\r\n parent: ContainerParent.widget,\r\n ...props,\r\n width: 'full',\r\n height: 'full',\r\n mobile: mobileWidth\r\n }}\r\n />\r\n </div>\r\n </div>\r\n )}\r\n </ShadowRoot>\r\n )\r\n}\r\n\r\nexport default RetorikWidget\r\n","// Get style for widget's border (except colors)\r\nconst getWidgetBorderStyle = (borderData): string => {\r\n if (\r\n !borderData ||\r\n (!borderData.color &&\r\n borderData.thickness === undefined &&\r\n borderData.rounded === undefined)\r\n ) {\r\n return 'rf-border rf-rounded rf-border-gray'\r\n }\r\n\r\n const borderThickness =\r\n borderData.thickness !== undefined && borderData.thickness !== 1\r\n ? `rf-border-${borderData.thickness}`\r\n : 'rf-border'\r\n const borderRounded = borderData.rounded === false ? '' : 'rf-rounded-lg'\r\n\r\n return `${borderThickness} ${borderRounded}`\r\n}\r\n\r\n// Get style for widget's button (except colors)\r\nconst getWidgetButtonStyle = (buttonData): string => {\r\n if (\r\n !buttonData ||\r\n (!buttonData.text &&\r\n !buttonData.image &&\r\n !buttonData.border &&\r\n !buttonData.background &&\r\n !buttonData.position)\r\n ) {\r\n return 'rf-rounded-lg rf-font-bold'\r\n }\r\n\r\n // Button border\r\n const borderStyle =\r\n buttonData.border?.rounded === false ? '' : 'rf-rounded-lg'\r\n\r\n // Button text\r\n const textStyle =\r\n buttonData.text?.bold && buttonData.text.bold === false\r\n ? ''\r\n : 'rf-font-bold'\r\n\r\n return `${borderStyle} ${textStyle}`\r\n}\r\n\r\nexport { getWidgetButtonStyle, getWidgetBorderStyle }\r\n","{\r\n \"fr-FR\": {\r\n \"button\": \"Besoin d'aide ?\",\r\n \"close\": \"Fermer\"\r\n },\r\n \"en-US\": {\r\n \"button\": \"Need help ?\",\r\n \"close\": \"Close\"\r\n },\r\n \"es-ES\": {\r\n \"button\": \"Need help ?\",\r\n \"close\": \"Close\"\r\n },\r\n \"de-DE\": {\r\n \"button\": \"Need help ?\",\r\n \"close\": \"Close\"\r\n }\r\n}\r\n","import React from 'react'\r\nimport type { RetorikMainComponentProps } from '../models/retorikTypes'\r\nimport ShadowRoot from './Common/ShadowRoot'\r\nimport RetorikContainer from './Common/RetorikContainer'\r\nimport { ContainerParent } from '../models/enums'\r\n\r\nconst RetorikNews = (props: RetorikMainComponentProps): JSX.Element => {\r\n // --------- /!\\ -----------\r\n // Ne mettre ici que de la logique spécifique au retorikNews\r\n // Ce qui est commun avec RetorikWidget ou autres doit aller dans RetorikComposer ou ContextProvider\r\n // -------------------------\r\n\r\n return (\r\n <ShadowRoot>\r\n <RetorikContainer {...{ parent: ContainerParent.news, ...props }} />\r\n </ShadowRoot>\r\n )\r\n}\r\n\r\nexport default RetorikNews\r\n","import { CDNCharactersAddress } from '../models/constants'\r\n\r\nconst characters = {\r\n alice: `${CDNCharactersAddress}/alice`,\r\n jeanmarc: `${CDNCharactersAddress}/jean-marc`,\r\n ikaa: `${CDNCharactersAddress}/ikaa`,\r\n karine: `${CDNCharactersAddress}/karine`,\r\n lea: `${CDNCharactersAddress}/lea`,\r\n prosper: `${CDNCharactersAddress}/prosper`,\r\n raphael: `${CDNCharactersAddress}/raphael`,\r\n zahra: `${CDNCharactersAddress}/zahra`\r\n}\r\n\r\nexport { characters }\r\n","import useLastBotActivity from './useLastBotActivity'\r\nimport type { RetorikActivity } from '../models/activityTypes'\r\n\r\nexport default function useSpeechEnded(): RetorikActivity | undefined {\r\n const [lastBotActivity] = useLastBotActivity()\r\n\r\n if (lastBotActivity?.channelData?.speak === false) {\r\n return lastBotActivity\r\n }\r\n return undefined\r\n}\r\n"],"names":[],"version":3,"file":"index.js.map","sourceRoot":"../"}