{"version":3,"file":"userConfig-ZjLg2CJI.js","sources":["../../../node_modules/jotai/esm/vanilla.mjs","../../../app/global-state/userConfig.ts"],"sourcesContent":["let keyCount = 0;\nfunction atom(read, write) {\n const key = `atom${++keyCount}`;\n const config = {\n toString() {\n return (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && this.debugLabel ? key + \":\" + this.debugLabel : key;\n }\n };\n if (typeof read === \"function\") {\n config.read = read;\n } else {\n config.init = read;\n config.read = defaultRead;\n config.write = defaultWrite;\n }\n if (write) {\n config.write = write;\n }\n return config;\n}\nfunction defaultRead(get) {\n return get(this);\n}\nfunction defaultWrite(get, set, arg) {\n return set(\n this,\n typeof arg === \"function\" ? arg(get(this)) : arg\n );\n}\n\nconst isSelfAtom = (atom, a) => atom.unstable_is ? atom.unstable_is(a) : a === atom;\nconst hasInitialValue = (atom) => \"init\" in atom;\nconst isActuallyWritableAtom = (atom) => !!atom.write;\nconst cancelablePromiseMap = /* @__PURE__ */ new WeakMap();\nconst isPendingPromise = (value) => {\n var _a;\n return isPromiseLike(value) && !((_a = cancelablePromiseMap.get(value)) == null ? void 0 : _a[1]);\n};\nconst cancelPromise = (promise, nextValue) => {\n const promiseState = cancelablePromiseMap.get(promise);\n if (promiseState) {\n promiseState[1] = true;\n promiseState[0].forEach((fn) => fn(nextValue));\n } else if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n throw new Error(\"[Bug] cancelable promise not found\");\n }\n};\nconst patchPromiseForCancelability = (promise) => {\n if (cancelablePromiseMap.has(promise)) {\n return;\n }\n const promiseState = [/* @__PURE__ */ new Set(), false];\n cancelablePromiseMap.set(promise, promiseState);\n const settle = () => {\n promiseState[1] = true;\n };\n promise.then(settle, settle);\n promise.onCancel = (fn) => {\n promiseState[0].add(fn);\n };\n};\nconst isPromiseLike = (x) => typeof (x == null ? void 0 : x.then) === \"function\";\nconst isAtomStateInitialized = (atomState) => \"v\" in atomState || \"e\" in atomState;\nconst returnAtomValue = (atomState) => {\n if (\"e\" in atomState) {\n throw atomState.e;\n }\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !(\"v\" in atomState)) {\n throw new Error(\"[Bug] atom state is not initialized\");\n }\n return atomState.v;\n};\nconst addPendingPromiseToDependency = (atom, promise, dependencyAtomState) => {\n if (!dependencyAtomState.p.has(atom)) {\n dependencyAtomState.p.add(atom);\n promise.then(\n () => {\n dependencyAtomState.p.delete(atom);\n },\n () => {\n dependencyAtomState.p.delete(atom);\n }\n );\n }\n};\nconst addDependency = (pending, atom, atomState, a, aState) => {\n var _a;\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && a === atom) {\n throw new Error(\"[Bug] atom cannot depend on itself\");\n }\n atomState.d.set(a, aState.n);\n if (isPendingPromise(atomState.v)) {\n addPendingPromiseToDependency(atom, atomState.v, aState);\n }\n (_a = aState.m) == null ? void 0 : _a.t.add(atom);\n if (pending) {\n addPendingDependent(pending, a, atom);\n }\n};\nconst createPending = () => [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map(), /* @__PURE__ */ new Set()];\nconst addPendingAtom = (pending, atom, atomState) => {\n if (!pending[0].has(atom)) {\n pending[0].set(atom, /* @__PURE__ */ new Set());\n }\n pending[1].set(atom, atomState);\n};\nconst addPendingDependent = (pending, atom, dependent) => {\n const dependents = pending[0].get(atom);\n if (dependents) {\n dependents.add(dependent);\n }\n};\nconst getPendingDependents = (pending, atom) => pending[0].get(atom);\nconst addPendingFunction = (pending, fn) => {\n pending[2].add(fn);\n};\nconst flushPending = (pending) => {\n let error;\n let hasError = false;\n const call = (fn) => {\n try {\n fn();\n } catch (e) {\n if (!hasError) {\n error = e;\n hasError = true;\n }\n }\n };\n while (pending[1].size || pending[2].size) {\n pending[0].clear();\n const atomStates = new Set(pending[1].values());\n pending[1].clear();\n const functions = new Set(pending[2]);\n pending[2].clear();\n atomStates.forEach((atomState) => {\n var _a;\n return (_a = atomState.m) == null ? void 0 : _a.l.forEach(call);\n });\n functions.forEach(call);\n }\n if (hasError) {\n throw error;\n }\n};\nconst buildStore = (...[getAtomState, atomRead, atomWrite, atomOnMount]) => {\n let debugMountedAtoms;\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n debugMountedAtoms = /* @__PURE__ */ new Set();\n }\n const setAtomStateValueOrPromise = (atom, atomState, valueOrPromise) => {\n const hasPrevValue = \"v\" in atomState;\n const prevValue = atomState.v;\n const pendingPromise = isPendingPromise(atomState.v) ? atomState.v : null;\n if (isPromiseLike(valueOrPromise)) {\n patchPromiseForCancelability(valueOrPromise);\n for (const a of atomState.d.keys()) {\n addPendingPromiseToDependency(atom, valueOrPromise, getAtomState(a));\n }\n atomState.v = valueOrPromise;\n delete atomState.e;\n } else {\n atomState.v = valueOrPromise;\n delete atomState.e;\n }\n if (!hasPrevValue || !Object.is(prevValue, atomState.v)) {\n ++atomState.n;\n if (pendingPromise) {\n cancelPromise(pendingPromise, valueOrPromise);\n }\n }\n };\n const readAtomState = (pending, atom, dirtyAtoms) => {\n var _a;\n const atomState = getAtomState(atom);\n if (isAtomStateInitialized(atomState)) {\n if (atomState.m && !(dirtyAtoms == null ? void 0 : dirtyAtoms.has(atom))) {\n return atomState;\n }\n if (Array.from(atomState.d).every(\n ([a, n]) => (\n // Recursively, read the atom state of the dependency, and\n // check if the atom epoch number is unchanged\n readAtomState(pending, a, dirtyAtoms).n === n\n )\n )) {\n return atomState;\n }\n }\n atomState.d.clear();\n let isSync = true;\n const getter = (a) => {\n if (isSelfAtom(atom, a)) {\n const aState2 = getAtomState(a);\n if (!isAtomStateInitialized(aState2)) {\n if (hasInitialValue(a)) {\n setAtomStateValueOrPromise(a, aState2, a.init);\n } else {\n throw new Error(\"no atom init\");\n }\n }\n return returnAtomValue(aState2);\n }\n const aState = readAtomState(pending, a, dirtyAtoms);\n try {\n return returnAtomValue(aState);\n } finally {\n if (isSync) {\n addDependency(pending, atom, atomState, a, aState);\n } else {\n const pending2 = createPending();\n addDependency(pending2, atom, atomState, a, aState);\n mountDependencies(pending2, atom, atomState);\n flushPending(pending2);\n }\n }\n };\n let controller;\n let setSelf;\n const options = {\n get signal() {\n if (!controller) {\n controller = new AbortController();\n }\n return controller.signal;\n },\n get setSelf() {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !isActuallyWritableAtom(atom)) {\n console.warn(\"setSelf function cannot be used with read-only atom\");\n }\n if (!setSelf && isActuallyWritableAtom(atom)) {\n setSelf = (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && isSync) {\n console.warn(\"setSelf function cannot be called in sync\");\n }\n if (!isSync) {\n return writeAtom(atom, ...args);\n }\n };\n }\n return setSelf;\n }\n };\n try {\n const valueOrPromise = atomRead(atom, getter, options);\n setAtomStateValueOrPromise(atom, atomState, valueOrPromise);\n if (isPromiseLike(valueOrPromise)) {\n (_a = valueOrPromise.onCancel) == null ? void 0 : _a.call(valueOrPromise, () => controller == null ? void 0 : controller.abort());\n const complete = () => {\n if (atomState.m) {\n const pending2 = createPending();\n mountDependencies(pending2, atom, atomState);\n flushPending(pending2);\n }\n };\n valueOrPromise.then(complete, complete);\n }\n return atomState;\n } catch (error) {\n delete atomState.v;\n atomState.e = error;\n ++atomState.n;\n return atomState;\n } finally {\n isSync = false;\n }\n };\n const readAtom = (atom) => returnAtomValue(readAtomState(void 0, atom));\n const getDependents = (pending, atom, atomState) => {\n var _a, _b;\n const dependents = /* @__PURE__ */ new Map();\n for (const a of ((_a = atomState.m) == null ? void 0 : _a.t) || []) {\n dependents.set(a, getAtomState(a));\n }\n for (const atomWithPendingPromise of atomState.p) {\n dependents.set(\n atomWithPendingPromise,\n getAtomState(atomWithPendingPromise)\n );\n }\n (_b = getPendingDependents(pending, atom)) == null ? void 0 : _b.forEach((dependent) => {\n dependents.set(dependent, getAtomState(dependent));\n });\n return dependents;\n };\n function getSortedDependents(pending, rootAtom, rootAtomState) {\n const sorted = [];\n const visiting = /* @__PURE__ */ new Set();\n const visited = /* @__PURE__ */ new Set();\n const stack = [[rootAtom, rootAtomState]];\n while (stack.length > 0) {\n const [a, aState] = stack[stack.length - 1];\n if (visited.has(a)) {\n stack.pop();\n continue;\n }\n if (visiting.has(a)) {\n sorted.push([a, aState, aState.n]);\n visited.add(a);\n stack.pop();\n continue;\n }\n visiting.add(a);\n for (const [d, s] of getDependents(pending, a, aState)) {\n if (a !== d && !visiting.has(d)) {\n stack.push([d, s]);\n }\n }\n }\n return [sorted, visited];\n }\n const recomputeDependents = (pending, atom, atomState) => {\n const [topsortedAtoms, markedAtoms] = getSortedDependents(\n pending,\n atom,\n atomState\n );\n const changedAtoms = /* @__PURE__ */ new Set([atom]);\n for (let i = topsortedAtoms.length - 1; i >= 0; --i) {\n const [a, aState, prevEpochNumber] = topsortedAtoms[i];\n let hasChangedDeps = false;\n for (const dep of aState.d.keys()) {\n if (dep !== a && changedAtoms.has(dep)) {\n hasChangedDeps = true;\n break;\n }\n }\n if (hasChangedDeps) {\n readAtomState(pending, a, markedAtoms);\n mountDependencies(pending, a, aState);\n if (prevEpochNumber !== aState.n) {\n addPendingAtom(pending, a, aState);\n changedAtoms.add(a);\n }\n }\n markedAtoms.delete(a);\n }\n };\n const writeAtomState = (pending, atom, ...args) => {\n let isSync = true;\n const getter = (a) => returnAtomValue(readAtomState(pending, a));\n const setter = (a, ...args2) => {\n const aState = getAtomState(a);\n try {\n if (isSelfAtom(atom, a)) {\n if (!hasInitialValue(a)) {\n throw new Error(\"atom not writable\");\n }\n const prevEpochNumber = aState.n;\n const v = args2[0];\n setAtomStateValueOrPromise(a, aState, v);\n mountDependencies(pending, a, aState);\n if (prevEpochNumber !== aState.n) {\n addPendingAtom(pending, a, aState);\n recomputeDependents(pending, a, aState);\n }\n return void 0;\n } else {\n return writeAtomState(pending, a, ...args2);\n }\n } finally {\n if (!isSync) {\n flushPending(pending);\n }\n }\n };\n try {\n return atomWrite(atom, getter, setter, ...args);\n } finally {\n isSync = false;\n }\n };\n const writeAtom = (atom, ...args) => {\n const pending = createPending();\n try {\n return writeAtomState(pending, atom, ...args);\n } finally {\n flushPending(pending);\n }\n };\n const mountDependencies = (pending, atom, atomState) => {\n if (atomState.m && !isPendingPromise(atomState.v)) {\n for (const a of atomState.d.keys()) {\n if (!atomState.m.d.has(a)) {\n const aMounted = mountAtom(pending, a, getAtomState(a));\n aMounted.t.add(atom);\n atomState.m.d.add(a);\n }\n }\n for (const a of atomState.m.d || []) {\n if (!atomState.d.has(a)) {\n atomState.m.d.delete(a);\n const aMounted = unmountAtom(pending, a, getAtomState(a));\n aMounted == null ? void 0 : aMounted.t.delete(atom);\n }\n }\n }\n };\n const mountAtom = (pending, atom, atomState) => {\n if (!atomState.m) {\n readAtomState(pending, atom);\n for (const a of atomState.d.keys()) {\n const aMounted = mountAtom(pending, a, getAtomState(a));\n aMounted.t.add(atom);\n }\n atomState.m = {\n l: /* @__PURE__ */ new Set(),\n d: new Set(atomState.d.keys()),\n t: /* @__PURE__ */ new Set()\n };\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n debugMountedAtoms.add(atom);\n }\n if (isActuallyWritableAtom(atom)) {\n const mounted = atomState.m;\n let setAtom;\n const createInvocationContext = (pending2, fn) => {\n let isSync = true;\n setAtom = (...args) => {\n try {\n return writeAtomState(pending2, atom, ...args);\n } finally {\n if (!isSync) {\n flushPending(pending2);\n }\n }\n };\n try {\n return fn();\n } finally {\n isSync = false;\n }\n };\n addPendingFunction(pending, () => {\n const onUnmount = createInvocationContext(\n pending,\n () => atomOnMount(atom, (...args) => setAtom(...args))\n );\n if (onUnmount) {\n mounted.u = (pending2) => createInvocationContext(pending2, onUnmount);\n }\n });\n }\n }\n return atomState.m;\n };\n const unmountAtom = (pending, atom, atomState) => {\n if (atomState.m && !atomState.m.l.size && !Array.from(atomState.m.t).some((a) => {\n var _a;\n return (_a = getAtomState(a).m) == null ? void 0 : _a.d.has(atom);\n })) {\n const onUnmount = atomState.m.u;\n if (onUnmount) {\n addPendingFunction(pending, () => onUnmount(pending));\n }\n delete atomState.m;\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n debugMountedAtoms.delete(atom);\n }\n for (const a of atomState.d.keys()) {\n const aMounted = unmountAtom(pending, a, getAtomState(a));\n aMounted == null ? void 0 : aMounted.t.delete(atom);\n }\n return void 0;\n }\n return atomState.m;\n };\n const subscribeAtom = (atom, listener) => {\n const pending = createPending();\n const atomState = getAtomState(atom);\n const mounted = mountAtom(pending, atom, atomState);\n const listeners = mounted.l;\n listeners.add(listener);\n flushPending(pending);\n return () => {\n listeners.delete(listener);\n const pending2 = createPending();\n unmountAtom(pending2, atom, atomState);\n flushPending(pending2);\n };\n };\n const unstable_derive = (fn) => buildStore(...fn(getAtomState, atomRead, atomWrite, atomOnMount));\n const store = {\n get: readAtom,\n set: writeAtom,\n sub: subscribeAtom,\n unstable_derive\n };\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n const devStore = {\n // store dev methods (these are tentative and subject to change without notice)\n dev4_get_internal_weak_map: () => ({\n get: (atom) => {\n const atomState = getAtomState(atom);\n if (atomState.n === 0) {\n return void 0;\n }\n return atomState;\n }\n }),\n dev4_get_mounted_atoms: () => debugMountedAtoms,\n dev4_restore_atoms: (values) => {\n const pending = createPending();\n for (const [atom, value] of values) {\n if (hasInitialValue(atom)) {\n const atomState = getAtomState(atom);\n const prevEpochNumber = atomState.n;\n setAtomStateValueOrPromise(atom, atomState, value);\n mountDependencies(pending, atom, atomState);\n if (prevEpochNumber !== atomState.n) {\n addPendingAtom(pending, atom, atomState);\n recomputeDependents(pending, atom, atomState);\n }\n }\n }\n flushPending(pending);\n }\n };\n Object.assign(store, devStore);\n }\n return store;\n};\nconst createStore = () => {\n const atomStateMap = /* @__PURE__ */ new WeakMap();\n const getAtomState = (atom) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !atom) {\n throw new Error(\"Atom is undefined or null\");\n }\n let atomState = atomStateMap.get(atom);\n if (!atomState) {\n atomState = { d: /* @__PURE__ */ new Map(), p: /* @__PURE__ */ new Set(), n: 0 };\n atomStateMap.set(atom, atomState);\n }\n return atomState;\n };\n return buildStore(\n getAtomState,\n (atom, ...params) => atom.read(...params),\n (atom, ...params) => atom.write(...params),\n (atom, ...params) => {\n var _a;\n return (_a = atom.onMount) == null ? void 0 : _a.call(atom, ...params);\n }\n );\n};\nlet defaultStore;\nconst getDefaultStore = () => {\n if (!defaultStore) {\n defaultStore = createStore();\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n globalThis.__JOTAI_DEFAULT_STORE__ || (globalThis.__JOTAI_DEFAULT_STORE__ = defaultStore);\n if (globalThis.__JOTAI_DEFAULT_STORE__ !== defaultStore) {\n console.warn(\n \"Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044\"\n );\n }\n }\n }\n return defaultStore;\n};\n\nexport { atom, createStore, getDefaultStore };\n","import { atom } from 'jotai';\nimport type { MatchingResolution } from '~/schemas/enums';\n\nexport interface UserConfig {\n countryCode: string;\n isEndConsumer: boolean;\n logoUrl: string | undefined;\n orgName: string;\n timezone: string;\n matchingResolutions: MatchingResolution[];\n welcomeScreenEnabled: boolean;\n hideProductionDevicesData: boolean;\n featureFlags: Record;\n}\n\nexport const userConfig = atom({\n countryCode: 'GB',\n isEndConsumer: false,\n logoUrl: undefined,\n orgName: 'dev-UK',\n timezone: 'Europe/London',\n matchingResolutions: [],\n welcomeScreenEnabled: false,\n hideProductionDevicesData: false,\n featureFlags: {},\n});\n"],"names":["keyCount","atom","read","write","key","config","__vite_import_meta_env__","defaultRead","defaultWrite","get","set","arg","isSelfAtom","a","hasInitialValue","isActuallyWritableAtom","cancelablePromiseMap","isPendingPromise","value","_a","isPromiseLike","cancelPromise","promise","nextValue","promiseState","fn","patchPromiseForCancelability","settle","x","isAtomStateInitialized","atomState","returnAtomValue","addPendingPromiseToDependency","dependencyAtomState","addDependency","pending","aState","addPendingDependent","createPending","addPendingAtom","dependent","dependents","getPendingDependents","addPendingFunction","flushPending","error","hasError","call","e","atomStates","functions","buildStore","getAtomState","atomRead","atomWrite","atomOnMount","debugMountedAtoms","setAtomStateValueOrPromise","valueOrPromise","hasPrevValue","prevValue","pendingPromise","readAtomState","dirtyAtoms","n","isSync","getter","aState2","pending2","mountDependencies","controller","setSelf","options","args","writeAtom","complete","readAtom","getDependents","_b","atomWithPendingPromise","getSortedDependents","rootAtom","rootAtomState","sorted","visiting","visited","stack","d","s","recomputeDependents","topsortedAtoms","markedAtoms","changedAtoms","i","prevEpochNumber","hasChangedDeps","dep","writeAtomState","setter","args2","v","mountAtom","aMounted","unmountAtom","mounted","setAtom","createInvocationContext","onUnmount","store","listener","listeners","values","createStore","atomStateMap","params","defaultStore","getDefaultStore","userConfig"],"mappings":"+DAAA,IAAIA,EAAW,EACf,SAASC,EAAKC,EAAMC,EAAO,CACnB,MAAAC,EAAM,OAAO,EAAEJ,CAAQ,GACvBK,EAAS,CACb,UAAW,CACD,OAAAC,EAAkB,aAAuB,UAAY,cAAgB,KAAK,WAAaF,EAAM,IAAM,KAAK,WAAaA,CAAA,CAEjI,EACI,OAAA,OAAOF,GAAS,WAClBG,EAAO,KAAOH,GAEdG,EAAO,KAAOH,EACdG,EAAO,KAAOE,EACdF,EAAO,MAAQG,GAKVH,CACT,CACA,SAASE,EAAYE,EAAK,CACxB,OAAOA,EAAI,IAAI,CACjB,CACA,SAASD,EAAaC,EAAKC,EAAKC,EAAK,CAC5B,OAAAD,EACL,KACA,OAAOC,GAAQ,WAAaA,EAAIF,EAAI,IAAI,CAAC,EAAIE,CAC/C,CACF,CAEA,MAAMC,EAAa,CAACX,EAAMY,IAAMZ,EAAK,YAAcA,EAAK,YAAYY,CAAC,EAAIA,IAAMZ,EACzEa,EAAmBb,GAAS,SAAUA,EACtCc,EAA0Bd,GAAS,CAAC,CAACA,EAAK,MAC1Ce,MAA2C,QAC3CC,EAAoBC,GAAU,CAC9B,IAAAC,EACJ,OAAOC,EAAcF,C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