-
Notifications
You must be signed in to change notification settings - Fork 0
/
shelter.js.map
7 lines (7 loc) · 471 KB
/
shelter.js.map
1
2
3
4
5
6
7
{
"version": 3,
"sources": ["../../../node_modules/.pnpm/[email protected]/node_modules/spitroast/dist/esm/index.js", "../../../node_modules/.pnpm/[email protected]/node_modules/spitroast/dist/esm/shared.js", "../../../node_modules/.pnpm/[email protected]/node_modules/spitroast/dist/esm/hook.js", "../../../node_modules/.pnpm/[email protected]/node_modules/spitroast/dist/esm/unpatch.js", "../../../node_modules/.pnpm/[email protected]/node_modules/spitroast/dist/esm/getPatchFunc.js", "../../../node_modules/.pnpm/[email protected]/node_modules/solid-js/web/dist/web.js", "../../../node_modules/.pnpm/[email protected]/node_modules/solid-js/dist/solid.js", "../../shelter-ui/dist/index.jsx", "../src/util/index.ts", "../src/flux/index.ts", "../src/exfiltrate.ts", "../src/storage.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/idb/build/wrap-idb-value.js", "../../../node_modules/.pnpm/[email protected]/node_modules/idb/build/index.js", "../src/flux/dispatchLogger.ts", "../src/http.ts", "../src/observer.ts", "../src/react.ts", "../src/bridges.tsx", "../src/components/Settings.tsx.scss", "../../../node_modules/.pnpm/[email protected]/node_modules/solid-js/store/dist/store.js", "../src/devmode/devmode.css", "../src/components/DevUI.tsx", "../src/devmode/index.tsx", "../src/plugins.tsx", "../src/components/Plugins.tsx.scss", "../src/components/PluginEditModal.tsx", "../../../node_modules/.pnpm/[email protected]/node_modules/fuse.js/dist/fuse.mjs", "../src/components/Plugins.tsx", "../src/components/Settings.tsx", "../src/settings.tsx", "../src/util/scopedApi.ts", "../../../node_modules/.pnpm/[email protected]/node_modules/solid-js/h/dist/h.js", "../../../node_modules/.pnpm/[email protected]/node_modules/htm/mini/index.module.js", "../src/windowApi.ts", "../src/modalFix.ts", "../src/index.ts"],
"sourcesContent": ["import getPatchFunc from \"./getPatchFunc.js\";\nimport { unpatchAll } from \"./unpatch.js\";\nconst before = getPatchFunc(\"b\");\nconst instead = getPatchFunc(\"i\");\nconst after = getPatchFunc(\"a\");\nexport { instead, before, after, unpatchAll };\n", "// we use this array multiple times\nexport const patchTypes = [\"a\", \"b\", \"i\"];\nexport const patchedObjects = new Map();\n", "// calls relevant patches and returns the final result\nimport { patchedObjects } from \"./shared.js\";\nexport default function (funcName, funcParent, funcArgs, \n// the value of `this` to apply\nctxt, \n// if true, the function is actually constructor\nisConstruct) {\n const patch = patchedObjects.get(funcParent)?.[funcName];\n // This is in the event that this function is being called after all patches are removed.\n if (!patch)\n return isConstruct\n ? Reflect.construct(funcParent[funcName], funcArgs, ctxt)\n : funcParent[funcName].apply(ctxt, funcArgs);\n // Before patches\n for (const hook of patch.b.values()) {\n const maybefuncArgs = hook.call(ctxt, funcArgs);\n if (Array.isArray(maybefuncArgs))\n funcArgs = maybefuncArgs;\n }\n // Instead patches\n let workingRetVal = [...patch.i.values()].reduce((prev, current) => (...args) => current.call(ctxt, args, prev), \n // This calls the original function\n (...args) => isConstruct\n ? Reflect.construct(patch.o, args, ctxt)\n : patch.o.apply(ctxt, args))(...funcArgs);\n // After patches\n for (const hook of patch.a.values())\n workingRetVal = hook.call(ctxt, funcArgs, workingRetVal) ?? workingRetVal;\n return workingRetVal;\n}\n", "import { patchedObjects, patchTypes } from \"./shared.js\";\nexport function unpatch(funcParent, funcName, hookId, type) {\n const patchedObject = patchedObjects.get(funcParent);\n const patch = patchedObject?.[funcName];\n if (!patch?.[type].has(hookId))\n return false;\n patch[type].delete(hookId);\n // If there are no more hooks for every type, remove the patch\n if (patchTypes.every((t) => patch[t].size === 0)) {\n // reflect defineproperty is like object defineproperty\n // but instead of erroring it returns if it worked or not.\n // this is more easily minifiable, hence its use. -- sink\n const success = Reflect.defineProperty(funcParent, funcName, {\n value: patch.o,\n writable: true,\n configurable: true,\n });\n if (!success)\n funcParent[funcName] = patch.o;\n delete patchedObject[funcName];\n }\n if (Object.keys(patchedObject).length == 0)\n patchedObjects.delete(funcParent);\n return true;\n}\nexport function unpatchAll() {\n for (const [parentObject, patchedObject] of patchedObjects.entries())\n for (const funcName in patchedObject)\n for (const hookType of patchTypes)\n for (const hookId of patchedObject[funcName]?.[hookType].keys() ?? [])\n unpatch(parentObject, funcName, hookId, hookType);\n}\n", "// curried - getPatchFunc(\"before\")(...)\n// allows us to apply an argument while leaving the rest open much cleaner.\n// functional programming strikes again! -- sink\nimport hook from \"./hook.js\";\nimport { patchedObjects } from \"./shared.js\";\nimport { unpatch } from \"./unpatch.js\";\n// creates a hook if needed, else just adds one to the patches array\nexport default (patchType) => (funcName, funcParent, callback, oneTime = false) => {\n if (typeof funcParent[funcName] !== \"function\")\n throw new Error(`${funcName} is not a function in ${funcParent.constructor.name}`);\n if (!patchedObjects.has(funcParent))\n patchedObjects.set(funcParent, Object.create(null));\n const parentInjections = patchedObjects.get(funcParent);\n if (!parentInjections[funcName]) {\n const origFunc = funcParent[funcName];\n // note to future me optimising for size: extracting new Map() to a func increases size --sink\n parentInjections[funcName] = {\n o: origFunc,\n b: new Map(),\n i: new Map(),\n a: new Map(),\n };\n const runHook = (ctxt, args, construct) => {\n const ret = hook(funcName, funcParent, args, ctxt, construct);\n if (oneTime)\n unpatchThisPatch();\n return ret;\n };\n const replaceProxy = new Proxy(origFunc, {\n apply: (_, ctxt, args) => runHook(ctxt, args, false),\n construct: (_, args) => runHook(origFunc, args, true),\n get: (target, prop, receiver) => prop == \"toString\"\n ? origFunc.toString.bind(origFunc)\n : Reflect.get(target, prop, receiver),\n });\n // this works around breaking some async find implementation which listens for assigns via proxy\n // see comment in unpatch.ts\n const success = Reflect.defineProperty(funcParent, funcName, {\n value: replaceProxy,\n configurable: true,\n writable: true,\n });\n if (!success)\n funcParent[funcName] = replaceProxy;\n }\n const hookId = Symbol();\n const unpatchThisPatch = () => unpatch(funcParent, funcName, hookId, patchType);\n parentInjections[funcName][patchType].set(hookId, callback);\n return unpatchThisPatch;\n};\n", "import { createRoot, createRenderEffect, sharedConfig, untrack, enableHydration, createMemo, createSignal, onMount, onCleanup, splitProps, $DEVCOMP } from 'solid-js';\nexport { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, createMemo as memo, mergeProps, untrack } from 'solid-js';\n\nconst booleans = [\"allowfullscreen\", \"async\", \"autofocus\", \"autoplay\", \"checked\", \"controls\", \"default\", \"disabled\", \"formnovalidate\", \"hidden\", \"indeterminate\", \"ismap\", \"loop\", \"multiple\", \"muted\", \"nomodule\", \"novalidate\", \"open\", \"playsinline\", \"readonly\", \"required\", \"reversed\", \"seamless\", \"selected\"];\nconst Properties = /*#__PURE__*/new Set([\"className\", \"value\", \"readOnly\", \"formNoValidate\", \"isMap\", \"noModule\", \"playsInline\", ...booleans]);\nconst ChildProperties = /*#__PURE__*/new Set([\"innerHTML\", \"textContent\", \"innerText\", \"children\"]);\nconst Aliases = /*#__PURE__*/Object.assign(Object.create(null), {\n className: \"class\",\n htmlFor: \"for\"\n});\nconst PropAliases = /*#__PURE__*/Object.assign(Object.create(null), {\n class: \"className\",\n formnovalidate: \"formNoValidate\",\n ismap: \"isMap\",\n nomodule: \"noModule\",\n playsinline: \"playsInline\",\n readonly: \"readOnly\"\n});\nconst DelegatedEvents = /*#__PURE__*/new Set([\"beforeinput\", \"click\", \"dblclick\", \"contextmenu\", \"focusin\", \"focusout\", \"input\", \"keydown\", \"keyup\", \"mousedown\", \"mousemove\", \"mouseout\", \"mouseover\", \"mouseup\", \"pointerdown\", \"pointermove\", \"pointerout\", \"pointerover\", \"pointerup\", \"touchend\", \"touchmove\", \"touchstart\"]);\nconst SVGElements = /*#__PURE__*/new Set([\n\"altGlyph\", \"altGlyphDef\", \"altGlyphItem\", \"animate\", \"animateColor\", \"animateMotion\", \"animateTransform\", \"circle\", \"clipPath\", \"color-profile\", \"cursor\", \"defs\", \"desc\", \"ellipse\", \"feBlend\", \"feColorMatrix\", \"feComponentTransfer\", \"feComposite\", \"feConvolveMatrix\", \"feDiffuseLighting\", \"feDisplacementMap\", \"feDistantLight\", \"feFlood\", \"feFuncA\", \"feFuncB\", \"feFuncG\", \"feFuncR\", \"feGaussianBlur\", \"feImage\", \"feMerge\", \"feMergeNode\", \"feMorphology\", \"feOffset\", \"fePointLight\", \"feSpecularLighting\", \"feSpotLight\", \"feTile\", \"feTurbulence\", \"filter\", \"font\", \"font-face\", \"font-face-format\", \"font-face-name\", \"font-face-src\", \"font-face-uri\", \"foreignObject\", \"g\", \"glyph\", \"glyphRef\", \"hkern\", \"image\", \"line\", \"linearGradient\", \"marker\", \"mask\", \"metadata\", \"missing-glyph\", \"mpath\", \"path\", \"pattern\", \"polygon\", \"polyline\", \"radialGradient\", \"rect\",\n\"set\", \"stop\",\n\"svg\", \"switch\", \"symbol\", \"text\", \"textPath\",\n\"tref\", \"tspan\", \"use\", \"view\", \"vkern\"]);\nconst SVGNamespace = {\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\"\n};\nconst DOMElements = /*#__PURE__*/new Set([\"html\", \"base\", \"head\", \"link\", \"meta\", \"style\", \"title\", \"body\", \"address\", \"article\", \"aside\", \"footer\", \"header\", \"main\", \"nav\", \"section\", \"body\", \"blockquote\", \"dd\", \"div\", \"dl\", \"dt\", \"figcaption\", \"figure\", \"hr\", \"li\", \"ol\", \"p\", \"pre\", \"ul\", \"a\", \"abbr\", \"b\", \"bdi\", \"bdo\", \"br\", \"cite\", \"code\", \"data\", \"dfn\", \"em\", \"i\", \"kbd\", \"mark\", \"q\", \"rp\", \"rt\", \"ruby\", \"s\", \"samp\", \"small\", \"span\", \"strong\", \"sub\", \"sup\", \"time\", \"u\", \"var\", \"wbr\", \"area\", \"audio\", \"img\", \"map\", \"track\", \"video\", \"embed\", \"iframe\", \"object\", \"param\", \"picture\", \"portal\", \"source\", \"svg\", \"math\", \"canvas\", \"noscript\", \"script\", \"del\", \"ins\", \"caption\", \"col\", \"colgroup\", \"table\", \"tbody\", \"td\", \"tfoot\", \"th\", \"thead\", \"tr\", \"button\", \"datalist\", \"fieldset\", \"form\", \"input\", \"label\", \"legend\", \"meter\", \"optgroup\", \"option\", \"output\", \"progress\", \"select\", \"textarea\", \"details\", \"dialog\", \"menu\", \"summary\", \"details\", \"slot\", \"template\", \"acronym\", \"applet\", \"basefont\", \"bgsound\", \"big\", \"blink\", \"center\", \"content\", \"dir\", \"font\", \"frame\", \"frameset\", \"hgroup\", \"image\", \"keygen\", \"marquee\", \"menuitem\", \"nobr\", \"noembed\", \"noframes\", \"plaintext\", \"rb\", \"rtc\", \"shadow\", \"spacer\", \"strike\", \"tt\", \"xmp\", \"a\", \"abbr\", \"acronym\", \"address\", \"applet\", \"area\", \"article\", \"aside\", \"audio\", \"b\", \"base\", \"basefont\", \"bdi\", \"bdo\", \"bgsound\", \"big\", \"blink\", \"blockquote\", \"body\", \"br\", \"button\", \"canvas\", \"caption\", \"center\", \"cite\", \"code\", \"col\", \"colgroup\", \"content\", \"data\", \"datalist\", \"dd\", \"del\", \"details\", \"dfn\", \"dialog\", \"dir\", \"div\", \"dl\", \"dt\", \"em\", \"embed\", \"fieldset\", \"figcaption\", \"figure\", \"font\", \"footer\", \"form\", \"frame\", \"frameset\", \"head\", \"header\", \"hgroup\", \"hr\", \"html\", \"i\", \"iframe\", \"image\", \"img\", \"input\", \"ins\", \"kbd\", \"keygen\", \"label\", \"legend\", \"li\", \"link\", \"main\", \"map\", \"mark\", \"marquee\", \"menu\", \"menuitem\", \"meta\", \"meter\", \"nav\", \"nobr\", \"noembed\", \"noframes\", \"noscript\", \"object\", \"ol\", \"optgroup\", \"option\", \"output\", \"p\", \"param\", \"picture\", \"plaintext\", \"portal\", \"pre\", \"progress\", \"q\", \"rb\", \"rp\", \"rt\", \"rtc\", \"ruby\", \"s\", \"samp\", \"script\", \"section\", \"select\", \"shadow\", \"slot\", \"small\", \"source\", \"spacer\", \"span\", \"strike\", \"strong\", \"style\", \"sub\", \"summary\", \"sup\", \"table\", \"tbody\", \"td\", \"template\", \"textarea\", \"tfoot\", \"th\", \"thead\", \"time\", \"title\", \"tr\", \"track\", \"tt\", \"u\", \"ul\", \"var\", \"video\", \"wbr\", \"xmp\", \"input\"]);\n\nfunction reconcileArrays(parentNode, a, b) {\n let bLength = b.length,\n aEnd = a.length,\n bEnd = bLength,\n aStart = 0,\n bStart = 0,\n after = a[aEnd - 1].nextSibling,\n map = null;\n while (aStart < aEnd || bStart < bEnd) {\n if (a[aStart] === b[bStart]) {\n aStart++;\n bStart++;\n continue;\n }\n while (a[aEnd - 1] === b[bEnd - 1]) {\n aEnd--;\n bEnd--;\n }\n if (aEnd === aStart) {\n const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;\n while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);\n } else if (bEnd === bStart) {\n while (aStart < aEnd) {\n if (!map || !map.has(a[aStart])) a[aStart].remove();\n aStart++;\n }\n } else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {\n const node = a[--aEnd].nextSibling;\n parentNode.insertBefore(b[bStart++], a[aStart++].nextSibling);\n parentNode.insertBefore(b[--bEnd], node);\n a[aEnd] = b[bEnd];\n } else {\n if (!map) {\n map = new Map();\n let i = bStart;\n while (i < bEnd) map.set(b[i], i++);\n }\n const index = map.get(a[aStart]);\n if (index != null) {\n if (bStart < index && index < bEnd) {\n let i = aStart,\n sequence = 1,\n t;\n while (++i < aEnd && i < bEnd) {\n if ((t = map.get(a[i])) == null || t !== index + sequence) break;\n sequence++;\n }\n if (sequence > index - bStart) {\n const node = a[aStart];\n while (bStart < index) parentNode.insertBefore(b[bStart++], node);\n } else parentNode.replaceChild(b[bStart++], a[aStart++]);\n } else aStart++;\n } else a[aStart++].remove();\n }\n }\n}\n\nconst $$EVENTS = \"_$DX_DELEGATE\";\nfunction render(code, element, init, options = {}) {\n let disposer;\n createRoot(dispose => {\n disposer = dispose;\n element === document ? code() : insert(element, code(), element.firstChild ? null : undefined, init);\n }, options.owner);\n return () => {\n disposer();\n element.textContent = \"\";\n };\n}\nfunction template(html, check, isSVG) {\n const t = document.createElement(\"template\");\n t.innerHTML = html;\n if (check && t.innerHTML.split(\"<\").length - 1 !== check) throw `The browser resolved template HTML does not match JSX input:\\n${t.innerHTML}\\n\\n${html}. Is your HTML properly formed?`;\n let node = t.content.firstChild;\n if (isSVG) node = node.firstChild;\n return node;\n}\nfunction delegateEvents(eventNames, document = window.document) {\n const e = document[$$EVENTS] || (document[$$EVENTS] = new Set());\n for (let i = 0, l = eventNames.length; i < l; i++) {\n const name = eventNames[i];\n if (!e.has(name)) {\n e.add(name);\n document.addEventListener(name, eventHandler);\n }\n }\n}\nfunction clearDelegatedEvents(document = window.document) {\n if (document[$$EVENTS]) {\n for (let name of document[$$EVENTS].keys()) document.removeEventListener(name, eventHandler);\n delete document[$$EVENTS];\n }\n}\nfunction setAttribute(node, name, value) {\n if (value == null) node.removeAttribute(name);else node.setAttribute(name, value);\n}\nfunction setAttributeNS(node, namespace, name, value) {\n if (value == null) node.removeAttributeNS(namespace, name);else node.setAttributeNS(namespace, name, value);\n}\nfunction className(node, value) {\n if (value == null) node.removeAttribute(\"class\");else node.className = value;\n}\nfunction addEventListener(node, name, handler, delegate) {\n if (delegate) {\n if (Array.isArray(handler)) {\n node[`$$${name}`] = handler[0];\n node[`$$${name}Data`] = handler[1];\n } else node[`$$${name}`] = handler;\n } else if (Array.isArray(handler)) {\n const handlerFn = handler[0];\n node.addEventListener(name, handler[0] = e => handlerFn.call(node, handler[1], e));\n } else node.addEventListener(name, handler);\n}\nfunction classList(node, value, prev = {}) {\n const classKeys = Object.keys(value || {}),\n prevKeys = Object.keys(prev);\n let i, len;\n for (i = 0, len = prevKeys.length; i < len; i++) {\n const key = prevKeys[i];\n if (!key || key === \"undefined\" || value[key]) continue;\n toggleClassKey(node, key, false);\n delete prev[key];\n }\n for (i = 0, len = classKeys.length; i < len; i++) {\n const key = classKeys[i],\n classValue = !!value[key];\n if (!key || key === \"undefined\" || prev[key] === classValue || !classValue) continue;\n toggleClassKey(node, key, true);\n prev[key] = classValue;\n }\n return prev;\n}\nfunction style(node, value, prev) {\n if (!value) return prev ? setAttribute(node, \"style\") : value;\n const nodeStyle = node.style;\n if (typeof value === \"string\") return nodeStyle.cssText = value;\n typeof prev === \"string\" && (nodeStyle.cssText = prev = undefined);\n prev || (prev = {});\n value || (value = {});\n let v, s;\n for (s in prev) {\n value[s] == null && nodeStyle.removeProperty(s);\n delete prev[s];\n }\n for (s in value) {\n v = value[s];\n if (v !== prev[s]) {\n nodeStyle.setProperty(s, v);\n prev[s] = v;\n }\n }\n return prev;\n}\nfunction spread(node, props = {}, isSVG, skipChildren) {\n const prevProps = {};\n if (!skipChildren) {\n createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));\n }\n createRenderEffect(() => props.ref && props.ref(node));\n createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));\n return prevProps;\n}\nfunction dynamicProperty(props, key) {\n const src = props[key];\n Object.defineProperty(props, key, {\n get() {\n return src();\n },\n enumerable: true\n });\n return props;\n}\nfunction innerHTML(parent, content) {\n !sharedConfig.context && (parent.innerHTML = content);\n}\nfunction use(fn, element, arg) {\n return untrack(() => fn(element, arg));\n}\nfunction insert(parent, accessor, marker, initial) {\n if (marker !== undefined && !initial) initial = [];\n if (typeof accessor !== \"function\") return insertExpression(parent, accessor, initial, marker);\n createRenderEffect(current => insertExpression(parent, accessor(), current, marker), initial);\n}\nfunction assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {\n props || (props = {});\n for (const prop in prevProps) {\n if (!(prop in props)) {\n if (prop === \"children\") continue;\n prevProps[prop] = assignProp(node, prop, null, prevProps[prop], isSVG, skipRef);\n }\n }\n for (const prop in props) {\n if (prop === \"children\") {\n if (!skipChildren) insertExpression(node, props.children);\n continue;\n }\n const value = props[prop];\n prevProps[prop] = assignProp(node, prop, value, prevProps[prop], isSVG, skipRef);\n }\n}\nfunction hydrate$1(code, element, options = {}) {\n sharedConfig.completed = globalThis._$HY.completed;\n sharedConfig.events = globalThis._$HY.events;\n sharedConfig.load = globalThis._$HY.load;\n sharedConfig.gather = root => gatherHydratable(element, root);\n sharedConfig.registry = new Map();\n sharedConfig.context = {\n id: options.renderId || \"\",\n count: 0\n };\n gatherHydratable(element, options.renderId);\n const dispose = render(code, element, [...element.childNodes], options);\n sharedConfig.context = null;\n return dispose;\n}\nfunction getNextElement(template) {\n let node, key;\n if (!sharedConfig.context || !(node = sharedConfig.registry.get(key = getHydrationKey()))) {\n if (sharedConfig.context) console.warn(\"Unable to find DOM nodes for hydration key:\", key);\n if (!template) throw new Error(\"Unrecoverable Hydration Mismatch. No template for key: \" + key);\n return template.cloneNode(true);\n }\n if (sharedConfig.completed) sharedConfig.completed.add(node);\n sharedConfig.registry.delete(key);\n return node;\n}\nfunction getNextMatch(el, nodeName) {\n while (el && el.localName !== nodeName) el = el.nextSibling;\n return el;\n}\nfunction getNextMarker(start) {\n let end = start,\n count = 0,\n current = [];\n if (sharedConfig.context) {\n while (end) {\n if (end.nodeType === 8) {\n const v = end.nodeValue;\n if (v === \"#\") count++;else if (v === \"/\") {\n if (count === 0) return [end, current];\n count--;\n }\n }\n current.push(end);\n end = end.nextSibling;\n }\n }\n return [end, current];\n}\nfunction runHydrationEvents() {\n if (sharedConfig.events && !sharedConfig.events.queued) {\n queueMicrotask(() => {\n const {\n completed,\n events\n } = sharedConfig;\n events.queued = false;\n while (events.length) {\n const [el, e] = events[0];\n if (!completed.has(el)) return;\n eventHandler(e);\n events.shift();\n }\n });\n sharedConfig.events.queued = true;\n }\n}\nfunction toPropertyName(name) {\n return name.toLowerCase().replace(/-([a-z])/g, (_, w) => w.toUpperCase());\n}\nfunction toggleClassKey(node, key, value) {\n const classNames = key.trim().split(/\\s+/);\n for (let i = 0, nameLen = classNames.length; i < nameLen; i++) node.classList.toggle(classNames[i], value);\n}\nfunction assignProp(node, prop, value, prev, isSVG, skipRef) {\n let isCE, isProp, isChildProp;\n if (prop === \"style\") return style(node, value, prev);\n if (prop === \"classList\") return classList(node, value, prev);\n if (value === prev) return prev;\n if (prop === \"ref\") {\n if (!skipRef) value(node);\n } else if (prop.slice(0, 3) === \"on:\") {\n const e = prop.slice(3);\n prev && node.removeEventListener(e, prev);\n value && node.addEventListener(e, value);\n } else if (prop.slice(0, 10) === \"oncapture:\") {\n const e = prop.slice(10);\n prev && node.removeEventListener(e, prev, true);\n value && node.addEventListener(e, value, true);\n } else if (prop.slice(0, 2) === \"on\") {\n const name = prop.slice(2).toLowerCase();\n const delegate = DelegatedEvents.has(name);\n if (!delegate && prev) {\n const h = Array.isArray(prev) ? prev[0] : prev;\n node.removeEventListener(name, h);\n }\n if (delegate || value) {\n addEventListener(node, name, value, delegate);\n delegate && delegateEvents([name]);\n }\n } else if ((isChildProp = ChildProperties.has(prop)) || !isSVG && (PropAliases[prop] || (isProp = Properties.has(prop))) || (isCE = node.nodeName.includes(\"-\"))) {\n if (prop === \"class\" || prop === \"className\") className(node, value);else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;else node[PropAliases[prop] || prop] = value;\n } else {\n const ns = isSVG && prop.indexOf(\":\") > -1 && SVGNamespace[prop.split(\":\")[0]];\n if (ns) setAttributeNS(node, ns, prop, value);else setAttribute(node, Aliases[prop] || prop, value);\n }\n return value;\n}\nfunction eventHandler(e) {\n const key = `$$${e.type}`;\n let node = e.composedPath && e.composedPath()[0] || e.target;\n if (e.target !== node) {\n Object.defineProperty(e, \"target\", {\n configurable: true,\n value: node\n });\n }\n Object.defineProperty(e, \"currentTarget\", {\n configurable: true,\n get() {\n return node || document;\n }\n });\n if (sharedConfig.registry && !sharedConfig.done) sharedConfig.done = _$HY.done = true;\n while (node) {\n const handler = node[key];\n if (handler && !node.disabled) {\n const data = node[`${key}Data`];\n data !== undefined ? handler.call(node, data, e) : handler.call(node, e);\n if (e.cancelBubble) return;\n }\n node = node._$host || node.parentNode || node.host;\n }\n}\nfunction insertExpression(parent, value, current, marker, unwrapArray) {\n if (sharedConfig.context) {\n !current && (current = [...parent.childNodes]);\n let cleaned = [];\n for (let i = 0; i < current.length; i++) {\n const node = current[i];\n if (node.nodeType === 8 && node.data === \"!\") node.remove();else cleaned.push(node);\n }\n current = cleaned;\n }\n while (typeof current === \"function\") current = current();\n if (value === current) return current;\n const t = typeof value,\n multi = marker !== undefined;\n parent = multi && current[0] && current[0].parentNode || parent;\n if (t === \"string\" || t === \"number\") {\n if (sharedConfig.context) return current;\n if (t === \"number\") value = value.toString();\n if (multi) {\n let node = current[0];\n if (node && node.nodeType === 3) {\n node.data = value;\n } else node = document.createTextNode(value);\n current = cleanChildren(parent, current, marker, node);\n } else {\n if (current !== \"\" && typeof current === \"string\") {\n current = parent.firstChild.data = value;\n } else current = parent.textContent = value;\n }\n } else if (value == null || t === \"boolean\") {\n if (sharedConfig.context) return current;\n current = cleanChildren(parent, current, marker);\n } else if (t === \"function\") {\n createRenderEffect(() => {\n let v = value();\n while (typeof v === \"function\") v = v();\n current = insertExpression(parent, v, current, marker);\n });\n return () => current;\n } else if (Array.isArray(value)) {\n const array = [];\n const currentArray = current && Array.isArray(current);\n if (normalizeIncomingArray(array, value, current, unwrapArray)) {\n createRenderEffect(() => current = insertExpression(parent, array, current, marker, true));\n return () => current;\n }\n if (sharedConfig.context) {\n if (!array.length) return current;\n for (let i = 0; i < array.length; i++) {\n if (array[i].parentNode) return current = array;\n }\n }\n if (array.length === 0) {\n current = cleanChildren(parent, current, marker);\n if (multi) return current;\n } else if (currentArray) {\n if (current.length === 0) {\n appendNodes(parent, array, marker);\n } else reconcileArrays(parent, current, array);\n } else {\n current && cleanChildren(parent);\n appendNodes(parent, array);\n }\n current = array;\n } else if (value instanceof Node) {\n if (sharedConfig.context && value.parentNode) return current = multi ? [value] : value;\n if (Array.isArray(current)) {\n if (multi) return current = cleanChildren(parent, current, marker, value);\n cleanChildren(parent, current, null, value);\n } else if (current == null || current === \"\" || !parent.firstChild) {\n parent.appendChild(value);\n } else parent.replaceChild(value, parent.firstChild);\n current = value;\n } else console.warn(`Unrecognized value. Skipped inserting`, value);\n return current;\n}\nfunction normalizeIncomingArray(normalized, array, current, unwrap) {\n let dynamic = false;\n for (let i = 0, len = array.length; i < len; i++) {\n let item = array[i],\n prev = current && current[i];\n if (item instanceof Node) {\n normalized.push(item);\n } else if (item == null || item === true || item === false) ; else if (Array.isArray(item)) {\n dynamic = normalizeIncomingArray(normalized, item, prev) || dynamic;\n } else if ((typeof item) === \"function\") {\n if (unwrap) {\n while (typeof item === \"function\") item = item();\n dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item], Array.isArray(prev) ? prev : [prev]) || dynamic;\n } else {\n normalized.push(item);\n dynamic = true;\n }\n } else {\n const value = String(item);\n if (prev && prev.nodeType === 3) {\n prev.data = value;\n normalized.push(prev);\n } else normalized.push(document.createTextNode(value));\n }\n }\n return dynamic;\n}\nfunction appendNodes(parent, array, marker = null) {\n for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);\n}\nfunction cleanChildren(parent, current, marker, replacement) {\n if (marker === undefined) return parent.textContent = \"\";\n const node = replacement || document.createTextNode(\"\");\n if (current.length) {\n let inserted = false;\n for (let i = current.length - 1; i >= 0; i--) {\n const el = current[i];\n if (node !== el) {\n const isParent = el.parentNode === parent;\n if (!inserted && !i) isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);else isParent && el.remove();\n } else inserted = true;\n }\n } else parent.insertBefore(node, marker);\n return [node];\n}\nfunction gatherHydratable(element, root) {\n const templates = element.querySelectorAll(`*[data-hk]`);\n for (let i = 0; i < templates.length; i++) {\n const node = templates[i];\n const key = node.getAttribute(\"data-hk\");\n if ((!root || key.startsWith(root)) && !sharedConfig.registry.has(key)) sharedConfig.registry.set(key, node);\n }\n}\nfunction getHydrationKey() {\n const hydrate = sharedConfig.context;\n return `${hydrate.id}${hydrate.count++}`;\n}\nfunction NoHydration(props) {\n return sharedConfig.context ? undefined : props.children;\n}\nfunction Hydration(props) {\n return props.children;\n}\nfunction voidFn() {}\n\nfunction throwInBrowser(func) {\n const err = new Error(`${func.name} is not supported in the browser, returning undefined`);\n console.error(err);\n}\nfunction renderToString(fn, options) {\n throwInBrowser(renderToString);\n}\nfunction renderToStringAsync(fn, options) {\n throwInBrowser(renderToStringAsync);\n}\nfunction renderToStream(fn, options) {\n throwInBrowser(renderToStream);\n}\nfunction ssr(template, ...nodes) {}\nfunction ssrElement(name, props, children, needsId) {}\nfunction ssrClassList(value) {}\nfunction ssrStyle(value) {}\nfunction ssrAttribute(key, value) {}\nfunction ssrHydrationKey() {}\nfunction resolveSSRNode(node) {}\nfunction escape(html) {}\nfunction ssrSpread(props, isSVG, skipChildren) {}\n\nconst isServer = false;\nconst isDev = false;\nconst SVG_NAMESPACE = \"http://www.w3.org/2000/svg\";\nfunction createElement(tagName, isSVG = false) {\n return isSVG ? document.createElementNS(SVG_NAMESPACE, tagName) : document.createElement(tagName);\n}\nconst hydrate = (...args) => {\n enableHydration();\n return hydrate$1(...args);\n};\nfunction Portal(props) {\n const {\n useShadow\n } = props,\n marker = document.createTextNode(\"\"),\n mount = () => props.mount || document.body,\n content = createMemo(renderPortal());\n function renderPortal() {\n if (sharedConfig.context) {\n const [s, set] = createSignal(false);\n onMount(() => set(true));\n return () => s() && props.children;\n } else return () => props.children;\n }\n createRenderEffect(() => {\n const el = mount();\n if (el instanceof HTMLHeadElement) {\n const [clean, setClean] = createSignal(false);\n const cleanup = () => setClean(true);\n createRoot(dispose => insert(el, () => !clean() ? content() : dispose(), null));\n onCleanup(() => {\n if (sharedConfig.context) queueMicrotask(cleanup);else cleanup();\n });\n } else {\n const container = createElement(props.isSVG ? \"g\" : \"div\", props.isSVG),\n renderRoot = useShadow && container.attachShadow ? container.attachShadow({\n mode: \"open\"\n }) : container;\n Object.defineProperty(container, \"_$host\", {\n get() {\n return marker.parentNode;\n },\n configurable: true\n });\n insert(renderRoot, content);\n el.appendChild(container);\n props.ref && props.ref(container);\n onCleanup(() => el.removeChild(container));\n }\n });\n return marker;\n}\nfunction Dynamic(props) {\n const [p, others] = splitProps(props, [\"component\"]);\n const cached = createMemo(() => p.component);\n return createMemo(() => {\n const component = cached();\n switch (typeof component) {\n case \"function\":\n Object.assign(component, {\n [$DEVCOMP]: true\n });\n return untrack(() => component(others));\n case \"string\":\n const isSvg = SVGElements.has(component);\n const el = sharedConfig.context ? getNextElement() : createElement(component, isSvg);\n spread(el, others, isSvg);\n return el;\n }\n });\n}\n\nexport { Aliases, voidFn as Assets, ChildProperties, DOMElements, DelegatedEvents, Dynamic, Hydration, voidFn as HydrationScript, NoHydration, Portal, PropAliases, Properties, SVGElements, SVGNamespace, addEventListener, assign, classList, className, clearDelegatedEvents, delegateEvents, dynamicProperty, escape, voidFn as generateHydrationScript, voidFn as getAssets, getHydrationKey, getNextElement, getNextMarker, getNextMatch, hydrate, innerHTML, insert, isDev, isServer, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrSpread, ssrStyle, style, template, use, voidFn as useAssets };\n", "let taskIdCounter = 1,\n isCallbackScheduled = false,\n isPerformingWork = false,\n taskQueue = [],\n currentTask = null,\n shouldYieldToHost = null,\n yieldInterval = 5,\n deadline = 0,\n maxYieldInterval = 300,\n scheduleCallback = null,\n scheduledCallback = null;\nconst maxSigned31BitInt = 1073741823;\nfunction setupScheduler() {\n const channel = new MessageChannel(),\n port = channel.port2;\n scheduleCallback = () => port.postMessage(null);\n channel.port1.onmessage = () => {\n if (scheduledCallback !== null) {\n const currentTime = performance.now();\n deadline = currentTime + yieldInterval;\n const hasTimeRemaining = true;\n try {\n const hasMoreWork = scheduledCallback(hasTimeRemaining, currentTime);\n if (!hasMoreWork) {\n scheduledCallback = null;\n } else port.postMessage(null);\n } catch (error) {\n port.postMessage(null);\n throw error;\n }\n }\n };\n if (navigator && navigator.scheduling && navigator.scheduling.isInputPending) {\n const scheduling = navigator.scheduling;\n shouldYieldToHost = () => {\n const currentTime = performance.now();\n if (currentTime >= deadline) {\n if (scheduling.isInputPending()) {\n return true;\n }\n return currentTime >= maxYieldInterval;\n } else {\n return false;\n }\n };\n } else {\n shouldYieldToHost = () => performance.now() >= deadline;\n }\n}\nfunction enqueue(taskQueue, task) {\n function findIndex() {\n let m = 0;\n let n = taskQueue.length - 1;\n while (m <= n) {\n const k = n + m >> 1;\n const cmp = task.expirationTime - taskQueue[k].expirationTime;\n if (cmp > 0) m = k + 1;else if (cmp < 0) n = k - 1;else return k;\n }\n return m;\n }\n taskQueue.splice(findIndex(), 0, task);\n}\nfunction requestCallback(fn, options) {\n if (!scheduleCallback) setupScheduler();\n let startTime = performance.now(),\n timeout = maxSigned31BitInt;\n if (options && options.timeout) timeout = options.timeout;\n const newTask = {\n id: taskIdCounter++,\n fn,\n startTime,\n expirationTime: startTime + timeout\n };\n enqueue(taskQueue, newTask);\n if (!isCallbackScheduled && !isPerformingWork) {\n isCallbackScheduled = true;\n scheduledCallback = flushWork;\n scheduleCallback();\n }\n return newTask;\n}\nfunction cancelCallback(task) {\n task.fn = null;\n}\nfunction flushWork(hasTimeRemaining, initialTime) {\n isCallbackScheduled = false;\n isPerformingWork = true;\n try {\n return workLoop(hasTimeRemaining, initialTime);\n } finally {\n currentTask = null;\n isPerformingWork = false;\n }\n}\nfunction workLoop(hasTimeRemaining, initialTime) {\n let currentTime = initialTime;\n currentTask = taskQueue[0] || null;\n while (currentTask !== null) {\n if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) {\n break;\n }\n const callback = currentTask.fn;\n if (callback !== null) {\n currentTask.fn = null;\n const didUserCallbackTimeout = currentTask.expirationTime <= currentTime;\n callback(didUserCallbackTimeout);\n currentTime = performance.now();\n if (currentTask === taskQueue[0]) {\n taskQueue.shift();\n }\n } else taskQueue.shift();\n currentTask = taskQueue[0] || null;\n }\n return currentTask !== null;\n}\n\nconst sharedConfig = {};\nfunction setHydrateContext(context) {\n sharedConfig.context = context;\n}\nfunction nextHydrateContext() {\n return {\n ...sharedConfig.context,\n id: `${sharedConfig.context.id}${sharedConfig.context.count++}-`,\n count: 0\n };\n}\n\nconst equalFn = (a, b) => a === b;\nconst $PROXY = Symbol(\"solid-proxy\");\nconst $TRACK = Symbol(\"solid-track\");\nconst $DEVCOMP = Symbol(\"solid-dev-component\");\nconst signalOptions = {\n equals: equalFn\n};\nlet ERROR = null;\nlet runEffects = runQueue;\nconst STALE = 1;\nconst PENDING = 2;\nconst UNOWNED = {\n owned: null,\n cleanups: null,\n context: null,\n owner: null\n};\nconst NO_INIT = {};\nvar Owner = null;\nlet Transition = null;\nlet Scheduler = null;\nlet ExternalSourceFactory = null;\nlet Listener = null;\nlet Updates = null;\nlet Effects = null;\nlet ExecCount = 0;\nconst [transPending, setTransPending] = /*@__PURE__*/createSignal(false);\nfunction createRoot(fn, detachedOwner) {\n const listener = Listener,\n owner = Owner,\n unowned = fn.length === 0,\n root = unowned ? UNOWNED : {\n owned: null,\n cleanups: null,\n context: null,\n owner: detachedOwner === undefined ? owner : detachedOwner\n },\n updateFn = unowned ? fn : () => fn(() => untrack(() => cleanNode(root)));\n Owner = root;\n Listener = null;\n try {\n return runUpdates(updateFn, true);\n } finally {\n Listener = listener;\n Owner = owner;\n }\n}\nfunction createSignal(value, options) {\n options = options ? Object.assign({}, signalOptions, options) : signalOptions;\n const s = {\n value,\n observers: null,\n observerSlots: null,\n comparator: options.equals || undefined\n };\n const setter = value => {\n if (typeof value === \"function\") {\n if (Transition && Transition.running && Transition.sources.has(s)) value = value(s.tValue);else value = value(s.value);\n }\n return writeSignal(s, value);\n };\n return [readSignal.bind(s), setter];\n}\nfunction createComputed(fn, value, options) {\n const c = createComputation(fn, value, true, STALE);\n if (Scheduler && Transition && Transition.running) Updates.push(c);else updateComputation(c);\n}\nfunction createRenderEffect(fn, value, options) {\n const c = createComputation(fn, value, false, STALE);\n if (Scheduler && Transition && Transition.running) Updates.push(c);else updateComputation(c);\n}\nfunction createEffect(fn, value, options) {\n runEffects = runUserEffects;\n const c = createComputation(fn, value, false, STALE),\n s = SuspenseContext && lookup(Owner, SuspenseContext.id);\n if (s) c.suspense = s;\n c.user = true;\n Effects ? Effects.push(c) : updateComputation(c);\n}\nfunction createReaction(onInvalidate, options) {\n let fn;\n const c = createComputation(() => {\n fn ? fn() : untrack(onInvalidate);\n fn = undefined;\n }, undefined, false, 0),\n s = SuspenseContext && lookup(Owner, SuspenseContext.id);\n if (s) c.suspense = s;\n c.user = true;\n return tracking => {\n fn = tracking;\n updateComputation(c);\n };\n}\nfunction createMemo(fn, value, options) {\n options = options ? Object.assign({}, signalOptions, options) : signalOptions;\n const c = createComputation(fn, value, true, 0);\n c.observers = null;\n c.observerSlots = null;\n c.comparator = options.equals || undefined;\n if (Scheduler && Transition && Transition.running) {\n c.tState = STALE;\n Updates.push(c);\n } else updateComputation(c);\n return readSignal.bind(c);\n}\nfunction createResource(pSource, pFetcher, pOptions) {\n let source;\n let fetcher;\n let options;\n if (arguments.length === 2 && typeof pFetcher === \"object\" || arguments.length === 1) {\n source = true;\n fetcher = pSource;\n options = pFetcher || {};\n } else {\n source = pSource;\n fetcher = pFetcher;\n options = pOptions || {};\n }\n let pr = null,\n initP = NO_INIT,\n id = null,\n loadedUnderTransition = false,\n scheduled = false,\n resolved = (\"initialValue\" in options),\n dynamic = typeof source === \"function\" && createMemo(source);\n const contexts = new Set(),\n [value, setValue] = (options.storage || createSignal)(options.initialValue),\n [error, setError] = createSignal(undefined),\n [track, trigger] = createSignal(undefined, {\n equals: false\n }),\n [state, setState] = createSignal(resolved ? \"ready\" : \"unresolved\");\n if (sharedConfig.context) {\n id = `${sharedConfig.context.id}${sharedConfig.context.count++}`;\n let v;\n if (options.ssrLoadFrom === \"initial\") initP = options.initialValue;else if (sharedConfig.load && (v = sharedConfig.load(id))) initP = v[0];\n }\n function loadEnd(p, v, error, key) {\n if (pr === p) {\n pr = null;\n resolved = true;\n if ((p === initP || v === initP) && options.onHydrated) queueMicrotask(() => options.onHydrated(key, {\n value: v\n }));\n initP = NO_INIT;\n if (Transition && p && loadedUnderTransition) {\n Transition.promises.delete(p);\n loadedUnderTransition = false;\n runUpdates(() => {\n Transition.running = true;\n completeLoad(v, error);\n }, false);\n } else completeLoad(v, error);\n }\n return v;\n }\n function completeLoad(v, err) {\n runUpdates(() => {\n if (err === undefined) setValue(() => v);\n setState(err !== undefined ? \"errored\" : \"ready\");\n setError(err);\n for (const c of contexts.keys()) c.decrement();\n contexts.clear();\n }, false);\n }\n function read() {\n const c = SuspenseContext && lookup(Owner, SuspenseContext.id),\n v = value(),\n err = error();\n if (err !== undefined && !pr) throw err;\n if (Listener && !Listener.user && c) {\n createComputed(() => {\n track();\n if (pr) {\n if (c.resolved && Transition && loadedUnderTransition) Transition.promises.add(pr);else if (!contexts.has(c)) {\n c.increment();\n contexts.add(c);\n }\n }\n });\n }\n return v;\n }\n function load(refetching = true) {\n if (refetching !== false && scheduled) return;\n scheduled = false;\n const lookup = dynamic ? dynamic() : source;\n loadedUnderTransition = Transition && Transition.running;\n if (lookup == null || lookup === false) {\n loadEnd(pr, untrack(value));\n return;\n }\n if (Transition && pr) Transition.promises.delete(pr);\n const p = initP !== NO_INIT ? initP : untrack(() => fetcher(lookup, {\n value: value(),\n refetching\n }));\n if (typeof p !== \"object\" || !(p && \"then\" in p)) {\n loadEnd(pr, p, undefined, lookup);\n return p;\n }\n pr = p;\n scheduled = true;\n queueMicrotask(() => scheduled = false);\n runUpdates(() => {\n setState(resolved ? \"refreshing\" : \"pending\");\n trigger();\n }, false);\n return p.then(v => loadEnd(p, v, undefined, lookup), e => loadEnd(p, undefined, castError(e), lookup));\n }\n Object.defineProperties(read, {\n state: {\n get: () => state()\n },\n error: {\n get: () => error()\n },\n loading: {\n get() {\n const s = state();\n return s === \"pending\" || s === \"refreshing\";\n }\n },\n latest: {\n get() {\n if (!resolved) return read();\n const err = error();\n if (err && !pr) throw err;\n return value();\n }\n }\n });\n if (dynamic) createComputed(() => load(false));else load(false);\n return [read, {\n refetch: load,\n mutate: setValue\n }];\n}\nfunction createDeferred(source, options) {\n let t,\n timeout = options ? options.timeoutMs : undefined;\n const node = createComputation(() => {\n if (!t || !t.fn) t = requestCallback(() => setDeferred(() => node.value), timeout !== undefined ? {\n timeout\n } : undefined);\n return source();\n }, undefined, true);\n const [deferred, setDeferred] = createSignal(node.value, options);\n updateComputation(node);\n setDeferred(() => node.value);\n return deferred;\n}\nfunction createSelector(source, fn = equalFn, options) {\n const subs = new Map();\n const node = createComputation(p => {\n const v = source();\n for (const [key, val] of subs.entries()) if (fn(key, v) !== fn(key, p)) {\n for (const c of val.values()) {\n c.state = STALE;\n if (c.pure) Updates.push(c);else Effects.push(c);\n }\n }\n return v;\n }, undefined, true, STALE);\n updateComputation(node);\n return key => {\n const listener = Listener;\n if (listener) {\n let l;\n if (l = subs.get(key)) l.add(listener);else subs.set(key, l = new Set([listener]));\n onCleanup(() => {\n l.delete(listener);\n !l.size && subs.delete(key);\n });\n }\n return fn(key, Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value);\n };\n}\nfunction batch(fn) {\n return runUpdates(fn, false);\n}\nfunction untrack(fn) {\n if (Listener === null) return fn();\n const listener = Listener;\n Listener = null;\n try {\n return fn();\n } finally {\n Listener = listener;\n }\n}\nfunction on(deps, fn, options) {\n const isArray = Array.isArray(deps);\n let prevInput;\n let defer = options && options.defer;\n return prevValue => {\n let input;\n if (isArray) {\n input = Array(deps.length);\n for (let i = 0; i < deps.length; i++) input[i] = deps[i]();\n } else input = deps();\n if (defer) {\n defer = false;\n return undefined;\n }\n const result = untrack(() => fn(input, prevInput, prevValue));\n prevInput = input;\n return result;\n };\n}\nfunction onMount(fn) {\n createEffect(() => untrack(fn));\n}\nfunction onCleanup(fn) {\n if (Owner === null) ;else if (Owner.cleanups === null) Owner.cleanups = [fn];else Owner.cleanups.push(fn);\n return fn;\n}\nfunction onError(fn) {\n ERROR || (ERROR = Symbol(\"error\"));\n if (Owner === null) ;else if (Owner.context === null) Owner.context = {\n [ERROR]: [fn]\n };else if (!Owner.context[ERROR]) Owner.context[ERROR] = [fn];else Owner.context[ERROR].push(fn);\n}\nfunction getListener() {\n return Listener;\n}\nfunction getOwner() {\n return Owner;\n}\nfunction runWithOwner(o, fn) {\n const prev = Owner;\n const prevListener = Listener;\n Owner = o;\n Listener = null;\n try {\n return runUpdates(fn, true);\n } catch (err) {\n handleError(err);\n } finally {\n Owner = prev;\n Listener = prevListener;\n }\n}\nfunction enableScheduling(scheduler = requestCallback) {\n Scheduler = scheduler;\n}\nfunction startTransition(fn) {\n if (Transition && Transition.running) {\n fn();\n return Transition.done;\n }\n const l = Listener;\n const o = Owner;\n return Promise.resolve().then(() => {\n Listener = l;\n Owner = o;\n let t;\n if (Scheduler || SuspenseContext) {\n t = Transition || (Transition = {\n sources: new Set(),\n effects: [],\n promises: new Set(),\n disposed: new Set(),\n queue: new Set(),\n running: true\n });\n t.done || (t.done = new Promise(res => t.resolve = res));\n t.running = true;\n }\n runUpdates(fn, false);\n Listener = Owner = null;\n return t ? t.done : undefined;\n });\n}\nfunction useTransition() {\n return [transPending, startTransition];\n}\nfunction resumeEffects(e) {\n Effects.push.apply(Effects, e);\n e.length = 0;\n}\nfunction createContext(defaultValue, options) {\n const id = Symbol(\"context\");\n return {\n id,\n Provider: createProvider(id),\n defaultValue\n };\n}\nfunction useContext(context) {\n let ctx;\n return (ctx = lookup(Owner, context.id)) !== undefined ? ctx : context.defaultValue;\n}\nfunction children(fn) {\n const children = createMemo(fn);\n const memo = createMemo(() => resolveChildren(children()));\n memo.toArray = () => {\n const c = memo();\n return Array.isArray(c) ? c : c != null ? [c] : [];\n };\n return memo;\n}\nlet SuspenseContext;\nfunction getSuspenseContext() {\n return SuspenseContext || (SuspenseContext = createContext({}));\n}\nfunction enableExternalSource(factory) {\n if (ExternalSourceFactory) {\n const oldFactory = ExternalSourceFactory;\n ExternalSourceFactory = (fn, trigger) => {\n const oldSource = oldFactory(fn, trigger);\n const source = factory(x => oldSource.track(x), trigger);\n return {\n track: x => source.track(x),\n dispose() {\n source.dispose();\n oldSource.dispose();\n }\n };\n };\n } else {\n ExternalSourceFactory = factory;\n }\n}\nfunction readSignal() {\n const runningTransition = Transition && Transition.running;\n if (this.sources && (!runningTransition && this.state || runningTransition && this.tState)) {\n if (!runningTransition && this.state === STALE || runningTransition && this.tState === STALE) updateComputation(this);else {\n const updates = Updates;\n Updates = null;\n runUpdates(() => lookUpstream(this), false);\n Updates = updates;\n }\n }\n if (Listener) {\n const sSlot = this.observers ? this.observers.length : 0;\n if (!Listener.sources) {\n Listener.sources = [this];\n Listener.sourceSlots = [sSlot];\n } else {\n Listener.sources.push(this);\n Listener.sourceSlots.push(sSlot);\n }\n if (!this.observers) {\n this.observers = [Listener];\n this.observerSlots = [Listener.sources.length - 1];\n } else {\n this.observers.push(Listener);\n this.observerSlots.push(Listener.sources.length - 1);\n }\n }\n if (runningTransition && Transition.sources.has(this)) return this.tValue;\n return this.value;\n}\nfunction writeSignal(node, value, isComp) {\n let current = Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value;\n if (!node.comparator || !node.comparator(current, value)) {\n if (Transition) {\n const TransitionRunning = Transition.running;\n if (TransitionRunning || !isComp && Transition.sources.has(node)) {\n Transition.sources.add(node);\n node.tValue = value;\n }\n if (!TransitionRunning) node.value = value;\n } else node.value = value;\n if (node.observers && node.observers.length) {\n runUpdates(() => {\n for (let i = 0; i < node.observers.length; i += 1) {\n const o = node.observers[i];\n const TransitionRunning = Transition && Transition.running;\n if (TransitionRunning && Transition.disposed.has(o)) continue;\n if (TransitionRunning && !o.tState || !TransitionRunning && !o.state) {\n if (o.pure) Updates.push(o);else Effects.push(o);\n if (o.observers) markDownstream(o);\n }\n if (TransitionRunning) o.tState = STALE;else o.state = STALE;\n }\n if (Updates.length > 10e5) {\n Updates = [];\n if (false) ;\n throw new Error();\n }\n }, false);\n }\n }\n return value;\n}\nfunction updateComputation(node) {\n if (!node.fn) return;\n cleanNode(node);\n const owner = Owner,\n listener = Listener,\n time = ExecCount;\n Listener = Owner = node;\n runComputation(node, Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value, time);\n if (Transition && !Transition.running && Transition.sources.has(node)) {\n queueMicrotask(() => {\n runUpdates(() => {\n Transition && (Transition.running = true);\n Listener = Owner = node;\n runComputation(node, node.tValue, time);\n Listener = Owner = null;\n }, false);\n });\n }\n Listener = listener;\n Owner = owner;\n}\nfunction runComputation(node, value, time) {\n let nextValue;\n try {\n nextValue = node.fn(value);\n } catch (err) {\n if (node.pure) {\n if (Transition && Transition.running) {\n node.tState = STALE;\n node.tOwned && node.tOwned.forEach(cleanNode);\n node.tOwned = undefined;\n } else {\n node.state = STALE;\n node.owned && node.owned.forEach(cleanNode);\n node.owned = null;\n }\n }\n node.updatedAt = time + 1;\n return handleError(err);\n }\n if (!node.updatedAt || node.updatedAt <= time) {\n if (node.updatedAt != null && \"observers\" in node) {\n writeSignal(node, nextValue, true);\n } else if (Transition && Transition.running && node.pure) {\n Transition.sources.add(node);\n node.tValue = nextValue;\n } else node.value = nextValue;\n node.updatedAt = time;\n }\n}\nfunction createComputation(fn, init, pure, state = STALE, options) {\n const c = {\n fn,\n state: state,\n updatedAt: null,\n owned: null,\n sources: null,\n sourceSlots: null,\n cleanups: null,\n value: init,\n owner: Owner,\n context: null,\n pure\n };\n if (Transition && Transition.running) {\n c.state = 0;\n c.tState = state;\n }\n if (Owner === null) ;else if (Owner !== UNOWNED) {\n if (Transition && Transition.running && Owner.pure) {\n if (!Owner.tOwned) Owner.tOwned = [c];else Owner.tOwned.push(c);\n } else {\n if (!Owner.owned) Owner.owned = [c];else Owner.owned.push(c);\n }\n }\n if (ExternalSourceFactory) {\n const [track, trigger] = createSignal(undefined, {\n equals: false\n });\n const ordinary = ExternalSourceFactory(c.fn, trigger);\n onCleanup(() => ordinary.dispose());\n const triggerInTransition = () => startTransition(trigger).then(() => inTransition.dispose());\n const inTransition = ExternalSourceFactory(c.fn, triggerInTransition);\n c.fn = x => {\n track();\n return Transition && Transition.running ? inTransition.track(x) : ordinary.track(x);\n };\n }\n return c;\n}\nfunction runTop(node) {\n const runningTransition = Transition && Transition.running;\n if (!runningTransition && node.state === 0 || runningTransition && node.tState === 0) return;\n if (!runningTransition && node.state === PENDING || runningTransition && node.tState === PENDING) return lookUpstream(node);\n if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);\n const ancestors = [node];\n while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {\n if (runningTransition && Transition.disposed.has(node)) return;\n if (!runningTransition && node.state || runningTransition && node.tState) ancestors.push(node);\n }\n for (let i = ancestors.length - 1; i >= 0; i--) {\n node = ancestors[i];\n if (runningTransition) {\n let top = node,\n prev = ancestors[i + 1];\n while ((top = top.owner) && top !== prev) {\n if (Transition.disposed.has(top)) return;\n }\n }\n if (!runningTransition && node.state === STALE || runningTransition && node.tState === STALE) {\n updateComputation(node);\n } else if (!runningTransition && node.state === PENDING || runningTransition && node.tState === PENDING) {\n const updates = Updates;\n Updates = null;\n runUpdates(() => lookUpstream(node, ancestors[0]), false);\n Updates = updates;\n }\n }\n}\nfunction runUpdates(fn, init) {\n if (Updates) return fn();\n let wait = false;\n if (!init) Updates = [];\n if (Effects) wait = true;else Effects = [];\n ExecCount++;\n try {\n const res = fn();\n completeUpdates(wait);\n return res;\n } catch (err) {\n if (!wait) Effects = null;\n Updates = null;\n handleError(err);\n }\n}\nfunction completeUpdates(wait) {\n if (Updates) {\n if (Scheduler && Transition && Transition.running) scheduleQueue(Updates);else runQueue(Updates);\n Updates = null;\n }\n if (wait) return;\n let res;\n if (Transition) {\n if (!Transition.promises.size && !Transition.queue.size) {\n const sources = Transition.sources;\n const disposed = Transition.disposed;\n Effects.push.apply(Effects, Transition.effects);\n res = Transition.resolve;\n for (const e of Effects) {\n \"tState\" in e && (e.state = e.tState);\n delete e.tState;\n }\n Transition = null;\n runUpdates(() => {\n for (const d of disposed) cleanNode(d);\n for (const v of sources) {\n v.value = v.tValue;\n if (v.owned) {\n for (let i = 0, len = v.owned.length; i < len; i++) cleanNode(v.owned[i]);\n }\n if (v.tOwned) v.owned = v.tOwned;\n delete v.tValue;\n delete v.tOwned;\n v.tState = 0;\n }\n setTransPending(false);\n }, false);\n } else if (Transition.running) {\n Transition.running = false;\n Transition.effects.push.apply(Transition.effects, Effects);\n Effects = null;\n setTransPending(true);\n return;\n }\n }\n const e = Effects;\n Effects = null;\n if (e.length) runUpdates(() => runEffects(e), false);\n if (res) res();\n}\nfunction runQueue(queue) {\n for (let i = 0; i < queue.length; i++) runTop(queue[i]);\n}\nfunction scheduleQueue(queue) {\n for (let i = 0; i < queue.length; i++) {\n const item = queue[i];\n const tasks = Transition.queue;\n if (!tasks.has(item)) {\n tasks.add(item);\n Scheduler(() => {\n tasks.delete(item);\n runUpdates(() => {\n Transition.running = true;\n runTop(item);\n }, false);\n Transition && (Transition.running = false);\n });\n }\n }\n}\nfunction runUserEffects(queue) {\n let i,\n userLength = 0;\n for (i = 0; i < queue.length; i++) {\n const e = queue[i];\n if (!e.user) runTop(e);else queue[userLength++] = e;\n }\n if (sharedConfig.context) setHydrateContext();\n for (i = 0; i < userLength; i++) runTop(queue[i]);\n}\nfunction lookUpstream(node, ignore) {\n const runningTransition = Transition && Transition.running;\n if (runningTransition) node.tState = 0;else node.state = 0;\n for (let i = 0; i < node.sources.length; i += 1) {\n const source = node.sources[i];\n if (source.sources) {\n if (!runningTransition && source.state === STALE || runningTransition && source.tState === STALE) {\n if (source !== ignore && (!source.updatedAt || source.updatedAt < ExecCount)) runTop(source);\n } else if (!runningTransition && source.state === PENDING || runningTransition && source.tState === PENDING) lookUpstream(source, ignore);\n }\n }\n}\nfunction markDownstream(node) {\n const runningTransition = Transition && Transition.running;\n for (let i = 0; i < node.observers.length; i += 1) {\n const o = node.observers[i];\n if (!runningTransition && !o.state || runningTransition && !o.tState) {\n if (runningTransition) o.tState = PENDING;else o.state = PENDING;\n if (o.pure) Updates.push(o);else Effects.push(o);\n o.observers && markDownstream(o);\n }\n }\n}\nfunction cleanNode(node) {\n let i;\n if (node.sources) {\n while (node.sources.length) {\n const source = node.sources.pop(),\n index = node.sourceSlots.pop(),\n obs = source.observers;\n if (obs && obs.length) {\n const n = obs.pop(),\n s = source.observerSlots.pop();\n if (index < obs.length) {\n n.sourceSlots[s] = index;\n obs[index] = n;\n source.observerSlots[index] = s;\n }\n }\n }\n }\n if (Transition && Transition.running && node.pure) {\n if (node.tOwned) {\n for (i = 0; i < node.tOwned.length; i++) cleanNode(node.tOwned[i]);\n delete node.tOwned;\n }\n reset(node, true);\n } else if (node.owned) {\n for (i = 0; i < node.owned.length; i++) cleanNode(node.owned[i]);\n node.owned = null;\n }\n if (node.cleanups) {\n for (i = 0; i < node.cleanups.length; i++) node.cleanups[i]();\n node.cleanups = null;\n }\n if (Transition && Transition.running) node.tState = 0;else node.state = 0;\n node.context = null;\n}\nfunction reset(node, top) {\n if (!top) {\n node.tState = 0;\n Transition.disposed.add(node);\n }\n if (node.owned) {\n for (let i = 0; i < node.owned.length; i++) reset(node.owned[i]);\n }\n}\nfunction castError(err) {\n if (err instanceof Error || typeof err === \"string\") return err;\n return new Error(\"Unknown error\");\n}\nfunction runErrors(fns, err) {\n for (const f of fns) f(err);\n}\nfunction handleError(err) {\n err = castError(err);\n const fns = ERROR && lookup(Owner, ERROR);\n if (!fns) throw err;\n if (Effects) Effects.push({\n fn() {\n runErrors(fns, err);\n },\n state: STALE\n });else runErrors(fns, err);\n}\nfunction lookup(owner, key) {\n return owner ? owner.context && owner.context[key] !== undefined ? owner.context[key] : lookup(owner.owner, key) : undefined;\n}\nfunction resolveChildren(children) {\n if (typeof children === \"function\" && !children.length) return resolveChildren(children());\n if (Array.isArray(children)) {\n const results = [];\n for (let i = 0; i < children.length; i++) {\n const result = resolveChildren(children[i]);\n Array.isArray(result) ? results.push.apply(results, result) : results.push(result);\n }\n return results;\n }\n return children;\n}\nfunction createProvider(id, options) {\n return function provider(props) {\n let res;\n createRenderEffect(() => res = untrack(() => {\n Owner.context = {\n [id]: props.value\n };\n return children(() => props.children);\n }), undefined);\n return res;\n };\n}\n\nfunction observable(input) {\n return {\n subscribe(observer) {\n if (!(observer instanceof Object) || observer == null) {\n throw new TypeError(\"Expected the observer to be an object.\");\n }\n const handler = typeof observer === \"function\" ? observer : observer.next && observer.next.bind(observer);\n if (!handler) {\n return {\n unsubscribe() {}\n };\n }\n const dispose = createRoot(disposer => {\n createEffect(() => {\n const v = input();\n untrack(() => handler(v));\n });\n return disposer;\n });\n if (getOwner()) onCleanup(dispose);\n return {\n unsubscribe() {\n dispose();\n }\n };\n },\n [Symbol.observable || \"@@observable\"]() {\n return this;\n }\n };\n}\nfunction from(producer) {\n const [s, set] = createSignal(undefined, {\n equals: false\n });\n if (\"subscribe\" in producer) {\n const unsub = producer.subscribe(v => set(() => v));\n onCleanup(() => \"unsubscribe\" in unsub ? unsub.unsubscribe() : unsub());\n } else {\n const clean = producer(set);\n onCleanup(clean);\n }\n return s;\n}\n\nconst FALLBACK = Symbol(\"fallback\");\nfunction dispose(d) {\n for (let i = 0; i < d.length; i++) d[i]();\n}\nfunction mapArray(list, mapFn, options = {}) {\n let items = [],\n mapped = [],\n disposers = [],\n len = 0,\n indexes = mapFn.length > 1 ? [] : null;\n onCleanup(() => dispose(disposers));\n return () => {\n let newItems = list() || [],\n i,\n j;\n newItems[$TRACK];\n return untrack(() => {\n let newLen = newItems.length,\n newIndices,\n newIndicesNext,\n temp,\n tempdisposers,\n tempIndexes,\n start,\n end,\n newEnd,\n item;\n if (newLen === 0) {\n if (len !== 0) {\n dispose(disposers);\n disposers = [];\n items = [];\n mapped = [];\n len = 0;\n indexes && (indexes = []);\n }\n if (options.fallback) {\n items = [FALLBACK];\n mapped[0] = createRoot(disposer => {\n disposers[0] = disposer;\n return options.fallback();\n });\n len = 1;\n }\n }\n else if (len === 0) {\n mapped = new Array(newLen);\n for (j = 0; j < newLen; j++) {\n items[j] = newItems[j];\n mapped[j] = createRoot(mapper);\n }\n len = newLen;\n } else {\n temp = new Array(newLen);\n tempdisposers = new Array(newLen);\n indexes && (tempIndexes = new Array(newLen));\n for (start = 0, end = Math.min(len, newLen); start < end && items[start] === newItems[start]; start++);\n for (end = len - 1, newEnd = newLen - 1; end >= start && newEnd >= start && items[end] === newItems[newEnd]; end--, newEnd--) {\n temp[newEnd] = mapped[end];\n tempdisposers[newEnd] = disposers[end];\n indexes && (tempIndexes[newEnd] = indexes[end]);\n }\n newIndices = new Map();\n newIndicesNext = new Array(newEnd + 1);\n for (j = newEnd; j >= start; j--) {\n item = newItems[j];\n i = newIndices.get(item);\n newIndicesNext[j] = i === undefined ? -1 : i;\n newIndices.set(item, j);\n }\n for (i = start; i <= end; i++) {\n item = items[i];\n j = newIndices.get(item);\n if (j !== undefined && j !== -1) {\n temp[j] = mapped[i];\n tempdisposers[j] = disposers[i];\n indexes && (tempIndexes[j] = indexes[i]);\n j = newIndicesNext[j];\n newIndices.set(item, j);\n } else disposers[i]();\n }\n for (j = start; j < newLen; j++) {\n if (j in temp) {\n mapped[j] = temp[j];\n disposers[j] = tempdisposers[j];\n if (indexes) {\n indexes[j] = tempIndexes[j];\n indexes[j](j);\n }\n } else mapped[j] = createRoot(mapper);\n }\n mapped = mapped.slice(0, len = newLen);\n items = newItems.slice(0);\n }\n return mapped;\n });\n function mapper(disposer) {\n disposers[j] = disposer;\n if (indexes) {\n const [s, set] = createSignal(j);\n indexes[j] = set;\n return mapFn(newItems[j], s);\n }\n return mapFn(newItems[j]);\n }\n };\n}\nfunction indexArray(list, mapFn, options = {}) {\n let items = [],\n mapped = [],\n disposers = [],\n signals = [],\n len = 0,\n i;\n onCleanup(() => dispose(disposers));\n return () => {\n const newItems = list() || [];\n newItems[$TRACK];\n return untrack(() => {\n if (newItems.length === 0) {\n if (len !== 0) {\n dispose(disposers);\n disposers = [];\n items = [];\n mapped = [];\n len = 0;\n signals = [];\n }\n if (options.fallback) {\n items = [FALLBACK];\n mapped[0] = createRoot(disposer => {\n disposers[0] = disposer;\n return options.fallback();\n });\n len = 1;\n }\n return mapped;\n }\n if (items[0] === FALLBACK) {\n disposers[0]();\n disposers = [];\n items = [];\n mapped = [];\n len = 0;\n }\n for (i = 0; i < newItems.length; i++) {\n if (i < items.length && items[i] !== newItems[i]) {\n signals[i](() => newItems[i]);\n } else if (i >= items.length) {\n mapped[i] = createRoot(mapper);\n }\n }\n for (; i < items.length; i++) {\n disposers[i]();\n }\n len = signals.length = disposers.length = newItems.length;\n items = newItems.slice(0);\n return mapped = mapped.slice(0, len);\n });\n function mapper(disposer) {\n disposers[i] = disposer;\n const [s, set] = createSignal(newItems[i]);\n signals[i] = set;\n return mapFn(s, i);\n }\n };\n}\n\nlet hydrationEnabled = false;\nfunction enableHydration() {\n hydrationEnabled = true;\n}\nfunction createComponent(Comp, props) {\n if (hydrationEnabled) {\n if (sharedConfig.context) {\n const c = sharedConfig.context;\n setHydrateContext(nextHydrateContext());\n const r = untrack(() => Comp(props || {}));\n setHydrateContext(c);\n return r;\n }\n }\n return untrack(() => Comp(props || {}));\n}\nfunction trueFn() {\n return true;\n}\nconst propTraps = {\n get(_, property, receiver) {\n if (property === $PROXY) return receiver;\n return _.get(property);\n },\n has(_, property) {\n if (property === $PROXY) return true;\n return _.has(property);\n },\n set: trueFn,\n deleteProperty: trueFn,\n getOwnPropertyDescriptor(_, property) {\n return {\n configurable: true,\n enumerable: true,\n get() {\n return _.get(property);\n },\n set: trueFn,\n deleteProperty: trueFn\n };\n },\n ownKeys(_) {\n return _.keys();\n }\n};\nfunction resolveSource(s) {\n return !(s = typeof s === \"function\" ? s() : s) ? {} : s;\n}\nfunction mergeProps(...sources) {\n let proxy = false;\n for (let i = 0; i < sources.length; i++) {\n const s = sources[i];\n proxy = proxy || !!s && $PROXY in s;\n sources[i] = typeof s === \"function\" ? (proxy = true, createMemo(s)) : s;\n }\n if (proxy) {\n return new Proxy({\n get(property) {\n for (let i = sources.length - 1; i >= 0; i--) {\n const v = resolveSource(sources[i])[property];\n if (v !== undefined) return v;\n }\n },\n has(property) {\n for (let i = sources.length - 1; i >= 0; i--) {\n if (property in resolveSource(sources[i])) return true;\n }\n return false;\n },\n keys() {\n const keys = [];\n for (let i = 0; i < sources.length; i++) keys.push(...Object.keys(resolveSource(sources[i])));\n return [...new Set(keys)];\n }\n }, propTraps);\n }\n const target = {};\n for (let i = sources.length - 1; i >= 0; i--) {\n if (sources[i]) {\n const descriptors = Object.getOwnPropertyDescriptors(sources[i]);\n for (const key in descriptors) {\n if (key in target) continue;\n Object.defineProperty(target, key, {\n enumerable: true,\n get() {\n for (let i = sources.length - 1; i >= 0; i--) {\n const v = (sources[i] || {})[key];\n if (v !== undefined) return v;\n }\n }\n });\n }\n }\n }\n return target;\n}\nfunction splitProps(props, ...keys) {\n const blocked = new Set(keys.flat());\n if ($PROXY in props) {\n const res = keys.map(k => {\n return new Proxy({\n get(property) {\n return k.includes(property) ? props[property] : undefined;\n },\n has(property) {\n return k.includes(property) && property in props;\n },\n keys() {\n return k.filter(property => property in props);\n }\n }, propTraps);\n });\n res.push(new Proxy({\n get(property) {\n return blocked.has(property) ? undefined : props[property];\n },\n has(property) {\n return blocked.has(property) ? false : property in props;\n },\n keys() {\n return Object.keys(props).filter(k => !blocked.has(k));\n }\n }, propTraps));\n return res;\n }\n const descriptors = Object.getOwnPropertyDescriptors(props);\n keys.push(Object.keys(descriptors).filter(k => !blocked.has(k)));\n return keys.map(k => {\n const clone = {};\n for (let i = 0; i < k.length; i++) {\n const key = k[i];\n if (!(key in props)) continue;\n Object.defineProperty(clone, key, descriptors[key] ? descriptors[key] : {\n get() {\n return props[key];\n },\n set() {\n return true;\n },\n enumerable: true\n });\n }\n return clone;\n });\n}\nfunction lazy(fn) {\n let comp;\n let p;\n const wrap = props => {\n const ctx = sharedConfig.context;\n if (ctx) {\n const [s, set] = createSignal();\n (p || (p = fn())).then(mod => {\n setHydrateContext(ctx);\n set(() => mod.default);\n setHydrateContext();\n });\n comp = s;\n } else if (!comp) {\n const [s] = createResource(() => (p || (p = fn())).then(mod => mod.default));\n comp = s;\n }\n let Comp;\n return createMemo(() => (Comp = comp()) && untrack(() => {\n if (false) ;\n if (!ctx) return Comp(props);\n const c = sharedConfig.context;\n setHydrateContext(ctx);\n const r = Comp(props);\n setHydrateContext(c);\n return r;\n }));\n };\n wrap.preload = () => p || ((p = fn()).then(mod => comp = () => mod.default), p);\n return wrap;\n}\nlet counter = 0;\nfunction createUniqueId() {\n const ctx = sharedConfig.context;\n return ctx ? `${ctx.id}${ctx.count++}` : `cl-${counter++}`;\n}\n\nfunction For(props) {\n const fallback = \"fallback\" in props && {\n fallback: () => props.fallback\n };\n return createMemo(mapArray(() => props.each, props.children, fallback || undefined));\n}\nfunction Index(props) {\n const fallback = \"fallback\" in props && {\n fallback: () => props.fallback\n };\n return createMemo(indexArray(() => props.each, props.children, fallback || undefined));\n}\nfunction Show(props) {\n let strictEqual = false;\n const keyed = props.keyed;\n const condition = createMemo(() => props.when, undefined, {\n equals: (a, b) => strictEqual ? a === b : !a === !b\n });\n return createMemo(() => {\n const c = condition();\n if (c) {\n const child = props.children;\n const fn = typeof child === \"function\" && child.length > 0;\n strictEqual = keyed || fn;\n return fn ? untrack(() => child(c)) : child;\n }\n return props.fallback;\n }, undefined, undefined);\n}\nfunction Switch(props) {\n let strictEqual = false;\n let keyed = false;\n const equals = (a, b) => a[0] === b[0] && (strictEqual ? a[1] === b[1] : !a[1] === !b[1]) && a[2] === b[2];\n const conditions = children(() => props.children),\n evalConditions = createMemo(() => {\n let conds = conditions();\n if (!Array.isArray(conds)) conds = [conds];\n for (let i = 0; i < conds.length; i++) {\n const c = conds[i].when;\n if (c) {\n keyed = !!conds[i].keyed;\n return [i, c, conds[i]];\n }\n }\n return [-1];\n }, undefined, {\n equals\n });\n return createMemo(() => {\n const [index, when, cond] = evalConditions();\n if (index < 0) return props.fallback;\n const c = cond.children;\n const fn = typeof c === \"function\" && c.length > 0;\n strictEqual = keyed || fn;\n return fn ? untrack(() => c(when)) : c;\n }, undefined, undefined);\n}\nfunction Match(props) {\n return props;\n}\nlet Errors;\nfunction resetErrorBoundaries() {\n Errors && [...Errors].forEach(fn => fn());\n}\nfunction ErrorBoundary(props) {\n let err;\n let v;\n if (sharedConfig.context && sharedConfig.load && (v = sharedConfig.load(sharedConfig.context.id + sharedConfig.context.count))) err = v[0];\n const [errored, setErrored] = createSignal(err, undefined);\n Errors || (Errors = new Set());\n Errors.add(setErrored);\n onCleanup(() => Errors.delete(setErrored));\n return createMemo(() => {\n let e;\n if (e = errored()) {\n const f = props.fallback;\n const res = typeof f === \"function\" && f.length ? untrack(() => f(e, () => setErrored())) : f;\n onError(setErrored);\n return res;\n }\n onError(setErrored);\n return props.children;\n }, undefined, undefined);\n}\n\nconst suspenseListEquals = (a, b) => a.showContent === b.showContent && a.showFallback === b.showFallback;\nconst SuspenseListContext = createContext();\nfunction SuspenseList(props) {\n let [wrapper, setWrapper] = createSignal(() => ({\n inFallback: false\n })),\n show;\n const listContext = useContext(SuspenseListContext);\n const [registry, setRegistry] = createSignal([]);\n if (listContext) {\n show = listContext.register(createMemo(() => wrapper()().inFallback));\n }\n const resolved = createMemo(prev => {\n const reveal = props.revealOrder,\n tail = props.tail,\n {\n showContent = true,\n showFallback = true\n } = show ? show() : {},\n reg = registry(),\n reverse = reveal === \"backwards\";\n if (reveal === \"together\") {\n const all = reg.every(inFallback => !inFallback());\n const res = reg.map(() => ({\n showContent: all && showContent,\n showFallback\n }));\n res.inFallback = !all;\n return res;\n }\n let stop = false;\n let inFallback = prev.inFallback;\n const res = [];\n for (let i = 0, len = reg.length; i < len; i++) {\n const n = reverse ? len - i - 1 : i,\n s = reg[n]();\n if (!stop && !s) {\n res[n] = {\n showContent,\n showFallback\n };\n } else {\n const next = !stop;\n if (next) inFallback = true;\n res[n] = {\n showContent: next,\n showFallback: !tail || next && tail === \"collapsed\" ? showFallback : false\n };\n stop = true;\n }\n }\n if (!stop) inFallback = false;\n res.inFallback = inFallback;\n return res;\n }, {\n inFallback: false\n });\n setWrapper(() => resolved);\n return createComponent(SuspenseListContext.Provider, {\n value: {\n register: inFallback => {\n let index;\n setRegistry(registry => {\n index = registry.length;\n return [...registry, inFallback];\n });\n return createMemo(() => resolved()[index], undefined, {\n equals: suspenseListEquals\n });\n }\n },\n get children() {\n return props.children;\n }\n });\n}\nfunction Suspense(props) {\n let counter = 0,\n show,\n ctx,\n p,\n flicker,\n error;\n const [inFallback, setFallback] = createSignal(false),\n SuspenseContext = getSuspenseContext(),\n store = {\n increment: () => {\n if (++counter === 1) setFallback(true);\n },\n decrement: () => {\n if (--counter === 0) setFallback(false);\n },\n inFallback,\n effects: [],\n resolved: false\n },\n owner = getOwner();\n if (sharedConfig.context && sharedConfig.load) {\n const key = sharedConfig.context.id + sharedConfig.context.count;\n let ref = sharedConfig.load(key);\n if (ref && (p = ref[0]) && p !== \"$$f\") {\n if (typeof p !== \"object\" || !(\"then\" in p)) p = Promise.resolve(p);\n const [s, set] = createSignal(undefined, {\n equals: false\n });\n flicker = s;\n p.then(err => {\n if (err || sharedConfig.done) {\n err && (error = err);\n return set();\n }\n sharedConfig.gather(key);\n setHydrateContext(ctx);\n set();\n setHydrateContext();\n });\n }\n }\n const listContext = useContext(SuspenseListContext);\n if (listContext) show = listContext.register(store.inFallback);\n let dispose;\n onCleanup(() => dispose && dispose());\n return createComponent(SuspenseContext.Provider, {\n value: store,\n get children() {\n return createMemo(() => {\n if (error) throw error;\n ctx = sharedConfig.context;\n if (flicker) {\n flicker();\n return flicker = undefined;\n }\n if (ctx && p === \"$$f\") setHydrateContext();\n const rendered = createMemo(() => props.children);\n return createMemo(prev => {\n const inFallback = store.inFallback(),\n {\n showContent = true,\n showFallback = true\n } = show ? show() : {};\n if ((!inFallback || p && p !== \"$$f\") && showContent) {\n store.resolved = true;\n dispose && dispose();\n dispose = ctx = p = undefined;\n resumeEffects(store.effects);\n return rendered();\n }\n if (!showFallback) return;\n if (dispose) return prev;\n return createRoot(disposer => {\n dispose = disposer;\n if (ctx) {\n setHydrateContext({\n id: ctx.id + \"f\",\n count: 0\n });\n ctx = undefined;\n }\n return props.fallback;\n }, owner);\n });\n });\n }\n });\n}\n\nlet DEV;\n\nexport { $DEVCOMP, $PROXY, $TRACK, DEV, ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, batch, cancelCallback, children, createComponent, createComputed, createContext, createDeferred, createEffect, createMemo, createReaction, createRenderEffect, createResource, createRoot, createSelector, createSignal, createUniqueId, enableExternalSource, enableHydration, enableScheduling, equalFn, from, getListener, getOwner, indexArray, lazy, mapArray, mergeProps, observable, on, onCleanup, onError, onMount, requestCallback, resetErrorBoundaries, runWithOwner, sharedConfig, splitProps, startTransition, untrack, useContext, useTransition };\n", "// src/index.tsx\nimport { splitProps as splitProps7 } from \"solid-js\";\n\n// src/util.tsx\nimport { render } from \"solid-js/web\";\n\n// src/scrollbars.scss\nvar css = `._scrollbar_1qn26_1{scrollbar-color:var(--scrollbar-thin-thumb) var(--scrollbar-thin-track);scrollbar-width:thin}._scrollbar_1qn26_1::-webkit-scrollbar{width:8px;height:8px}._scrollbar_1qn26_1::-webkit-scrollbar-track{border:2px solid var(--scrollbar-thin-track);border-color:var(--scrollbar-thin-track);background-color:var(--scrollbar-thin-track)}._scrollbar_1qn26_1::-webkit-scrollbar-thumb{min-height:40px;border:2px solid rgba(0,0,0,0);border-radius:4px;background-clip:padding-box;background-color:var(--scrollbar-thin-thumb)}._scrollbar_1qn26_1::-webkit-scrollbar-corner{background-color:rgba(0,0,0,0)}`;\nvar classes = {\n \"scrollbar\": \"_scrollbar_1qn26_1\"\n};\n\n// src/internalstyles.tsx\nimport { createEffect, createSignal } from \"solid-js\";\nvar styleSet = /* @__PURE__ */ new Set();\nvar [styleTxt, setStyleTxt] = createSignal(\"\");\nvar ensureInternalStyle = (style) => {\n if (styleSet.has(style)) {\n return;\n }\n styleSet.add(style);\n setStyleTxt((v) => v + style);\n};\nvar InternalStyles = () => <style>{styleTxt()}</style>;\nfunction injectInternalStyles() {\n const mod = injectCss(\" \");\n createEffect(() => mod(styleTxt()));\n}\n\n// src/util.tsx\nvar ReactiveRootElem = class extends HTMLElement {\n // children\n c;\n // dispose\n d;\n constructor(children) {\n super();\n this.c = children;\n }\n connectedCallback() {\n this.style.display = \"contents\";\n this.d?.();\n this.d = render(() => <>{this.c()}</>, this);\n }\n disconnectedCallback() {\n this.d?.();\n }\n};\ncustomElements.define(\"shltr-rroot\", ReactiveRootElem);\nvar ReactiveRoot = (props) => {\n const root = <shltr-rroot />;\n root.c = () => props.children;\n return root;\n};\nvar injectedStyles = [];\nvar cleanupCss = () => {\n injectedStyles.forEach((e) => e.remove());\n injectedStyles = [];\n};\nvar injectCss = (css12) => {\n const e = <style>{css12}</style>;\n document.body.append(e);\n injectedStyles.push(e);\n return (css13) => {\n if (css13 === void 0) {\n e.remove();\n injectedStyles = injectedStyles.filter((v) => v !== e);\n } else\n e.textContent = css13;\n };\n};\nvar genId = () => \"shltr-ui-\" + Math.random().toString(36).slice(2);\nvar niceScrollbarsClass = () => {\n ensureInternalStyle(css);\n return classes.scrollbar;\n};\nvar getRoot = (el) => el instanceof ShadowRoot || el.tagName === \"DIALOG\" || el === document.body ? el : getRoot(el.parentNode);\n\n// src/button.tsx\nimport { mergeProps, splitProps } from \"solid-js\";\n\n// src/button.tsx.scss\nvar css2 = `._button_1ywb3_1{display:flex;align-items:center;justify-content:center;width:var(--shltr-btn-w);min-width:var(--shltr-btn-w);height:var(--shltr-btn-h);min-height:var(--shltr-btn-h);padding:2px 16px;border:none;border-radius:3px;font-weight:500;font-size:14px;line-height:16px;white-space:nowrap;cursor:pointer;transition:background-color .17s ease,color .17s ease;user-select:none}._button_1ywb3_1[disabled]{filter:brightness(0.6)}._button_1ywb3_1._grow_1ywb3_1{width:auto}._button_1ywb3_1._filled_1ywb3_1,._button_1ywb3_1._outlined_1ywb3_1:hover:not([disabled]){background:var(--shltr-btn-bg);color:var(--shltr-btn-col)}._button_1ywb3_1._filled_1ywb3_1:hover:not([disabled]){background:var(--shltr-btn-bg-hov)}._button_1ywb3_1._inverted_1ywb3_1{background:var(--shltr-btn-col);color:var(--shltr-btn-bg)}._button_1ywb3_1._link_1ywb3_1{background:rgba(0,0,0,0);color:unset}._button_1ywb3_1._outlined_1ywb3_1{border:1px solid var(--shltr-btn-bg);background:rgba(0,0,0,0);color:var(--shltr-btn-bg)}._button_1ywb3_1._xlarge_1ywb3_1{padding:2px 20px;font-size:16px;line-height:normal}._button_1ywb3_1._large_1ywb3_1{display:inline;padding:2px 4px}._button_1ywb3_1._max_1ywb3_1{font-size:16px}._button_1ywb3_1._icon_1ywb3_1{padding:4px}._linkbutton_1ywb3_1{color:var(--text-link)}._linkbutton_1ywb3_1:hover{text-decoration:underline}`;\nvar classes2 = {\n \"button\": \"_button_1ywb3_1\",\n \"grow\": \"_grow_1ywb3_1\",\n \"filled\": \"_filled_1ywb3_1\",\n \"outlined\": \"_outlined_1ywb3_1\",\n \"inverted\": \"_inverted_1ywb3_1\",\n \"link\": \"_link_1ywb3_1\",\n \"xlarge\": \"_xlarge_1ywb3_1\",\n \"large\": \"_large_1ywb3_1\",\n \"max\": \"_max_1ywb3_1\",\n \"icon\": \"_icon_1ywb3_1\",\n \"linkbutton\": \"_linkbutton_1ywb3_1\"\n};\n\n// src/focusring.tsx\nimport { onCleanup } from \"solid-js\";\nvar FocusRing = (props) => <div\n style={{\n position: \"fixed\",\n left: props.x + \"px\",\n top: props.y + \"px\",\n width: props.width + \"px\",\n height: props.height + \"px\",\n outline: \"#00a8fc solid\",\n \"pointer-events\": \"none\",\n \"outline-offset\": \"3px\",\n \"border-radius\": props.rad + \"px\",\n \"z-index\": 9999999\n }}\n/>;\nfunction focusring(el, rad) {\n const isFocused = () => el === document.activeElement;\n let lastFocused = isFocused();\n let focusRingEl;\n const keyHandler = (ev) => {\n if (lastFocused || !isFocused() || ev.code !== \"Tab\")\n return;\n lastFocused = true;\n focusRingEl?.remove();\n focusRingEl = <FocusRing rad={typeof rad() === \"number\" ? rad() : 3} {...el.getBoundingClientRect()} />;\n getRoot(el).append(focusRingEl);\n };\n const blurHandler = () => {\n lastFocused = false;\n focusRingEl?.remove();\n focusRingEl = void 0;\n };\n el.addEventListener(\"keyup\", keyHandler);\n el.addEventListener(\"blur\", blurHandler);\n onCleanup(() => {\n el.removeEventListener(\"keyup\", keyHandler);\n el.removeEventListener(\"blur\", blurHandler);\n focusRingEl?.remove();\n });\n}\n\n// src/tooltip.tsx\nimport { createEffect as createEffect2, createSignal as createSignal2, onCleanup as onCleanup2 } from \"solid-js\";\n\n// src/tooltip.tsx.scss\nvar css3 = `._tooltip_aw4wn_1{z-index:9999999;position:fixed;max-width:190px;border-radius:5px;background:var(--background-floating);box-shadow:var(--elevation-high);color:var(--text-normal);font-weight:500;font-size:14px;pointer-events:none;word-wrap:break-word;text-align:center;transition-duration:100ms;transition-property:transform,opacity;text-wrap:balance}._tooltip_aw4wn_1:not(._active_aw4wn_1){transform:scale(0);opacity:0}._pointer_aw4wn_1{position:absolute;top:100%;left:50%;width:0;height:0;margin-left:-5px;border:5px solid rgba(0,0,0,0);border-top-color:var(--background-floating)}._pointer_aw4wn_1._under_aw4wn_1{top:unset;bottom:100%;transform:rotate(180deg)}._content_aw4wn_1{padding:8px 12px;overflow:hidden}`;\nvar classes3 = {\n \"tooltip\": \"_tooltip_aw4wn_1\",\n \"active\": \"_active_aw4wn_1\",\n \"pointer\": \"_pointer_aw4wn_1\",\n \"under\": \"_under_aw4wn_1\",\n \"content\": \"_content_aw4wn_1\"\n};\n\n// src/tooltip.tsx\nvar verticalOffset = 8;\nvar ToolTip = (props) => {\n let contentWrapRef;\n const [tooltipWidth, setTooltipWidth] = createSignal2(190);\n createEffect2(() => {\n props.children;\n setTimeout(\n () => setTooltipWidth(\n 25 + (contentWrapRef.firstElementChild?.offsetWidth ?? contentWrapRef.offsetWidth)\n )\n );\n });\n return <div\n classList={{\n [classes3.tooltip]: true,\n [classes3.active]: props.active\n }}\n style={{\n width: tooltipWidth() ? tooltipWidth() + \"px\" : void 0,\n left: props.left + props.width / 2 - tooltipWidth() / 2 + \"px\",\n top: props.under ? props.bottom + verticalOffset + \"px\" : void 0,\n bottom: !props.under ? window.innerHeight - props.top + verticalOffset + \"px\" : void 0,\n \"transform-origin\": `50% ${props.under ? 0 : 100}%`\n }}\n ><div class={`${classes3.pointer} ${props.under ? classes3.under : \"\"}`} /><div class={classes3.content} ref={contentWrapRef}>{props.children instanceof Node ? props.children : <span>{props.children}</span>}</div></div>;\n};\nfunction tooltip(el, props) {\n const propsIsArr = () => Array.isArray(props()) && typeof props()[0] === \"boolean\";\n const content = () => propsIsArr() ? props()[1] : props();\n const underneath = () => propsIsArr() ? props()[0] : false;\n const [active, setActive] = createSignal2(false);\n const [rect, setRect] = createSignal2(el.getBoundingClientRect());\n const updateRect = () => {\n setRect(el.getBoundingClientRect());\n };\n let toolTipElem;\n const enterHandler = () => {\n if (content() === void 0)\n return;\n updateRect();\n ensureInternalStyle(css3);\n toolTipElem?.remove();\n toolTipElem = <ToolTip active={active()} under={underneath()} {...rect()}>{content()}</ToolTip>;\n getRoot(el).append(toolTipElem);\n setTimeout(() => setActive(true));\n };\n const exitHandler = () => {\n setActive(false);\n setTimeout(() => {\n if (active())\n return;\n toolTipElem?.remove();\n toolTipElem = void 0;\n }, 100);\n };\n let isInside;\n const moveHandler = (clientX, clientY) => {\n const bounding = el.getBoundingClientRect();\n if (!bounding) {\n setActive(false);\n return;\n }\n if (clientX > bounding.left && clientX < bounding.right && clientY > bounding.top && clientY < bounding.bottom) {\n if (!isInside) {\n isInside = true;\n enterHandler();\n }\n } else {\n isInside = false;\n exitHandler();\n }\n };\n const mouseMoveHandler = (e) => {\n moveHandler(e.clientX, e.clientY);\n };\n const wheelHandler = (e) => {\n moveHandler(e.clientX, e.clientY);\n exitHandler();\n };\n window.addEventListener(\"wheel\", wheelHandler);\n window.addEventListener(\"resize\", updateRect);\n window.addEventListener(\"mousemove\", mouseMoveHandler);\n onCleanup2(() => {\n window.removeEventListener(\"wheel\", wheelHandler);\n window.removeEventListener(\"resize\", updateRect);\n window.removeEventListener(\"mousemove\", mouseMoveHandler);\n toolTipElem?.remove();\n });\n}\n\n// src/button.tsx\nvar ButtonLooks = {\n FILLED: classes2.filled,\n INVERTED: classes2.inverted,\n OUTLINED: classes2.outlined,\n LINK: classes2.link\n //BLANK,\n};\nvar ButtonColors = {\n // COLOUR: [bg, fg, hover]\n BRAND: [\"var(--brand-500)\", \"var(--interactive-active)\", \"var(--brand-560)\"],\n RED: [\"var(--button-danger-background)\", \"var(--interactive-active)\", \"var(--button-danger-background-hover)\"],\n GREEN: [\"var(--button-positive-background)\", \"var(--interactive-active)\", \"var(--button-positive-background-hover)\"],\n SECONDARY: [\n \"var(--button-secondary-background)\",\n \"hsl(0,calc(var(--saturation-factor, 1)*0%),100%)\",\n \"var(--button-secondary-background-hover)\"\n ],\n LINK: [\"var(--text-link)\", \"hsl(0,calc(var(--saturation-factor, 1)*0%),100%)\", \"\"],\n WHITE: [\n \"hsl(0,calc(var(--saturation-factor, 1)*0%),100%)\",\n \"hsl(217,calc(var(--saturation-factor, 1)*7.6%),33.5%)\",\n \"\"\n ],\n BLACK: [\"\", \"\", \"\"],\n // discord legit leaves black entirely unstyled\n TRANSPARENT: [\n \"hsla(0,calc(var(--saturation-factor, 1)*0%),100%,.1)\",\n \"hsl(240,calc(var(--saturation-factor, 1)*5.9%),96.7%)\",\n \"hsla(0,calc(var(--saturation-factor, 1)*0%),100%,.05)\"\n ]\n};\nvar ButtonSizes = {\n // SIZE: [width, height, class]\n NONE: [\"\", \"\", \"\"],\n TINY: [\"53px\", \"24px\", \"\"],\n SMALL: [\"60px\", \"32px\", \"\"],\n MEDIUM: [\"96px\", \"38px\", \"\"],\n LARGE: [\"130px\", \"44px\", \"\"],\n XLARGE: [\"148px\", \"50px\", classes2.xlarge],\n MIN: [\"auto\", \"auto\", classes2.large],\n MAX: [\"100%\", \"100%\", classes2.max],\n ICON: [\"\", \"auto\", classes2.icon]\n};\nvar Button = (rawProps) => {\n const [local, buttonProps] = splitProps(\n mergeProps(\n {\n look: ButtonLooks.FILLED,\n color: ButtonColors.BRAND,\n size: ButtonSizes.SMALL,\n grow: false,\n type: \"button\",\n onDblClick: rawProps.onDoubleClick\n },\n rawProps\n ),\n [\n \"look\",\n \"color\",\n \"size\",\n \"grow\",\n \"tooltip\",\n \"style\",\n \"onDoubleClick\",\n \"class\",\n // TODO: can children just be spread react-style too?\n \"children\"\n ]\n );\n ensureInternalStyle(css2);\n return <button\n use:focusring\n use:tooltip={local.tooltip}\n class={`${local.class} ${classes2.button} ${local.look} ${local.size[2]} ${local.grow ? classes2.grow : \"\"}`}\n style={{\n \"--shltr-btn-w\": local.size[0],\n \"--shltr-btn-h\": local.size[1],\n \"--shltr-btn-col\": local.color[1],\n \"--shltr-btn-bg\": local.color[0],\n \"--shltr-btn-bg-hov\": local.color[2],\n ...local.style\n }}\n {...buttonProps}\n >{local.children}</button>;\n};\nvar LinkButton = (rawProps) => {\n const [local, anchorProps] = splitProps(\n mergeProps(\n {\n target: \"_blank\"\n },\n rawProps\n ),\n [\"tooltip\", \"children\"]\n );\n ensureInternalStyle(css2);\n return <a class={classes2.linkbutton} use:focusring use:tooltip={local.tooltip} {...anchorProps}>{local.children}</a>;\n};\n\n// src/checkbox.tsx\nimport { Show, splitProps as splitProps2 } from \"solid-js\";\n\n// src/checkbox.tsx.scss\nvar css4 = `._cbwrap_1xyhb_1{display:flex;align-items:center;color:var(--text-normal)}._cbwrap_1xyhb_1,._cbwrap_1xyhb_1>label{cursor:pointer}._checkbox_1xyhb_1{position:relative;margin-right:8px}._checkbox_1xyhb_1 input{display:block;position:absolute;top:0;width:100%;height:100%;margin:0;cursor:pointer;opacity:0}._icon_1xyhb_1{display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:2px;border:1px solid hsl(218, calc(var(--saturation-factor, 1) * 4.6%), 46.9%);border-radius:6px;color:rgba(0,0,0,0)}._icon_1xyhb_1._active_1xyhb_1{border-color:var(--brand-400);background:var(--brand-500);color:var(--interactive-active)}._disabled_1xyhb_1{opacity:.3}._disabled_1xyhb_1,._disabled_1xyhb_1>label{cursor:not-allowed}`;\nvar classes4 = {\n \"cbwrap\": \"_cbwrap_1xyhb_1\",\n \"checkbox\": \"_checkbox_1xyhb_1\",\n \"icon\": \"_icon_1xyhb_1\",\n \"active\": \"_active_1xyhb_1\",\n \"disabled\": \"_disabled_1xyhb_1\"\n};\n\n// src/checkbox.tsx\nvar CheckIcon = (props) => <div\n classList={{\n [classes4.icon]: true,\n [classes4.active]: props.state\n }}\n><svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\"><path\n fill=\"currentColor\"\n d=\"M8.99991 16.17L4.82991 12L3.40991 13.41L8.99991 19L20.9999 7.00003L19.5899 5.59003L8.99991 16.17Z\"\n/></svg></div>;\nvar CheckboxItem = (rawProps) => {\n const [local, checkboxProps] = splitProps2(rawProps, [\"onChange\", \"mt\", \"id\", \"tooltip\", \"children\"]);\n ensureInternalStyle(css4);\n const id = local.id ?? genId();\n return <div\n classList={{ [classes4.cbwrap]: true, [classes4.disabled]: checkboxProps.disabled }}\n onclick={() => !checkboxProps.disabled && local.onChange?.(!checkboxProps.checked)}\n style={local.mt ? \"margin-top: 20px\" : \"\"}\n ><div class={classes4.checkbox}><CheckIcon state={checkboxProps.checked} /><input type=\"checkbox\" use:focusring use:tooltip={local.tooltip} id={id} {...checkboxProps} /></div><Show when={local.children} keyed={false}>{\n /* TODO: make onclick work here */\n }<label for={id}>{local.children}</label></Show></div>;\n};\nvar Checkbox = (props) => <CheckboxItem {...props} />;\n\n// src/switch.tsx\nimport { createEffect as createEffect3, createMemo, on, Show as Show2, splitProps as splitProps3 } from \"solid-js\";\n\n// src/switch.tsx.scss\nvar css5 = `._switch_8ctj5_1{position:relative;width:40px;height:24px;border-radius:12px;background:var(--shltr-sw-col);transition:background,opacity;transition-duration:var(--shltr-sw-dur)}._switch_8ctj5_1 input{display:block;position:absolute;width:100%;height:100%;margin:0;cursor:pointer;opacity:0}._disabled_8ctj5_1{opacity:.3}._slider_8ctj5_1{position:absolute;margin:3px}._sitem_8ctj5_1{display:flex;flex-direction:column;margin-bottom:20px}._irow_8ctj5_1{display:flex;align-items:center;width:100%}._irow_8ctj5_1>label{display:block;flex:1;margin:0;overflow:hidden;color:var(--header-primary);font-weight:500;line-height:24px;word-wrap:break-word;cursor:pointer}._irow_8ctj5_1>div{flex:0 0 auto}._note_8ctj5_1{margin-top:8px;color:var(--header-secondary);font-weight:400;font-size:14px;line-height:20px;cursor:default}`;\nvar classes5 = {\n \"switch\": \"_switch_8ctj5_1\",\n \"disabled\": \"_disabled_8ctj5_1\",\n \"slider\": \"_slider_8ctj5_1\",\n \"sitem\": \"_sitem_8ctj5_1\",\n \"irow\": \"_irow_8ctj5_1\",\n \"note\": \"_note_8ctj5_1\"\n};\n\n// src/switch.tsx\nvar PATHS_1_X = \"M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z\";\nvar PATHS_1_BAR = \"M6.56666 11.0013L6.56666 8.96683L13.5667 8.96683L13.5667 11.0013L6.56666 11.0013Z\";\nvar PATHS_1_CHECK = \"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z\";\nvar PATHS_2_X = \"M13.2704 5.13864L14.8614 6.72963L6.72963 14.8614L5.13864 13.2704L13.2704 5.13864Z\";\nvar PATHS_2_BAR = \"M13.5582 8.96683L13.5582 11.0013L6.56192 11.0013L6.56192 8.96683L13.5582 8.96683Z\";\nvar PATHS_2_CHECK = \"M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z\";\nvar TIMING_POINTS = [0, 0.3, 0.7, 1];\nvar SPLINES = [\"0.46 0.33 0.61 0.65\", \"0.26 0.45 0.65 0.88\", \"0.19 0.43 0.42 0.82\"];\nvar DURATION = 225;\nvar COL_GRAY = \"#80848e\";\nvar COL_GREEN = \"#23a55a\";\nvar PATHS_1 = [PATHS_1_X, PATHS_1_BAR, PATHS_1_BAR, PATHS_1_CHECK];\nvar PATHS_2 = [PATHS_2_X, PATHS_2_BAR, PATHS_2_BAR, PATHS_2_CHECK];\nvar X_OFFSETS = [-3, 1, 8, 12];\nvar Slider = (props) => {\n let animateViewBox;\n let animatePath1;\n let animatePath2;\n let animateRectWidth;\n let animateRectHeight;\n let animateRectX;\n let animateRectY;\n createEffect3(\n on(\n [() => props.state],\n ([s]) => {\n animateViewBox.setAttribute(\n \"values\",\n (s ? X_OFFSETS : X_OFFSETS.slice().reverse()).map((x) => `${-x} 0 28 20`).join(\";\")\n );\n animatePath1.setAttribute(\"values\", s ? PATHS_1.join(\";\") : PATHS_1.slice().reverse().join(\";\"));\n animatePath2.setAttribute(\"values\", s ? PATHS_2.join(\";\") : PATHS_2.slice().reverse().join(\";\"));\n animateRectWidth.setAttribute(\"values\", \"20; 28; 28; 20\");\n animateRectHeight.setAttribute(\"values\", \"20; 18; 18; 20\");\n animateRectX.setAttribute(\"values\", \"4; 0; 0; 4\");\n animateRectY.setAttribute(\"values\", \"0; 1; 1; 0\");\n animateViewBox.beginElement();\n animatePath1.beginElement();\n animatePath2.beginElement();\n animateRectWidth.beginElement();\n animateRectHeight.beginElement();\n animateRectX.beginElement();\n animateRectY.beginElement();\n },\n { defer: true }\n )\n );\n const commonAnimateProps = {\n dur: DURATION + \"ms\",\n calcMode: \"spline\",\n keyTimes: TIMING_POINTS.join(\";\"),\n keySplines: SPLINES.join(\";\"),\n repeatCount: 1\n };\n return <svg\n viewBox={`${props.state ? -12 : 3} 0 28 20`}\n width=\"34\"\n height=\"18\"\n preserveAspectRatio=\"xMinYMid meet\"\n class={classes5.slider}\n ><animate ref={animateViewBox} attributeName=\"viewBox\" {...commonAnimateProps} /><rect fill=\"white\" rx=\"10\" width=\"20\" height=\"20\" x=\"4\" y=\"0\"><animate ref={animateRectWidth} attributeName=\"width\" {...commonAnimateProps} /><animate ref={animateRectHeight} attributeName=\"height\" {...commonAnimateProps} /><animate ref={animateRectX} attributeName=\"x\" {...commonAnimateProps} /><animate ref={animateRectY} attributeName=\"y\" {...commonAnimateProps} /></rect><svg viewBox=\"0 0 20 20\" fill=\"none\"><path\n style={`transition: fill ${DURATION}ms`}\n fill={props.state ? COL_GREEN : COL_GRAY}\n d={props.state ? PATHS_1_CHECK : PATHS_1_X}\n ><animate ref={animatePath1} attributeName=\"d\" {...commonAnimateProps} /></path><path\n style={`transition: fill ${DURATION}ms`}\n fill={props.state ? COL_GREEN : COL_GRAY}\n d={props.state ? PATHS_2_CHECK : PATHS_2_X}\n ><animate ref={animatePath2} attributeName=\"d\" {...commonAnimateProps} /></path></svg></svg>;\n};\nvar Switch = (rawProps) => {\n ensureInternalStyle(css5);\n const [local, other] = splitProps3(rawProps, [\"onChange\", \"tooltip\", \"value\"]);\n const checked = createMemo(() => other.checked ?? local.value);\n return <div\n class={`${classes5.switch} ${other.disabled ? classes5.disabled : \"\"}`}\n style={{\n \"--shltr-sw-col\": checked() ? COL_GREEN : COL_GRAY,\n \"--shltr-sw-dur\": DURATION + \"ms\"\n }}\n >{\n /* the slider */\n }<Slider state={checked()} />{\n /* the actual input: useful for accessibility etc */\n }<input\n type=\"checkbox\"\n use:focusring={12}\n use:tooltip={local.tooltip}\n onchange={() => local.onChange?.(!checked())}\n checked={checked()}\n {...other}\n /></div>;\n};\nvar SwitchItem = (rawProps) => {\n const id = genId();\n const [local, other] = splitProps3(rawProps, [\"children\", \"note\", \"hideBorder\"]);\n return <div class={classes5.sitem}><div class={classes5.irow}><label for={id}>{local.children}</label><div><Switch id={id} {...other} /></div></div><Show2 when={local.note} keyed><div class={classes5.note}>{local.note}</div></Show2><Show2 when={!local.hideBorder} keyed><Divider mt /></Show2></div>;\n};\n\n// src/header.tsx\nimport { splitProps as splitProps4 } from \"solid-js\";\n\n// src/header.tsx.scss\nvar css6 = `._h_1w7ua_1{color:var(--header-primary);font-family:var(--font-display);cursor:default}._h1_1w7ua_1{font-size:20px;line-height:24px}._h2_1w7ua_1{font-size:16px;line-height:20px}._h1_1w7ua_1,._h2_1w7ua_1{font-weight:500}._h3_1w7ua_1{font-weight:400;line-height:24px}._h4_1w7ua_1{line-height:20px}._h3_1w7ua_1,._h4_1w7ua_1{font-size:16px}._h5_1w7ua_1,._eyebrow_1w7ua_1{color:var(--header-secondary);font-size:12px;line-height:16px}._eyebrow_1w7ua_1{margin-bottom:8px;font-weight:700;letter-spacing:.02em}._h4_1w7ua_1,._h5_1w7ua_1{font-weight:500}._h2_1w7ua_1,._h4_1w7ua_1,._h5_1w7ua_1,._eyebrow_1w7ua_1{text-transform:uppercase}`;\nvar classes6 = {\n \"h\": \"_h_1w7ua_1\",\n \"h1\": \"_h1_1w7ua_1\",\n \"h2\": \"_h2_1w7ua_1\",\n \"h3\": \"_h3_1w7ua_1\",\n \"h4\": \"_h4_1w7ua_1\",\n \"h5\": \"_h5_1w7ua_1\",\n \"eyebrow\": \"_eyebrow_1w7ua_1\"\n};\n\n// src/header.tsx\nimport { Dynamic } from \"solid-js/web\";\nvar HeaderTags = {\n H1: classes6.h1,\n H2: classes6.h2,\n H3: classes6.h3,\n H4: classes6.h4,\n H5: classes6.h5,\n EYEBROW: classes6.eyebrow\n};\nvar Header = (props) => {\n ensureInternalStyle(css6);\n const [local, headerProps] = splitProps4(props, [\"tag\", \"class\"]);\n return <Dynamic\n component={[HeaderTags.H5, HeaderTags.EYEBROW].includes(local.tag) ? \"h3\" : \"h2\"}\n class={`${local.class ?? \"\"} ${local.tag ?? HeaderTags.H5} ${classes6.h}`}\n {...headerProps}\n />;\n};\n\n// src/openModal.tsx\nimport { createEffect as createEffect4, createSignal as createSignal3, For } from \"solid-js\";\n\n// src/modals.tsx.scss\nvar css7 = `._scrollbar_t8bnq_1{scrollbar-color:var(--scrollbar-thin-thumb) var(--scrollbar-thin-track);scrollbar-width:thin}._scrollbar_t8bnq_1::-webkit-scrollbar{width:8px;height:8px}._scrollbar_t8bnq_1::-webkit-scrollbar-track{border:2px solid var(--scrollbar-thin-track);border-color:var(--scrollbar-thin-track);background-color:var(--scrollbar-thin-track)}._scrollbar_t8bnq_1::-webkit-scrollbar-thumb{min-height:40px;border:2px solid rgba(0,0,0,0);border-radius:4px;background-clip:padding-box;background-color:var(--scrollbar-thin-thumb)}._scrollbar_t8bnq_1::-webkit-scrollbar-corner{background-color:rgba(0,0,0,0)}._mroot_t8bnq_1{display:flex;align-items:center;justify-content:center;width:100%;max-width:100%;height:100%;max-height:100%;margin:0;padding:0;border:none;background:none}._mroot_t8bnq_1::backdrop{background:rgba(0,0,0,.7);opacity:0;transition:opacity 250ms}._mroot_t8bnq_1._active_t8bnq_1::backdrop{opacity:1}._backdrop_t8bnq_1{position:absolute;width:100%;height:100%}._wrap_t8bnq_1{z-index:1;position:absolute;transition-duration:250ms;transition-property:opacity,transform}._wrap_t8bnq_1:not(._active_t8bnq_1){transform:scale(0);opacity:0}._modal_t8bnq_1{display:flex;position:relative;flex-flow:column nowrap;margin:0 auto;border-radius:4px;background:var(--modal-background);color:var(--text-normal)}._sm_t8bnq_1{width:440px;min-height:200px;max-height:720px}._md_t8bnq_1{width:600px;min-height:400px;max-height:800px}._body_t8bnq_1{position:relative;flex:1 1 auto;padding:0 16px 20px 16px;overflow:hidden auto;scrollbar-color:var(--scrollbar-thin-thumb) var(--scrollbar-thin-track);scrollbar-width:thin}._body_t8bnq_1::-webkit-scrollbar{width:8px;height:8px}._body_t8bnq_1::-webkit-scrollbar-track{border:2px solid var(--scrollbar-thin-track);border-color:var(--scrollbar-thin-track);background-color:var(--scrollbar-thin-track)}._body_t8bnq_1::-webkit-scrollbar-thumb{min-height:40px;border:2px solid rgba(0,0,0,0);border-radius:4px;background-clip:padding-box;background-color:var(--scrollbar-thin-thumb)}._body_t8bnq_1::-webkit-scrollbar-corner{background-color:rgba(0,0,0,0)}._head_t8bnq_1,._foot_t8bnq_1{flex:0 0 auto;padding:16px}._head_t8bnq_1{display:flex;justify-content:space-between}._foot_t8bnq_1{border-radius:0 0 4px 4px;background:var(--modal-footer-background)}._confirm_t8bnq_1{display:flex;justify-content:flex-end;gap:.5rem}._cbtn_t8bnq_1{height:26px;margin:0;padding:2px;border:none;background:rgba(0,0,0,0);color:var(--interactive-normal);cursor:pointer;opacity:.5}._cbtn_t8bnq_1:hover{color:var(--interactive-hover);opacity:1}`;\nvar classes7 = {\n \"scrollbar\": \"_scrollbar_t8bnq_1\",\n \"mroot\": \"_mroot_t8bnq_1\",\n \"active\": \"_active_t8bnq_1\",\n \"backdrop\": \"_backdrop_t8bnq_1\",\n \"wrap\": \"_wrap_t8bnq_1\",\n \"modal\": \"_modal_t8bnq_1\",\n \"sm\": \"_sm_t8bnq_1\",\n \"md\": \"_md_t8bnq_1\",\n \"body\": \"_body_t8bnq_1\",\n \"head\": \"_head_t8bnq_1\",\n \"foot\": \"_foot_t8bnq_1\",\n \"confirm\": \"_confirm_t8bnq_1\",\n \"cbtn\": \"_cbtn_t8bnq_1\"\n};\n\n// src/errorboundary.tsx\nimport { ErrorBoundary as SEB } from \"solid-js\";\n\n// src/errorboundary.tsx.scss\nvar css8 = `._errbound_chts3_1{padding:16px;color:var(--text-normal);font-family:var(--font-display)}._errboundtitle_chts3_1{margin-bottom:7px;font-weight:bold;font-size:24px}._errboundcode_chts3_1{background-color:var(--background-secondary);font-family:var(--font-code);user-select:text}`;\nvar classes8 = {\n \"errbound\": \"_errbound_chts3_1\",\n \"errboundtitle\": \"_errboundtitle_chts3_1\",\n \"errboundcode\": \"_errboundcode_chts3_1\"\n};\n\n// src/errorboundary.tsx\nvar ErrBoundFallback = (err, reset) => {\n ensureInternalStyle(css8);\n return <div class={classes8.errbound}><h1 class={classes8.errboundtitle}>Oops, we had a fucky wucky. (shelter)</h1><code class={classes8.errboundcode}>{err}</code><Button color={ButtonColors.RED} size={ButtonSizes.TINY} look={ButtonLooks.OUTLINED} onClick={reset}>\n Retry\n </Button></div>;\n};\nvar ErrorBoundary = (props) => <SEB fallback={ErrBoundFallback}>{props.children}</SEB>;\n\n// src/openModal.tsx\nvar [currentModals, setCurrentModals] = createSignal3([]);\nvar dispose;\nvar [animationPrePost, setAnimationPrePost] = createSignal3(true);\nvar [bgAnimPrePost, setBgAnimPrePost] = createSignal3(true);\nvar ModalRoot = () => {\n ensureInternalStyle(css7);\n let dialogEl;\n let backdropEl;\n createEffect4(() => {\n dialogEl.showModal();\n setBgAnimPrePost(false);\n dialogEl.addEventListener(\"cancel\", (ev) => {\n ev.preventDefault();\n popModal();\n });\n dialogEl.addEventListener(\"keydown\", (ev) => ev.stopImmediatePropagation());\n backdropEl.addEventListener(\"click\", popModal);\n });\n return <ReactiveRoot><dialog\n ref={dialogEl}\n classList={{\n [classes7.mroot]: true,\n [classes7.active]: !bgAnimPrePost()\n }}\n ><div ref={backdropEl} class={classes7.backdrop} /><For each={currentModals()}>{(M, idx) => <div\n classList={{\n [classes7.wrap]: true,\n [classes7.active]: idx() === currentModals().length - (animationPrePost() ? 2 : 1)\n }}\n ><ErrorBoundary><M close={() => popSpecificModal(M)} /></ErrorBoundary></div>}</For></dialog></ReactiveRoot>;\n};\ncreateEffect4(() => {\n if (currentModals().length === 0) {\n dispose?.();\n dispose = void 0;\n } else if (!dispose) {\n const root = <ModalRoot />;\n root.classList.add(\"shltr-modal-rroot\");\n document.body.append(root);\n dispose = () => root.remove();\n }\n});\nfunction popModal() {\n setAnimationPrePost(true);\n if (currentModals().length === 1)\n setBgAnimPrePost(true);\n setTimeout(() => {\n setAnimationPrePost(false);\n setCurrentModals(currentModals().slice(0, -1));\n }, 250);\n}\nfunction popSpecificModal(comp) {\n setAnimationPrePost(true);\n if (currentModals().length === 1)\n setBgAnimPrePost(true);\n setTimeout(() => {\n setAnimationPrePost(false);\n setCurrentModals(currentModals().filter((m) => m !== comp));\n }, 250);\n}\nfunction openModal(comp) {\n setAnimationPrePost(true);\n setCurrentModals([...currentModals(), comp]);\n setTimeout(() => setAnimationPrePost(false));\n return () => popSpecificModal(comp);\n}\n\n// src/modals.tsx\nimport { onCleanup as onCleanup3 } from \"solid-js\";\n\n// src/icons.tsx\nvar IconClose = (props) => <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" {...props}><path\n fill=\"currentColor\"\n d=\"M18.4 4L12 10.4L5.6 4L4 5.6L10.4 12L4 18.4L5.6 20L12 13.6L18.4 20L20 18.4L13.6 12L20 5.6L18.4 4Z\"\n/></svg>;\nvar IconAdd = (props) => <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n {...props}\n style={{\n \"margin-bottom\": \"-4px\",\n ...props.style\n }}\n><path\n fill=\"currentColor\"\n d=\"M20 11.1111H12.8889V4H11.1111V11.1111H4V12.8889H11.1111V20H12.8889V12.8889H20V11.1111Z\"\n/></svg>;\nvar IconBin = (props) => <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n {...props}\n style={{\n \"margin-bottom\": \"-4px\",\n ...props.style\n }}\n><path\n fill=\"currentColor\"\n d=\"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12 1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z\"\n/></svg>;\nvar IconCog = (props) => <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n {...props}\n style={{\n \"margin-bottom\": \"-4px\",\n ...props.style\n }}\n><path\n fill=\"currentColor\"\n d=\"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z\"\n/></svg>;\nvar IconEdit = (props) => <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 -960 960 960\"\n {...props}\n style={{\n \"margin-bottom\": \"-4px\",\n ...props.style\n }}\n><path\n fill=\"currentColor\"\n d=\"M200-200h57l391-391-57-57-391 391v57Zm-80 80v-170l528-527q12-11 26.5-17t30.5-6q16 0 31 6t26 18l55 56q12 11 17.5 26t5.5 30q0 16-5.5 30.5T817-647L290-120H120Zm640-584-56-56 56 56Zm-141 85-28-29 57 57-29-28Z\"\n/></svg>;\nvar IconUpdate = (props) => <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 -960 960 960\"\n {...props}\n style={{\n \"margin-bottom\": \"-4px\",\n ...props.style\n }}\n><path\n fill=\"currentColor\"\n d=\"M240-120v-80l40-40H160q-33 0-56.5-23.5T80-320v-440q0-33 23.5-56.5T160-840h320v80H160v440h640v-120h80v120q0 33-23.5 56.5T800-240H680l40 40v80H240Zm360-240L400-560l56-56 104 103v-327h80v327l104-103 56 56-200 200Z\"\n/></svg>;\nvar IconUpload = (props) => <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 -960 960 960\"\n {...props}\n style={{\n \"margin-bottom\": \"-4px\",\n ...props.style\n }}\n><path\n fill=\"currentColor\"\n d=\"M440-200h80v-167l64 64 56-57-160-160-160 160 57 56 63-63v167ZM240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h320l240 240v480q0 33-23.5 56.5T720-80H240Zm280-520v-200H240v640h480v-440H520ZM240-800v200-200 640-640Z\"\n/></svg>;\nvar IconInfo = (props) => <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 -960 960 960\"\n {...props}\n style={{\n \"margin-bottom\": \"-4px\",\n ...props.style\n }}\n><path\n fill=\"currentColor\"\n d=\"M440-280h80v-240h-80v240Zm40-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z\"\n/></svg>;\n\n// src/modals.tsx\nvar ModalSizes = {\n SMALL: classes7.sm,\n MEDIUM: classes7.md\n};\nvar ModalRoot2 = (props) => <div\n onclick={(e) => e.stopPropagation()}\n class={`${classes7.modal} ${props.size ?? ModalSizes.SMALL} ${props.class ?? \"\"}`}\n style={props.style}\n>{props.children}</div>;\nvar ModalFooter = (props) => <div class={classes7.foot}>{props.children}</div>;\nvar ModalHeader = (props) => <div class={classes7.head}><Header tag={HeaderTags.H1}>{props.children}</Header><button\n use:focusring\n use:tooltip=\"Close modal\"\n aria-label=\"close modal\"\n class={classes7.cbtn}\n style={props.noClose ? \"display: none\" : \"\"}\n onclick={props.close}\n><IconClose /></button></div>;\nvar ModalBody = (props) => <div class={classes7.body}>{props.children}</div>;\nvar confirmColours = {\n danger: ButtonColors.RED,\n confirm: ButtonColors.GREEN\n};\nvar ModalConfirmFooter = (props) => <ModalFooter><div class={classes7.confirm}><Button\n disabled={props.cancelDisabled}\n size={ButtonSizes.MEDIUM}\n color={ButtonColors.SECONDARY}\n onClick={() => {\n props.onCancel?.();\n props.close();\n }}\n>{props.cancelText ?? \"Cancel\"}</Button><Button\n disabled={props.disabled}\n size={ButtonSizes.MEDIUM}\n color={confirmColours[props.type ?? \"neutral\"]}\n onClick={() => {\n props.onConfirm?.();\n props.close();\n }}\n>{props.confirmText ?? \"Confirm\"}</Button></div></ModalFooter>;\nvar openConfirmationModal = ({\n body,\n header,\n confirmText,\n cancelText,\n type,\n size\n}) => new Promise((res, rej) => {\n openModal((props) => {\n onCleanup3(rej);\n return <ModalRoot2 size={size}><ModalHeader close={props.close}>{header({})}</ModalHeader><ModalBody>{body({})}</ModalBody><ModalConfirmFooter\n onConfirm={res}\n onCancel={rej}\n close={props.close}\n confirmText={confirmText}\n cancelText={cancelText}\n type={type}\n /></ModalRoot2>;\n });\n});\n\n// src/textbox.tsx\nimport { createEffect as createEffect5, mergeProps as mergeProps2, splitProps as splitProps5 } from \"solid-js\";\n\n// src/textbox.tsx.scss\nvar css9 = `._tbox_jhwx0_1,._tarea_jhwx0_1{box-sizing:border-box;width:100%;padding:10px;border:none;border-radius:3px;background-color:var(--input-background);color:var(--text-normal);font-size:16px;transition:border-color .2s ease-in-out}._tbox_jhwx0_1{flex-grow:1;height:40px;margin-right:20px}._tarea_jhwx0_1{resize:none}._rx_jhwx0_1{resize:horizontal}._ry_jhwx0_1{resize:vertical}._rx_jhwx0_1._ry_jhwx0_1{resize:both}._mono_jhwx0_1,._mono_jhwx0_1::placeholder{font-family:var(--font-code)}`;\nvar classes9 = {\n \"tbox\": \"_tbox_jhwx0_1\",\n \"tarea\": \"_tarea_jhwx0_1\",\n \"rx\": \"_rx_jhwx0_1\",\n \"ry\": \"_ry_jhwx0_1\",\n \"mono\": \"_mono_jhwx0_1\"\n};\n\n// src/textbox.tsx\nvar TextBox = (rawProps) => {\n ensureInternalStyle(css9);\n const [local, other] = splitProps5(\n mergeProps2(\n {\n maxlength: rawProps.maxLength ?? 999\n },\n rawProps\n ),\n [\"value\", \"onInput\", \"maxLength\"]\n );\n let r;\n createEffect5(() => {\n if (r && local.value !== r.value) {\n r.value = local.value;\n }\n });\n return <input\n use:focusring\n class={classes9.tbox}\n type=\"text\"\n ref={r}\n onInput={(e) => local.onInput(e.target.value)}\n {...other}\n />;\n};\nvar TextArea = (rawProps) => {\n ensureInternalStyle(css9);\n const [local, other] = splitProps5(rawProps, [\"value\", \"resize-x\", \"resize-y\", \"mono\", \"onInput\"]);\n let r;\n createEffect5(() => {\n if (local.value !== r?.value && r) {\n r.value = local.value;\n }\n });\n return <textarea\n use:focusring\n classList={{\n [classes9.tarea]: true,\n [classes9.rx]: local[\"resize-x\"],\n [classes9.ry]: local[\"resize-y\"],\n [classes9.mono]: local.mono\n }}\n ref={r}\n onInput={(e) => local.onInput(e.target.value)}\n {...other}\n />;\n};\n\n// src/toasts/index.tsx.scss\nvar css10 = `@keyframes _shltr-toast-fadeIn_l7jrh_1{0%{opacity:0}100%{opacity:1}}._toastcontainer_l7jrh_1{display:flex;z-index:999999;position:absolute;top:0;right:0;bottom:0;left:0;flex-direction:column-reverse;align-items:flex-end;pointer-events:none}._toast_l7jrh_1{display:flex;flex-direction:column;align-content:center;justify-content:center;max-width:400px;margin-right:10px;margin-bottom:10px;padding:18px;gap:14px;border-radius:5px;background-color:var(--background-floating);box-shadow:var(--elevation-high);overflow-wrap:anywhere;animation:_shltr-toast-fadeIn_l7jrh_1 .3s;pointer-events:all}._toasttitle_l7jrh_1{font-size:22px;line-height:1}`;\nvar classes10 = {\n \"toastcontainer\": \"_toastcontainer_l7jrh_1\",\n \"toast\": \"_toast_l7jrh_1\",\n \"shltrToastFadeIn\": \"_shltr-toast-fadeIn_l7jrh_1\",\n \"toasttitle\": \"_toasttitle_l7jrh_1\"\n};\n\n// src/toasts/store.ts\nimport { createSignal as createSignal4 } from \"solid-js\";\nvar [sig, setSig] = createSignal4([]);\nvar toasts = () => Object.freeze(sig());\nvar setToasts = (t) => setSig(t);\n\n// src/toasts/index.tsx\nimport { render as render2 } from \"solid-js/web\";\n\n// src/toasts/ToastContainer.tsx\nimport { Dynamic as Dynamic2 } from \"solid-js/web\";\nvar ToastContainer_default = () => <>{toasts().map((t) => <Dynamic2 component={t} />)}</>;\n\n// src/toasts/Toast.tsx\nvar Toast_default = (props) => <div onClick={props.onClick} class={`${classes10.toast} ${props.class ?? \"\"}`}>{props.title && <Header tag={HeaderTags.H1} class={classes10.toasttitle}>{props.title}</Header>}{props.content && <div><Text>{props.content}</Text></div>}</div>;\n\n// src/toasts/index.tsx\nfunction initToasts(mountPoint) {\n const injected = injectCss(css10);\n const toastDiv = <div class={classes10.toastcontainer} />;\n mountPoint.prepend(toastDiv);\n const unmount = render2(() => <ToastContainer_default />, toastDiv);\n return () => {\n unmount();\n toastDiv.remove();\n injected();\n };\n}\nfunction showToast({\n title = void 0,\n content = void 0,\n onClick = () => {\n },\n class: _class = void 0,\n duration = 3e3\n}) {\n const toast = () => <Toast_default {...{ onClick, class: _class, title, content }} />;\n setToasts([...toasts(), toast]);\n const removeFunc = () => setToasts([...toasts().filter((t) => t !== toast)]);\n if (duration !== Infinity)\n setTimeout(removeFunc, duration);\n return removeFunc;\n}\n\n// src/slider.tsx\nimport { mergeProps as mergeProps3, splitProps as splitProps6 } from \"solid-js\";\n\n// src/slider.tsx.scss\nvar css11 = `._scontainer_1hew3_1{display:flex;position:relative;align-items:center;width:100%;height:54px;margin-bottom:16px;color:var(--header-secondary);font-size:10px}._srange_1hew3_1{appearance:none;-webkit-appearance:none;width:100%;background:rgba(0,0,0,0);cursor:pointer;--upper-half: 0%;z-index:2;--track-bg: var(--primary-500)}.theme-light ._srange_1hew3_1{--track-bg: var(--primary-200)}._srange_1hew3_1::-ms-track{appearance:none;-webkit-appearance:none;height:8px;border-radius:3px;background:linear-gradient(to right, var(--brand-500) var(--upper-half), var(--brand-500) var(--upper-half), var(--track-bg) var(--upper-half), var(--track-bg) 100%)}._srange_1hew3_1::-webkit-slider-runnable-track{appearance:none;-webkit-appearance:none;height:8px;border-radius:3px;background:linear-gradient(to right, var(--brand-500) var(--upper-half), var(--brand-500) var(--upper-half), var(--track-bg) var(--upper-half), var(--track-bg) 100%)}._srange_1hew3_1::-moz-range-track{appearance:none;-webkit-appearance:none;height:8px;border-radius:3px;background:linear-gradient(to right, var(--brand-500) var(--upper-half), var(--brand-500) var(--upper-half), var(--track-bg) var(--upper-half), var(--track-bg) 100%)}._srange_1hew3_1::-ms-thumb{appearance:none;-webkit-appearance:none;top:50%;width:10px;height:24px;border:1px solid var(--primary-200);border-radius:3px;background-color:var(--white-500);box-shadow:0 3px 1px 0 hsl(var(--black-500-hsl)/5%),0 2px 2px 0 hsl(var(--black-500-hsl)/0.1),0 3px 3px 0 hsl(var(--black-500-hsl)/5%);cursor:ew-resize}._srange_1hew3_1::-moz-range-thumb{appearance:none;-webkit-appearance:none;top:50%;width:10px;height:24px;border:1px solid var(--primary-200);border-radius:3px;background-color:var(--white-500);box-shadow:0 3px 1px 0 hsl(var(--black-500-hsl)/5%),0 2px 2px 0 hsl(var(--black-500-hsl)/0.1),0 3px 3px 0 hsl(var(--black-500-hsl)/5%);cursor:ew-resize}._srange_1hew3_1::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;top:50%;width:10px;height:24px;border:1px solid var(--primary-200);border-radius:3px;background-color:var(--white-500);box-shadow:0 3px 1px 0 hsl(var(--black-500-hsl)/5%),0 2px 2px 0 hsl(var(--black-500-hsl)/0.1),0 3px 3px 0 hsl(var(--black-500-hsl)/5%);cursor:ew-resize;margin-top:-8px}._sticks_1hew3_1{display:flex;z-index:1;position:absolute;top:0;left:0;align-items:center;justify-content:space-between;width:100%;height:100%;pointer-events:none}._stick_1hew3_1{display:flex;z-index:1;flex-direction:column;align-items:center;justify-content:flex-start;width:12px;height:100%}._stickline_1hew3_1{width:1px;height:40%;margin-top:6px;background-color:var(--primary-500)}`;\nvar classes11 = {\n \"scontainer\": \"_scontainer_1hew3_1\",\n \"srange\": \"_srange_1hew3_1\",\n \"sticks\": \"_sticks_1hew3_1\",\n \"stick\": \"_stick_1hew3_1\",\n \"stickline\": \"_stickline_1hew3_1\"\n};\n\n// src/slider.tsx\nvar Slider2 = (rawProps) => {\n ensureInternalStyle(css11);\n const [local, other] = splitProps6(\n mergeProps3(\n {\n step: \"any\",\n value: rawProps.min\n },\n rawProps\n ),\n [\"onInput\", \"style\"]\n );\n const ticks = () => {\n if (!other.tick || typeof other.step !== \"number\") {\n return [];\n }\n const spacing = other.tick === true ? other.step : other.tick;\n return Object.keys(Array(Math.floor((other.max - other.min) / spacing) + 1).fill(0)).map(\n (v) => parseInt(v) * spacing\n );\n };\n return <div class={classes11.scontainer}><input\n type=\"range\"\n {...other}\n class={classes11.srange}\n style={{\n ...local.style,\n \"--upper-half\": `${(other.value - other.min) / (other.max - other.min) * 100}%`\n }}\n onInput={(e) => local.onInput?.(parseFloat(e.target.value))}\n /><div class={classes11.sticks}>{ticks().map((t) => <div class={classes11.stick}><span>{t}</span><div class={classes11.stickline} /></div>)}</div></div>;\n};\n\n// src/index.tsx\nvar Text = (props) => <span\n {...props}\n style={{\n color: \"var(--text-normal)\",\n ...props.style\n }}\n/>;\nvar Divider = (props) => {\n const [local, divProps] = splitProps7(props, [\"mt\", \"mb\", \"style\"]);\n return <div\n role=\"separator\"\n {...divProps}\n style={{\n \"margin-top\": typeof local.mt === \"string\" ? local.mt : local.mt ? \"20px\" : \"\",\n \"margin-bottom\": typeof local.mb === \"string\" ? local.mb : local.mb ? \"20px\" : \"\",\n width: \"100%\",\n height: \"1px\",\n \"border-top\": \"thin solid var(--background-modifier-accent)\",\n ...local.style\n }}\n />;\n};\nvar Space = (props) => <pre\n {...props}\n style={{\n display: \"inline\",\n ...props.style\n }}\n>{\" \"}</pre>;\nexport {\n Button,\n ButtonColors,\n ButtonLooks,\n ButtonSizes,\n Checkbox,\n CheckboxItem,\n Divider,\n ErrorBoundary,\n Header,\n HeaderTags,\n IconAdd,\n IconBin,\n IconClose,\n IconCog,\n IconEdit,\n IconInfo,\n IconUpdate,\n IconUpload,\n InternalStyles,\n LinkButton,\n ModalBody,\n ModalConfirmFooter,\n ModalFooter,\n ModalHeader,\n ModalRoot2 as ModalRoot,\n ModalSizes,\n ReactiveRoot,\n Slider2 as Slider,\n Space,\n Switch,\n SwitchItem,\n Text,\n TextArea,\n TextBox,\n cleanupCss,\n focusring,\n genId,\n getRoot,\n initToasts,\n injectCss,\n injectInternalStyles,\n niceScrollbarsClass,\n openConfirmationModal,\n openModal,\n showToast,\n tooltip\n};\n", "import { batch, createSignal, onCleanup } from \"solid-js\";\nimport { getDispatcher, intercept } from \"../flux\";\nimport { Fiber, FluxStore, FiberOwner } from \"../types\";\n\ndeclare global {\n interface Element {\n [k: `__reactFiber$${string}`]: Fiber;\n }\n}\n\n// the randomKey that React adds after __reactFiber$ is the same for all elements created by the React instance\n// so it's sensible to cache it\n// see https://github.com/facebook/react/blob/2a9f4c04e54294b668e0a2ae11c1930c2e57b248/packages/react-dom-bindings/src/client/ReactDOMComponentTree.js#L39\nlet fiberKey: string;\nexport const getFiber = (n: Element): Fiber => {\n if (fiberKey && n[fiberKey]) return n[fiberKey];\n return n[(fiberKey = Object.keys(n).find((key) => key.startsWith(\"__reactFiber$\")) ?? fiberKey)];\n};\n\nexport const getFiberOwner = (n: Element | Fiber): undefined | null | FiberOwner => {\n const filter = ({ stateNode }: Fiber) => stateNode && !(stateNode instanceof Element);\n return reactFiberWalker(n instanceof Element ? getFiber(n) : n, filter, true)?.stateNode as\n | undefined\n | null\n | FiberOwner;\n};\n\nexport function reactFiberWalker(\n node: Fiber,\n filter: string | symbol | ((node: Fiber) => boolean),\n goUp = false,\n ignoreStringType = false,\n recursionLimit = 100,\n): undefined | null | Fiber {\n if (recursionLimit === 0) return;\n\n if (typeof filter !== \"function\") {\n const prop = filter;\n filter = (n) => n?.pendingProps?.[prop] !== undefined;\n }\n\n if (!node) return;\n if (filter(node) && (ignoreStringType ? typeof node.type !== \"string\" : true)) return node;\n\n return (\n reactFiberWalker(goUp ? node.return : node.child, filter, goUp, ignoreStringType, recursionLimit - 1) ??\n reactFiberWalker(node.sibling, filter, goUp, ignoreStringType, recursionLimit - 1)\n );\n}\n\nexport const awaitDispatch = (filter: string | ((payload: any) => boolean)) =>\n new Promise<any>(async (res) => {\n const filterFunc = typeof filter === \"string\" ? (payload) => payload?.type === filter : filter;\n const unintercept = intercept((p: any) => {\n if (filterFunc(p)) {\n res(p);\n unintercept();\n }\n });\n });\n\nexport function log(text: any, func?: \"log\" | \"warn\" | \"error\"): void;\nexport function log(text: any[], func?: \"log\" | \"warn\" | \"error\"): void;\nexport function log(text: any[], func: \"log\" | \"warn\" | \"error\" = \"log\") {\n console[func](\n \"%cshelter%c\",\n \"background: linear-gradient(180deg, #2A3B4B 0%, #2BFAAC 343.17%); color: white; padding: 6px; border-radius: 4px;\",\n \"\",\n ...(Array.isArray(text) ? text : [text]),\n );\n}\n\n// listens for dispatches with the given type and returns a signal with the data of the most recent dispatch\n// of that type. signal is undefined between listener create and first dispatch.\nexport function createListener(type: string): () => any {\n const [subData, setSubData] = createSignal();\n\n let cancel = false,\n dispatcher;\n getDispatcher().then((d) => {\n if (cancel) return;\n dispatcher = d;\n dispatcher.subscribe(type, setSubData);\n });\n\n onCleanup(() => {\n cancel = true;\n dispatcher?.unsubscribe(type, setSubData);\n });\n\n return subData;\n}\n\n// gets the data from a flux store reactively\nexport function createSubscription<TState, TStoreData = Record<string, any>>(\n store: FluxStore<TStoreData>,\n getStateFromStore: (store: FluxStore<TStoreData>) => TState,\n): () => TState {\n const [data, setData] = createSignal(getStateFromStore(store));\n\n const cb = () => setData(() => getStateFromStore(store));\n store.addChangeListener(cb);\n onCleanup(() => store.removeChangeListener(cb));\n\n return data;\n}\n\nexport const storeAssign = <T>(store: T, toApply: T) => batch(() => Object.assign(store, toApply));\n\nexport const sleep = (ms = 0) => new Promise((r) => setTimeout(r, ms));\n\n// pretty-print an error\nexport function prettifyError(e: any) {\n if (typeof e !== \"object\") return `[Unknown Error]: ${e}`;\n\n // yes, Error.prototype.name exists, however other types may not use it e.g.\n const errorNameRaw = e.constructor?.name;\n const errorName = !errorNameRaw || errorNameRaw === \"Object\" ? \"[Unknown Error]\" : errorNameRaw;\n\n // are we a real error object? we should have a stack trace!\n if (typeof e.stack === \"string\") {\n // are we on a chromium browser? if so, the stack already contains the error\n if (e.stack.startsWith(errorName)) return e.stack;\n\n // add the error to the start of the stack trace, to match chromium behaviour:\n return `${errorName}: ${e.message ?? e + \"\"}\\n${e.stack}`;\n }\n\n // okay, we don't have a stack, let's just print the thing\n return `${errorName}: ${e.message ?? e + \"\"}`;\n}\n\nexport * from \"./scopedApi\";\n", "import { Dispatcher, FluxStore } from \"../types\";\nimport exfiltrate from \"../exfiltrate\";\n\ndeclare global {\n interface Object {\n _dispatcher?: Dispatcher;\n }\n}\n\nlet dispatcher: Promise<Dispatcher>;\n\nexport async function getDispatcher() {\n if (dispatcher) return dispatcher;\n\n // Promises bubble up, this is fine.\n return (dispatcher = exfiltrate(\"_dispatcher\", true).then((fluxstore) => fluxstore._dispatcher as Dispatcher));\n}\n\nexport const stores: Record<string, FluxStore | FluxStore[]> = {};\n\n// noinspection JSIgnoredPromiseFromCall\nexfiltrate(\"_dispatchToken\", true, (store: FluxStore) => {\n const name = store.getName();\n if (!stores[name]) {\n stores[name] = store;\n onStoreFound(store);\n } else {\n if (Array.isArray(stores[name])) (stores[name] as FluxStore[]).push(store);\n else stores[name] = [stores[name] as FluxStore, store];\n }\n\n // abusing the \"filter\" to just steal all the stores\n // but why not?\n return false;\n});\n\n// I would make this pass `any` but IDE support is always nice!\ntype Intercept = (payload: Record<string, any> & { type: string }) => any;\n\nlet intercepts: Intercept[] = [];\nlet interceptInjected = false;\n\nexport const blockedSym = Symbol();\nexport const modifiedSym = Symbol();\n\nasync function injectIntercept() {\n if (interceptInjected) return;\n interceptInjected = true;\n\n const FluxDispatcher = await getDispatcher();\n\n FluxDispatcher._interceptors ??= [];\n\n const cb = (payload) => {\n const apply = (obj) => {\n for (const k in Reflect.ownKeys(payload)) delete payload[k];\n\n Object.assign(payload, obj);\n payload[modifiedSym] = 1;\n };\n\n let blocked = false;\n\n for (const intercept of intercepts) {\n const res = intercept(payload);\n\n // legacy return type handler: [modified, shouldDrop]\n if (Array.isArray(res)) {\n if (res[1]) {\n payload[blockedSym] = 1;\n blocked = true;\n }\n apply(res[0]);\n }\n // current API: nullish -> nothing, falsy -> block, object -> modify\n // NON-strict eq intentional here\n else if (res == null) continue;\n else if (!res) {\n payload[blockedSym] = 1;\n blocked = true;\n } else if (typeof res === \"object\") apply(res);\n }\n\n return blocked;\n };\n\n FluxDispatcher._interceptors.splice(0, 0, cb);\n\n return () => (FluxDispatcher._interceptors = FluxDispatcher._interceptors?.filter((v) => v !== cb));\n}\n\nexport function intercept(cb: Intercept) {\n // noinspection JSIgnoredPromiseFromCall\n injectIntercept();\n\n intercepts.push(cb);\n\n return () => {\n intercepts = intercepts.filter((i) => i !== cb);\n };\n}\n\nexport const storesFlat = new Proxy<Record<string, FluxStore>>(stores as any, {\n get: (_, name: string) => stores[name]?.[0] ?? stores[name],\n set() {\n throw new Error(\"do not try to mutate flatStores\");\n },\n deleteProperty() {\n throw new Error(\"do not try to mutate flatStores\");\n },\n defineProperty() {\n throw new Error(\"do not try to mutate flatStores\");\n },\n setPrototypeOf() {\n throw new Error(\"do not try to mutate flatStores\");\n },\n});\n\nconst storeInitPromises = new WeakMap<FluxStore, Promise<void>>();\n\n// awaits until the _isInitialized property of a store is true by overwritting it's setter\nfunction awaitStoreInit(store: FluxStore): Promise<void> {\n if (store._isInitialized) return;\n\n if (storeInitPromises.has(store)) {\n return storeInitPromises.get(store);\n }\n const initPromise = new Promise<void>((resolve) => {\n let actualIsInitialized = false;\n\n Object.defineProperty(store, \"_isInitialized\", {\n get() {\n return actualIsInitialized;\n },\n set(value) {\n actualIsInitialized = value;\n if (value === true) {\n resolve();\n storeInitPromises.delete(store);\n }\n },\n });\n });\n storeInitPromises.set(store, initPromise);\n return initPromise;\n}\n\nconst storeCallbacks: Record<string, ((store: FluxStore) => void)[]> = {};\n\nfunction onStoreFound(store: FluxStore) {\n const name = store?.getName();\n storeCallbacks[name]?.forEach((c) => c(store));\n delete storeCallbacks[name];\n}\n\nasync function getStoreOnCallback(name: string) {\n return new Promise<FluxStore>((resolve) => {\n if (!storeCallbacks[name]) {\n storeCallbacks[name] = [resolve];\n } else {\n storeCallbacks[name].push(resolve);\n }\n });\n}\n\nexport async function awaitStore(name: string, awaitInit = true): Promise<FluxStore> {\n const store: FluxStore = stores[name]?.[0] ?? stores[name] ?? (await getStoreOnCallback(name));\n if (awaitInit) await awaitStoreInit(store);\n return store;\n}\n\nexport * from \"./dispatchLogger\";\n", "import { after } from \"spitroast\";\nconst origDefineProperty = Object.defineProperty;\nconst current = new Set<string>();\n\nexport default function (prop: string, patchDefine: boolean, filter?: (t: any) => boolean, qmt?: boolean) {\n if (current[prop]) throw new Error(`Already exfiltrating ${prop}!`);\n\n const protoKey = Symbol(prop);\n let hitProto = false;\n let unpatchDefine: () => void;\n\n const cleanup = () => {\n unpatchDefine?.();\n if (!hitProto) delete Object.prototype[prop];\n };\n\n return new Promise<any>((res) => {\n origDefineProperty(Object.prototype, prop, {\n configurable: true,\n enumerable: false,\n set(v: any) {\n if (this === Object.prototype) {\n hitProto = true;\n Object.prototype[protoKey] = v;\n return;\n }\n\n origDefineProperty(this, prop, {\n configurable: true,\n writable: true,\n enumerable: true,\n value: v,\n });\n\n const run = qmt ? queueMicrotask : (c) => c();\n\n run(() => {\n if (!filter || filter(this)) {\n cleanup();\n res(this);\n }\n });\n },\n\n get() {\n return this[protoKey];\n },\n });\n\n if (!patchDefine) return;\n unpatchDefine = after(\"defineProperty\", Object, (args) => {\n if (args[1] === prop) {\n queueMicrotask(() => {\n if (!filter || filter(args[0])) {\n cleanup();\n res(args[0]);\n }\n });\n }\n });\n });\n}\n", "import { batch, createSignal, Signal, untrack } from \"solid-js\";\nimport { IDBPDatabase, openDB } from \"idb\";\nimport { log } from \"./util\";\n\n// can't use a solid store as i could do with bespoke logic for idb\n// so heres a custom proxy impl -- sink\n\n// idb cannot directly store solid mutables so this clones them\nfunction cloneRec(node: unknown, seenNodes: object[] = []) {\n switch (typeof node) {\n case \"function\":\n case \"symbol\":\n //throw new Error\n log(`can't store a ${typeof node} in a shelter storage!`, \"error\");\n return undefined;\n\n case \"object\":\n if (seenNodes?.includes(node)) throw new Error(\"can't store a circular reference in a shelter storage!\");\n\n const newObj = Array.isArray(node) ? [] : {};\n for (const k of Object.keys(node)) {\n newObj[k] = cloneRec(node[k], [...seenNodes, node]);\n }\n return newObj;\n\n default:\n return node as undefined | boolean | number | string | bigint;\n }\n}\n\nconst symWait = Symbol();\nconst symDb = Symbol();\nconst symSig = Symbol();\n\ninterface ShelterStore<T> {\n [_: string]: T;\n\n [symWait]: (cb: () => void) => void;\n [symDb]: IDBPDatabase<any>;\n [symSig]: () => Record<string, T>;\n}\n\n// we have to mutex opening the db for adding new stores etc to work correctly\nlet storesToAdd: string[] = [];\nlet getDbPromise: Promise<IDBPDatabase<any>>;\n\nasync function getDb(store: string) {\n storesToAdd.push(store);\n\n if (storesToAdd.length > 1) return getDbPromise;\n\n const prom = openDB(\"shelter\", Date.now(), {\n upgrade(udb) {\n for (const name of storesToAdd) if (!udb.objectStoreNames.contains(name)) udb.createObjectStore(name);\n },\n }).then((db) => {\n storesToAdd = [];\n\n return db;\n });\n\n return (getDbPromise = prom);\n}\n\nexport const storage = <T = any>(name: string) => {\n // for signals that were created by a get call because their values were not set yet\n const pendingSignals: Record<string, Signal<any>> = {};\n const signals: Record<string, Signal<any>> = {};\n let db: IDBPDatabase<any>;\n // these are only relevant before the database is connected, to allow premature write operations\n let modifiedKeys = new Set<string>();\n let deletedKeys = new Set<string>();\n\n // queues callbacks for when the db loads\n const waitQueue: (() => void)[] = [];\n const waitInit = (cb: () => void) => (db ? cb() : waitQueue.push(cb));\n\n const [mainSignal, setMainSignal] = createSignal({});\n const updateMainSignal = () => {\n const o = {};\n for (const k in signals) o[k] = untrack(() => signals[k][0]());\n setMainSignal(o);\n };\n\n getDb(name).then(async (d) => {\n const keys = await d.getAllKeys(name);\n await Promise.all(keys.map(async (k) => [k, await d.get(name, k)])).then((vals) => {\n // if a signal exists but wasn't modified (get), set it from db\n // if a signal exists and was modified, (set) leave it be\n // if a signal does not exist and was not deleted, create it from db\n for (const [k, v] of vals) {\n if (k in pendingSignals) {\n signals[k] = pendingSignals[k];\n delete pendingSignals[k];\n }\n if (k in signals) {\n if (!modifiedKeys.has(k)) signals[k][1](v);\n } else if (!deletedKeys.has(k)) signals[k] = createSignal(v);\n }\n\n updateMainSignal();\n });\n\n db = d;\n\n waitQueue.forEach((cb) => cb());\n });\n\n return new Proxy(<ShelterStore<T>>{}, {\n get(_, p) {\n // internal things\n if (p === symWait) return waitInit;\n if (p === symDb) return db;\n if (p === symSig) return mainSignal;\n\n if (typeof p === \"symbol\") throw new Error(\"cannot index db store with a symbol\");\n\n if (p in signals) return signals[p][0]();\n return (pendingSignals[p] ??= createSignal())[0]();\n },\n\n set(_, p, v) {\n if (typeof p === \"symbol\") throw new Error(\"cannot index db store with a symbol\");\n\n modifiedKeys.add(p);\n //deletedKeys.delete(p); // we're overwriting it anyway so if its creation is suppressed is irrelevant\n if (p in pendingSignals) {\n signals[p] = pendingSignals[p];\n delete pendingSignals[p];\n }\n const [, setSig] = (signals[p] ??= createSignal());\n setSig(() => v);\n updateMainSignal();\n\n waitInit(() => db.put(name, cloneRec(v), p));\n\n return true;\n },\n\n deleteProperty(_, p) {\n if (typeof p === \"symbol\") throw new Error(\"cannot index db store with a symbol\");\n\n //modifiedKeys.delete(p); // doesn't do anything\n deletedKeys.add(p);\n delete signals[p];\n delete pendingSignals[p];\n updateMainSignal();\n\n waitInit(() => db.delete(name, p));\n\n return true;\n },\n\n has: (_, p) => p in signals,\n\n ownKeys: () => Object.keys(signals),\n\n // without this, properties are not enumerable! (object.keys wouldn't work)\n getOwnPropertyDescriptor: (_, p) => ({\n value: p,\n enumerable: true,\n configurable: true,\n writable: true,\n }),\n });\n};\n\nexport const dbStore = storage(\"dbstore\");\n\n// stuff like this is necessary when you *need* to have gets return persisted values as well as newly set ones\n\n/** if the store is or is not yet connected to IDB */\nexport const isInited = (store: ShelterStore<unknown>) => !!store[symDb];\n/** waits for the store to connect to IDB, then runs the callback (if connected, synchronously runs the callback now) */\nexport const whenInited = (store: ShelterStore<unknown>, cb: () => void) => store[symWait](cb) as void;\n/** returns a promise that resolves when the store is connected to IDB (if connected, resolves instantly) */\nexport const waitInit = (store: ShelterStore<unknown>) => new Promise<void>((res) => whenInited(store, res));\n\n/** sets default values for the store. these only apply once the store connects to IDB to prevent overwriting persist */\nexport const defaults = <T = any>(store: ShelterStore<T>, fallbacks: Record<string, T>) =>\n whenInited(store, () =>\n batch(() => {\n for (const k in fallbacks) if (!(k in store)) store[k] = fallbacks[k];\n }),\n );\n\n/** gets a signal containing the whole store as an object */\nexport const signalOf = <T = any>(store: ShelterStore<T>): (() => Record<string, T>) => store[symSig];\n\n/** wraps a solid mutable to provide a global signal */\nexport const solidMutWithSignal = <T extends object = any>(store: T) => {\n const [sig, setSig] = createSignal<T>();\n const update = () => setSig(() => ({ ...store }));\n return [\n new Proxy(store, {\n set(t, p, v, r) {\n const success = Reflect.set(t, p, v, r);\n if (success) update();\n return success;\n },\n deleteProperty(t, p) {\n const success = Reflect.deleteProperty(t, p);\n if (success) update();\n return success;\n },\n }),\n sig,\n ] as const;\n};\n", "const instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c);\n\nlet idbProxyableTypes;\nlet cursorAdvanceMethods;\n// This is a function to prevent it throwing up in node environments.\nfunction getIdbProxyableTypes() {\n return (idbProxyableTypes ||\n (idbProxyableTypes = [\n IDBDatabase,\n IDBObjectStore,\n IDBIndex,\n IDBCursor,\n IDBTransaction,\n ]));\n}\n// This is a function to prevent it throwing up in node environments.\nfunction getCursorAdvanceMethods() {\n return (cursorAdvanceMethods ||\n (cursorAdvanceMethods = [\n IDBCursor.prototype.advance,\n IDBCursor.prototype.continue,\n IDBCursor.prototype.continuePrimaryKey,\n ]));\n}\nconst cursorRequestMap = new WeakMap();\nconst transactionDoneMap = new WeakMap();\nconst transactionStoreNamesMap = new WeakMap();\nconst transformCache = new WeakMap();\nconst reverseTransformCache = new WeakMap();\nfunction promisifyRequest(request) {\n const promise = new Promise((resolve, reject) => {\n const unlisten = () => {\n request.removeEventListener('success', success);\n request.removeEventListener('error', error);\n };\n const success = () => {\n resolve(wrap(request.result));\n unlisten();\n };\n const error = () => {\n reject(request.error);\n unlisten();\n };\n request.addEventListener('success', success);\n request.addEventListener('error', error);\n });\n promise\n .then((value) => {\n // Since cursoring reuses the IDBRequest (*sigh*), we cache it for later retrieval\n // (see wrapFunction).\n if (value instanceof IDBCursor) {\n cursorRequestMap.set(value, request);\n }\n // Catching to avoid \"Uncaught Promise exceptions\"\n })\n .catch(() => { });\n // This mapping exists in reverseTransformCache but doesn't doesn't exist in transformCache. This\n // is because we create many promises from a single IDBRequest.\n reverseTransformCache.set(promise, request);\n return promise;\n}\nfunction cacheDonePromiseForTransaction(tx) {\n // Early bail if we've already created a done promise for this transaction.\n if (transactionDoneMap.has(tx))\n return;\n const done = new Promise((resolve, reject) => {\n const unlisten = () => {\n tx.removeEventListener('complete', complete);\n tx.removeEventListener('error', error);\n tx.removeEventListener('abort', error);\n };\n const complete = () => {\n resolve();\n unlisten();\n };\n const error = () => {\n reject(tx.error || new DOMException('AbortError', 'AbortError'));\n unlisten();\n };\n tx.addEventListener('complete', complete);\n tx.addEventListener('error', error);\n tx.addEventListener('abort', error);\n });\n // Cache it for later retrieval.\n transactionDoneMap.set(tx, done);\n}\nlet idbProxyTraps = {\n get(target, prop, receiver) {\n if (target instanceof IDBTransaction) {\n // Special handling for transaction.done.\n if (prop === 'done')\n return transactionDoneMap.get(target);\n // Polyfill for objectStoreNames because of Edge.\n if (prop === 'objectStoreNames') {\n return target.objectStoreNames || transactionStoreNamesMap.get(target);\n }\n // Make tx.store return the only store in the transaction, or undefined if there are many.\n if (prop === 'store') {\n return receiver.objectStoreNames[1]\n ? undefined\n : receiver.objectStore(receiver.objectStoreNames[0]);\n }\n }\n // Else transform whatever we get back.\n return wrap(target[prop]);\n },\n set(target, prop, value) {\n target[prop] = value;\n return true;\n },\n has(target, prop) {\n if (target instanceof IDBTransaction &&\n (prop === 'done' || prop === 'store')) {\n return true;\n }\n return prop in target;\n },\n};\nfunction replaceTraps(callback) {\n idbProxyTraps = callback(idbProxyTraps);\n}\nfunction wrapFunction(func) {\n // Due to expected object equality (which is enforced by the caching in `wrap`), we\n // only create one new func per func.\n // Edge doesn't support objectStoreNames (booo), so we polyfill it here.\n if (func === IDBDatabase.prototype.transaction &&\n !('objectStoreNames' in IDBTransaction.prototype)) {\n return function (storeNames, ...args) {\n const tx = func.call(unwrap(this), storeNames, ...args);\n transactionStoreNamesMap.set(tx, storeNames.sort ? storeNames.sort() : [storeNames]);\n return wrap(tx);\n };\n }\n // Cursor methods are special, as the behaviour is a little more different to standard IDB. In\n // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the\n // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense\n // with real promises, so each advance methods returns a new promise for the cursor object, or\n // undefined if the end of the cursor has been reached.\n if (getCursorAdvanceMethods().includes(func)) {\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n func.apply(unwrap(this), args);\n return wrap(cursorRequestMap.get(this));\n };\n }\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n return wrap(func.apply(unwrap(this), args));\n };\n}\nfunction transformCachableValue(value) {\n if (typeof value === 'function')\n return wrapFunction(value);\n // This doesn't return, it just creates a 'done' promise for the transaction,\n // which is later returned for transaction.done (see idbObjectHandler).\n if (value instanceof IDBTransaction)\n cacheDonePromiseForTransaction(value);\n if (instanceOfAny(value, getIdbProxyableTypes()))\n return new Proxy(value, idbProxyTraps);\n // Return the same value back if we're not going to transform it.\n return value;\n}\nfunction wrap(value) {\n // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because\n // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached.\n if (value instanceof IDBRequest)\n return promisifyRequest(value);\n // If we've already transformed this value before, reuse the transformed value.\n // This is faster, but it also provides object equality.\n if (transformCache.has(value))\n return transformCache.get(value);\n const newValue = transformCachableValue(value);\n // Not all types are transformed.\n // These may be primitive types, so they can't be WeakMap keys.\n if (newValue !== value) {\n transformCache.set(value, newValue);\n reverseTransformCache.set(newValue, value);\n }\n return newValue;\n}\nconst unwrap = (value) => reverseTransformCache.get(value);\n\nexport { reverseTransformCache as a, instanceOfAny as i, replaceTraps as r, unwrap as u, wrap as w };\n", "import { w as wrap, r as replaceTraps } from './wrap-idb-value.js';\nexport { u as unwrap, w as wrap } from './wrap-idb-value.js';\n\n/**\n * Open a database.\n *\n * @param name Name of the database.\n * @param version Schema version.\n * @param callbacks Additional callbacks.\n */\nfunction openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) {\n const request = indexedDB.open(name, version);\n const openPromise = wrap(request);\n if (upgrade) {\n request.addEventListener('upgradeneeded', (event) => {\n upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction), event);\n });\n }\n if (blocked) {\n request.addEventListener('blocked', (event) => blocked(\n // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n event.oldVersion, event.newVersion, event));\n }\n openPromise\n .then((db) => {\n if (terminated)\n db.addEventListener('close', () => terminated());\n if (blocking) {\n db.addEventListener('versionchange', (event) => blocking(event.oldVersion, event.newVersion, event));\n }\n })\n .catch(() => { });\n return openPromise;\n}\n/**\n * Delete a database.\n *\n * @param name Name of the database.\n */\nfunction deleteDB(name, { blocked } = {}) {\n const request = indexedDB.deleteDatabase(name);\n if (blocked) {\n request.addEventListener('blocked', (event) => blocked(\n // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n event.oldVersion, event));\n }\n return wrap(request).then(() => undefined);\n}\n\nconst readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count'];\nconst writeMethods = ['put', 'add', 'delete', 'clear'];\nconst cachedMethods = new Map();\nfunction getMethod(target, prop) {\n if (!(target instanceof IDBDatabase &&\n !(prop in target) &&\n typeof prop === 'string')) {\n return;\n }\n if (cachedMethods.get(prop))\n return cachedMethods.get(prop);\n const targetFuncName = prop.replace(/FromIndex$/, '');\n const useIndex = prop !== targetFuncName;\n const isWrite = writeMethods.includes(targetFuncName);\n if (\n // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.\n !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) ||\n !(isWrite || readMethods.includes(targetFuncName))) {\n return;\n }\n const method = async function (storeName, ...args) {\n // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :(\n const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');\n let target = tx.store;\n if (useIndex)\n target = target.index(args.shift());\n // Must reject if op rejects.\n // If it's a write operation, must reject if tx.done rejects.\n // Must reject with op rejection first.\n // Must resolve with op value.\n // Must handle both promises (no unhandled rejections)\n return (await Promise.all([\n target[targetFuncName](...args),\n isWrite && tx.done,\n ]))[0];\n };\n cachedMethods.set(prop, method);\n return method;\n}\nreplaceTraps((oldTraps) => ({\n ...oldTraps,\n get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),\n has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop),\n}));\n\nexport { deleteDB, openDB };\n", "import { blockedSym, getDispatcher, modifiedSym } from \".\";\nimport { log } from \"../util\";\nimport { dbStore, defaults } from \"../storage\";\n\ndefaults(dbStore, { logDispatch: false });\n\nexport const initDispatchLogger = async () => {\n const dispatcher = await getDispatcher();\n let backing = dispatcher._dispatch;\n\n // the patcher kept getting overwritten, so we're doing it this way!\n Object.defineProperty(Object.getPrototypeOf(dispatcher), \"_dispatch\", {\n // unpatching\n configurable: true,\n // this doesn't appear to ever get hit but i'll handle the case anyway\n set: (val) => (backing = val),\n get: () =>\n function (...args) {\n if (!dbStore.logDispatch) return backing.apply(this, args);\n\n let origDispatch;\n try {\n origDispatch = structuredClone(args[0]);\n } catch {\n origDispatch = { ...args[0] };\n }\n\n const ret = backing.apply(this, args);\n\n // interceptors modify the obj in place\n if (args[0][blockedSym]) log([\"DISPATCH BLOCKED\", args[0]], \"warn\");\n else if (args[0][modifiedSym]) log([\"DISPATCH MODIFIED FROM\", origDispatch, \"TO\", args[0]], \"warn\");\n else log(args[0]);\n\n return ret;\n },\n });\n\n return () =>\n Object.defineProperty(Object.getPrototypeOf(dispatcher), \"_dispatch\", {\n configurable: true,\n writable: true,\n value: backing,\n });\n};\n", "import { after, instead } from \"spitroast\";\nimport { DiscordHTTP, HTTPApi, HTTPRequest, HTTPResponse } from \"./types\";\n\nconst methods = [\"get\", \"post\", \"put\", \"patch\", \"del\"];\n\nlet resolve: () => void;\nexport let ready = new Promise<void>((res) => (resolve = res));\nexport let discordHttp: DiscordHTTP;\n\nconst api: HTTPApi = {\n intercept,\n ready,\n get _raw() {\n return discordHttp;\n },\n};\n\nfor (const fun of methods) {\n api[fun] = (...args: any[]) => {\n if (discordHttp === undefined) throw new Error(\"HTTP method used before API was ready\");\n return discordHttp[fun](...args);\n };\n}\n\nexport default api;\n\nconst unpatch = after(\"bind\", Function.prototype, function (args, res) {\n if (args.length !== 2 || args[0] !== null || args[1] !== \"get\") return;\n unpatch();\n return function (...args) {\n // I don't know why, but for the first call `this` is Window\n if (this && this !== window) {\n this.get = res;\n discordHttp = this;\n Object.assign(api, discordHttp);\n resolve();\n }\n return res(...args);\n };\n});\n\nexport let unpatchHttpHandlers;\nfunction patchHttpHandlers() {\n if (unpatchHttpHandlers) return;\n const patches = methods.map((fun) =>\n instead(fun, discordHttp, async (args, original) => {\n let req = args[0];\n if (typeof req === \"string\") {\n req = { url: req };\n }\n\n const iterator = intercepts[Symbol.iterator]();\n\n function send(req: HTTPRequest): Promise<HTTPResponse> {\n const { value, done } = iterator.next();\n if (!done) {\n const [method, filter, intercept] = value as Intercept;\n if (method.toLowerCase() !== fun || !filter(req.url)) return send(req);\n\n let called = false;\n function sendOnce(req: HTTPRequest): Promise<HTTPResponse> {\n if (called) throw new Error(\"You cannot call 'send' more than once.\");\n called = true;\n return send(req);\n }\n\n return intercept(req, sendOnce);\n }\n return original(req, args[1]);\n }\n\n return send(req);\n }),\n );\n\n unpatchHttpHandlers = () => patches.forEach((p) => p());\n}\n\ntype Method = \"get\" | \"post\" | \"put\" | \"patch\" | \"del\";\ntype FilterFn = (url: string) => boolean;\ntype InterceptFn = (\n req: HTTPRequest,\n send: (req: HTTPRequest | undefined) => Promise<HTTPResponse>,\n) => Promise<HTTPResponse>;\ntype Intercept = [Method, FilterFn, InterceptFn];\n\nconst intercepts: Intercept[] = [];\n\nexport function intercept(method: Method, filter: string | RegExp | FilterFn, fun: InterceptFn) {\n ready.then(patchHttpHandlers);\n\n let filterFn: FilterFn;\n if (typeof filter === \"string\") {\n filterFn = (url) => url === filter;\n } else if (filter instanceof RegExp) {\n filterFn = (url) => url.search(filter) !== -1;\n } else {\n filterFn = filter;\n }\n\n const pair: Intercept = [method, filterFn, fun];\n intercepts.push(pair);\n return () => {\n const index = intercepts.indexOf(pair);\n if (index !== -1) intercepts.splice(index, 1);\n };\n}\n", "// code source: https://github.com/KaiHax/kaihax/blob/master/src/patcher.ts\n\ntype MutationNode = HTMLElement | SVGElement;\ntype ObserverCb = (e: MutationNode) => void;\n\n/** [selector, callback, insta-canceled */\ntype Observation = [string, ObserverCb, boolean];\n\nconst observations = new Set<Observation>();\n\nconst observer = new MutationObserver((records) => {\n // de-dupe to be sure\n const changedElems = new Set<MutationNode>();\n\n for (const record of records) {\n changedElems.add(record.target as MutationNode);\n\n for (const e of record.removedNodes)\n if (e instanceof HTMLElement || e instanceof SVGElement) changedElems.add(e as MutationNode);\n }\n\n for (const elem of changedElems)\n for (const obs of observations) {\n if (elem.matches(obs[0])) obs[1](elem);\n elem\n .querySelectorAll(obs[0])\n .forEach((e) => !obs[2] && (e instanceof HTMLElement || e instanceof SVGElement) && obs[1](e));\n }\n});\n\nconst startObserving = () =>\n observer.observe(document.body, {\n subtree: true,\n childList: true,\n attributes: true,\n });\n\nconst stopObserving = () => observer.disconnect();\n\nexport function observe(sel: string, cb: ObserverCb) {\n if (observations.size === 0) startObserving();\n\n const entry: Observation = [sel, cb, false];\n observations.add(entry);\n\n const unobs = () => {\n observations.delete(entry);\n if (observations.size === 0) stopObserving();\n };\n\n unobs.now = () => {\n entry[2] = true;\n unobs();\n };\n\n return unobs;\n}\n\nexport function unobserve() {\n observations.clear();\n stopObserving();\n}\n", "import exfiltrate from \"./exfiltrate\";\n\nexport let React, ReactDOM;\n\n// react developer tools' React is an experimental build, Discord's is not\n// we need to queuemicrotask the filter & cleanup for this as otherwise react does not actually set the version in time\n// RDT does not replace react-dom\n\nexfiltrate(\"useId\", false, (r) => r?.version && !r.version.includes(\"experimental\"), true).then((v) => (React = v));\nexfiltrate(\"findDOMNode\", false).then((v) => (ReactDOM = v));\n", "import { Component, createEffect, createSignal, onCleanup } from \"solid-js\";\nimport { ReactiveRoot } from \"@uwu/shelter-ui\";\nimport { React, ReactDOM } from \"./react\";\n\nexport const ReactInSolidBridge: Component<{\n children: any;\n comp: (props: any) => any;\n props?: object;\n}> = (props) => {\n const root = <div style=\"display:contents\" />;\n\n props.props = { ...props.props, children: props.children };\n\n createEffect(() => {\n ReactDOM.render(React.createElement(props.comp, props.props), root);\n });\n\n onCleanup(() => ReactDOM?.unmountComponentAtNode(root));\n\n return root;\n};\n\nexport const SolidInReactBridge = (props: any) => {\n const ref = React.useRef();\n const propSignal = React.useRef(createSignal());\n\n propSignal.current[1](() => props.props);\n\n React.useEffect(() => {\n if (ref.current !== undefined) {\n ref.current.innerHTML = \"\";\n ref.current.append(<ReactiveRoot>{props.comp(propSignal.current[0]())}</ReactiveRoot>);\n }\n }, [props]);\n\n return React.createElement(\"div\", {\n ref,\n style: { display: \"contents\" },\n });\n};\n\nexport const renderSolidInReact = (comp: Component<any>, props?: any) => {\n return React.createElement(SolidInReactBridge, { comp, props });\n};\n", "export const css = `._wrapper_kzw1m_1{display:flex;row-gap:48px;flex-direction:column}._header_kzw1m_1{display:flex;flex-direction:row;align-items:center;gap:48px}._banner_kzw1m_1{width:280px;height:120px;cursor:pointer;transition:transform .3s cubic-bezier(0.2, 1, 0.3, 1)}._banner_kzw1m_1:active{transform:translateY(-4px)}._linkwrapper_kzw1m_1{display:flex;flex-direction:column;align-items:center;gap:.5rem}._linkwrapper_kzw1m_1>*{width:100%}`;\nexport const classes = {\n \"wrapper\": \"_wrapper_kzw1m_1\",\n \"header\": \"_header_kzw1m_1\",\n \"banner\": \"_banner_kzw1m_1\",\n \"linkwrapper\": \"_linkwrapper_kzw1m_1\"\n};\n", "import { $PROXY, $TRACK, getListener, batch, createSignal } from 'solid-js';\n\nconst $RAW = Symbol(\"store-raw\"),\n $NODE = Symbol(\"store-node\"),\n $NAME = Symbol(\"store-name\");\nfunction wrap$1(value, name) {\n let p = value[$PROXY];\n if (!p) {\n Object.defineProperty(value, $PROXY, {\n value: p = new Proxy(value, proxyTraps$1)\n });\n if (!Array.isArray(value)) {\n const keys = Object.keys(value),\n desc = Object.getOwnPropertyDescriptors(value);\n for (let i = 0, l = keys.length; i < l; i++) {\n const prop = keys[i];\n if (desc[prop].get) {\n Object.defineProperty(value, prop, {\n enumerable: desc[prop].enumerable,\n get: desc[prop].get.bind(p)\n });\n }\n }\n }\n }\n return p;\n}\nfunction isWrappable(obj) {\n let proto;\n return obj != null && typeof obj === \"object\" && (obj[$PROXY] || !(proto = Object.getPrototypeOf(obj)) || proto === Object.prototype || Array.isArray(obj));\n}\nfunction unwrap(item, set = new Set()) {\n let result, unwrapped, v, prop;\n if (result = item != null && item[$RAW]) return result;\n if (!isWrappable(item) || set.has(item)) return item;\n if (Array.isArray(item)) {\n if (Object.isFrozen(item)) item = item.slice(0);else set.add(item);\n for (let i = 0, l = item.length; i < l; i++) {\n v = item[i];\n if ((unwrapped = unwrap(v, set)) !== v) item[i] = unwrapped;\n }\n } else {\n if (Object.isFrozen(item)) item = Object.assign({}, item);else set.add(item);\n const keys = Object.keys(item),\n desc = Object.getOwnPropertyDescriptors(item);\n for (let i = 0, l = keys.length; i < l; i++) {\n prop = keys[i];\n if (desc[prop].get) continue;\n v = item[prop];\n if ((unwrapped = unwrap(v, set)) !== v) item[prop] = unwrapped;\n }\n }\n return item;\n}\nfunction getDataNodes(target) {\n let nodes = target[$NODE];\n if (!nodes) Object.defineProperty(target, $NODE, {\n value: nodes = {}\n });\n return nodes;\n}\nfunction getDataNode(nodes, property, value) {\n return nodes[property] || (nodes[property] = createDataNode(value));\n}\nfunction proxyDescriptor$1(target, property) {\n const desc = Reflect.getOwnPropertyDescriptor(target, property);\n if (!desc || desc.get || !desc.configurable || property === $PROXY || property === $NODE || property === $NAME) return desc;\n delete desc.value;\n delete desc.writable;\n desc.get = () => target[$PROXY][property];\n return desc;\n}\nfunction trackSelf(target) {\n if (getListener()) {\n const nodes = getDataNodes(target);\n (nodes._ || (nodes._ = createDataNode()))();\n }\n}\nfunction ownKeys(target) {\n trackSelf(target);\n return Reflect.ownKeys(target);\n}\nfunction createDataNode(value) {\n const [s, set] = createSignal(value, {\n equals: false,\n internal: true\n });\n s.$ = set;\n return s;\n}\nconst proxyTraps$1 = {\n get(target, property, receiver) {\n if (property === $RAW) return target;\n if (property === $PROXY) return receiver;\n if (property === $TRACK) {\n trackSelf(target);\n return receiver;\n }\n const nodes = getDataNodes(target);\n const tracked = nodes.hasOwnProperty(property);\n let value = tracked ? nodes[property]() : target[property];\n if (property === $NODE || property === \"__proto__\") return value;\n if (!tracked) {\n const desc = Object.getOwnPropertyDescriptor(target, property);\n if (getListener() && (typeof value !== \"function\" || target.hasOwnProperty(property)) && !(desc && desc.get)) value = getDataNode(nodes, property, value)();\n }\n return isWrappable(value) ? wrap$1(value) : value;\n },\n has(target, property) {\n if (property === $RAW || property === $PROXY || property === $TRACK || property === $NODE || property === \"__proto__\") return true;\n this.get(target, property, target);\n return property in target;\n },\n set() {\n return true;\n },\n deleteProperty() {\n return true;\n },\n ownKeys: ownKeys,\n getOwnPropertyDescriptor: proxyDescriptor$1\n};\nfunction setProperty(state, property, value, deleting = false) {\n if (!deleting && state[property] === value) return;\n const prev = state[property],\n len = state.length;\n if (value === undefined) delete state[property];else state[property] = value;\n let nodes = getDataNodes(state),\n node;\n if (node = getDataNode(nodes, property, prev)) node.$(() => value);\n if (Array.isArray(state) && state.length !== len) (node = getDataNode(nodes, \"length\", len)) && node.$(state.length);\n (node = nodes._) && node.$();\n}\nfunction mergeStoreNode(state, value) {\n const keys = Object.keys(value);\n for (let i = 0; i < keys.length; i += 1) {\n const key = keys[i];\n setProperty(state, key, value[key]);\n }\n}\nfunction updateArray(current, next) {\n if (typeof next === \"function\") next = next(current);\n next = unwrap(next);\n if (Array.isArray(next)) {\n if (current === next) return;\n let i = 0,\n len = next.length;\n for (; i < len; i++) {\n const value = next[i];\n if (current[i] !== value) setProperty(current, i, value);\n }\n setProperty(current, \"length\", len);\n } else mergeStoreNode(current, next);\n}\nfunction updatePath(current, path, traversed = []) {\n let part,\n prev = current;\n if (path.length > 1) {\n part = path.shift();\n const partType = typeof part,\n isArray = Array.isArray(current);\n if (Array.isArray(part)) {\n for (let i = 0; i < part.length; i++) {\n updatePath(current, [part[i]].concat(path), traversed);\n }\n return;\n } else if (isArray && partType === \"function\") {\n for (let i = 0; i < current.length; i++) {\n if (part(current[i], i)) updatePath(current, [i].concat(path), traversed);\n }\n return;\n } else if (isArray && partType === \"object\") {\n const {\n from = 0,\n to = current.length - 1,\n by = 1\n } = part;\n for (let i = from; i <= to; i += by) {\n updatePath(current, [i].concat(path), traversed);\n }\n return;\n } else if (path.length > 1) {\n updatePath(current[part], path, [part].concat(traversed));\n return;\n }\n prev = current[part];\n traversed = [part].concat(traversed);\n }\n let value = path[0];\n if (typeof value === \"function\") {\n value = value(prev, traversed);\n if (value === prev) return;\n }\n if (part === undefined && value == undefined) return;\n value = unwrap(value);\n if (part === undefined || isWrappable(prev) && isWrappable(value) && !Array.isArray(value)) {\n mergeStoreNode(prev, value);\n } else setProperty(current, part, value);\n}\nfunction createStore(...[store, options]) {\n const unwrappedStore = unwrap(store || {});\n const isArray = Array.isArray(unwrappedStore);\n const wrappedStore = wrap$1(unwrappedStore);\n function setStore(...args) {\n batch(() => {\n isArray && args.length === 1 ? updateArray(unwrappedStore, args[0]) : updatePath(unwrappedStore, args);\n });\n }\n return [wrappedStore, setStore];\n}\n\nfunction proxyDescriptor(target, property) {\n const desc = Reflect.getOwnPropertyDescriptor(target, property);\n if (!desc || desc.get || desc.set || !desc.configurable || property === $PROXY || property === $NODE || property === $NAME) return desc;\n delete desc.value;\n delete desc.writable;\n desc.get = () => target[$PROXY][property];\n desc.set = v => target[$PROXY][property] = v;\n return desc;\n}\nconst proxyTraps = {\n get(target, property, receiver) {\n if (property === $RAW) return target;\n if (property === $PROXY) return receiver;\n if (property === $TRACK) {\n trackSelf(target);\n return receiver;\n }\n const nodes = getDataNodes(target);\n const tracked = nodes.hasOwnProperty(property);\n let value = tracked ? nodes[property]() : target[property];\n if (property === $NODE || property === \"__proto__\") return value;\n if (!tracked) {\n const desc = Object.getOwnPropertyDescriptor(target, property);\n const isFunction = typeof value === \"function\";\n if (getListener() && (!isFunction || target.hasOwnProperty(property)) && !(desc && desc.get)) value = getDataNode(nodes, property, value)();else if (value != null && isFunction && value === Array.prototype[property]) {\n return (...args) => batch(() => Array.prototype[property].apply(receiver, args));\n }\n }\n return isWrappable(value) ? wrap(value) : value;\n },\n has(target, property) {\n if (property === $RAW || property === $PROXY || property === $TRACK || property === $NODE || property === \"__proto__\") return true;\n this.get(target, property, target);\n return property in target;\n },\n set(target, property, value) {\n batch(() => setProperty(target, property, unwrap(value)));\n return true;\n },\n deleteProperty(target, property) {\n batch(() => setProperty(target, property, undefined, true));\n return true;\n },\n ownKeys: ownKeys,\n getOwnPropertyDescriptor: proxyDescriptor\n};\nfunction wrap(value, name) {\n let p = value[$PROXY];\n if (!p) {\n Object.defineProperty(value, $PROXY, {\n value: p = new Proxy(value, proxyTraps)\n });\n const keys = Object.keys(value),\n desc = Object.getOwnPropertyDescriptors(value);\n for (let i = 0, l = keys.length; i < l; i++) {\n const prop = keys[i];\n if (desc[prop].get) {\n const get = desc[prop].get.bind(p);\n Object.defineProperty(value, prop, {\n get\n });\n }\n if (desc[prop].set) {\n const og = desc[prop].set,\n set = v => batch(() => og.call(p, v));\n Object.defineProperty(value, prop, {\n set\n });\n }\n }\n }\n return p;\n}\nfunction createMutable(state, options) {\n const unwrappedStore = unwrap(state || {});\n const wrappedStore = wrap(unwrappedStore);\n return wrappedStore;\n}\nfunction modifyMutable(state, modifier) {\n batch(() => modifier(unwrap(state)));\n}\n\nconst $ROOT = Symbol(\"store-root\");\nfunction applyState(target, parent, property, merge, key) {\n const previous = parent[property];\n if (target === previous) return;\n if (property !== $ROOT && (!isWrappable(target) || !isWrappable(previous) || key && target[key] !== previous[key])) {\n setProperty(parent, property, target);\n return;\n }\n if (Array.isArray(target)) {\n if (target.length && previous.length && (!merge || key && target[0] && target[0][key] != null)) {\n let i, j, start, end, newEnd, item, newIndicesNext, keyVal;\n for (start = 0, end = Math.min(previous.length, target.length); start < end && (previous[start] === target[start] || key && previous[start] && target[start] && previous[start][key] === target[start][key]); start++) {\n applyState(target[start], previous, start, merge, key);\n }\n const temp = new Array(target.length),\n newIndices = new Map();\n for (end = previous.length - 1, newEnd = target.length - 1; end >= start && newEnd >= start && (previous[end] === target[newEnd] || key && previous[start] && target[start] && previous[end][key] === target[newEnd][key]); end--, newEnd--) {\n temp[newEnd] = previous[end];\n }\n if (start > newEnd || start > end) {\n for (j = start; j <= newEnd; j++) setProperty(previous, j, target[j]);\n for (; j < target.length; j++) {\n setProperty(previous, j, temp[j]);\n applyState(target[j], previous, j, merge, key);\n }\n if (previous.length > target.length) setProperty(previous, \"length\", target.length);\n return;\n }\n newIndicesNext = new Array(newEnd + 1);\n for (j = newEnd; j >= start; j--) {\n item = target[j];\n keyVal = key && item ? item[key] : item;\n i = newIndices.get(keyVal);\n newIndicesNext[j] = i === undefined ? -1 : i;\n newIndices.set(keyVal, j);\n }\n for (i = start; i <= end; i++) {\n item = previous[i];\n keyVal = key && item ? item[key] : item;\n j = newIndices.get(keyVal);\n if (j !== undefined && j !== -1) {\n temp[j] = previous[i];\n j = newIndicesNext[j];\n newIndices.set(keyVal, j);\n }\n }\n for (j = start; j < target.length; j++) {\n if (j in temp) {\n setProperty(previous, j, temp[j]);\n applyState(target[j], previous, j, merge, key);\n } else setProperty(previous, j, target[j]);\n }\n } else {\n for (let i = 0, len = target.length; i < len; i++) {\n applyState(target[i], previous, i, merge, key);\n }\n }\n if (previous.length > target.length) setProperty(previous, \"length\", target.length);\n return;\n }\n const targetKeys = Object.keys(target);\n for (let i = 0, len = targetKeys.length; i < len; i++) {\n applyState(target[targetKeys[i]], previous, targetKeys[i], merge, key);\n }\n const previousKeys = Object.keys(previous);\n for (let i = 0, len = previousKeys.length; i < len; i++) {\n if (target[previousKeys[i]] === undefined) setProperty(previous, previousKeys[i], undefined);\n }\n}\nfunction reconcile(value, options = {}) {\n const {\n merge,\n key = \"id\"\n } = options,\n v = unwrap(value);\n return state => {\n if (!isWrappable(state) || !isWrappable(v)) return v;\n const res = applyState(v, {\n [$ROOT]: state\n }, $ROOT, merge, key);\n return res === undefined ? state : res;\n };\n}\nconst producers = new WeakMap();\nconst setterTraps = {\n get(target, property) {\n if (property === $RAW) return target;\n const value = target[property];\n let proxy;\n return isWrappable(value) ? producers.get(value) || (producers.set(value, proxy = new Proxy(value, setterTraps)), proxy) : value;\n },\n set(target, property, value) {\n setProperty(target, property, unwrap(value));\n return true;\n },\n deleteProperty(target, property) {\n setProperty(target, property, undefined, true);\n return true;\n }\n};\nfunction produce(fn) {\n return state => {\n if (isWrappable(state)) {\n let proxy;\n if (!(proxy = producers.get(state))) {\n producers.set(state, proxy = new Proxy(state, setterTraps));\n }\n fn(proxy);\n }\n return state;\n };\n}\n\nconst DEV = undefined;\n\nexport { $RAW, DEV, createMutable, createStore, modifyMutable, produce, reconcile, unwrap };\n", "export const css = `._devicon_1dapt_1 > div > svg > path {\n d: path(\n \"m15.5 3.9c-.2-.2-.6-.2-.9 0l-.8.8c-.2.2-.2.6 0 .8l6 6.1c.2.2.2.6 0 .8l-6 6.1c-.2.2-.2.6 0 .8l.8.8c.2.2.6.2.9 0l7.6-7.7c.2-.2.2-.6 0-.8l-7.6-7.7zm-5.4 1.6c.2-.2.2-.6 0-.8l-.8-.8c-.2-.2-.6-.2-.9 0l-7.6 7.7c-.2.2-.2.6 0 .8l7.6 7.7c.2.2.6.2.9 0l.8-.8c.2-.2.2-.6 0-.8l-6-6.1c-.2-.2-.2-.6 0-.8l6-6.1z\"\n );\n}\n`;\nexport const classes = {\n \"devicon\": \"_devicon_1dapt_1\"\n};\n", "import { Divider, Header, HeaderTags, LinkButton, showToast, Space, SwitchItem } from \"@uwu/shelter-ui\";\nimport { dbStore } from \"../storage\";\nimport { PluginCard } from \"./Plugins\";\nimport { devModeReservedId, enableDevmode, stopDevmode } from \"../devmode\";\nimport { installedPlugins } from \"../plugins\";\nimport { createMemo, Show } from \"solid-js\";\n\n// fullVersion shows the header and the toggle for always showing the mini menu\nexport default (props: { fullVersion?: boolean }) => {\n const devModeOn = createMemo(() => devModeReservedId in installedPlugins());\n\n return (\n <div>\n <Show when={props.fullVersion}>\n <Header tag={HeaderTags.EYEBROW}>Developer Tools</Header>\n </Show>\n\n <SwitchItem value={dbStore.logDispatch} onChange={(v) => (dbStore.logDispatch = v)}>\n Log FluxDispatcher events to the console\n </SwitchItem>\n\n <SwitchItem\n hideBorder\n value={devModeOn()}\n onChange={(val) =>\n val\n ? enableDevmode().catch((e) =>\n showToast({\n title: \"Could not enable dev mode\",\n content: e.message,\n duration: 3000,\n }),\n )\n : stopDevmode()\n }\n note={\n devModeReservedId in installedPlugins() ? (\n <>\n shelter is currently tethered to\n <Space />\n <LinkButton href=\"https://github.com/uwu/shelter/tree/main/packages/lune#readme\">Lune</LinkButton>\n <Space />\n via dev mode. To disable dev mode, close Lune.\n <br />\n The following dev plugin is loaded:\n </>\n ) : (\n <>\n When in dev mode, shelter tethers to a running\n <Space />\n <LinkButton href=\"https://github.com/uwu/shelter/tree/main/packages/lune#readme\">Lune</LinkButton>\n <Space />\n dev server, allowing hot reloading of a temporary dev plugin.\n </>\n )\n }\n >\n Lune Dev Mode\n </SwitchItem>\n\n <Show when={installedPlugins()[devModeReservedId]} keyed>\n {(plugin) => <PluginCard id={devModeReservedId} plugin={plugin} />}\n </Show>\n\n <Divider mt mb />\n\n <Show when={props.fullVersion}>\n <SwitchItem\n checked={dbStore.alwaysDevMenu}\n onChange={(v) => (dbStore.alwaysDevMenu = v)}\n note={\n \"The developer tools menu icon shows when lune dev mode is enabled, turning this on shows it at all times.\"\n }\n >\n Always show developer tools menu icon\n </SwitchItem>\n </Show>\n </div>\n );\n};\n", "import { devmodePrivateApis, installedPlugins, loadedPlugins, removePlugin, startPlugin, stopPlugin } from \"../plugins\";\nimport { observe } from \"../observer\";\nimport { injectCss, ModalBody, ModalHeader, ModalRoot, ModalSizes, openModal } from \"@uwu/shelter-ui\";\nimport { css, classes } from \"./devmode.css\";\nimport { log } from \"../util\";\nimport DevUI from \"../components/DevUI\";\nimport { createEffect } from \"solid-js\";\nimport { dbStore } from \"../storage\";\n\n// any string would work here but this is funnier\nexport const devModeReservedId = \"__DEVMODE_PLUGIN_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\";\n\nconst websocketUrl = \"ws://127.0.0.1:1211\"; // 2022-11-12\nconst pluginUrl = \"http://127.0.0.1:1112\"; // also 22-11-12 lol\n\nlet websocket: WebSocket;\n\nconst devModeIsOn = () => installedPlugins() && devModeReservedId in installedPlugins();\n\nlet removeDevmodeModal: () => void;\nfunction openDevmodeModal() {\n removeDevmodeModal?.();\n\n removeDevmodeModal = openModal((props) => (\n <ModalRoot size={ModalSizes.MEDIUM}>\n <ModalHeader close={props.close}>Developer Tools</ModalHeader>\n <ModalBody>\n <DevUI />\n </ModalBody>\n </ModalRoot>\n ));\n}\n\n// called on shelter reload\nexport async function initDevmode() {\n const unstyle = injectCss(css);\n\n let isDevButtonHovered = false;\n\n let unobs1: () => void, unobs2: () => void;\n\n createEffect(() => {\n unobs1?.();\n unobs2?.();\n\n if (devModeIsOn() || dbStore.alwaysDevMenu) {\n unobs1 = observe(`[class*=\"anchor\"]`, (e: HTMLAnchorElement) => {\n if (e.href === \"https://support.discord.com/\") {\n e.href = \"#\";\n e.target = \"\";\n e.onclick = openDevmodeModal;\n e.classList.add(classes.devicon);\n e.onmouseenter = () => (isDevButtonHovered = true);\n e.onmouseleave = () => (isDevButtonHovered = false);\n }\n });\n\n unobs2 = observe(\n `[class*=\"layerContainer\"] > div > [class*=\"tooltip\"] > [class*=\"tooltipContent\"]`,\n (e: HTMLElement) => {\n if (isDevButtonHovered && e.innerText !== \"Dev\") {\n e.innerText = \"Dev\";\n }\n },\n );\n }\n });\n\n if (devModeIsOn())\n await enableDevmodeUnchecked().catch((err) => {\n log([\"devmode not reopened since last time\", err], \"warn\");\n stopDevmode();\n });\n\n return () => {\n unstyle();\n unobs1?.();\n unobs2?.();\n };\n}\n\n// do i need to mutex this? yes!\n// do i want to? no.\nasync function refetchDevPlugin() {\n const fetched = await (await fetch(pluginUrl)).json();\n if (typeof fetched.js !== \"string\" || typeof fetched.manifest !== \"object\")\n throw new Error(\"object received from lune was not valid\");\n\n if (loadedPlugins()[devModeReservedId]) stopPlugin(devModeReservedId);\n\n // its probably safer to give the plugin a tick or so to sort itself out\n await new Promise((res) => setTimeout(res));\n\n devmodePrivateApis.replacePlugin(fetched);\n\n log(\"Reloading dev mode plugin\");\n\n startPlugin(devModeReservedId);\n}\n\n// expects the dev mode plugin to already exist, but dev mode to not be inited.\nconst enableDevmodeUnchecked = () =>\n new Promise((res, rej) => {\n websocket = new WebSocket(websocketUrl);\n\n websocket.onclose = stopDevmode;\n\n websocket.onmessage = (ev) => {\n const msg = JSON.parse(ev.data);\n\n if (msg.TYPE === \"update\") refetchDevPlugin();\n };\n\n websocket.onopen = res;\n websocket.onerror = rej;\n });\n\nexport function enableDevmode() {\n if (devModeIsOn()) return;\n\n // adds a stub devmode plugin\n devmodePrivateApis.initDevmodePlugin();\n\n return enableDevmodeUnchecked();\n}\n\nexport function stopDevmode() {\n if (!devModeIsOn()) return;\n removePlugin(devModeReservedId);\n\n websocket.close();\n websocket = undefined;\n}\n", "import { isInited, signalOf, solidMutWithSignal, storage, waitInit } from \"./storage\";\nimport { Component, onCleanup } from \"solid-js\";\nimport { createMutable } from \"solid-js/store\";\nimport { createScopedApiInternal, log, prettifyError } from \"./util\";\nimport { ModalBody, ModalHeader, ModalRoot, openModal } from \"@uwu/shelter-ui\";\nimport { devModeReservedId } from \"./devmode\";\nimport { setInjectorSections, registerInjSection } from \"./settings\";\n\n// note that these controls only apply to the UI, not to the APIs\nexport type LoaderIntegrationOpts = {\n // actions that the end user is shown on the UI\n allowedActions: { toggle?: true; delete?: true; edit?: true; update?: true };\n // is the plugin visible in the ui, or hidden from sight?\n isVisible: boolean;\n // a name to show in the info tooltip for the loader\n loaderName?: string;\n};\n\nexport type StoredPlugin = {\n on: boolean;\n js: string;\n update: boolean;\n src?: string;\n // optional for backwards compat, but should be filled in always from 2024-09-20\n // the plugin loader will automatically set this if not present to (!src)\n local: boolean;\n manifest: Record<string, string>;\n // non existent for normal plugins\n injectorIntegration?: LoaderIntegrationOpts;\n};\n\nexport type EvaledPlugin = {\n onLoad?(): void;\n onUnload?(): void;\n settings?: Component;\n // technically not on an evaled plugin but we add it to the plugin literally as soon as we eval it\n scopedDispose(): void;\n};\n\nconst internalData = storage<StoredPlugin>(\"plugins-internal\");\nconst pluginStorages = storage(\"plugins-data\");\nconst [internalLoaded, loadedPlugins] = solidMutWithSignal(createMutable({} as Record<string, EvaledPlugin>));\n\nexport const installedPlugins = signalOf(internalData);\nexport { loadedPlugins };\n\nfunction createStorage(pluginId: string): [Record<string, any>, () => void] {\n if (!isInited(pluginStorages))\n throw new Error(\"to keep data persistent, plugin storages must not be created until connected to IDB\");\n\n const data = createMutable((pluginStorages[pluginId] ?? {}) as Record<string, any>);\n\n const flush = () => {\n pluginStorages[pluginId] = { ...data };\n };\n\n return [\n new Proxy(data, {\n set(t, p, v, r) {\n queueMicrotask(flush);\n return Reflect.set(t, p, v, r);\n },\n deleteProperty(t, p) {\n queueMicrotask(flush);\n return Reflect.deleteProperty(t, p);\n },\n }),\n flush,\n ];\n}\n\nfunction createPluginApi(pluginId: string, { manifest, injectorIntegration }: StoredPlugin) {\n const [store, flushStore] = createStorage(pluginId);\n const scoped = createScopedApiInternal(window[\"shelter\"].flux.dispatcher, !!injectorIntegration);\n\n return {\n store,\n flushStore,\n id: pluginId,\n manifest,\n showSettings: () =>\n openModal((mprops) => (\n <ModalRoot>\n <ModalHeader close={mprops.close}>Settings - {manifest.name}</ModalHeader>\n <ModalBody>{getSettings(pluginId)({})}</ModalBody>\n </ModalRoot>\n )),\n scoped,\n };\n}\n\nexport type ShelterPluginApi = ReturnType<typeof createPluginApi>;\n\nexport function startPlugin(pluginId: string) {\n const data = internalData[pluginId];\n if (!data) throw new Error(`attempted to load a non-existent plugin: ${pluginId}`);\n\n if (internalLoaded[pluginId]) throw new Error(\"attempted to load an already loaded plugin\");\n\n const pluginApi = createPluginApi(pluginId, data);\n\n const shelterPluginEdition = {\n ...window[\"shelter\"],\n plugin: pluginApi,\n };\n\n // injector plugins have superpowers\n if (data.injectorIntegration)\n shelterPluginEdition.settings = {\n ...shelterPluginEdition.settings,\n setInjectorSections,\n registerSection: registerInjSection,\n } as any; // otherwise, cannot add setInjectorSections, lol\n\n const pluginString = `shelter=>{return ${data.js}}${atob(\"Ci8v\")}# sourceURL=s://!SHELTER/${pluginId}`;\n\n try {\n // noinspection CommaExpressionJS\n const rawPlugin: EvaledPlugin = (0, eval)(pluginString)(shelterPluginEdition);\n // clone this because the way some bundlers defineProperty does not play nice with the solid store\n const plugin = { ...rawPlugin, scopedDispose: pluginApi.scoped.disposeAllNow };\n internalLoaded[pluginId] = plugin;\n\n plugin.onLoad?.();\n\n internalData[pluginId] = { ...data, on: true };\n } catch (e) {\n log([`plugin ${pluginId} errored while loading and will be unloaded`, e], \"error\");\n\n try {\n internalLoaded[pluginId]?.onUnload?.();\n } catch (e2) {\n log([`plugin ${pluginId} errored while unloading`, e2], \"error\");\n }\n\n delete internalLoaded[pluginId];\n internalData[pluginId] = { ...data, on: false };\n }\n}\n\nexport function stopPlugin(pluginId: string) {\n const data = internalData[pluginId];\n const loadedData = internalLoaded[pluginId];\n if (!data) throw new Error(`attempted to unload a non-existent plugin: ${pluginId}`);\n if (!loadedData) throw new Error(`attempted to unload a non-loaded plugin: ${pluginId}`);\n\n try {\n loadedData.onUnload?.();\n } catch (e) {\n log([`plugin ${pluginId} errored while unloading`, e], \"error\");\n }\n try {\n loadedData.scopedDispose();\n } catch (e) {\n log([`plugin ${pluginId} errored while unloading scoped APIs`, e], \"error\");\n }\n\n delete internalLoaded[pluginId];\n internalData[pluginId] = { ...data, on: false };\n}\n\nasync function fetchUpdate(pluginId: string): Promise<false | StoredPlugin> {\n const data = internalData[pluginId];\n if (!data) throw new Error(`attempted to update a non-existent plugin: ${pluginId}`);\n if (data.local) throw new Error(\"cannot check for updates to a local plugin.\");\n if (!data.src) throw new Error(\"cannot check for updates to a plugin with no src\");\n\n try {\n const newPluginManifest = await (await fetch(new URL(\"plugin.json\", data.src), { cache: \"no-store\" })).json();\n\n if (data.manifest.hash !== undefined && newPluginManifest.hash === data.manifest.hash) return false;\n\n const newPluginText = await (await fetch(new URL(\"plugin.js\", data.src), { cache: \"no-store\" })).text();\n\n return {\n ...data,\n js: newPluginText,\n manifest: newPluginManifest,\n };\n } catch (e) {\n throw new Error(`failed to check for updates for ${pluginId}\\n${prettifyError(e)}`, { cause: e });\n }\n}\n\nexport async function updatePlugin(pluginId: string) {\n const checked = await fetchUpdate(pluginId);\n\n if (checked) {\n editPlugin(pluginId, checked, true);\n return true;\n } else {\n return false;\n }\n}\n\nconst stopAllPlugins = () => Object.keys(internalData).forEach(stopPlugin);\n\nexport async function startAllPlugins() {\n // allow plugin stores to connect to IDB, as we need to read persisted data from them straight away\n await Promise.all([waitInit(internalData), waitInit(pluginStorages)]);\n\n const allPlugins = Object.keys(internalData);\n\n // migrate missing local keys from before it was stored\n for (const k of allPlugins) if (internalData[k].local === undefined) internalData[k].local = !internalData[k].src;\n\n // update in parallel\n const results = await Promise.allSettled(\n allPlugins.filter((id) => internalData[id].update && !internalData[id].local).map(updatePlugin),\n );\n\n for (const res of results) if (res.status === \"rejected\") log(res.reason, \"error\");\n\n const toStart = allPlugins.filter((id) => internalData[id].on && id !== devModeReservedId);\n\n // probably safer to do this in series though :p\n toStart.forEach(startPlugin);\n\n // makes things cleaner in index.ts init\n return stopAllPlugins;\n}\n\nexport function addLocalPlugin(id: string, plugin: StoredPlugin) {\n // validate\n if (typeof id !== \"string\" || id in internalData || id === devModeReservedId)\n throw new Error(\"plugin ID invalid or taken\");\n\n if (!plugin.local) plugin.local = true;\n delete plugin.injectorIntegration;\n\n if (\n typeof plugin.js !== \"string\" ||\n typeof plugin.update !== \"boolean\" ||\n (plugin.src !== undefined && typeof plugin.src !== \"string\") ||\n typeof plugin.manifest !== \"object\"\n )\n throw new Error(\"Plugin object failed validation\");\n\n plugin.on = false;\n\n internalData[id] = plugin;\n}\n\nexport async function addRemotePlugin(id: string, src: string, update = true) {\n if (!src.endsWith(\"/\")) src += \"/\";\n\n // validate\n if (typeof id !== \"string\" || id in internalData || id === devModeReservedId)\n throw new Error(\"plugin ID invalid or taken\");\n\n internalData[id] = {\n local: false,\n src,\n update,\n on: false,\n manifest: {},\n js: \"\",\n };\n\n try {\n if (!(await updatePlugin(id))) delete internalData[id];\n } catch (e) {\n delete internalData[id];\n throw e;\n }\n}\n\nexport function removePlugin(id: string) {\n if (!internalData[id]) throw new Error(`attempted to remove non-existent plugin ${id}`);\n if (id in internalLoaded) stopPlugin(id);\n if (id === devModeReservedId) delete pluginStorages[id];\n delete internalData[id];\n}\n\nexport const getSettings = (id: string) => internalLoaded[id]?.settings;\n\nexport function editPlugin(id: string, overwrite: StoredPlugin, updating = false) {\n if (!internalData[id])\n throw new Error(`attempted to ${updating ? \"apply update to\" : \"edit\"} non-existent plugin ${id}`);\n const wasRunning = id in internalLoaded;\n if (wasRunning) stopPlugin(id);\n // modify plugin\n internalData[id] = overwrite;\n // potentially restart plugin\n if (wasRunning) startPlugin(id);\n}\n\nexport function showSettingsFor(id: string) {\n const p = internalLoaded[id];\n if (!p) throw new Error(`cannot show plugins for non-loaded plugin ${id}`);\n if (!p.settings) throw new Error(`cannot show plugins for ${id}, which has no settings`);\n\n return new Promise<void>((res) => {\n openModal((mprops) => {\n onCleanup(res);\n return (\n <ModalRoot>\n <ModalHeader close={mprops.close}>Settings - {internalData[id].manifest.name}</ModalHeader>\n <ModalBody>{p.settings({})}</ModalBody>\n </ModalRoot>\n );\n });\n });\n}\n\n// this is used by shelter to install plugins with loader superpowers\nexport async function ensureLoaderPlugin(id: string, plugin: [string, LoaderIntegrationOpts] | StoredPlugin) {\n // allow internalData to connect to IDB, as we need to read plugin-internals\n await Promise.all([waitInit(internalData), waitInit(pluginStorages)]);\n\n const isRemote = Array.isArray(plugin);\n const integration = isRemote ? plugin?.[1] : plugin?.injectorIntegration;\n\n if (typeof integration?.isVisible !== \"boolean\")\n throw new Error(\"cannot add a loader plugin without an isVisible setting\");\n\n if (typeof integration?.allowedActions !== \"object\" || integration.allowedActions == null)\n throw new Error(\"cannot add a loader plugin without an allowed actions object\");\n\n if (!isRemote) {\n plugin.local = true;\n plugin.update = false;\n delete plugin.src;\n delete plugin.on;\n }\n\n if (id in internalData) {\n // existing plugins need to be off so we can set their stuff up\n if (id in internalLoaded) throw new Error(\"ensureLoaderPlugin must not be called with running plugin IDs!\");\n\n if (isRemote) {\n internalData[id].src = plugin[0];\n internalData[id].update = true;\n internalData[id].local = false;\n } else {\n Object.assign(internalData[id], plugin);\n delete internalData[id].src;\n }\n\n // if a plugin is un-toggleable or invisible, ensure its always on. if its toggleable and exists, leave it alone.\n if (!integration.allowedActions.toggle || !integration.isVisible) internalData[id].on = true;\n }\n // install plugin\n else {\n if (isRemote) await addRemotePlugin(id, plugin[0], true);\n else addLocalPlugin(id, plugin);\n\n // unlike most shelter plugins, NEW loader plugins default to on\n internalData[id].on = true;\n }\n\n // set integration\n // replace object to force db write\n internalData[id] = {\n ...internalData[id],\n injectorIntegration: integration,\n };\n}\n\n// maybe this should be elsewhere but w/e\nexport const devmodePrivateApis = {\n initDevmodePlugin: () =>\n (internalData[devModeReservedId] = {\n local: true,\n update: false,\n on: false,\n manifest: {},\n js: \"{onUnload(){}}\",\n }),\n replacePlugin: (obj: { js: string; manifest: object }) => Object.assign(internalData[devModeReservedId], obj),\n};\n", "export const css = `._list_1k5sy_1{color:var(--text-normal)}._bar_1k5sy_1{display:flex;flex-direction:row;align-items:center;margin-bottom:12px}._plugin_1k5sy_1{margin-top:.5rem;padding:.5rem;border:1px solid var(--background-accent);border-radius:4px}._row_1k5sy_1{display:flex;align-items:center;color:hsl(216, calc(var(--saturation-factor, 1) * 3.7%), 73.5%)}._row_1k5sy_1 strong,._row_1k5sy_1 ._author_1k5sy_1{color:var(--header-primary)}._desc_1k5sy_1{color:hsl(216, calc(var(--saturation-factor, 1) * 3.7%), 73.5%);font-size:.9em}._btn_1k5sy_1{padding-inline:6px;padding-block:2px;border:none;background:none;color:var(--interactive-active);transition:opacity 250ms}._btnbutton_1k5sy_1:hover{color:var(--interactive-hover)}._tawrap_1k5sy_1{display:grid}._tawrap_1k5sy_1 ._btn_1k5sy_1{z-index:1;align-self:start;justify-self:right;padding:.4rem}._tawrap_1k5sy_1>*{grid-area:1/1/span 1/span 1}`;\nexport const classes = {\n \"list\": \"_list_1k5sy_1\",\n \"bar\": \"_bar_1k5sy_1\",\n \"plugin\": \"_plugin_1k5sy_1\",\n \"row\": \"_row_1k5sy_1\",\n \"author\": \"_author_1k5sy_1\",\n \"desc\": \"_desc_1k5sy_1\",\n \"btn\": \"_btn_1k5sy_1\",\n \"btnbutton\": \"_btnbutton_1k5sy_1\",\n \"tawrap\": \"_tawrap_1k5sy_1\"\n};\n", "import {\n Header,\n HeaderTags,\n ModalBody,\n ModalConfirmFooter,\n ModalHeader,\n ModalRoot,\n SwitchItem,\n TextArea,\n TextBox,\n Space,\n openModal,\n showToast,\n IconUpload,\n} from \"@uwu/shelter-ui\";\nimport { Component, createMemo, createSignal, Match, onCleanup, Show, Switch, untrack } from \"solid-js\";\nimport {\n addLocalPlugin,\n addRemotePlugin,\n editPlugin,\n installedPlugins,\n startPlugin,\n stopPlugin,\n StoredPlugin,\n updatePlugin,\n} from \"../plugins\";\nimport { classes } from \"./Plugins.tsx.scss\";\n\nconst JsUploader: Component<{ setCode: (t: string) => void }> = (props) => {\n let inp: HTMLInputElement;\n\n return (\n <>\n <input\n ref={inp}\n type=\"file\"\n style=\"display: none\"\n accept=\"text/javascript\"\n onChange={() => {\n const f = inp.files[0];\n if (f) {\n const reader = new FileReader();\n reader.readAsText(f);\n reader.onloadend = () => props.setCode(reader.result as string);\n }\n }}\n />\n <button class={classes.btn} onClick={() => inp.click()}>\n <IconUpload />\n </button>\n </>\n );\n};\n\nconst PluginEditModal = (props: {\n close(): void;\n editId?: string;\n resolve: (s: boolean) => void;\n reject: (e?: any) => void;\n}) => {\n onCleanup(() => props.resolve(false));\n\n const stateInit: StoredPlugin = props.editId\n ? untrack(installedPlugins)[props.editId]\n : {\n local: false,\n on: false,\n js: \"\",\n update: true,\n src: \"\",\n manifest: {\n name: \"\",\n author: \"\",\n description: \"\",\n },\n };\n\n if (!stateInit) {\n props.reject(\"Cannot edit a plugin that is not installed\");\n return [];\n }\n\n const [local, setLocal] = createSignal(stateInit.local);\n\n const [rSrc, setRSrc] = createSignal(stateInit.src);\n const [rUpdate, setRUpdate] = createSignal(stateInit.update);\n\n const [lName, setLName] = createSignal(stateInit.manifest?.name ?? \"\");\n const [lCode, setLCode] = createSignal(stateInit.js ?? \"\");\n const [lAuthor, setLAuthor] = createSignal(stateInit.manifest?.author ?? \"\");\n const [lDesc, setLDesc] = createSignal(stateInit.manifest?.description ?? \"\");\n\n const targetId = createMemo(() => {\n if (props.editId) return props.editId;\n\n if (!local()) return rSrc().split(\"://\")[1];\n\n let id = lName()\n .toLowerCase()\n .replaceAll(/[^A-Za-z0-9-_.]/g, \"-\");\n while (id in untrack(installedPlugins)) id += \"_\";\n\n return id;\n });\n\n const validate = () => {\n try {\n new URL(rSrc());\n } catch {\n if (!local()) return false;\n }\n\n if ((!lName() || !lCode() || !lAuthor()) && local()) return;\n\n if (props.editId) return targetId() == props.editId;\n else return !(targetId() in untrack(installedPlugins));\n };\n\n return (\n <ModalRoot>\n <ModalHeader close={props.close}>\n <Show keyed={false} when={props.editId} fallback={\"Add plugin\"}>\n Edit {lName()}\n </Show>\n </ModalHeader>\n\n <ModalBody>\n <SwitchItem checked={local()} onChange={setLocal} hideBorder>\n Local plugin\n </SwitchItem>\n\n <Switch>\n <Match when={!local()} keyed={false}>\n <Header tag={HeaderTags.EYEBROW}>URL</Header>\n <TextBox placeholder=\"https://example.com/my-plugin\" value={rSrc()} onInput={setRSrc} />\n <Space />\n <SwitchItem checked={rUpdate()} onChange={setRUpdate} hideBorder>\n Automatically update\n </SwitchItem>\n </Match>\n\n <Match when={local()} keyed={false}>\n <Header tag={HeaderTags.EYEBROW}>Name</Header>\n <TextBox placeholder=\"My Cool Plugin\" value={lName()} onInput={setLName} />\n <Space />\n <Header tag={HeaderTags.EYEBROW}>Author</Header>\n <TextBox placeholder=\"Rin\" value={lAuthor()} onInput={setLAuthor} />\n <Space />\n <Header tag={HeaderTags.EYEBROW}>Description</Header>\n <TextBox placeholder=\"The plugin is very cool and helpful\" value={lDesc()} onInput={setLDesc} />\n <Space />\n <Header tag={HeaderTags.EYEBROW}>Code</Header>\n\n <div class={classes.tawrap}>\n <JsUploader setCode={setLCode} />\n {/* TODO: monaco */}\n <TextArea\n mono\n style=\"height: 150px\"\n resize-y\n placeholder={`{\n onLoad() {\n const { name } = shelter.plugin.manifest;\n console.log(\\`Hello from $\\u200C{name}!\\`);\n },\n onUnload() {\n console.log(\"Goodbye :(\");\n }\n}`}\n value={lCode()}\n onInput={setLCode}\n spellcheck={false}\n />\n </div>\n </Match>\n </Switch>\n </ModalBody>\n\n <ModalConfirmFooter\n close={props.close}\n confirmText={props.editId ? \"Edit\" : local() ? \"Add\" : \"Fetch\"}\n disabled={!validate()}\n onConfirm={async () => {\n try {\n if (props.editId) {\n const wasRunning = stateInit.on;\n if (!local() && wasRunning) {\n stopPlugin(props.editId);\n }\n\n // edit existing plugin\n editPlugin(props.editId, {\n local: local(),\n js: lCode(),\n update: rUpdate(),\n manifest: {\n ...stateInit.manifest,\n hash: !local() && lCode() === stateInit.js ? stateInit.manifest.hash : undefined,\n name: lName(),\n author: lAuthor(),\n description: lDesc(),\n },\n on: stateInit.on,\n src: rSrc(),\n });\n\n // update if necessary\n if (!local()) await updatePlugin(props.editId);\n\n if (!local() && wasRunning) startPlugin(props.editId);\n } else if (local()) {\n // create new local plugin\n addLocalPlugin(targetId(), {\n local: true,\n js: lCode(),\n update: rUpdate(),\n manifest: {\n name: lName(),\n author: lAuthor(),\n description: lDesc(),\n },\n on: stateInit.on,\n src: rSrc(),\n });\n } else {\n // create new remote plugin\n await addRemotePlugin(targetId(), rSrc(), rUpdate());\n }\n } catch (e) {\n return props.reject(e);\n }\n\n props.resolve(true);\n }}\n />\n </ModalRoot>\n );\n};\n//export default PluginEditModal;\n\n// true - added plugin, false - cancelled or error, errors will show a toast\nexport const addPluginModal = () =>\n new Promise<boolean>((res) => {\n openModal((props) => (\n <PluginEditModal\n resolve={(r) => {\n if (r)\n showToast({\n title: \"Added plugin successfully\",\n duration: 3000,\n });\n\n res(r);\n }}\n reject={(err) => {\n showToast({\n title: \"Failed to add plugin\",\n content: err?.message ?? err + \"\",\n duration: 3000,\n });\n }}\n close={props.close}\n />\n ));\n });\n\n// true - added plugin, false - cancelled or error, errors will show a toast\nexport const editPluginModal = (id: string) =>\n new Promise<boolean>((res) => {\n openModal((props) => (\n <PluginEditModal\n editId={id}\n resolve={(r) => {\n if (r)\n showToast({\n title: \"Edited plugin successfully\",\n duration: 3000,\n });\n\n res(r);\n }}\n reject={(err) => {\n showToast({\n title: \"Failed to edit plugin\",\n content: err?.message ?? err + \"\",\n duration: 3000,\n });\n }}\n close={props.close}\n />\n ));\n });\n", "/**\n * Fuse.js v7.0.0 - Lightweight fuzzy-search (http://fusejs.io)\n *\n * Copyright (c) 2023 Kiro Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfunction isArray(value) {\n return !Array.isArray\n ? getTag(value) === '[object Array]'\n : Array.isArray(value)\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/baseToString.js\nconst INFINITY = 1 / 0;\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value\n }\n let result = value + '';\n return result == '0' && 1 / value == -INFINITY ? '-0' : result\n}\n\nfunction toString(value) {\n return value == null ? '' : baseToString(value)\n}\n\nfunction isString(value) {\n return typeof value === 'string'\n}\n\nfunction isNumber(value) {\n return typeof value === 'number'\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/isBoolean.js\nfunction isBoolean(value) {\n return (\n value === true ||\n value === false ||\n (isObjectLike(value) && getTag(value) == '[object Boolean]')\n )\n}\n\nfunction isObject(value) {\n return typeof value === 'object'\n}\n\n// Checks if `value` is object-like.\nfunction isObjectLike(value) {\n return isObject(value) && value !== null\n}\n\nfunction isDefined(value) {\n return value !== undefined && value !== null\n}\n\nfunction isBlank(value) {\n return !value.trim().length\n}\n\n// Gets the `toStringTag` of `value`.\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/getTag.js\nfunction getTag(value) {\n return value == null\n ? value === undefined\n ? '[object Undefined]'\n : '[object Null]'\n : Object.prototype.toString.call(value)\n}\n\nconst EXTENDED_SEARCH_UNAVAILABLE = 'Extended search is not available';\n\nconst INCORRECT_INDEX_TYPE = \"Incorrect 'index' type\";\n\nconst LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = (key) =>\n `Invalid value for key ${key}`;\n\nconst PATTERN_LENGTH_TOO_LARGE = (max) =>\n `Pattern length exceeds max of ${max}.`;\n\nconst MISSING_KEY_PROPERTY = (name) => `Missing ${name} property in key`;\n\nconst INVALID_KEY_WEIGHT_VALUE = (key) =>\n `Property 'weight' in key '${key}' must be a positive integer`;\n\nconst hasOwn = Object.prototype.hasOwnProperty;\n\nclass KeyStore {\n constructor(keys) {\n this._keys = [];\n this._keyMap = {};\n\n let totalWeight = 0;\n\n keys.forEach((key) => {\n let obj = createKey(key);\n\n this._keys.push(obj);\n this._keyMap[obj.id] = obj;\n\n totalWeight += obj.weight;\n });\n\n // Normalize weights so that their sum is equal to 1\n this._keys.forEach((key) => {\n key.weight /= totalWeight;\n });\n }\n get(keyId) {\n return this._keyMap[keyId]\n }\n keys() {\n return this._keys\n }\n toJSON() {\n return JSON.stringify(this._keys)\n }\n}\n\nfunction createKey(key) {\n let path = null;\n let id = null;\n let src = null;\n let weight = 1;\n let getFn = null;\n\n if (isString(key) || isArray(key)) {\n src = key;\n path = createKeyPath(key);\n id = createKeyId(key);\n } else {\n if (!hasOwn.call(key, 'name')) {\n throw new Error(MISSING_KEY_PROPERTY('name'))\n }\n\n const name = key.name;\n src = name;\n\n if (hasOwn.call(key, 'weight')) {\n weight = key.weight;\n\n if (weight <= 0) {\n throw new Error(INVALID_KEY_WEIGHT_VALUE(name))\n }\n }\n\n path = createKeyPath(name);\n id = createKeyId(name);\n getFn = key.getFn;\n }\n\n return { path, id, weight, src, getFn }\n}\n\nfunction createKeyPath(key) {\n return isArray(key) ? key : key.split('.')\n}\n\nfunction createKeyId(key) {\n return isArray(key) ? key.join('.') : key\n}\n\nfunction get(obj, path) {\n let list = [];\n let arr = false;\n\n const deepGet = (obj, path, index) => {\n if (!isDefined(obj)) {\n return\n }\n if (!path[index]) {\n // If there's no path left, we've arrived at the object we care about.\n list.push(obj);\n } else {\n let key = path[index];\n\n const value = obj[key];\n\n if (!isDefined(value)) {\n return\n }\n\n // If we're at the last value in the path, and if it's a string/number/bool,\n // add it to the list\n if (\n index === path.length - 1 &&\n (isString(value) || isNumber(value) || isBoolean(value))\n ) {\n list.push(toString(value));\n } else if (isArray(value)) {\n arr = true;\n // Search each item in the array.\n for (let i = 0, len = value.length; i < len; i += 1) {\n deepGet(value[i], path, index + 1);\n }\n } else if (path.length) {\n // An object. Recurse further.\n deepGet(value, path, index + 1);\n }\n }\n };\n\n // Backwards compatibility (since path used to be a string)\n deepGet(obj, isString(path) ? path.split('.') : path, 0);\n\n return arr ? list : list[0]\n}\n\nconst MatchOptions = {\n // Whether the matches should be included in the result set. When `true`, each record in the result\n // set will include the indices of the matched characters.\n // These can consequently be used for highlighting purposes.\n includeMatches: false,\n // When `true`, the matching function will continue to the end of a search pattern even if\n // a perfect match has already been located in the string.\n findAllMatches: false,\n // Minimum number of characters that must be matched before a result is considered a match\n minMatchCharLength: 1\n};\n\nconst BasicOptions = {\n // When `true`, the algorithm continues searching to the end of the input even if a perfect\n // match is found before the end of the same input.\n isCaseSensitive: false,\n // When true, the matching function will continue to the end of a search pattern even if\n includeScore: false,\n // List of properties that will be searched. This also supports nested properties.\n keys: [],\n // Whether to sort the result list, by score\n shouldSort: true,\n // Default sort function: sort by ascending score, ascending index\n sortFn: (a, b) =>\n a.score === b.score ? (a.idx < b.idx ? -1 : 1) : a.score < b.score ? -1 : 1\n};\n\nconst FuzzyOptions = {\n // Approximately where in the text is the pattern expected to be found?\n location: 0,\n // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match\n // (of both letters and location), a threshold of '1.0' would match anything.\n threshold: 0.6,\n // Determines how close the match must be to the fuzzy location (specified above).\n // An exact letter match which is 'distance' characters away from the fuzzy location\n // would score as a complete mismatch. A distance of '0' requires the match be at\n // the exact location specified, a threshold of '1000' would require a perfect match\n // to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n distance: 100\n};\n\nconst AdvancedOptions = {\n // When `true`, it enables the use of unix-like search commands\n useExtendedSearch: false,\n // The get function to use when fetching an object's properties.\n // The default will search nested paths *ie foo.bar.baz*\n getFn: get,\n // When `true`, search will ignore `location` and `distance`, so it won't matter\n // where in the string the pattern appears.\n // More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score\n ignoreLocation: false,\n // When `true`, the calculation for the relevance score (used for sorting) will\n // ignore the field-length norm.\n // More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm\n ignoreFieldNorm: false,\n // The weight to determine how much field length norm effects scoring.\n fieldNormWeight: 1\n};\n\nvar Config = {\n ...BasicOptions,\n ...MatchOptions,\n ...FuzzyOptions,\n ...AdvancedOptions\n};\n\nconst SPACE = /[^ ]+/g;\n\n// Field-length norm: the shorter the field, the higher the weight.\n// Set to 3 decimals to reduce index size.\nfunction norm(weight = 1, mantissa = 3) {\n const cache = new Map();\n const m = Math.pow(10, mantissa);\n\n return {\n get(value) {\n const numTokens = value.match(SPACE).length;\n\n if (cache.has(numTokens)) {\n return cache.get(numTokens)\n }\n\n // Default function is 1/sqrt(x), weight makes that variable\n const norm = 1 / Math.pow(numTokens, 0.5 * weight);\n\n // In place of `toFixed(mantissa)`, for faster computation\n const n = parseFloat(Math.round(norm * m) / m);\n\n cache.set(numTokens, n);\n\n return n\n },\n clear() {\n cache.clear();\n }\n }\n}\n\nclass FuseIndex {\n constructor({\n getFn = Config.getFn,\n fieldNormWeight = Config.fieldNormWeight\n } = {}) {\n this.norm = norm(fieldNormWeight, 3);\n this.getFn = getFn;\n this.isCreated = false;\n\n this.setIndexRecords();\n }\n setSources(docs = []) {\n this.docs = docs;\n }\n setIndexRecords(records = []) {\n this.records = records;\n }\n setKeys(keys = []) {\n this.keys = keys;\n this._keysMap = {};\n keys.forEach((key, idx) => {\n this._keysMap[key.id] = idx;\n });\n }\n create() {\n if (this.isCreated || !this.docs.length) {\n return\n }\n\n this.isCreated = true;\n\n // List is Array<String>\n if (isString(this.docs[0])) {\n this.docs.forEach((doc, docIndex) => {\n this._addString(doc, docIndex);\n });\n } else {\n // List is Array<Object>\n this.docs.forEach((doc, docIndex) => {\n this._addObject(doc, docIndex);\n });\n }\n\n this.norm.clear();\n }\n // Adds a doc to the end of the index\n add(doc) {\n const idx = this.size();\n\n if (isString(doc)) {\n this._addString(doc, idx);\n } else {\n this._addObject(doc, idx);\n }\n }\n // Removes the doc at the specified index of the index\n removeAt(idx) {\n this.records.splice(idx, 1);\n\n // Change ref index of every subsquent doc\n for (let i = idx, len = this.size(); i < len; i += 1) {\n this.records[i].i -= 1;\n }\n }\n getValueForItemAtKeyId(item, keyId) {\n return item[this._keysMap[keyId]]\n }\n size() {\n return this.records.length\n }\n _addString(doc, docIndex) {\n if (!isDefined(doc) || isBlank(doc)) {\n return\n }\n\n let record = {\n v: doc,\n i: docIndex,\n n: this.norm.get(doc)\n };\n\n this.records.push(record);\n }\n _addObject(doc, docIndex) {\n let record = { i: docIndex, $: {} };\n\n // Iterate over every key (i.e, path), and fetch the value at that key\n this.keys.forEach((key, keyIndex) => {\n let value = key.getFn ? key.getFn(doc) : this.getFn(doc, key.path);\n\n if (!isDefined(value)) {\n return\n }\n\n if (isArray(value)) {\n let subRecords = [];\n const stack = [{ nestedArrIndex: -1, value }];\n\n while (stack.length) {\n const { nestedArrIndex, value } = stack.pop();\n\n if (!isDefined(value)) {\n continue\n }\n\n if (isString(value) && !isBlank(value)) {\n let subRecord = {\n v: value,\n i: nestedArrIndex,\n n: this.norm.get(value)\n };\n\n subRecords.push(subRecord);\n } else if (isArray(value)) {\n value.forEach((item, k) => {\n stack.push({\n nestedArrIndex: k,\n value: item\n });\n });\n } else ;\n }\n record.$[keyIndex] = subRecords;\n } else if (isString(value) && !isBlank(value)) {\n let subRecord = {\n v: value,\n n: this.norm.get(value)\n };\n\n record.$[keyIndex] = subRecord;\n }\n });\n\n this.records.push(record);\n }\n toJSON() {\n return {\n keys: this.keys,\n records: this.records\n }\n }\n}\n\nfunction createIndex(\n keys,\n docs,\n { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}\n) {\n const myIndex = new FuseIndex({ getFn, fieldNormWeight });\n myIndex.setKeys(keys.map(createKey));\n myIndex.setSources(docs);\n myIndex.create();\n return myIndex\n}\n\nfunction parseIndex(\n data,\n { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}\n) {\n const { keys, records } = data;\n const myIndex = new FuseIndex({ getFn, fieldNormWeight });\n myIndex.setKeys(keys);\n myIndex.setIndexRecords(records);\n return myIndex\n}\n\nfunction computeScore$1(\n pattern,\n {\n errors = 0,\n currentLocation = 0,\n expectedLocation = 0,\n distance = Config.distance,\n ignoreLocation = Config.ignoreLocation\n } = {}\n) {\n const accuracy = errors / pattern.length;\n\n if (ignoreLocation) {\n return accuracy\n }\n\n const proximity = Math.abs(expectedLocation - currentLocation);\n\n if (!distance) {\n // Dodge divide by zero error.\n return proximity ? 1.0 : accuracy\n }\n\n return accuracy + proximity / distance\n}\n\nfunction convertMaskToIndices(\n matchmask = [],\n minMatchCharLength = Config.minMatchCharLength\n) {\n let indices = [];\n let start = -1;\n let end = -1;\n let i = 0;\n\n for (let len = matchmask.length; i < len; i += 1) {\n let match = matchmask[i];\n if (match && start === -1) {\n start = i;\n } else if (!match && start !== -1) {\n end = i - 1;\n if (end - start + 1 >= minMatchCharLength) {\n indices.push([start, end]);\n }\n start = -1;\n }\n }\n\n // (i-1 - start) + 1 => i - start\n if (matchmask[i - 1] && i - start >= minMatchCharLength) {\n indices.push([start, i - 1]);\n }\n\n return indices\n}\n\n// Machine word size\nconst MAX_BITS = 32;\n\nfunction search(\n text,\n pattern,\n patternAlphabet,\n {\n location = Config.location,\n distance = Config.distance,\n threshold = Config.threshold,\n findAllMatches = Config.findAllMatches,\n minMatchCharLength = Config.minMatchCharLength,\n includeMatches = Config.includeMatches,\n ignoreLocation = Config.ignoreLocation\n } = {}\n) {\n if (pattern.length > MAX_BITS) {\n throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS))\n }\n\n const patternLen = pattern.length;\n // Set starting location at beginning text and initialize the alphabet.\n const textLen = text.length;\n // Handle the case when location > text.length\n const expectedLocation = Math.max(0, Math.min(location, textLen));\n // Highest score beyond which we give up.\n let currentThreshold = threshold;\n // Is there a nearby exact match? (speedup)\n let bestLocation = expectedLocation;\n\n // Performance: only computer matches when the minMatchCharLength > 1\n // OR if `includeMatches` is true.\n const computeMatches = minMatchCharLength > 1 || includeMatches;\n // A mask of the matches, used for building the indices\n const matchMask = computeMatches ? Array(textLen) : [];\n\n let index;\n\n // Get all exact matches, here for speed up\n while ((index = text.indexOf(pattern, bestLocation)) > -1) {\n let score = computeScore$1(pattern, {\n currentLocation: index,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n currentThreshold = Math.min(score, currentThreshold);\n bestLocation = index + patternLen;\n\n if (computeMatches) {\n let i = 0;\n while (i < patternLen) {\n matchMask[index + i] = 1;\n i += 1;\n }\n }\n }\n\n // Reset the best location\n bestLocation = -1;\n\n let lastBitArr = [];\n let finalScore = 1;\n let binMax = patternLen + textLen;\n\n const mask = 1 << (patternLen - 1);\n\n for (let i = 0; i < patternLen; i += 1) {\n // Scan for the best match; each iteration allows for one more error.\n // Run a binary search to determine how far from the match location we can stray\n // at this error level.\n let binMin = 0;\n let binMid = binMax;\n\n while (binMin < binMid) {\n const score = computeScore$1(pattern, {\n errors: i,\n currentLocation: expectedLocation + binMid,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n if (score <= currentThreshold) {\n binMin = binMid;\n } else {\n binMax = binMid;\n }\n\n binMid = Math.floor((binMax - binMin) / 2 + binMin);\n }\n\n // Use the result from this iteration as the maximum for the next.\n binMax = binMid;\n\n let start = Math.max(1, expectedLocation - binMid + 1);\n let finish = findAllMatches\n ? textLen\n : Math.min(expectedLocation + binMid, textLen) + patternLen;\n\n // Initialize the bit array\n let bitArr = Array(finish + 2);\n\n bitArr[finish + 1] = (1 << i) - 1;\n\n for (let j = finish; j >= start; j -= 1) {\n let currentLocation = j - 1;\n let charMatch = patternAlphabet[text.charAt(currentLocation)];\n\n if (computeMatches) {\n // Speed up: quick bool to int conversion (i.e, `charMatch ? 1 : 0`)\n matchMask[currentLocation] = +!!charMatch;\n }\n\n // First pass: exact match\n bitArr[j] = ((bitArr[j + 1] << 1) | 1) & charMatch;\n\n // Subsequent passes: fuzzy match\n if (i) {\n bitArr[j] |=\n ((lastBitArr[j + 1] | lastBitArr[j]) << 1) | 1 | lastBitArr[j + 1];\n }\n\n if (bitArr[j] & mask) {\n finalScore = computeScore$1(pattern, {\n errors: i,\n currentLocation,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n // This match will almost certainly be better than any existing match.\n // But check anyway.\n if (finalScore <= currentThreshold) {\n // Indeed it is\n currentThreshold = finalScore;\n bestLocation = currentLocation;\n\n // Already passed `loc`, downhill from here on in.\n if (bestLocation <= expectedLocation) {\n break\n }\n\n // When passing `bestLocation`, don't exceed our current distance from `expectedLocation`.\n start = Math.max(1, 2 * expectedLocation - bestLocation);\n }\n }\n }\n\n // No hope for a (better) match at greater error levels.\n const score = computeScore$1(pattern, {\n errors: i + 1,\n currentLocation: expectedLocation,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n if (score > currentThreshold) {\n break\n }\n\n lastBitArr = bitArr;\n }\n\n const result = {\n isMatch: bestLocation >= 0,\n // Count exact matches (those with a score of 0) to be \"almost\" exact\n score: Math.max(0.001, finalScore)\n };\n\n if (computeMatches) {\n const indices = convertMaskToIndices(matchMask, minMatchCharLength);\n if (!indices.length) {\n result.isMatch = false;\n } else if (includeMatches) {\n result.indices = indices;\n }\n }\n\n return result\n}\n\nfunction createPatternAlphabet(pattern) {\n let mask = {};\n\n for (let i = 0, len = pattern.length; i < len; i += 1) {\n const char = pattern.charAt(i);\n mask[char] = (mask[char] || 0) | (1 << (len - i - 1));\n }\n\n return mask\n}\n\nclass BitapSearch {\n constructor(\n pattern,\n {\n location = Config.location,\n threshold = Config.threshold,\n distance = Config.distance,\n includeMatches = Config.includeMatches,\n findAllMatches = Config.findAllMatches,\n minMatchCharLength = Config.minMatchCharLength,\n isCaseSensitive = Config.isCaseSensitive,\n ignoreLocation = Config.ignoreLocation\n } = {}\n ) {\n this.options = {\n location,\n threshold,\n distance,\n includeMatches,\n findAllMatches,\n minMatchCharLength,\n isCaseSensitive,\n ignoreLocation\n };\n\n this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase();\n\n this.chunks = [];\n\n if (!this.pattern.length) {\n return\n }\n\n const addChunk = (pattern, startIndex) => {\n this.chunks.push({\n pattern,\n alphabet: createPatternAlphabet(pattern),\n startIndex\n });\n };\n\n const len = this.pattern.length;\n\n if (len > MAX_BITS) {\n let i = 0;\n const remainder = len % MAX_BITS;\n const end = len - remainder;\n\n while (i < end) {\n addChunk(this.pattern.substr(i, MAX_BITS), i);\n i += MAX_BITS;\n }\n\n if (remainder) {\n const startIndex = len - MAX_BITS;\n addChunk(this.pattern.substr(startIndex), startIndex);\n }\n } else {\n addChunk(this.pattern, 0);\n }\n }\n\n searchIn(text) {\n const { isCaseSensitive, includeMatches } = this.options;\n\n if (!isCaseSensitive) {\n text = text.toLowerCase();\n }\n\n // Exact match\n if (this.pattern === text) {\n let result = {\n isMatch: true,\n score: 0\n };\n\n if (includeMatches) {\n result.indices = [[0, text.length - 1]];\n }\n\n return result\n }\n\n // Otherwise, use Bitap algorithm\n const {\n location,\n distance,\n threshold,\n findAllMatches,\n minMatchCharLength,\n ignoreLocation\n } = this.options;\n\n let allIndices = [];\n let totalScore = 0;\n let hasMatches = false;\n\n this.chunks.forEach(({ pattern, alphabet, startIndex }) => {\n const { isMatch, score, indices } = search(text, pattern, alphabet, {\n location: location + startIndex,\n distance,\n threshold,\n findAllMatches,\n minMatchCharLength,\n includeMatches,\n ignoreLocation\n });\n\n if (isMatch) {\n hasMatches = true;\n }\n\n totalScore += score;\n\n if (isMatch && indices) {\n allIndices = [...allIndices, ...indices];\n }\n });\n\n let result = {\n isMatch: hasMatches,\n score: hasMatches ? totalScore / this.chunks.length : 1\n };\n\n if (hasMatches && includeMatches) {\n result.indices = allIndices;\n }\n\n return result\n }\n}\n\nclass BaseMatch {\n constructor(pattern) {\n this.pattern = pattern;\n }\n static isMultiMatch(pattern) {\n return getMatch(pattern, this.multiRegex)\n }\n static isSingleMatch(pattern) {\n return getMatch(pattern, this.singleRegex)\n }\n search(/*text*/) {}\n}\n\nfunction getMatch(pattern, exp) {\n const matches = pattern.match(exp);\n return matches ? matches[1] : null\n}\n\n// Token: 'file\n\nclass ExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'exact'\n }\n static get multiRegex() {\n return /^=\"(.*)\"$/\n }\n static get singleRegex() {\n return /^=(.*)$/\n }\n search(text) {\n const isMatch = text === this.pattern;\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, this.pattern.length - 1]\n }\n }\n}\n\n// Token: !fire\n\nclass InverseExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'inverse-exact'\n }\n static get multiRegex() {\n return /^!\"(.*)\"$/\n }\n static get singleRegex() {\n return /^!(.*)$/\n }\n search(text) {\n const index = text.indexOf(this.pattern);\n const isMatch = index === -1;\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, text.length - 1]\n }\n }\n}\n\n// Token: ^file\n\nclass PrefixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'prefix-exact'\n }\n static get multiRegex() {\n return /^\\^\"(.*)\"$/\n }\n static get singleRegex() {\n return /^\\^(.*)$/\n }\n search(text) {\n const isMatch = text.startsWith(this.pattern);\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, this.pattern.length - 1]\n }\n }\n}\n\n// Token: !^fire\n\nclass InversePrefixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'inverse-prefix-exact'\n }\n static get multiRegex() {\n return /^!\\^\"(.*)\"$/\n }\n static get singleRegex() {\n return /^!\\^(.*)$/\n }\n search(text) {\n const isMatch = !text.startsWith(this.pattern);\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, text.length - 1]\n }\n }\n}\n\n// Token: .file$\n\nclass SuffixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'suffix-exact'\n }\n static get multiRegex() {\n return /^\"(.*)\"\\$$/\n }\n static get singleRegex() {\n return /^(.*)\\$$/\n }\n search(text) {\n const isMatch = text.endsWith(this.pattern);\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [text.length - this.pattern.length, text.length - 1]\n }\n }\n}\n\n// Token: !.file$\n\nclass InverseSuffixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'inverse-suffix-exact'\n }\n static get multiRegex() {\n return /^!\"(.*)\"\\$$/\n }\n static get singleRegex() {\n return /^!(.*)\\$$/\n }\n search(text) {\n const isMatch = !text.endsWith(this.pattern);\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, text.length - 1]\n }\n }\n}\n\nclass FuzzyMatch extends BaseMatch {\n constructor(\n pattern,\n {\n location = Config.location,\n threshold = Config.threshold,\n distance = Config.distance,\n includeMatches = Config.includeMatches,\n findAllMatches = Config.findAllMatches,\n minMatchCharLength = Config.minMatchCharLength,\n isCaseSensitive = Config.isCaseSensitive,\n ignoreLocation = Config.ignoreLocation\n } = {}\n ) {\n super(pattern);\n this._bitapSearch = new BitapSearch(pattern, {\n location,\n threshold,\n distance,\n includeMatches,\n findAllMatches,\n minMatchCharLength,\n isCaseSensitive,\n ignoreLocation\n });\n }\n static get type() {\n return 'fuzzy'\n }\n static get multiRegex() {\n return /^\"(.*)\"$/\n }\n static get singleRegex() {\n return /^(.*)$/\n }\n search(text) {\n return this._bitapSearch.searchIn(text)\n }\n}\n\n// Token: 'file\n\nclass IncludeMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'include'\n }\n static get multiRegex() {\n return /^'\"(.*)\"$/\n }\n static get singleRegex() {\n return /^'(.*)$/\n }\n search(text) {\n let location = 0;\n let index;\n\n const indices = [];\n const patternLen = this.pattern.length;\n\n // Get all exact matches\n while ((index = text.indexOf(this.pattern, location)) > -1) {\n location = index + patternLen;\n indices.push([index, location - 1]);\n }\n\n const isMatch = !!indices.length;\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices\n }\n }\n}\n\n// \u2757Order is important. DO NOT CHANGE.\nconst searchers = [\n ExactMatch,\n IncludeMatch,\n PrefixExactMatch,\n InversePrefixExactMatch,\n InverseSuffixExactMatch,\n SuffixExactMatch,\n InverseExactMatch,\n FuzzyMatch\n];\n\nconst searchersLen = searchers.length;\n\n// Regex to split by spaces, but keep anything in quotes together\nconst SPACE_RE = / +(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)/;\nconst OR_TOKEN = '|';\n\n// Return a 2D array representation of the query, for simpler parsing.\n// Example:\n// \"^core go$ | rb$ | py$ xy$\" => [[\"^core\", \"go$\"], [\"rb$\"], [\"py$\", \"xy$\"]]\nfunction parseQuery(pattern, options = {}) {\n return pattern.split(OR_TOKEN).map((item) => {\n let query = item\n .trim()\n .split(SPACE_RE)\n .filter((item) => item && !!item.trim());\n\n let results = [];\n for (let i = 0, len = query.length; i < len; i += 1) {\n const queryItem = query[i];\n\n // 1. Handle multiple query match (i.e, once that are quoted, like `\"hello world\"`)\n let found = false;\n let idx = -1;\n while (!found && ++idx < searchersLen) {\n const searcher = searchers[idx];\n let token = searcher.isMultiMatch(queryItem);\n if (token) {\n results.push(new searcher(token, options));\n found = true;\n }\n }\n\n if (found) {\n continue\n }\n\n // 2. Handle single query matches (i.e, once that are *not* quoted)\n idx = -1;\n while (++idx < searchersLen) {\n const searcher = searchers[idx];\n let token = searcher.isSingleMatch(queryItem);\n if (token) {\n results.push(new searcher(token, options));\n break\n }\n }\n }\n\n return results\n })\n}\n\n// These extended matchers can return an array of matches, as opposed\n// to a singl match\nconst MultiMatchSet = new Set([FuzzyMatch.type, IncludeMatch.type]);\n\n/**\n * Command-like searching\n * ======================\n *\n * Given multiple search terms delimited by spaces.e.g. `^jscript .python$ ruby !java`,\n * search in a given text.\n *\n * Search syntax:\n *\n * | Token | Match type | Description |\n * | ----------- | -------------------------- | -------------------------------------- |\n * | `jscript` | fuzzy-match | Items that fuzzy match `jscript` |\n * | `=scheme` | exact-match | Items that are `scheme` |\n * | `'python` | include-match | Items that include `python` |\n * | `!ruby` | inverse-exact-match | Items that do not include `ruby` |\n * | `^java` | prefix-exact-match | Items that start with `java` |\n * | `!^earlang` | inverse-prefix-exact-match | Items that do not start with `earlang` |\n * | `.js$` | suffix-exact-match | Items that end with `.js` |\n * | `!.go$` | inverse-suffix-exact-match | Items that do not end with `.go` |\n *\n * A single pipe character acts as an OR operator. For example, the following\n * query matches entries that start with `core` and end with either`go`, `rb`,\n * or`py`.\n *\n * ```\n * ^core go$ | rb$ | py$\n * ```\n */\nclass ExtendedSearch {\n constructor(\n pattern,\n {\n isCaseSensitive = Config.isCaseSensitive,\n includeMatches = Config.includeMatches,\n minMatchCharLength = Config.minMatchCharLength,\n ignoreLocation = Config.ignoreLocation,\n findAllMatches = Config.findAllMatches,\n location = Config.location,\n threshold = Config.threshold,\n distance = Config.distance\n } = {}\n ) {\n this.query = null;\n this.options = {\n isCaseSensitive,\n includeMatches,\n minMatchCharLength,\n findAllMatches,\n ignoreLocation,\n location,\n threshold,\n distance\n };\n\n this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase();\n this.query = parseQuery(this.pattern, this.options);\n }\n\n static condition(_, options) {\n return options.useExtendedSearch\n }\n\n searchIn(text) {\n const query = this.query;\n\n if (!query) {\n return {\n isMatch: false,\n score: 1\n }\n }\n\n const { includeMatches, isCaseSensitive } = this.options;\n\n text = isCaseSensitive ? text : text.toLowerCase();\n\n let numMatches = 0;\n let allIndices = [];\n let totalScore = 0;\n\n // ORs\n for (let i = 0, qLen = query.length; i < qLen; i += 1) {\n const searchers = query[i];\n\n // Reset indices\n allIndices.length = 0;\n numMatches = 0;\n\n // ANDs\n for (let j = 0, pLen = searchers.length; j < pLen; j += 1) {\n const searcher = searchers[j];\n const { isMatch, indices, score } = searcher.search(text);\n\n if (isMatch) {\n numMatches += 1;\n totalScore += score;\n if (includeMatches) {\n const type = searcher.constructor.type;\n if (MultiMatchSet.has(type)) {\n allIndices = [...allIndices, ...indices];\n } else {\n allIndices.push(indices);\n }\n }\n } else {\n totalScore = 0;\n numMatches = 0;\n allIndices.length = 0;\n break\n }\n }\n\n // OR condition, so if TRUE, return\n if (numMatches) {\n let result = {\n isMatch: true,\n score: totalScore / numMatches\n };\n\n if (includeMatches) {\n result.indices = allIndices;\n }\n\n return result\n }\n }\n\n // Nothing was matched\n return {\n isMatch: false,\n score: 1\n }\n }\n}\n\nconst registeredSearchers = [];\n\nfunction register(...args) {\n registeredSearchers.push(...args);\n}\n\nfunction createSearcher(pattern, options) {\n for (let i = 0, len = registeredSearchers.length; i < len; i += 1) {\n let searcherClass = registeredSearchers[i];\n if (searcherClass.condition(pattern, options)) {\n return new searcherClass(pattern, options)\n }\n }\n\n return new BitapSearch(pattern, options)\n}\n\nconst LogicalOperator = {\n AND: '$and',\n OR: '$or'\n};\n\nconst KeyType = {\n PATH: '$path',\n PATTERN: '$val'\n};\n\nconst isExpression = (query) =>\n !!(query[LogicalOperator.AND] || query[LogicalOperator.OR]);\n\nconst isPath = (query) => !!query[KeyType.PATH];\n\nconst isLeaf = (query) =>\n !isArray(query) && isObject(query) && !isExpression(query);\n\nconst convertToExplicit = (query) => ({\n [LogicalOperator.AND]: Object.keys(query).map((key) => ({\n [key]: query[key]\n }))\n});\n\n// When `auto` is `true`, the parse function will infer and initialize and add\n// the appropriate `Searcher` instance\nfunction parse(query, options, { auto = true } = {}) {\n const next = (query) => {\n let keys = Object.keys(query);\n\n const isQueryPath = isPath(query);\n\n if (!isQueryPath && keys.length > 1 && !isExpression(query)) {\n return next(convertToExplicit(query))\n }\n\n if (isLeaf(query)) {\n const key = isQueryPath ? query[KeyType.PATH] : keys[0];\n\n const pattern = isQueryPath ? query[KeyType.PATTERN] : query[key];\n\n if (!isString(pattern)) {\n throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key))\n }\n\n const obj = {\n keyId: createKeyId(key),\n pattern\n };\n\n if (auto) {\n obj.searcher = createSearcher(pattern, options);\n }\n\n return obj\n }\n\n let node = {\n children: [],\n operator: keys[0]\n };\n\n keys.forEach((key) => {\n const value = query[key];\n\n if (isArray(value)) {\n value.forEach((item) => {\n node.children.push(next(item));\n });\n }\n });\n\n return node\n };\n\n if (!isExpression(query)) {\n query = convertToExplicit(query);\n }\n\n return next(query)\n}\n\n// Practical scoring function\nfunction computeScore(\n results,\n { ignoreFieldNorm = Config.ignoreFieldNorm }\n) {\n results.forEach((result) => {\n let totalScore = 1;\n\n result.matches.forEach(({ key, norm, score }) => {\n const weight = key ? key.weight : null;\n\n totalScore *= Math.pow(\n score === 0 && weight ? Number.EPSILON : score,\n (weight || 1) * (ignoreFieldNorm ? 1 : norm)\n );\n });\n\n result.score = totalScore;\n });\n}\n\nfunction transformMatches(result, data) {\n const matches = result.matches;\n data.matches = [];\n\n if (!isDefined(matches)) {\n return\n }\n\n matches.forEach((match) => {\n if (!isDefined(match.indices) || !match.indices.length) {\n return\n }\n\n const { indices, value } = match;\n\n let obj = {\n indices,\n value\n };\n\n if (match.key) {\n obj.key = match.key.src;\n }\n\n if (match.idx > -1) {\n obj.refIndex = match.idx;\n }\n\n data.matches.push(obj);\n });\n}\n\nfunction transformScore(result, data) {\n data.score = result.score;\n}\n\nfunction format(\n results,\n docs,\n {\n includeMatches = Config.includeMatches,\n includeScore = Config.includeScore\n } = {}\n) {\n const transformers = [];\n\n if (includeMatches) transformers.push(transformMatches);\n if (includeScore) transformers.push(transformScore);\n\n return results.map((result) => {\n const { idx } = result;\n\n const data = {\n item: docs[idx],\n refIndex: idx\n };\n\n if (transformers.length) {\n transformers.forEach((transformer) => {\n transformer(result, data);\n });\n }\n\n return data\n })\n}\n\nclass Fuse {\n constructor(docs, options = {}, index) {\n this.options = { ...Config, ...options };\n\n if (\n this.options.useExtendedSearch &&\n !true\n ) {\n throw new Error(EXTENDED_SEARCH_UNAVAILABLE)\n }\n\n this._keyStore = new KeyStore(this.options.keys);\n\n this.setCollection(docs, index);\n }\n\n setCollection(docs, index) {\n this._docs = docs;\n\n if (index && !(index instanceof FuseIndex)) {\n throw new Error(INCORRECT_INDEX_TYPE)\n }\n\n this._myIndex =\n index ||\n createIndex(this.options.keys, this._docs, {\n getFn: this.options.getFn,\n fieldNormWeight: this.options.fieldNormWeight\n });\n }\n\n add(doc) {\n if (!isDefined(doc)) {\n return\n }\n\n this._docs.push(doc);\n this._myIndex.add(doc);\n }\n\n remove(predicate = (/* doc, idx */) => false) {\n const results = [];\n\n for (let i = 0, len = this._docs.length; i < len; i += 1) {\n const doc = this._docs[i];\n if (predicate(doc, i)) {\n this.removeAt(i);\n i -= 1;\n len -= 1;\n\n results.push(doc);\n }\n }\n\n return results\n }\n\n removeAt(idx) {\n this._docs.splice(idx, 1);\n this._myIndex.removeAt(idx);\n }\n\n getIndex() {\n return this._myIndex\n }\n\n search(query, { limit = -1 } = {}) {\n const {\n includeMatches,\n includeScore,\n shouldSort,\n sortFn,\n ignoreFieldNorm\n } = this.options;\n\n let results = isString(query)\n ? isString(this._docs[0])\n ? this._searchStringList(query)\n : this._searchObjectList(query)\n : this._searchLogical(query);\n\n computeScore(results, { ignoreFieldNorm });\n\n if (shouldSort) {\n results.sort(sortFn);\n }\n\n if (isNumber(limit) && limit > -1) {\n results = results.slice(0, limit);\n }\n\n return format(results, this._docs, {\n includeMatches,\n includeScore\n })\n }\n\n _searchStringList(query) {\n const searcher = createSearcher(query, this.options);\n const { records } = this._myIndex;\n const results = [];\n\n // Iterate over every string in the index\n records.forEach(({ v: text, i: idx, n: norm }) => {\n if (!isDefined(text)) {\n return\n }\n\n const { isMatch, score, indices } = searcher.searchIn(text);\n\n if (isMatch) {\n results.push({\n item: text,\n idx,\n matches: [{ score, value: text, norm, indices }]\n });\n }\n });\n\n return results\n }\n\n _searchLogical(query) {\n\n const expression = parse(query, this.options);\n\n const evaluate = (node, item, idx) => {\n if (!node.children) {\n const { keyId, searcher } = node;\n\n const matches = this._findMatches({\n key: this._keyStore.get(keyId),\n value: this._myIndex.getValueForItemAtKeyId(item, keyId),\n searcher\n });\n\n if (matches && matches.length) {\n return [\n {\n idx,\n item,\n matches\n }\n ]\n }\n\n return []\n }\n\n const res = [];\n for (let i = 0, len = node.children.length; i < len; i += 1) {\n const child = node.children[i];\n const result = evaluate(child, item, idx);\n if (result.length) {\n res.push(...result);\n } else if (node.operator === LogicalOperator.AND) {\n return []\n }\n }\n return res\n };\n\n const records = this._myIndex.records;\n const resultMap = {};\n const results = [];\n\n records.forEach(({ $: item, i: idx }) => {\n if (isDefined(item)) {\n let expResults = evaluate(expression, item, idx);\n\n if (expResults.length) {\n // Dedupe when adding\n if (!resultMap[idx]) {\n resultMap[idx] = { idx, item, matches: [] };\n results.push(resultMap[idx]);\n }\n expResults.forEach(({ matches }) => {\n resultMap[idx].matches.push(...matches);\n });\n }\n }\n });\n\n return results\n }\n\n _searchObjectList(query) {\n const searcher = createSearcher(query, this.options);\n const { keys, records } = this._myIndex;\n const results = [];\n\n // List is Array<Object>\n records.forEach(({ $: item, i: idx }) => {\n if (!isDefined(item)) {\n return\n }\n\n let matches = [];\n\n // Iterate over every key (i.e, path), and fetch the value at that key\n keys.forEach((key, keyIndex) => {\n matches.push(\n ...this._findMatches({\n key,\n value: item[keyIndex],\n searcher\n })\n );\n });\n\n if (matches.length) {\n results.push({\n idx,\n item,\n matches\n });\n }\n });\n\n return results\n }\n _findMatches({ key, value, searcher }) {\n if (!isDefined(value)) {\n return []\n }\n\n let matches = [];\n\n if (isArray(value)) {\n value.forEach(({ v: text, i: idx, n: norm }) => {\n if (!isDefined(text)) {\n return\n }\n\n const { isMatch, score, indices } = searcher.searchIn(text);\n\n if (isMatch) {\n matches.push({\n score,\n key,\n value: text,\n idx,\n norm,\n indices\n });\n }\n });\n } else {\n const { v: text, n: norm } = value;\n\n const { isMatch, score, indices } = searcher.searchIn(text);\n\n if (isMatch) {\n matches.push({ score, key, value: text, norm, indices });\n }\n }\n\n return matches\n }\n}\n\nFuse.version = '7.0.0';\nFuse.createIndex = createIndex;\nFuse.parseIndex = parseIndex;\nFuse.config = Config;\n\n{\n Fuse.parseQuery = parse;\n}\n\n{\n register(ExtendedSearch);\n}\n\nexport { Fuse as default };\n", "import { Component, createSignal, JSX, Show } from \"solid-js\";\nimport {\n getSettings,\n installedPlugins,\n removePlugin,\n showSettingsFor,\n startPlugin,\n stopPlugin,\n StoredPlugin,\n updatePlugin,\n} from \"../plugins\";\nimport { devModeReservedId } from \"../devmode\";\nimport { css, classes } from \"./Plugins.tsx.scss\";\nimport {\n Header,\n HeaderTags,\n IconBin,\n IconCog,\n injectCss,\n openConfirmationModal,\n Space,\n Switch,\n focusring,\n tooltip,\n TextBox,\n IconEdit,\n IconUpdate,\n IconInfo,\n showToast,\n Button,\n ButtonLooks,\n ButtonSizes,\n ButtonColors,\n} from \"@uwu/shelter-ui\";\nimport { addPluginModal, editPluginModal } from \"./PluginEditModal\";\nimport Fuse from \"fuse.js\";\n\nfalse && focusring;\nfalse && tooltip;\n\nlet cssInjected = false;\n\nexport const PluginCard: Component<{\n id: string;\n plugin: StoredPlugin;\n}> = (props) => {\n if (!cssInjected) {\n injectCss(css);\n cssInjected = true;\n }\n\n const [on, setOn] = createSignal(props.plugin.on);\n\n const isDev = () => props.id === devModeReservedId;\n\n const ldi = props.plugin.injectorIntegration;\n const ldiName = ldi && (ldi.loaderName ?? \"a loader or custom client\");\n\n return (\n <div class={classes.plugin}>\n <div class={classes.row}>\n <strong>{props.plugin.manifest.name}</strong>\n <Space />\n by\n <Space />\n <span class={classes.author}>{props.plugin.manifest.author}</span>\n <div style=\"flex:1\" />\n {/* Some users did not understand where injector plugins came from or why, so explain it to them */}\n <Show keyed when={ldi}>\n <div\n use:tooltip={`This plugin is part of ${ldiName}.`}\n aria-label={`${props.plugin.manifest.name} is part of ${ldiName}.`}\n class={classes.btn}\n >\n <IconInfo />\n </div>\n </Show>\n <Show keyed when={getSettings(props.id)}>\n <button\n use:tooltip=\"Open settings\"\n aria-label={`open settings for ${props.plugin.manifest.name}`}\n use:focusring\n class={classes.btn}\n style={on() ? \"\" : \"opacity: 0\"}\n onclick={() => showSettingsFor(props.id)}\n >\n <IconCog />\n </button>\n </Show>\n <Show keyed when={!isDev() && !props.plugin.local && (!ldi || ldi.allowedActions.update)}>\n <button\n use:tooltip=\"Check for update\"\n aria-label={`update ${props.plugin.manifest.name}`}\n use:focusring\n class={classes.btn}\n onClick={() =>\n updatePlugin(props.id).then(\n (updated) =>\n showToast({\n title: updated\n ? `Updated ${props.plugin.manifest.name} successfully`\n : `${props.plugin.manifest.name} is already up to date`,\n duration: 3000,\n }),\n (error) =>\n showToast({\n title: `Failed to update ${props.plugin.manifest.name}`,\n content: error?.message ?? error + \"\",\n duration: 3000,\n }),\n )\n }\n >\n <IconUpdate />\n </button>\n </Show>\n <Show keyed when={!isDev() && (!ldi || ldi.allowedActions.edit)}>\n <button\n use:tooltip=\"Edit\"\n aria-label={`edit ${props.plugin.manifest.name}`}\n use:focusring\n class={classes.btn}\n onClick={() => editPluginModal(props.id)}\n >\n <IconEdit />\n </button>\n </Show>\n <Show keyed when={!isDev() && (!ldi || ldi.allowedActions.delete)}>\n <button\n use:tooltip=\"Delete\"\n aria-label={`delete ${props.plugin.manifest.name}`}\n use:focusring\n class={classes.btn}\n onclick={() =>\n openConfirmationModal({\n body: () => `Are you sure you want to delete plugin ${props.plugin.manifest.name}?`,\n header: () => \"Confirm plugin deletion\",\n type: \"danger\",\n confirmText: \"Delete\",\n }).then(\n () => removePlugin(props.id),\n () => {},\n )\n }\n >\n <IconBin />\n </button>\n </Show>\n <Show keyed when={!ldi || ldi.allowedActions.toggle}>\n <Switch\n aria-label={`${on() ? \"disable\" : \"enable\"} ${props.plugin.manifest.name}`}\n checked={on()}\n onChange={(newVal) => {\n if (props.plugin.on === newVal) return;\n setOn(!on());\n // oh no! i have to save my pretty animations! (this is utterly stupid)\n setTimeout(() => (newVal ? startPlugin(props.id) : stopPlugin(props.id)), 226);\n }}\n />\n </Show>\n </div>\n\n <span class={classes.desc}>{props.plugin.manifest.description}</span>\n </div>\n );\n};\n\nconst fuzzy = (plugins: [string, StoredPlugin][], searchTerm: string) =>\n !searchTerm || searchTerm === \"\"\n ? plugins\n : new Fuse(plugins, {\n threshold: 0.5,\n useExtendedSearch: true,\n keys: [\"1.manifest.name\", \"1.manifest.author\", \"1.manifest.description\"],\n })\n .search(searchTerm)\n .map((res) => res.item);\n\nexport default (): JSX.Element => {\n if (!cssInjected) {\n injectCss(css);\n cssInjected = true;\n }\n\n const [searchTerm, setSearchTerm] = createSignal(\"\");\n\n return (\n <div class={classes.list}>\n <Header tag={HeaderTags.EYEBROW}>{`Plugins (${Object.keys(installedPlugins()).length})`}</Header>\n <div class={classes.bar}>\n <TextBox value={searchTerm()} onInput={setSearchTerm} placeholder=\"Search plugins...\" />\n <Button\n grow\n look={ButtonLooks.FILLED}\n color={ButtonColors.BRAND}\n size={ButtonSizes.MEDIUM}\n onClick={addPluginModal}\n >\n Add Plugin\n </Button>\n </div>\n\n {/* IIRC not using a <For> here was very intentional due to keying -- sink\n * the only way to do what we need cleanly in solid looks *like this*!:\n * https://codesandbox.io/s/explicit-keys-4iyen?file=/Key.js\n */}\n {fuzzy(Object.entries(installedPlugins()), searchTerm())\n .filter(\n ([id, obj]) => id !== devModeReservedId && (!obj.injectorIntegration || obj.injectorIntegration.isVisible),\n )\n .sort(([, pluginA], [, pluginB]) => {\n const nameA = pluginA.manifest.name?.toLowerCase();\n const nameB = pluginB.manifest.name?.toLowerCase();\n return nameA < nameB ? -1 : nameA > nameB ? 1 : 0;\n })\n .map(([id, plugin]) => (\n <PluginCard {...{ id, plugin }} />\n ))}\n </div>\n );\n};\n", "import ShelterKawaiiSvg from \"shelter-assets/svg/banner-kawaii.svg\";\nimport ShelterSvg from \"shelter-assets/svg/banner.svg\";\nimport { injectCss, Button, ButtonColors } from \"@uwu/shelter-ui\";\nimport { classes, css } from \"./Settings.tsx.scss\";\nimport { createSignal } from \"solid-js\";\nimport { dbStore } from \"../storage\";\nimport Plugins from \"./Plugins\";\nimport DevUi from \"./DevUI\";\n\nlet injectedCss = false;\n\nexport default () => {\n if (!injectedCss) {\n injectCss(css);\n injectedCss = true;\n }\n\n dbStore.kawaiiBanner ??= false;\n const [clicks, setClicks] = createSignal(0);\n\n return (\n <>\n <div class={classes.wrapper}>\n <div class={classes.header}>\n <img\n class={classes.banner}\n onClick={() => {\n if (clicks() < 5) {\n setClicks(clicks() + 1);\n } else {\n setClicks(0);\n dbStore.kawaiiBanner = !dbStore.kawaiiBanner;\n }\n }}\n src={dbStore.kawaiiBanner ? ShelterKawaiiSvg : ShelterSvg}\n draggable={false}\n />\n <div class={classes.linkwrapper}>\n <Button\n color={ButtonColors.SECONDARY}\n onClick={() => window.open(\"https://shelter.uwu.network/\", \"_blank\")}\n >\n Documentation\n </Button>\n <Button\n color={ButtonColors.SECONDARY}\n onClick={() => window.open(\"https://github.com/uwu/shelter/\", \"_blank\")}\n >\n GitHub Repository\n </Button>\n </div>\n </div>\n <DevUi fullVersion />\n <Plugins />\n </div>\n </>\n );\n};\n", "// Injects a section into user settings\n\nimport { getDispatcher } from \"./flux\";\nimport { awaitDispatch, getFiber, getFiberOwner, reactFiberWalker } from \"./util\";\nimport { Component } from \"solid-js\";\nimport { SolidInReactBridge } from \"./bridges\";\nimport Settings from \"./components/Settings\";\nimport { after } from \"spitroast\";\n\ntype SettingsSection =\n | [\"divider\"]\n | [\"header\", string]\n | [\"section\", string, string, Component, object?]\n | [\"button\", string, string, () => void];\n\nconst shelterSections: SettingsSection[] = [\n [\"divider\"],\n [\"header\", \"Shelter\"],\n [\"section\", \"settings\", \"Settings\", Settings],\n];\n\nlet injectorSections: SettingsSection[] = [];\n\nlet externalSections: SettingsSection[] = [];\n\nconst generatePredicateSections = () =>\n [...injectorSections, ...shelterSections, ...externalSections].map((s) => {\n switch (s[0]) {\n case \"divider\":\n return { section: \"DIVIDER\" };\n case \"header\":\n return { section: \"HEADER\", label: s[1] };\n case \"button\":\n return { section: s[1], label: s[2], onClick: s[3] };\n\n case \"section\":\n return {\n section: s[1],\n label: s[2],\n element: () => <SolidInReactBridge comp={s[3]} />,\n ...(s[4] ?? {}),\n };\n }\n });\n\nexport async function initSettings() {\n const FluxDispatcher = await getDispatcher();\n\n let canceled = false;\n let unpatch;\n let isFirst = true;\n\n const cb = async () => {\n if (!isFirst) return;\n isFirst = false;\n\n // wait for lazy loading on initial user settings open\n await awaitDispatch((p) => p.type === \"TRACK\" && p.event === \"settings_pane_viewed\");\n\n // I <3 async\n if (canceled) return;\n\n const sidebar = document.querySelector(`nav > [role=tablist]`);\n if (!sidebar) {\n isFirst = true;\n return;\n }\n\n const f = reactFiberWalker(\n getFiber(sidebar),\n (node) => typeof node?.type === \"function\" && node.type.prototype.getPredicateSections,\n true,\n );\n\n if (typeof f?.type !== \"function\") {\n isFirst = true;\n return;\n }\n\n unpatch = after(\"getPredicateSections\", f.type.prototype, (args, ret: any[]) => {\n const changelogIdx = ret.findIndex((s) => s.section === \"changelog\");\n if (changelogIdx === -1) return;\n\n // -1 to go ahead of the divider above it\n ret.splice(changelogIdx - 1, 0, ...generatePredicateSections());\n });\n\n // trigger rerender for first load\n rerenderSidebar();\n\n FluxDispatcher.unsubscribe(\"USER_SETTINGS_MODAL_OPEN\", cb);\n };\n\n FluxDispatcher.subscribe(\"USER_SETTINGS_MODAL_OPEN\", cb);\n\n return () => {\n FluxDispatcher.unsubscribe(\"USER_SETTINGS_MODAL_OPEN\", cb);\n canceled = true;\n unpatch?.();\n };\n}\n\nfunction rerenderSidebar() {\n const sidebarParent = document.querySelector(`nav[class^=\"sidebar\"]`);\n getFiberOwner(sidebarParent)?.forceUpdate();\n}\n\nfunction registerSectionInternal(sec: SettingsSection, injector: boolean) {\n const secs = injector ? injectorSections : externalSections;\n\n secs.push(sec);\n rerenderSidebar();\n\n return () => {\n const idx = secs.indexOf(sec);\n if (idx === -1) return;\n\n secs.splice(idx, 1);\n rerenderSidebar();\n };\n}\n\nexport const registerSection = (...sec: SettingsSection) => registerSectionInternal(sec, false);\n\n// this may cause issues if used with setInjectorSections\nexport const registerInjSection = (...sec: SettingsSection) => registerSectionInternal(sec, true);\n\nexport function setInjectorSections(secs: SettingsSection[]) {\n injectorSections = secs;\n}\n\nexport function removeAllSections() {\n externalSections = [];\n}\n", "import { log } from \".\";\nimport { intercept as fluxIntercept } from \"../flux\";\nimport { intercept as httpIntercept } from \"../http\";\nimport { observe as observeDom } from \"../observer\";\nimport * as patcher from \"spitroast\";\nimport { registerSection, registerInjSection } from \"../settings\";\nimport { injectCss } from \"@uwu/shelter-ui\";\nimport { Dispatcher } from \"../types\";\n\nexport type DisposableFn = (...props: unknown[]) => () => void;\nfunction shimDisposableFn<F extends DisposableFn>(unpatches: (() => void)[], f: F) {\n return (...props: Parameters<F>) => {\n const up = f(...props);\n unpatches.push(up);\n return up;\n };\n}\n\nexport const createScopedApi = (dispatcher: Dispatcher) => createScopedApiInternal(dispatcher, false);\n\nexport function createScopedApiInternal(dispatcher: Dispatcher, injector: boolean) {\n const disposes = [];\n\n return {\n disposes,\n\n disposeAllNow() {\n for (const p of disposes) {\n try {\n p();\n } catch (e) {\n log([`Caught error while cleaning up scoped APIs, continuing safely.`, e], \"error\");\n }\n }\n disposes.splice(0, disposes.length);\n },\n\n onDispose(callback: DisposableFn) {\n disposes.push(callback);\n },\n\n flux: {\n subscribe(type: string, cb: (payload: any) => void) {\n dispatcher.subscribe(type, cb);\n const dispose = () => dispatcher.unsubscribe(type, cb);\n disposes.push(dispose);\n return dispose;\n },\n intercept: shimDisposableFn(disposes, fluxIntercept),\n },\n http: {\n intercept: shimDisposableFn(disposes, httpIntercept),\n },\n observeDom: shimDisposableFn(disposes, observeDom),\n patcher: {\n after: shimDisposableFn(disposes, patcher.after),\n before: shimDisposableFn(disposes, patcher.before),\n instead: shimDisposableFn(disposes, patcher.instead),\n },\n settings: {\n registerSection: shimDisposableFn(disposes, injector ? registerInjSection : registerSection),\n },\n ui: {\n injectCss: shimDisposableFn(disposes, injectCss),\n },\n } as const;\n}\n", "import { spread, assign, insert, createComponent, dynamicProperty, SVGElements } from 'solid-js/web';\n\nconst $ELEMENT = Symbol(\"hyper-element\");\nfunction createHyperScript(r) {\n function h() {\n let args = [].slice.call(arguments),\n e,\n multiExpression = false;\n while (Array.isArray(args[0])) args = args[0];\n if (args[0][$ELEMENT]) args.unshift(h.Fragment);\n typeof args[0] === \"string\" && detectMultiExpression(args);\n const ret = () => {\n while (args.length) item(args.shift());\n return e;\n };\n ret[$ELEMENT] = true;\n return ret;\n function item(l) {\n const type = typeof l;\n if (l == null) ;else if (\"string\" === type) {\n if (!e) parseClass(l);else e.appendChild(document.createTextNode(l));\n } else if (\"number\" === type || \"boolean\" === type || l instanceof Date || l instanceof RegExp) {\n e.appendChild(document.createTextNode(l.toString()));\n } else if (Array.isArray(l)) {\n for (let i = 0; i < l.length; i++) item(l[i]);\n } else if (l instanceof Element) {\n r.insert(e, l, multiExpression ? null : undefined);\n } else if (\"object\" === type) {\n let dynamic = false;\n const d = Object.getOwnPropertyDescriptors(l);\n for (const k in d) {\n if (k !== \"ref\" && k.slice(0, 2) !== \"on\" && typeof d[k].value === \"function\") {\n r.dynamicProperty(l, k);\n dynamic = true;\n } else if (d[k].get) dynamic = true;\n }\n dynamic ? r.spread(e, l, e instanceof SVGElement, !!args.length) : r.assign(e, l, e instanceof SVGElement, !!args.length);\n } else if (\"function\" === type) {\n if (!e) {\n let props,\n next = args[0];\n if (next == null || typeof next === \"object\" && !Array.isArray(next) && !(next instanceof Element)) props = args.shift();\n props || (props = {});\n if (args.length) {\n props.children = args.length > 1 ? args : args[0];\n }\n const d = Object.getOwnPropertyDescriptors(props);\n for (const k in d) {\n if (Array.isArray(d[k].value)) {\n const list = d[k].value;\n props[k] = () => {\n for (let i = 0; i < list.length; i++) {\n while (list[i][$ELEMENT]) list[i] = list[i]();\n }\n return list;\n };\n r.dynamicProperty(props, k);\n } else if (typeof d[k].value === \"function\" && !d[k].value.length) r.dynamicProperty(props, k);\n }\n e = r.createComponent(l, props);\n args = [];\n } else {\n while (l[$ELEMENT]) l = l();\n r.insert(e, l, multiExpression ? null : undefined);\n }\n }\n }\n function parseClass(string) {\n const m = string.split(/([\\.#]?[^\\s#.]+)/);\n if (/^\\.|#/.test(m[1])) e = document.createElement(\"div\");\n for (let i = 0; i < m.length; i++) {\n const v = m[i],\n s = v.substring(1, v.length);\n if (!v) continue;\n if (!e) e = r.SVGElements.has(v) ? document.createElementNS(\"http://www.w3.org/2000/svg\", v) : document.createElement(v);else if (v[0] === \".\") e.classList.add(s);else if (v[0] === \"#\") e.setAttribute(\"id\", s);\n }\n }\n function detectMultiExpression(list) {\n for (let i = 1; i < list.length; i++) {\n if (typeof list[i] === \"function\") {\n multiExpression = true;\n return;\n } else if (Array.isArray(list[i])) {\n detectMultiExpression(list[i]);\n }\n }\n }\n }\n h.Fragment = props => props.children;\n return h;\n}\n\nvar index = createHyperScript({\n spread,\n assign,\n insert,\n createComponent,\n dynamicProperty,\n SVGElements\n});\n\nexport { index as default };\n", "export default function(n){for(var l,e,s=arguments,t=1,r=\"\",u=\"\",a=[0],c=function(n){1===t&&(n||(r=r.replace(/^\\s*\\n\\s*|\\s*\\n\\s*$/g,\"\")))?a.push(n?s[n]:r):3===t&&(n||r)?(a[1]=n?s[n]:r,t=2):2===t&&\"...\"===r&&n?a[2]=Object.assign(a[2]||{},s[n]):2===t&&r&&!n?(a[2]=a[2]||{})[r]=!0:t>=5&&(5===t?((a[2]=a[2]||{})[e]=n?r?r+s[n]:s[n]:r,t=6):(n||r)&&(a[2][e]+=n?r+s[n]:r)),r=\"\"},h=0;h<n.length;h++){h&&(1===t&&c(),c(h));for(var i=0;i<n[h].length;i++)l=n[h][i],1===t?\"<\"===l?(c(),a=[a,\"\",null],t=3):r+=l:4===t?\"--\"===r&&\">\"===l?(t=1,r=\"\"):r=l+r[0]:u?l===u?u=\"\":r+=l:'\"'===l||\"'\"===l?u=l:\">\"===l?(c(),t=1):t&&(\"=\"===l?(t=5,e=r,r=\"\"):\"/\"===l&&(t<5||\">\"===n[h][i+1])?(c(),3===t&&(a=a[0]),t=a,(a=a[0]).push(this.apply(null,t.slice(1))),t=0):\" \"===l||\"\\t\"===l||\"\\n\"===l||\"\\r\"===l?(c(),t=2):r+=l),3===t&&\"!--\"===r&&(t=4,a=a[0])}return c(),a.length>2?a.slice(1):a[1]}\n", "import * as flux from \"./flux\";\nimport * as patcher from \"spitroast\";\nimport * as solid from \"solid-js\";\nimport * as solidStore from \"solid-js/store\";\nimport * as solidWeb from \"solid-js/web\";\nimport solidH from \"solid-js/h\";\nimport htm from \"htm/mini\";\nimport * as ui from \"@uwu/shelter-ui\";\nimport * as reacts from \"./react\";\nimport * as bridges from \"./bridges\";\nimport * as util from \"./util\";\nimport * as plugins from \"./plugins\";\nimport { registerSection } from \"./settings\";\nimport * as storage from \"./storage\";\nimport { observe } from \"./observer\";\nimport http from \"./http\";\n\n// why did I decide to try to type h``? -- sink\ndeclare function _H(\n type: string | solid.Component<any>,\n ...children: (solid.JSXElement | (() => solid.JSXElement))[]\n): () => solid.JSXElement;\ndeclare function _H(\n type: string | solid.Component<any>,\n props: Record<string, any>,\n ...children: (solid.JSXElement | (() => solid.JSXElement))[]\n): () => solid.JSXElement;\ntype H = typeof _H;\n\nfunction without<T extends Record<string, any>, TK extends string>(object: T, ...keys: TK[]) {\n //return Object.fromEntries(Object.entries(object).filter(([k]) => !keys.includes(k as any))) as Omit<T, TK>;\n const cloned = { ...object };\n keys.forEach((k) => delete cloned[k]);\n return cloned as Omit<T, TK>;\n}\n\nconst windowApi = async (unloads) => {\n const dispatcher = await flux.getDispatcher();\n\n return {\n flux: without(\n {\n ...flux,\n dispatcher,\n },\n \"injectIntercept\",\n \"getDispatcher\",\n \"blockedSym\",\n \"modifiedSym\",\n \"initDispatchLogger\",\n ),\n http,\n patcher: without(patcher, \"unpatchAll\"),\n solid,\n solidStore,\n solidWeb,\n solidH: {\n h: solidH as H,\n html: htm.bind(solidH as H),\n },\n util: {\n ...util,\n createScopedApi: util.createScopedApi.bind(undefined, dispatcher),\n },\n plugins: without(plugins, \"startAllPlugins\", \"devmodePrivateApis\", \"ensureLoaderPlugin\"),\n storage,\n observeDom: observe,\n ui: {\n ...without(ui, \"cleanupCss\", \"initToasts\"),\n ...bridges,\n },\n settings: {\n registerSection,\n },\n unload: () => unloads.forEach((p) => p?.()),\n // as much as it pains me to do this...\n ...reacts,\n };\n};\n\nexport default windowApi;\n\nexport type ShelterApi = Awaited<ReturnType<typeof windowApi>>;\n", "import { before } from \"spitroast\";\n\nfunction blockOnModal(listener: EventListener) {\n return function (ev: MouseEvent) {\n const modalRoot = document.querySelector(\".shltr-modal-rroot\");\n\n // block if the click target is within a shelter modal\n if (modalRoot && modalRoot.contains(ev.target as Element)) return;\n\n listener.apply(this, arguments);\n };\n}\n\nexport default () => {\n // discord adds an event listener for every popout opened\n // it uses this to check for clicks outside of the popout to then close it\n // we need to block this event to prevent popouts from closing while a shelter modal is open\n const unpatch1 = before(\"addEventListener\", document, function ([type, listener, options]) {\n if (type === \"mousedown\" && listener.toString().includes(\"ignoreModalClicks\")) {\n return [type, blockOnModal(listener), options];\n }\n });\n\n // also block discord's context menu as it's behind the shelter modal and therefore not usable anyways\n const unpatch2 = before(\"addEventListener\", window, function ([type, listener, options]) {\n if (type === \"contextmenu\" && listener.toString().includes(\"-webkit-user-select\")) {\n return [type, blockOnModal(listener), options];\n }\n });\n\n return () => {\n unpatch1();\n unpatch2();\n };\n};\n", "import * as patcher from \"spitroast\";\nimport * as ui from \"@uwu/shelter-ui\";\nimport * as util from \"./util\";\nimport * as plugins from \"./plugins\";\nimport { initSettings, removeAllSections, setInjectorSections } from \"./settings\";\nimport { initDispatchLogger } from \"./flux\";\nimport { unobserve } from \"./observer\";\nimport windowApi from \"./windowApi\";\nimport { sleep } from \"./util\";\nimport { initDevmode } from \"./devmode\";\nimport { unpatchHttpHandlers } from \"./http\";\nimport initModalFix from \"./modalFix\";\nimport { createEffect } from \"solid-js\";\n\nconst start = performance.now();\nutil.log(\"shelter is initializing...\");\n\nconst waitForAppMount = async () => {\n let appMount: HTMLDivElement;\n while (!appMount) {\n appMount = document.getElementById(\"app-mount\") as HTMLDivElement;\n await sleep();\n }\n\n while (appMount.childElementCount === 0) await sleep();\n\n return appMount;\n};\n\n(async () => {\n // load everything in parallel\n const unloads = await Promise.all([\n initSettings(),\n initDispatchLogger(),\n initModalFix(),\n ui.cleanupCss,\n waitForAppMount().then(ui.initToasts),\n patcher.unpatchAll,\n unobserve,\n removeAllSections,\n unpatchHttpHandlers,\n ]);\n\n ui.injectInternalStyles();\n\n window[\"shelter\"] = await windowApi(unloads);\n\n // shelter injector settings support\n // used for injectors and custom clients such as the web ext, desktop inj, armcord, to use our settings services cleanly\n // read the docs!\n // @ts-expect-error this is either a window global, or passed to shelter via the same kind of hacks used for shelterPluginEdition, so check with typeof, not window[]\n if (typeof SHELTER_INJECTOR_SETTINGS !== \"undefined\") {\n // @ts-expect-error\n const injSettings = SHELTER_INJECTOR_SETTINGS;\n createEffect(() => {\n let sections = typeof injSettings === \"function\" ? injSettings() : injSettings;\n if (Array.isArray(sections)) setInjectorSections(sections);\n else util.log(\"injector settings must be an array of sections or a signal getter for array of sections\", \"error\");\n });\n }\n\n // shelter loader plugins support\n // used for injectors and custom clients to inject special plugins that have some superpowers\n // read the docs!\n // @ts-expect-error\n if (typeof SHELTER_INJECTOR_PLUGINS !== \"undefined\") {\n // @ts-expect-error\n const injPlugins = SHELTER_INJECTOR_PLUGINS;\n\n for (const id in injPlugins) {\n const p = injPlugins[id];\n // p is either [url, loaderOpts] or a plugin object\n await plugins.ensureLoaderPlugin(id, p);\n }\n }\n\n // once everything is fully inited, start plugins\n // devmode uses plugins functionality\n unloads.push(await plugins.startAllPlugins(), await initDevmode());\n\n util.log(`shelter is initialized. took: ${(performance.now() - start).toFixed(1)}ms`);\n})();\n"],
"mappings": "mGAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,WAAAE,GAAA,WAAAC,GAAA,YAAAC,GAAA,eAAAC,KCCO,IAAMC,GAAa,CAAC,IAAK,IAAK,GAAG,EAC3BC,GAAiB,IAAI,ICAnB,SAARC,GAAkBC,EAAUC,EAAYC,EAE/CC,EAEAC,EAAa,CACT,IAAMC,EAAQC,GAAe,IAAIL,CAAU,IAAID,GAE/C,GAAI,CAACK,EACD,OAAOD,EACD,QAAQ,UAAUH,EAAWD,GAAWE,EAAUC,CAAI,EACtDF,EAAWD,GAAU,MAAMG,EAAMD,CAAQ,EAEnD,QAAWK,KAAQF,EAAM,EAAE,OAAO,EAAG,CACjC,IAAMG,EAAgBD,EAAK,KAAKJ,EAAMD,CAAQ,EAC1C,MAAM,QAAQM,CAAa,IAC3BN,EAAWM,EACnB,CAEA,IAAIC,EAAgB,CAAC,GAAGJ,EAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAACK,EAAMC,IAAY,IAAIC,IAASD,EAAQ,KAAKR,EAAMS,EAAMF,CAAI,EAE9G,IAAIE,IAASR,EACP,QAAQ,UAAUC,EAAM,EAAGO,EAAMT,CAAI,EACrCE,EAA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EAAI,kCAAkC,YAAY,IAAI,EAAID,IAAO,QAAQ,CAAC,KAAK,CACtF,GAAG",
"names": ["esm_exports", "__export", "after", "before", "instead", "unpatchAll", "patchTypes", "patchedObjects", "hook_default", "funcName", "funcParent", "funcArgs", "ctxt", "isConstruct", "patch", "patchedObjects", "hook", "maybefuncArgs", "workingRetVal", "prev", "current", "args", "unpatch", "funcParent", "funcName", "hookId", "type", "patchedObject", "patchedObjects", "patch", "patchTypes", "t", "unpatchAll", "parentObject", "hookType", "getPatchFunc_default", "patchType", "funcName", "funcParent", "callback", "oneTime", "patchedObjects", "parentInjections", "origFunc", "runHook", "ctxt", "args", "construct", "ret", "hook_default", "unpatchThisPatch", "replaceProxy", "_", "target", "prop", "receiver", "hookId", "unpatch", "before", "getPatchFunc_default", "instead", "after", "web_exports", "__export", "Aliases", "voidFn", "ChildProperties", "DOMElements", "DelegatedEvents", "Dynamic", "ErrorBoundary", "For", "Hydration", "Index", "Match", "NoHydration", "Portal", "PropAliases", "Properties", "SVGElements", "SVGNamespace", "Show", "Suspense", "SuspenseList", "Switch", "addEventListener", "assign", "classList", "className", "clearDelegatedEvents", "createComponent", "delegateEvents", "dynamicProperty", "createRenderEffect", "escape", "getHydrationKey", "getNextElement", "getNextMarker", "getNextMatch", "getOwner", "hydrate", "innerHTML", "insert", "isDev", "isServer", "createMemo", "mergeProps", "render", "renderToStream", "renderToString", "renderToStringAsync", "resolveSSRNode", "runHydrationEvents", "setAttribute", "setAttributeNS", "spread", "ssr", "ssrAttribute", "ssrClassList", "ssrElement", "ssrHydrationKey", "ssrSpread", "ssrStyle", "style", "template", "untrack", "use", "solid_exports", "__export", "$DEVCOMP", "$PROXY", "$TRACK", "DEV", "ErrorBoundary", "For", "Index", "Match", "Show", "Suspense", "SuspenseList", "Switch", "batch", "cancelCallback", "children", "createComponent", "createComputed", "createContext", "createDeferred", "createEffect", "createMemo", "createReaction", "createRenderEffect", "createResource", "createRoot", "createSelector", "createSignal", "createUniqueId", "enableExternalSource", "enableHydration", "enableScheduling", "equalFn", "from", "getListener", "getOwner", "indexArray", "lazy", "mapArray", "mergeProps", "observable", "on", "onCleanup", "onError", "onMount", "requestCallback", "resetErrorBoundaries", "runWithOwner", "sharedConfig", "splitProps", "startTransition", "untrack", "useContext", "useTransition", "taskIdCounter", "isCallbackScheduled", "isPerformingWork", "taskQueue", "currentTask", "shouldYieldToHost", "yieldInterval", "deadline", "maxYieldInterval", "scheduleCallback", "scheduledCallback", "maxSigned31BitInt", "setupScheduler", "channel", "port", "currentTime", "hasTimeRemaining", "error", "scheduling", "enqueue", "task", "findIndex", "m", "n", "k", "cmp", "fn", "options", "startTime", "timeout", "newTask", "flushWork", "initialTime", "workLoop", "callback", "didUserCallbackTimeout", "setHydrateContext", "context", "nextHydrateContext", "a", "b", "signalOptions", "ERROR", "runEffects", "runQueue", "STALE", "PENDING", "UNOWNED", "NO_INIT", "Owner", "Transition", "Scheduler", "ExternalSourceFactory", "Listener", "Updates", "Effects", "ExecCount", "transPending", "setTransPending", "detachedOwner", "listener", "owner", "unowned", "root", "updateFn", "cleanNode", "runUpdates", "value", "s", "setter", "writeSignal", "readSignal", "c", "createComputation", "updateComputation", "runUserEffects", "SuspenseContext", "lookup", "onInvalidate", "tracking", "pSource", "pFetcher", "pOptions", "source", "fetcher", "pr", "initP", "id", "loadedUnderTransition", "scheduled", "resolved", "dynamic", "contexts", "setValue", "setError", "track", "trigger", "state", "setState", "v", "loadEnd", "p", "key", "completeLoad", "err", "read", "load", "refetching", "e", "castError", "t", "node", "setDeferred", "deferred", "subs", "val", "l", "deps", "isArray", "prevInput", "defer", "prevValue", "input", "i", "result", "o", "prev", "prevListener", "handleError", "scheduler", "res", "resumeEffects", "defaultValue", "createProvider", "ctx", "memo", "resolveChildren", "getSuspenseContext", "factory", "oldFactory", "oldSource", "x", "runningTransition", "updates", "lookUpstream", "sSlot", "isComp", "current", "TransitionRunning", "markDownstream", "time", "runComputation", "nextValue", "init", "pure", "ordinary", "triggerInTransition", "inTransition", "runTop", "ancestors", "top", "wait", "completeUpdates", "scheduleQueue", "sources", "disposed", "d", "len", "queue", "item", "tasks", "userLength", "ignore", "index", "obs", "reset", "runErrors", "fns", "f", "results", "props", "observer", "handler", "dispose", "disposer", "producer", "set", "unsub", "clean", "FALLBACK", "list", "mapFn", "items", "mapped", "disposers", "indexes", "newItems", "j", "newLen", "newIndices", "newIndicesNext", "temp", "tempdisposers", "tempIndexes", "start", "end", "newEnd", "mapper", "signals", "hydrationEnabled", "Comp", "trueFn", "propTraps", "_", "property", "receiver", "resolveSource", "proxy", "keys", "target", "descriptors", "blocked", "clone", "comp", "wrap", "mod", "r", "counter", "fallback", "strictEqual", "keyed", "condition", "child", "equals", "conditions", "evalConditions", "conds", "when", "cond", "Errors", "errored", "setErrored", "suspenseListEquals", "SuspenseListContext", "wrapper", "setWrapper", "show", "listContext", "registry", "setRegistry", "reveal", "tail", "showContent", "showFallback", "reg", "reverse", "all", "inFallback", "stop", "next", "flicker", "setFallback", "store", "ref", "rendered", "booleans", "Properties", "ChildProperties", "Aliases", "PropAliases", "DelegatedEvents", "SVGElements", "SVGNamespace", "DOMElements", "reconcileArrays", "parentNode", "a", "b", "bLength", "aEnd", "bEnd", "aStart", "bStart", "after", "map", "node", "i", "index", "sequence", "t", "$$EVENTS", "render", "code", "element", "init", "options", "disposer", "createRoot", "dispose", "insert", "template", "html", "check", "isSVG", "delegateEvents", "eventNames", "document", "e", "l", "name", "eventHandler", "clearDelegatedEvents", "setAttribute", "value", "setAttributeNS", "namespace", "className", "addEventListener", "handler", "delegate", "handlerFn", "classList", "prev", "classKeys", "prevKeys", "len", "key", "toggleClassKey", "classValue", "style", "nodeStyle", "v", "s", "spread", "props", "skipChildren", "prevProps", "createRenderEffect", "insertExpression", "assign", "dynamicProperty", "src", "innerHTML", "parent", "content", "sharedConfig", "use", "fn", "arg", "untrack", "accessor", "marker", "initial", "current", "skipRef", "prop", "assignProp", "hydrate$1", "root", "gatherHydratable", "getNextElement", "getHydrationKey", "getNextMatch", "el", "nodeName", "getNextMarker", "start", "end", "count", "runHydrationEvents", "completed", "events", "toPropertyName", "_", "w", "classNames", "nameLen", "isCE", "isProp", "isChildProp", "h", "ns", "data", "unwrapArray", "cleaned", "multi", "cleanChildren", "array", "currentArray", "normalizeIncomingArray", "appendNodes", "normalized", "unwrap", "dynamic", "item", "replacement", "inserted", "isParent", "templates", "hydrate", "NoHydration", "Hydration", "voidFn", "throwInBrowser", "func", "err", "renderToString", "renderToStringAsync", "renderToStream", "ssr", "nodes", "ssrElement", "children", "needsId", "ssrClassList", "ssrStyle", "ssrAttribute", "ssrHydrationKey", "resolveSSRNode", "escape", "ssrSpread", "isServer", "isDev", "SVG_NAMESPACE", "createElement", "tagName", "args", "enableHydration", "Portal", "useShadow", "mount", "createMemo", "renderPortal", "set", "createSignal", "onMount", "clean", "setClean", "cleanup", "onCleanup", "container", "renderRoot", "Dynamic", "p", "others", "splitProps", "cached", "component", "$DEVCOMP", "isSvg", "css", "classes", "styleSet", "Set", "styleTxt", "setStyleTxt", "createSignal", "ensureInternalStyle", "style", "has", "add", "v", "InternalStyles", "_el$", "_tmpl$", "cloneNode", "_$insert", "injectInternalStyles", "mod", "injectCss", "createEffect", "ReactiveRootElem", "HTMLElement", "c", "d", "constructor", "children", "connectedCallback", "display", "_self$", "render", "_$memo", "disconnectedCallback", "customElements", "define", "ReactiveRoot", "props", "root", "_el$2", "_$untrack", "document", "importNode", "_tmpl$2", "_$owner", "_$getOwner", "injectedStyles", "cleanupCss", "forEach", "e", "remove", "css12", "_el$3", "body", "append", "push", "css13", "filter", "textContent", "genId", "Math", "random", "toString", "slice", "niceScrollbarsClass", "scrollbar", "getRoot", "el", "ShadowRoot", "tagName", "parentNode", "css2", "classes2", "FocusRing", "_el$4", "_tmpl$3", "setProperty", "_$effect", "_p$", "_v$", "x", "_v$2", "y", "_v$3", "width", "_v$4", "height", "_v$5", "rad", "undefined", "focusring", "isFocused", "activeElement", "lastFocused", "focusRingEl", "keyHandler", "ev", "code", "_$createComponent", "_$mergeProps", "getBoundingClientRect", "blurHandler", "addEventListener", "onCleanup", "removeEventListener", "css3", "classes3", "verticalOffset", "ToolTip", "contentWrapRef", "tooltipWidth", "setTooltipWidth", "createSignal2", "createEffect2", "setTimeout", "firstElementChild", "offsetWidth", "_el$5", "_tmpl$4", "_el$6", "firstChild", "_el$7", "nextSibling", "_ref$", "_$use", "_c$", "Node", "_el$8", "_tmpl$5", "_v$6", "tooltip", "active", "_v$7", "_v$8", "left", "_v$9", "under", "bottom", "_v$10", "window", "innerHeight", "top", "_v$11", "_v$12", "pointer", "_v$13", "content", "_$classList", "_$className", "propsIsArr", "Array", "isArray", "underneath", "setActive", "rect", "setRect", "updateRect", "toolTipElem", "enterHandler", "exitHandler", "isInside", "moveHandler", "clientX", "clientY", "bounding", "right", "mouseMoveHandler", "wheelHandler", "onCleanup2", "ButtonLooks", "FILLED", "filled", "INVERTED", "inverted", "OUTLINED", "outlined", "LINK", "link", "ButtonColors", "BRAND", "RED", "GREEN", "SECONDARY", "WHITE", "BLACK", "TRANSPARENT", "ButtonSizes", "NONE", "TINY", "SMALL", "MEDIUM", "LARGE", "XLARGE", "xlarge", "MIN", "large", "MAX", "max", "ICON", "icon", "Button", "rawProps", "local", "buttonProps", "splitProps", "mergeProps", "look", "color", "size", "grow", "type", "onDblClick", "onDoubleClick", "_el$9", "_tmpl$6", "_$spread", "class", "button", "LinkButton", "anchorProps", "target", "_el$10", "_tmpl$7", "linkbutton", "css4", "classes4", "CheckIcon", "_el$11", "_tmpl$8", "_$p", "state", "CheckboxItem", "checkboxProps", "splitProps2", "id", "_el$12", "_tmpl$10", "_el$13", "_el$14", "$$click", "disabled", "onChange", "checked", "_$setAttribute", "Show", "when", "keyed", "_el$15", "_tmpl$9", "_v$14", "cbwrap", "_v$15", "mt", "_v$16", "checkbox", "_$style", "Checkbox", "css5", "classes5", "PATHS_1_X", "PATHS_1_BAR", "PATHS_1_CHECK", "PATHS_2_X", "PATHS_2_BAR", "PATHS_2_CHECK", "TIMING_POINTS", "SPLINES", "DURATION", "COL_GRAY", "COL_GREEN", "PATHS_1", "PATHS_2", "X_OFFSETS", "Slider", "animateViewBox", "animatePath1", "animatePath2", "animateRectWidth", "animateRectHeight", "animateRectX", "animateRectY", "createEffect3", "on", "s", "setAttribute", "reverse", "map", "join", "beginElement", "defer", "commonAnimateProps", "dur", "calcMode", "keyTimes", "keySplines", "repeatCount", "_el$16", "_tmpl$11", "_el$17", "_el$18", "_el$19", "_el$20", "_el$21", "_el$22", "_el$23", "_el$24", "_el$25", "_el$26", "_el$27", "_ref$2", "_ref$3", "_ref$4", "_ref$5", "_ref$6", "_ref$7", "_ref$8", "_v$17", "_v$18", "slider", "_v$19", "_v$20", "_v$21", "_v$22", "Switch", "other", "splitProps3", "createMemo", "value", "_el$28", "_tmpl$12", "_el$29", "_v$23", "switch", "_v$24", "SwitchItem", "_el$30", "_tmpl$13", "_el$31", "_el$32", "_el$33", "Show2", "note", "_el$34", "hideBorder", "Divider", "_v$25", "sitem", "_v$26", "irow", "css6", "classes6", "HeaderTags", "H1", "h1", "H2", "h2", "H3", "h3", "H4", "h4", "H5", "h5", "EYEBROW", "eyebrow", "Header", "headerProps", "splitProps4", "Dynamic", "component", "includes", "tag", "h", "css7", "classes7", "css8", "classes8", "ErrBoundFallback", "err", "reset", "_el$35", "_tmpl$14", "_el$36", "_el$37", "onClick", "_v$27", "errbound", "_v$28", "errboundtitle", "_v$29", "errboundcode", "ErrorBoundary", "SEB", "fallback", "currentModals", "setCurrentModals", "createSignal3", "dispose", "animationPrePost", "setAnimationPrePost", "bgAnimPrePost", "setBgAnimPrePost", "ModalRoot", "dialogEl", "backdropEl", "createEffect4", "showModal", "preventDefault", "popModal", "stopImmediatePropagation", "_el$38", "_tmpl$15", "_el$39", "_ref$9", "_ref$10", "For", "each", "M", "idx", "_el$40", "close", "popSpecificModal", "wrap", "length", "_v$30", "mroot", "_v$31", "backdrop", "classList", "comp", "m", "openModal", "IconClose", "_el$41", "_tmpl$16", "IconAdd", "_el$42", "_tmpl$17", "IconBin", "_el$43", "_tmpl$18", "IconCog", "_el$44", "_tmpl$19", "IconEdit", "_el$45", "_tmpl$20", "IconUpdate", "_el$46", "_tmpl$21", "IconUpload", "_el$47", "_tmpl$22", "IconInfo", "_el$48", "_tmpl$23", "ModalSizes", "sm", "md", "ModalRoot2", "_el$49", "stopPropagation", "_v$32", "modal", "_v$33", "ModalFooter", "_el$50", "foot", "ModalHeader", "_el$51", "_tmpl$24", "_el$52", "_$addEventListener", "_v$34", "head", "_v$35", "cbtn", "_v$36", "noClose", "ModalBody", "_el$53", "confirmColours", "danger", "confirm", "ModalConfirmFooter", "_el$54", "cancelDisabled", "onCancel", "cancelText", "onConfirm", "confirmText", "openConfirmationModal", "header", "Promise", "res", "rej", "onCleanup3", "css9", "classes9", "TextBox", "splitProps5", "mergeProps2", "maxlength", "maxLength", "r", "createEffect5", "_el$55", "_tmpl$25", "$$input", "onInput", "_ref$11", "tbox", "TextArea", "_el$56", "_tmpl$26", "_ref$12", "tarea", "rx", "ry", "mono", "css10", "classes10", "sig", "setSig", "createSignal4", "toasts", "Object", "freeze", "setToasts", "t", "ToastContainer_default", "Dynamic2", "Toast_default", "_el$57", "_c$2", "title", "toasttitle", "_c$3", "_el$58", "Text", "toast", "initToasts", "mountPoint", "injected", "toastDiv", "_el$59", "toastcontainer", "prepend", "unmount", "render2", "showToast", "_class", "duration", "removeFunc", "Infinity", "css11", "classes11", "Slider2", "splitProps6", "mergeProps3", "step", "min", "ticks", "tick", "spacing", "keys", "floor", "fill", "parseInt", "_el$60", "_tmpl$27", "_el$61", "_el$62", "srange", "parseFloat", "_el$63", "_tmpl$28", "_el$64", "_el$65", "_v$39", "stick", "_v$40", "stickline", "_v$37", "scontainer", "_v$38", "sticks", "_el$66", "divProps", "splitProps7", "_el$67", "_tmpl$29", "mb", "Space", "_el$68", "_tmpl$30", "_$delegateEvents", "util_exports", "__export", "awaitDispatch", "createListener", "createScopedApi", "createScopedApiInternal", "createSubscription", "getFiber", "getFiberOwner", "log", "prettifyError", "reactFiberWalker", "sleep", "storeAssign", "flux_exports", "__export", "awaitStore", "blockedSym", "getDispatcher", "initDispatchLogger", "intercept", "modifiedSym", "stores", "storesFlat", "origDefineProperty", "current", "exfiltrate_default", "prop", "patchDefine", "filter", "qmt", "protoKey", "hitProto", "unpatchDefine", "cleanup", "res", "v", "c", "after", "args", "storage_exports", "__export", "dbStore", "defaults", "isInited", "signalOf", "solidMutWithSignal", "storage", "waitInit", "whenInited", "instanceOfAny", "object", "constructors", "c", "idbProxyableTypes", "cursorAdvanceMethods", "getIdbProxyableTypes", "getCursorAdvanceMethods", "cursorRequestMap", "transactionDoneMap", "transactionStoreNamesMap", "transformCache", "reverseTransformCache", "promisifyRequest", "request", "promise", "resolve", "reject", "unlisten", "success", "error", "wrap", "value", "cacheDonePromiseForTransaction", "tx", "done", "complete", "idbProxyTraps", "target", "prop", "receiver", "replaceTraps", "callback", "wrapFunction", "func", "storeNames", "args", "unwrap", "transformCachableValue", "newValue", "openDB", "name", "version", "blocked", "upgrade", "blocking", "terminated", "request", "openPromise", "wrap", "event", "db", "readMethods", "writeMethods", "cachedMethods", "getMethod", "target", "prop", "targetFuncName", "useIndex", "isWrite", "method", "storeName", "args", "tx", "replaceTraps", "oldTraps", "receiver", "cloneRec", "node", "seenNodes", "log", "newObj", "k", "symWait", "symDb", "symSig", "storesToAdd", "getDbPromise", "getDb", "store", "openDB", "udb", "name", "db", "storage", "pendingSignals", "signals", "modifiedKeys", "deletedKeys", "waitQueue", "waitInit", "cb", "mainSignal", "setMainSignal", "createSignal", "updateMainSignal", "o", "untrack", "d", "keys", "vals", "v", "_", "p", "setSig", "dbStore", "isInited", "whenInited", "res", "defaults", "fallbacks", "batch", "signalOf", "solidMutWithSignal", "sig", "update", "t", "r", "success", "defaults", "dbStore", "initDispatchLogger", "dispatcher", "getDispatcher", "backing", "val", "args", "origDispatch", "ret", "blockedSym", "log", "modifiedSym", "dispatcher", "getDispatcher", "exfiltrate_default", "fluxstore", "stores", "store", "name", "onStoreFound", "intercepts", "interceptInjected", "blockedSym", "modifiedSym", "injectIntercept", "FluxDispatcher", "cb", "payload", "apply", "obj", "k", "blocked", "intercept", "res", "v", "i", "storesFlat", "_", "storeInitPromises", "awaitStoreInit", "initPromise", "resolve", "actualIsInitialized", "value", "storeCallbacks", "c", "getStoreOnCallback", "awaitStore", "awaitInit", "methods", "resolve", "ready", "res", "discordHttp", "api", "intercept", "fun", "args", "http_default", "unpatch", "after", "unpatchHttpHandlers", "patchHttpHandlers", "patches", "instead", "original", "req", "iterator", "intercepts", "send", "value", "done", "sendOnce", "called", "method", "filter", "p", "filterFn", "url", "pair", "index", "observations", "observer", "records", "changedElems", "record", "e", "elem", "obs", "startObserving", "stopObserving", "observe", "sel", "cb", "entry", "unobs", "unobserve", "react_exports", "__export", "React", "ReactDOM", "React", "ReactDOM", "exfiltrate_default", "r", "v", "ReactInSolidBridge", "props", "root", "_tmpl$", "cloneNode", "children", "createEffect", "ReactDOM", "render", "React", "createElement", "comp", "onCleanup", "unmountComponentAtNode", "SolidInReactBridge", "ref", "useRef", "propSignal", "createSignal", "current", "useEffect", "undefined", "innerHTML", "append", "_$createComponent", "ReactiveRoot", "style", "display", "renderSolidInReact", "css", "classes", "store_exports", "__export", "$RAW", "DEV", "createMutable", "createStore", "modifyMutable", "produce", "reconcile", "unwrap", "$RAW", "$NODE", "$NAME", "wrap$1", "value", "name", "p", "$PROXY", "proxyTraps$1", "keys", "desc", "l", "prop", "isWrappable", "obj", "proto", "unwrap", "item", "set", "result", "unwrapped", "v", "i", "getDataNodes", "target", "nodes", "getDataNode", "property", "createDataNode", "proxyDescriptor$1", "trackSelf", "getListener", "ownKeys", "s", "createSignal", "receiver", "$TRACK", "tracked", "setProperty", "state", "deleting", "prev", "len", "node", "mergeStoreNode", "key", "updateArray", "current", "next", "updatePath", "path", "traversed", "part", "partType", "isArray", "from", "to", "by", "createStore", "store", "options", "unwrappedStore", "wrappedStore", "setStore", "args", "batch", "proxyDescriptor", "proxyTraps", "isFunction", "wrap", "get", "og", "createMutable", "modifyMutable", "modifier", "$ROOT", "applyState", "parent", "merge", "previous", "j", "start", "end", "newEnd", "newIndicesNext", "keyVal", "temp", "newIndices", "targetKeys", "previousKeys", "reconcile", "res", "producers", "setterTraps", "proxy", "produce", "fn", "DEV", "css", "classes", "DevUI_default", "props", "devModeOn", "createMemo", "devModeReservedId", "installedPlugins", "_el$", "_tmpl$", "cloneNode", "_$insert", "_$createComponent", "Show", "when", "fullVersion", "children", "Header", "tag", "HeaderTags", "EYEBROW", "SwitchItem", "value", "dbStore", "logDispatch", "onChange", "v", "hideBorder", "val", "enableDevmode", "catch", "e", "showToast", "title", "content", "message", "duration", "stopDevmode", "note", "_$memo", "Space", "LinkButton", "href", "_tmpl$2", "keyed", "plugin", "PluginCard", "id", "Divider", "mt", "mb", "checked", "alwaysDevMenu", "devModeReservedId", "websocketUrl", "pluginUrl", "websocket", "devModeIsOn", "installedPlugins", "removeDevmodeModal", "openDevmodeModal", "openModal", "props", "_$createComponent", "ModalRoot", "size", "ModalSizes", "MEDIUM", "children", "ModalHeader", "close", "ModalBody", "DevUI", "initDevmode", "unstyle", "injectCss", "css", "isDevButtonHovered", "unobs1", "unobs2", "createEffect", "dbStore", "alwaysDevMenu", "observe", "e", "href", "target", "onclick", "classList", "add", "classes", "devicon", "onmouseenter", "onmouseleave", "innerText", "enableDevmodeUnchecked", "catch", "err", "log", "stopDevmode", "refetchDevPlugin", "fetched", "fetch", "json", "js", "manifest", "Error", "loadedPlugins", "stopPlugin", "Promise", "res", "setTimeout", "devmodePrivateApis", "replacePlugin", "startPlugin", "rej", "WebSocket", "onclose", "onmessage", "ev", "JSON", "parse", "data", "TYPE", "onopen", "onerror", "enableDevmode", "initDevmodePlugin", "removePlugin", "undefined", "internalData", "storage", "pluginStorages", "internalLoaded", "loadedPlugins", "solidMutWithSignal", "createMutable", "installedPlugins", "signalOf", "createStorage", "pluginId", "isInited", "pluginStorages", "Error", "data", "createMutable", "flush", "Proxy", "set", "t", "p", "v", "r", "queueMicrotask", "Reflect", "deleteProperty", "createPluginApi", "manifest", "injectorIntegration", "store", "flushStore", "scoped", "createScopedApiInternal", "window", "flux", "dispatcher", "id", "showSettings", "openModal", "mprops", "_$createComponent", "ModalRoot", "children", "ModalHeader", "close", "_$memo", "name", "ModalBody", "getSettings", "startPlugin", "internalData", "internalLoaded", "pluginApi", "shelterPluginEdition", "plugin", "settings", "setInjectorSections", "registerSection", "registerInjSection", "pluginString", "js", "atob", "eval", "scopedDispose", "disposeAllNow", "onLoad", "on", "e", "log", "onUnload", "e2", "stopPlugin", "loadedData", "fetchUpdate", "local", "src", "newPluginManifest", "fetch", "URL", "cache", "json", "hash", "undefined", "newPluginText", "text", "prettifyError", "cause", "updatePlugin", "checked", "editPlugin", "stopAllPlugins", "Object", "keys", "forEach", "startAllPlugins", "Promise", "all", "waitInit", "allPlugins", "k", "results", "allSettled", "filter", "update", "map", "res", "status", "reason", "toStart", "devModeReservedId", "addLocalPlugin", "addRemotePlugin", "endsWith", "removePlugin", "overwrite", "updating", "wasRunning", "showSettingsFor", "onCleanup", "ensureLoaderPlugin", "isRemote", "Array", "isArray", "integration", "isVisible", "allowedActions", "assign", "toggle", "devmodePrivateApis", "initDevmodePlugin", "replacePlugin", "obj", "css", "classes", "JsUploader", "props", "inp", "_el$", "_tmpl$", "cloneNode", "addEventListener", "f", "files", "reader", "FileReader", "readAsText", "onloadend", "setCode", "result", "_ref$", "_$use", "_el$2", "_tmpl$2", "$$click", "click", "_$insert", "_$createComponent", "IconUpload", "_$effect", "_$className", "classes", "btn", "PluginEditModal", "onCleanup", "resolve", "stateInit", "editId", "untrack", "installedPlugins", "local", "on", "js", "update", "src", "manifest", "name", "author", "description", "reject", "setLocal", "createSignal", "rSrc", "setRSrc", "rUpdate", "setRUpdate", "lName", "setLName", "lCode", "setLCode", "lAuthor", "setLAuthor", "lDesc", "setLDesc", "targetId", "createMemo", "split", "id", "toLowerCase", "replaceAll", "validate", "URL", "ModalRoot", "children", "ModalHeader", "close", "Show", "keyed", "when", "fallback", "_$memo", "ModalBody", "SwitchItem", "checked", "onChange", "hideBorder", "Switch", "Match", "Header", "tag", "HeaderTags", "EYEBROW", "TextBox", "placeholder", "value", "onInput", "Space", "_el$3", "_tmpl$3", "TextArea", "mono", "style", "spellcheck", "tawrap", "ModalConfirmFooter", "confirmText", "disabled", "onConfirm", "wasRunning", "stopPlugin", "editPlugin", "hash", "undefined", "updatePlugin", "startPlugin", "addLocalPlugin", "addRemotePlugin", "e", "addPluginModal", "Promise", "res", "openModal", "r", "showToast", "title", "duration", "err", "content", "message", "editPluginModal", "_$delegateEvents", "isArray", "value", "getTag", "INFINITY", "baseToString", "result", "toString", "isString", "isNumber", "isBoolean", "isObjectLike", "isObject", "isDefined", "isBlank", "INCORRECT_INDEX_TYPE", "LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY", "key", "PATTERN_LENGTH_TOO_LARGE", "max", "MISSING_KEY_PROPERTY", "name", "INVALID_KEY_WEIGHT_VALUE", "hasOwn", "KeyStore", "keys", "totalWeight", "obj", "createKey", "keyId", "path", "id", "src", "weight", "getFn", "isString", "isArray", "createKeyPath", "createKeyId", "get", "list", "arr", "deepGet", "index", "isDefined", "value", "isNumber", "isBoolean", "toString", "i", "len", "MatchOptions", "BasicOptions", "a", "b", "FuzzyOptions", "AdvancedOptions", "Config", "SPACE", "norm", "mantissa", "cache", "m", "numTokens", "n", "FuseIndex", "fieldNormWeight", "docs", "records", "idx", "doc", "docIndex", "item", "isBlank", "record", "keyIndex", "subRecords", "stack", "nestedArrIndex", "subRecord", "k", "createIndex", "myIndex", "parseIndex", "data", "computeScore$1", "pattern", "errors", "currentLocation", "expectedLocation", "distance", "ignoreLocation", "accuracy", "proximity", "convertMaskToIndices", "matchmask", "minMatchCharLength", "indices", "start", "end", "match", "MAX_BITS", "search", "text", "patternAlphabet", "location", "threshold", "findAllMatches", "includeMatches", "patternLen", "textLen", "currentThreshold", "bestLocation", "computeMatches", "matchMask", "score", "lastBitArr", "finalScore", "binMax", "mask", "binMin", "binMid", "finish", "bitArr", "j", "charMatch", "result", "createPatternAlphabet", "char", "BitapSearch", "isCaseSensitive", "addChunk", "startIndex", "remainder", "allIndices", "totalScore", "hasMatches", "alphabet", "isMatch", "BaseMatch", "getMatch", "exp", "matches", "ExactMatch", "InverseExactMatch", "PrefixExactMatch", "InversePrefixExactMatch", "SuffixExactMatch", "InverseSuffixExactMatch", "FuzzyMatch", "IncludeMatch", "searchers", "searchersLen", "SPACE_RE", "OR_TOKEN", "parseQuery", "options", "query", "results", "queryItem", "found", "searcher", "token", "MultiMatchSet", "ExtendedSearch", "_", "numMatches", "qLen", "pLen", "type", "registeredSearchers", "register", "args", "createSearcher", "searcherClass", "LogicalOperator", "KeyType", "isExpression", "isPath", "isLeaf", "isObject", "convertToExplicit", "parse", "auto", "next", "isQueryPath", "node", "computeScore", "ignoreFieldNorm", "transformMatches", "transformScore", "format", "includeScore", "transformers", "transformer", "Fuse", "predicate", "limit", "shouldSort", "sortFn", "expression", "evaluate", "res", "child", "resultMap", "expResults", "cssInjected", "PluginCard", "props", "injectCss", "css", "on", "setOn", "createSignal", "plugin", "isDev", "id", "devModeReservedId", "ldi", "injectorIntegration", "ldiName", "loaderName", "_el$", "_tmpl$3", "cloneNode", "_el$2", "firstChild", "_el$3", "_el$4", "nextSibling", "_el$5", "_el$6", "_el$12", "_$insert", "manifest", "name", "_$createComponent", "Space", "author", "Show", "keyed", "when", "children", "_el$7", "_tmpl$", "_$use", "tooltip", "IconInfo", "_$effect", "_p$", "_v$", "_v$2", "classes", "btn", "_$setAttribute", "_$className", "undefined", "getSettings", "_el$8", "_tmpl$2", "$$click", "showSettingsFor", "focusring", "IconCog", "_v$3", "_v$4", "_v$5", "_$style", "local", "allowedActions", "update", "_el$9", "updatePlugin", "then", "updated", "showToast", "title", "duration", "error", "content", "message", "IconUpdate", "_v$6", "_v$7", "edit", "_el$10", "editPluginModal", "IconEdit", "_v$8", "_v$9", "delete", "_el$11", "openConfirmationModal", "body", "header", "type", "confirmText", "removePlugin", "IconBin", "_v$10", "_v$11", "toggle", "Switch", "checked", "onChange", "newVal", "setTimeout", "startPlugin", "stopPlugin", "description", "_v$12", "_v$13", "row", "_v$14", "_v$15", "desc", "fuzzy", "plugins", "searchTerm", "Fuse", "threshold", "useExtendedSearch", "keys", "search", "map", "res", "item", "Plugins_default", "setSearchTerm", "_el$13", "_tmpl$4", "_el$14", "Header", "tag", "HeaderTags", "EYEBROW", "Object", "installedPlugins", "length", "TextBox", "value", "onInput", "placeholder", "Button", "grow", "look", "ButtonLooks", "FILLED", "color", "ButtonColors", "BRAND", "size", "ButtonSizes", "MEDIUM", "onClick", "addPluginModal", "entries", "filter", "obj", "isVisible", "sort", "pluginA", "pluginB", "nameA", "toLowerCase", "nameB", "_v$16", "list", "_v$17", "bar", "_$delegateEvents", "injectedCss", "Settings_default", "injectCss", "css", "dbStore", "kawaiiBanner", "clicks", "setClicks", "createSignal", "_el$", "_tmpl$", "cloneNode", "_el$2", "firstChild", "_el$3", "_el$4", "nextSibling", "$$click", "_$setAttribute", "_$insert", "_$createComponent", "Button", "color", "ButtonColors", "SECONDARY", "onClick", "window", "open", "children", "DevUi", "fullVersion", "Plugins", "_$effect", "_p$", "_v$", "classes", "wrapper", "_v$2", "header", "_v$3", "banner", "_v$4", "ShelterKawaiiSvg", "ShelterSvg", "_v$5", "linkwrapper", "_$className", "undefined", "_$delegateEvents", "shelterSections", "Settings", "injectorSections", "externalSections", "generatePredicateSections", "map", "s", "section", "label", "onClick", "element", "_$createComponent", "SolidInReactBridge", "comp", "initSettings", "FluxDispatcher", "getDispatcher", "canceled", "unpatch", "isFirst", "cb", "awaitDispatch", "p", "type", "event", "sidebar", "document", "querySelector", "f", "reactFiberWalker", "getFiber", "node", "prototype", "getPredicateSections", "after", "args", "ret", "changelogIdx", "findIndex", "splice", "rerenderSidebar", "unsubscribe", "subscribe", "sidebarParent", "getFiberOwner", "forceUpdate", "registerSectionInternal", "sec", "injector", "secs", "push", "idx", "indexOf", "registerSection", "registerInjSection", "setInjectorSections", "removeAllSections", "shimDisposableFn", "unpatches", "f", "props", "up", "createScopedApi", "dispatcher", "createScopedApiInternal", "injector", "disposes", "p", "e", "log", "callback", "type", "cb", "dispose", "intercept", "observe", "after", "before", "instead", "registerInjSection", "registerSection", "injectCss", "fiberKey", "getFiber", "n", "key", "getFiberOwner", "filter", "stateNode", "reactFiberWalker", "node", "goUp", "ignoreStringType", "recursionLimit", "prop", "awaitDispatch", "res", "filterFunc", "payload", "unintercept", "intercept", "p", "log", "text", "func", "createListener", "type", "subData", "setSubData", "createSignal", "cancel", "dispatcher", "getDispatcher", "d", "onCleanup", "createSubscription", "store", "getStateFromStore", "data", "setData", "cb", "storeAssign", "toApply", "batch", "sleep", "ms", "r", "prettifyError", "errorNameRaw", "errorName", "$ELEMENT", "createHyperScript", "r", "h", "args", "e", "multiExpression", "detectMultiExpression", "ret", "item", "l", "type", "parseClass", "i", "dynamic", "d", "k", "props", "next", "list", "string", "m", "v", "s", "index", "spread", "assign", "insert", "createComponent", "dynamicProperty", "SVGElements", "index_module_default", "n", "l", "e", "s", "t", "r", "u", "c", "h", "i", "without", "object", "keys", "cloned", "k", "windowApi", "unloads", "dispatcher", "getDispatcher", "flux_exports", "http_default", "esm_exports", "solid_exports", "store_exports", "web_exports", "index", "index_module_default", "util_exports", "createScopedApi", "plugins_exports", "storage_exports", "observe", "dist_exports", "bridges_exports", "registerSection", "p", "react_exports", "windowApi_default", "blockOnModal", "listener", "ev", "modalRoot", "modalFix_default", "unpatch1", "before", "type", "options", "unpatch2", "start", "log", "waitForAppMount", "appMount", "sleep", "unloads", "initSettings", "initDispatchLogger", "modalFix_default", "cleanupCss", "initToasts", "unpatchAll", "unobserve", "removeAllSections", "unpatchHttpHandlers", "injectInternalStyles", "windowApi_default", "injSettings", "createEffect", "sections", "setInjectorSections", "injPlugins", "id", "p", "ensureLoaderPlugin", "startAllPlugins", "initDevmode"]
}