{"version":3,"sources":["common/auth-manager.ts","store/api.ts","store/positions-slice.ts","store/queues-slice.ts","common/use-token.ts","common/online-context.tsx","store/position-transfer-slice.ts","store/users-slice.ts","common/grid-mobile/use-grid-mobile-event-listener.ts","common/grid-mobile/use-grid-mobile-installation-resumed-listener.ts","store/occupancies-slice.ts","common/use-organization.ts","store/organizations-slice.ts","store/locations-slice.ts","../node_modules/dayjs/locale lazy /^/.//.*/.js$/ groupOptions: {} namespace object","init-firebase.ts","i18n.ts","containers/organization/useDayjsLocale.ts","containers/organization/useEmotionCache.ts","containers/organization/useMuiTheme.ts","containers/organization/index.tsx","containers/auth-callback.tsx","containers/logout-callback.tsx","app.tsx","service-worker.ts","index.tsx","store/types.ts","store/index.ts"],"names":["baseIdentityURLBase","window","location","hostname","baseIdentityURL","manager","UserManager","origin","authority","client_id","redirect_uri","post_logout_redirect_uri","response_type","scope","filterProtocolClaims","stateStore","WebStorageStateStore","prefix","store","localStorage","userStore","getClientSettings","getTimezoneOffset","Date","baseApiUrlBase","baseApiUrl","axiosInstance","Axios","create","baseURL","interceptors","request","use","configOld","token","getItem","internalId","config","headers","Authorization","axios","positionSchema","schema","Entity","normalizePosition","data","normalize","positionListSchema","Array","normalizePositionList","queueSchema","positions","normalizeQueue","occupancySchema","normalizeOccupancy","locationEntity","locationListSchema","normalizeLocationList","queuesSchema","processStrategy","value","id","title","displayTitle","categories","stations","emailsAllowed","queuesListSchema","normalizeQueuesList","userSchema","normalizeUser","loadQueue","createAsyncThunk","a","organization","queue","pin","get","qs","stringify","entities","setQueueOpen","open","rejectWithValue","post","response","status","statusText","setUserAvailable","isAvailable","clearQueue","clearOccupancy","createPosition","position","registrationEnabled","type","timeZoneOffset","createDigitalCallPosition","body","updateNotificationForPosition","notification","updateTagsForPosition","tags","createBooking","priority","label","errorMessage","message","assignManagerForBooking","email","assignManagerForPosition","result","unAssignManagerFromPosition","cancelPositionByUser","put","createCurbsidePickup","loadPosition","nextPosition","station","userCategories","query","checkInPosition","rejectPosition","retryPosition","checkOutOldestPosition","updatePositionNumberOfPeople","numberOfPeople","loadLocations","loadClickAndCollect","createPass","locale","activatePosition","activationNote","completePosition","cancelPositionByAdmin","undefined","params","submitFeedbackForm","feedback","subscribeClickAndCollectNotifications","registrationToken","loadPositions","isReplaceExisting","loadOrganizationPositionsByExternalId","externalId","loadOccupancy","updateOccupancy","peopleIn","peopleOut","manual","updateQueueSettings","storeCapacity","callPosition","checkOutPosition","acceptCall","loadUser","pingUser","queueId","updateUserTags","userId","updateUserCategories","loadDigitalCallPosition","fetchTimeSlots","minDate","maxDate","verifyUser","verifyUserInternalId","fetchQueue","removeDigitalCallPositionFromStore","loadPositionBySession","sessionId","length","verifyPin","notifyAboutClickAndCollectOrder","orderLink","phoneNumber","createClickAndCollectOrder","orderId","note","getClickAndCollectOrders","listOrganizationQueues","transferPositions","payload","category","agent","positionsAdapter","createEntityAdapter","setOnePosition","state","item","setOne","createSlice","name","initialState","getInitialState","reducers","extraReducers","pending","fulfilled","action","incomingPositions","positionsList","Object","entries","map","setAll","selectById","getSelectors","filter","currentPosition","_ts","forEach","upsertMany","removeMany","keys","firstItemKey","upsertOne","firstPosition","updateOne","changes","servedBy","removeOne","firstPositionId","selectPositionById","selectClickAndCollectPositions","ids","reduce","acc","push","positionsIdsSelector","positionsEntitiesSelector","positionsCombiner","positionStatus","accumulator","selectPendingPositions","createSelector","PositionStatus","Pending","selectFulfilledPositions","Fulfilled","selectNotifiedPositions","Notified","selectOrderPositions","Preorder","queuesAdapter","queues","meta","arg","selectQueueById","useToken","useLocalStorage","OnlineReactContext","React","createContext","isOnline","globalOnlineStatusSubscription","getOnlineStatusSubscription","OnlineContextProvider","children","useState","onlineContextValue","setOnlineContextValue","lastGridMobileResumedTimestamp","useGridMobileInstallationResumedListener","useEffect","start","stop","unsubscribe","subscribe","Provider","useOnlineContext","useContext","selectedPendingPositionIds","selectedNotifiedPositionIds","selectedFulfilledPositionIds","transferredPositions","positionTransferSlice","selectPendingPosition","positionId","includes","deselectPendingPosition","filteredPositions","selectAllPendingPositions","clearSelectedPendingPositions","selectNotifiedPosition","deselectNotifiedPosition","selectAllNotifiedPositions","clearSelectedNotifiedPositions","selectFulfilledPosition","deselectFulfilledPosition","selectAllFulfilledPositions","clearSelectedFulfilledPositions","filterOutSelectedPositions","positionIds","actions","getAllSelectedPositionIds","positionsTransfer","notified","user","selectUser","users","GridMobileEventType","useGridMobileEventListener","eventType","handler","eventHandler","addEventListener","removeEventListener","seLastGridMobileResumedTimestamp","InstallationResumed","now","occupanciesAdapter","occupancies","selectOccupancyById","selectAll","fetchOrganization","organizationName","Sentry","useOrganization","useParams","useQuery","refetchOnWindowFocus","cacheTime","Infinity","organizationAdapter","organizationQueues","values","selectOrganizationQueues","locationsAdapter","locations","selectAllLocations","webpackAsyncContext","req","__webpack_require__","o","Promise","resolve","then","e","Error","code","all","slice","t","module","exports","initFirebase","firebase","apiKey","projectId","messagingSenderId","appId","isSupported","messaging","usePublicVapidKey","onMessage","navigator","serviceWorker","getRegistration","registration","showNotification","err","initI18n","supportedLocales","i18n","Backend","LanguageDetector","initReactI18next","init","fallbackLng","debug","process","supportedLngs","load","interpolation","escapeValue","backend","loadPath","detection","order","caches","react","useSuspense","useDayjsLocale","language","lng","substring","loadLocale","dayjs","useEmotionCache","dir","useMemo","createCache","stylisPlugins","stylisRtl","useMuiTheme","createMuiTheme","direction","Queue","lazy","QueueList","LocationSelection","DigitalCall","defaultSupportedLocales","Organization","i18nInt","setI18n","path","useRouteMatch","organizationSupportedLocales","initLocales","useCallback","i18nGlobalInstance","emotionCache","theme","ThemeProvider","Helmet","lang","siteTitle","favicon","rel","href","exact","component","render","Title","styled","h1","ErrorTitle","OrganizationContainer","isLoading","isSuccess","isError","AuthCallback","history","useHistory","setToken","signinRedirectCallback","from","id_token","LogoutCallback","signoutRedirectCallback","App","fallback","Boolean","match","queryClient","QueryClient","dsn","enabled","jss","plugins","jssPreset","rtl","globalStyles","minireset","css","ReactDOM","StrictMode","client","StylesProvider","styles","document","getElementById","ready","unregister","catch","error","console","NotificationType","FeatureList","UserStatus","ExtraPositionStatus","CallType","Languages","RegistrationFieldType","DayOfWeek","UserType","LanguagesValues","CovidCertificateStatus","rootReducer","combineReducers","organizationQueuesReducer","queuesReducer","positionsReducer","locationsReducer","occupanciesReducer","usersReducer","positionTransferReducer","middleware","getDefaultMiddleware","configureStore","reducer","useDispatch","useReduxDispatch","adapter","key","addOne"],"mappings":"wHAAA,aAEIA,EAAsB,GAC1B,OAAQC,OAAOC,SAASC,UACtB,IAAK,YACL,IAAK,8BACHH,EAAsB,gCACtB,MACF,IAAK,0BACL,IAAK,0BACHA,EAAsB,4BACtB,MACF,IAAK,0BACL,IAAK,0BACL,IAAK,0BACL,IAAK,2BACL,IAAK,0BACL,IAAK,sBACL,IAAK,sBACL,IAAK,sBACL,IAAK,uBACL,IAAK,sBACL,IAAK,sBACL,IAAK,sBACL,QACEA,EAAsB,yBAInB,IAAMI,EAAkBJ,EAiB/B,IAAMK,EAAU,IAAIC,cAfb,WAAmD,IAChDC,EAAWN,OAAOC,SAAlBK,OACR,MAAO,CACLC,UAAWJ,EACXK,UAAW,YACXC,aAAa,GAAD,OAAKH,EAAL,kBACZI,yBAAyB,GAAD,OAAKJ,EAAL,oBACxBK,cAAe,OACfC,MAAO,eACPC,sBAAsB,EACtBC,WAAY,IAAIC,uBAAqB,CAAEC,OAAQ,OAAQC,MAAOC,eAC9DC,UAAW,IAAIJ,uBAAqB,CAAEC,OAAQ,OAAQC,MAAOC,gBAIjCE,IAEjBhB,O,0rEC/BTiB,EAAoB,WAOxB,OAFuB,IAAIC,MAAOD,qBAKhCE,EAAiB,GACrB,OAAQvB,OAAOC,SAASC,UACtB,IAAK,YACHqB,EAAiB,4BACjB,MACF,IAAK,0BACL,IAAK,sBACHA,EAAiB,qDACjB,MACF,IAAK,0BACL,IAAK,sBACHA,EAAiB,kDACjB,MACF,IAAK,0BACL,IAAK,sBACHA,EAAiB,kDACjB,MACF,IAAK,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B,IAAuBkB,UAAUvG,MAAO,SAAC6F,EAAOW,GAC/C6H,EAAoBhH,WAAWxB,EAAOc,OAAO4H,OAAO/H,EAAOjB,QAAQ+D,cAK/CkF,EAA6BH,EAAoBrH,cAAa,SAACnB,GACvF,OAAOA,EAAMyI,sBADAX,UAGAW,MAAf,S,8FClBMG,EAAmB9I,cAEZ+I,EAAY1I,YAAY,CACnCC,KAAM,YACNC,aAAcuI,EAAiBtI,kBAC/BC,SAAU,GACVC,cAAc,eACXrE,IAAcuE,UAAUvG,MAAO,SAAC6F,EAAOW,GAClCA,EAAOjB,QAAQmJ,WACjBD,EAAiBpH,WAAWxB,EAAOW,EAAOjB,QAAQmJ,gB,EAMuBD,EAAiBzH,eAAxC2H,G,EAA3C5H,W,EAAgC4G,WAEhCe,MAAf,S,0DCrBA,IAAI7H,EAAM,CACT,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,aAAc,CACb,IACA,IAED,aAAc,CACb,IACA,IAED,aAAc,CACb,IACA,IAED,aAAc,CACb,IACA,IAED,aAAc,CACb,IACA,IAED,aAAc,CACb,IACA,IAED,aAAc,CACb,IACA,IAED,UAAW,CACV,KAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,aAAc,CACb,IACA,IAED,aAAc,CACb,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,aAAc,CACb,IACA,IAED,aAAc,CACb,IACA,IAED,aAAc,CACb,IACA,IAED,aAAc,CACb,IACA,IAED,aAAc,CACb,IACA,IAED,aAAc,CACb,IACA,IAED,aAAc,CACb,IACA,IAED,aAAc,CACb,IACA,IAED,aAAc,CACb,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,aAAc,CACb,IACA,IAED,aAAc,CACb,IACA,IAED,aAAc,CACb,IACA,IAED,aAAc,CACb,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,aAAc,CACb,IACA,IAED,aAAc,CACb,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,IAED,gBAAiB,CAChB,IACA,IAED,UAAW,CACV,IACA,IAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,aAAc,CACb,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,aAAc,CACb,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,aAAc,CACb,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,aAAc,CACb,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,cAAe,CACd,IACA,KAED,aAAc,CACb,IACA,KAED,UAAW,CACV,IACA,KAED,aAAc,CACb,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,eAAgB,CACf,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,aAAc,CACb,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,WAAY,CACX,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,aAAc,CACb,IACA,KAED,WAAY,CACX,IACA,KAED,UAAW,CACV,IACA,KAED,WAAY,CACX,IACA,KAED,gBAAiB,CAChB,IACA,KAED,WAAY,CACX,IACA,KAED,aAAc,CACb,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,eAAgB,CACf,IACA,KAED,UAAW,CACV,IACA,KAED,UAAW,CACV,IACA,KAED,gBAAiB,CAChB,IACA,KAED,UAAW,CACV,IACA,KAED,aAAc,CACb,IACA,KAED,aAAc,CACb,IACA,KAED,aAAc,CACb,IACA,KAED,UAAW,CACV,IACA,MAGF,SAAS+H,EAAoBC,GAC5B,IAAIC,EAAoBC,EAAElI,EAAKgI,GAC9B,OAAOG,QAAQC,UAAUC,MAAK,WAC7B,IAAIC,EAAI,IAAIC,MAAM,uBAAyBP,EAAM,KAEjD,MADAM,EAAEE,KAAO,mBACHF,KAIR,IAAIjH,EAAMrB,EAAIgI,GAAM/Q,EAAKoK,EAAI,GAC7B,OAAO8G,QAAQM,IAAIpH,EAAIqH,MAAM,GA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,SAAAA,M,KAWL,IAYKC,EAsMAC,EAiLAC,EAnYCC,EAAkBpR,OAAOY,KAAKoQ,I,SAY/BC,K,oBAAAA,E,cAAAA,E,oBAAAA,E,cAAAA,E,cAAAA,E,cAAAA,E,gBAAAA,E,4BAAAA,E,oBAAAA,E,sCAAAA,M,cAsMAC,K,gBAAAA,E,kBAAAA,E,sBAAAA,E,oBAAAA,E,gBAAAA,E,oBAAAA,E,iBAAAA,M,cAiLAC,K,kBAAAA,E,0BAAAA,E,cAAAA,E,+BAAAA,M,KAwBL,IAqFKE,EAKAnP,G,SALAmP,K,cAAAA,E,mBAAAA,M,cAKAnP,K,cAAAA,E,kBAAAA,E,oBAAAA,E,sBAAAA,E,oBAAAA,E,sBAAAA,E,oBAAAA,E,2BAAAA,M,sCC5tBZ,8KAkBMoP,EAAcC,YAAgB,CAClC5J,mBAAoB6J,IACpB7O,OAAQ8O,IACRhb,UAAWib,IACX3J,UAAW4J,IACX7K,YAAa8K,IACb1L,MAAO2L,IACP/L,kBAAmBgM,MAGRC,EAAaC,cAUpBxd,EAAQyd,YAAe,CAC3BC,QAASZ,EACTS,eAMWI,EAAc,kBAAkDC,IAAgB,WAAhB,cAItE,SAAShT,EAAUiT,EAA2BnT,EAAYC,EAASmT,GAGxE,OAFAD,EAAQlR,UAAUjC,EAAOoT,GACzBD,EAAQE,OAAOrT,EAAOC,GACfkT,EAGM7d,Q","file":"static/js/main.85c17dc9.chunk.js","sourcesContent":["import { UserManager, UserManagerSettings, WebStorageStateStore } from 'oidc-client';\n\nlet baseIdentityURLBase = '';\nswitch (window.location.hostname) {\n case 'localhost':\n case 'queue-dev.griddeveloper.com':\n baseIdentityURLBase = 'https://id.griddeveloper.com/';\n break;\n case 'queue-qa.omborigrid.com':\n case 'queue.qa.omborigrid.com':\n baseIdentityURLBase = 'https://id-qa.ombori.com/';\n break;\n case 'queue-in.omborigrid.com':\n case 'queue-eu.omborigrid.com':\n case 'queue-au.omborigrid.com':\n case 'queue-uae.omborigrid.com':\n case 'queue-us.omborigrid.com':\n case 'queue.in.ombori.com':\n case 'queue.eu.ombori.com':\n case 'queue.au.ombori.com':\n case 'queue.uae.ombori.com':\n case 'queue.us.ombori.com':\n case 'booking.ikea.com.bh':\n case 'booking.ikea.com.sa':\n default:\n baseIdentityURLBase = 'https://id.ombori.com/';\n break;\n}\n\nexport const baseIdentityURL = baseIdentityURLBase;\n\nexport function getClientSettings(): UserManagerSettings {\n const { origin } = window.location;\n return {\n authority: baseIdentityURL,\n client_id: 'queue-app',\n redirect_uri: `${origin}/auth-callback`,\n post_logout_redirect_uri: `${origin}/logout-callback`,\n response_type: 'code',\n scope: 'openid email',\n filterProtocolClaims: true,\n stateStore: new WebStorageStateStore({ prefix: 'oidc', store: localStorage }),\n userStore: new WebStorageStateStore({ prefix: 'oidc', store: localStorage }),\n };\n}\n\nconst manager = new UserManager(getClientSettings());\n\nexport default manager;\n","import Axios from 'axios';\nimport { createAsyncThunk } from '@reduxjs/toolkit';\nimport { normalize, schema } from 'normalizr';\nimport qs from 'query-string';\nimport {\n Queue,\n Position,\n Location,\n Occupancy,\n Notification,\n User,\n Station,\n PositionFeedback,\n Tag,\n Category,\n} from './types';\n\nconst getTimezoneOffset = (): number => {\n if (process.env.NODE_ENV === 'test') {\n return 0;\n }\n\n const timeZoneOffset = new Date().getTimezoneOffset();\n\n return timeZoneOffset;\n};\n\nlet baseApiUrlBase = '';\nswitch (window.location.hostname) {\n case 'localhost':\n baseApiUrlBase = 'http://localhost:7071/api';\n break;\n case 'queue-qa.omborigrid.com':\n case 'queue.qa.ombori.com':\n baseApiUrlBase = 'https://api-qa.omborigrid.com/regions/qa/queues/v1';\n break;\n case 'queue-in.omborigrid.com':\n case 'queue.in.ombori.com':\n baseApiUrlBase = 'https://api.omborigrid.com/regions/in/queues/v1';\n break;\n case 'queue-eu.omborigrid.com':\n case 'queue.eu.ombori.com':\n baseApiUrlBase = 'https://api.omborigrid.com/regions/eu/queues/v1';\n break;\n case 'queue-au.omborigrid.com':\n case 'queue.au.ombori.com':\n baseApiUrlBase = 'https://api.omborigrid.com/regions/au/queues/v1';\n break;\n case 'queue-uae.omborigrid.com':\n case 'queue.uae.ombori.com':\n case 'booking.ikea.com.bh':\n case 'booking.ikea.com.sa':\n baseApiUrlBase = 'https://api.omborigrid.com/regions/uae/queues/v1';\n break;\n case 'queue-us.omborigrid.com':\n case 'queue.us.ombori.com':\n baseApiUrlBase = 'https://api.omborigrid.com/regions/us/queues/v1';\n break;\n case 'queue-dev.griddeveloper.com':\n case 'queue.dev.ombori.com':\n default:\n baseApiUrlBase = 'https://api.griddeveloper.com/regions/dev/queues/v1';\n break;\n}\nexport const baseApiUrl = baseApiUrlBase;\n\nexport const getRawBaseApiUrl = () => {\n const result = baseApiUrl.replace('/api', '');\n\n return result;\n};\n\nconst axiosInstance = Axios.create({\n baseURL: baseApiUrl,\n});\n\naxiosInstance.interceptors.request.use((configOld) => {\n const token = localStorage.getItem('grid-queue-app-token');\n const internalId = localStorage.getItem('grid-queue-app-internal-id');\n const config = { ...configOld };\n if (token) {\n config.headers.Authorization = `Bearer ${token}`;\n }\n if (internalId && !config.headers['X-Authorization-Internal-Id']) {\n config.headers['X-Authorization-Internal-Id'] = internalId;\n }\n\n return config;\n});\n\nexport const axios = axiosInstance;\n\nexport interface QueueOrgParams {\n organization: string;\n queue: string;\n}\n\nexport interface QueueOrgPositionParams {\n organization: string;\n queue: string;\n position: string;\n sessionId?: string;\n}\n\nexport interface OrgPositionSessionParams {\n organization: string;\n sessionId: string;\n position?: string;\n}\n\nexport interface OrgPositionParams {\n organization: string;\n position: string;\n}\n\nexport interface UserOrgParams {\n organization: string;\n}\n\nexport interface AuthenticatedParams extends QueueOrgParams {\n pin?: string;\n token?: string | null;\n station?: Station | null;\n}\n\ninterface PositionAuthenticatedParams extends AuthenticatedParams {\n position: string;\n}\nexport const positionSchema = new schema.Entity('positions');\n\nexport const normalizePosition = (data: any) =>\n normalize<\n any,\n {\n positions: { [key: string]: Position };\n }\n >(data, positionSchema);\n\nexport const positionListSchema = new schema.Array(positionSchema);\n\nexport const normalizePositionList = (data: any) =>\n normalize<\n any,\n {\n positions: { [key: string]: Position };\n }\n >(data, positionListSchema);\n\nexport const queueSchema = new schema.Entity('queues', {\n positions: [positionSchema],\n});\n\nexport const normalizeQueue = (data: any) =>\n normalize<\n any,\n {\n positions?: { [key: string]: Position };\n queues: { [key: string]: Queue };\n }\n >(data, queueSchema);\n\nexport const occupancySchema = new schema.Entity('occupancies');\n\nexport const normalizeOccupancy = (data: any) =>\n normalize<\n any,\n {\n occupancies: { [key: string]: Occupancy };\n }\n >(data, occupancySchema);\n\nexport const locationEntity = new schema.Entity('locations');\n\nexport const locationListSchema = new schema.Array(locationEntity);\n\ninterface QueuesList {\n categories: Category[];\n stations: Station[];\n id: string;\n title: string;\n displayTitle: {\n [key: string]: string;\n };\n emailsAllowed: string[];\n}\n\nconst normalizeLocationList = (data: any) =>\n normalize<\n any,\n {\n locations: { [key: string]: Location };\n }\n >(data, locationListSchema);\n\nexport const queuesSchema = new schema.Entity(\n 'queues',\n {},\n {\n processStrategy: (value) => ({\n id: value.id,\n title: value.title,\n displayTitle: value.displayTitle,\n categories: value.categories,\n stations: value.stations,\n emailsAllowed: value.emailsAllowed,\n }),\n },\n);\n\nexport const queuesListSchema = new schema.Array(queuesSchema);\n\nconst normalizeQueuesList = (data: Queue[]) =>\n normalize<\n any,\n {\n queues: Partial[];\n }\n >(data, queuesListSchema);\n\nexport const userSchema = new schema.Entity('users');\nconst normalizeUser = (data: any) =>\n normalize<\n any,\n {\n users: { [key: string]: User };\n }\n >(data, userSchema);\n\nconst loadQueuePrefixType = 'queues/loadQueue';\nexport const loadQueue = createAsyncThunk(\n loadQueuePrefixType,\n async ({ organization, queue, pin }: AuthenticatedParams) => {\n const { data } = await axios.get(\n `/organizations/${organization}/queues/${queue}?${qs.stringify({\n pin,\n })}`,\n );\n return normalizeQueue(data).entities;\n },\n);\n\nexport const setQueueOpen = createAsyncThunk(\n 'queues/setQueueOpen',\n async ({ organization, queue, pin, open }: AuthenticatedParams & { open: boolean }, { rejectWithValue }) => {\n try {\n const { data } = await axios.post(\n `organizations/${organization}/queues/${queue}/toggle-open?${qs.stringify({\n pin,\n })}`,\n {\n open,\n },\n );\n return normalizeQueue(data).entities;\n } catch (error) {\n if (error.response) {\n return rejectWithValue({\n status: error.response.status,\n statusText: error.response.statusText,\n });\n }\n throw error;\n }\n },\n);\n\nexport const setUserAvailable = createAsyncThunk(\n 'users/setAvailable',\n async ({ organization, isAvailable }: { organization: string; isAvailable: boolean }, { rejectWithValue }) => {\n try {\n const { data } = await axios.post(`organizations/${organization}/users/availablity`, {\n isAvailable,\n });\n return normalizeUser(data);\n } catch (error) {\n if (error.response) {\n return rejectWithValue({\n ...error.response,\n });\n }\n throw error;\n }\n },\n);\n\nexport const clearQueue = createAsyncThunk(\n 'queues/clearQueue',\n async ({ organization, queue, pin }: AuthenticatedParams, { rejectWithValue }) => {\n try {\n const { data } = await axios.post(\n `/organizations/${organization}/queues/${queue}/clear?${qs.stringify({\n pin,\n })}`,\n );\n return normalizeQueue(data).entities;\n } catch (error) {\n if (error.response) {\n return rejectWithValue({\n status: error.response.status,\n statusText: error.response.statusText,\n });\n }\n throw error;\n }\n },\n);\n\nexport const clearOccupancy = createAsyncThunk(\n 'queues/clearOccupancy',\n async ({ organization, queue, pin }: AuthenticatedParams, { rejectWithValue }) => {\n try {\n const { data } = await axios.post(\n `/organizations/${organization}/queues/${queue}/clear-occupancy?${qs.stringify({\n pin,\n })}`,\n );\n return normalizeQueue(data).entities;\n } catch (error) {\n if (error.response) {\n return rejectWithValue({\n status: error.response.status,\n statusText: error.response.statusText,\n });\n }\n throw error;\n }\n },\n);\n\nexport const createPosition = createAsyncThunk(\n 'positions/createPosition',\n async ({\n organization,\n queue,\n position,\n registrationEnabled = false,\n }: QueueOrgParams & { position: Partial; registrationEnabled?: boolean }) => {\n const { data } = await axios.post(\n `organizations/${organization}/queues/${queue}/positions?sendConfirmation=${position.type === 'manual'}`,\n {\n ...position,\n registrationEnabled,\n timeZoneOffset: getTimezoneOffset(),\n },\n );\n return normalizePosition(data).entities;\n },\n);\n\nexport const createDigitalCallPosition = createAsyncThunk(\n 'positions/createDigitalCallPosition',\n async ({ organization, body }: QueueOrgParams & { body: any }) => {\n const { data } = await axios.post(`organizations/${organization}/positions/call`, body);\n return normalizePosition(data).entities;\n },\n);\n\nexport const updateNotificationForPosition = createAsyncThunk(\n 'positions/updateNotificationForPosition',\n async ({ organization, queue, position, notification }: QueueOrgPositionParams & { notification: Notification }) => {\n const { data } = await axios.post(\n `organizations/${organization}/queues/${queue}/positions/${position}/update-position-notification`,\n {\n notification,\n },\n );\n return normalizePosition(data).entities;\n },\n);\n\nexport const updateTagsForPosition = createAsyncThunk(\n 'positions/updateTagsForPosition',\n async ({ organization, queue, position, tags }: QueueOrgPositionParams & { tags: string[] }) => {\n const { data } = await axios.post(\n `organizations/${organization}/queues/${queue}/positions/${position}/update-position-tags`,\n {\n tags,\n },\n );\n return normalizePosition(data).entities;\n },\n);\n\nexport type BookingPosition = Position & Required>;\ntype CurbsidePickupPosition = Position & Required>;\n\nexport const createBooking = createAsyncThunk(\n 'positions/createBooking',\n async ({ organization, queue, position }: QueueOrgParams & { position: BookingPosition }, { rejectWithValue }) => {\n try {\n const { data } = await axios.post(`organizations/${organization}/queues/${queue}/bookings`, {\n ...position,\n type: 'booking',\n status: 'draft',\n priority: 100,\n label: '',\n timeZoneOffset: getTimezoneOffset(),\n });\n return normalizePosition(data).entities;\n } catch (error) {\n if (error.response) {\n return rejectWithValue({\n errorMessage: error.response.data.message,\n });\n }\n throw error;\n }\n },\n);\n\nexport const assignManagerForBooking = createAsyncThunk(\n 'positions/assignManagerForBooking',\n async ({ organization, queue, position, email }: QueueOrgPositionParams & { email: string }) => {\n const { data } = await axios.post(\n `organizations/${organization}/queues/${queue}/positions/${position}/assign-booking-manager`,\n {\n email,\n },\n );\n return normalizePosition(data).entities;\n },\n);\n\nexport const assignManagerForPosition = createAsyncThunk(\n 'positions/assignManagerForPosition',\n async ({ organization, queue, position, email }: QueueOrgPositionParams & { email: string }) => {\n const { data } = await axios.post(\n `organizations/${organization}/queues/${queue}/positions/${position}/assign-manager`,\n {\n email,\n },\n );\n\n const result = normalizePosition(data).entities;\n\n return result;\n },\n);\n\nexport const unAssignManagerFromPosition = createAsyncThunk(\n 'positions/unAssignManagerFromPosition',\n async ({ organization, queue, position }: QueueOrgPositionParams) => {\n const { data } = await axios.post(\n `organizations/${organization}/queues/${queue}/positions/${position}/unassign-manager`,\n );\n\n const result = normalizePosition(data).entities;\n\n return result;\n },\n);\n\nexport const cancelPositionByUser = createAsyncThunk(\n 'position/cancelPositionByUser',\n async ({ organization, queue, position }: QueueOrgParams & { position: string }, { rejectWithValue }) => {\n try {\n const { data } = await axios.put(\n `organizations/${organization}/queues/${queue}/positions/${position}/cancel-position`,\n {},\n );\n return normalizePosition(data).entities;\n } catch (error) {\n if (error.response) {\n return rejectWithValue({\n status: error.response.status,\n statusText: error.response.statusText,\n });\n }\n throw error;\n }\n },\n);\n\nexport const createCurbsidePickup = createAsyncThunk(\n 'positions/createPickupTicket',\n async ({ organization, queue, position }: QueueOrgParams & { position: CurbsidePickupPosition }) => {\n const { data } = await axios.post(`organizations/${organization}/queues/${queue}/bookings`, {\n ...position,\n type: 'curbsidePickup',\n status: 'draft',\n priority: 0,\n label: '',\n timeZoneOffset: getTimezoneOffset(),\n });\n return normalizePosition(data).entities;\n },\n);\n\nexport const loadPosition = createAsyncThunk(\n 'positions/loadPosition',\n async ({ organization, queue, position }: QueueOrgPositionParams) => {\n const { data } = await axios.get(`/organizations/${organization}/queues/${queue}/positions/${position}`);\n return normalizePosition(data).entities;\n },\n);\n\ninterface NextPositionProps extends AuthenticatedParams {\n userCategories?: string[];\n}\n\nexport const nextPosition = createAsyncThunk(\n 'positions/nextPosition',\n async ({ organization, queue, pin, station, userCategories }: NextPositionProps, { rejectWithValue }) => {\n const query = qs.stringify({ pin });\n\n try {\n const { data } = await axios.post(`organizations/${organization}/queues/${queue}/next?${query}`, {\n station,\n userCategories,\n });\n return normalizePosition(data).entities;\n } catch (error) {\n if (error.response) {\n return rejectWithValue({\n status: error.response.status,\n statusText: error.response.statusText,\n positions: [],\n });\n }\n throw error;\n }\n },\n);\n\nexport const checkInPosition = createAsyncThunk(\n 'positions/checkInPosition',\n async ({ organization, queue, pin, position }: AuthenticatedParams & { position: string }, { rejectWithValue }) => {\n try {\n const { data } = await axios.post(\n `organizations/${organization}/queues/${queue}/positions/${position}/check-in?${qs.stringify({\n pin,\n })}`,\n );\n return normalizePosition(data).entities;\n } catch (error) {\n if (error.response) {\n return rejectWithValue({\n status: error.response.status,\n statusText: error.response.statusText,\n positions: [],\n });\n }\n throw error;\n }\n },\n);\n\nexport const rejectPosition = createAsyncThunk(\n 'positions/rejectPosition',\n async ({ organization, queue, pin, position }: AuthenticatedParams & { position: string }, { rejectWithValue }) => {\n try {\n const { data } = await axios.post(\n `organizations/${organization}/queues/${queue}/positions/${position}/reject?${qs.stringify({\n pin,\n })}`,\n );\n return normalizePosition(data).entities;\n } catch (error) {\n if (error.response) {\n return rejectWithValue({\n status: error.response.status,\n statusText: error.response.statusText,\n positions: [],\n });\n }\n throw error;\n }\n },\n);\n\nexport const retryPosition = createAsyncThunk(\n 'positions/retryPosition',\n async ({ organization, queue, pin, position }: AuthenticatedParams & { position: string }) => {\n const { data } = await axios.post(\n `organizations/${organization}/queues/${queue}/positions/${position}/retry?${qs.stringify({\n pin,\n })}`,\n );\n return normalizePosition(data).entities;\n },\n);\n\nexport const checkOutOldestPosition = createAsyncThunk(\n 'positions/checkOutOldestPosition',\n async ({ organization, queue, pin }: AuthenticatedParams, { rejectWithValue }) => {\n try {\n const { data } = await axios.post(\n `organizations/${organization}/queues/${queue}/check-out?${qs.stringify({\n pin,\n })}`,\n );\n return normalizePosition(data).entities;\n } catch (error) {\n if (error.response) {\n return rejectWithValue({\n status: error.response.status,\n statusText: error.response.statusText,\n });\n }\n throw error;\n }\n },\n);\n\nexport const updatePositionNumberOfPeople = createAsyncThunk(\n 'positions/updatePositionNumberOfPeople',\n async ({ numberOfPeople, organization, queue, position }: QueueOrgPositionParams & { numberOfPeople: number }) => {\n const { data } = await axios.post(\n `/organizations/${organization}/queues/${queue}/positions/${position}/number-of-people`,\n {\n numberOfPeople,\n },\n );\n return normalizePosition(data).entities;\n },\n);\n\nexport const loadLocations = createAsyncThunk(\n 'locations/loadLocations',\n async ({ organization }: Pick) => {\n const { data } = await axios.get(`/organizations/${organization}/locations`);\n return normalizeLocationList(data).entities;\n },\n);\n\nconst loadClickAndCollectPrefixType = 'queues/loadClickAndCollect';\nexport const loadClickAndCollect = createAsyncThunk(\n loadClickAndCollectPrefixType,\n async ({ organization, queue, pin }: AuthenticatedParams) => {\n const { data } = await axios.get(\n `/organizations/${organization}/queues/${queue}/click-and-collect?${qs.stringify({\n pin,\n })}`,\n );\n return normalizePositionList(data).entities;\n },\n);\n\nexport const createPass = createAsyncThunk(\n 'passes/createPass',\n async ({ organization, queue, locale }: QueueOrgParams & { locale: string }) => {\n const { data } = await axios.post(`organizations/${organization}/queues/${queue}/passes`, {\n locale,\n });\n return normalizePosition(data).entities;\n },\n);\n\nexport const activatePosition = createAsyncThunk(\n 'positions/activatePosition',\n async ({ organization, queue, position, activationNote }: QueueOrgPositionParams & { activationNote: string }) => {\n const { data } = await axios.post(`/organizations/${organization}/queues/${queue}/positions/${position}/activate`, {\n activationNote,\n });\n return normalizePosition(data).entities;\n },\n);\n\nexport const completePosition = createAsyncThunk(\n 'positions/completePosition',\n async ({ organization, queue, position }: QueueOrgPositionParams) => {\n const { data } = await axios.post(`/organizations/${organization}/queues/${queue}/positions/${position}/complete`);\n return normalizePosition(data).entities;\n },\n);\n\nexport const cancelPositionByAdmin = createAsyncThunk(\n 'positions/cancelPositionByAdmin',\n async ({ organization, queue, position, pin }: AuthenticatedParams & QueueOrgPositionParams) => {\n const { data } = await axios.post(\n `/organizations/${organization}/queues/${queue}/positions/${position}/admin-cancel`,\n undefined,\n {\n params: {\n pin,\n },\n },\n );\n return normalizePosition(data).entities;\n },\n);\n\nexport const submitFeedbackForm = createAsyncThunk(\n 'positions/submitFeedbackForm',\n async ({ organization, queue, position, feedback }: QueueOrgPositionParams & { feedback: PositionFeedback }) => {\n const { data } = await axios.post(\n `organizations/${organization}/queues/${queue}/positions/${position}/update-position-feedback`,\n {\n feedback,\n },\n );\n return normalizePosition(data).entities;\n },\n);\n\nexport const subscribeClickAndCollectNotifications = createAsyncThunk(\n 'queues/subscribeClickAndCollectNotifications',\n async ({ organization, queue, pin, registrationToken }: AuthenticatedParams & { registrationToken: string }) => {\n await axios.post(\n `/organizations/${organization}/queues/${queue}/click-and-collect/subscribe?${qs.stringify({\n pin,\n })}`,\n {\n registrationToken,\n },\n );\n },\n);\n\ninterface LoadPositionProps extends AuthenticatedParams {\n isReplaceExisting?: boolean;\n}\n\nconst loadPositionsPrefixType = 'queues/loadPositions';\nexport const loadPositions = createAsyncThunk(\n loadPositionsPrefixType,\n async ({ organization, queue, pin, isReplaceExisting = false }: LoadPositionProps) => {\n const { data } = await axios.get(\n `/organizations/${organization}/queues/${queue}/positions?${qs.stringify({\n pin,\n })}`,\n );\n\n return { data: normalizePositionList(data).entities, isReplaceExisting };\n },\n);\n\nexport const loadPositionsByExternalId = createAsyncThunk(\n 'queues/loadPositionsByExternalId',\n async ({ organization, queue, externalId }: QueueOrgParams & { externalId: string }) => {\n const { data } = await axios.get(\n `/organizations/${organization}/queues/${queue}/positions-by-externalId?externalId=${externalId}`,\n );\n return normalizePositionList(data).entities;\n },\n);\n\nexport const loadOrganizationPositionsByExternalId = createAsyncThunk(\n 'queues/loadOrganizationPositionsByExternalId',\n async ({ organization, externalId }: { organization: string; externalId: string }) => {\n const { data } = await axios.get(`/organizations/${organization}/positions-by-externalId?externalId=${externalId}`);\n return normalizePositionList(data).entities;\n },\n);\n\nconst loadOccupancyPrefixType = 'occupancies/loadOccupancy';\nexport const loadOccupancy = createAsyncThunk(\n loadOccupancyPrefixType,\n async ({ organization, queue }: QueueOrgParams) => {\n const { data } = await axios.get(`/organizations/${organization}/queues/${queue}/occupancy`);\n return normalizeOccupancy(data).entities;\n },\n);\n\nexport const updateOccupancy = createAsyncThunk(\n 'occupancies/updateOccupancy',\n async ({\n organization,\n queue,\n pin,\n peopleIn = 0,\n peopleOut = 0,\n manual = true,\n }: AuthenticatedParams & { peopleIn?: number; peopleOut?: number; manual?: boolean }) => {\n const { data } = await axios.post(\n `/organizations/${organization}/queues/${queue}/occupancy?${qs.stringify({\n pin,\n manual,\n })}`,\n {\n peopleIn,\n peopleOut,\n },\n );\n return normalizeOccupancy(data).entities;\n },\n);\n\nexport const updateQueueSettings = createAsyncThunk(\n 'queues/updateQueueSettings',\n async ({ organization, queue, pin, storeCapacity }: AuthenticatedParams & { storeCapacity: number }) => {\n const { data } = await axios.post(\n `/organizations/${organization}/queues/${queue}/settings?${qs.stringify({\n pin,\n })}`,\n {\n storeCapacity,\n },\n );\n return normalizeQueue(data).entities;\n },\n);\n\nexport const callPosition = createAsyncThunk(\n 'positions/callPosition',\n async (\n { organization, queue, pin, position, station }: AuthenticatedParams & { position: string },\n { rejectWithValue },\n ) => {\n const query = qs.stringify({ pin });\n\n try {\n const { data } = await axios.post(\n `organizations/${organization}/queues/${queue}/positions/${position}/call?${query}`,\n {\n station,\n },\n );\n return normalizePosition(data).entities;\n } catch (error) {\n if (error.response) {\n return rejectWithValue({\n status: error.response.status,\n statusText: error.response.statusText,\n positions: [],\n });\n }\n throw error;\n }\n },\n);\n\nexport const checkOutPosition = createAsyncThunk(\n 'positions/checkOutPosition',\n async ({ organization, queue, pin, position }: AuthenticatedParams & { position: string }, { rejectWithValue }) => {\n try {\n const { data } = await axios.post(\n `organizations/${organization}/queues/${queue}/positions/${position}/check-out?${qs.stringify({\n pin,\n })}`,\n );\n return normalizePosition(data).entities;\n } catch (error) {\n if (error.response) {\n return rejectWithValue({\n status: error.response.status,\n statusText: error.response.statusText,\n positions: [],\n });\n }\n throw error;\n }\n },\n);\n\nexport const acceptCall = createAsyncThunk(\n 'positions/acceptCall',\n async (\n { organization, queue, pin, position, internalId }: PositionAuthenticatedParams & { internalId?: string },\n { rejectWithValue },\n ) => {\n try {\n const { data } = await axios.post(\n `organizations/${organization}/queues/${queue}/positions/${position}/accept-call?${qs.stringify({\n pin,\n })}`,\n {},\n {\n headers: internalId ? { 'X-Authorization-Internal-Id': `${internalId}` } : {},\n },\n );\n return data;\n } catch (error) {\n if (error.response) {\n return rejectWithValue({\n status: error.response.status,\n statusText: error.response.statusText,\n positions: [],\n });\n }\n throw error;\n }\n },\n);\n\nexport const loadUser = createAsyncThunk('users/loadUser', async ({ organization }: { organization: string }) => {\n const { data } = await axios.get(`/organizations/${organization}/me`);\n return normalizeUser(data);\n});\n\nexport const pingUser = createAsyncThunk(\n 'users/pingUser',\n async ({ organization, queue }: { organization: string; queue: string }, { rejectWithValue }) => {\n try {\n const { data } = await axios.post(`/organizations/${organization}/users/ping`, { queueId: queue });\n return data;\n } catch (error) {\n if (error.response) {\n return rejectWithValue({\n status: error.response.status,\n statusText: error.response.statusText,\n });\n }\n throw error;\n }\n },\n);\n\nexport const updateUserTags = createAsyncThunk(\n 'users/updateTags',\n async ({ organization, userId, tags }: { organization: string; userId: string; tags: Tag[] }) => {\n const { data } = await axios.post(`/organizations/${organization}/users/${userId}/tags`, {\n tags,\n });\n\n return normalizeUser(data);\n },\n);\n\nexport const updateUserCategories = createAsyncThunk(\n 'users/updateCategories',\n async ({ organization, userId, categories }: { organization: string; userId: string; categories: string[] }) => {\n const { data } = await axios.post(`/organizations/${organization}/users/${userId}/categories`, {\n categories,\n });\n\n return normalizeUser(data);\n },\n);\n\nexport const loadDigitalCallPosition = createAsyncThunk(\n 'positions/loadDigitalCallPosition',\n async ({ organization, position }: OrgPositionParams) => {\n const { data } = await axios.get(`/organizations/${organization}/digital-call/${position}`);\n return normalizePosition(data).entities;\n },\n);\n\nexport const fetchTimeSlots = async (organization: string, queue: string, minDate?: string, maxDate?: string) =>\n axios.get(`/organizations/${organization}/queues/${queue}/timeslots`, {\n params: {\n minDate,\n maxDate,\n },\n });\n\nexport const verifyUser = (organization: string, queue: string, internalId?: string | null) => {\n return axios.post(\n `/organizations/${organization}/queues/${queue}/verify-user`,\n {},\n {\n headers: internalId ? { 'X-Authorization-Internal-Id': `${internalId}` } : {},\n },\n );\n};\n\nexport const verifyUserInternalId = (organization: string, queue: string, internalId: string) =>\n axios.post(\n `organizations/${organization}/queues/${queue}/verify-user-internal-id`,\n {},\n {\n headers: { 'X-Authorization-Internal-Id': `${internalId}` },\n },\n );\n\nexport const fetchQueue = async ({ organization, queue }: QueueOrgParams): Promise => {\n const { data } = await axios.get(`/organizations/${organization}/queues/${queue}`);\n\n return data;\n};\n\nexport const removeDigitalCallPositionFromStore = createAsyncThunk(\n 'positions/removeDigitalCallPosition',\n async (position: Position) => {\n return normalizePosition(position).entities;\n },\n);\n\nexport const loadPositionBySession = createAsyncThunk(\n 'positions/loadPositionBySession',\n async ({ organization, sessionId }: OrgPositionSessionParams) => {\n const { data } = await axios.get(\n `/organizations/${organization}/positions/active-by-sessionId?sessionId=${sessionId}`,\n );\n if (!data || !data.length) {\n return {};\n }\n return normalizePosition(data[0]).entities;\n },\n);\n\nexport const verifyPin = (organization: string, queue: string, pin: string) =>\n axios.post(`organizations/${organization}/queues/${queue}/verify-pin`, pin, {\n headers: { 'Content-Type': 'text/plain' },\n });\n\ninterface NotifyAboutClickAndCollectOrderProps {\n organization: string;\n queue: string;\n orderLink: string;\n phoneNumber: string;\n locale: string;\n}\n\nexport const notifyAboutClickAndCollectOrder = ({\n organization,\n queue,\n orderLink,\n phoneNumber,\n locale,\n}: NotifyAboutClickAndCollectOrderProps): Promise =>\n axios.post(`organizations/${organization}/queues/${queue}/click-and-collect/notify`, {\n orderLink,\n phoneNumber,\n locale,\n });\n\ninterface CreateClickAndCollectOrderProps extends QueueOrgParams {\n minDate: number;\n maxDate: number;\n orderId: string;\n phoneNumber: string;\n note?: string;\n}\n\ninterface TransferPositionsPayload {\n positions: string[];\n queue?: string;\n category?: string;\n station?: string;\n agent?: string;\n}\n\nexport const createClickAndCollectOrder = createAsyncThunk(\n 'positions/createClickAndCollectOrder',\n async ({ organization, queue, minDate, maxDate, orderId, phoneNumber, note }: CreateClickAndCollectOrderProps) => {\n const { data } = await axios.post(`organizations/${organization}/queues/${queue}/click-and-collect/orders`, {\n minDate,\n maxDate,\n orderId,\n phoneNumber,\n note,\n });\n\n return normalizePosition(data).entities;\n },\n);\n\nexport const getClickAndCollectOrders = createAsyncThunk(\n 'positions/getClickAndCollectOrders',\n async ({ organization, queue }: QueueOrgParams) => {\n const { data } = await axios.get(`/organizations/${organization}/queues/${queue}/click-and-collect/orders`);\n\n return normalizePositionList(data).entities;\n },\n);\n\nexport const listOrganizationQueues = createAsyncThunk(\n 'organization/loadQueues',\n async ({ organization }: Pick) => {\n const { data } = await axios.get(`/organizations/${organization}/user-queues`);\n return normalizeQueuesList(data).entities;\n },\n);\n\nexport const transferPositions = createAsyncThunk(\n 'queues/transfer-positions',\n async (\n {\n payload: { positions, category, station, agent, queue },\n params,\n }: {\n payload: TransferPositionsPayload;\n params: QueueOrgParams;\n },\n { rejectWithValue },\n ) => {\n try {\n const { data } = await axios.post(\n `/organizations/${params.organization}/queues/${params.queue}/positions-transfer`,\n {\n queue,\n positions,\n category,\n station,\n agent,\n },\n );\n return normalizePosition(data).entities;\n } catch (error) {\n if (error.response) {\n return rejectWithValue({\n status: error.response.status,\n statusText: error.response.statusText,\n positions: [],\n });\n }\n throw error;\n }\n },\n);\n","import { createEntityAdapter, createSlice, createSelector, Dictionary, EntityId } from '@reduxjs/toolkit';\nimport { Position, PositionStatus } from './types';\n// eslint-disable-next-line import/no-cycle\nimport { AppState, setOne } from './index';\nimport {\n activatePosition,\n callPosition,\n cancelPositionByAdmin,\n checkInPosition,\n completePosition,\n createPosition,\n loadClickAndCollect,\n loadPosition,\n loadPositions,\n nextPosition,\n updateNotificationForPosition,\n cancelPositionByUser,\n updatePositionNumberOfPeople,\n createDigitalCallPosition,\n loadDigitalCallPosition,\n submitFeedbackForm,\n assignManagerForBooking,\n assignManagerForPosition,\n unAssignManagerFromPosition,\n removeDigitalCallPositionFromStore,\n checkOutOldestPosition,\n checkOutPosition,\n rejectPosition,\n retryPosition,\n loadPositionBySession,\n createClickAndCollectOrder,\n getClickAndCollectOrders,\n} from './api';\n\nconst positionsAdapter = createEntityAdapter();\n\nconst setOnePosition = (state: any, item: Position) => {\n return setOne(positionsAdapter, state, item, item.id);\n};\n\nexport const positions = createSlice({\n name: 'positions',\n initialState: positionsAdapter.getInitialState(),\n reducers: {},\n extraReducers: {\n [loadPositions.pending.type]: (state) => ({\n ...state,\n }),\n [loadPositions.fulfilled.type]: (\n state,\n action: { payload: { data: { positions: undefined | { [id: string]: Position } }; isReplaceExisting: boolean } },\n ) => {\n // if it's not socket - we just got all positions and need to sync them as they are\n const incomingPositions = action.payload.data.positions;\n if (action.payload.isReplaceExisting) {\n // if there is no positions - no tickets in the queue\n const positionsList = Object.entries(incomingPositions ?? {}).map(([, position]) => position);\n positionsAdapter.setAll(state, positionsList);\n return;\n }\n // if it's socket - we should update positions which we got but not the rest\n if (!incomingPositions) return;\n\n const { selectById } = positionsAdapter.getSelectors();\n\n const entries = Object.entries(incomingPositions);\n\n entries\n .filter(([id, position]) => {\n const currentPosition = selectById(state, id);\n\n if (!currentPosition) return true;\n\n // eslint-disable-next-line no-underscore-dangle\n if (!position._ts || !currentPosition._ts) return true;\n\n // eslint-disable-next-line no-underscore-dangle\n const result = position._ts >= currentPosition._ts;\n\n return result;\n })\n .forEach(([, position]) => setOnePosition(state, position));\n },\n [loadClickAndCollect.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n positionsAdapter.upsertMany(state, action.payload.positions);\n }\n },\n [loadPosition.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n Object.entries(action.payload.positions).forEach(([, item]) => {\n setOnePosition(state, item as Position);\n });\n }\n },\n [activatePosition.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n positionsAdapter.upsertMany(state, action.payload.positions);\n }\n },\n [completePosition.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n positionsAdapter.upsertMany(state, action.payload.positions);\n }\n },\n [rejectPosition.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n positionsAdapter.upsertMany(state, action.payload.positions);\n }\n },\n [cancelPositionByAdmin.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n positionsAdapter.removeMany(state, Object.keys(action.payload.positions));\n }\n },\n [createPosition.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n positionsAdapter.upsertMany(state, action.payload.positions);\n }\n },\n [createDigitalCallPosition.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n const firstItemKey = Object.keys(action.payload.positions)[0];\n positionsAdapter.upsertOne(state, action.payload.positions[firstItemKey]);\n }\n },\n [nextPosition.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n positionsAdapter.upsertMany(state, action.payload.positions);\n }\n },\n [callPosition.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n positionsAdapter.upsertMany(state, action.payload.positions);\n }\n },\n [retryPosition.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n const firstItemKey = Object.keys(action.payload.positions)[0];\n const firstPosition = action.payload.positions[firstItemKey];\n positionsAdapter.updateOne(state, {\n id: firstItemKey,\n changes: { ...firstPosition, servedBy: firstPosition.servedBy ?? undefined },\n });\n }\n },\n [updateNotificationForPosition.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n positionsAdapter.upsertMany(state, action.payload.positions);\n }\n },\n [checkInPosition.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n positionsAdapter.upsertMany(state, action.payload.positions);\n }\n },\n [checkOutOldestPosition.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n positionsAdapter.upsertMany(state, action.payload.positions);\n }\n },\n [cancelPositionByUser.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n positionsAdapter.upsertMany(state, action.payload.positions);\n }\n },\n [updatePositionNumberOfPeople.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n positionsAdapter.upsertMany(state, action.payload.positions);\n }\n },\n [checkOutPosition.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n positionsAdapter.upsertMany(state, action.payload.positions);\n }\n },\n [loadDigitalCallPosition.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n positionsAdapter.upsertMany(state, action.payload.positions);\n }\n },\n [removeDigitalCallPositionFromStore.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n positionsAdapter.removeOne(state, Object.keys(action.payload.positions)[0]);\n }\n },\n [submitFeedbackForm.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n positionsAdapter.upsertMany(state, action.payload.positions);\n }\n },\n [assignManagerForBooking.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n positionsAdapter.upsertMany(state, action.payload.positions);\n }\n },\n [assignManagerForPosition.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n positionsAdapter.upsertMany(state, action.payload.positions);\n }\n },\n [unAssignManagerFromPosition.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n const firstPositionId = Object.keys(action.payload.positions)[0];\n const firstPosition = action.payload.positions[firstPositionId];\n\n positionsAdapter.updateOne(state, { id: firstPositionId, changes: { ...firstPosition, servedBy: undefined } });\n }\n },\n [loadPositionBySession.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n positionsAdapter.upsertMany(state, action.payload.positions);\n }\n },\n [createClickAndCollectOrder.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n positionsAdapter.upsertMany(state, action.payload.positions);\n }\n },\n [getClickAndCollectOrders.fulfilled.type]: (state, action) => {\n if (action.payload.positions) {\n positionsAdapter.upsertMany(state, action.payload.positions);\n }\n },\n },\n});\n\nexport const { selectById: selectPositionById } = positionsAdapter.getSelectors();\n\nexport const selectClickAndCollectPositions = (state: AppState, queue: string) =>\n (state.positions.ids as string[]).reduce((acc, id: string) => {\n const position = state.positions.entities[id];\n if (\n position &&\n position.queue === queue &&\n (position.type === 'storePickup' || position.type === 'curbsidePickup')\n ) {\n acc.push(position);\n }\n return acc;\n }, [] as Position[]);\n\nconst positionsIdsSelector = (state: AppState) => state.positions.ids;\nconst positionsEntitiesSelector = (state: AppState) => state.positions.entities;\n\nconst positionsCombiner = (positionStatus: PositionStatus) => (ids: EntityId[], entities: Dictionary) => {\n const result = ids\n .reduce((accumulator, id) => {\n const position = entities[id];\n\n if (!position) return accumulator;\n\n return [...accumulator, position];\n }, [])\n .filter((position) => position.status === positionStatus);\n\n return result;\n};\n\nexport const selectPendingPositions = createSelector(\n positionsIdsSelector,\n positionsEntitiesSelector,\n positionsCombiner(PositionStatus.Pending),\n);\n\nexport const selectFulfilledPositions = createSelector(\n positionsIdsSelector,\n positionsEntitiesSelector,\n positionsCombiner(PositionStatus.Fulfilled),\n);\n\nexport const selectNotifiedPositions = createSelector(\n positionsIdsSelector,\n positionsEntitiesSelector,\n positionsCombiner(PositionStatus.Notified),\n);\n\nexport const selectOrderPositions = createSelector(\n positionsIdsSelector,\n positionsEntitiesSelector,\n positionsCombiner(PositionStatus.Preorder),\n);\n\nexport default positions.reducer;\n","import { createEntityAdapter, createSlice } from '@reduxjs/toolkit';\nimport { Queue } from './types';\nimport { clearOccupancy, clearQueue, loadQueue, setQueueOpen, updateQueueSettings } from './api';\n\nconst queuesAdapter = createEntityAdapter();\n\nexport const queues = createSlice({\n name: 'queues',\n initialState: queuesAdapter.getInitialState(),\n reducers: {},\n extraReducers: {\n [loadQueue.fulfilled.type]: (state, action) => {\n if (action.payload.queues) {\n queuesAdapter.upsertMany(state, action.payload.queues);\n }\n },\n [updateQueueSettings.fulfilled.type]: (state, action) => {\n queuesAdapter.upsertMany(state, action.payload.queues);\n },\n [setQueueOpen.pending.type]: (state, action) => {\n queuesAdapter.updateOne(state, {\n id: action.meta.arg.queue,\n changes: {\n open: action.meta.arg.open,\n },\n });\n },\n [setQueueOpen.fulfilled.type]: (state, action) => {\n queuesAdapter.upsertMany(state, action.payload.queues);\n },\n [clearQueue.fulfilled.type]: (state, action) => {\n queuesAdapter.upsertMany(state, action.payload.queues);\n },\n [clearOccupancy.fulfilled.type]: (state, action) => {\n queuesAdapter.upsertMany(state, action.payload.queues);\n },\n },\n});\n\nexport const { selectById: selectQueueById } = queuesAdapter.getSelectors();\n\nexport default queues.reducer;\n","import { useLocalStorage } from '@rehooks/local-storage';\n\nconst useToken = () => useLocalStorage(`grid-queue-app-token`);\n\nexport default useToken;\n","import React, { ReactNode, useContext, useEffect, useState } from 'react';\nimport { getOnlineStatusSubscription } from '@ombori/grid-signals-react';\nimport useGridMobileInstallationResumedListener from './grid-mobile/use-grid-mobile-installation-resumed-listener';\n\nconst OnlineReactContext = React.createContext({\n isOnline: true,\n});\n\ninterface OnlineContextProviderProps {\n children?: ReactNode;\n}\n\nconst globalOnlineStatusSubscription = getOnlineStatusSubscription();\n\nexport const OnlineContextProvider = ({ children }: OnlineContextProviderProps) => {\n const [onlineContextValue, setOnlineContextValue] = useState({ isOnline: true });\n const { lastGridMobileResumedTimestamp } = useGridMobileInstallationResumedListener();\n\n useEffect(() => {\n globalOnlineStatusSubscription.start();\n\n return () => {\n globalOnlineStatusSubscription.stop();\n };\n }, [lastGridMobileResumedTimestamp]);\n\n useEffect(() => {\n const unsubscribe = globalOnlineStatusSubscription.subscribe((isOnline) => {\n setOnlineContextValue({ isOnline });\n });\n\n return () => {\n unsubscribe();\n };\n }, [setOnlineContextValue]);\n\n return {children};\n};\n\nexport const useOnlineContext = () => {\n return useContext(OnlineReactContext);\n};\n","import { createEntityAdapter, createSlice } from '@reduxjs/toolkit';\nimport { transferPositions } from './api';\nimport { Position } from './types';\n\ninterface PositionState {\n selectedPendingPositionIds: string[];\n selectedNotifiedPositionIds: string[];\n selectedFulfilledPositionIds: string[];\n transferredPositions: Position[];\n}\n\nconst positionsAdapter = createEntityAdapter();\n\nconst initialState = positionsAdapter.getInitialState({\n selectedPendingPositionIds: [],\n selectedNotifiedPositionIds: [],\n selectedFulfilledPositionIds: [],\n transferredPositions: [],\n});\n\nconst positionTransferSlice = createSlice({\n name: 'positions-transfer',\n initialState,\n reducers: {\n selectPendingPosition: (state: PositionState, action) => {\n const positionId = action.payload;\n if (!state.selectedPendingPositionIds.includes(positionId)) {\n state.selectedPendingPositionIds.push(positionId);\n }\n },\n deselectPendingPosition: (state, action) => {\n const positionId = action.payload;\n const filteredPositions = state.selectedPendingPositionIds.filter((id) => id !== positionId);\n return {\n ...state,\n selectedPendingPositionIds: filteredPositions,\n };\n },\n selectAllPendingPositions: (state, action) => {\n return {\n ...state,\n selectedPendingPositionIds: action.payload,\n };\n },\n clearSelectedPendingPositions: (state) => {\n return {\n ...state,\n selectedPendingPositionIds: [],\n };\n },\n\n selectNotifiedPosition: (state: PositionState, action) => {\n const positionId = action.payload;\n if (!state.selectedNotifiedPositionIds.includes(positionId)) {\n state.selectedNotifiedPositionIds.push(positionId);\n }\n },\n deselectNotifiedPosition: (state, action) => {\n const positionId = action.payload;\n const filteredPositions = state.selectedNotifiedPositionIds.filter((id) => id !== positionId);\n return {\n ...state,\n selectedNotifiedPositionIds: filteredPositions,\n };\n },\n selectAllNotifiedPositions: (state, action) => {\n return {\n ...state,\n selectedNotifiedPositionIds: action.payload,\n };\n },\n clearSelectedNotifiedPositions: (state) => {\n return {\n ...state,\n selectedNotifiedPositionIds: [],\n };\n },\n\n selectFulfilledPosition: (state: PositionState, action) => {\n const positionId = action.payload;\n if (!state.selectedFulfilledPositionIds.includes(positionId)) {\n state.selectedFulfilledPositionIds.push(positionId);\n }\n },\n deselectFulfilledPosition: (state, action) => {\n const positionId = action.payload;\n const selectedFulfilledPositionIds = state.selectedFulfilledPositionIds.filter((id) => id !== positionId);\n return {\n ...state,\n selectedFulfilledPositionIds,\n };\n },\n selectAllFulfilledPositions: (state, action) => {\n return {\n ...state,\n selectedFulfilledPositionIds: action.payload,\n };\n },\n clearSelectedFulfilledPositions: (state) => {\n return {\n ...state,\n selectedFulfilledPositionIds: [],\n };\n },\n filterOutSelectedPositions: (state, action) => {\n const positionIds: string[] = action.payload;\n const selectedFulfilledPositionIds = state.selectedFulfilledPositionIds.filter((id) => !positionIds.includes(id));\n const selectedNotifiedPositionIds = state.selectedNotifiedPositionIds.filter((id) => !positionIds.includes(id));\n const selectedPendingPositionIds = state.selectedPendingPositionIds.filter((id) => !positionIds.includes(id));\n return {\n ...state,\n selectedFulfilledPositionIds,\n selectedNotifiedPositionIds,\n selectedPendingPositionIds,\n };\n },\n },\n extraReducers: {\n [transferPositions.fulfilled.type]: (state, action) => {\n positionsAdapter.upsertMany(state, action.payload.positions);\n },\n },\n});\n\nexport const {\n selectPendingPosition,\n deselectPendingPosition,\n clearSelectedPendingPositions,\n selectAllPendingPositions,\n selectNotifiedPosition,\n deselectNotifiedPosition,\n clearSelectedNotifiedPositions,\n selectAllNotifiedPositions,\n selectFulfilledPosition,\n deselectFulfilledPosition,\n clearSelectedFulfilledPositions,\n selectAllFulfilledPositions,\n filterOutSelectedPositions,\n} = positionTransferSlice.actions;\n\nexport const getAllSelectedPositionIds = (state: any) => ({\n pending: state.positionsTransfer.selectedPendingPositionIds,\n notified: state.positionsTransfer.selectedNotifiedPositionIds,\n fulfilled: state.positionsTransfer.selectedFulfilledPositionIds,\n});\n\nexport default positionTransferSlice.reducer;\n","import { createSlice, createSelector } from '@reduxjs/toolkit';\n// eslint-disable-next-line import/no-cycle\nimport { AppState } from '.';\nimport { loadUser, setUserAvailable, updateUserTags, updateUserCategories } from './api';\nimport { User } from './types';\n\ninterface IUserAdapter {\n user: User | undefined;\n}\n\nconst initialState: IUserAdapter = {\n user: undefined,\n};\n\nconst userSelector = (state: AppState) => ({ users: state.users });\nexport const selectUser: (state: AppState) => User | undefined = createSelector(userSelector, ({ users }) => {\n return users.user;\n});\n\nexport const users = createSlice({\n name: 'users',\n initialState,\n reducers: {},\n extraReducers: {\n [loadUser.fulfilled.type]: (state, action) => {\n if (action.payload.entities.users) {\n const userId = Object.keys(action.payload.entities.users)[0];\n // we need to think about returning state instead of updating it directly\n // eslint-disable-next-line no-param-reassign\n state.user = action.payload.entities.users[userId];\n }\n },\n [setUserAvailable.fulfilled.type]: (state, action) => {\n if (action.payload.entities.users) {\n const userId = Object.keys(action.payload.entities.users)[0];\n // eslint-disable-next-line no-param-reassign\n state.user = action.payload.entities.users[userId];\n }\n },\n [updateUserTags.fulfilled.type]: (state, action) => {\n if (action.payload.entities.users) {\n const userId = Object.keys(action.payload.entities.users)[0];\n // eslint-disable-next-line no-param-reassign\n state.user = action.payload.entities.users[userId];\n }\n },\n [updateUserCategories.fulfilled.type]: (state, action) => {\n if (action.payload.entities.users) {\n const userId = Object.keys(action.payload.entities.users)[0];\n // eslint-disable-next-line no-param-reassign\n state.user = action.payload.entities.users[userId];\n }\n },\n },\n});\n\nexport default users.reducer;\n","import { useEffect } from 'react';\n\nexport enum GridMobileEventType {\n InstallationResumed = 'omg_mobile__installationResumed',\n}\n\nconst useGridMobileEventListener = (eventType: GridMobileEventType, handler: (event: CustomEvent) => void) => {\n useEffect(() => {\n const eventHandler = handler as EventListener;\n window.addEventListener(eventType, eventHandler);\n\n return () => {\n window.removeEventListener(eventType, eventHandler);\n };\n }, [eventType, handler]);\n};\n\nexport default useGridMobileEventListener;\n","import { useState } from 'react';\nimport useGridMobileEventListener, { GridMobileEventType } from './use-grid-mobile-event-listener';\n\nconst useGridMobileInstallationResumedListener = (handler?: () => void) => {\n const [lastGridMobileResumedTimestamp, seLastGridMobileResumedTimestamp] = useState(0);\n\n useGridMobileEventListener(GridMobileEventType.InstallationResumed, () => {\n seLastGridMobileResumedTimestamp(Date.now());\n if (handler) {\n handler();\n }\n });\n\n return { lastGridMobileResumedTimestamp };\n};\n\nexport default useGridMobileInstallationResumedListener;\n","import { createSlice, createEntityAdapter } from '@reduxjs/toolkit';\nimport { loadOccupancy, updateOccupancy } from './api';\nimport { Occupancy } from './types';\n\nconst occupanciesAdapter = createEntityAdapter();\n\nexport const occupancies = createSlice({\n name: 'occupancies',\n initialState: occupanciesAdapter.getInitialState(),\n reducers: {},\n extraReducers: {\n [loadOccupancy.fulfilled.type]: (state, action) => {\n if (action.payload.occupancies) {\n occupanciesAdapter.upsertMany(state, action.payload.occupancies);\n }\n },\n [updateOccupancy.fulfilled.type]: (state, action) => {\n if (action.payload.occupancies) {\n occupanciesAdapter.upsertMany(state, action.payload.occupancies);\n }\n },\n },\n});\n\nexport const { selectById: selectOccupancyById, selectAll: selectAllOccupancies } = occupanciesAdapter.getSelectors();\n\nexport default occupancies.reducer;\n","import { UseQueryResult, useQuery } from 'react-query';\nimport * as Sentry from '@sentry/browser';\nimport { useParams } from 'react-router-dom';\nimport { Organization } from '../store/types';\nimport { axios } from '../store/api';\n\nconst fetchOrganization = async (organizationName: string): Promise => {\n try {\n const response = await axios.get(`/organizations/${organizationName}`);\n\n return response.data;\n } catch (error) {\n Sentry.captureException(error);\n\n throw error;\n }\n};\n\nconst useOrganization = (): UseQueryResult => {\n const { organization: organizationName } = useParams<{ organization: string }>();\n\n return useQuery(['organization', organizationName], () => fetchOrganization(organizationName), {\n refetchOnWindowFocus: false,\n cacheTime: Infinity,\n });\n};\n\nexport default useOrganization;\n","import { createEntityAdapter, createSlice } from '@reduxjs/toolkit';\nimport { Queue } from './types';\nimport { listOrganizationQueues } from './api';\n// eslint-disable-next-line import/no-cycle\nimport { AppState } from '.';\n\nconst organizationAdapter = createEntityAdapter();\n\nexport const organizationQueues = createSlice({\n name: 'organizationQueues',\n initialState: organizationAdapter.getInitialState(),\n reducers: {},\n extraReducers: {\n [listOrganizationQueues.fulfilled.type]: (state, action) => {\n organizationAdapter.upsertMany(state, Object.values(action.payload.queues));\n },\n },\n});\n\nexport const { selectAll: selectOrganizationQueues } = organizationAdapter.getSelectors((state: AppState) => {\n return state.organizationQueues;\n});\nexport default organizationQueues.reducer;\n","import { createSlice, createEntityAdapter } from '@reduxjs/toolkit';\nimport { Location } from './types';\nimport { loadLocations } from './api';\n\nconst locationsAdapter = createEntityAdapter();\n\nexport const locations = createSlice({\n name: 'locations',\n initialState: locationsAdapter.getInitialState(),\n reducers: {},\n extraReducers: {\n [loadLocations.fulfilled.type]: (state, action) => {\n if (action.payload.locations) {\n locationsAdapter.upsertMany(state, action.payload.locations);\n }\n },\n },\n});\n\nexport const { selectById: selectLocationById, selectAll: selectAllLocations } = locationsAdapter.getSelectors();\n\nexport default locations.reducer;\n","var map = {\n\t\"./af.js\": [\n\t\t307,\n\t\t42\n\t],\n\t\"./am.js\": [\n\t\t308,\n\t\t43\n\t],\n\t\"./ar-dz.js\": [\n\t\t309,\n\t\t44\n\t],\n\t\"./ar-iq.js\": [\n\t\t310,\n\t\t45\n\t],\n\t\"./ar-kw.js\": [\n\t\t311,\n\t\t46\n\t],\n\t\"./ar-ly.js\": [\n\t\t312,\n\t\t47\n\t],\n\t\"./ar-ma.js\": [\n\t\t313,\n\t\t48\n\t],\n\t\"./ar-sa.js\": [\n\t\t314,\n\t\t49\n\t],\n\t\"./ar-tn.js\": [\n\t\t315,\n\t\t50\n\t],\n\t\"./ar.js\": [\n\t\t179\n\t],\n\t\"./az.js\": [\n\t\t316,\n\t\t51\n\t],\n\t\"./be.js\": [\n\t\t317,\n\t\t52\n\t],\n\t\"./bg.js\": [\n\t\t318,\n\t\t53\n\t],\n\t\"./bi.js\": [\n\t\t319,\n\t\t54\n\t],\n\t\"./bm.js\": [\n\t\t320,\n\t\t55\n\t],\n\t\"./bn.js\": [\n\t\t321,\n\t\t56\n\t],\n\t\"./bo.js\": [\n\t\t322,\n\t\t57\n\t],\n\t\"./br.js\": [\n\t\t323,\n\t\t58\n\t],\n\t\"./bs.js\": [\n\t\t324,\n\t\t59\n\t],\n\t\"./ca.js\": [\n\t\t325,\n\t\t60\n\t],\n\t\"./cs.js\": [\n\t\t326,\n\t\t61\n\t],\n\t\"./cv.js\": [\n\t\t327,\n\t\t62\n\t],\n\t\"./cy.js\": [\n\t\t328,\n\t\t63\n\t],\n\t\"./da.js\": [\n\t\t329,\n\t\t64\n\t],\n\t\"./de-at.js\": [\n\t\t330,\n\t\t65\n\t],\n\t\"./de-ch.js\": [\n\t\t331,\n\t\t66\n\t],\n\t\"./de.js\": [\n\t\t332,\n\t\t67\n\t],\n\t\"./dv.js\": [\n\t\t333,\n\t\t68\n\t],\n\t\"./el.js\": [\n\t\t334,\n\t\t69\n\t],\n\t\"./en-au.js\": [\n\t\t335,\n\t\t70\n\t],\n\t\"./en-ca.js\": [\n\t\t336,\n\t\t71\n\t],\n\t\"./en-gb.js\": [\n\t\t337,\n\t\t72\n\t],\n\t\"./en-ie.js\": [\n\t\t338,\n\t\t73\n\t],\n\t\"./en-il.js\": [\n\t\t339,\n\t\t74\n\t],\n\t\"./en-in.js\": [\n\t\t340,\n\t\t75\n\t],\n\t\"./en-nz.js\": [\n\t\t341,\n\t\t76\n\t],\n\t\"./en-sg.js\": [\n\t\t342,\n\t\t77\n\t],\n\t\"./en-tt.js\": [\n\t\t343,\n\t\t78\n\t],\n\t\"./en.js\": [\n\t\t344,\n\t\t79\n\t],\n\t\"./eo.js\": [\n\t\t345,\n\t\t80\n\t],\n\t\"./es-do.js\": [\n\t\t346,\n\t\t81\n\t],\n\t\"./es-mx.js\": [\n\t\t347,\n\t\t82\n\t],\n\t\"./es-pr.js\": [\n\t\t348,\n\t\t83\n\t],\n\t\"./es-us.js\": [\n\t\t349,\n\t\t84\n\t],\n\t\"./es.js\": [\n\t\t350,\n\t\t85\n\t],\n\t\"./et.js\": [\n\t\t351,\n\t\t86\n\t],\n\t\"./eu.js\": [\n\t\t352,\n\t\t87\n\t],\n\t\"./fa.js\": [\n\t\t353,\n\t\t88\n\t],\n\t\"./fi.js\": [\n\t\t354,\n\t\t89\n\t],\n\t\"./fo.js\": [\n\t\t355,\n\t\t90\n\t],\n\t\"./fr-ca.js\": [\n\t\t356,\n\t\t91\n\t],\n\t\"./fr-ch.js\": [\n\t\t357,\n\t\t92\n\t],\n\t\"./fr.js\": [\n\t\t358,\n\t\t93\n\t],\n\t\"./fy.js\": [\n\t\t359,\n\t\t94\n\t],\n\t\"./ga.js\": [\n\t\t360,\n\t\t95\n\t],\n\t\"./gd.js\": [\n\t\t361,\n\t\t96\n\t],\n\t\"./gl.js\": [\n\t\t362,\n\t\t97\n\t],\n\t\"./gom-latn.js\": [\n\t\t363,\n\t\t98\n\t],\n\t\"./gu.js\": [\n\t\t364,\n\t\t99\n\t],\n\t\"./he.js\": [\n\t\t365,\n\t\t100\n\t],\n\t\"./hi.js\": [\n\t\t366,\n\t\t101\n\t],\n\t\"./hr.js\": [\n\t\t367,\n\t\t102\n\t],\n\t\"./ht.js\": [\n\t\t368,\n\t\t103\n\t],\n\t\"./hu.js\": [\n\t\t369,\n\t\t104\n\t],\n\t\"./hy-am.js\": [\n\t\t370,\n\t\t105\n\t],\n\t\"./id.js\": [\n\t\t371,\n\t\t106\n\t],\n\t\"./is.js\": [\n\t\t372,\n\t\t107\n\t],\n\t\"./it-ch.js\": [\n\t\t373,\n\t\t108\n\t],\n\t\"./it.js\": [\n\t\t374,\n\t\t109\n\t],\n\t\"./ja.js\": [\n\t\t375,\n\t\t110\n\t],\n\t\"./jv.js\": [\n\t\t376,\n\t\t111\n\t],\n\t\"./ka.js\": [\n\t\t377,\n\t\t112\n\t],\n\t\"./kk.js\": [\n\t\t378,\n\t\t113\n\t],\n\t\"./km.js\": [\n\t\t379,\n\t\t114\n\t],\n\t\"./kn.js\": [\n\t\t380,\n\t\t115\n\t],\n\t\"./ko.js\": [\n\t\t381,\n\t\t116\n\t],\n\t\"./ku.js\": [\n\t\t382,\n\t\t117\n\t],\n\t\"./ky.js\": [\n\t\t383,\n\t\t118\n\t],\n\t\"./lb.js\": [\n\t\t384,\n\t\t119\n\t],\n\t\"./lo.js\": [\n\t\t385,\n\t\t120\n\t],\n\t\"./lt.js\": [\n\t\t386,\n\t\t121\n\t],\n\t\"./lv.js\": [\n\t\t387,\n\t\t122\n\t],\n\t\"./me.js\": [\n\t\t388,\n\t\t123\n\t],\n\t\"./mi.js\": [\n\t\t389,\n\t\t124\n\t],\n\t\"./mk.js\": [\n\t\t390,\n\t\t125\n\t],\n\t\"./ml.js\": [\n\t\t391,\n\t\t126\n\t],\n\t\"./mn.js\": [\n\t\t392,\n\t\t127\n\t],\n\t\"./mr.js\": [\n\t\t393,\n\t\t128\n\t],\n\t\"./ms-my.js\": [\n\t\t394,\n\t\t129\n\t],\n\t\"./ms.js\": [\n\t\t395,\n\t\t130\n\t],\n\t\"./mt.js\": [\n\t\t396,\n\t\t131\n\t],\n\t\"./my.js\": [\n\t\t397,\n\t\t132\n\t],\n\t\"./nb.js\": [\n\t\t398,\n\t\t133\n\t],\n\t\"./ne.js\": [\n\t\t399,\n\t\t134\n\t],\n\t\"./nl-be.js\": [\n\t\t400,\n\t\t135\n\t],\n\t\"./nl.js\": [\n\t\t401,\n\t\t136\n\t],\n\t\"./nn.js\": [\n\t\t402,\n\t\t137\n\t],\n\t\"./oc-lnc.js\": [\n\t\t403,\n\t\t138\n\t],\n\t\"./pa-in.js\": [\n\t\t404,\n\t\t139\n\t],\n\t\"./pl.js\": [\n\t\t405,\n\t\t140\n\t],\n\t\"./pt-br.js\": [\n\t\t406,\n\t\t141\n\t],\n\t\"./pt.js\": [\n\t\t407,\n\t\t142\n\t],\n\t\"./ro.js\": [\n\t\t408,\n\t\t143\n\t],\n\t\"./ru.js\": [\n\t\t409,\n\t\t144\n\t],\n\t\"./rw.js\": [\n\t\t410,\n\t\t145\n\t],\n\t\"./sd.js\": [\n\t\t411,\n\t\t146\n\t],\n\t\"./se.js\": [\n\t\t412,\n\t\t147\n\t],\n\t\"./si.js\": [\n\t\t413,\n\t\t148\n\t],\n\t\"./sk.js\": [\n\t\t414,\n\t\t149\n\t],\n\t\"./sl.js\": [\n\t\t415,\n\t\t150\n\t],\n\t\"./sq.js\": [\n\t\t416,\n\t\t151\n\t],\n\t\"./sr-cyrl.js\": [\n\t\t417,\n\t\t152\n\t],\n\t\"./sr.js\": [\n\t\t418,\n\t\t153\n\t],\n\t\"./ss.js\": [\n\t\t419,\n\t\t154\n\t],\n\t\"./sv-fi.js\": [\n\t\t420,\n\t\t155\n\t],\n\t\"./sv.js\": [\n\t\t421,\n\t\t156\n\t],\n\t\"./sw.js\": [\n\t\t422,\n\t\t157\n\t],\n\t\"./ta.js\": [\n\t\t423,\n\t\t158\n\t],\n\t\"./te.js\": [\n\t\t424,\n\t\t159\n\t],\n\t\"./tet.js\": [\n\t\t425,\n\t\t160\n\t],\n\t\"./tg.js\": [\n\t\t426,\n\t\t161\n\t],\n\t\"./th.js\": [\n\t\t427,\n\t\t162\n\t],\n\t\"./tk.js\": [\n\t\t428,\n\t\t163\n\t],\n\t\"./tl-ph.js\": [\n\t\t429,\n\t\t164\n\t],\n\t\"./tlh.js\": [\n\t\t430,\n\t\t165\n\t],\n\t\"./tr.js\": [\n\t\t431,\n\t\t166\n\t],\n\t\"./tzl.js\": [\n\t\t432,\n\t\t167\n\t],\n\t\"./tzm-latn.js\": [\n\t\t433,\n\t\t168\n\t],\n\t\"./tzm.js\": [\n\t\t434,\n\t\t169\n\t],\n\t\"./ug-cn.js\": [\n\t\t435,\n\t\t170\n\t],\n\t\"./uk.js\": [\n\t\t436,\n\t\t171\n\t],\n\t\"./ur.js\": [\n\t\t437,\n\t\t172\n\t],\n\t\"./uz-latn.js\": [\n\t\t438,\n\t\t173\n\t],\n\t\"./uz.js\": [\n\t\t439,\n\t\t174\n\t],\n\t\"./vi.js\": [\n\t\t440,\n\t\t175\n\t],\n\t\"./x-pseudo.js\": [\n\t\t441,\n\t\t176\n\t],\n\t\"./yo.js\": [\n\t\t442,\n\t\t177\n\t],\n\t\"./zh-cn.js\": [\n\t\t443,\n\t\t178\n\t],\n\t\"./zh-hk.js\": [\n\t\t444,\n\t\t179\n\t],\n\t\"./zh-tw.js\": [\n\t\t445,\n\t\t180\n\t],\n\t\"./zh.js\": [\n\t\t446,\n\t\t181\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(function() {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn Promise.all(ids.slice(1).map(__webpack_require__.e)).then(function() {\n\t\treturn __webpack_require__.t(id, 7);\n\t});\n}\nwebpackAsyncContext.keys = function webpackAsyncContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackAsyncContext.id = 266;\nmodule.exports = webpackAsyncContext;","import * as firebase from 'firebase/app';\nimport 'firebase/messaging';\nimport * as Sentry from '@sentry/browser';\n\nconst initFirebase = () => {\n try {\n firebase.initializeApp({\n apiKey: 'AIzaSyCIfIpnWStH2bajR7eTToxyCaPPbdgyR1Q',\n projectId: 'ombori-queue-service',\n messagingSenderId: '901992047000',\n appId: '1:901992047000:web:0cdfe022113c6a0a25cbed',\n });\n\n if (firebase.messaging.isSupported()) {\n const messaging = firebase.messaging();\n messaging.usePublicVapidKey(\n 'BEjvOb9R-vL4XR3sF4Iji6at2nTGYmTpi4GXWYIhoXEllGn-qp1vH-rTyx5UtUPY7-dN5hrvJ6DCN4Sy7w7qcXs',\n );\n\n // handle foreground notifications\n messaging.onMessage((payload) => {\n navigator.serviceWorker.getRegistration('/firebase-cloud-messaging-push-scope').then((registration) => {\n if (registration) {\n registration.showNotification(payload.notification.title, payload.notification);\n }\n });\n });\n }\n } catch (err) {\n Sentry.captureException(err);\n }\n};\n\nexport default initFirebase;\n","import i18n from 'i18next';\nimport { initReactI18next } from 'react-i18next';\nimport Backend from 'i18next-xhr-backend';\nimport LanguageDetector from 'i18next-browser-languagedetector';\n\nconst initI18n = async (supportedLocales: string[]) => {\n await i18n\n // https://github.com/i18next/i18next-xhr-backend\n .use(Backend)\n // https://github.com/i18next/i18next-browser-languageDetector\n .use(LanguageDetector)\n .use(initReactI18next)\n // https://www.i18next.com/overview/configuration-options\n .init({\n fallbackLng: 'en',\n debug: process.env.NODE_ENV === 'development',\n supportedLngs: supportedLocales,\n load: 'languageOnly',\n interpolation: { escapeValue: false }, // not needed for react as it escapes by default\n backend: {\n loadPath: '/locales/{{lng}}/{{ns}}.json',\n },\n detection: {\n order: ['querystring', 'navigator'],\n caches: [],\n },\n react: {\n useSuspense: false,\n },\n });\n return i18n;\n};\n\nexport default initI18n;\n","import { useEffect } from 'react';\nimport dayjs from 'dayjs';\n\nconst loadLocale = (lng: string) => import(`dayjs/locale/${lng}.js`);\n\nconst useDayjsLocale = (language: string): void => {\n useEffect(() => {\n const lng = language.substring(0, 2);\n\n loadLocale(lng).then(() => {\n dayjs.locale(lng);\n });\n }, [language]);\n};\n\nexport default useDayjsLocale;\n","import createCache, { EmotionCache } from '@emotion/cache';\nimport { useMemo } from 'react';\n// @ts-ignore\nimport stylisRtl from 'stylis-rtl';\n\nconst useEmotionCache = (dir: string): EmotionCache => {\n const emotionCache = useMemo(() => {\n return createCache({ stylisPlugins: dir === 'rtl' ? [stylisRtl] : [] });\n }, [dir]);\n\n return emotionCache;\n};\n\nexport default useEmotionCache;\n","import { createMuiTheme, Theme } from '@material-ui/core/styles';\nimport { useMemo } from 'react';\n\nconst useMuiTheme = (dir: 'rtl' | 'ltr'): Theme => {\n const theme = useMemo(() => {\n return createMuiTheme({\n direction: dir,\n });\n }, [dir]);\n\n return theme;\n};\n\nexport default useMuiTheme;\n","import React, { lazy, useCallback, useEffect, useState } from 'react';\nimport { Route, Switch, useRouteMatch } from 'react-router-dom';\nimport { i18n } from 'i18next';\nimport 'dayjs/locale/ar';\nimport { CacheProvider } from '@emotion/core';\nimport { Helmet } from 'react-helmet';\nimport styled from '@emotion/styled';\nimport { ThemeProvider } from '@material-ui/core/styles';\nimport initI18n from '../../i18n';\nimport { Organization as OrganizationType } from '../../store/types';\nimport useOrganization from '../../common/use-organization';\nimport useDayjsLocale from './useDayjsLocale';\nimport useEmotionCache from './useEmotionCache';\nimport useMuiTheme from './useMuiTheme';\n\nconst Queue = lazy(() => import('../routes/route-queue'));\nconst QueueList = lazy(() => import('../queue-list'));\nconst LocationSelection = lazy(() => import('../location-selection'));\nconst DigitalCall = lazy(() => import('../routes/route-digital-call'));\n\ninterface OrganizationProps {\n organization: OrganizationType;\n}\n\nconst defaultSupportedLocales = ['en', 'sv'];\n\nconst Organization: React.FC = ({ organization }) => {\n const [i18nInt, setI18n] = useState(null);\n const { path }: { path: string } = useRouteMatch();\n\n const organizationSupportedLocales = organization.supportedLocales;\n\n const initLocales = useCallback(async () => {\n if (i18nInt) return;\n\n const supportedLocales = organizationSupportedLocales ?? defaultSupportedLocales;\n\n const i18nGlobalInstance = await initI18n(supportedLocales);\n\n setI18n(i18nGlobalInstance);\n }, [i18nInt, organizationSupportedLocales]);\n\n useEffect(() => {\n initLocales();\n }, [initLocales]);\n\n const language = i18nInt?.language ?? 'en';\n\n const dir = i18nInt?.dir() ?? 'ltr';\n\n const emotionCache = useEmotionCache(dir);\n\n const theme = useMuiTheme(dir);\n\n useDayjsLocale(language);\n\n if (!i18nInt) {\n return null;\n }\n\n return (\n \n \n \n \n {organization?.siteTitle && {organization.siteTitle}}\n {organization?.favicon && }\n \n \n \n } />\n \n \n \n \n \n );\n};\n\nconst Title = styled.h1`\n font-weight: bold;\n font-size: 24px;\n text-align: center;\n padding: 16px;\n color: #fff;\n background-color: #000;\n`;\n\nconst ErrorTitle = styled(Title)`\n color: #e74c3c;\n`;\n\nconst OrganizationContainer: React.FC = () => {\n const organization = useOrganization();\n\n return (\n <>\n {organization.isLoading && Loading organization}\n\n {organization.isSuccess && }\n\n {organization.isError && (\n An error occurred while loading the organization. Please, try again.\n )}\n \n );\n};\n\nexport default OrganizationContainer;\n","import React, { useEffect } from 'react';\nimport { useHistory } from 'react-router-dom';\nimport useToken from '../common/use-token';\nimport manager from '../common/auth-manager';\n\nexport default function AuthCallback() {\n const history = useHistory();\n const [, setToken] = useToken();\n\n useEffect(() => {\n manager.signinRedirectCallback().then((user) => {\n const { queue, organization, from } = user.state;\n setToken(user.id_token);\n history.push(from || `/${organization}/queues/${queue}/admin`);\n });\n }, [setToken, history]);\n\n return <>;\n}\n","import React, { useEffect } from 'react';\nimport { useHistory } from 'react-router-dom';\nimport manager from '../common/auth-manager';\n\nexport default function LogoutCallback() {\n const history = useHistory();\n\n useEffect(() => {\n manager.signoutRedirectCallback().then((response) => {\n const { queue, organization, from } = response.state;\n\n history.push(from || `/${organization}/queues/${queue}/admin`);\n });\n }, [history]);\n\n return <>;\n}\n","import React, { Suspense } from 'react';\nimport { BrowserRouter as Router, Switch, Route } from 'react-router-dom';\nimport initFirebase from './init-firebase';\nimport Organization from './containers/organization';\nimport AuthCallback from './containers/auth-callback';\nimport LogoutCallback from './containers/logout-callback';\n\ninitFirebase();\n\nexport default function App() {\n return (\n \n }>\n \n \n \n \n \n \n \n );\n}\n","/* eslint-disable */\n// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/),\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA',\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then((registration) => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.',\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch((error) => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' },\n })\n .then((response) => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (response.status === 404 || (contentType != null && contentType.indexOf('javascript') === -1)) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log('No internet connection found. App is running in offline mode.');\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then((registration) => {\n registration.unregister();\n })\n .catch((error) => {\n console.error(error.message);\n });\n }\n}\n/* eslint-enable */\n","/* eslint-disable */\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Global, css } from '@emotion/core';\nimport minireset from 'emotion-minireset';\nimport { Provider } from 'react-redux';\nimport * as Sentry from '@sentry/browser';\nimport { create } from 'jss';\nimport rtl from 'jss-rtl';\nimport { QueryClient, QueryClientProvider } from 'react-query';\nimport { StylesProvider, jssPreset } from '@material-ui/core/styles';\nimport store from './store';\nimport App from './app';\nimport * as serviceWorker from './service-worker';\nimport { OnlineContextProvider } from './common/online-context';\n\nconst queryClient = new QueryClient();\n\nSentry.init({\n dsn: 'https://e252275369794c93a1a0034492059f1a@o190418.ingest.sentry.io/5220336',\n enabled: process.env.NODE_ENV === 'production',\n});\n\nconst jss = create({ plugins: [...jssPreset().plugins, rtl()] });\n\n/**\n * There's no way that we can override the material styles without using\n * Material UI Theme Provider.\n */\nconst __BEWARE_FORCE_OVERRIDE_MATERIAL_STYLES = `\n .MuiPickersToolbar-toolbar, .MuiPickersClock-pin, .MuiPickersClockPointer-pointer, .MuiPickersClockNumber-clockNumberSelected, .MuiPickersDay-daySelected {\n background-color: #2c9918 !important;\n }\n\n .MuiPickersClockPointer-thumb {\n background-color: #2c9918 !important;\n border: 14px solid #2c9918 !important;\n }\n\n .MuiButton-textPrimary, .MuiPickersDay-current, .MuiTypography-colorPrimary, .MuiPickersYear-root:focus {\n color: #2c9918 !important;\n }\n\n .MuiPickersDay-daySelected {\n color: #ffffff !important;\n }\n`;\n\nconst globalStyles = [\n minireset,\n css`\n html {\n background: #000;\n color: #000;\n user-select: none;\n }\n body {\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans',\n 'Droid Sans', 'Helvetica Neue', sans-serif;\n font-size: 16px;\n }\n code {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;\n }\n\n .force-ltr {\n html[dir='rtl'] & {\n direction: ltr;\n text-align: right;\n }\n }\n\n .PhoneInputInput {\n html[dir='rtl'] & {\n direction: ltr;\n text-align: right;\n }\n }\n\n .PhoneInputCountrySelectArrow {\n html[dir='rtl'] & {\n margin-right: 8px;\n }\n }\n\n ${__BEWARE_FORCE_OVERRIDE_MATERIAL_STYLES}\n `,\n];\n\nReactDOM.render(\n \n \n \n \n \n \n \n \n \n \n \n ,\n document.getElementById('root'),\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n/* eslint-enable */\n","import { v4 as uuidV4 } from 'uuid';\n\nexport enum NotificationType {\n Email = 'email',\n PhoneNumber = 'phoneNumber',\n ApplePass = 'applePass',\n WebPush = 'webPush',\n}\n\nexport enum FeatureList {\n QueueManager = 'QUEUE',\n OccupancyManager = 'OCCUPANCY',\n Bookings = 'BOOKINGS',\n CurbsidePickup = 'CURBSIDEPICKUP',\n}\n\nexport enum UserStatus {\n DEFAULT = 'default',\n HAS_BEEN_CALLED = 'has_been_called',\n}\n\n// TODO: notification details cannot be accessed client-side\nexport interface PhoneNumberNotification {\n type: NotificationType.PhoneNumber;\n settings: {\n from: string;\n to: string;\n recipient?: string;\n };\n}\n\nexport interface EmailNotification {\n type: NotificationType.Email;\n settings: {\n recipient: string;\n };\n}\n\nexport interface ApplePassDevice {\n deviceLibraryIdentifier: string;\n pushToken: string;\n}\n\nexport interface ApplePassNotification {\n type: NotificationType.ApplePass;\n settings: {\n passTypeIdentifier: string;\n devices: ApplePassDevice[];\n };\n}\n\nexport interface WebPushNotification {\n type: NotificationType.WebPush;\n settings: {\n tokens: string[];\n };\n}\nexport type Notification = PhoneNumberNotification | EmailNotification | ApplePassNotification | WebPushNotification;\nexport enum ExtraPositionStatus {\n GoToEntrance = 'goToEntrance',\n}\nexport type PositionType = 'anonymous' | 'booking' | 'manual' | 'storePickup' | 'curbsidePickup' | 'digitalCall';\n\nexport enum CallType {\n Global = 'global',\n Store = 'store',\n}\n\nexport interface CallInfo {\n id?: string;\n firstName: string;\n lastName: string;\n memberNumber: string;\n url?: string;\n usersCalled?: string[];\n type: CallType;\n agentUrl?: string;\n}\n\nexport interface Station {\n id: string;\n label: string;\n}\n\nexport interface PositionFeedback {\n rating: number;\n message: string;\n}\n\nexport type LocationType = Pick;\n\nexport interface AppointmentInfo {\n eventId?: string;\n managerId?: string;\n managerEmail?: string;\n displayName?: string;\n}\n\nexport interface VirtualAppointmentInfo extends AppointmentInfo {\n isEnabled?: boolean;\n url?: string;\n}\n\nexport interface Booking {\n start: string;\n end: string;\n minDate?: string;\n maxDate?: string;\n virtualAppointment?: VirtualAppointmentInfo;\n appointment?: AppointmentInfo;\n}\n\nexport interface RegistrationDataItem {\n name: string;\n type: RegistrationFieldType;\n value: string | boolean | number | null;\n label?: string;\n}\n\nexport type RegistrationData = RegistrationDataItem[];\n\nexport interface CustomerInfo {\n value: string;\n}\n\nexport interface Position {\n id: string;\n status: PositionStatus;\n extraStatus?: ExtraPositionStatus;\n type: PositionType;\n label: string;\n priority: number;\n location: LocationType | null;\n organization: string;\n notification?: Notification;\n booking?: Booking;\n queue: string;\n createdAt: string;\n fulfilledAt?: string;\n calledAt?: string;\n completedAt?: string;\n rejectedAt?: string;\n retryCount?: number;\n externalId?: string;\n note?: string;\n verificationCode?: string;\n registrationData?: RegistrationData;\n numberInTheQueue?: number;\n tags?: Tag[];\n customerInfo?: CustomerInfo[] | string[];\n servedBy?: ServedBy;\n locale?: string;\n QRCodeCheckInPositionId?: string;\n numberOfPeople?: number;\n callInfo?: CallInfo;\n station?: Station;\n feedback?: PositionFeedback;\n waitingTime?: number;\n category?: Category;\n timeZoneOffset?: number; // It is expressed in minutes and has a sign opposite to the time zone. If I have a zone of +3, then the offset will be -180 minutes.\n curbsideOrderLink?: string;\n positionParentId?: string; // Groups all newly created tickets under the same ID after multiple transfers\n positionChildId?: string; // Links to the newly created ticket after a transfer\n _ts: number;\n}\n\nexport interface ClickAndCollectPosition extends Position {\n activationNote?: string;\n note?: string;\n verificationCode?: string;\n externalId?: string;\n}\n\nexport interface Tag {\n id: string;\n color?: string;\n iconUrl?: string;\n title: LocalizedField;\n titleForCopy?: LocalizedField;\n group?: LocalizedField;\n}\n\nexport type CustomizableFieldType = 'text' | 'checkbox' | 'input';\n\nexport interface CustomizableField {\n key: string;\n type: CustomizableFieldType;\n data?: {\n [lng: string]: {\n value?: any;\n description?: any;\n conditions?: any[];\n icon?: string;\n required?: boolean;\n };\n };\n}\n\ninterface Feedback {\n isActive: boolean;\n}\n\ninterface BaseFlowModifiers {\n cancellation?: {\n enabled?: boolean;\n };\n rescheduling?: {\n enabled?: boolean;\n };\n}\n\ninterface AnonymousFlowModifiers extends BaseFlowModifiers {}\n\ninterface BookingFlowModifiers extends BaseFlowModifiers {}\n\nexport interface TicketFlowModifiers {\n anonymous?: AnonymousFlowModifiers;\n booking?: BookingFlowModifiers;\n}\n\nexport enum Languages {\n ar = 'ar',\n de = 'de',\n en = 'en',\n es = 'es',\n it = 'it',\n nl = 'nl',\n no = 'no',\n sv = 'sv',\n fr = 'fr',\n}\nexport const LanguagesValues = Object.keys(Languages) as (keyof typeof Languages)[];\n\nexport type LanguagesType = keyof typeof Languages;\n\nexport type LocalizedField = {\n [lng in Languages]?: string;\n};\n\nexport const buildLocalizedField = (props: LocalizedField): LocalizedField => {\n return props;\n};\n\nexport enum RegistrationFieldType {\n TEXTAREA = 'textarea',\n INPUT = 'input',\n CHECKBOX = 'checkbox',\n RADIO = 'radio',\n PHONE = 'phone',\n EMAIL = 'email',\n HEADER = 'header',\n PEOPLENUMBER = 'peopleNumber',\n CATEGORY = 'category',\n COVID_CERTIFICATE = 'covidCertificate',\n}\n\nexport interface ValidationRules {\n required?: boolean;\n regexp?: string;\n phone?: boolean;\n email?: boolean;\n covidCertificate?: boolean;\n}\n\nexport interface BaseRegistrationField {\n id: string;\n name: string;\n type: RegistrationFieldType;\n value?: string | number | boolean;\n validationRules: ValidationRules;\n}\n\nexport interface RegistrationFieldInput extends BaseRegistrationField {\n type: RegistrationFieldType.INPUT;\n label?: LocalizedField;\n placeholder?: LocalizedField;\n}\n\nexport interface RegistrationFieldTextarea extends BaseRegistrationField {\n type: RegistrationFieldType.TEXTAREA;\n label: LocalizedField;\n}\n\nexport interface RegistrationFieldCheckbox extends BaseRegistrationField {\n type: RegistrationFieldType.CHECKBOX;\n checked: boolean;\n label: LocalizedField;\n disabled?: boolean;\n}\n\nexport interface RegistrationFieldRadioOption {\n id: string;\n label: LocalizedField;\n value: string;\n}\n\nexport interface RegistrationFieldRadio extends BaseRegistrationField {\n type: RegistrationFieldType.RADIO;\n label: LocalizedField;\n options: RegistrationFieldRadioOption[];\n}\n\nexport interface RegistrationFieldPhone extends BaseRegistrationField {\n type: RegistrationFieldType.PHONE;\n label?: LocalizedField;\n placeholder?: LocalizedField;\n}\n\nexport interface RegistrationFieldEmail extends BaseRegistrationField {\n type: RegistrationFieldType.EMAIL;\n label?: LocalizedField;\n placeholder?: LocalizedField;\n}\n\nexport interface RegistrationFieldHeader extends BaseRegistrationField {\n type: RegistrationFieldType.HEADER;\n title: string;\n subtitle?: string;\n}\n\nexport interface RegistrationFieldPeopleNumber extends BaseRegistrationField {\n type: RegistrationFieldType.PEOPLENUMBER;\n maxValue?: number;\n updated?: boolean;\n}\n\nexport interface RegistrationFieldCategoryOption {\n id: string;\n label: LocalizedField;\n value: string;\n}\n\nexport interface RegistrationFieldCategory extends BaseRegistrationField {\n type: RegistrationFieldType.CATEGORY;\n label?: LocalizedField;\n placeholder?: LocalizedField;\n options: RegistrationFieldCategoryOption[];\n}\n\nexport interface RegistrationFieldCovidCertificate extends BaseRegistrationField {\n type: RegistrationFieldType.COVID_CERTIFICATE;\n label?: LocalizedField;\n}\n\nexport type RegistrationField =\n | RegistrationFieldInput\n | RegistrationFieldTextarea\n | RegistrationFieldCheckbox\n | RegistrationFieldRadio\n | RegistrationFieldPhone\n | RegistrationFieldEmail\n | RegistrationFieldHeader\n | RegistrationFieldPeopleNumber\n | RegistrationFieldCategory\n | RegistrationFieldCovidCertificate;\n\nexport interface Queue {\n // Base\n id: string;\n title: string;\n displayTitle?: LocalizedField;\n description: string;\n organization: string;\n shortDisplayName: string;\n featureList: string[];\n open: boolean;\n positions: string[];\n timeslotCapacity?: number;\n logoUrl?: string;\n globalStyles?: string;\n addressLines?: string[];\n requireUserOnAuth?: boolean;\n isEmailLogin?: boolean;\n averageWaitingTime?: number;\n // Phone\n defaultPhoneNumberCountry?: string;\n phoneNumberCountries?: string[];\n phoneNumberFrom?: string;\n // Capacity\n allowEntryAboveCapacity?: boolean;\n storeCapacity?: number;\n maximumStoreCapacity?: number;\n // Info delivery\n webPushEnabled?: boolean;\n applePassEnabled?: boolean;\n smsEnabled?: boolean;\n emailEnabled?: boolean;\n preferredNotificationType?: NotificationType;\n // Curbside pickup\n curbsideLogoUrl?: string;\n // Registration feature\n registrationEnabled?: boolean;\n printingManualTicketsEnabled?: boolean;\n autoCheckOutByNextEnabled?: boolean;\n registrationFields?: RegistrationField[];\n // In Store feature\n emailsAllowed?: string[];\n isInStore?: boolean;\n textInAppCustomization: {\n // we don't want to specify keys here explicitly. They shouldn't be used directly because they are injecting into translation right after getting.\n // Translation files is the source of truth for keys here\n [lng: string]: any;\n };\n timeZone?: string;\n checkInByQRCode?: boolean;\n maxNumberOfPeoplePerWalkInTicket?: number;\n maxNumberOfPeoplePerBookingTicket?: number;\n availableTagsForQueue?: Tag[];\n customFields?: {\n position?: CustomizableField[];\n bookingForm?: CustomizableField[];\n positionBooking?: CustomizableField[];\n };\n stations?: Station[];\n feedback?: Feedback;\n booking?: {\n isBookingSmsRequired?: boolean;\n isBookingEmailRequired?: boolean;\n physicalBooking?: {\n enabled: boolean;\n };\n digitalBookingWithMsTeams: {\n enabled: boolean;\n };\n blockedDaysAhead?: number | null;\n bookingDaysCount?: number;\n registrationFields?: RegistrationField[];\n };\n ticketFlowModifiers?: TicketFlowModifiers;\n externalId?: string;\n isAutoCallEnabled?: boolean;\n isPositionWaitingTimeVisible?: boolean;\n isNumberInTheQueueVisible?: boolean;\n categories?: Category[];\n digitalCall?: {\n isEnabled: boolean;\n };\n isKeepDistanceInfoEnabled?: boolean;\n isTicketTransferEnabled?: boolean;\n}\n\nexport enum DayOfWeek {\n Monday = 'MONDAY',\n Tuesday = 'TUESDAY',\n Wednesday = 'WEDNESDAY',\n Thursday = 'THURSDAY',\n Friday = 'FRIDAY',\n Saturday = 'SATURDAY',\n Sunday = 'SUNDAY',\n}\n\ninterface Date {\n year: number;\n month: number;\n day: number;\n}\n\nexport interface LocationAddress {\n revision?: number;\n /**\n * CLDR region code of the country/region of the address.\n * This is never inferred and it is up to the user to ensure the value is correct.\n * See http://cldr.unicode.org/ and http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details.\n * @example \"CH\" for Switzerland\n * */\n regionCode: string;\n /**\n * BCP-47 language code of the contents of this address (if known).\n * This is often the UI language of the input form or is expected to match one of the languages used in the address' country/region, or their transliterated equivalents.\n * This can affect formatting in certain countries, but is not critical to the correctness of the data and will never affect any validation or other non-formatting related operations.\n * If this value is not known, it should be omitted (rather than specifying a possibly incorrect default).\n * @example \"zh-Hant\", \"ja\", \"ja-Latn\", \"en\"\n * */\n languageCode?: string;\n /**\n * Postal code of the address.\n * Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (e.g. state/zip validation in the U.S.A.).\n * */\n postalCode?: string;\n sortingCode?: string;\n /**\n * Highest administrative subdivision which is used for postal addresses of a country or region.\n * For example, this can be a state, a province, an oblast, or a prefecture.\n * Specifically, for Spain this is the province and not the autonomous community (e.g. \"Barcelona\" and not \"Catalonia\").\n * Many countries don't use an administrative area in postal addresses.\n * E.g. in Switzerland this should be left unpopulated.\n */\n administrativeArea?: string;\n /**\n * Generally refers to the city/town portion of the address. Examples: US city, IT commune, UK post town.\n * In regions of the world where localities are not well defined or do not fit into this structure well, leave locality empty and use addressLines.\n */\n locality?: string;\n /** Sublocality of the address. For example, this can be neighborhoods, boroughs, districts. */\n sublocality?: string;\n /**\n * Unstructured address lines describing the lower levels of an address.\n *\n * Because values in addressLines do not have type information and may sometimes contain multiple values in a single field (e.g. \"Austin, TX\"), it is important that the line order is clear.\n * The order of address lines should be \"envelope order\" for the country/region of the address.\n * In places where this can vary (e.g. Japan), address_language is used to make it explicit (e.g. \"ja\" for large-to-small ordering and \"ja-Latn\" or \"en\" for small-to-large).\n * This way, the most specific line of an address can be selected based on the language.\n *\n * The minimum permitted structural representation of an address consists of a regionCode with all remaining information placed in the addressLines.\n * It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved.\n *\n * Creating an address only containing a regionCode and addressLines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas).\n */\n addressLines: string[];\n /**\n * The recipient at the address.\n * This field may, under certain circumstances, contain multiline information.\n * For example, it might contain \"care of\" information.\n */\n recipients?: string[];\n}\n\nexport interface Location {\n id: string;\n /** The id of the organization this location belongs to */\n organization: string;\n /** The language of the location. Set during creation and not updateable. */\n languageCode: string;\n /**\n * External identifier for this location, which must be unique inside a given account.\n * This is a means of associating the location with your own records.\n * */\n storeCode?: string;\n /**\n * Location name should reflect your business's real-world name, as used consistently on your storefront, website, and stationery, and as known to customers.\n * Any additional information, when relevant, can be included in other fields of the resource (for example, Address, Categories).\n * Don't add unnecessary information to your name (for example, prefer \"Google\" over \"Google Inc. - Mountain View Corporate Headquarters\").\n * Don't include marketing taglines, store codes, special characters, hours or closed/open status, phone numbers, website URLs, service/product information, location/address or directions, or containment information (for example, \"Chase ATM in Duane Reade\").\n * */\n locationName: string;\n /**\n * A phone number that connects to your individual business location as directly as possible.\n * Use a local phone number instead of a central, call center helpline number whenever possible.\n */\n primaryPhone?: string;\n /** Up to two phone numbers (mobile or landline, no fax) at which your business can be called, in addition to your primary phone number. */\n additionalPhones?: string[];\n /**\n * A precise, accurate address to describe your business location.\n * PO boxes or mailboxes located at remote locations are not acceptable.\n * At this time, you can specify a maximum of five addressLines values in the address.\n */\n address: LocationAddress;\n websiteUrl?: string;\n regularHours: {\n periods: {\n /** Indicates the day of the week this period starts on. */\n openDay: DayOfWeek;\n /** time in 24hr ISO 8601 extended format (hh:mm).\n * Valid values are 00:00-24:00, where 24:00 represents midnight at the end of the specified day field.\n * */\n openTime: string;\n /** Indicates the day of the week this period ends on. */\n closeDay: DayOfWeek;\n /**\n * time in 24hr ISO 8601 extended format (hh:mm).\n * Valid values are 00:00-24:00, where 24:00 represents midnight at the end of the specified day field.\n */\n closeTime: string;\n }[];\n };\n specialHours?: {\n specialHourPeriods: {\n /** The calendar date this special hour period starts on. */\n startDate: Date;\n /**\n * The wall time on startDate when a location opens, expressed in 24hr ISO 8601 extended format.\n * (hh:mm) Valid values are 00:00-24:00, where 24:00 represents midnight at the end of the specified day field.\n * Must be specified if isClosed is false.\n * */\n openTime: string;\n /**\n * The calendar date this special hour period ends on. If endDate field is not set, default to the date specified in startDate.\n * If set, this field must be equal to or at most 1 day after startDate.\n * */\n endDate: Date;\n /**\n * The wall time on endDate when a location closes, expressed in 24hr ISO 8601 extended format.\n * (hh:mm) Valid values are 00:00-24:00, where 24:00 represents midnight at the end of the specified day field.\n * Must be specified if isClosed is false.\n */\n closeTime: string;\n /**\n * If true, endDate, openTime, and closeTime are ignored, and the date specified in startDate is treated as the location being closed for the entire day.\n */\n isClosed: boolean;\n }[];\n };\n}\n\nexport interface Occupancy {\n id: string;\n organization: string;\n counter: number;\n}\n\nexport interface User {\n id: string;\n email: string;\n type: UserType;\n isAvailable: boolean;\n displayName?: string;\n organization: string;\n firstName: string;\n lastName: string;\n photo?: string;\n lastSeen?: number;\n status: UserStatus;\n tags?: Tag[];\n categories?: string[];\n serving?: string[];\n}\n\nexport enum UserType {\n DEFAULT = 'default',\n SALESPERSON = 'salesperson',\n STORE = 'store',\n STORE_MANAGER = 'store_manager',\n}\n\ninterface BuildUserProps {\n id?: string;\n email: string;\n type?: UserType;\n isAvailable: boolean;\n displayName?: string;\n organization: string;\n firstName: string;\n lastName: string;\n photo?: string;\n lastSeen?: number;\n status?: UserStatus;\n tags?: Tag[];\n categories?: string[];\n serving?: string[];\n}\n\nexport const buildUser = (props: BuildUserProps): User => {\n const {\n id = uuidV4(),\n email,\n type = UserType.DEFAULT,\n isAvailable,\n displayName,\n organization,\n firstName,\n lastName,\n photo,\n lastSeen,\n status = UserStatus.DEFAULT,\n tags,\n categories,\n serving,\n } = props;\n\n const user = {\n id,\n email,\n type,\n isAvailable,\n displayName,\n organization,\n firstName,\n lastName,\n photo,\n lastSeen,\n status,\n tags,\n categories,\n serving,\n };\n\n return user;\n};\n\ntype PublicUser = Pick;\n\nexport interface ServedBy extends PublicUser {\n managerId?: string;\n}\n\nexport interface Organization {\n id: string;\n name: string;\n supportedLocales: string[];\n tags?: Tag[];\n siteTitle?: string;\n favicon?: string;\n}\n\nexport type DigitalCallMode = 'newTab' | 'pushEvent';\n\nexport interface Category {\n id: string;\n title: LocalizedField;\n labelPrefix: string;\n color: string;\n isRoot?: boolean;\n parentId?: string | null;\n children?: any;\n}\n\ninterface BuildCategoryProps {\n id?: string;\n title: LocalizedField;\n labelPrefix: string;\n color: string;\n}\n\nexport const buildCategory = (props: BuildCategoryProps): Category => {\n const { id = uuidV4(), title, labelPrefix, color } = props;\n\n const category = {\n id,\n title,\n labelPrefix,\n color,\n };\n\n return category;\n};\n\nexport enum CovidCertificateStatus {\n VALID = 'valid',\n INVALID = 'invalid',\n}\n\nexport enum PositionStatus {\n Draft = 'draft',\n Pending = 'pending',\n Notified = 'notified',\n Fulfilled = 'fulfilled',\n Rejected = 'rejected',\n Completed = 'completed',\n Preorder = 'preorder',\n Transferred = 'transferred',\n}\n","import { configureStore, combineReducers, getDefaultMiddleware, EntityAdapter } from '@reduxjs/toolkit';\nimport { createLogger } from 'redux-logger';\nimport debug from 'debug';\nimport {\n useDispatch as useReduxDispatch,\n useSelector as useReduxSelector,\n useStore as useReduxStore,\n} from 'react-redux';\n/* eslint-disable import/no-cycle */\nimport queuesReducer from './queues-slice';\nimport organizationQueuesReducer from './organizations-slice';\nimport positionsReducer from './positions-slice';\nimport locationsReducer from './locations-slice';\nimport occupanciesReducer from './occupancies-slice';\nimport usersReducer from './users-slice';\nimport positionTransferReducer from './position-transfer-slice';\n/* eslint-enable import/no-cycle */\n\nconst rootReducer = combineReducers({\n organizationQueues: organizationQueuesReducer,\n queues: queuesReducer,\n positions: positionsReducer,\n locations: locationsReducer,\n occupancies: occupanciesReducer,\n users: usersReducer,\n positionsTransfer: positionTransferReducer,\n});\n\nexport const middleware = getDefaultMiddleware();\n\nif (process.env.NODE_ENV === 'development') {\n const log = debug('redux');\n\n const logger = createLogger({ logger: { log } });\n\n middleware.push(logger);\n}\n\nconst store = configureStore({\n reducer: rootReducer,\n middleware,\n});\n\nexport type AppState = ReturnType;\nexport type AppDispatch = typeof store.dispatch;\n\nexport const useDispatch = (...args: Parameters) => useReduxDispatch(...args);\nexport const useSelector = (...args: Parameters) => useReduxSelector(...args);\nexport const useStore = (...args: Parameters) => useReduxStore(...args);\n\nexport function setOne(adapter: EntityAdapter, state: any, item: T, key: string) {\n adapter.removeOne(state, key);\n adapter.addOne(state, item);\n return adapter;\n}\n\nexport default store;\n"],"sourceRoot":""}