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AC/BC,iBAAmB1O,GAAW2O,IAAAA,UAAa3O,EAAQ,CAAE4O,YAAa,eAIpEL,EAAIM,aAAaC,QAAQC,KAAKpZ,IAAM,IAC/BA,EACH8Y,QAAS,IAAK9Y,EAAO8Y,QAAS,eAAgBO,EAAAA,EAAMC,iBAItDV,EAAIM,aAAaC,QAAQC,KAAKpZ,IAC5B,MAAMuZ,EAhBCC,aAAaC,QAHG,qBAqBvB,OAAIF,EACK,IAAKvZ,EAAQ8Y,QAAS,IAAK9Y,EAAO8Y,QAAS,aAAcS,IAG3DvZ,CAAM,IAGf,K,2FChCO,MAAM0Z,EAAcC,GACrBA,EACK,GAAGA,EAAKC,cAAcpF,OAAOmF,EAAKE,cAAcC,SAAS,EAAG,OAE9D,GAGIhG,EAAaA,CAACV,EAAiB2G,EAAaC,KACvD,GAAI5G,EAAW,CACb,MAAM6G,EAAO,IAAIzN,KAAK4G,GAGtB,OAFA6G,EAAK3N,QAAQ2N,EAAKC,UAAYH,GAEvB,GAAGE,EAAKE,gBAAgBH,IAAYxF,OAAOyF,EAAKG,WAAa,GAAGN,SAAS,EAAG,OAAOE,IAAYxF,OACpGyF,EAAKC,WACLJ,SAAS,EAAG,MAChB,CACA,MAAO,EAAE,C","sources":["webpack://mitsuboshi/./app/javascript/japan_concierge/slices/mapMenuSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/mapMenuHeaderSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/mapMenuMonthSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/mapMenuSeasonSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/active_plan/store.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/export/store.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/activeDaySlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/backdropSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/configSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/customeSpotSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/exportSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/mapMenuCategorySlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/mapSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/mapSpotSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/modalCalendarSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/modalPlanSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/modalSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/modalSpotSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/modalStartSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/modalStaySlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/modalTransitSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/planDaySlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/planMenuSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/planSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/planSpotSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/popupSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/snsSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/spotSlideTileSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/slices/transitSlice.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/utils/api.ts","webpack://mitsuboshi/./app/javascript/japan_concierge/utils/datetime.ts"],"sourcesContent":["import { createSlice } from '@reduxjs/toolkit';\n\nimport { MapMenuState } from '../types';\n\nconst initialState: MapMenuState = {\n isOpen: false,\n};\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst mapMenuSlice = createSlice({\n name: 'mapMenu',\n initialState,\n reducers: {\n reset: (state: MapMenuState) => {\n Object.assign(state, initialState);\n },\n toggle: (state: MapMenuState) => {\n state.isOpen = !state.isOpen;\n },\n },\n});\n\nexport const { reset, toggle } = mapMenuSlice.actions;\n\nexport default mapMenuSlice.reducer;\n","import { createSlice, type PayloadAction } from '@reduxjs/toolkit';\n\nimport { MapMenuHeaderState } from '../types/index';\n\nconst initialState: MapMenuHeaderState = {\n selectedIndex: 0,\n};\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst mapMenuHeaderSlice = createSlice({\n name: 'mapMenuHeader',\n initialState,\n reducers: {\n reset: (state: MapMenuHeaderState) => {\n Object.assign(state, initialState);\n },\n setIndex: (state: MapMenuHeaderState, action: PayloadAction) => {\n state.selectedIndex = action.payload;\n },\n },\n});\n\nexport const { reset, setIndex } = mapMenuHeaderSlice.actions;\n\nexport default mapMenuHeaderSlice.reducer;\n","import { createSlice, type PayloadAction } from '@reduxjs/toolkit';\n\nimport { MapMenuMonthState } from '../types';\n\nconst initialState: MapMenuMonthState = {\n selectedMonth: 0,\n};\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst mapMenuMonthSlice = createSlice({\n name: 'mapMenuMonth',\n initialState,\n reducers: {\n reset: (state: MapMenuMonthState) => {\n Object.assign(state, initialState);\n },\n setMonth: (state: MapMenuMonthState, action: PayloadAction) => {\n // 既に選択状態の場合は解除する必要がある(現行仕様)\n state.selectedMonth = state.selectedMonth === action.payload ? 0 : action.payload;\n },\n },\n});\n\nexport const { reset, setMonth } = mapMenuMonthSlice.actions;\n\nexport default mapMenuMonthSlice.reducer;\n","import { createSlice, type PayloadAction } from '@reduxjs/toolkit';\n\nimport { MapMenuSeasonState, Season } from '../types';\nimport { getMapMenuListToApi } from './mapMenuCategorySlice';\n\nconst initialState: MapMenuSeasonState = {\n seasons: [],\n selectedId: 0,\n selectedIndex: 0,\n};\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst mapMenuSeasonSlice = createSlice({\n name: 'mapMenuSeason',\n initialState,\n reducers: {\n reset: (state: MapMenuSeasonState) => {\n Object.assign(state, initialState);\n },\n setId: (state: MapMenuSeasonState, action: PayloadAction) => {\n // 既に選択状態の場合は解除する必要がある(現行仕様)\n state.selectedId = state.selectedId === action.payload ? 0 : action.payload;\n },\n setIndex: (state: MapMenuSeasonState, action: PayloadAction) => {\n state.selectedIndex = action.payload;\n },\n setSeasons: (state: MapMenuSeasonState, action: PayloadAction<{ seasons: Season[] }>) => {\n state.seasons = action.payload.seasons;\n },\n },\n extraReducers: (builder) => {\n builder.addCase(getMapMenuListToApi.fulfilled, (state, action) => {\n mapMenuSeasonSlice.caseReducers.setSeasons(state, action);\n });\n },\n});\n\nexport const { reset, setId, setSeasons, setIndex } = mapMenuSeasonSlice.actions;\n\nexport default mapMenuSeasonSlice.reducer;\n","import { combineReducers } from 'redux';\nimport { configureStore } from '@reduxjs/toolkit';\n\nimport activeDayReducer from '../slices/activeDaySlice';\nimport backdropSliceReducer from '../slices/backdropSlice';\nimport configSliceReducer from '../slices/configSlice';\nimport customSpotReducer from '../slices/customeSpotSlice';\nimport modalSliceReducer from '../slices/modalSlice';\nimport modalCalendarReducer from '../slices/modalCalendarSlice';\nimport modalStaySliceReducer from '../slices/modalStaySlice';\nimport modalStartSliceReducer from '../slices/modalStartSlice';\nimport modalTransitReducer from '../slices/modalTransitSlice';\nimport modalFavoriteSpotReducer from '../slices/modalSpotSlice';\nimport modalPlanReducer from '../slices/modalPlanSlice';\nimport mapReducer from '../slices/mapSlice';\nimport mapMenuReducer from '../slices/mapMenuSlice';\nimport mapMenuHeaderReducer from '../slices/mapMenuHeaderSlice';\nimport mapMenuMonthReducer from '../slices/mapMenuMonthSlice';\nimport mapMenuSeasonReducer from '../slices/mapMenuSeasonSlice';\nimport mapMenuItemReducer from '../slices/mapMenuCategorySlice';\nimport mapSpotReducer from '../slices/mapSpotSlice';\nimport mapSlideTileReducer from '../slices/spotSlideTileSlice';\nimport planSliceReducer from '../slices/planSlice';\nimport planDayReducer from '../slices/planDaySlice';\nimport planMenuReducer from '../slices/planMenuSlice';\nimport planSpotReducer from '../slices/planSpotSlice';\nimport popupReducer from '../slices/popupSlice';\nimport snsReducer from '../slices/snsSlice';\nimport transitReducer from '../slices/transitSlice';\nimport { AppState } from '../types';\n\nconst rootReducer = combineReducers({\n activeDay: activeDayReducer,\n backdrop: backdropSliceReducer,\n config: configSliceReducer,\n customSpot: customSpotReducer,\n map: mapReducer,\n mapMenu: mapMenuReducer,\n mapMenuHeader: mapMenuHeaderReducer,\n mapMenuMonth: mapMenuMonthReducer,\n mapMenuSeason: mapMenuSeasonReducer,\n mapMenuCategory: mapMenuItemReducer,\n mapSpot: mapSpotReducer,\n modal: modalSliceReducer,\n modalCalendar: modalCalendarReducer,\n modalSpot: modalFavoriteSpotReducer,\n modalStay: modalStaySliceReducer,\n modalStart: modalStartSliceReducer,\n modalTransit: modalTransitReducer,\n modalPlan: modalPlanReducer,\n plan: planSliceReducer,\n planDay: planDayReducer,\n planMenu: planMenuReducer,\n planSpot: planSpotReducer,\n popup: popupReducer,\n sns: snsReducer,\n spotSlideTile: mapSlideTileReducer,\n transit: transitReducer,\n});\n\n// reducerにDate型を指定すると[A non-serializable value was detected in the state]のエラーが出力される\n// reduxの場合は発生しないが、redux-toolkitの場合のみ発生する模様。なので、serializableCheckを一旦falseに設定\nconst store = configureStore({\n reducer: rootReducer,\n middleware: (getDefaultMiddleware) => getDefaultMiddleware({ serializableCheck: false }),\n});\n\nexport type AppDispatch = typeof store.dispatch;\nexport default store;\n","import { combineReducers } from 'redux';\nimport { configureStore } from '@reduxjs/toolkit';\n\nimport exportReducer from '../slices/exportSlice';\nimport { ExportAppState } from '../types/export_type';\nimport configSliceReducer from '../slices/configSlice';\nimport backdropSliceReducer from '../slices/backdropSlice';\nimport modalSliceReducer from '../slices/modalSlice';\nimport modalFavoriteSpotReducer from '../slices/modalSpotSlice';\n\nconst rootReducer = combineReducers({\n backdrop: backdropSliceReducer,\n config: configSliceReducer,\n export: exportReducer,\n modal: modalSliceReducer,\n modalSpot: modalFavoriteSpotReducer,\n});\n\n// reducerにDate型を指定すると[A non-serializable value was detected in the state]のエラーが出力される\n// reduxの場合は発生しないが、redux-toolkitの場合のみ発生する模様。なので、serializableCheckを一旦falseに設定\nconst store = configureStore({\n reducer: rootReducer,\n middleware: (getDefaultMiddleware) => getDefaultMiddleware({ serializableCheck: false }),\n});\n\nexport type AppDispatch = typeof store.dispatch;\nexport default store;\n","import { createSlice, type PayloadAction } from '@reduxjs/toolkit';\n\nimport { ActiveDayState } from '../types';\nimport { getActivePlanToApi } from './planSlice';\n\nconst initialState: ActiveDayState = {\n day: 0,\n};\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst activeDaySlice = createSlice({\n name: 'activeDay',\n initialState,\n reducers: {\n setDay: (state: ActiveDayState, action: PayloadAction) => {\n state.day = action.payload;\n },\n },\n extraReducers: (builder) => {\n // 画面表示時/リロード時にサーバから取得時に呼ばれる。\n builder.addCase(getActivePlanToApi.fulfilled, (state, action) => {\n const { planDays } = action.payload;\n // 初期表示以外はDAYの設定は行わない。DAYの設定はreducer.setDayのみ\n if (planDays.length > 0 && state.day === 0) {\n state.day = planDays[0].day;\n }\n });\n },\n});\n\nexport const { setDay } = activeDaySlice.actions;\nexport default activeDaySlice.reducer;\n","import { createSlice } from '@reduxjs/toolkit';\nimport { BackdropState } from '../types';\nimport { toggle as toggleModal } from './modalSlice';\nimport { updateStay, updateModeAndTransitTime } from './planSpotSlice';\nimport { updateStartTime } from './planDaySlice';\nimport { setPlan } from './planSlice';\n\nconst initialState: BackdropState = {\n isShown: false,\n};\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst backdropSlice = createSlice({\n name: 'backdrop',\n initialState,\n reducers: {\n toggle: (state: BackdropState) => {\n state.isShown = !state.isShown;\n },\n },\n extraReducers: (builder) => {\n builder.addMatcher(toggleModal.match, (state: BackdropState) => {\n backdropSlice.caseReducers.toggle(state);\n });\n builder.addMatcher(updateStay.match, (state: BackdropState) => {\n state.isShown = false;\n });\n builder.addMatcher(updateModeAndTransitTime.match, (state: BackdropState) => {\n state.isShown = false;\n });\n builder.addMatcher(updateStartTime.match, (state: BackdropState) => {\n state.isShown = false;\n });\n builder.addMatcher(setPlan.match, (state: BackdropState) => {\n state.isShown = false;\n });\n },\n});\n\nexport const { toggle } = backdropSlice.actions;\n\nexport default backdropSlice.reducer;\n","import { createSlice, type PayloadAction } from '@reduxjs/toolkit';\n\nimport { ConfigProps } from '../types';\n\nconst initialState: ConfigProps = {\n eventMenu: false,\n eventMonth: false,\n eventSeason: false,\n helpButton: false,\n helpUrl: '',\n helpUrlAnchorLink: '',\n iframe: false,\n nearSite: false,\n rootPath: '',\n parentUrl: '',\n snsAuth: false,\n socialMediaAuth: {\n name: '',\n provider: '',\n fingerprint: '',\n },\n};\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst configSlice = createSlice({\n name: 'config',\n initialState,\n reducers: {\n setConfig: (state: ConfigProps, action: PayloadAction) => {\n Object.assign(state, action.payload);\n },\n },\n});\n\nexport const { setConfig } = configSlice.actions;\nexport default configSlice.reducer;\n","import { createSlice, type PayloadAction } from '@reduxjs/toolkit';\nimport { createAsyncThunk } from '@reduxjs/toolkit';\n\nimport { AppState, CustomSpotState, FavoriteSpot, PlanSpot } from '../types';\nimport appApi from '../utils/api';\n\nconst initialState: CustomSpotState = {\n isShow: false,\n isNameError: false,\n isStayError: false,\n name: '',\n stay: 30,\n lat: 0,\n lng: 0,\n};\n\n//-------------------------------------------------------------\n// 非同期処理\n//-------------------------------------------------------------\n// オリジナルスポット登録処理\nexport const customSpotCreateToApi = createAsyncThunk<\n { planSpots: PlanSpot[]; favoriteSpots: FavoriteSpot[] },\n CustomSpotState\n>('customSpot/create', async (arg: CustomSpotState, thunkAPI) => {\n const { name, lat, lng, stay } = arg;\n const response = await appApi.post(`${(thunkAPI.getState() as AppState).config.rootPath}/custom_spots`, {\n japan_concierge_custom_spot_form: {\n name,\n lat,\n lng,\n stay,\n },\n });\n return response.data;\n});\n\n// オリジナルスポット名取得処理\nexport const getCustomSpotNameToApi = createAsyncThunk('customSpot/new', async (arg: void, thunkAPI) => {\n const response = await appApi.get(`${(thunkAPI.getState() as AppState).config.rootPath}/custom_spots/new`);\n return response.data;\n});\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst customSpotSlice = createSlice({\n name: 'config',\n initialState,\n reducers: {\n reset: (state: CustomSpotState) => {\n Object.assign(state, initialState);\n },\n setIsShow: (state: CustomSpotState, action: PayloadAction) => {\n state.isShow = action.payload;\n },\n setName: (state: CustomSpotState, action: PayloadAction) => {\n state.name = action.payload;\n state.isNameError = state.name.trim() === '';\n },\n setStay: (state: CustomSpotState, action: PayloadAction) => {\n state.stay = action.payload;\n state.isStayError = state.stay <= 0;\n },\n setIsNameError: (state: CustomSpotState, action: PayloadAction) => {\n state.isNameError = action.payload;\n },\n setIsStayError: (state: CustomSpotState, action: PayloadAction) => {\n state.isStayError = action.payload;\n },\n setLatLng: (state: CustomSpotState, action: PayloadAction<{ lat: number; lng: number }>) => {\n state.lat = action.payload.lat;\n state.lng = action.payload.lng;\n },\n },\n extraReducers: (builder) => {\n builder.addCase(customSpotCreateToApi.fulfilled, (state: CustomSpotState) => {\n customSpotSlice.caseReducers.reset(state);\n });\n builder.addCase(getCustomSpotNameToApi.fulfilled, (state: CustomSpotState, action) => {\n state.name = action.payload;\n });\n },\n});\n\nexport const { reset, setIsShow, setName, setStay, setLatLng, setIsNameError, setIsStayError } =\n customSpotSlice.actions;\nexport default customSpotSlice.reducer;\n","import { createAsyncThunk, createSelector, createSlice, type PayloadAction } from '@reduxjs/toolkit';\n\nimport { Export, ExportAppState, ExportPlanDay, ExportPlanDaySpot } from '../types/export_type';\nimport appApi from '../utils/api';\n\nconst initialState: Export = {\n id: '',\n exportPlan: undefined,\n isShowMap: new Array(0),\n};\n\n//-------------------------------------------------------------\n// 非同期処理\n//-------------------------------------------------------------\n// active_planの情報を取得する処理\nexport const getExportInfoToApi = createAsyncThunk<{ export: Export }, void>(\n 'export/show',\n async (arg: void, thunkAPI) => {\n const { id } = (thunkAPI.getState() as ExportAppState).export;\n const response = await appApi.get(`${(thunkAPI.getState() as ExportAppState).config.rootPath}/exports/${id}`);\n return response.data;\n }\n);\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst exportSlice = createSlice({\n name: 'export',\n initialState,\n reducers: {\n reset: (state: Export) => {\n Object.assign(state, initialState);\n },\n setId: (state: Export, action: PayloadAction) => {\n state.id = action.payload;\n },\n setExport: (state: Export, action: PayloadAction<{ export: Export }>) => {\n state.exportPlan = action.payload.export.exportPlan;\n // Day数分初期化しておく\n state.isShowMap = new Array(action.payload.export.exportPlan?.exportPlanDays?.length || 0).fill(false);\n },\n setIsShowMap: (state: Export, action: PayloadAction) => {\n state.isShowMap[action.payload] = !state.isShowMap[action.payload];\n },\n },\n extraReducers: (builder) => {\n // 画面表示時/リロード時にサーバから取得時に呼ばれる。\n builder.addCase(getExportInfoToApi.fulfilled, (state, action) => {\n exportSlice.caseReducers.setExport(state, action);\n });\n },\n});\n\ntype ReturnSelectorType = (state: ExportAppState) => S;\n// 指定したPlanDayのPlanSpotの中から指定されたpositionより前のPlanSpotの滞在時間と移動時間の合計値を算出する\nexport const totalStayTransitTimeSelector = (day: number, position: number): ReturnSelectorType =>\n createSelector([(state: ExportAppState) => state.export], (_export: Export) => {\n let totalStayTime = 0;\n const exportPlanDay = _export.exportPlan?.exportPlanDays?.filter((planDay: ExportPlanDay) => planDay.day === day);\n if (exportPlanDay && exportPlanDay.length > 0) {\n // 指定されたpositionより前の滞在時間を抽出するため、自分を含まない\n const planDaySpotsNoSelf = exportPlanDay[0]?.exportPlanDaySpots?.filter(\n (planDaySpot: ExportPlanDaySpot) => planDaySpot.position < position\n );\n planDaySpotsNoSelf?.forEach((planDaySpot: ExportPlanDaySpot) => {\n totalStayTime += planDaySpot.stay;\n });\n\n // 指定されたpositionより前の移動時間を抽出するため、自分を含む\n const exportPlanDaySpots = exportPlanDay[0]?.exportPlanDaySpots?.filter(\n (planDaySpot: ExportPlanDaySpot) => planDaySpot.position <= position && planDaySpot.position > 0\n );\n\n exportPlanDaySpots?.forEach((planDaySpot: ExportPlanDaySpot) => {\n totalStayTime += planDaySpot.transitTime;\n });\n }\n return totalStayTime;\n });\n\nexport const { reset, setId, setIsShowMap } = exportSlice.actions;\nexport default exportSlice.reducer;\n","import { createAsyncThunk, createSlice, type PayloadAction } from '@reduxjs/toolkit';\n\nimport { MapMenuCategoryState, Category, AppState, Season } from '../types';\nimport appApi from '../utils/api';\n\nconst initialState: MapMenuCategoryState = {\n categories: [],\n selectedIndex: 0, // 0:未選択状態 1:お気にり 2:スタート地点 3〜:カテゴリ\n};\n\n//-------------------------------------------------------------\n// 非同期処理\n//-------------------------------------------------------------\n\n// カテゴリー情報を取得する処理\nexport const getMapMenuListToApi = createAsyncThunk<\n { categories: Category[]; isStartSpot: boolean; seasons: Season[] },\n void\n>('mapMenuCategory/index', async (arg: void, thunkAPI) => {\n const response = await appApi.get(`${(thunkAPI.getState() as AppState).config.rootPath}/map_menus`);\n return response.data;\n});\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst mapMenuCategorySlice = createSlice({\n name: 'mapMenuCategory',\n initialState,\n reducers: {\n reset: (state: MapMenuCategoryState) => {\n Object.assign(state, initialState);\n },\n setIndex: (state: MapMenuCategoryState, action: PayloadAction) => {\n // 既に選択状態の場合は解除する必要がある(現行仕様)\n state.selectedIndex = state.selectedIndex === action.payload ? 0 : action.payload;\n },\n setCategories: (state: MapMenuCategoryState, action: PayloadAction<{ categories: Category[] }>) => {\n state.categories = action.payload.categories;\n },\n },\n extraReducers: (builder) => {\n builder.addCase(getMapMenuListToApi.fulfilled, (state, action) => {\n mapMenuCategorySlice.caseReducers.setCategories(state, action);\n });\n },\n});\n\nexport const { reset, setIndex, setCategories } = mapMenuCategorySlice.actions;\n\nexport default mapMenuCategorySlice.reducer;\n","import { createSlice, type PayloadAction } from '@reduxjs/toolkit';\n\nimport { MapState, MapSpot } from '../types';\nimport { setDay } from './activeDaySlice';\nimport { getActivePlanToApi } from './planSlice';\n\n// ここでinfowWindowを初期化したいのですが、new google.maps.InfoWindow()を実行するとgoogleが読み込まれるタイミングによりエラーとなるため\n// ここではundefinedを設定する\nconst initialState: MapState = {\n infoWindow: undefined,\n isInitializeMapCenter: true,\n isPlanSpot: false,\n isRunFitBounds: false,\n map: undefined,\n mapSpot: undefined,\n selectedPlanSpotId: 0,\n selectedPosition: 0,\n};\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst mapSlice = createSlice({\n name: 'map',\n initialState,\n reducers: {\n reset: (state: MapState) => {\n Object.assign(state, initialState);\n },\n setMap: (state: MapState, action: PayloadAction) => {\n state.map = action.payload;\n },\n openInfoWindow: (\n state: MapState,\n action: PayloadAction<{ mapSpot: MapSpot | undefined; isPlanSpot: boolean; position: number }>\n ) => {\n // infowindowはシステム上1つしか表示しない仕様のため、infowindow内で各ボタン押下時の処理をevent.addEventListenerで登録しているため、\n // 解除する必要がある。(event.removeEventListener) マーカーをクリックすされる度に前回表示していた内容を破棄するために以下の処理が必要\n if (state.infoWindow) {\n state.infoWindow?.close();\n state.infoWindow = undefined;\n }\n state.infoWindow = new google.maps.InfoWindow();\n state.mapSpot = action.payload.mapSpot;\n state.isPlanSpot = action.payload.isPlanSpot;\n state.selectedPosition = action.payload.position;\n },\n closeInfoWindow: (state: MapState) => {\n state.infoWindow?.close();\n state.infoWindow = undefined;\n state.mapSpot = undefined;\n },\n focusSpotOnMap: (state: MapState, action: PayloadAction) => {\n if (state.map) {\n state.map.panTo(action.payload);\n }\n },\n setIsRunFitBounds: (state: MapState, action: PayloadAction) => {\n state.isRunFitBounds = action.payload;\n },\n setIsInitializeMapCenter: (state: MapState, action: PayloadAction) => {\n state.isInitializeMapCenter = action.payload;\n },\n },\n extraReducers: (builder) => {\n // 画面表示時/リロード時にサーバから取得時に呼ばれる。\n builder.addCase(getActivePlanToApi.fulfilled, (state) => {\n mapSlice.caseReducers.setIsRunFitBounds(state, { payload: true, type: mapSlice.actions.setIsRunFitBounds.type });\n });\n // planDay選択時にinfowindowを閉じる\n builder.addMatcher(setDay.match, (state: MapState) => {\n mapSlice.caseReducers.closeInfoWindow(state);\n });\n },\n});\n\nexport const {\n reset,\n setMap,\n openInfoWindow,\n closeInfoWindow,\n focusSpotOnMap,\n setIsRunFitBounds,\n setIsInitializeMapCenter,\n} = mapSlice.actions;\n\nexport default mapSlice.reducer;\n","import {\n createAsyncThunk,\n createEntityAdapter,\n createSelector,\n createSlice,\n type EntityState,\n type PayloadAction,\n} from '@reduxjs/toolkit';\n\nimport { MapSpot, AppState, MarkerType, PlanSpot, ActiveDayState, MapSpotEntityState } from '../types';\nimport appApi from '../utils/api';\n\nconst mapSpotAdapter = createEntityAdapter({\n // idフィールドに`id`キー以外のものを使いたい場合は下記のように明示的に指定する\n selectId: (spot: MapSpot) => spot.id,\n});\nconst initialState: MapSpotEntityState = mapSpotAdapter.getInitialState({\n isLoading: false,\n selectedId: 0,\n});\n\n//-------------------------------------------------------------\n// 非同期処理\n//-------------------------------------------------------------\n\n// お気に入りスポット情報を取得する処理\nexport const getFavoriteMapSpotToApi = createAsyncThunk(\n 'mapSpot/favoriteSpotIndex',\n async (arg: void, thunkAPI) => {\n const response = await appApi.get(`${(thunkAPI.getState() as AppState).config.rootPath}/map_spots`, {\n params: { q: { favorite: true } },\n });\n return response.data;\n }\n);\n\n// スタートスポット情報を取得する処理\nexport const getStartSpotToApi = createAsyncThunk(\n 'mapSpot/startSpotIndex',\n async (arg: void, thunkAPI) => {\n const response = await appApi.get(`${(thunkAPI.getState() as AppState).config.rootPath}/map_spots`, {\n params: { q: { start_spot: true } },\n });\n return response.data;\n }\n);\n\n// カテゴリースポット情報を取得する処理\nexport const getSpotToApi = createAsyncThunk('mapSpot/spotIndex', async (arg: number, thunkAPI) => {\n // 地図の中心座標を取得し、小数点6桁四捨五入(railsに合わせてます)\n const lat = Math.round(((thunkAPI.getState() as AppState).map.map?.getCenter()?.lat() || 1) * 100000) / 100000;\n const lng = Math.round(((thunkAPI.getState() as AppState).map.map?.getCenter()?.lng() || 1) * 100000) / 100000;\n\n const response = await appApi.get(`${(thunkAPI.getState() as AppState).config.rootPath}/map_spots`, {\n params: { q: { categories: [arg], lat, lng } },\n });\n return response.data;\n});\n\n// イベント季節のスポット情報を取得する処理\nexport const getSeasonSpotToApi = createAsyncThunk(\n 'mapSpot/seasonSpotIndex',\n async (id: number, thunkAPI) => {\n // 地図の中心座標を取得し、小数点6桁四捨五入(railsに合わせてます)\n const lat = Math.round(((thunkAPI.getState() as AppState).map.map?.getCenter()?.lat() || 1) * 100000) / 100000;\n const lng = Math.round(((thunkAPI.getState() as AppState).map.map?.getCenter()?.lng() || 1) * 100000) / 100000;\n const response = await appApi.get(`${(thunkAPI.getState() as AppState).config.rootPath}/map_spots`, {\n params: { q: { season: id, lat, lng } },\n });\n return response.data;\n }\n);\n\n// イベント月のスポット情報を取得する処理\nexport const getMonthSpotToApi = createAsyncThunk(\n 'mapSpot/seasonSpotIndex',\n async (id: number, thunkAPI) => {\n // 地図の中心座標を取得し、小数点6桁四捨五入(railsに合わせてます)\n const lat = Math.round(((thunkAPI.getState() as AppState).map.map?.getCenter()?.lat() || 1) * 100000) / 100000;\n const lng = Math.round(((thunkAPI.getState() as AppState).map.map?.getCenter()?.lng() || 1) * 100000) / 100000;\n const response = await appApi.get(`${(thunkAPI.getState() as AppState).config.rootPath}/map_spots`, {\n params: { q: { month: id, lat, lng } },\n });\n return response.data;\n }\n);\n\n//-------------------------------------------------------------\n// Selector\n//-------------------------------------------------------------\n// 全件取得用\nexport const mapSpotSelectors = mapSpotAdapter.getSelectors((state: AppState) => state.mapSpot);\n\n// Marker表示用 marker/infowindowに必要な情報を抽出し、interface MarkerTypeとして配列に設定・返却する\nexport const mapSpotMarkerSelector = createSelector(\n [(state: AppState) => state.mapSpot, (state: AppState) => state.planSpot, (state: AppState) => state.activeDay],\n (\n state: MapSpotEntityState,\n statePlanSpot: EntityState,\n stateActiveDay: ActiveDayState\n ): (MarkerType | undefined)[] =>\n Object.values(state.entities).map((mapSpot) => {\n // planSpotに含まれているスポットの場合は除外する\n const isPlanSpot = Object.values(statePlanSpot.entities).find((planSpot) => {\n if (planSpot && planSpot.spot && mapSpot) {\n return planSpot.spot.id === mapSpot.id && stateActiveDay.day === planSpot.day;\n }\n return false;\n });\n\n if (isPlanSpot) {\n return undefined;\n }\n\n if (mapSpot) {\n return {\n day: stateActiveDay.day,\n name: mapSpot.spot.name,\n lat: mapSpot.spot.lat,\n lng: mapSpot.spot.lng,\n image: mapSpot.markerImage,\n spot: mapSpot,\n };\n }\n return undefined;\n })\n);\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst mapSpotSlice = createSlice({\n name: 'mapSpot',\n initialState,\n reducers: {\n reset: (state: MapSpotEntityState) => {\n Object.assign(state, initialState);\n },\n setMapSpot: (state: MapSpotEntityState, action: PayloadAction) => {\n if (action.payload.length > 0) {\n mapSpotAdapter.addMany(state, action);\n }\n },\n removeMapSpot: (state: MapSpotEntityState) => {\n mapSpotAdapter.removeAll(state);\n },\n setLoading: (state: MapSpotEntityState, action: PayloadAction) => {\n state.isLoading = action.payload;\n },\n setSelectedId: (state: MapSpotEntityState, action: PayloadAction) => {\n state.selectedId = action.payload;\n },\n },\n extraReducers: (builder) => {\n builder.addCase(getFavoriteMapSpotToApi.pending, (state: MapSpotEntityState) => {\n state.isLoading = true;\n });\n builder.addCase(getFavoriteMapSpotToApi.rejected, (state: MapSpotEntityState) => {\n state.isLoading = false;\n });\n builder.addCase(getFavoriteMapSpotToApi.fulfilled, (state: MapSpotEntityState, action) => {\n mapSpotSlice.caseReducers.setMapSpot(state, action);\n state.isLoading = false;\n });\n builder.addCase(getStartSpotToApi.pending, (state: MapSpotEntityState) => {\n state.isLoading = true;\n });\n builder.addCase(getStartSpotToApi.rejected, (state: MapSpotEntityState) => {\n state.isLoading = false;\n });\n builder.addCase(getStartSpotToApi.fulfilled, (state: MapSpotEntityState, action) => {\n mapSpotSlice.caseReducers.setMapSpot(state, action);\n state.isLoading = false;\n });\n builder.addCase(getSpotToApi.pending, (state: MapSpotEntityState) => {\n state.isLoading = true;\n });\n builder.addCase(getSpotToApi.rejected, (state: MapSpotEntityState, action) => {\n if (action.payload === 'interruption') {\n // 中断されたタイミングにより、既に非同期処理が実施されて結果をセットしてしまっている可能性がある為、検索結果を一旦削除する\n mapSpotSlice.caseReducers.removeMapSpot(state);\n }\n state.isLoading = false;\n });\n builder.addCase(getSpotToApi.fulfilled, (state: MapSpotEntityState, action) => {\n mapSpotSlice.caseReducers.setMapSpot(state, action);\n state.isLoading = false;\n });\n builder.addCase(getSeasonSpotToApi.fulfilled, (state, action) => {\n mapSpotSlice.caseReducers.setMapSpot(state, action);\n });\n },\n});\n\nexport const { reset, setMapSpot, setLoading, setSelectedId } = mapSpotSlice.actions;\n\nexport default mapSpotSlice.reducer;\n","import { createSlice, type PayloadAction } from '@reduxjs/toolkit';\nimport { ModalCalendarState } from '../types';\nimport { toggle } from './modalSlice';\n\nconst initialState: ModalCalendarState = {\n isShown: false,\n startDate: undefined,\n};\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst modalCalendarSlice = createSlice({\n name: 'modalCalendar',\n initialState,\n reducers: {\n reset: (state: ModalCalendarState) => {\n Object.assign(state, initialState);\n },\n setDate: (state: ModalCalendarState, action: PayloadAction) => {\n state.startDate = action.payload;\n state.isShown = true;\n },\n changedDate: (state: ModalCalendarState, action: PayloadAction) => {\n state.startDate = new Date(action.payload);\n },\n },\n extraReducers: (builder) => {\n // Modalが閉じられたらModalFavoriteSpotStateを初期化\n builder.addMatcher(toggle.match, (state: ModalCalendarState) => {\n modalCalendarSlice.caseReducers.reset(state);\n });\n },\n});\n\nexport const { reset, setDate, changedDate } = modalCalendarSlice.actions;\n\nexport default modalCalendarSlice.reducer;\n","import { createSlice, type PayloadAction } from '@reduxjs/toolkit';\nimport { ModalPlanState, Plan } from '../types';\n\nimport { toggle } from './modalSlice';\nimport { setPlan as planSliceSetPlan } from './planSlice';\n\nconst initialState: ModalPlanState = {\n isError: false,\n plan: undefined,\n};\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst modalPlanSlice = createSlice({\n name: 'modalPlan',\n initialState,\n reducers: {\n reset(state: ModalPlanState) {\n Object.assign(state, initialState);\n },\n setPlan: (state: ModalPlanState, action: PayloadAction) => {\n state.plan = action.payload;\n },\n changeName: (state: ModalPlanState, action: PayloadAction) => {\n if (state.plan) {\n state.plan.name = action.payload;\n }\n state.isError = !action.payload;\n },\n changeMemo: (state: ModalPlanState, action: PayloadAction) => {\n if (state.plan) {\n state.plan.memo = action.payload;\n }\n },\n },\n extraReducers: (builder) => {\n // 確定ボタン押下後planSpotを初期化\n builder.addMatcher(planSliceSetPlan.match, (state: ModalPlanState) => {\n modalPlanSlice.caseReducers.reset(state);\n });\n // Modalが閉じられたらplanSpotを初期化\n builder.addMatcher(toggle.match, (state: ModalPlanState) => {\n modalPlanSlice.caseReducers.reset(state);\n });\n },\n});\n\nexport const { reset, setPlan, changeName, changeMemo } = modalPlanSlice.actions;\nexport default modalPlanSlice.reducer;\n","import { createSlice, type PayloadAction } from '@reduxjs/toolkit';\nimport { ModalState } from '../types';\nimport { updateStay, updateModeAndTransitTime } from './planSpotSlice';\nimport { updateStartTime } from './planDaySlice';\nimport { setPlan } from './planSlice';\n\nconst initialState: ModalState = {\n isOpen: false,\n contentId: undefined,\n clientHeight: 0,\n iframeRect: undefined,\n};\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst modalSlice = createSlice({\n name: 'modal',\n initialState,\n reducers: {\n reset: (state: ModalState) => {\n Object.assign(state, initialState);\n },\n toggle: (state: ModalState) => {\n state.isOpen = !state.isOpen;\n },\n setContentId: (state: ModalState, action: PayloadAction) => {\n state.contentId = action.payload;\n },\n setClientHeight: (state: ModalState, action: PayloadAction) => {\n state.clientHeight = action.payload;\n },\n setIframeTop: (state: ModalState, action: PayloadAction) => {\n state.iframeRect = action.payload;\n },\n resetIsOpen: (state: ModalState) => {\n state.isOpen = false;\n },\n },\n extraReducers: (builder) => {\n builder.addMatcher(updateStay.match, (state: ModalState) => {\n modalSlice.caseReducers.resetIsOpen(state);\n });\n builder.addMatcher(updateModeAndTransitTime.match, (state: ModalState) => {\n modalSlice.caseReducers.resetIsOpen(state);\n });\n builder.addMatcher(updateStartTime.match, (state: ModalState) => {\n modalSlice.caseReducers.resetIsOpen(state);\n });\n builder.addMatcher(setPlan.match, (state: ModalState) => {\n modalSlice.caseReducers.resetIsOpen(state);\n });\n },\n});\n\nexport const { reset, toggle, setContentId, setClientHeight, setIframeTop } = modalSlice.actions;\n\nexport default modalSlice.reducer;\n","import { createAsyncThunk, createSlice, type PayloadAction } from '@reduxjs/toolkit';\nimport { AppState, ModalSpotState, Spot } from '../types';\n\nimport { toggle } from './modalSlice';\nimport appApi from '../utils/api';\n\nconst initialState: ModalSpotState = {\n spot: undefined,\n selectedImageIndex: 0,\n isDisplayRemoveButton: false,\n};\n\n//-------------------------------------------------------------\n// 非同期処理\n//-------------------------------------------------------------\n// スポット一覧情報を取得する処理\nexport const getSpotToApi = createAsyncThunk('favoriteSpot/spotIndex', async (id: number, thunkAPI) => {\n const response = await appApi.get(`${(thunkAPI.getState() as AppState).config.rootPath}/spot_modals/${id}`);\n return response.data;\n});\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst modalSpotSlice = createSlice({\n name: 'modalFavoriteSpot',\n initialState,\n reducers: {\n reset: (state: ModalSpotState) => {\n Object.assign(state, initialState);\n },\n selectedImage: (state: ModalSpotState, action: PayloadAction) => {\n state.selectedImageIndex = action.payload;\n },\n setSpot: (state: ModalSpotState, action: PayloadAction) => {\n state.spot = action.payload;\n },\n setIsDisplayRemoveButton: (state: ModalSpotState, action: PayloadAction) => {\n state.isDisplayRemoveButton = action.payload;\n },\n },\n extraReducers: (builder) => {\n builder.addCase(getSpotToApi.fulfilled, (state: ModalSpotState, action) => {\n modalSpotSlice.caseReducers.setSpot(state, action);\n });\n // Modalが閉じられたらModalFavoriteSpotStateを初期化\n builder.addMatcher(toggle.match, (state: ModalSpotState) => {\n modalSpotSlice.caseReducers.reset(state);\n });\n },\n});\n\nexport const { reset, selectedImage, setSpot, setIsDisplayRemoveButton } = modalSpotSlice.actions;\nexport default modalSpotSlice.reducer;\n","import { createSlice, type PayloadAction } from '@reduxjs/toolkit';\nimport { ModalStartState } from '../types';\n\nimport { toggle } from './modalSlice';\nimport { updateStartTime } from './planDaySlice';\n\nconst initialState: ModalStartState = {\n id: 0,\n inputHour: 0,\n inputMinute: 0,\n};\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst modalStartSlice = createSlice({\n name: 'modalStart',\n initialState,\n reducers: {\n reset: (state: ModalStartState) => {\n Object.assign(state, initialState);\n },\n setTime: (\n state: ModalStartState,\n action: PayloadAction<{ id: number; startTimeHour: number; startTimeMinute: number }>\n ) => {\n const { id, startTimeHour, startTimeMinute } = action.payload;\n state.id = id;\n state.inputHour = startTimeHour;\n state.inputMinute = startTimeMinute;\n },\n changeInputHour: (state: ModalStartState, action: PayloadAction) => {\n const inputVal = Number(action.payload);\n if (inputVal < 0 || inputVal >= 24) return;\n state.inputHour = inputVal;\n },\n changeInputMinute: (state: ModalStartState, action: PayloadAction) => {\n const inputVal = Number(action.payload);\n if (inputVal < 0 || inputVal > 59) return;\n state.inputMinute = inputVal;\n },\n },\n extraReducers: (builder) => {\n // Modalが閉じられたらplanSpotを初期化\n builder.addMatcher(toggle.match, (state: ModalStartState) => {\n modalStartSlice.caseReducers.reset(state);\n });\n builder.addMatcher(updateStartTime.match, (state: ModalStartState) => {\n modalStartSlice.caseReducers.reset(state);\n });\n },\n});\n\nexport const { reset, setTime, changeInputHour, changeInputMinute } = modalStartSlice.actions;\nexport default modalStartSlice.reducer;\n","import { createAsyncThunk, createSlice, type PayloadAction } from '@reduxjs/toolkit';\nimport { AppState, ModalStayState, PlanSpot } from '../types';\n\nimport { toggle } from './modalSlice';\nimport { updateStay } from './planSpotSlice';\nimport appApi from '../utils/api';\n\nconst initialState: ModalStayState = {\n planSpot: undefined,\n isChangeRecommended: false,\n};\n\n//-------------------------------------------------------------\n// 非同期処理\n//-------------------------------------------------------------\n// 滞在時間更新処理\nexport const updateStayToApi = createAsyncThunk(\n 'modalStay/updateStay',\n async (arg: PlanSpot, thunkAPI) => {\n const { planId, id, stay, stayMemo } = arg;\n const { isChangeRecommended } = (thunkAPI.getState() as AppState).modalStay;\n await appApi.patch(`${(thunkAPI.getState() as AppState).config.rootPath}/plans/${planId}/plan_spots/${id}`, {\n custom_stay_value: isChangeRecommended ? null : stay,\n custom_stay_memo: stayMemo,\n });\n }\n);\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst modalStaySlice = createSlice({\n name: 'modalStay',\n initialState,\n reducers: {\n setPlanSpot: (state: ModalStayState, action: PayloadAction) => {\n state.planSpot = action.payload;\n },\n setStayTime: (state: ModalStayState, action: PayloadAction) => {\n if (state.planSpot) {\n state.planSpot.stay = Number(action.payload);\n }\n state.isChangeRecommended = false;\n },\n changeToRecommendedValue: (state: ModalStayState) => {\n if (state.planSpot) {\n state.planSpot.stay = state.planSpot.spot?.stay || 0;\n state.isChangeRecommended = true;\n }\n },\n changeMemo: (state: ModalStayState, action: PayloadAction) => {\n if (state.planSpot) {\n state.planSpot.stayMemo = action.payload;\n }\n },\n },\n extraReducers: (builder) => {\n // Modalが閉じられたらplanSpotを初期化\n builder.addMatcher(toggle.match, (state: ModalStayState) => {\n state.planSpot = undefined;\n });\n builder.addMatcher(updateStay.match, (state: ModalStayState) => {\n state.planSpot = undefined;\n });\n },\n});\n\nexport const { setPlanSpot, setStayTime, changeToRecommendedValue, changeMemo } = modalStaySlice.actions;\nexport default modalStaySlice.reducer;\n","import { createAsyncThunk, createSlice, type PayloadAction } from '@reduxjs/toolkit';\nimport { AppState, ModalTransitState, Transit } from '../types';\n\nimport { toggle } from './modalSlice';\nimport { updateModeAndTransitTime } from './planSpotSlice';\nimport appApi from '../utils/api';\n\nconst initialState: ModalTransitState = {\n transit: undefined,\n mode: '',\n isChangeRecommended: false,\n isDefaultValue: false,\n isDisabled: true,\n transitTime: 0,\n transitRemark: '',\n};\n\n//-------------------------------------------------------------\n// 非同期処理\n//-------------------------------------------------------------\n// 移動時間更新処理\nexport const updateTransitTimeToApi = createAsyncThunk(\n 'modalTransit/update',\n async (arg: ModalTransitState, thunkAPI) => {\n const { isChangeRecommended, transitTime, transitRemark, transit, mode } = arg;\n const { id } = (thunkAPI.getState() as AppState).plan;\n await appApi.patch(\n `${(thunkAPI.getState() as AppState).config.rootPath}/plans/${id}/plan_spots/${transit?.toPlanSpotId}`,\n {\n custom_transit_value: isChangeRecommended ? null : transitTime,\n custom_transit_memo: transitRemark,\n mode,\n }\n );\n }\n);\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst modalTransitSlice = createSlice({\n name: 'modalTransit',\n initialState,\n reducers: {\n reset(state: ModalTransitState) {\n Object.assign(state, initialState);\n },\n setTransit: (\n state: ModalTransitState,\n action: PayloadAction<{ transit: Transit | undefined; transitTime: number; transitRemark: string; mode: string }>\n ) => {\n state.transit = action.payload.transit;\n state.transitTime = action.payload.transitTime;\n state.transitRemark = action.payload.transitRemark;\n state.mode = action.payload.mode;\n state.isDisabled = state.mode === 'auto' && state.transitRemark === '';\n },\n changeMode: (state: ModalTransitState, action: PayloadAction) => {\n if (state.transit) {\n state.mode = action.payload;\n state.isChangeRecommended = true;\n state.isDisabled = false;\n state.isDefaultValue = false;\n if (state.mode === 'car') {\n state.transitTime = state.transit.car || 0;\n } else if (state.mode === 'train') {\n state.transitTime = state.transit.train || 0;\n } else if (state.mode === 'walk') {\n state.transitTime = state.transit.walk || 0;\n } else if (state.mode === 'bicycle') {\n state.transitTime = state.transit.bicycle || 0;\n }\n }\n },\n changeTransitTime: (state: ModalTransitState, action: PayloadAction) => {\n if (state.transit) {\n state.transitTime = Number(action.payload);\n state.isChangeRecommended = false;\n state.isDisabled = false;\n state.isDefaultValue = false;\n }\n },\n changeTransitRemark: (state: ModalTransitState, action: PayloadAction) => {\n if (state.transit) {\n state.transitRemark = action.payload;\n state.isDefaultValue = false;\n state.isDisabled = false;\n state.isChangeRecommended = false;\n }\n },\n setDefaultValue: (state: ModalTransitState) => {\n state.mode = 'auto';\n state.transitRemark = '';\n state.isDefaultValue = true;\n state.isDisabled = true;\n state.isChangeRecommended = false;\n if (state.transit?.autoDisplayMode === 'car') {\n state.transitTime = state.transit.car || 0;\n } else if (state.transit?.autoDisplayMode === 'train') {\n state.transitTime = state.transit.train || 0;\n } else if (state.transit?.autoDisplayMode === 'walk') {\n state.transitTime = state.transit.walk || 0;\n } else if (state.transit?.autoDisplayMode === 'bicycle') {\n state.transitTime = state.transit.bicycle || 0;\n }\n },\n },\n extraReducers: (builder) => {\n // Modalが閉じられたらplanSpotを初期化\n builder.addMatcher(toggle.match, (state: ModalTransitState) => {\n modalTransitSlice.caseReducers.reset(state);\n });\n // 確定ボタン押下後planSpotを初期化\n builder.addMatcher(updateModeAndTransitTime.match, (state: ModalTransitState) => {\n modalTransitSlice.caseReducers.reset(state);\n });\n },\n});\n\nexport const { reset, setTransit, changeMode, changeTransitTime, changeTransitRemark, setDefaultValue } =\n modalTransitSlice.actions;\nexport default modalTransitSlice.reducer;\n","import {\n createAsyncThunk,\n createEntityAdapter,\n createSelector,\n createSlice,\n type EntityId,\n type EntityState,\n type PayloadAction,\n} from '@reduxjs/toolkit';\n\nimport { getActivePlanToApi } from './planSlice';\nimport { ActiveDayState, AppState, PlanDay } from '../types';\nimport appApi from '../utils/api';\n\nconst planDayAdapter = createEntityAdapter({\n // idフィールドに`id`キー以外のものを使いたい場合は下記のように明示的に指定する\n selectId: (planDay: PlanDay) => planDay.id,\n sortComparer: (a: PlanDay, b: PlanDay) => {\n if (a.day > b.day) {\n return 1;\n }\n return -1;\n },\n});\nconst initialState: EntityState = planDayAdapter.getInitialState({\n selectedDay: 1,\n});\n\n//-------------------------------------------------------------\n// 非同期処理\n//-------------------------------------------------------------\nexport const updatePlanDayToApi = createAsyncThunk('planDay/update', async (arg: void, thunkAPI) => {\n const { id } = (thunkAPI.getState() as AppState).plan;\n const { entities } = (thunkAPI.getState() as AppState).planDay;\n const { day } = (thunkAPI.getState() as AppState).activeDay;\n const planDay = Object.values(entities).find((p: PlanDay | undefined) => p?.day === day);\n if (planDay) {\n await appApi.patch(`${(thunkAPI.getState() as AppState).config.rootPath}/active_plan/plan_days/${planDay.id}`, {\n plan_id: id,\n plan_day: {\n start_time_hour: planDay.startTimeHour,\n start_time_minute: planDay.startTimeMinute,\n fixed_goal: planDay.fixedGoal,\n },\n });\n }\n});\n\n// DAYの追加\nexport const createPlanDayToApi = createAsyncThunk('planDay/create', async (arg: void, thunkAPI) => {\n const { id } = (thunkAPI.getState() as AppState).plan;\n const response = await appApi.post(`${(thunkAPI.getState() as AppState).config.rootPath}/active_plan/plan_days/`, {\n plan_id: id,\n });\n return response.data;\n});\n\n// DAYの削除\nexport const deletePlanDayToApi = createAsyncThunk(\n 'planDay/delete',\n async (arg: EntityId, thunkAPI) => {\n const { id } = (thunkAPI.getState() as AppState).plan;\n await appApi.delete(`${(thunkAPI.getState() as AppState).config.rootPath}/active_plan/plan_days/${arg}`, {\n data: { plan_id: id },\n });\n }\n);\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst planDaySlice = createSlice({\n name: 'planDay',\n initialState,\n reducers: {\n reset: (state: EntityState) => {\n Object.assign(state, initialState);\n },\n setPlanDay: (state: EntityState, action: PayloadAction<{ planDays: PlanDay[] }>) => {\n planDayAdapter.setAll(state, action.payload.planDays);\n },\n deletePlanDay: (state: EntityState, action: PayloadAction) => {\n planDayAdapter.removeOne(state, action.payload);\n state.ids.forEach((id: EntityId, index: number) => {\n planDayAdapter.updateOne(state, {\n id,\n changes: { day: index + 1 },\n });\n });\n },\n updateStartTime: (\n state: EntityState,\n action: PayloadAction<{ id: number; startTimeHour: number; startTimeMinute: number }>\n ) => {\n const { id, startTimeHour, startTimeMinute } = action.payload;\n planDayAdapter.updateOne(state, {\n id,\n changes: { startTimeHour, startTimeMinute },\n });\n },\n },\n extraReducers: (builder) => {\n // 画面表示時/リロード時にサーバから取得時に呼ばれる。\n builder.addCase(getActivePlanToApi.fulfilled, (state: EntityState, action) => {\n planDaySlice.caseReducers.setPlanDay(state, action);\n });\n // DAY追加時にサーバから取得時に呼ばれる。\n builder.addCase(createPlanDayToApi.fulfilled, (state: EntityState, action) => {\n planDayAdapter.setAll(state, action.payload);\n });\n },\n});\n\n//-------------------------------------------------------------\n// Selector\n//-------------------------------------------------------------\n// 全件取得用\nexport const planDaySelectors = planDayAdapter.getSelectors((state: AppState) => state.planDay);\n\n// 選択されているPlanDayを取得する\nexport const activePlanDaySelector = createSelector(\n [(state: AppState) => state.planDay, (state: AppState) => state.activeDay],\n (state: EntityState, stateActiveDay: ActiveDayState): PlanDay | undefined => {\n const ids = state.ids.filter((id: EntityId) => stateActiveDay.day === (state.entities[id]?.day || 0));\n return state.entities[ids[0]];\n }\n);\n\nexport const { reset, setPlanDay, deletePlanDay, updateStartTime } = planDaySlice.actions;\nexport default planDaySlice.reducer;\n","import { createAsyncThunk, createSlice, type PayloadAction } from '@reduxjs/toolkit';\n\nimport { Plan, PlanMenu, FavoriteSpot, Website, AppState } from '../types';\nimport appApi from '../utils/api';\nimport { customSpotCreateToApi } from './customeSpotSlice';\n\nconst initialState: PlanMenu = {\n favoriteSpots: [],\n isWebsiteShown: false,\n plans: [],\n websites: [],\n selectedIndex: 0,\n};\n\n//-------------------------------------------------------------\n// 非同期処理\n//-------------------------------------------------------------\n// プラン情報を取得する処理\nexport const getPlanListToApi = createAsyncThunk('planMenu/index', async (arg: void, thunkAPI) => {\n const response = await appApi.get(`${(thunkAPI.getState() as AppState).config.rootPath}/plans`);\n return response.data;\n});\n\n// お気に入りスポット一覧情報を取得する処理\nexport const getFavoriteSpotListToApi = createAsyncThunk(\n 'planMenu/favoriteSpotIndex',\n async (arg: void, thunkAPI) => {\n const response = await appApi.get(`${(thunkAPI.getState() as AppState).config.rootPath}/favorite_spots`);\n return response.data;\n }\n);\n\n// お気に入りスポットを削除する処理\nexport const deleteFavoriteSpotToApi = createAsyncThunk(\n 'planMenu/favoriteSpotDelete',\n async (id: number, thunkAPI) => {\n await appApi.delete(`${(thunkAPI.getState() as AppState).config.rootPath}/favorite_spots/${id}`);\n }\n);\n\n// 近隣サイト一覧情報を取得する処理\nexport const getWebsiteListToApi = createAsyncThunk(\n 'planMenu/websiteIndex',\n async (arg: void, thunkAPI) => {\n const response = await appApi.get(`${(thunkAPI.getState() as AppState).config.rootPath}/websites`);\n return response.data;\n }\n);\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst planMenuSlice = createSlice({\n name: 'planMenu',\n initialState,\n reducers: {\n reset: (state: PlanMenu) => {\n Object.assign(state, initialState);\n },\n deletePlan: (state: PlanMenu, action: PayloadAction) => {\n state.plans = state.plans.filter((plan: Plan) => plan.id !== action.payload);\n },\n deleteFavoriteSpot: (state: PlanMenu, action: PayloadAction) => {\n state.favoriteSpots = state.favoriteSpots.filter(\n (favoriteSpot: FavoriteSpot) => favoriteSpot.id !== action.payload\n );\n },\n changePlanName: (state: PlanMenu, action: PayloadAction<{ id: number; name: string }>) => {\n const { id, name } = action.payload;\n state.plans = state.plans.map((plan: Plan) => {\n if (plan.id === id) {\n plan.name = name;\n }\n return plan;\n });\n },\n setPlans: (state: PlanMenu, action: PayloadAction) => {\n state.plans = action.payload;\n },\n setFavoriteSpots: (state: PlanMenu, action: PayloadAction) => {\n state.favoriteSpots = action.payload;\n },\n setWebsites: (state: PlanMenu, action: PayloadAction) => {\n state.websites = action.payload;\n },\n setIndex: (state: PlanMenu, action: PayloadAction) => {\n if (action.payload < 5) {\n state.selectedIndex = action.payload;\n }\n },\n },\n extraReducers: (builder) => {\n builder.addCase(getPlanListToApi.fulfilled, (state: PlanMenu, action) => {\n planMenuSlice.caseReducers.setPlans(state, action);\n });\n builder.addCase(getPlanListToApi.rejected, (state: PlanMenu) => {\n state.plans = [];\n });\n builder.addCase(getFavoriteSpotListToApi.fulfilled, (state: PlanMenu, action) => {\n planMenuSlice.caseReducers.setFavoriteSpots(state, action);\n });\n builder.addCase(getFavoriteSpotListToApi.rejected, (state: PlanMenu) => {\n state.favoriteSpots = [];\n });\n builder.addCase(getWebsiteListToApi.fulfilled, (state: PlanMenu, action) => {\n planMenuSlice.caseReducers.setWebsites(state, action);\n });\n builder.addCase(getWebsiteListToApi.rejected, (state: PlanMenu) => {\n state.websites = [];\n state.isWebsiteShown = false;\n });\n builder.addCase(customSpotCreateToApi.fulfilled, (state: PlanMenu, action) => {\n state.selectedIndex = 0;\n state.favoriteSpots = action.payload.favoriteSpots;\n });\n },\n});\n\nexport const {\n reset,\n deletePlan,\n deleteFavoriteSpot,\n changePlanName,\n setPlans,\n setFavoriteSpots,\n setWebsites,\n setIndex,\n} = planMenuSlice.actions;\nexport default planMenuSlice.reducer;\n","import { createAsyncThunk, createSlice, type PayloadAction } from '@reduxjs/toolkit';\n\nimport { AppState, Plan, PlanDay, PlanSpot } from '../types';\nimport appApi from '../utils/api';\n\nimport { formatDate } from '../utils/datetime';\n\n// new Date().setHours(9)としてstartTimeに指定するとエラーとなる\nconst nowTime = new Date();\nnowTime.setHours(9);\n\nconst initialState: Plan = {\n id: 0,\n memo: '',\n name: '',\n priorityCar: false,\n priorityMode: '',\n startDate: undefined,\n startTime: nowTime,\n};\n\n//-------------------------------------------------------------\n// 非同期処理\n//-------------------------------------------------------------\n// プラン名/メモを更新する処理\nexport const updateNameToApi = createAsyncThunk('plan/updateName', async (arg: void, thunkAPI) => {\n const { id, name, memo } = (thunkAPI.getState() as AppState).plan;\n if (!name) {\n return;\n }\n\n await appApi.patch(`${(thunkAPI.getState() as AppState).config.rootPath}/plans/${id}`, { name, memo });\n});\n\n// ゴールロック・解除, 優先する交通手段を更新\nexport const updatePlanToApi = createAsyncThunk('plan/update', async (arg: void, thunkAPI) => {\n const { id, priorityMode } = (thunkAPI.getState() as AppState).plan;\n await appApi.patch(`${(thunkAPI.getState() as AppState).config.rootPath}/plans/${id}`, {\n priority_mode: priorityMode,\n });\n});\n\n// プランを削除\nexport const deletePlanToApi = createAsyncThunk<{ plan: Plan }, number>(\n 'plan/delete',\n async (arg: number, thunkAPI) => {\n const response = await appApi.delete(`${(thunkAPI.getState() as AppState).config.rootPath}/plans/${arg}`);\n if (response.data === 'no_content') {\n return { plan: undefined };\n }\n return { plan: response.data };\n }\n);\n\n// プランを作成\nexport const createPlanToApi = createAsyncThunk<{ plan: Plan }, void>('plan/create', async (arg: void, thunkAPI) => {\n const response = await appApi.post(`${(thunkAPI.getState() as AppState).config.rootPath}/active_plan/`);\n return { plan: response.data };\n});\n\n// アクティブプランに設定する処理\nexport const updateActivePlanToApi = createAsyncThunk<{ plan: Plan; planSpots: PlanSpot[] }, number>(\n 'activePlan/update',\n async (id: number, thunkAPI) => {\n const response = await appApi.patch(`${(thunkAPI.getState() as AppState).config.rootPath}/active_plan`, {\n plan_id: id,\n });\n return response.data;\n }\n);\n\n// active_planの情報を取得する処理\nexport const getActivePlanToApi = createAsyncThunk<{ plan: Plan; planDays: PlanDay[]; planSpots: PlanSpot[] }, void>(\n 'activePlan/show',\n async (arg: void, thunkAPI) => {\n const response = await appApi.get(`${(thunkAPI.getState() as AppState).config.rootPath}/active_plan/`);\n return response.data;\n }\n);\n\n// 出発日を更新する処理\nexport const updateStartDateToApi = createAsyncThunk(\n 'plan/updateStartTime',\n async (arg: void, thunkAPI) => {\n const { id, startDate } = (thunkAPI.getState() as AppState).plan;\n if (!startDate) return;\n // 日付がJSTのためそのままAPIに渡すと日付がずれるので文字列として日付のみをサーバへ送信\n await appApi.patch(`${(thunkAPI.getState() as AppState).config.rootPath}/plans/${id}`, {\n start_date: formatDate(startDate, 0, '-'),\n });\n }\n);\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst planSlice = createSlice({\n name: 'plan',\n initialState,\n reducers: {\n reset: (state: Plan) => {\n Object.assign(state, initialState);\n },\n setPlan: (state: Plan, action: PayloadAction<{ plan: Plan }>) => {\n if (action.payload.plan) {\n Object.assign(state, action.payload.plan);\n }\n },\n changePriorityCar: (state: Plan, action: PayloadAction) => {\n state.priorityCar = action.payload;\n },\n changePriorityMode: (state: Plan, action: PayloadAction) => {\n state.priorityMode = action.payload;\n },\n changeDate: (state: Plan, action: PayloadAction) => {\n state.startDate = action.payload;\n },\n setPlanId: (state: Plan, action: PayloadAction) => {\n state.id = action.payload;\n },\n },\n extraReducers: (builder) => {\n // 画面表示時/リロード時にサーバから取得時に呼ばれる。\n builder.addCase(getActivePlanToApi.fulfilled, (state, action) => {\n planSlice.caseReducers.setPlan(state, action);\n });\n builder.addCase(deletePlanToApi.fulfilled, (state, action) => {\n planSlice.caseReducers.setPlan(state, action);\n });\n builder.addCase(createPlanToApi.fulfilled, (state, action) => {\n planSlice.caseReducers.setPlan(state, action);\n });\n builder.addCase(updateActivePlanToApi.fulfilled, (state, action) => {\n planSlice.caseReducers.setPlan(state, action);\n });\n },\n});\n\nexport const { reset, setPlan, changePriorityCar, changeDate, setPlanId, changePriorityMode } = planSlice.actions;\nexport default planSlice.reducer;\n","import {\n createAsyncThunk,\n createEntityAdapter,\n createSlice,\n type EntityState,\n type PayloadAction,\n type EntityId,\n createSelector,\n} from '@reduxjs/toolkit';\n\nimport appApi from '../utils/api';\nimport { ActiveDayState, AppState, MarkerType, Plan, PlanDay, PlanSpot } from '../types';\n\nimport { getActivePlanToApi } from './planSlice';\nimport { customSpotCreateToApi } from './customeSpotSlice';\n\n// createEntityAdapter\n// https://redux-toolkit.js.org/api/createEntityAdapter\n// 従来のreducerとの違いはデータを正規化しデータベースのように管理してくれます。(実際はDictionary型)\n// Entityにはids, entitiesがあります\n// idsは一意となるidの配列(idは指定したキーに変更可能) → selectId\n// entitiesは実際のデータを格納する。\n// 従来のreducerの場合以下のようになります。\n// {\n// tasks: [\n// { id: 1, title: 'aaa', done: false },\n// { id: 2, title: 'bbb', done: false },\n// ];\n// }\n// 上記をcreateEntityAdapterで管理する場合は以下のようになります。\n// {\n// ids: [1, 2]\n// entities: {\n// {\n// 1: {id: 1, title: 'aaa', done: false},\n// 2: {id: 2, title: 'bbb', done: false}\n// }\n// }\n// }\n// データの操作に関しては\n// https://redux-toolkit.js.org/api/createEntityAdapter#crud-functions\nconst planSpotAdapter = createEntityAdapter({\n // idフィールドに`id`キー以外のものを使いたい場合は下記のように明示的に指定する\n selectId: (planSpot: PlanSpot) => planSpot.id,\n // idsが常にpositionの昇順になるよう設定\n sortComparer: (a: PlanSpot, b: PlanSpot) => {\n if (a.position > b.position) {\n return 1;\n }\n return -1;\n },\n});\nconst initialState: EntityState = planSpotAdapter.getInitialState();\n\n//-------------------------------------------------------------\n// Componentで利用されるplanSpotの共通関数\n//-------------------------------------------------------------\nexport const getPosition = (position: number, goal: number, start: number): string => {\n if (position === 0 || position === start) {\n return 'S';\n }\n\n if (position === goal) {\n return 'G';\n }\n\n return String(position - start);\n};\n\n//-------------------------------------------------------------\n// 非同期処理\n//-------------------------------------------------------------\n// プランスポット削除処理\n// storeの配列から削除し画面描画を先に行う。非同期にてサーバ通信で削除処理を実行し、結果を受け取る\nexport const deletePlanSpotToApi = createAsyncThunk(\n 'planSpot/delete',\n async (arg: number, thunkAPI) => {\n const planSpot = (thunkAPI.getState() as AppState).planSpot.entities[arg];\n if (planSpot) {\n // api部分はstimulusで使用されているものを利用\n const response = await appApi.delete(\n `${(thunkAPI.getState() as AppState).config.rootPath}/plans/${planSpot.planId}/plan_spots/${planSpot.id}`\n );\n return response.data;\n }\n }\n);\n\n// stimulusから呼ばれる。\n// 地図上のinfowindow Startボタン押下時に呼ばれる処理\nexport const setStartFromInfoWindowToApi = createAsyncThunk(\n 'planSpot/setStartFromInfoWindow',\n async (arg: PlanSpot, thunkAPI) => {\n const { planId, id } = arg;\n // api部分はstimulusで使用されているものを利用\n const response = await appApi.patch(\n `${(thunkAPI.getState() as AppState).config.rootPath}/plans/${planId}/plan_spots/${id}`,\n { position: 'start', custom_transit_value: null, mode: 'auto' }\n );\n return response.data;\n }\n);\n\n// 地図上のinfowindow Goalボタン押下時に呼ばれる処理\nexport const setGoalFromInfoWindowToApi = createAsyncThunk<{ plan: Plan; planSpots: PlanSpot[] }, PlanSpot>(\n 'planSpot/setGoalFromInfoWindow',\n async (arg: PlanSpot, thunkAPI) => {\n const { planId, id } = arg;\n // api部分はstimulusで使用されているものを利用\n const response = await appApi.patch(\n `${(thunkAPI.getState() as AppState).config.rootPath}/plans/${planId}/plan_spots/${id}`,\n { position: 'goal' }\n );\n return response.data;\n }\n);\n\n// plan_spots_controller.jsから呼ばれる並び替え処理\n// 通常のfunction定義をした場合、stimulusにて呼び出した際に以下のエラーが出る\n// [Actions must be plain objects. Use custom middleware for async actions]\nexport const sortToApi = createAsyncThunk<{ plan: Plan; planSpots: PlanSpot[] }, { id: number; position: number }>(\n 'planSpot/sortToApi',\n async (arg: { id: number; position: number }, thunkAPI) => {\n const { id, position } = arg;\n const planSpot = (thunkAPI.getState() as AppState).planSpot.entities[id];\n if (planSpot) {\n const response = await appApi.put(\n `${(thunkAPI.getState() as AppState).config.rootPath}/plans/${planSpot.planId}/plan_spots/${planSpot.id}`,\n {\n position: position + 1,\n }\n );\n return response.data;\n }\n return {\n plan: (thunkAPI.getState() as AppState).plan,\n planSpots: (thunkAPI.getState() as AppState).planSpot.entities,\n };\n }\n);\n\n// ルート最適化を行う\nexport const optimizeToApi = createAsyncThunk('plan/optimize', async (arg: void, thunkAPI) => {\n const { id } = (thunkAPI.getState() as AppState).plan;\n const { entities } = (thunkAPI.getState() as AppState).planDay;\n const { day } = (thunkAPI.getState() as AppState).activeDay;\n const planDay = Object.values(entities).find((p: PlanDay | undefined) => p?.day === day);\n const response = await appApi.put(`${(thunkAPI.getState() as AppState).config.rootPath}/reorder_plans/${id}`, {\n plan_day_id: planDay?.id,\n });\n return response.data;\n});\n\n// planSpot追加処理\nexport const createPlanSpotToApi = createAsyncThunk<{ planSpots: PlanSpot[] }, { spotId: number; position: string }>(\n 'planSpot/create',\n async (arg: { spotId: number; position: string }, thunkAPI) => {\n const { id } = (thunkAPI.getState() as AppState).plan;\n const { entities } = (thunkAPI.getState() as AppState).planDay;\n const { day } = (thunkAPI.getState() as AppState).activeDay;\n const planDay = Object.values(entities).find((p: PlanDay | undefined) => p?.day === day);\n const { spotId, position } = arg;\n const response = await appApi.post(`${(thunkAPI.getState() as AppState).config.rootPath}/plans/${id}/plan_spots`, {\n plan_spot: { spot_id: spotId, position, plan_day_id: planDay?.id },\n });\n return response.data;\n }\n);\n\nexport const initializeModeAndCustomTransitToApi = createAsyncThunk<{ planSpots: PlanSpot[] }, void>(\n 'planSpot/initializeModeAndCustomTransit',\n async (arg: void, thunkAPI) => {\n const { entities } = (thunkAPI.getState() as AppState).planSpot;\n const planSpots = Object.values(entities).filter((p: PlanSpot | undefined) => p && p.mode !== 'auto');\n\n if (planSpots.length > 0) {\n let response = null;\n for (const planSpot of planSpots) {\n response = await appApi.patch(\n `${(thunkAPI.getState() as AppState).config.rootPath}/plans/${planSpot?.planId}/plan_spots/${planSpot?.id}`,\n {\n mode: 'auto',\n custom_transit_value: null,\n }\n );\n }\n return response?.data;\n }\n return null;\n }\n);\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\n// redux-toolkit には Immer が入っているので以下のように書く必要がありません。\n// return {\n// ...state,\n// value: 123,\n// }\n// 参考サイト: https://redux-toolkit.js.org/usage/immer-reducers#redux-toolkit-and-immer\nconst planSpotSlice = createSlice({\n name: 'planSpot',\n initialState,\n reducers: {\n reset: (state: EntityState) => {\n Object.assign(state, initialState);\n },\n // planSpotSlice内から呼ばれる共通処理\n resetPosition: (state: EntityState) => {\n state.ids.forEach((id: EntityId, index: number) => {\n planSpotAdapter.updateOne(state, {\n id,\n changes: { position: index },\n });\n });\n },\n deletePlanSpot: (state: EntityState, action: PayloadAction<{ id: EntityId; position: number }>) => {\n const { id, position } = action.payload;\n // 削除対象の1つ下にあるplanSpotのカスタム移動時間を削除し、modeをautoに更新\n state.ids.forEach((planSpotId: EntityId) => {\n if (state.entities[planSpotId]?.position === position + 1) {\n planSpotAdapter.updateOne(state, {\n id: planSpotId,\n changes: { transitTime: undefined, mode: 'auto' },\n });\n }\n });\n planSpotAdapter.removeOne(state, id);\n // positionの再採番\n planSpotSlice.caseReducers.resetPosition(state);\n },\n setStart: (state: EntityState, action: PayloadAction<{ id: EntityId; position: number }>) => {\n // 処理対象となるplanSpotと次のplanSpotのカスタム移動時間をクリアする\n const { id, position } = action.payload;\n const targetPlanSpot = state.entities[id];\n // DAYの先頭に移動するPlanSpotのカスタム移動時間をクリアする\n planSpotAdapter.updateOne(state, {\n id: targetPlanSpot?.id || 0,\n changes: { transitTime: undefined, mode: 'auto' },\n });\n // DAYの先頭に移動するPlanSpotの+1のPlanSpotのカスタム移動時間をクリアする\n state.ids.forEach((_id: EntityId) => {\n if (state.entities[_id]?.position === (targetPlanSpot?.position || 0) + 1) {\n planSpotAdapter.updateOne(state, {\n id: _id,\n changes: { transitTime: undefined, mode: 'auto' },\n });\n }\n });\n\n // 引数で渡されたDAYの先頭position以降のpositionを+1に設定(更新対象のplanSpotは除く)\n state.ids.forEach((_id: EntityId) => {\n const planSpot = state.entities[_id];\n if (position <= (planSpot?.position || 0) && planSpot?.id !== id) {\n planSpotAdapter.updateOne(state, {\n id: planSpot?.id || 0,\n changes: { position: (planSpot?.position || 0) + 1 },\n });\n }\n });\n\n // DAYの先頭へ移動\n planSpotAdapter.updateOne(state, {\n id: targetPlanSpot?.id || 0,\n changes: { position },\n });\n\n // positionの再採番\n planSpotSlice.caseReducers.resetPosition(state);\n },\n setPlanSpots: (state: EntityState, action: PayloadAction<{ planSpots: PlanSpot[] }>) => {\n planSpotAdapter.setAll(state, action.payload.planSpots);\n },\n updateModeAndTransitTime: (\n state: EntityState,\n action: PayloadAction<{ mode: string; transitTime: number; transitRemark: string; id: number }>\n ) => {\n const { mode, transitTime, transitRemark } = action.payload;\n planSpotAdapter.updateOne(state, {\n id: action.payload.id,\n changes: {\n mode,\n transitTime,\n transitRemark,\n },\n });\n },\n updateStay: (state: EntityState, action: PayloadAction) => {\n const planSpot = action.payload;\n if (planSpot) {\n planSpotAdapter.updateOne(state, {\n id: planSpot.id,\n changes: { stay: planSpot.stay, stayMemo: planSpot.stayMemo },\n });\n }\n },\n deletePlanSpotWithDay: (\n state: EntityState,\n action: PayloadAction<{ planDayId: number; day: number }>\n ) => {\n const { planDayId, day } = action.payload;\n // 削除されたplanDayに紐づくplanSpotを削除する\n state.ids.forEach((id: EntityId) => {\n if (state.entities[id]?.planDayId === planDayId) {\n planSpotAdapter.removeOne(state, id);\n }\n });\n // 削除後、planSpot.dayを-1する\n state.ids.forEach((id: EntityId) => {\n const planSpot: PlanSpot | undefined = state.entities[id];\n if (planSpot && day < planSpot.day) {\n planSpotAdapter.updateOne(state, {\n id: planSpot.id,\n changes: { day: planSpot.day - 1 },\n });\n }\n });\n // positionの再採番\n planSpotSlice.caseReducers.resetPosition(state);\n },\n },\n extraReducers: (builder) => {\n // extraReducersの本家サイト: https://redux-toolkit.js.org/api/createslice\n // 外部から呼び出しや、非同期、ドメイン跨いでの呼び出しが可能とのこと\n // pending, fulfilled, rejectedの3つが用意されている\n // https://redux-toolkit.js.org/api/createAsyncThunk\n // プランスポット情報取得に成功した場合\n builder.addCase(getActivePlanToApi.fulfilled, (state, action) => {\n planSpotSlice.caseReducers.setPlanSpots(state, action);\n });\n // infowindowのGAOLボタン押下後、更新に成功した場合\n builder.addCase(setGoalFromInfoWindowToApi.fulfilled, (state: EntityState, action) => {\n // setGoalではplanSpotsからゴールに指定されたスポットを配列の最後に入れ直しているが、サーバ側にてスポットの並び順が\n // 変更される為取得した値を設定する\n planSpotSlice.caseReducers.setPlanSpots(state, action);\n });\n // ルート最適化取得後\n builder.addCase(optimizeToApi.fulfilled, (state, action) => {\n planSpotAdapter.setAll(state, action.payload);\n });\n // マイプランに追加押下後、更新に成功した場合\n builder.addCase(createPlanSpotToApi.fulfilled, (state, action) => {\n planSpotSlice.caseReducers.reset(state);\n planSpotSlice.caseReducers.setPlanSpots(state, action);\n });\n // 並び替え処後、更新に成功した場合\n builder.addCase(sortToApi.fulfilled, (state, action) => {\n planSpotSlice.caseReducers.reset(state);\n planSpotSlice.caseReducers.setPlanSpots(state, action);\n });\n // 優先する交通手段が変更された場合、planSpotのmodeをautoに更新する処理が成功した場合\n builder.addCase(initializeModeAndCustomTransitToApi.fulfilled, (state, action) => {\n if (action && action.payload) {\n planSpotSlice.caseReducers.reset(state);\n planSpotSlice.caseReducers.setPlanSpots(state, action);\n }\n });\n builder.addCase(customSpotCreateToApi.fulfilled, (state, action) => {\n planSpotSlice.caseReducers.reset(state);\n planSpotSlice.caseReducers.setPlanSpots(state, action);\n });\n },\n});\n\nexport const {\n setPlanSpots,\n deletePlanSpot,\n setStart,\n updateModeAndTransitTime,\n resetPosition,\n updateStay,\n reset,\n deletePlanSpotWithDay,\n} = planSpotSlice.actions;\n\n//-------------------------------------------------------------\n// Selector\n//-------------------------------------------------------------\n// 全件取得用\nexport const planSpotSelectors = planSpotAdapter.getSelectors((state: AppState) => state.planSpot);\n\n// 指定されたpositionより小さいデータを取得する\ntype ReturnSelectorType = (state: AppState) => S;\nexport const planSpotPositionSelector = (position: number): ReturnSelectorType<(PlanSpot | undefined)[]> =>\n createSelector(\n [(state: AppState) => state.planSpot, (state: AppState) => state.activeDay],\n (state: EntityState, activeDayState: ActiveDayState): (PlanSpot | undefined)[] => {\n const ids = state.ids.filter((id: EntityId) => position >= (state.entities[id]?.position || 0));\n return Object.values(state.entities).filter(\n (planSpot) => ids.includes(planSpot?.id || 0) && activeDayState.day === planSpot?.day\n );\n }\n );\n\n// 合計時間算出用Selector\nexport const staySelector = createSelector(\n [(state: AppState) => state.planSpot, (state: AppState) => state.activeDay],\n (state: EntityState, activeDayState: ActiveDayState) =>\n Object.values(state.entities).map((planSpot) => {\n if (activeDayState.day === planSpot?.day) {\n return planSpot?.stay || planSpot?.spot?.stay || 0;\n }\n return 0;\n })\n);\n\n// 選択されている日付のPlanSpot算出用Selector\nexport const planSpotInDaySelector = createSelector(\n [(state: AppState) => state.planSpot, (state: AppState) => state.activeDay],\n (state: EntityState, activeDayState: ActiveDayState): EntityId[] => {\n const planSpots = Object.values(state.entities).map((planSpot) => {\n if (activeDayState.day === planSpot?.day) {\n return planSpot.id;\n }\n return 0;\n });\n return planSpots.filter((planSpot) => planSpot !== 0);\n }\n);\n\nexport const planSpotMarkerSelector = createSelector(\n [(state: AppState) => state.planSpot, (state: AppState) => state.activeDay],\n (state: EntityState, activeDayState: ActiveDayState): (MarkerType | undefined)[] => {\n const markers = Object.values(state.entities).map((planSpot) => {\n if (planSpot && planSpot.spot && planSpot.mapSpot && activeDayState.day === planSpot.day) {\n return {\n name: planSpot.name,\n lat: planSpot.spot.lat,\n lng: planSpot.spot.lng,\n image: planSpot.mapSpot.markerImage,\n position: planSpot.position,\n spot: planSpot.mapSpot,\n day: planSpot.day,\n planSpotId: planSpot.id,\n };\n }\n return undefined;\n });\n return markers.filter((marker) => marker !== undefined);\n }\n);\n\n// 選択されている日付のPlanSpotの最大position算出用Selector\nexport const planSpotInMaxPositionSelector = createSelector(\n [(state: AppState) => state.planSpot, (state: AppState) => state.activeDay],\n (state: EntityState, activeDayState: ActiveDayState): number => {\n const positions = Object.values(state.entities).map((planSpot) => {\n if (activeDayState.day === planSpot?.day) {\n return planSpot.position;\n }\n return 0;\n });\n if (positions.length === 0) return -1;\n if (positions?.filter((position) => position >= 0).length === 0) return -1;\n return positions?.reduce((a: number, b: number): number => Math.max(a, b));\n }\n);\n\n// 選択されている日付のPlanSpotの最小position算出用Selector\nexport const planSpotInMinPositionSelector = createSelector(\n [(state: AppState) => state.planSpot, (state: AppState) => state.activeDay],\n (state: EntityState, activeDayState: ActiveDayState): number => {\n const positions = Object.values(state.entities).map((planSpot) => {\n if (activeDayState.day === planSpot?.day) {\n return planSpot.position;\n }\n return -1;\n });\n if (positions.length === 0) return -1;\n if (positions?.filter((position) => position >= 0).length === 0) return -1;\n return positions?.filter((position) => position >= 0).reduce((a: number, b: number): number => Math.min(a, b));\n }\n);\n\n// 指定されたspot.idはplanSpotに既に登録されているか\nexport const isRegistedAsPlanSpotSelector = (spotId: number): ReturnSelectorType =>\n createSelector(\n [(state: AppState) => state.planSpot, (state: AppState) => state.activeDay],\n (state: EntityState, activeDayState: ActiveDayState): boolean => {\n const results = Object.values(state.entities).map((planSpot) => {\n if (activeDayState.day === planSpot?.day && planSpot?.spot?.id === spotId) {\n return true;\n }\n return false;\n });\n if (results.length === 0) return false;\n if (results?.filter((isRegisted) => isRegisted === true).length === 0) return false;\n return true;\n }\n );\n\n// 指定されたspot.idがplanSpotに存在する場合、PlanSpotインスタンスを返却する。存在しない場合はnullを返却\nexport const returnRegistedAsPlanSpotSelector = (spotId: number): ReturnSelectorType =>\n createSelector(\n [(state: AppState) => state.planSpot, (state: AppState) => state.activeDay],\n (state: EntityState, activeDayState: ActiveDayState): PlanSpot | null => {\n const result = Object.values(state.entities).find((planSpot) => {\n return activeDayState.day === planSpot?.day && planSpot?.spot?.id === spotId;\n });\n\n if (result) {\n return result;\n }\n return null;\n }\n );\n\nexport default planSpotSlice.reducer;\n","import { createSlice, type PayloadAction } from '@reduxjs/toolkit';\nimport { PopupState } from '../types';\n\nconst initialState: PopupState = {\n isShown: false,\n contentText: '',\n};\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst popupSlice = createSlice({\n name: 'popup',\n initialState,\n reducers: {\n reset: (state: PopupState) => {\n Object.assign(state, initialState);\n },\n showPopup: (state: PopupState) => {\n state.isShown = true;\n },\n hidePopup: (state: PopupState) => {\n state.isShown = false;\n },\n setPopupContentText: (state: PopupState, action: PayloadAction) => {\n state.contentText = action.payload;\n },\n },\n});\n\nexport const { reset, showPopup, hidePopup, setPopupContentText } = popupSlice.actions;\n\nexport default popupSlice.reducer;\n","import { createSlice, type PayloadAction } from '@reduxjs/toolkit';\n\nimport { SnsState } from '../types';\nimport { toggle as modalToggle } from './modalSlice';\n\nconst initialState: SnsState = {\n isShown: false,\n parentUrl: '',\n isDataRemote: false,\n};\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst snsSlice = createSlice({\n name: 'sns',\n initialState,\n reducers: {\n reset: (state: SnsState) => {\n Object.assign(state, initialState);\n },\n toggle: (state: SnsState) => {\n state.isShown = !state.isShown;\n },\n setParentUrl: (state: SnsState, action: PayloadAction) => {\n if (action.payload) {\n state.parentUrl = action.payload;\n }\n },\n setDataRemote: (state: SnsState, action: PayloadAction) => {\n state.isDataRemote = action.payload;\n },\n },\n extraReducers: (builder) => {\n // Modalが閉じられたらModalFavoriteSpotStateを初期化\n builder.addMatcher(modalToggle.match, (state: SnsState) => {\n state.isShown = false;\n });\n },\n});\n\nexport const { reset, toggle, setParentUrl, setDataRemote } = snsSlice.actions;\n\nexport default snsSlice.reducer;\n","import { createSlice, type PayloadAction } from '@reduxjs/toolkit';\n\nimport { spotSlidTileState } from '../types';\nimport { setDay } from './activeDaySlice';\n\nconst initialState: spotSlidTileState = {\n selectedSpotId: 0,\n isOpen: true,\n};\n\n//-------------------------------------------------------------\n// Reducer, Actionの設定\n//-------------------------------------------------------------\nconst spotSlideTileSlice = createSlice({\n name: 'spotSlideTileSlice',\n initialState,\n reducers: {\n reset: (state: spotSlidTileState) => {\n Object.assign(state, initialState);\n },\n setSpotId: (state: spotSlidTileState, action: PayloadAction) => {\n state.selectedSpotId = action.payload;\n },\n toggle: (state: spotSlidTileState) => {\n state.isOpen = !state.isOpen;\n },\n },\n extraReducers: (builder) => {\n // planDay選択時にinfowindowを閉じる\n builder.addMatcher(setDay.match, (state: spotSlidTileState) => {\n spotSlideTileSlice.caseReducers.setSpotId(state, { payload: 0, type: spotSlideTileSlice.actions.setSpotId.type });\n });\n },\n});\n\nexport const { reset, setSpotId, toggle } = spotSlideTileSlice.actions;\n\nexport default spotSlideTileSlice.reducer;\n","import {\n createAsyncThunk,\n createSlice,\n type PayloadAction,\n createEntityAdapter,\n type EntityState,\n type EntityId,\n createSelector,\n} from '@reduxjs/toolkit';\n\nimport appApi from '../utils/api';\nimport { ActiveDayState, AppState, PlanSpot, Transit } from '../types';\n\nconst transitAdapter = createEntityAdapter({\n // idフィールドに`id`キー以外のものを使いたい場合は下記のように明示的に指定する\n selectId: (transit: Transit) => transit.toPlanSpotId,\n});\n\nconst initialState: EntityState = transitAdapter.getInitialState();\n\n// 表示対象の移動時間を取得\nexport const getTransitTime = (transitTime: number, mode: string, transit: Transit | undefined): number => {\n if (!transit) {\n return 0;\n }\n if (transitTime > 0) {\n return transitTime;\n }\n if (mode === 'car' || (mode === 'auto' && transit.autoDisplayMode === 'car')) {\n return transit.car || 0;\n }\n if (mode === 'train' || (mode === 'auto' && transit.autoDisplayMode === 'train')) {\n return transit.train || 0;\n }\n if (mode === 'walk' || (mode === 'auto' && transit.autoDisplayMode === 'walk')) {\n return transit.walk || 0;\n }\n if (mode === 'bicycle' || (mode === 'auto' && transit.autoDisplayMode === 'bicycle')) {\n return transit.bicycle || 0;\n }\n return 0;\n};\n\n//-------------------------------------------------------------\n// 非同期処理\n//-------------------------------------------------------------\n\ntype GetTransitProps = {\n priorityMode: string;\n fromPlanSpot: PlanSpot;\n toPlanSpot: PlanSpot;\n};\n\n// 移動手段情報を取得する処理\nexport const getTransitToApi = createAsyncThunk(\n 'transit/create',\n async (arg: GetTransitProps, thunkAPI) => {\n const { priorityMode, fromPlanSpot, toPlanSpot } = arg;\n\n const response = await appApi.post(`${(thunkAPI.getState() as AppState).config.rootPath}/spot_transits`, {\n from_plan_spot_id: fromPlanSpot.id,\n to_plan_spot_id: toPlanSpot.id,\n mode: toPlanSpot.mode,\n priority_mode: priorityMode,\n });\n return { ...response.data, fromPlanSpotId: fromPlanSpot.id, toPlanSpotId: toPlanSpot.id, day: fromPlanSpot.day };\n }\n);\n\n// redux-toolkit には Immer が入っているので以下のように書く必要がありません。\n// return {\n// ...state,\n// value: 123,\n// }\n// 参考サイト: https://redux-toolkit.js.org/usage/immer-reducers#redux-toolkit-and-immer\nconst transitSlice = createSlice({\n name: 'transit',\n initialState,\n reducers: {\n reset: (state: EntityState) => {\n Object.assign(state, initialState);\n },\n setTransit: transitAdapter.setOne,\n deleteTransit: (state: EntityState, action: PayloadAction) => {\n // 削除対象のfrom, to合わせて削除\n state.ids.forEach((id: EntityId) => {\n const transit = state.entities[id];\n if (action.payload === transit?.fromPlanSpotId || action.payload === transit?.toPlanSpotId) {\n transitAdapter.removeOne(state, id);\n }\n });\n },\n },\n extraReducers: (builder) => {\n // transit情報取得に成功した場合\n builder.addCase(getTransitToApi.fulfilled, (state, action) => {\n transitSlice.caseReducers.setTransit(state, action);\n });\n },\n});\n\nexport const { setTransit, deleteTransit, reset } = transitSlice.actions;\nexport const transitSelectors = transitAdapter.getSelectors((state: AppState) => state.transit);\n// 指定されたpositionより小さいデータを取得する\ntype ReturnSelectorType = (state: AppState) => S;\nexport const transitPositionSelector = (position: number): ReturnSelectorType<(Transit | undefined)[]> =>\n createSelector(\n [(state: AppState) => state.transit, (state: AppState) => state.planSpot, (state: AppState) => state.activeDay],\n (\n stateTransit: EntityState,\n statePlanSpot: EntityState,\n activeDayState: ActiveDayState\n ): (Transit | undefined)[] => {\n const ids = statePlanSpot.ids.filter(\n (id: EntityId) =>\n position >= (statePlanSpot.entities[id]?.position || 0) &&\n activeDayState.day === statePlanSpot.entities[id]?.day\n );\n const transits = Object.values(stateTransit.entities).filter((transit) =>\n ids.includes(transit?.toPlanSpotId || 0)\n );\n return transits.filter((transit) => transit !== undefined);\n }\n );\n\nexport const transitTimeSelector = createSelector(\n [(state: AppState) => state.transit, (state: AppState) => state.planSpot, (state: AppState) => state.activeDay],\n (stateTransit: EntityState, statePlanSpot: EntityState, activeDayState: ActiveDayState) =>\n Object.values(stateTransit.entities).map((transit) => {\n const planSpot = statePlanSpot.entities[transit?.toPlanSpotId || 0];\n if (activeDayState.day === planSpot?.day) {\n return getTransitTime(planSpot?.transitTime || 0, planSpot?.mode || 'auto', transit);\n }\n return 0;\n })\n);\nexport default transitSlice.reducer;\n","import axios from 'axios';\nimport Rails from '@rails/ujs';\nimport qs from 'qs';\n\nconst TOKEN_IDENTIFIER = 'iframe-user-token';\n\nfunction getToken(): string | null {\n return localStorage.getItem(TOKEN_IDENTIFIER);\n}\n\nconst api = axios.create({\n headers: { 'X-Requested-With': 'XMLHttpRequest' },\n paramsSerializer: (params) => qs.stringify(params, { arrayFormat: 'brackets' }),\n});\n\n// get CSRF token\napi.interceptors.request.use((config) => ({\n ...config,\n headers: { ...config.headers, 'X-CSRF-Token': Rails.csrfToken() },\n}));\n\n// get user token\napi.interceptors.request.use((config) => {\n const token = getToken();\n\n if (token) {\n return { ...config, headers: { ...config.headers, 'USER-TOKEN': token } };\n }\n\n return config;\n});\n\nexport default api;\n","export const formatTime = (time: Date): string => {\n if (time) {\n return `${time.getHours()}:${String(time.getMinutes()).padStart(2, '0')}`;\n }\n return '';\n};\n\nexport const formatDate = (startTime: Date, num: number, delimiter: string): string => {\n if (startTime) {\n const date = new Date(startTime);\n date.setDate(date.getDate() + num);\n\n return `${date.getFullYear()}${delimiter}${String(date.getMonth() + 1).padStart(2, '0')}${delimiter}${String(\n date.getDate()\n ).padStart(2, '0')}`;\n }\n return '';\n};\n"],"names":["initialState","isOpen","mapMenuSlice","createSlice","name","reducers","reset","state","Object","assign","toggle","actions","selectedIndex","mapMenuHeaderSlice","setIndex","action","payload","selectedMonth","mapMenuMonthSlice","setMonth","seasons","selectedId","mapMenuSeasonSlice","setId","setSeasons","extraReducers","builder","addCase","getMapMenuListToApi","fulfilled","caseReducers","rootReducer","combineReducers","activeDay","activeDayReducer","backdrop","backdropSliceReducer","config","configSliceReducer","customSpot","customSpotReducer","map","mapReducer","mapMenu","mapMenuReducer","mapMenuHeader","mapMenuHeaderReducer","mapMenuMonth","mapMenuMonthReducer","mapMenuSeason","mapMenuSeasonReducer","mapMenuCategory","mapMenuItemReducer","mapSpot","mapSpotReducer","modal","modalSliceReducer","modalCalendar","modalCalendarReducer","modalSpot","modalFavoriteSpotReducer","modalStay","modalStaySliceReducer","modalStart","modalStartSliceReducer","modalTransit","modalTransitReducer","modalPlan","modalPlanReducer","plan","planSliceReducer","planDay","planDayReducer","planMenu","planMenuReducer","planSpot","planSpotReducer","popup","popupReducer","sns","snsReducer","spotSlideTile","mapSlideTileReducer","transit","transitReducer","configureStore","reducer","middleware","getDefaultMiddleware","serializableCheck","export","exportReducer","store","activeDaySlice","day","setDay","getActivePlanToApi","planDays","length","backdropSlice","isShown","addMatcher","toggleModal","match","updateStay","updateModeAndTransitTime","updateStartTime","setPlan","configSlice","eventMenu","eventMonth","eventSeason","helpButton","helpUrl","helpUrlAnchorLink","iframe","nearSite","rootPath","parentUrl","snsAuth","socialMediaAuth","provider","fingerprint","setConfig","isShow","isNameError","isStayError","stay","lat","lng","customSpotCreateToApi","createAsyncThunk","async","arg","thunkAPI","appApi","post","getState","japan_concierge_custom_spot_form","data","getCustomSpotNameToApi","get","customSpotSlice","setIsShow","setName","trim","setStay","setIsNameError","setIsStayError","setLatLng","id","exportPlan","undefined","isShowMap","Array","getExportInfoToApi","exportSlice","setExport","exportPlanDays","fill","setIsShowMap","totalStayTransitTimeSelector","position","createSelector","_export","totalStayTime","exportPlanDay","filter","planDaySpotsNoSelf","exportPlanDaySpots","planDaySpot","forEach","transitTime","categories","mapMenuCategorySlice","setCategories","infoWindow","isInitializeMapCenter","isPlanSpot","isRunFitBounds","selectedPlanSpotId","selectedPosition","mapSlice","setMap","openInfoWindow","close","google","maps","InfoWindow","closeInfoWindow","focusSpotOnMap","panTo","setIsRunFitBounds","setIsInitializeMapCenter","type","mapSpotAdapter","createEntityAdapter","selectId","spot","getInitialState","isLoading","getFavoriteMapSpotToApi","params","q","favorite","getStartSpotToApi","start_spot","getSpotToApi","Math","round","getCenter","getSeasonSpotToApi","season","mapSpotSelectors","month","getSelectors","mapSpotMarkerSelector","statePlanSpot","stateActiveDay","values","entities","find","image","markerImage","mapSpotSlice","setMapSpot","addMany","removeMapSpot","removeAll","setLoading","setSelectedId","pending","rejected","startDate","modalCalendarSlice","setDate","changedDate","Date","isError","modalPlanSlice","changeName","changeMemo","memo","planSliceSetPlan","contentId","clientHeight","iframeRect","modalSlice","setContentId","setClientHeight","setIframeTop","resetIsOpen","selectedImageIndex","isDisplayRemoveButton","modalSpotSlice","selectedImage","setSpot","setIsDisplayRemoveButton","inputHour","inputMinute","modalStartSlice","setTime","startTimeHour","startTimeMinute","changeInputHour","inputVal","Number","changeInputMinute","isChangeRecommended","updateStayToApi","planId","stayMemo","patch","custom_stay_value","custom_stay_memo","modalStaySlice","setPlanSpot","setStayTime","changeToRecommendedValue","mode","isDefaultValue","isDisabled","transitRemark","updateTransitTimeToApi","toPlanSpotId","custom_transit_value","custom_transit_memo","modalTransitSlice","setTransit","changeMode","car","train","walk","bicycle","changeTransitTime","changeTransitRemark","setDefaultValue","autoDisplayMode","planDayAdapter","sortComparer","a","b","selectedDay","updatePlanDayToApi","p","plan_id","plan_day","start_time_hour","start_time_minute","fixed_goal","fixedGoal","createPlanDayToApi","deletePlanDayToApi","delete","planDaySlice","setPlanDay","setAll","deletePlanDay","removeOne","ids","index","updateOne","changes","planDaySelectors","activePlanDaySelector","favoriteSpots","isWebsiteShown","plans","websites","getPlanListToApi","getFavoriteSpotListToApi","deleteFavoriteSpotToApi","getWebsiteListToApi","planMenuSlice","deletePlan","deleteFavoriteSpot","favoriteSpot","changePlanName","setPlans","setFavoriteSpots","setWebsites","nowTime","setHours","priorityCar","priorityMode","startTime","updateNameToApi","updatePlanToApi","priority_mode","deletePlanToApi","response","createPlanToApi","updateActivePlanToApi","updateStartDateToApi","start_date","formatDate","planSlice","changePriorityCar","changePriorityMode","changeDate","setPlanId","planSpotAdapter","getPosition","goal","start","String","deletePlanSpotToApi","setStartFromInfoWindowToApi","setGoalFromInfoWindowToApi","sortToApi","put","planSpots","optimizeToApi","plan_day_id","createPlanSpotToApi","spotId","plan_spot","spot_id","initializeModeAndCustomTransitToApi","planSpotSlice","resetPosition","deletePlanSpot","planSpotId","setStart","targetPlanSpot","_id","setPlanSpots","deletePlanSpotWithDay","planDayId","planSpotSelectors","planSpotPositionSelector","activeDayState","includes","staySelector","planSpotInDaySelector","planSpotMarkerSelector","marker","planSpotInMaxPositionSelector","positions","reduce","max","planSpotInMinPositionSelector","min","returnRegistedAsPlanSpotSelector","result","contentText","popupSlice","showPopup","hidePopup","setPopupContentText","isDataRemote","snsSlice","setParentUrl","setDataRemote","modalToggle","selectedSpotId","spotSlideTileSlice","setSpotId","transitAdapter","getTransitTime","getTransitToApi","fromPlanSpot","toPlanSpot","from_plan_spot_id","to_plan_spot_id","fromPlanSpotId","transitSlice","setOne","deleteTransit","transitSelectors","transitPositionSelector","stateTransit","transitTimeSelector","api","axios","headers","paramsSerializer","qs","arrayFormat","interceptors","request","use","Rails","csrfToken","token","localStorage","getItem","formatTime","time","getHours","getMinutes","padStart","num","delimiter","date","getDate","getFullYear","getMonth"],"sourceRoot":""}