{"version":3,"file":"tram-one.cjs","sources":["../src/engine-names.ts","../src/namespace.ts","../src/working-key.ts","../src/node-names.ts","../src/observe-tag.ts","../src/effect-store.ts","../src/key-queue.ts","../src/process-hooks.ts","../src/dom.ts","../src/use-effect.ts","../src/fragment.ts","../src/dom-wrappers.ts","../src/observable-store.ts","../src/observable-hook.ts","../src/use-store.ts","../src/use-url-params.ts","../src/use-global-store.ts","../src/mount.ts","../src/build-mounting-container.ts","../src/key-store.ts","../src/mutation-observer.ts","../src/start.ts"],"sourcesContent":["/*\n * This file is a collection of strings used to store values\n * in the tram-one global space. If you ever need to debug Tram-One's\n * internal state, you can inspect these on the window.\n *\n * e.g. `window['tram-space']['tram-hook-key']`\n */\n\nexport const TRAM_HOOK_KEY = 'tram-hook-key';\nexport const TRAM_EFFECT_STORE = 'tram-effect-store';\nexport const TRAM_EFFECT_QUEUE = 'tram-effect-queue';\nexport const TRAM_KEY_STORE = 'tram-key-store';\nexport const TRAM_KEY_QUEUE = 'tram-key-queue';\nexport const TRAM_GLOBAL_KEY_QUEUE = 'tram-global-key-queue';\nexport const TRAM_OBSERVABLE_STORE = 'tram-observable-store';\nexport const TRAM_MUTATION_OBSERVER = 'tram-mutation-observer';\n","/*\n * namespace is a generic interface for global tram-one state that needs\n * to be persisted in the app container. It exposes a setup and get function.\n */\n\nimport { TramWindow } from './types';\n\nconst getTramWindow = (): TramWindow => {\n\t// if tram-one is setup it will have a defined value in the 'tram-space'\n\tconst tramOneIsSetup = (window as unknown as TramWindow)['tram-space'];\n\n\t// otherwise, we should warn\n\t// this usually happens when calling a hook outside of a component function\n\t// but this could be potentially triggered other ways - if we find those, we should broaden the message then\n\tif (!tramOneIsSetup) {\n\t\tthrow new Error(`\n\t\t\tTram-One: app has not started yet, but hook was called. Is it being invoked outside a component function?\n\t\t\thttps://github.com/Tram-One/tram-one/issues/178\n\t\t`);\n\t}\n\n\treturn window as unknown as TramWindow;\n};\n\nexport const setupTramOneSpace = () => {\n\t(window as unknown as TramWindow)['tram-space'] = {};\n};\n\nexport const buildNamespace = <NamespaceStore>(constructor: () => NamespaceStore) => {\n\tconst setup = (namespace: string): NamespaceStore => {\n\t\tconst tramWindow = getTramWindow();\n\t\ttramWindow['tram-space'][namespace] = constructor();\n\t\treturn tramWindow['tram-space'][namespace];\n\t};\n\n\tconst get = (namespace: string): NamespaceStore => {\n\t\tconst tramWindow = getTramWindow();\n\t\treturn tramWindow['tram-space'][namespace];\n\t};\n\n\tconst set = (namespace: string, value: NamespaceStore) => {\n\t\tconst tramWindow = getTramWindow();\n\t\ttramWindow['tram-space'][namespace] = value;\n\t};\n\n\treturn { setup, get, set };\n};\n","import { buildNamespace } from './namespace';\nimport { WorkingkeyObject } from './types';\n\n/*\n * This file defines all the functions required to interact with\n * a working-key object. This working-key object is used to help\n * hooks understand where in the mounting process we are, and what\n * values or effects to pull / trigger.\n */\n\nconst defaultWorkingKey = () =>\n\t({\n\t\t// list of custom tags that we've stepped into\n\t\tbranch: [],\n\t\t// map of branches to index value (used as a cursor for hooks)\n\t\tbranchIndices: {\n\t\t\t'': 0,\n\t\t},\n\t} as WorkingkeyObject);\n\nexport const { setup: setupWorkingKey, get: getWorkingKey } = buildNamespace(defaultWorkingKey);\n\nconst getWorkingBranch = (keyName: string) => {\n\tconst workingkeyObject = getWorkingKey(keyName);\n\treturn workingkeyObject.branch.join('/');\n};\n\n/**\n * push a new branch value, usually when we step into a new\n * custom component when mounting.\n */\nexport const pushWorkingKeyBranch = (keyName: string, branch: string) => {\n\tconst workingKey = getWorkingKey(keyName);\n\tworkingKey.branch.push(branch);\n\tif (!workingKey.branchIndices[getWorkingBranch(keyName)]) {\n\t\tworkingKey.branchIndices[getWorkingBranch(keyName)] = 0;\n\t}\n};\n\n/**\n * pops the current branch value, usually when we are done mounting\n * a single child component.\n */\nexport const popWorkingKeyBranch = (keyName: string) => {\n\tconst workingKey = getWorkingKey(keyName);\n\tworkingKey.branch.pop();\n};\n\n/**\n * increments the value for the current branch.\n * These values are used to pull the correct hook value on re-renders.\n */\nexport const incrementWorkingKeyBranch = (keyName: string) => {\n\tconst workingKey = getWorkingKey(keyName);\n\tworkingKey.branchIndices[getWorkingBranch(keyName)] += 1;\n};\n\n/**\n * used to get a unique string that will be used as a key for observables and effects.\n * This unique string _should_ be consistent over many re-renders.\n */\nexport const getWorkingKeyValue = (keyName: string) => {\n\tconst workingKey = getWorkingKey(keyName);\n\n\tconst index = workingKey.branchIndices[getWorkingBranch(keyName)];\n\treturn `${getWorkingBranch(keyName)}[${index}]`;\n};\n\n/**\n * returns a deep copy of the existing key, usually used as a restore point later\n */\nexport const copyWorkingKey = (keyName: string) => {\n\tconst key = getWorkingKey(keyName);\n\treturn {\n\t\tbranch: [...key.branch],\n\t\tbranchIndices: { ...key.branchIndices },\n\t};\n};\n\n/**\n * if we needed to reset pre-emptively, use this to get back\n * to where the branches were before\n */\nexport const restoreWorkingKey = (keyName: string, restoreKey: WorkingkeyObject) => {\n\tconst key = getWorkingKey(keyName);\n\tconst branches = key.branchIndices;\n\n\tkey.branch = [...restoreKey.branch];\n\n\tconst resetBranchValue = (branch: string) => {\n\t\tbranches[branch] = restoreKey.branchIndices[branch] || 0;\n\t};\n\tObject.keys(key.branchIndices).forEach(resetBranchValue);\n};\n","/*\n * This file is a collection of strings used to store values\n * in custom elements. If you ever need to debug Tram-One's\n * internal state, you can inspect these on individual elements.\n *\n * e.g. `$0['tram-hook-key']`\n */\n\nexport const TRAM_TAG = 'tram-tag';\nexport const TRAM_TAG_REACTION = 'tram-tag-reaction';\nexport const TRAM_TAG_STORE_KEYS = 'tram-tag-store-keys';\nexport const TRAM_TAG_NEW_EFFECTS = 'tram-tag-new-effects';\nexport const TRAM_TAG_CLEANUP_EFFECTS = 'tram-tag-cleanup-effects';\n\n// Debug properties used for tram-one dev tools\nexport const TRAM_TAG_NAME = 'tram-tag-name';\nexport const TRAM_TAG_PROPS = 'tram-tag-props';\nexport const TRAM_TAG_CHILDREN = 'tram-tag-children';\nexport const TRAM_TAG_GLOBAL_STORE_KEYS = 'tram-tag-global-store-keys';\n","const { observe } = require('@nx-js/observer-util');\n\nimport {\n\tTRAM_TAG_REACTION,\n\tTRAM_TAG_NEW_EFFECTS,\n\tTRAM_TAG_CLEANUP_EFFECTS,\n\tTRAM_TAG,\n\tTRAM_TAG_NAME,\n\tTRAM_TAG_PROPS,\n\tTRAM_TAG_GLOBAL_STORE_KEYS,\n} from './node-names';\nimport { TramOneElement, RemovedElementDataStore, Reaction, ElementPotentiallyWithSelectionAndFocus } from './types';\n\n// functions to go to nodes or indices (made for .map)\nconst toIndices = (node: Node, index: number) => index;\n\n// sorting function that prioritizes indices that are closest to a target\n// e.g. target = 3, [1, 2, 3, 4, 5] => [3, 2, 4, 1, 5]\nconst byDistanceFromIndex = (targetIndex: number) => (indexA: number, indexB: number) => {\n\tconst diffFromTargetA = Math.abs(indexA - targetIndex);\n\tconst diffFromTargetB = Math.abs(indexB - targetIndex);\n\treturn diffFromTargetA - diffFromTargetB;\n};\n\nconst hasMatchingTagName = (tagName: string) => (node: Node | Element) => {\n\tconst nodeHasMatchingTagName = 'tagName' in node && node.tagName === tagName;\n\t// if the tagName matches, we want to process the node, otherwise skip it\n\treturn nodeHasMatchingTagName ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n};\n\n// get an array including the element and all it's children\nconst parentAndChildrenElements = (node: Element, tagName: string) => {\n\tconst matchesTagName = hasMatchingTagName(tagName);\n\tconst componentWalker = document.createTreeWalker(node, NodeFilter.SHOW_ELEMENT, matchesTagName);\n\tconst parentAndChildren = [componentWalker.currentNode];\n\twhile (componentWalker.nextNode()) {\n\t\tparentAndChildren.push(componentWalker.currentNode);\n\t}\n\n\t// since we are looking for elements (things with tagNames)\n\t// we can safely declare this as an array of Elements\n\treturn parentAndChildren as Element[];\n};\n\nconst defaultRemovedElementWithFocusData: RemovedElementDataStore = {\n\tindex: -1,\n\ttagName: '',\n\tscrollLeft: 0,\n\tscrollTop: 0,\n\tselectionStart: null,\n\tselectionEnd: null,\n\tselectionDirection: undefined,\n};\n\n/**\n * This is a helper function for the dom creation.\n * This function observes any state values used when making the tag, and allow it to update\n * independently when one of those state values updates.\n *\n * The mutation-observer will unobserve any reactions here when the node is removed.\n *\n * The parameter tagFunction is almost a TramOneComponent, but it already has the props and children prepopulated,\n * and so has no parameters, but returns a TramOneElement\n */\nexport default (tagFunction: () => TramOneElement): TramOneElement => {\n\tlet tagResult: TramOneElement | undefined;\n\tconst buildAndReplaceTag = () => {\n\t\t// if there is an existing tagResult, it is the last rendering, and so we want to re-render over it\n\t\tlet oldTag = tagResult;\n\t\tlet removedElementWithFocusData = defaultRemovedElementWithFocusData;\n\n\t\t// remove oldTag first so that we unobserve before we re-observe\n\t\tif (oldTag) {\n\t\t\t// we need to blow away any old focus data we had\n\t\t\tremovedElementWithFocusData = defaultRemovedElementWithFocusData;\n\n\t\t\t// determine if this element (or any element under it) had focus\n\t\t\tconst oldTagHasFocusedElement = oldTag.contains(document.activeElement);\n\n\t\t\t// if an element had focus, copy over all the selection data (so we can copy it back later)\n\t\t\tif (oldTagHasFocusedElement) {\n\t\t\t\t// we'll assume that the element is an HTMLInputElement, in reality other kinds of elements will be caught here,\n\t\t\t\t// but that's fine, since they have null as selection attributes, and setting them to null is fine\n\t\t\t\tconst activeElement = document.activeElement as HTMLInputElement;\n\n\t\t\t\t// first, we need to get all the elements that are similar (we'll use tagName)\n\t\t\t\t// this way, when we rerender, we can search for those tagNames, and just use the index we got here\n\t\t\t\tconst allActiveLikeElements = parentAndChildrenElements(oldTag, activeElement.tagName);\n\t\t\t\tremovedElementWithFocusData.index = allActiveLikeElements.findIndex((element) => element === activeElement);\n\n\t\t\t\t// copy over the data\n\t\t\t\tremovedElementWithFocusData.tagName = activeElement.tagName;\n\t\t\t\tremovedElementWithFocusData.scrollLeft = activeElement.scrollLeft;\n\t\t\t\tremovedElementWithFocusData.scrollTop = activeElement.scrollTop;\n\t\t\t\tremovedElementWithFocusData.selectionStart = activeElement.selectionStart;\n\t\t\t\tremovedElementWithFocusData.selectionEnd = activeElement.selectionEnd;\n\t\t\t\tremovedElementWithFocusData.selectionDirection = activeElement.selectionDirection || undefined;\n\t\t\t}\n\n\t\t\tconst emptyDiv = document.createElement('div') as unknown as TramOneElement;\n\t\t\toldTag.replaceWith(emptyDiv);\n\n\t\t\t// copy the reaction and effects from the old tag to the empty div so we don't lose them\n\t\t\temptyDiv[TRAM_TAG_REACTION] = oldTag[TRAM_TAG_REACTION];\n\t\t\temptyDiv[TRAM_TAG_NEW_EFFECTS] = oldTag[TRAM_TAG_NEW_EFFECTS];\n\t\t\temptyDiv[TRAM_TAG_CLEANUP_EFFECTS] = oldTag[TRAM_TAG_CLEANUP_EFFECTS];\n\n\t\t\t// copy over development props\n\t\t\tif (process.env.NODE_ENV === 'development') {\n\t\t\t\temptyDiv[TRAM_TAG_NAME] = oldTag[TRAM_TAG_NAME];\n\t\t\t\temptyDiv[TRAM_TAG_PROPS] = oldTag[TRAM_TAG_PROPS];\n\t\t\t\temptyDiv[TRAM_TAG_GLOBAL_STORE_KEYS] = oldTag[TRAM_TAG_GLOBAL_STORE_KEYS];\n\t\t\t}\n\n\t\t\t// set oldTag to emptyDiv, so we can replace it later\n\t\t\toldTag = emptyDiv;\n\t\t}\n\n\t\t// build the component\n\t\ttagResult = tagFunction();\n\n\t\t// if oldTag was defined, then we need to replace it with the new result\n\t\tif (oldTag) {\n\t\t\t// if an element had focus, reapply it\n\t\t\tlet elementToGiveFocus;\n\t\t\tif (removedElementWithFocusData.index >= 0) {\n\t\t\t\tconst allActiveLikeElements = parentAndChildrenElements(tagResult, removedElementWithFocusData.tagName);\n\n\t\t\t\t// we'll look through the elements (in order of nodes closest to original index) and find a tag that matches.\n\t\t\t\t// this means if it didn't move, we'll get it right away,\n\t\t\t\t// if it did, we'll look at the elements closest to the original position\n\t\t\t\tconst elementIndexToGiveFocus = allActiveLikeElements\n\t\t\t\t\t.map(toIndices)\n\t\t\t\t\t.sort(byDistanceFromIndex(removedElementWithFocusData.index))[0];\n\n\t\t\t\telementToGiveFocus = allActiveLikeElements[elementIndexToGiveFocus] as ElementPotentiallyWithSelectionAndFocus;\n\t\t\t\t// also try to set the selection, if there is a selection for this element\n\t\t\t\ttry {\n\t\t\t\t\tif (elementToGiveFocus.setSelectionRange !== undefined) {\n\t\t\t\t\t\telementToGiveFocus.setSelectionRange(\n\t\t\t\t\t\t\tremovedElementWithFocusData.selectionStart,\n\t\t\t\t\t\t\tremovedElementWithFocusData.selectionEnd,\n\t\t\t\t\t\t\tremovedElementWithFocusData.selectionDirection\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} catch (exception) {\n\t\t\t\t\t// don't worry if we fail\n\t\t\t\t\t// this can happen if the element has a `setSelectionRange` but it isn't supported\n\t\t\t\t\t// e.g. input with type=\"range\"\n\t\t\t\t}\n\n\t\t\t\telementToGiveFocus.scrollLeft = removedElementWithFocusData.scrollLeft;\n\t\t\t\telementToGiveFocus.scrollTop = removedElementWithFocusData.scrollTop;\n\t\t\t}\n\n\t\t\t// don't lose track that this is still a tram-one element\n\t\t\ttagResult[TRAM_TAG] = true;\n\n\t\t\t// copy the reaction and effects from the old tag to the new one\n\t\t\ttagResult[TRAM_TAG_REACTION] = oldTag[TRAM_TAG_REACTION];\n\t\t\ttagResult[TRAM_TAG_NEW_EFFECTS] = oldTag[TRAM_TAG_NEW_EFFECTS];\n\t\t\ttagResult[TRAM_TAG_CLEANUP_EFFECTS] = oldTag[TRAM_TAG_CLEANUP_EFFECTS];\n\n\t\t\t// copy over development props\n\t\t\tif (process.env.NODE_ENV === 'development') {\n\t\t\t\ttagResult[TRAM_TAG_NAME] = oldTag[TRAM_TAG_NAME];\n\t\t\t\ttagResult[TRAM_TAG_PROPS] = oldTag[TRAM_TAG_PROPS];\n\t\t\t\ttagResult[TRAM_TAG_GLOBAL_STORE_KEYS] = oldTag[TRAM_TAG_GLOBAL_STORE_KEYS];\n\t\t\t}\n\n\t\t\t// both these actions cause forced reflow, and can be performance issues\n\t\t\toldTag.replaceWith(tagResult);\n\t\t\tif (elementToGiveFocus && elementToGiveFocus.focus) elementToGiveFocus.focus();\n\t\t}\n\t};\n\n\tconst tagReaction = observe(buildAndReplaceTag) as Reaction;\n\n\t// tagResult is always assigned as an artifact of the observe() call above\n\t// if it isn't, we want to know about it\n\tif (tagResult === undefined) {\n\t\tthrow new Error(`\n\t\t\tTram-One: tagResult was not defined after building the tag.\n\t\t\thttps://github.com/Tram-One/tram-one/issues/177\n\t\t`);\n\t}\n\n\t// save the reaction to the node, so that the mutation-observer can unobserve it later\n\ttagResult[TRAM_TAG_REACTION] = tagReaction;\n\n\treturn tagResult;\n};\n","/*\n * EffectStores in Tram-One are used for basic key-value object mappings that need\n * to be persisted in the globalSpace.\n *\n * Currently this is used with useEffect to keep track of what\n * new effects should be triggered or cleaned up\n */\n\nimport { buildNamespace } from './namespace';\nimport { EffectStore } from './types';\n\nconst newDefaultEffectStore = () => {\n\treturn {} as EffectStore;\n};\n\nexport const {\n\tsetup: setupEffectStore,\n\tget: getEffectStore,\n\tset: setEffectStore,\n} = buildNamespace(newDefaultEffectStore);\n\n/**\n * clear the effect store\n * usually called when we want to empty the effect store\n */\nexport const clearEffectStore = (effectStoreName: string) => {\n\tconst effectStore = getEffectStore(effectStoreName);\n\n\tObject.keys(effectStore).forEach((key) => delete effectStore[key]);\n};\n\n/**\n * restore the effect store to a previous value\n * usually used when we had to interrupt the processing of effects\n */\nexport const restoreEffectStore = setEffectStore;\n","/*\n * The KeyQueue in Tram-One is a basic list of keys\n * that needs to be persisted in the globalSpace.\n *\n * Currently this is used with useStore to keep track of what\n * stores need to be associated with generated elements\n */\n\nimport { buildNamespace } from './namespace';\n\nconst newDefaultKeyQueue = () => {\n\treturn [] as string[];\n};\n\nexport const { setup: setupKeyQueue, get: getKeyQueue, set: setKeyQueue } = buildNamespace(newDefaultKeyQueue);\n\n/**\n * clear the key queue\n * usually called when we want to empty the key queue\n */\nexport const clearKeyQueue = (keyQueueName: string) => {\n\tconst keyQueue = getKeyQueue(keyQueueName);\n\n\tkeyQueue.splice(0, keyQueue.length);\n};\n\n/**\n * restore the key queue to a previous value\n * usually used when we had to interrupt the processing of keys\n */\nexport const restoreKeyQueue = setKeyQueue;\n","import { TRAM_EFFECT_STORE, TRAM_EFFECT_QUEUE, TRAM_KEY_QUEUE, TRAM_GLOBAL_KEY_QUEUE } from './engine-names';\nimport { TRAM_TAG_GLOBAL_STORE_KEYS, TRAM_TAG_NEW_EFFECTS, TRAM_TAG_STORE_KEYS } from './node-names';\nimport { getEffectStore, clearEffectStore, restoreEffectStore } from './effect-store';\nimport { TramOneElement } from './types';\nimport { clearKeyQueue, getKeyQueue, restoreKeyQueue } from './key-queue';\n\n/**\n * This is a helper function for the dom creation.\n * This function stores any keys generated when building a tag in the resulting node that is generated.\n *\n * These are later processed by the mutation-observer, and cleaned up when the node is removed by the mutation-observer.\n *\n * This function is called every time state changes in an observable store\n */\nexport default (tagFunction: () => TramOneElement) => {\n\t// save the existing effect queue and key queue for any components we are in the middle of building\n\tconst existingQueuedEffects = { ...getEffectStore(TRAM_EFFECT_QUEUE) };\n\tconst existingQueuedKeys = [...getKeyQueue(TRAM_KEY_QUEUE)];\n\n\t// clear the queues (so we can get just new effects and keys)\n\tclearEffectStore(TRAM_EFFECT_QUEUE);\n\tclearKeyQueue(TRAM_KEY_QUEUE);\n\tclearKeyQueue(TRAM_GLOBAL_KEY_QUEUE);\n\n\t// create the component, which will save new effects to the effect queue\n\tconst tagResult = tagFunction();\n\n\t// see if there are any brand new effects\n\tconst existingEffects = getEffectStore(TRAM_EFFECT_STORE);\n\tconst queuedEffects = getEffectStore(TRAM_EFFECT_QUEUE);\n\n\t// pull new effects that have yet to be processed from the tag\n\t// these can appear when a component re-exposes another component at its root\n\tconst existingNewEffects = tagResult[TRAM_TAG_NEW_EFFECTS] || [];\n\n\t// store new effects (and the existing new effects) in the node we just built\n\tconst newEffects = Object.keys(queuedEffects).filter((effect) => !(effect in existingEffects));\n\tconst newEffectFunctions = newEffects.map((newEffectKey) => queuedEffects[newEffectKey]);\n\tconst existingNewAndBrandNewEffects = existingNewEffects.concat(newEffectFunctions);\n\ttagResult[TRAM_TAG_NEW_EFFECTS] = existingNewAndBrandNewEffects;\n\n\t// same as the existingNewEffects, but for state values\n\tconst existingNewKeys = tagResult[TRAM_TAG_STORE_KEYS] || [];\n\n\t// get all new keys\n\tconst newKeys = getKeyQueue(TRAM_KEY_QUEUE);\n\n\t// store keys in the node we just built\n\tconst existingNewAndBrandNewKeys = existingNewKeys.concat(newKeys);\n\ttagResult[TRAM_TAG_STORE_KEYS] = existingNewAndBrandNewKeys;\n\n\t// if this is development environment, save global store keys to the element\n\tif (process.env.NODE_ENV === 'development') {\n\t\tconst existingNewGlobalKeys = tagResult[TRAM_TAG_GLOBAL_STORE_KEYS] || [];\n\t\tconst newGlobalKeys = getKeyQueue(TRAM_GLOBAL_KEY_QUEUE);\n\n\t\t// store global store keys in the node we just built\n\t\tconst existingNewAndBrandNewGlobalKeys = existingNewGlobalKeys.concat(newGlobalKeys);\n\t\ttagResult[TRAM_TAG_GLOBAL_STORE_KEYS] = existingNewAndBrandNewGlobalKeys;\n\t}\n\n\t// restore the effect and key queues to what they were before we started\n\trestoreEffectStore(TRAM_EFFECT_QUEUE, existingQueuedEffects);\n\trestoreKeyQueue(TRAM_KEY_QUEUE, existingQueuedKeys);\n\n\treturn tagResult;\n};\n","const nanohtml = require('@tram-one/nanohtml');\nconst rbel = require('@tram-one/rbel');\nconst hyperx = require('@tram-one/hyperx');\n\nimport { TRAM_HOOK_KEY } from './engine-names';\nimport {\n\tpushWorkingKeyBranch,\n\tpopWorkingKeyBranch,\n\tincrementWorkingKeyBranch,\n\tcopyWorkingKey,\n\trestoreWorkingKey,\n} from './working-key';\nimport observeTag from './observe-tag';\nimport processHooks from './process-hooks';\nimport {\n\tTRAM_TAG,\n\tTRAM_TAG_NEW_EFFECTS,\n\tTRAM_TAG_CLEANUP_EFFECTS,\n\tTRAM_TAG_NAME,\n\tTRAM_TAG_PROPS,\n\tTRAM_TAG_CHILDREN,\n} from './node-names';\n\nimport { Registry, Props, DOMTaggedTemplateFunction, Children, TramOneHTMLElement, TramOneSVGElement } from './types';\n\n/**\n * This function takes in a namespace and registry of custom components,\n * and builds a `dom` template tag function that can take in a template XML string.\n *\n * This function shouldn't need to be called directly, instead, you can use `registerHtml` or `registerSvg`\n *\n * @param registry mapping of tag names to component functions\n * @param namespace namespace to create nodes in (by default XHTML namespace)\n */\nexport const registerDom = <ElementType extends TramOneHTMLElement | TramOneSVGElement>(\n\tnamespace: string | null,\n\tregistry: Registry = {}\n) => {\n\t// modify the registry so that each component function updates the hook working key\n\tconst hookedRegistry = Object.keys(registry).reduce((newRegistry, tagName) => {\n\t\tconst tagFunction = registry[tagName];\n\t\tconst hookedTagFunction = (props: Props, children: Children) => {\n\t\t\t// push a new branch onto the working key so any values that need to be unique among components\n\t\t\t// but consistent across renders can be read\n\t\t\tconst stringifiedProps = JSON.stringify(props);\n\t\t\tconst newBranch = `${tagName}[${stringifiedProps}]`;\n\t\t\tpushWorkingKeyBranch(TRAM_HOOK_KEY, newBranch);\n\n\t\t\t// increment branch so that we have a unique value (in case we are rendering a list of components)\n\t\t\tincrementWorkingKeyBranch(TRAM_HOOK_KEY);\n\t\t\tconst uniqueBranch = copyWorkingKey(TRAM_HOOK_KEY);\n\n\t\t\t// create a tag function that has the args passed in\n\t\t\tconst populatedTagFunction = () => {\n\t\t\t\t// reset working key so we have the correct place when starting a new component\n\t\t\t\trestoreWorkingKey(TRAM_HOOK_KEY, uniqueBranch);\n\n\t\t\t\tconst processedChildren: Children = children?.map((child: unknown | Element) => {\n\t\t\t\t\tif (child instanceof Element) return child;\n\t\t\t\t\treturn `${child}`;\n\t\t\t\t});\n\t\t\t\treturn tagFunction(props, processedChildren);\n\t\t\t};\n\n\t\t\t// observe store usage and process any new effects that were called when building the component\n\t\t\tconst processHooksAndBuildTagResult = () => processHooks(populatedTagFunction);\n\t\t\tconst tagResult = observeTag(processHooksAndBuildTagResult);\n\n\t\t\t// pop the branch off (since we are done rendering this component)\n\t\t\tpopWorkingKeyBranch(TRAM_HOOK_KEY);\n\n\t\t\t// decorate the properties expected on TramOneElements (see node-names.ts)\n\t\t\ttagResult[TRAM_TAG] = true;\n\t\t\t// we won't decorate TRAM_TAG_REACTION, that needs to be done later when we observe the tag\n\t\t\ttagResult[TRAM_TAG_NEW_EFFECTS] = tagResult[TRAM_TAG_NEW_EFFECTS] || [];\n\t\t\t// cleanup effects will be populated when new effects are processed\n\t\t\ttagResult[TRAM_TAG_CLEANUP_EFFECTS] = [];\n\n\t\t\t// save properties for development debugging\n\t\t\tif (process.env.NODE_ENV === 'development') {\n\t\t\t\ttagResult[TRAM_TAG_NAME] = tagName;\n\t\t\t\ttagResult[TRAM_TAG_PROPS] = props;\n\t\t\t\ttagResult[TRAM_TAG_CHILDREN] = children;\n\t\t\t}\n\n\t\t\treturn tagResult;\n\t\t};\n\n\t\treturn { ...newRegistry, [tagName]: hookedTagFunction };\n\t}, {});\n\n\treturn rbel(hyperx, nanohtml(namespace), hookedRegistry) as DOMTaggedTemplateFunction<ElementType>;\n};\n","import { TRAM_HOOK_KEY, TRAM_EFFECT_QUEUE } from './engine-names';\nimport { getEffectStore } from './effect-store';\nimport { getWorkingKeyValue, incrementWorkingKeyBranch } from './working-key';\n\nimport { Effect } from './types';\n\n/**\n * @name useEffect\n * @link https://tram-one.io/#use-effect\n * @description\n * Hook that triggers component start, update, and cleanup effects.\n * If the return of effect is another function, then that function is called on when the component is removed.\n * If the effect is dependent on a observable, it will automatically trigger again if that value updates.\n *\n * @param effect function to run on component mount\n */\nexport default (effect: Effect): void => {\n\t// get the store of effects\n\tconst effectQueue = getEffectStore(TRAM_EFFECT_QUEUE);\n\n\t// get the key value from working-key\n\tconst key = getWorkingKeyValue(TRAM_HOOK_KEY);\n\n\t// increment the working key branch value\n\t// this makes successive useEffects calls unique (until we reset the key)\n\tincrementWorkingKeyBranch(TRAM_HOOK_KEY);\n\n\t// append () so that it's easier to debug effects from components\n\tconst callLikeKey = `${key}()`;\n\n\t// add the effect to the effect queue, so it can be processed later\n\teffectQueue[callLikeKey] = effect;\n};\n","import { TramOneComponent } from './types';\nimport { registerDom } from './dom';\nimport useEffect from './use-effect';\n\nconst xml = registerDom(null);\n\nconst fragment: TramOneComponent = (props, children) => {\n\tuseEffect((ref) => {\n\t\t(children || []).forEach((child) => {\n\t\t\tif (typeof child === 'string') {\n\t\t\t\tref.insertAdjacentText('beforebegin', child);\n\t\t\t} else {\n\t\t\t\tref.insertAdjacentElement('beforebegin', child);\n\t\t\t}\n\t\t});\n\t\tref.remove();\n\t});\n\treturn xml`<tram-fragment>${children}</tram-fragment>`;\n};\n\nexport default fragment;\n","import { registerDom } from './dom';\nimport fragment from './fragment';\nimport { Registry, TramOneHTMLElement, TramOneSVGElement } from './types';\n\n/**\n * @name registerHtml\n * @link https://tram-one.io/#register-html\n * @description\n * Function to generate a tagged template function for XHTML / HTML.\n * Takes in a registry that allows you to import other tag functions and use them in your template string.\n *\n * @param registry map of tag names to functions, use this to use custom elements built in tram-one\n * @return tagged template function that builds HTML components\n */\nexport const registerHtml = (registry?: Registry) => {\n\treturn registerDom<TramOneHTMLElement>(null, { '': fragment, ...registry });\n};\n\n/**\n * @name registerSvg\n * @link https://tram-one.io/#register-svg\n * @description\n * Function to generate a tagged template function for SVG.\n *\n * @param registry map of tag names to functions, use this to use custom elements built in tram-one\n * @return tagged template function that builds SVG components\n */\nexport const registerSvg = (registry?: Registry) => {\n\treturn registerDom<TramOneSVGElement>('http://www.w3.org/2000/svg', { '': fragment, ...registry });\n};\n","const { observable } = require('@nx-js/observer-util');\n\nimport { buildNamespace } from './namespace';\n\n/*\n * Observable Stores in Tram-One are used for objects whose properties need to be observed.\n * This stores the values in the useStore and useGlobalStore hooks, internally tracking\n * them as proxies, and making observed functions respond to their changes.\n */\n\nexport const { setup: setupObservableStore, get: getObservableStore } = buildNamespace(() => observable({}));\n","import { TRAM_OBSERVABLE_STORE, TRAM_HOOK_KEY, TRAM_KEY_QUEUE, TRAM_GLOBAL_KEY_QUEUE } from './engine-names';\nimport { getObservableStore } from './observable-store';\nimport { getWorkingKeyValue, incrementWorkingKeyBranch } from './working-key';\n\nimport { StoreObject } from './types';\nimport { getKeyQueue } from './key-queue';\n\n/**\n * Shared source code for both observable hooks, useStore, and useGlobalStore.\n * This hook exposes a globally stored value (in either case), that can cause the component\n * to update when a subfield of that value is updated.\n *\n * It has a similar interface to React's useState\n */\nexport default <Store extends StoreObject>(key?: string, value?: Store): Store => {\n\t// get the store of effects\n\tconst observableStore = getObservableStore(TRAM_OBSERVABLE_STORE);\n\n\t// increment the working key branch value\n\t// this makes successive hooks unique (until we reset the key)\n\tincrementWorkingKeyBranch(TRAM_HOOK_KEY);\n\n\t// if a key was passed in, use that, otherwise, generate a key\n\tconst resolvedKey = key || getWorkingKeyValue(TRAM_HOOK_KEY);\n\n\t// saves value into the store if it doesn't exist in the observableStore yet\n\t// and if the value we are writing is defined\n\tif (!Object.prototype.hasOwnProperty.call(observableStore, resolvedKey) && value !== undefined) {\n\t\t// save the value as a shallow copy of the parameter passed in\n\t\tobservableStore[resolvedKey] = Array.isArray(value) ? [...value] : { ...value };\n\t}\n\n\t// get value for key\n\tconst keyValue = observableStore[resolvedKey];\n\n\t// if we weren't passed in a key, this is a local obserable (not global),\n\tconst isLocalStore = !key;\n\tif (isLocalStore) {\n\t\t// if this is local, we should associate it with the element by putting it in the keyQueue\n\t\tgetKeyQueue(TRAM_KEY_QUEUE).push(resolvedKey);\n\t}\n\n\t// if this is a development environment, save the global store key to the element\n\tif (!isLocalStore && process.env.NODE_ENV === 'development') {\n\t\tgetKeyQueue(TRAM_GLOBAL_KEY_QUEUE).push(resolvedKey);\n\t}\n\n\t// return value\n\treturn keyValue;\n};\n","import observableHook from './observable-hook';\n\nimport { StoreObject } from './types';\n\n/**\n * @name useStore\n * @link https://tram-one.io/#use-store\n * @description\n * Hook that stores local component state.\n *\n * If the subfield of an object, or element of an array is updated\n * it will cause only the components that are dependent on that value to update.\n *\n * @param defaultValue the default value to start the store at\n *\n * @returns the store to interact with.\n */\nexport default <Store extends StoreObject>(defaultValue: Store) => observableHook(undefined, defaultValue);\n","const urlListener = require('url-listener');\nconst useUrlParams = require('use-url-params');\n\nimport useStore from './use-store';\nimport { UrlMatchResults } from './types';\n\n/**\n * @name useUrlParams\n * @link https://tram-one.io/#use-url-params\n * @description\n * Hook that returns path variables based on the route.\n * Can return path parameters, query params, and more.\n * It's internal functionality is powered by the package\n * {@link https://www.npmjs.com/package/rlite-router rlite}\n *\n * @param pattern path to match on (can include path variables)\n *\n * @returns object with a `matches` key, and (if it matched) path and query parameters\n */\nexport default (pattern?: string): UrlMatchResults => {\n\t// save and update results in an observable, so that we can update\n\t// components and effects in a reactive way\n\tconst initialParams = useUrlParams(pattern) as UrlMatchResults;\n\tconst observedUrlParams = useStore(initialParams);\n\n\t// urlListener can re-read the route and save the new results to the observable\n\turlListener(() => {\n\t\tconst updatedParams = useUrlParams(pattern);\n\n\t\t// get all keys so we can override new and old ones (without having to override the whole object)\n\t\tconst allParamKeys = [...Object.keys(initialParams), ...Object.keys(updatedParams)];\n\t\tallParamKeys.forEach((paramKey) => {\n\t\t\tobservedUrlParams[paramKey] = updatedParams[paramKey];\n\t\t});\n\t});\n\n\treturn observedUrlParams;\n};\n","import observableHook from './observable-hook';\n\nimport { StoreObject } from './types';\n\n/**\n * @name useGlobalObservable\n * @link https://tram-one.io/#use-global-observable\n * @description\n * Hook that stores global state and makes it accessible in the entire app.\n *\n * If the subfield of an object, or element of an array is updated\n * it will cause only the components that are dependent on that value to update.\n *\n * @param key a unique string to write and read the global value\n * @param defaultValue the default value to start the store at\n *\n * @returns the store to interact with.\n */\nfunction useGlobalStore<Store extends StoreObject>(key: string, defaultValue: Store): Store;\n/**\n * @name useGlobalObservable\n * @link https://tram-one.io/#use-global-observable\n * @description\n * Hook that stores global state and makes it accessible in the entire app.\n *\n * If the subfield of an object, or element of an array is updated\n * it will cause only the components that are dependent on that value to update.\n *\n * @param key a unique string to write and read the global value\n *\n * @returns the store to interact with.\n */\nfunction useGlobalStore(key: string): unknown;\n/** Implementation of the two function definitions */\nfunction useGlobalStore(key: string, defaultValue?: StoreObject): any {\n\treturn observableHook(key, defaultValue);\n}\n\nexport default useGlobalStore;\n","import { registerHtml } from './dom-wrappers';\nimport { Container, RootTramOneComponent } from './types';\n\n/**\n * Updates a container with an initial component for the first render.\n * @param component the tram-one component to render\n * @param container an element to render the component on\n */\nexport default (component: RootTramOneComponent, container: Container) => {\n\tconst html = registerHtml({\n\t\tapp: component,\n\t});\n\n\t// this sadly needs to be wrapped in some element so we can process effects\n\t// otherwise the root node will not have effects applied on it\n\tconst renderedApp = html`<tram-one><app /></tram-one>`;\n\tcontainer.replaceChild(renderedApp, container.firstElementChild);\n};\n","import { Container, ElementOrSelector } from './types';\n\n/**\n * Helper function for getting an element when given a string or element\n * @param target either a CSS selector, or Element to attach the component to.\n * @returns the container that we can mount on\n */\nconst getContainerElement = (target: ElementOrSelector): Element => {\n\t// if the selector is a string, try to find the element,\n\t// otherwise it's probably DOM that we should write directly to\n\tif (typeof target === 'string') {\n\t\tconst selectedElement = document.querySelector(target);\n\t\tif (selectedElement === null) {\n\t\t\tthrow new Error(`\n\t\t\t\tTram-One: could not find target, is the element on the page yet?\n\t\t\t\thttps://github.com/Tram-One/tram-one/issues/179\n\t\t\t`);\n\t\t}\n\t\treturn selectedElement;\n\t} else {\n\t\treturn target;\n\t}\n};\n\n/**\n * Function to determine (or create) the element that we will mount our tram-one app onto\n * @param target either a CSS selector, or Element to attach the component to.\n * This elememnt should be initially empty.\n *\n * @returns the container, now with a div that tram-one can manage\n */\nexport default (target: ElementOrSelector): Container => {\n\tconst container = getContainerElement(target);\n\n\t// build a div to render the app on\n\t// - if it doesn't exist as a child of the selector, create one first\n\tif (!container.firstElementChild) {\n\t\tconst containerChild = document.createElement('div');\n\t\tcontainer.appendChild(containerChild);\n\t}\n\n\treturn container as Container;\n};\n","/*\n * The KeyStore in Tram-One is a basic key-value object\n * that needs to be persisted in the globalSpace.\n *\n * Currently this is used with useStore and useGlobalStore to keep\n * track of what stores need to be cleaned up when removing elements\n */\n\nimport { buildNamespace } from './namespace';\nimport { KeyObservers } from './types';\n\nconst newDefaultKeyStore = () => {\n\treturn {} as KeyObservers;\n};\n\nexport const { setup: setupKeyStore, get: getKeyStore, set: setKeyStore } = buildNamespace(newDefaultKeyStore);\n\n/**\n * increment (or set initial value) for the keyStore\n */\nexport const incrementKeyStoreValue = (keyStoreName: string, key: string) => {\n\tconst keyStore = getKeyStore(keyStoreName);\n\tkeyStore[key] = keyStore[key] + 1 || 1;\n};\n\n/**\n * decrement a value in the keyStore\n */\nexport const decrementKeyStoreValue = (keyStoreName: string, key: string) => {\n\tconst keyStore = getKeyStore(keyStoreName);\n\tkeyStore[key]--;\n};\n","/*\n * The mutation-observer is a global instance of browsers MutationObserver\n * which tracks when nodes are added or removed.\n *\n * When nodes are added we process their effects. When nodes are removed we process any cleanup,\n * and stop observers that would trigger for that node.\n */\n\nconst { observe, unobserve } = require('@nx-js/observer-util');\n\nimport {\n\tTRAM_TAG,\n\tTRAM_TAG_REACTION,\n\tTRAM_TAG_NEW_EFFECTS,\n\tTRAM_TAG_CLEANUP_EFFECTS,\n\tTRAM_TAG_STORE_KEYS,\n} from './node-names';\nimport { buildNamespace } from './namespace';\nimport { CleanupEffect, TramOneElement, TramOneHTMLElement, TramOneSVGElement } from './types';\nimport { getObservableStore } from './observable-store';\nimport { TRAM_OBSERVABLE_STORE, TRAM_KEY_STORE } from './engine-names';\nimport { decrementKeyStoreValue, getKeyStore, incrementKeyStoreValue } from './key-store';\n\n/**\n * process side-effects for new tram-one nodes\n * (this includes calling effects, and keeping track of stores)\n */\nconst processTramTags = (node: Node | (TramOneHTMLElement | TramOneSVGElement)) => {\n\t// if this element doesn't have a TRAM_TAG, it's not a Tram-One Element\n\tif (!(TRAM_TAG in node)) {\n\t\treturn;\n\t}\n\n\tconst hasStoreKeys = node[TRAM_TAG_STORE_KEYS];\n\n\tif (hasStoreKeys) {\n\t\t// for every store associated with this element, increment the count\n\t\t// - this ensures that it doesn't get blown away when we clean up old stores\n\t\tnode[TRAM_TAG_STORE_KEYS].forEach((key) => {\n\t\t\tincrementKeyStoreValue(TRAM_KEY_STORE, key);\n\t\t});\n\t}\n\n\tconst hasEffects = node[TRAM_TAG_NEW_EFFECTS];\n\n\tif (hasEffects) {\n\t\t// create an array for the cleanup effects\n\t\tnode[TRAM_TAG_CLEANUP_EFFECTS] = [];\n\n\t\t// run all the effects, saving any cleanup functions to the node\n\t\tnode[TRAM_TAG_NEW_EFFECTS].forEach((effect) => {\n\t\t\tlet cleanup: unknown;\n\n\t\t\t// this is called when an effect is re-triggered\n\t\t\tconst effectReaction = observe(() => {\n\t\t\t\t// verify that cleanup is a function before calling it (in case it was a promise)\n\t\t\t\tif (typeof cleanup === 'function') cleanup();\n\t\t\t\tcleanup = effect(node);\n\t\t\t});\n\n\t\t\t// this is called when a component with an effect is removed\n\t\t\tconst totalCleanup = () => {\n\t\t\t\t// verify that cleanup is a function before calling it (in case it was a promise)\n\t\t\t\tif (typeof cleanup === 'function') cleanup();\n\t\t\t\tunobserve(effectReaction);\n\t\t\t};\n\n\t\t\tnode[TRAM_TAG_CLEANUP_EFFECTS].push(totalCleanup);\n\t\t});\n\n\t\t// set new tag effects to an empty array\n\t\tnode[TRAM_TAG_NEW_EFFECTS] = [];\n\t}\n};\n\n/**\n * call all cleanup effects on the node\n */\nconst cleanupEffects = (cleanupEffects: CleanupEffect[]) => {\n\tcleanupEffects.forEach((cleanup) => cleanup());\n};\n\n/**\n * remove the association of the store with this specific element\n */\nconst removeStoreKeyAssociation = (storeKeys: string[]) => {\n\tstoreKeys.forEach((storeKey) => {\n\t\tdecrementKeyStoreValue(TRAM_KEY_STORE, storeKey);\n\t});\n};\n\n/**\n * remove any stores that no longer have any elements associated with them\n * see removeStoreKeyAssociation above\n */\nconst cleanUpObservableStores = () => {\n\tconst observableStore = getObservableStore(TRAM_OBSERVABLE_STORE);\n\tconst keyStore = getKeyStore(TRAM_KEY_STORE);\n\tObject.entries(keyStore).forEach(([key, observers]) => {\n\t\tif (observers === 0) {\n\t\t\tdelete observableStore[key];\n\t\t\tdelete keyStore[key];\n\t\t}\n\t});\n};\n\n/**\n * unobserve the reaction tied to the node, and run all cleanup effects for the node\n */\nconst clearNode = (node: Node | TramOneElement) => {\n\t// if this element doesn't have a TRAM_TAG, it's not a Tram-One Element\n\tif (!(TRAM_TAG in node)) {\n\t\treturn;\n\t}\n\n\tunobserve(node[TRAM_TAG_REACTION]);\n\tcleanupEffects(node[TRAM_TAG_CLEANUP_EFFECTS]);\n\tremoveStoreKeyAssociation(node[TRAM_TAG_STORE_KEYS]);\n};\n\nconst isTramOneComponent = (node: Node | TramOneElement) => {\n\t// a node is a component if it has `TRAM_TAG` key on it\n\tconst nodeIsATramOneComponent = TRAM_TAG in node;\n\t// if it is a tram-one component, we want to process it, otherwise skip it\n\treturn nodeIsATramOneComponent ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n};\n\n/**\n * function to get the children (as a list) of the node passed in\n */\nconst childrenComponents = (node: Node | TramOneElement) => {\n\tconst componentWalker = document.createTreeWalker(node, NodeFilter.SHOW_ELEMENT, isTramOneComponent);\n\tconst children = [];\n\twhile (componentWalker.nextNode()) {\n\t\tchildren.push(componentWalker.currentNode);\n\t}\n\n\treturn children;\n};\n\nconst mutationObserverNamespaceConstructor = () =>\n\tnew MutationObserver((mutationList) => {\n\t\t// cleanup orphaned nodes that are no longer on the DOM\n\t\tconst removedNodesInMutation = (mutation: MutationRecord) => [...mutation.removedNodes];\n\t\tconst removedNodes = mutationList.flatMap(removedNodesInMutation);\n\t\tconst removedChildNodes = removedNodes.flatMap(childrenComponents);\n\n\t\tremovedChildNodes.forEach(clearNode);\n\n\t\t// call new effects on any new nodes\n\t\tconst addedNodesInMutation = (mutation: MutationRecord) => [...mutation.addedNodes];\n\t\tconst newNodes = mutationList.flatMap(addedNodesInMutation);\n\t\tconst newChildNodes = newNodes.flatMap(childrenComponents);\n\n\t\tnewChildNodes.forEach(processTramTags);\n\n\t\t// clean up all local observable stores that have no observers\n\t\tcleanUpObservableStores();\n\t});\n\nexport const { setup: setupMutationObserver, get: getMutationObserver } = buildNamespace(\n\tmutationObserverNamespaceConstructor\n);\n\n// tell the mutation observer to watch the given node for changes\nexport const startWatcher = (observerName: string, node: Element) => {\n\tconst observerStore = getMutationObserver(observerName);\n\n\tobserverStore.observe(node, { childList: true, subtree: true });\n};\n","import mount from './mount';\nimport buildContainer from './build-mounting-container';\nimport {\n\tTRAM_EFFECT_STORE,\n\tTRAM_HOOK_KEY,\n\tTRAM_EFFECT_QUEUE,\n\tTRAM_OBSERVABLE_STORE,\n\tTRAM_MUTATION_OBSERVER,\n\tTRAM_KEY_QUEUE,\n\tTRAM_KEY_STORE,\n\tTRAM_GLOBAL_KEY_QUEUE,\n} from './engine-names';\nimport { setupTramOneSpace } from './namespace';\nimport { setupEffectStore } from './effect-store';\nimport { setupWorkingKey } from './working-key';\nimport { setupObservableStore } from './observable-store';\nimport { setupMutationObserver, startWatcher } from './mutation-observer';\nimport { ElementOrSelector, RootTramOneComponent } from './types';\nimport { setupKeyQueue } from './key-queue';\nimport { setupKeyStore } from './key-store';\n\n/**\n * @name start\n * @link https://tram-one.io/#start\n * @description\n * Function to attach a component to an existing element on the page.\n * This function also starts all the listeners and allows the basic hooks to function.\n *\n * This should only be called for the initial render / building of the app.\n *\n * @param component top-level component to attach to the page.\n * @param target either a CSS selector, or Node to attach the component to\n */\nexport default (component: RootTramOneComponent, target: ElementOrSelector) => {\n\t/* setup all the internal engines required for tram-one to work */\n\n\t// get the container to mount the app on\n\tconst container = buildContainer(target);\n\n\t// setup the window object to hold stores and queues\n\t// in the future, we may allow this to be customized\n\t// for multiple, sandboxed, instances of Tram-One\n\tsetupTramOneSpace();\n\n\t// setup store for effects\n\tsetupEffectStore(TRAM_EFFECT_STORE);\n\n\t// setup queue for new effects when resolving mounts\n\tsetupEffectStore(TRAM_EFFECT_QUEUE);\n\n\t// setup working key for hooks\n\tsetupWorkingKey(TRAM_HOOK_KEY);\n\n\t// setup observable store for the useStore and useGlobalStore hooks\n\tsetupObservableStore(TRAM_OBSERVABLE_STORE);\n\n\t// setup key store for keeping track of stores to clean up\n\tsetupKeyStore(TRAM_KEY_STORE);\n\n\t// setup key queue for new observable stores when resolving mounts\n\tsetupKeyQueue(TRAM_KEY_QUEUE);\n\n\t// setup key queue for global observable stores when resolving mounts\n\tsetupKeyQueue(TRAM_GLOBAL_KEY_QUEUE);\n\n\t// setup a mutation observer for cleaning up removed elements and triggering effects\n\tsetupMutationObserver(TRAM_MUTATION_OBSERVER);\n\n\t// watch for changes on the target so that we can process node changes\n\tstartWatcher(TRAM_MUTATION_OBSERVER, container);\n\n\t// trigger an initial mount\n\tmount(component, container);\n};\n"],"names":["observe"],"mappings":";;;;AAAA;;;;;;AAMG;AAEI,MAAM,aAAa,GAAG,eAAe,CAAC;AACtC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAC9C,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAC9C,MAAM,cAAc,GAAG,gBAAgB,CAAC;AACxC,MAAM,cAAc,GAAG,gBAAgB,CAAC;AACxC,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AACtD,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AACtD,MAAM,sBAAsB,GAAG,wBAAwB;;ACf9D;;;AAGG;AAIH,MAAM,aAAa,GAAG,MAAiB;;AAEtC,IAAA,MAAM,cAAc,GAAI,MAAgC,CAAC,YAAY,CAAC,CAAC;;;;IAKvE,IAAI,CAAC,cAAc,EAAE;QACpB,MAAM,IAAI,KAAK,CAAC,CAAA;;;AAGf,EAAA,CAAA,CAAC,CAAC;AACH,KAAA;AAED,IAAA,OAAO,MAA+B,CAAC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