{"version":3,"sources":["../src/index.ts","../src/components/connect.tsx","../src/GsmContext.ts","../src/hooks/useGsmContext.ts","../src/Util/Random.ts","../src/Util/Iterates.ts","../src/components/Provider.tsx","../src/Util/Schedules.ts","../src/Util/deferred.ts","../src/heavyAnimation.ts","../src/StateStore.ts","../src/storage/getStorage.ts","../src/storage/WebStorage.ts","../src/StoreCaching.ts","../src/hooks/useStore.ts","../src/hooks/useGlobal.ts","../src/hooks/useStaticGlobal.ts"],"sourcesContent":["import connect from \"./components/connect\";\nimport Provider from \"./components/Provider\";\nimport StateStore from \"./StateStore\";\nimport { Store } from \"./StateStore\";\nimport WebStorage from './storage/WebStorage';\n\nexport { StoreCaching } from \"./StoreCaching\";\nexport { StateStore, Store, Provider, connect };\nexport { WebStorage };\n\nexport * from \"./hooks\";\nexport * from \"./types\";\n","import { createElement, memo, useCallback, useRef, useSyncExternalStore } from \"react\";\nimport useGsmContext from \"../hooks/useGsmContext\";\nimport { ConnectOptions, TypedConnector } from \"../types\";\nimport { randomString } from \"../Util/Random\";\nimport { shallowEqual } from \"../Util/Iterates\";\n\nconst connect = <\n  OwnProps extends AnyLiteral,\n  TState extends AnyLiteral,\n  Selected extends AnyLiteral & OwnProps\n>(\n  selector: (global: TState, props: OwnProps) => Selected,\n  options: Partial<ConnectOptions> = {}\n) => {\n\n  options = Object.assign<ConnectOptions, Partial<ConnectOptions>>({\n    nonMemoizedContainer: false,\n    label: randomString(5),\n    debugSnapshotSkip: false,\n    debugSnapshotPicker: false,\n  }, options);\n\n  const anyDebugEnabled = options.debugSnapshotPicker || options.debugSnapshotSkip;\n\n  return (Component: React.FC<Selected>) => {\n\n    function TCContainer(ownProps: OwnProps) {\n      const { store } = useGsmContext();\n      const reasonRef = useRef<string | undefined>(\"@connect_initial_snapshot\");\n      const propsRef = useRef(ownProps);\n      propsRef.current = ownProps;\n\n      const lastRef = useRef<{\n        state: TState;\n        props: OwnProps;\n        selected: Selected;\n      }>();\n\n      const getSnapshot = useCallback(() => {\n        const state = store.getState();\n        const prev = lastRef.current;\n        const reason = options.debugSnapshotPicker\n          ? (reasonRef.current || \"@connect_snapshot\")\n          : undefined;\n\n        if (\n          prev &&\n          prev.state === state &&\n          shallowEqual(prev.props, propsRef.current)\n        ) {\n          if (options.debugSnapshotSkip) {\n            console.debug(\n              \"[GSM]\", `connect on ${options.label}\\n`,\n              \"skipping snapshot on same state and own props\",\n            );\n          }\n          return prev.selected;\n        }\n\n        if (options.debugSnapshotPicker) {\n          console.debug(\"[GSM]\", `connect on ${options.label}\\n`, \"snapshot is picking\");\n        }\n\n        let nextSelected: Selected;\n        try {\n          nextSelected = selector(state, propsRef.current);\n        } catch (err) {\n          console.error(\"[GSM]\", `connect on ${options.label}\\n`, \"selector thrown an error\\n\", err);\n          return prev?.selected as Selected;\n        }\n\n        const shouldSkipUpdate = prev && shallowEqual(prev.selected, nextSelected);\n        if (options.debugSnapshotPicker) {\n          console.debug(\n            \"[GSM]\", `connect on ${options.label}\\n`, \"snapshot is picked, equaling..\",\n            \"\\n\", \"call_reason\", \"=>\", reason,\n            \"\\n\", \"current_state\", \"=>\", prev?.selected,\n            \"\\n\", \"next_state\", \"=>\", nextSelected,\n            \"\\n\", \"shouldUpdate\", \"=>\", !shouldSkipUpdate,\n          );\n        }\n        if (shouldSkipUpdate) return prev.selected;\n\n        lastRef.current = {\n          state,\n          props: propsRef.current,\n          selected: nextSelected,\n        };\n\n        if (options.debugSnapshotPicker) {\n          console.debug(\n            \"[GSM]\", `connect on ${options.label}\\n`, \"state is picked\",\n            \"\\n\", \"call_reason\", \"=>\", reason,\n            \"\\n\", \"next_state\", \"=>\", nextSelected,\n          );\n        }\n\n        return nextSelected;\n      }, [store, selector, options]);\n\n      const subscribe = useCallback((onStorageChange: () => void) => {\n        const cb = (_global: TState, reason?: string) => {\n          if (anyDebugEnabled) {\n            reasonRef.current = reason;\n            console.debug(\"[GSM]\", `connect on ${options.label}\\n`,\n              \"store pushed update\", { reason });\n          }\n          onStorageChange();\n        }\n        store.addCallback(cb);\n        return () => store.removeCallback(cb);\n      }, [store, anyDebugEnabled, options]);\n\n      const mappedProps = useSyncExternalStore(\n        subscribe,\n        getSnapshot,\n      );\n\n      anyDebugEnabled &&\n        console.debug(\"[GSM]\", `connect on ${options.label}\\n`,\n          \"rendering TCContainer\", { ownProps, mappedProps });\n\n      return createElement(Component, {\n        ...mappedProps,\n        ...ownProps,\n      } as Selected);\n    }\n\n    return options.nonMemoizedContainer\n      ? TCContainer\n      : memo(TCContainer);\n  };\n};\n\nexport default connect as TypedConnector<AnyLiteral>;\n","import { createContext } from \"react\";\nimport { Store } from \"./StateStore\";\n\nexport interface ReactGSMContextValue<S extends AnyLiteral = any, A = unknown> {\n\tstore: Store<S,A>;\n}\n\nexport const ReactGSMContext = createContext<ReactGSMContextValue | null>(null as any);\n\nexport type ReactGSMContextInstance = typeof ReactGSMContext\n\nexport default ReactGSMContext;","import ReactGSMContext from \"../GsmContext\";\nimport React from \"react\";\n\n\nconst useGsmContext = (context = ReactGSMContext) => {\n\tconst contextValue = React.useContext(context);\n\treturn contextValue!;\n}\n\nexport default useGsmContext;","export const randomInteger = (min = 0, max = 1) => Math.floor(min + Math.random() * (max + 1 - min));\n\nexport const randomString = (length: number) => {\n\tlet result = '';\n\tlet characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\tlet charactersLength = characters.length;\n\tfor (let i = 0; i < length; i++) {\n\t\tresult += characters.charAt(Math.floor(Math.random() * charactersLength));\n\t}\n\treturn result;\n};\n\nexport const generateIdFor = (obj: object) => {\n\tlet id;\n\n\tdo {\n\t\tid = String(Math.random()).replace('0.', 'id');\n\t} while (obj.hasOwnProperty(id));\n\n\treturn id;\n};","export function pick<T, K extends keyof T>(object: T, keys: K[]) {\n  return keys.reduce((result, key) => {\n    result[key] = object[key];\n    return result;\n  }, {} as Pick<T, K>);\n}\n\nexport function omit<T extends object, K extends keyof T>(object: T, keys: K[]): Omit<T, K> {\n  const stringKeys = new Set(keys.map(String));\n  const savedKeys = Object.keys(object)\n    .filter((key) => !stringKeys.has(key)) as Array<Exclude<keyof T, K>>;\n\n  return pick(object, savedKeys);\n}\n\nexport function arePropsShallowEqual(currentProps: AnyLiteral, newProps: AnyLiteral): boolean {\n\n\tif (currentProps === newProps) {\n\t\treturn true;\n\t}\n\n\tconst currentKeys = Object.keys(currentProps);\n\tconst currentKeysLength = currentKeys.length;\n\tconst newKeysLength = Object.keys(newProps).length;\n\n\tif (currentKeysLength !== newKeysLength) {\n\t\treturn false;\n\t}\n\n\tif (currentKeysLength === 0) {\n\t\treturn true;\n\t}\n\n\tfor (let i = 0; i < currentKeysLength; i++) {\n\t\tconst prop = currentKeys[i];\n\t\tif (currentProps[prop] !== newProps[prop]) return false;\n\t}\n\n\treturn true;\n}\n\nexport function getUnequalProps(currentProps: AnyLiteral, newProps: AnyLiteral) {\n\tconst currentKeys = Object.keys(currentProps);\n\tconst currentKeysLength = currentKeys.length;\n\tconst newKeysLength = Object.keys(newProps).length;\n\n\tif (currentKeysLength !== newKeysLength) {\n\t\treturn ['%LENGTH%'];\n\t}\n\n\treturn currentKeys.reduce((res, prop) => {\n\t\tif (currentProps[prop] !== newProps[prop]) {\n\t\t\tres.push(`${prop}: ${currentProps[prop]} => ${newProps[prop]}`);\n\t\t}\n\t\treturn res;\n\t}, [] as Array<string>);\n}\n\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x: any, y: any): boolean {\n\t// SameValue algorithm\n\tif (x === y) { // Steps 1-5, 7-10\n\t\t// Steps 6.b-6.e: +0 != -0\n\t\t// Added the nonzero y check to make Flow happy, but it is redundant\n\t\treturn x !== 0 || y !== 0 || 1 / x === 1 / y;\n\t} else {\n\t\t// Step 6.a: NaN == NaN\n\t\treturn x !== x && y !== y;\n\t}\n}\n\n/**\n * Performs equality by iterating through keys on an object and returning false\n * when any key has values which are not strictly equal between the arguments.\n * Returns true when the values of all keys are strictly equal.\n */\nexport function shallowEqual(objA: AnyLiteral | any, objB: AnyLiteral | any): boolean {\n\tif (is(objA, objB)) {\n\t\treturn true;\n\t}\n\n\tif (typeof objA !== 'object' || objA === null ||\n\t\ttypeof objB !== 'object' || objB === null) {\n\t\treturn false;\n\t}\n\n\tconst keysA = Object.keys(objA);\n\tconst keysB = Object.keys(objB);\n\n\tif (keysA.length !== keysB.length) {\n\t\treturn false;\n\t}\n\n\t// Test for A's keys different from B.\n\tfor (let i = 0; i < keysA.length; i++) {\n\t\tif (\n\t\t\t!hasOwnProperty.call(objB, keysA[i]) ||\n\t\t\t!is(objA[keysA[i]], objB[keysA[i]])\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\nexport const getObjectDiff = (obj1: AnyLiteral, obj2: AnyLiteral) => {\n\tconst combinedObject = { ...obj1, ...obj2 };\n\treturn Object.entries(combinedObject).reduce((acc, [key, value]) => {\n\t\tif (\n\t\t\t!Object.values(obj1).includes(value) ||\n\t\t\t!Object.values(obj2).includes(value)\n\t\t) acc[key] = value;\n\t\treturn acc;\n\t}, {} as AnyLiteral);\n};\n\nexport function compareObjects(original:AnyLiteral, copy:AnyLiteral) {\n\tfor (let [k, v] of Object.entries(original)) {\n\t\tif (typeof v === \"object\" && v !== null) {\n\t\t\tcompareObjects(v, copy?.[k]);\n\t\t} else {\n\t\t\tif (Object.is(v, copy?.[k])) delete copy?.[k];\n\t\t}\n\t}\n\treturn copy;\n}\n\nexport const stacksEqual = <T>(a1: Array<T>, a2: Array<T>) => a1 === a2 || (\n\ta1 !== null && a2 !== null &&\n\tArray.isArray(a1) && Array.isArray(a2) &&\n\ta1.length === a2.length &&\n\ta1.map((val, idx) => shallowEqual(val, a2[idx])).every(e => e)\n);\n\nexport const stacksDiff = <T>(arr1: Array<T>, arr2: Array<T>) =>\n\tarr1 !== null && arr2 !== null &&\n\tArray.isArray(arr1) && Array.isArray(arr2) &&\n\tarr1.length > 0 && arr2.length > 0 &&\n\tarr1\n\t\t.filter(x => !arr2.includes(x))\n\t\t.concat(arr2.filter(x => !arr1.includes(x)));\n\nexport const validateKeySet = <T extends AnyLiteral, E extends Partial<T>>(srcObj: T, destObj: E): T => {\n\tif (srcObj == null) srcObj = {} as T;\n\tconst destCopy = Object.assign(destObj);\n\tconst keys = Object.keys(srcObj) as (keyof T)[];\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tconst key = keys[i];\n\t\tif (typeof destCopy[key] === 'undefined') {\n\t\t\tdestCopy[key] = srcObj[key];\n\t\t} else if (\n\t\t\ttypeof srcObj[key] === 'object' &&\n\t\t\tsrcObj[key] != null &&\n\t\t\t// @ts-ignore\n\t\t\t!(srcObj[key] instanceof Array)\n\t\t) {\n\t\t\tdestCopy[key] = validateKeySet(srcObj[key], destCopy[key]);\n\t\t}\n\t}\n\treturn destCopy as T;\n}","import React from \"react\";\nimport type { ReactNode, Context } from \"react\";\nimport ReactGSMContext, { ReactGSMContextValue } from \"../GsmContext\";\nimport { Store } from \"../StateStore\";\n\nexport interface ProviderProps<S extends AnyLiteral, A> {\n\tstore: Store<S, A>,\n\tcontext?: Context<ReactGSMContextValue | null>,\n\tchildren: ReactNode,\n}\n\nconst Provider = <S extends AnyLiteral, A>({\n\tstore,\n\tcontext,\n\tchildren,\n}: ProviderProps<S, A>) => {\n\n\tconst contextValue = React.useMemo(() => {\n\t\treturn { store };\n\t}, [store]);\n\n\tconst Context = context || ReactGSMContext;\n\n\treturn <Context.Provider value={contextValue} children={children} />;\n\n};\n\nexport default Provider;","export type Scheduler = typeof requestAnimationFrame | typeof onTickEnd;\n\nexport function debounce<F extends AnyToVoidFunction>(\n\tfn: F,\n\tms: number,\n\tshouldRunFirst = true,\n\tshouldRunLast = true\n) {\n\tlet waitingTimeout: number | undefined;\n\n\treturn (...args: Parameters<F>) => {\n\t\tif (waitingTimeout) {\n\t\t\tclearTimeout(waitingTimeout);\n\t\t\twaitingTimeout = undefined;\n\t\t} else if (shouldRunFirst) {\n\t\t\tfn(...args);\n\t\t}\n\n\t\t// eslint-disable-next-line no-restricted-globals\n\t\twaitingTimeout = self.setTimeout(() => {\n\t\t\tif (shouldRunLast) {\n\t\t\t\tfn(...args);\n\t\t\t}\n\n\t\t\twaitingTimeout = undefined;\n\t\t}, ms);\n\t};\n}\n\nexport function throttle<F extends AnyToVoidFunction>(\n\tfn: F,\n\tms: number = 500,\n\tshouldRunFirst = true\n) {\n\tlet interval: number | undefined;\n\tlet isPending: boolean;\n\tlet args: Parameters<F>;\n\n\treturn (..._args: Parameters<F>) => {\n\t\tisPending = true;\n\t\targs = _args;\n\n\t\tif (!interval) {\n\t\t\tif (shouldRunFirst) {\n\t\t\t\tisPending = false;\n\t\t\t\tfn(...args);\n\t\t\t}\n\n\t\t\t// eslint-disable-next-line no-restricted-globals\n\t\t\tinterval = self.setInterval(() => {\n\t\t\t\tif (!isPending) {\n\t\t\t\t\t// eslint-disable-next-line no-restricted-globals\n\t\t\t\t\tself.clearInterval(interval);\n\t\t\t\t\tinterval = undefined;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tisPending = false;\n\t\t\t\tfn(...args);\n\t\t\t}, ms);\n\t\t}\n\t};\n}\n\n\n\nexport function throttleWithTickEnd<F extends AnyToVoidFunction>(fn: F) {\n  return throttleWith(onTickEnd, fn);\n}\n\nexport function throttleWith<F extends AnyToVoidFunction>(schedulerFn: Scheduler, fn: F) {\n  let waiting = false;\n  let args: Parameters<F>;\n\n  return (..._args: Parameters<F>) => {\n    args = _args;\n\n    if (!waiting) {\n      waiting = true;\n\n      schedulerFn(() => {\n        waiting = false;\n        fn(...args);\n      });\n    }\n  };\n}\n\n\nlet onTickEndCallbacks: NoneToVoidFunction[] | undefined;\n\nexport function onTickEnd(callback: NoneToVoidFunction) {\n  if (!onTickEndCallbacks) {\n    onTickEndCallbacks = [callback];\n\n    Promise.resolve().then(() => {\n      const currentCallbacks = onTickEndCallbacks!;\n      onTickEndCallbacks = undefined;\n      currentCallbacks.forEach((cb) => cb());\n    });\n  } else {\n    onTickEndCallbacks.push(callback);\n  }\n}","export default class Deferred<T = void> {\n  promise: Promise<T>;\n  reject!: (reason?: any) => void;\n  resolve!: (value: T | PromiseLike<T>) => void;\n\n  constructor() {\n    this.promise = new Promise((resolve, reject) => {\n      this.reject = reject;\n      this.resolve = resolve;\n    });\n  }\n}\n","import Deferred from \"./Util/deferred\";\n\nconst AUTO_END_TIMEOUT = 1000; // 1 sec\n\nexport default function createHeavyAnimationController() {\n\n\tlet counter = 0;\n\tlet deferred: Deferred | null = null;\n\n\tconst getIsHeavyAnimating = () => (deferred != null && deferred instanceof Deferred);\n\n\tconst waitHeavyAnimation = () => deferred?.promise;\n\n\tconst beginHeavyAnimation = (duration = AUTO_END_TIMEOUT) => {\n\t\tcounter++;\n\n\t\tif (counter === 1) { // first set\n\t\t\tdeferred = new Deferred();\n\t\t}\n\n\t\tconst timeout = window.setTimeout(onEnd, duration);\n\t\tlet hasEnded = false;\n\n\t\tfunction onEnd() {\n\t\t\tif (hasEnded) return;\n\t\t\thasEnded = true;\n\n\t\t\tclearTimeout(timeout);\n\t\t\tcounter--;\n\n\t\t\tif (counter === 0) { // last unset\n\t\t\t\tdeferred?.resolve();\n\t\t\t\tdeferred = null;\n\t\t\t}\n\t\t}\n\n\t\treturn onEnd;\n\t};\n\n\treturn {\n\t\tgetIsHeavyAnimating,\n\t\twaitHeavyAnimation,\n\t\tbeginHeavyAnimation,\n\t};\n}\n","import type { ActionOptions } from \"./types\";\nimport { shallowEqual } from \"./Util/Iterates\";\nimport { generateIdFor } from \"./Util/Random\";\nimport { throttleWithTickEnd } from \"./Util/Schedules\";\nimport createHeavyAnimationController from \"./heavyAnimation\";\n\nexport default function StateStore<TState = AnyLiteral, ActionPayloads = Record<string, any>>(\n\tinitialState?: TState | undefined,\n\tdebugMode?: boolean,\n) {\n\n\ttype ActionNames = keyof ActionPayloads;\n\ttype Actions = {\n\t\t[ActionName in ActionNames]:\n\t\t\tundefined extends ActionPayloads[ActionName]\n\t\t\t\t? (payload?: ActionPayloads[ActionName], options?: ActionOptions) => Promise<void>\n\t\t\t\t: (payload: ActionPayloads[ActionName], options?: ActionOptions) => Promise<void>;\n\t};\n\ttype ActionPayload<ActionName extends ActionNames> = ActionPayloads[ActionName];\n\ttype ActionHandler<ActionName extends ActionNames> = (\n\t\tglobal: TState,\n\t\tactions: Actions,\n\t\tpayload: ActionPayload<ActionName>,\n\t) => TState | void | Promise<void>;\n\ttype ActionHandlers = {\n\t\t[ActionName in ActionNames]: ActionHandler<ActionName>[];\n\t};\n\n\ttype Container = {\n\t\tselector: (state: TState, ownProps?: AnyLiteral) => Partial<TState>;\n\t\townProps?: AnyLiteral | undefined;\n\t\tmappedProps?: AnyLiteral | undefined;\n\t\tcallback: (mappedProps: AnyLiteral, reason?: string) => void;\n\t\tdebug?: AnyLiteral | string;\n\t};\n\ttype Containers = Map<string, Container>;\n\n\tconst {\n\t\tbeginHeavyAnimation,\n\t\tgetIsHeavyAnimating,\n\t\twaitHeavyAnimation,\n\t} = createHeavyAnimationController();\n\n\tlet currentState: TState | undefined = initialState;\n\tlet reducers: ActionHandlers = {} as ActionHandlers;\n\tlet actions: Actions = {} as Actions;\n\tlet containers: Containers = new Map();\n\n\tlet forceOnHeavyAnimation = true;\n\n\tconst setState: (state: TState, options?: ActionOptions) => TState = (state, options) => {\n\t\tif (typeof state === 'object' && state !== currentState) {\n\t\t\tcurrentState = state;\n\t\t\tdebugMode && console.debug(\"[StateStore]\", \"[setState]\", \"\\noptions:\", options, \"\\nstate:\", state);\n\t\t\tif (!options?.silent) { // if silent -> no callbacks\n\t\t\t\tif (options?.forceSync) {\n\t\t\t\t\tforceOnHeavyAnimation = true;\n\t\t\t\t\trunCallbacks(options?.reason);\n\t\t\t\t} else {\n\t\t\t\t\tif (options?.forceOnHeavyAnimation) forceOnHeavyAnimation = true;\n\t\t\t\t\trunCallbacksThrottled(options?.reason);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn currentState as TState;\n\t}\n\n\tfunction getState<S = Partial<TState>>(selector: (state: TState) => S): S;\n\tfunction getState(selector?: undefined): TState;\n\tfunction getState<S = Partial<TState>>(selector?: (state: TState) => S): S | TState {\n\t\treturn selector ? selector(currentState as TState) : currentState as TState;\n\t}\n\n\tconst updateContainers = (currentState: TState, reason?: string) => {\n\t\tfor (const container of containers.values()) {\n\t\t\tconst { selector, ownProps, mappedProps, callback } = container;\n\n\t\t\tlet newMappedProps;\n\n\t\t\ttry {\n\t\t\t\tnewMappedProps = selector(currentState, ownProps);\n\t\t\t} catch (err) {\n\t\t\t\tdebugMode && console.error(\"[GSM]\", \"updateContainers\\n\", \"selector thrown an error\", err);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (Object.keys(newMappedProps).length && !shallowEqual(mappedProps, newMappedProps)) {\n\t\t\t\tcontainer.mappedProps = newMappedProps;\n\t\t\t\tcallback(container.mappedProps, reason); // pass reason of update\n\t\t\t}\n\t\t}\n\t};\n\n\n\ttype StoreCallback = (global: TState, reason?: string) => void;\n\n\tconst callbacks: StoreCallback[] = [updateContainers];\n\tconst addCallback = (cb: StoreCallback) => {\n\t\tif (typeof cb === \"function\") {\n\t\t\tcallbacks.push(cb);\n\t\t}\n\t};\n\tconst removeCallback = (cb: StoreCallback) => {\n\t\tconst index = callbacks.indexOf(cb);\n\t\tif (index !== -1) {\n\t\t\tcallbacks.splice(index, 1);\n\t\t}\n\t};\n\tconst runCallbacks = async (reason?: string) => {\n\t\tif (forceOnHeavyAnimation) forceOnHeavyAnimation = false;\n\t\telse if (getIsHeavyAnimating()) {\n\t\t\tdebugMode && console.debug(\"[GSM]\", \"runCallbacks is waiting for heavy animation end\");\n\t\t\tawait waitHeavyAnimation();\n\t\t\tvoid runCallbacksThrottled();\n\t\t\treturn;\n\t\t}\n\t\treason = reason || '@ss_no_reason';\n\t\tdebugMode && console.debug(\"[GSM]\", \"runCallbacks for\", reason);\n\t\tcallbacks.forEach((cb) => cb(currentState as TState, reason)); // skip check cause we already checked while adding it\n\t};\n\n\tconst runCallbacksThrottled = throttleWithTickEnd(runCallbacks);\n\n\n\n\tconst onDispatch = async <T extends ActionNames>(name: T, payload?: ActionPayload<T>, options?: ActionOptions) => {\n\t\tif (!Array.isArray(reducers[name])) return; // if reducers for this name exists\n\n\t\tfor (const reducer of reducers[name]) {\n\t\t\ttry {\n\t\t\t\tconst result = reducer(currentState as TState, actions, payload as ActionPayload<T>);\n\n\t\t\t\tif (!result) continue;\n\n\t\t\t\tif (typeof (result as Promise<unknown>).then === \"function\") {\n\t\t\t\t\tawait (result as Promise<unknown>);\n\t\t\t\t} else {\n\t\t\t\t\toptions = {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\treason: `@dispatch:${name.toString()}${options?.reason ? ('->' + options?.reason) : ''}`,\n\t\t\t\t\t};\n\t\t\t\t\tsetState(result as TState, options);\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\tconsole.error(\"[GSM]\", \"[onDispatch]\", \"reducer thrown an error:\", err);\n\t\t\t\tif (options?.shouldThrow) throw err;\n\t\t\t}\n\t\t}\n\t};\n\n\tconst addReducer = <T extends ActionNames>(name: T, reducer: ActionHandler<T>) => {\n\t\tif (!reducers[name]) { // if no reducers for this name\n\t\t\treducers[name] = [];\n\t\t\tactions[name] = (payload?: ActionPayload<T>, options?: ActionOptions) => // add dispatch action\n\t\t\t\tonDispatch(name, payload, options);\n\t\t}\n\t\treducers[name].push(reducer);\n\t};\n\n\tconst removeReducer: (name: keyof ActionPayloads, reducer: AnyFunction) => void = (name, reducer) => {\n\t\tif (!reducers[name]) return;\n\t\tconst index = reducers[name].indexOf(reducer);\n\t\tif (index !== -1) {\n\t\t\treducers[name].splice(index, 1);\n\t\t}\n\t};\n\n\tconst getDispatch = () => actions as Actions;\n\n\n\tconst withState = (\n\t\tselector: (state: TState, ownProps?: AnyLiteral) => Partial<TState>,\n\t\tdebug?: AnyLiteral | undefined\n\t) => {\n\t\treturn (callback: Container['callback']) => {\n\t\t\tconst id = generateIdFor(containers);\n\t\t\tlet container = containers.get(id);\n\t\t\tif (!container) {\n\t\t\t\tcontainer = {\n\t\t\t\t\tselector,\n\t\t\t\t\tcallback,\n\t\t\t\t\tmappedProps: undefined,\n\t\t\t\t\tdebug: debug || id,\n\t\t\t\t};\n\t\t\t\tcontainers.set(id, container);\n\t\t\t}\n\t\t\tif (!container.mappedProps) {\n\t\t\t\ttry {\n\t\t\t\t\tcontainer.mappedProps = selector(currentState as TState);\n\t\t\t\t} catch (err) {\n\t\t\t\t\tdebug && console.error(\">> GSTATE\", \"CONTAINER\\n\", \"INITIAL UPDATE\",\n\t\t\t\t\t\t\"Чёт наебнулось в первый раз, но всем как-то похуй, да?\\n\",\n\t\t\t\t\t\t\"Может трейс глянешь хоть:\\n\", err);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcallback(container.mappedProps, '@initial_update');\n\t\t\treturn () => {\n\t\t\t\tdebug && console.debug(\"[withState]\", \"{GC}\", \"container\", \"->\", id);\n\t\t\t\tcontainers.delete(id);\n\t\t\t};\n\t\t};\n\t};\n\n\treturn {\n\t\tsetState,\n\t\tgetState,\n\t\taddCallback,\n\t\tremoveCallback,\n\t\taddReducer,\n\t\tremoveReducer,\n\t\tgetDispatch,\n\t\twithState,\n\t\tbeginHeavyAnimation,\n\t};\n};\n\nexport type Store<T, A> = ReturnType<typeof StateStore<T, A>>;","import { Storage } from \"../types\";\n\nfunction noop() {}\nconst noopStorage = {\n  getItem: noop,\n  setItem: noop,\n  removeItem: noop,\n  keys: [],\n  getAllKeys: noop,\n}\n\nfunction hasStorage(storageType: string) {\n  if (typeof self !== 'object' || !(storageType in self)) {\n    return false\n  }\n\n  try {\n    const storage = (self as unknown as { [key: string]: Storage})[storageType] as unknown as Storage\n    const testKey = `redux-persist ${storageType} test`\n    storage.setItem(testKey, 'test')\n    storage.getItem(testKey)\n    storage.removeItem(testKey)\n  } catch (e) {\n    if (process.env.NODE_ENV !== 'production')\n      console.warn(\n        `redux-persist ${storageType} test failed, persistence will be disabled.`\n      )\n    return false\n  }\n  return true\n}\n\nexport default function getStorage(type: string): Storage {\n  const storageType = `${type}Storage`\n  if (hasStorage(storageType)) return (self as unknown as { [key: string]: Storage })[storageType]\n  else {\n    if (process.env.NODE_ENV !== 'production') {\n      console.error(\n        `redux-persist failed to create sync storage. falling back to noop storage.`\n      )\n    }\n    return noopStorage\n  }\n}","import getStorage from \"./getStorage\"\nimport type { WebStorage } from \"../types\";\n\nexport default function createWebStorage(type: string = 'local'): WebStorage {\n  const storage = getStorage(type)\n  return {\n    getItem: (key: string): Promise<string | null> => Promise.resolve(storage.getItem(key) as string | null),\n    setItem: (key: string, item: string): Promise<void> => Promise.resolve(storage.setItem(key, item)),\n    removeItem: (key: string): Promise<void> => Promise.resolve(storage.removeItem(key)),\n    getAllKeys: (): Promise<Array<string>> => Promise.resolve(storage.keys || []),\n  }\n}\n","import { throttle } from \"./Util/Schedules\";\nimport { Store } from \"./StateStore\";\n\nimport { CachingOptions, Storage } from \"./types\";\nimport { validateKeySet } from \"./Util/Iterates\";\n\nexport const StoreCaching = <T extends AnyLiteral, A extends AnyLiteral>(\n\tstore: Store<T, A>,\n\tstorage: Storage,\n\tcache_key: string = \"tjmc.global.state\",\n\treduceGlobal: (global: T) => Partial<T> | AnyLiteral,\n\toptions?: Partial<CachingOptions>\n) => {\n\n\tif (typeof store != \"object\") throw new Error(\"Caching store in not instance of StateStore\");\n\n\tconst opts: CachingOptions = Object.assign<CachingOptions, Partial<CachingOptions>>({\n\t\tshouldRunFirstUpdateCacheThrottle: false,\n\t\tupdateCacheThrottle: 500,\n\t\tskipValidateKeySetOnReadCache: false,\n\t}, options || {});\n\n\tconst STATE_CACHE_KEY = cache_key;\n\n\tconst updateCacheThrottled = throttle(() => updateCache(), opts.updateCacheThrottle, opts.shouldRunFirstUpdateCacheThrottle);\n\tlet isCaching = false;\n\n\tconst setupCaching = () => {\n\t\tisCaching = true;\n\t\tstore.addCallback(updateCacheThrottled);\n\t};\n\n\tconst clearCaching = () => {\n\t\tisCaching = false;\n\t\tstore.removeCallback(updateCacheThrottled);\n\t};\n\n\tconst resetCache = async () => {\n\t\tawait storage.removeItem(STATE_CACHE_KEY);\n\t\tif (!isCaching) return;\n\t\tclearCaching();\n\t};\n\n\tconst loadCache = async (initialState: T) => {\n\t\tsetupCaching();\n\t\treturn await readCache(initialState);\n\t};\n\n\tconst readCache = async (initialState: T) => {\n\t\tconst json = await storage.getItem(STATE_CACHE_KEY);\n\t\tlet cached: Partial<T> = {};\n\t\tif (json) {\n\t\t\ttry {\n\t\t\t\tcached = JSON.parse(json);\n\t\t\t} catch (e) {\n\t\t\t\tconsole.warn(\"[StoreCaching]\", \"failed to parse cache, fallback to initialState\", e);\n\t\t\t\tcached = {};\n\t\t\t}\n\t\t}\n\t\tconst newState = opts.skipValidateKeySetOnReadCache ?\n\t\t\tObject.assign(initialState, cached) :\n\t\t\tvalidateKeySet<T, Partial<T>>(initialState, cached);\n\t\treturn { ...newState };\n\t};\n\n\tconst updateCache = () => {\n\t\tif (!isCaching) {\n\t\t\treturn;\n\t\t}\n\t\tlet reducedGlobal = {};\n\t\ttry {\n\t\t\tconst global = store.getState(e => e);\n\t\t\treducedGlobal = reduceGlobal(global);\n\t\t} catch (e) {\n\t\t\tconsole.warn(\"[StoreCaching]\", e, reducedGlobal);\n\t\t}\n\t\ttry {\n\t\t\tconst json = JSON.stringify(reducedGlobal);\n\t\t\tstorage.setItem(STATE_CACHE_KEY, json);\n\t\t} catch (e) {\n\t\t\tconsole.warn(\"[StoreCaching]\", e, reducedGlobal);\n\t\t}\n\t};\n\n\treturn { loadCache, resetCache };\n\n};\n","import { Store } from \"../StateStore\";\nimport useGsmContext from \"./useGsmContext\";\n\nconst useStore = <S extends AnyLiteral, Action>() => {\n\tconst { store } = useGsmContext();\n\treturn store as Store<S, Action>;\n}\n\nexport default useStore;","import React, { useCallback, useMemo, useRef, useSyncExternalStore } from \"react\";\nimport { shallowEqual, stacksEqual } from \"../Util/Iterates\";\nimport { randomString } from \"../Util/Random\";\n\nimport type { PickOptions, TypedUseSelectorHook } from \"../types\";\nimport useGsmContext from \"./useGsmContext\";\n\nconst useGlobal: TypedUseSelectorHook<AnyLiteral> = <TState = AnyLiteral, Selected = Partial<TState>>(\n\tselector: (state: TState) => Selected,\n\tinputs: React.DependencyList = [],\n\toptions: Partial<PickOptions> = {}\n): Selected => {\n\n\tconst { store } = useGsmContext();\n\n\tconst normalizedOptions = useMemo(() => Object.assign<PickOptions, Partial<PickOptions>>({\n\t\tdebugSnapshotPicker: false,\n\t\tdebugSnapshotSkip: false,\n\t\tlabel: randomString(5),\n\t}, options), [options]);\n\n\tconst debugSnapshotPicker = normalizedOptions.debugSnapshotPicker;\n\tconst debugSnapshotSkip = normalizedOptions.debugSnapshotSkip;\n\tconst anyDebugEnabled = debugSnapshotPicker || debugSnapshotSkip;\n\n\tconst reasonRef = useRef<string | undefined>(\"@useGlobal_initial_snapshot\");\n\tconst inputsRef = useRef(inputs);\n\tinputsRef.current = inputs;\n\tconst lastRef = useRef<{\n\t\tstate: TState;\n\t\tinputs: React.DependencyList;\n\t\tselected: Selected;\n\t}>();\n\n\tconst getSnapshot = useCallback(() => {\n\t\tconst state = store.getState();\n\t\tconst prev = lastRef.current;\n\t\tconst currentInputs = inputsRef.current;\n\t\tconst shouldResolveReason = debugSnapshotPicker;\n\t\tconst hasInputsChanged = shouldResolveReason && !!prev\n\t\t\t? !stacksEqual(prev.inputs as Array<any>, currentInputs as Array<any>)\n\t\t\t: false;\n\t\tconst reason = shouldResolveReason\n\t\t\t? (hasInputsChanged ? \"@useGlobal_inputs_changed\" : (reasonRef.current || \"@useGlobal_snapshot\"))\n\t\t\t: undefined;\n\n\t\tif (\n\t\t\tprev &&\n\t\t\tprev.state === state &&\n\t\t\tstacksEqual(prev.inputs as Array<any>, currentInputs as Array<any>)\n\t\t) {\n\t\t\tif (debugSnapshotSkip) {\n\t\t\t\tconsole.debug(\n\t\t\t\t\t\"[GSM]\", `useGlobal on ${normalizedOptions.label}\\n`,\n\t\t\t\t\t\"skipping snapshot on same state and inputs\",\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn prev.selected;\n\t\t}\n\n\t\tif (debugSnapshotPicker) {\n\t\t\tconsole.debug(\"[GSM]\", `useGlobal on ${normalizedOptions.label}\\n`, \"snapshot is picking\");\n\t\t}\n\n\t\tlet nextSelected: Selected;\n\t\ttry {\n\t\t\tnextSelected = selector(state);\n\t\t} catch (err) {\n\t\t\tconsole.error(\"[GSM]\", `useGlobal on ${normalizedOptions.label}\\n`, \"selector thrown an error\\n\", err);\n\t\t\treturn prev?.selected as Selected;\n\t\t}\n\n\t\tconst shouldSkipUpdate = prev && shallowEqual(prev.selected, nextSelected);\n\t\tif (debugSnapshotPicker) {\n\t\t\tconsole.debug(\n\t\t\t\t\"[GSM]\", `useGlobal on ${normalizedOptions.label}\\n`, \"snapshot is picked, equaling..\",\n\t\t\t\t\"\\n\", \"call_reason\", \"=>\", reason,\n\t\t\t\t\"\\n\", \"current_state\", \"=>\", prev?.selected,\n\t\t\t\t\"\\n\", \"next_state\", \"=>\", nextSelected,\n\t\t\t\t\"\\n\", \"shouldUpdate\", \"=>\", !shouldSkipUpdate,\n\t\t\t);\n\t\t}\n\t\tif (shouldSkipUpdate) return prev.selected;\n\n\t\tlastRef.current = {\n\t\t\tstate,\n\t\t\tinputs: [...currentInputs],\n\t\t\tselected: nextSelected,\n\t\t};\n\n\t\tif (debugSnapshotPicker) {\n\t\t\tconsole.debug(\n\t\t\t\t\"[GSM]\", `useGlobal on ${normalizedOptions.label}\\n`, \"state is picked\",\n\t\t\t\t\"\\n\", \"call_reason\", \"=>\", reason,\n\t\t\t\t\"\\n\", \"next_state\", \"=>\", nextSelected,\n\t\t\t);\n\t\t}\n\n\t\treturn nextSelected;\n\t}, [store, selector, normalizedOptions, ...inputs]);\n\n\tconst subscribe = useCallback((onStorageChange: () => void) => {\n\t\tconst cb = (_global: TState, reason?: string) => {\n\t\t\tif (anyDebugEnabled) {\n\t\t\t\treasonRef.current = reason;\n\t\t\t\tconsole.debug(\"[GSM]\", `useGlobal on ${normalizedOptions.label}\\n`,\n\t\t\t\t\t\"store pushed update\", { reason });\n\t\t\t}\n\t\t\tonStorageChange();\n\t\t};\n\t\tstore.addCallback(cb);\n\t\treturn () => store.removeCallback(cb);\n\t}, [store, anyDebugEnabled, normalizedOptions.label]);\n\n\treturn useSyncExternalStore(\n\t\tsubscribe,\n\t\tgetSnapshot,\n\t);\n};\n\nexport default useGlobal;\n","import type { TypedUseStaticHook } from \"../types\";\n\nimport { useMemo } from \"react\";\nimport useGsmContext from \"./useGsmContext\";\n\n/**\n * Provides static selector without hooking to global store\n *\n * Useful for picking static state and creating state triggers with dependency\n *\n * @param selector Global state mapper function\n * @param inputs Peer dependency list\n * @returns Selected state\n */\nconst useStaticGlobal: TypedUseStaticHook<AnyLiteral> = <TState = AnyLiteral, Selected = Partial<TState>>(\n  selector: (state: TState) => Selected,\n  inputs: React.DependencyList = []\n) => {\n  const { store } = useGsmContext();\n\n  const mappedProps = useMemo(() => {\n    let nextState;\n    try {\n      nextState = store.getState(selector);\n    } catch (e) {\n      return undefined;\n    }\n    return nextState;\n  }, [selector, ...inputs]);\n\n  return mappedProps as Selected;\n};\n\nexport default useStaticGlobal;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAA+E;;;ACA/E,mBAA8B;AAOvB,IAAM,sBAAkB,4BAA2C,IAAW;AAIrF,IAAO,qBAAQ;;;ACVf,IAAAC,gBAAkB;AAGlB,IAAM,gBAAgB,CA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T;AACA,WAAO;AAAA,EACT,GAAG,CAAC,UAAU,GAAG,MAAM,CAAC;AAExB,SAAO;AACT;AAEA,IAAO,0BAAQ;","names":["import_react","import_react","React","import_react","React","currentState","import_react","import_react"]}