2018-02-08 09:15:25 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import { observers } from './observers'
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-28 13:09:39 -08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import { computations } from './computations'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import { mixins } from './mixins'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import { LocalStorageStore } from './LocalStorageStore'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								const KEYS_TO_STORE_IN_LOCAL_STORAGE = new Set([
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-08 22:29:29 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  'currentInstance',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  'currentRegisteredInstance',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  'currentRegisteredInstanceName',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  'instanceNameInSearch',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  'instanceThemes',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  'loggedInInstances',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  'loggedInInstancesInOrder',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  'autoplayGifs',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  'markMediaAsSensitive',
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-25 16:26:43 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  'pinnedPages',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  'inputTextInCompose'
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-28 13:09:39 -08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								])
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								class PinaforeStore extends LocalStorageStore {
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-08 22:29:29 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  constructor (state) {
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-28 13:09:39 -08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    super(state, KEYS_TO_STORE_IN_LOCAL_STORAGE)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-19 20:15:24 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								export const store = new PinaforeStore({
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-28 13:09:39 -08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  instanceNameInSearch: '',
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-06 20:54:49 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  queryInSearch: '',
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-28 13:09:39 -08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  currentInstance: null,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  loggedInInstances: {},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  loggedInInstancesInOrder: [],
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-31 18:20:30 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  instanceThemes: {},
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-04 12:27:28 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  spoilersShown: {},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  sensitivesShown: {},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  autoplayGifs: false,
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-07 22:49:50 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  markMediaAsSensitive: false,
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-08 09:15:25 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  pinnedPages: {},
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-11 10:35:25 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  instanceLists: {},
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-11 13:46:57 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  pinnedStatuses: {},
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-23 18:23:36 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  instanceInfos: {},
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-25 16:26:43 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  statusModifications: {},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  inputTextInCompose: {}
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-28 13:09:39 -08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								})
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								mixins(PinaforeStore)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								computations(store)
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-20 21:29:59 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								observers(store)
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-28 13:09:39 -08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-19 20:15:24 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								if (process.browser && process.env.NODE_ENV !== 'production') {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  window.store = store // for debugging
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-19 20:28:31 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 |