@inkandswitch/patchwork-pkg-base 0.0.22 → 0.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"FrameConfigurator-CIgJ8HSh.js","sources":["../../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js","../../../node_modules/.pnpm/debug@4.4.3_supports-color@7.2.0/node_modules/debug/src/common.js","../../../node_modules/.pnpm/debug@4.4.3_supports-color@7.2.0/node_modules/debug/src/browser.js","../../../node_modules/.pnpm/cabbages@0.2.8_supports-color@7.2.0/node_modules/cabbages/output/cabbages.js","../../../node_modules/.pnpm/solid-automerge@2.0.0_@automerge+automerge-repo@2.6.0-subduction.39_supports-color@7.2._8e15862855dc1049500b068e056c0726/node_modules/solid-automerge/out/autoproduce.js","../../../node_modules/.pnpm/solid-automerge@2.0.0_@automerge+automerge-repo@2.6.0-subduction.39_supports-color@7.2._8e15862855dc1049500b068e056c0726/node_modules/solid-automerge/out/makeDocumentProjection.js","../../../node_modules/.pnpm/@solid-primitives+utils@6.4.1_solid-js@1.9.14/node_modules/@solid-primitives/utils/dist/index.js","../../../node_modules/.pnpm/solid-automerge@2.0.0_@automerge+automerge-repo@2.6.0-subduction.39_supports-color@7.2._8e15862855dc1049500b068e056c0726/node_modules/solid-automerge/out/createDocumentProjection.js","../../../node_modules/.pnpm/solid-automerge@2.0.0_@automerge+automerge-repo@2.6.0-subduction.39_supports-color@7.2._8e15862855dc1049500b068e056c0726/node_modules/solid-automerge/out/context.js","../../../node_modules/.pnpm/solid-automerge@2.0.0_@automerge+automerge-repo@2.6.0-subduction.39_supports-color@7.2._8e15862855dc1049500b068e056c0726/node_modules/solid-automerge/out/useDocHandle.js","../../../node_modules/.pnpm/solid-automerge@2.0.0_@automerge+automerge-repo@2.6.0-subduction.39_supports-color@7.2._8e15862855dc1049500b068e056c0726/node_modules/solid-automerge/out/useDocument.js","../../src/FrameConfigurator.tsx"],"sourcesContent":["/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '')\n\t\t\t.trim()\n\t\t\t.replace(/\\s+/g, ',')\n\t\t\t.split(',')\n\t\t\t.filter(Boolean);\n\n\t\tfor (const ns of split) {\n\t\t\tif (ns[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(ns.slice(1));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(ns);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given string matches a namespace template, honoring\n\t * asterisks as wildcards.\n\t *\n\t * @param {String} search\n\t * @param {String} template\n\t * @return {Boolean}\n\t */\n\tfunction matchesTemplate(search, template) {\n\t\tlet searchIndex = 0;\n\t\tlet templateIndex = 0;\n\t\tlet starIndex = -1;\n\t\tlet matchIndex = 0;\n\n\t\twhile (searchIndex < search.length) {\n\t\t\tif (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {\n\t\t\t\t// Match character or proceed with wildcard\n\t\t\t\tif (template[templateIndex] === '*') {\n\t\t\t\t\tstarIndex = templateIndex;\n\t\t\t\t\tmatchIndex = searchIndex;\n\t\t\t\t\ttemplateIndex++; // Skip the '*'\n\t\t\t\t} else {\n\t\t\t\t\tsearchIndex++;\n\t\t\t\t\ttemplateIndex++;\n\t\t\t\t}\n\t\t\t} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition\n\t\t\t\t// Backtrack to the last '*' and try to match more characters\n\t\t\t\ttemplateIndex = starIndex + 1;\n\t\t\t\tmatchIndex++;\n\t\t\t\tsearchIndex = matchIndex;\n\t\t\t} else {\n\t\t\t\treturn false; // No match\n\t\t\t}\n\t\t}\n\n\t\t// Handle trailing '*' in template\n\t\twhile (templateIndex < template.length && template[templateIndex] === '*') {\n\t\t\ttemplateIndex++;\n\t\t}\n\n\t\treturn templateIndex === template.length;\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names,\n\t\t\t...createDebug.skips.map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tfor (const skip of createDebug.skips) {\n\t\t\tif (matchesTemplate(name, skip)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (const ns of createDebug.names) {\n\t\t\tif (matchesTemplate(name, ns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t// eslint-disable-next-line no-return-assign\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","// cabbages.ts\nimport debug from \"debug\";\nvar log = debug(\"cabbages\");\nfunction pojo(target) {\n return typeof target == \"object\" && typeof target != null && Object.getPrototypeOf(target) == Object.prototype;\n}\nvar BLOCK_MARKER = \"\\uFFFC\";\nfunction apply(target, ...rest) {\n if (rest.length == 0) {\n log(\"empty patch\");\n return;\n }\n const [path, range, val] = rest;\n let p = [...path];\n while (true) {\n let key = p.shift();\n if (!p.length) {\n const RANGE_ARRAY = Array.isArray(range);\n if (pojo(target) && RANGE_ARRAY && typeof key == \"undefined\" && typeof range[0] == \"string\") {\n delete target[range[0]];\n return;\n }\n if (RANGE_ARRAY || typeof range == \"number\") {\n if (typeof key == \"undefined\") {\n throw new Error(\"cant treat top level as a seq\");\n }\n key = key;\n let [start, end] = Array.isArray(range) ? range : [range, range + 1];\n const ZERO_LENGTH = Array.isArray(range) && range.length == 0;\n if (!ZERO_LENGTH && (start == null || end == null)) {\n throw new RangeError(\"it's all or nothing, no half measures\");\n }\n const DELETE = typeof val == \"undefined\";\n const INSERT = start === end && !DELETE;\n const APPEND = ZERO_LENGTH && !DELETE;\n const REPLACE = !INSERT && !DELETE && !APPEND;\n if (typeof target[key] == \"undefined\") {\n if (typeof target == \"string\") {\n return;\n } else if (typeof val == \"string\") {\n target[key] = \"\";\n } else {\n target[key] = [];\n }\n }\n let seq = target[key];\n if (Array.isArray(seq)) {\n if (APPEND) {\n Array.isArray(val) ? seq.push(...val) : seq.push(val);\n return;\n }\n if (INSERT || REPLACE) {\n Array.isArray(val) ? seq.splice(start, end - start, ...val) : seq.splice(start, end - start, val);\n return;\n }\n if (DELETE) {\n seq.splice(start, end - start);\n return;\n }\n throw new Error(\"i don't know what happened\");\n }\n if (typeof seq == \"string\") {\n if (APPEND) {\n target[key] = seq + val;\n return;\n }\n if (REPLACE || INSERT) {\n target[key] = seq.slice(0, start) + (typeof val == \"string\" ? val : val.map(\n (n) => typeof n == \"string\" ? n : BLOCK_MARKER\n ).join(\"\")) + seq.slice(end);\n return;\n }\n if (DELETE) {\n target[key] = seq.slice(0, start) + seq.slice(end);\n return;\n }\n throw new Error(\"i don't know what happened\");\n }\n if (pojo(seq) && RANGE_ARRAY && typeof range[0] == \"string\") {\n delete seq[range[0]];\n return;\n }\n throw new Error(\"not implemented\");\n }\n if (typeof key == \"undefined\") {\n if (typeof range != \"string\") {\n throw new Error(`can't index top-level map with ${range}`);\n }\n if (typeof val == \"undefined\") {\n delete target[range];\n } else {\n target[range] = val;\n }\n return;\n }\n if (typeof target[key] == \"undefined\") {\n target[key] = {};\n }\n if (RANGE_ARRAY) {\n let [a, b] = range;\n if (a != null && b != null) {\n if (typeof val == \"undefined\" && a != null && b != null) {\n delete target[key][a || b];\n } else {\n target[key][a || b] = val;\n }\n }\n } else {\n if (typeof val == \"undefined\") {\n delete target[key][range];\n } else if (typeof target[key] == \"string\") {\n return;\n } else {\n target[key][range] = val;\n }\n }\n return;\n }\n if (typeof key == \"undefined\") {\n throw new Error(\"cant treat top level as a seq\");\n }\n key = key;\n let nextkey = p[0];\n if (typeof target[key] == \"undefined\") {\n if (typeof nextkey == \"string\") {\n target[key] = {};\n } else if (typeof nextkey == \"number\") {\n target[key] = [];\n } else {\n throw new Error(`can't go down this road ${target}.${key}.${nextkey}`);\n }\n }\n target = target[key];\n }\n}\nvar patch = apply;\nfunction get(obj, key) {\n for (let p = 0; p < key.length; p++) {\n obj = obj ? obj[key[p]] : void 0;\n }\n return obj;\n}\nfunction fromAutomerge(autopatch, payload) {\n const path = autopatch.path.slice(0, -1);\n const key = autopatch.path[autopatch.path.length - 1];\n switch (autopatch.action) {\n case \"mark\":\n case \"unmark\":\n log(\n `skipping ${autopatch.action} because it doesn't affect material reality`\n );\n return [];\n case \"inc\":\n if (payload) {\n return [path, key, get(payload.patchInfo.after, autopatch.path)];\n } else {\n throw new Error(\n `can't apply ${autopatch.action} without payload argument`\n );\n }\n case \"conflict\":\n if (payload) {\n return [path, key, get(payload.patchInfo.after, autopatch.path)];\n } else {\n throw new Error(\n `can't apply ${autopatch.action} without payload argument`\n );\n }\n case \"del\": {\n return typeof key == \"string\" ? [path, key] : [path, [key, key + (autopatch.length || 1)]];\n }\n case \"insert\": {\n return [path, [key, key], autopatch.values];\n }\n case \"splice\": {\n return [path, [key, key], [autopatch.value]];\n }\n case \"put\": {\n return [path, key, autopatch.value];\n }\n }\n}\nexport {\n apply,\n fromAutomerge,\n patch,\n pojo\n};\n","\"use strict\";\nimport { apply, fromAutomerge } from \"cabbages\";\nexport default function autoproduce(payload) {\n return (doc) => {\n for (let patch of payload.patches) {\n apply(doc, ...fromAutomerge(patch, payload));\n }\n };\n}\n//# sourceMappingURL=autoproduce.js.map\n","\"use strict\";\nimport { onCleanup } from \"solid-js\";\nimport autoproduce from \"./autoproduce.js\";\nimport { createStore, produce, reconcile } from \"solid-js/store\";\nconst cache = /* @__PURE__ */ new WeakMap();\nexport default function makeDocumentProjection(handle) {\n onCleanup(() => {\n const item = cache.get(handle);\n if (!item) return;\n if (!item.refs--) {\n item.cleanup();\n }\n });\n if (cache.has(handle)) {\n const item = cache.get(handle);\n item.refs++;\n return item.store;\n }\n const [doc, set] = createStore(handle.doc());\n cache.set(handle, {\n refs: 0,\n store: doc,\n cleanup() {\n handle.off(\"change\", patch);\n handle.off(\"delete\", ondelete);\n cache.delete(handle);\n }\n });\n function patch(payload) {\n if (payload.scopeReplaced) {\n set(reconcile(payload.doc ?? {}));\n return;\n }\n set(produce(autoproduce(payload)));\n }\n function ondelete() {\n set(reconcile({}));\n }\n handle.on(\"change\", patch);\n handle.on(\"delete\", ondelete);\n handle.whenReady().then(() => {\n set(handle.doc());\n });\n return doc;\n}\n//# sourceMappingURL=makeDocumentProjection.js.map\n","import { getOwner, onCleanup, createSignal, untrack, sharedConfig, onMount, DEV, equalFn, } from \"solid-js\";\nimport { isServer } from \"solid-js/web\";\nexport * from \"./types.js\";\n//\n// GENERAL HELPERS:\n//\nexport { isServer };\nexport const isClient = !isServer;\nexport const isDev = isClient && !!DEV;\nexport const isProd = !isDev;\n/** no operation */\nexport const noop = (() => void 0);\nexport const trueFn = () => true;\nexport const falseFn = () => false;\n/** @deprecated use {@link equalFn} from \"solid-js\" */\nexport const defaultEquals = equalFn;\nexport const EQUALS_FALSE_OPTIONS = { equals: false };\nexport const INTERNAL_OPTIONS = { internal: true };\n/**\n * Check if the value is an instance of ___\n */\nexport const ofClass = (v, c) => v instanceof c || (v && v.constructor === c);\n/** Check if value is typeof \"object\" or \"function\" */\nexport function isObject(value) {\n return value !== null && (typeof value === \"object\" || typeof value === \"function\");\n}\nexport const isNonNullable = (i) => i != null;\nexport const filterNonNullable = (arr) => arr.filter(isNonNullable);\nexport const compare = (a, b) => (a < b ? -1 : a > b ? 1 : 0);\n/**\n * Check shallow array equality\n */\nexport const arrayEquals = (a, b) => a === b || (a.length === b.length && a.every((e, i) => e === b[i]));\n/**\n * Returns a function that will call all functions in the order they were chained with the same arguments.\n */\nexport function chain(callbacks) {\n return (...args) => {\n for (const callback of callbacks)\n callback && callback(...args);\n };\n}\n/**\n * Returns a function that will call all functions in the reversed order with the same arguments.\n */\nexport function reverseChain(callbacks) {\n return (...args) => {\n for (let i = callbacks.length - 1; i >= 0; i--) {\n const callback = callbacks[i];\n callback && callback(...args);\n }\n };\n}\nexport const clamp = (n, min, max) => Math.min(Math.max(n, min), max);\n/**\n * Accesses the value of a MaybeAccessor\n * @example\n * ```ts\n * access(\"foo\") // => \"foo\"\n * access(() => \"foo\") // => \"foo\"\n * ```\n */\nexport const access = (v) => typeof v === \"function\" && !v.length ? v() : v;\nexport const asArray = (value) => Array.isArray(value) ? value : value ? [value] : [];\n/**\n * Access an array of MaybeAccessors\n * @example\n * const list = [1, 2, () => 3)] // T: MaybeAccessor<number>[]\n * const newList = accessArray(list) // T: number[]\n */\nexport const accessArray = (list) => list.map(v => access(v));\n/**\n * Run the function if the accessed value is not `undefined` nor `null`\n * @param value\n * @param fn\n */\nexport const withAccess = (value, fn) => {\n const _value = access(value);\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n typeof _value != null && fn(_value);\n};\nexport const asAccessor = (v) => (typeof v === \"function\" ? v : () => v);\n/** If value is a function – call it with a given arguments – otherwise get the value as is */\nexport function accessWith(valueOrFn, ...args) {\n return typeof valueOrFn === \"function\" ? valueOrFn(...args) : valueOrFn;\n}\nexport function defer(deps, fn, initialValue) {\n const isArray = Array.isArray(deps);\n let prevInput;\n let shouldDefer = true;\n return prevValue => {\n let input;\n if (isArray) {\n input = Array(deps.length);\n for (let i = 0; i < deps.length; i++)\n input[i] = deps[i]();\n }\n else\n input = deps();\n if (shouldDefer) {\n shouldDefer = false;\n prevInput = input;\n return initialValue;\n }\n const result = untrack(() => fn(input, prevInput, prevValue));\n prevInput = input;\n return result;\n };\n}\n/**\n * Get entries of an object\n */\nexport const entries = Object.entries;\n/**\n * Get keys of an object\n */\nexport const keys = Object.keys;\n/**\n * Solid's `onCleanup` that doesn't warn in development if used outside of a component.\n */\nexport const tryOnCleanup = isDev\n ? fn => (getOwner() ? onCleanup(fn) : fn)\n : onCleanup;\nexport const createCallbackStack = () => {\n let stack = [];\n const clear = () => (stack = []);\n return {\n push: (...callbacks) => stack.push(...callbacks),\n execute(arg0, arg1, arg2, arg3) {\n stack.forEach(cb => cb(arg0, arg1, arg2, arg3));\n clear();\n },\n clear,\n };\n};\n/**\n * Group synchronous function calls.\n * @param fn\n * @returns `fn`\n */\nexport function createMicrotask(fn) {\n let calls = 0;\n let args;\n onCleanup(() => (calls = 0));\n return (...a) => {\n (args = a), calls++;\n queueMicrotask(() => --calls === 0 && fn(...args));\n };\n}\n/**\n * A hydratable version of the {@link createSignal}. It will use the serverValue on the server and the update function on the client. If initialized during hydration it will use serverValue as the initial value and update it once hydration is complete.\n *\n * @param serverValue initial value of the state on the server\n * @param update called once on the client or on hydration to initialize the value\n * @param options {@link SignalOptions}\n * @returns\n * ```ts\n * [state: Accessor<T>, setState: Setter<T>]\n * ```\n * @see {@link createSignal}\n */\nexport function createHydratableSignal(serverValue, update, options) {\n if (isServer) {\n return createSignal(serverValue, options);\n }\n if (sharedConfig.context) {\n const [state, setState] = createSignal(serverValue, options);\n onMount(() => setState(() => update()));\n return [state, setState];\n }\n return createSignal(update(), options);\n}\n/** @deprecated use {@link createHydratableSignal} instead */\nexport const createHydrateSignal = createHydratableSignal;\n/**\n * Handle items removed and added to the array by diffing it by refference.\n *\n * @param current new array instance\n * @param prev previous array copy\n * @param handleAdded called once for every added item to array\n * @param handleRemoved called once for every removed from array\n */\nexport function handleDiffArray(current, prev, handleAdded, handleRemoved) {\n const currLength = current.length;\n const prevLength = prev.length;\n let i = 0;\n if (!prevLength) {\n for (; i < currLength; i++)\n handleAdded(current[i]);\n return;\n }\n if (!currLength) {\n for (; i < prevLength; i++)\n handleRemoved(prev[i]);\n return;\n }\n for (; i < prevLength; i++) {\n if (prev[i] !== current[i])\n break;\n }\n let prevEl;\n let currEl;\n prev = prev.slice(i);\n current = current.slice(i);\n for (prevEl of prev) {\n if (!current.includes(prevEl))\n handleRemoved(prevEl);\n }\n for (currEl of current) {\n if (!prev.includes(currEl))\n handleAdded(currEl);\n }\n}\n// ─── String transforms ────────────────────────────────────────────────────────\n/**\n * Parse a string as a single JSON value.\n *\n * ```ts\n * const { data } = createSSE<{ status: string }>(url, { transform: json });\n * ```\n */\nexport const json = (raw) => JSON.parse(raw);\n/**\n * Parse a string as newline-delimited JSON (NDJSON / JSON Lines).\n *\n * Each non-empty line is parsed as a separate JSON value and returned as an array.\n *\n * ```ts\n * const { data } = createSSE<TickEvent[]>(url, { transform: ndjson });\n * // data() === [{ id: 1, type: \"tick\" }, { id: 2, type: \"tick\" }]\n * ```\n */\nexport const ndjson = (raw) => raw\n .split(\"\\n\")\n .filter(line => line !== \"\")\n .map(line => JSON.parse(line));\n/**\n * Split a string into individual lines, returning a `string[]`. Empty lines are filtered out.\n *\n * ```ts\n * const { data } = createSSE<string[]>(url, { transform: lines });\n * // data() === [\"line one\", \"line two\"]\n * ```\n */\nexport const lines = (raw) => raw.split(\"\\n\").filter(line => line !== \"\");\n/**\n * Parse a string as a number using `Number()` semantics.\n *\n * Note: `\"\"` → `0`, non-numeric strings → `NaN`.\n *\n * ```ts\n * const { data } = createSSE<number>(url, { transform: number });\n * // data() === 42\n * ```\n */\nexport const number = (raw) => Number(raw);\nexport function safe(transform, fallback) {\n return (raw) => {\n try {\n return transform(raw);\n }\n catch {\n return fallback;\n }\n };\n}\n/**\n * Compose two transforms into one: the output of `a` is passed as the input of `b`.\n *\n * ```ts\n * const { data } = createSSE<RawEvent[]>(url, {\n * transform: pipe(ndjson<RawEvent>, rows => rows.filter(r => r.type === \"tick\")),\n * });\n * ```\n */\nexport function pipe(a, b) {\n return (raw) => b(a(raw));\n}\n","\"use strict\";\nimport { createMemo } from \"solid-js\";\nimport makeDocumentProjection from \"./makeDocumentProjection.js\";\nimport { access } from \"@solid-primitives/utils\";\nexport default function createDocumentProjection(handle) {\n const projection = createMemo(\n () => access(handle) && makeDocumentProjection(access(handle))\n );\n return projection;\n}\n//# sourceMappingURL=createDocumentProjection.js.map\n","\"use strict\";\nimport { createContext } from \"solid-js\";\nexport const RepoContext = createContext(\n null\n);\n//# sourceMappingURL=context.js.map\n","\"use strict\";\nimport { createEffect, createResource, useContext } from \"solid-js\";\nimport { access } from \"@solid-primitives/utils\";\nimport { RepoContext } from \"./context.js\";\nexport default function useDocHandle(url, options) {\n const contextRepo = useContext(RepoContext);\n if (!options?.repo && !contextRepo) {\n throw new Error(\"use outside <RepoContext> requires options.repo\");\n }\n const repo = options?.repo || contextRepo;\n function getExistingHandle() {\n if (options?.[\"~skipInitialValue\"]) return void 0;\n const unwrappedURL = access(url);\n if (!unwrappedURL) return void 0;\n const state = repo.findWithProgress(unwrappedURL).peek();\n return state.state === \"ready\" ? state.handle : void 0;\n }\n const [handle, { mutate }] = createResource(\n url,\n (url2) => repo.findWithProgress(url2).whenReady(),\n {\n initialValue: getExistingHandle()\n }\n );\n createEffect(() => {\n if (!access(url)) {\n mutate();\n }\n });\n return handle;\n}\n//# sourceMappingURL=useDocHandle.js.map\n","\"use strict\";\nimport createDocumentProjection from \"./createDocumentProjection.js\";\nimport useDocHandle from \"./useDocHandle.js\";\nexport default function useDocument(url, options) {\n const handle = useDocHandle(url, options);\n return [createDocumentProjection(handle), handle];\n}\n//# sourceMappingURL=useDocument.js.map\n","import \"./styles.css\";\nimport type { DocHandle } from \"@automerge/automerge-repo/slim\";\nimport type { ToolElement } from \"@inkandswitch/patchwork-plugins\";\nimport { getRegistry } from \"@inkandswitch/patchwork-plugins\";\nimport { accept, type SubscribeEvent } from \"@inkandswitch/patchwork-providers\";\nimport {\n useDocument,\n RepoContext,\n} from \"solid-automerge\";\nimport {\n createSignal,\n createMemo,\n For,\n Show,\n onCleanup,\n} from \"solid-js\";\nimport { createStore, reconcile } from \"solid-js/store\";\nimport { render } from \"solid-js/web\";\nimport type {\n TinyPatchworkLayoutDoc,\n ThreepaneConfigDoc,\n ToolSlot,\n} from \"./types\";\n\ntype ModuleOption = {\n id: string;\n name: string;\n};\n\nconst FRAME_RELOAD_DELAY_MS = 250;\n\n// Minimal shape shared by tool and component descriptions — all we need to\n// build the add-popover options.\ntype Describable = {\n id: string;\n name?: string;\n tags?: string[];\n unlisted?: boolean;\n};\n\n// Subscribe to a plugin registry (e.g. \"patchwork:tool\" or\n// \"patchwork:component\") and keep a reactive list of its descriptions.\nfunction useDescriptions(type: string) {\n const registry = getRegistry(type);\n const [items, setItems] = createStore<Describable[]>(\n (registry.all?.() ?? []).map((p) => p as unknown as Describable)\n );\n const update = () => {\n const all = (registry.all?.() ?? []).map(\n (p) => p as unknown as Describable\n );\n setItems(reconcile(all));\n };\n update();\n const dispose = registry.on(\"changed\", update);\n onCleanup(dispose);\n return items;\n}\n\nfunction filterToolsByTag(tools: Describable[], tag: string): ModuleOption[] {\n return tools\n .filter((t) => !t.unlisted && (t.tags ?? []).includes(tag))\n .map((t) => ({ id: t.id, name: t.name || t.id }))\n .sort((a, b) => a.name.localeCompare(b.name));\n}\n\n/* ── Shared icons ── */\n\nconst PlusIcon = () => (\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n stroke=\"var(--studio-chrome-line)\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n >\n <line x1=\"7\" y1=\"3\" x2=\"7\" y2=\"11\" />\n <line x1=\"3\" y1=\"7\" x2=\"11\" y2=\"7\" />\n </svg>\n);\n\nconst CloseIcon = (props: { size?: number }) => {\n const s = () => props.size ?? 10;\n return (\n <svg\n width={s()}\n height={s()}\n viewBox=\"0 0 10 10\"\n fill=\"none\"\n stroke=\"var(--studio-chrome-line)\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n >\n <line x1=\"2\" y1=\"2\" x2=\"8\" y2=\"8\" />\n <line x1=\"8\" y1=\"2\" x2=\"2\" y2=\"8\" />\n </svg>\n );\n};\n\nconst CheckIcon = () => (\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n stroke=\"var(--studio-chrome-line)\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"2.5 6 5 8.5 9.5 3.5\" />\n </svg>\n);\n\n/* ── Add Popover (shared by toolbar + context tabs) ── */\n\nfunction AddPopover(props: {\n available: ModuleOption[];\n onAdd: (id: string) => void;\n onClose: () => void;\n customPlaceholder?: string;\n}) {\n const [customId, setCustomId] = createSignal(\"\");\n\n const addCustom = () => {\n const id = customId().trim();\n if (!id) return;\n props.onAdd(id);\n setCustomId(\"\");\n };\n\n return (\n <div class=\"add-popover\">\n <For each={props.available}>\n {(opt) => (\n <button class=\"add-popover-option\" onClick={() => props.onAdd(opt.id)}>\n <PlusIcon />\n {opt.name}\n </button>\n )}\n </For>\n <div class=\"add-popover-custom\">\n <input\n type=\"text\"\n class=\"add-popover-custom-input\"\n placeholder={props.customPlaceholder ?? \"tool-id\"}\n value={customId()}\n onInput={(e) => setCustomId(e.currentTarget.value)}\n onKeyDown={(e) => e.key === \"Enter\" && addCustom()}\n />\n <button\n class=\"add-popover-custom-btn\"\n onClick={addCustom}\n disabled={!customId().trim()}\n >\n <PlusIcon />\n </button>\n </div>\n <button class=\"add-popover-done\" onClick={() => props.onClose()}>\n Done\n </button>\n </div>\n );\n}\n\n/* ── Null selected-doc boundary ── */\n\n/**\n * Intercepts patchwork:subscribe events for selected-doc / selected-view\n * and responds with empty values, preventing descendant patchwork-views\n * from picking up the real selection (which would cause the frame\n * configurator to infinitely render itself).\n */\nfunction nullSelectedDocRef(el: HTMLElement) {\n el.addEventListener(\"patchwork:subscribe\", ((event: SubscribeEvent) => {\n if (event.detail.selector.type === \"patchwork:selected-doc\") {\n accept<string[]>(event, (respond) => {\n respond([]);\n });\n } else if (event.detail.selector.type === \"patchwork:selected-view\") {\n accept<null>(event, (respond) => {\n respond(null);\n });\n }\n }) as EventListener, true);\n}\n\n/* ── Preview Card Grid (frame / sidebar single-select) ── */\n\nfunction PreviewCardGrid(props: {\n label: string;\n value: string | undefined;\n onChange: (v: string) => void;\n options: ModuleOption[];\n docUrl: string;\n}) {\n return (\n <div class=\"config-section\">\n <div class=\"section-label\">{props.label}</div>\n <Show\n when={props.options.length > 0}\n fallback={<p class=\"empty-message\">No tools available</p>}\n >\n <div class=\"preview-grid\" ref={nullSelectedDocRef}>\n <For each={props.options}>\n {(opt) => (\n <button\n class=\"preview-card\"\n aria-checked={props.value === opt.id}\n onClick={() => props.onChange(opt.id)}\n >\n <div class=\"preview-card-thumbnail\">\n <div class=\"preview-card-scaler\">\n <patchwork-view\n doc-url={props.docUrl}\n tool-id={opt.id}\n />\n </div>\n </div>\n <div class=\"preview-card-label\">\n <span>{opt.name}</span>\n <span class=\"preview-card-check\">\n <CheckIcon />\n </span>\n </div>\n </button>\n )}\n </For>\n </div>\n </Show>\n </div>\n );\n}\n\n/* ── Drag helpers ── */\n\nfunction itemDragClass(\n i: number,\n dragFrom: number | null,\n dropTo: number | null\n): string {\n if (dragFrom === null || dropTo === null) return \"\";\n if (i === dragFrom) return \" dragging\";\n if (dropTo === dragFrom) return \"\";\n // Items between source and target shift to make room\n if (dragFrom < dropTo && i > dragFrom && i <= dropTo) return \" shift-left\";\n if (dragFrom > dropTo && i < dragFrom && i >= dropTo) return \" shift-right\";\n return \"\";\n}\n\nfunction ToolbarStrip(props: {\n label: string;\n values: string[] | undefined;\n setValues: (next: string[]) => void;\n allOptions: ModuleOption[];\n docUrl: string;\n}) {\n const [showAdd, setShowAdd] = createSignal(false);\n const [dragIndex, setDragIndex] = createSignal<number | null>(null);\n const [dropIndex, setDropIndex] = createSignal<number | null>(null);\n let lastDropIndex: number | null = null;\n\n // The configured ids, verbatim. We deliberately do NOT filter these down to\n // ids whose plugin is currently registered: the configurator's plugin host\n // loads tools asynchronously, so early after mount `allOptions` is a partial\n // set. Rebuilding the array from a registered-only subset on every mutation\n // would silently drop not-yet-loaded tools — that was the \"adding one tool\n // wipes the rest / only one tool sticks\" bug. Every edit rebuilds from the\n // full list, so an unknown/still-loading id survives (shown by its raw id\n // until its plugin registers).\n const values = createMemo(() => props.values ?? []);\n const currentIds = createMemo(() => new Set(values()));\n const available = createMemo(() =>\n props.allOptions.filter((o) => !currentIds().has(o.id))\n );\n const nameOf = (id: string) =>\n props.allOptions.find((o) => o.id === id)?.name ?? id;\n\n const removeAt = (index: number) => {\n props.setValues(values().filter((_, i) => i !== index));\n };\n\n const add = (id: string) => {\n props.setValues([...values(), id]);\n };\n\n const updateDropIndex = (i: number) => {\n lastDropIndex = i;\n setDropIndex(i);\n };\n\n const handleDragEnd = () => {\n const from = dragIndex();\n const to = lastDropIndex;\n setDragIndex(null);\n setDropIndex(null);\n lastDropIndex = null;\n if (from == null || to == null || from === to) return;\n const arr = [...values()];\n const [moved] = arr.splice(from, 1);\n arr.splice(to, 0, moved);\n props.setValues(arr);\n };\n\n return (\n <div class=\"config-section\">\n <div class=\"section-label\">{props.label}</div>\n <div\n class={`toolbar-strip${dragIndex() !== null ? \" is-dragging\" : \"\"}`}\n ref={nullSelectedDocRef}\n >\n <For each={values()}>\n {(id, index) => (\n <div\n class={`toolbar-box${itemDragClass(index(), dragIndex(), dropIndex())}`}\n draggable={true}\n onDragStart={(e) => {\n e.dataTransfer!.effectAllowed = \"move\";\n const idx = index();\n requestAnimationFrame(() => {\n setDragIndex(idx);\n updateDropIndex(idx);\n });\n }}\n onDragOver={(e) => {\n e.preventDefault();\n e.dataTransfer!.dropEffect = \"move\";\n updateDropIndex(index());\n }}\n onDragEnd={() => handleDragEnd()}\n >\n <div class=\"toolbar-box-preview\">\n <patchwork-view\n doc-url={props.docUrl}\n tool-id={id}\n style=\"pointer-events:none;width:100%;height:100%\"\n />\n </div>\n <div class=\"toolbar-box-label\">{nameOf(id)}</div>\n <button\n class=\"toolbar-box-remove\"\n onClick={(e) => {\n e.stopPropagation();\n removeAt(index());\n }}\n aria-label={`Remove ${nameOf(id)}`}\n >\n <CloseIcon size={8} />\n </button>\n </div>\n )}\n </For>\n <div class=\"add-popover-anchor\">\n <button\n class=\"toolbar-add-btn\"\n onClick={() => setShowAdd(!showAdd())}\n aria-label=\"Add doc titlebar tool\"\n >\n <PlusIcon />\n </button>\n <Show when={showAdd()}>\n <AddPopover\n available={available()}\n onAdd={add}\n onClose={() => setShowAdd(false)}\n />\n </Show>\n </div>\n </div>\n </div>\n );\n}\n\n/* ── Main UI ── */\n\nfunction FrameConfiguratorUI(props: {\n handle: DocHandle<TinyPatchworkLayoutDoc>;\n element: ToolElement;\n}) {\n const [accountDoc] = useDocument<TinyPatchworkLayoutDoc>(\n () => props.handle.url\n );\n\n // The doctitle config lives in the threepane config doc; we edit it here.\n // Entries are [toolId, docId] pairs — the docid is the account doc (a\n // placeholder; the frame feeds doctitle the selected doc). The context\n // sidebar and system tray are registry-driven now (every\n // `patchwork:component` tagged `\"context-tool\"` / `\"system-tray\"`), so\n // there's nothing left here to configure for them.\n const [threepaneDoc, threepaneHandle] = useDocument<ThreepaneConfigDoc>(\n () => accountDoc()?.tools?.[\"threepane\"]\n );\n\n const allTools = useDescriptions(\"patchwork:tool\");\n\n const frameOptions = createMemo(() =>\n filterToolsByTag([...allTools], \"frame-tool\")\n );\n const documentToolbarOptions = createMemo(() =>\n filterToolsByTag([...allTools], \"titlebar-tool\")\n );\n\n const docUrl = props.handle.url;\n\n // Lane entries may be bare component ids (strings) as well as [toolId, docId]\n // tuples; the strip UI works in ids either way.\n const slotId = (slot: ToolSlot) => (typeof slot === \"string\" ? slot : slot[0]);\n\n const doctitleIds = () => threepaneDoc()?.doctitle?.tools?.map(slotId);\n\n // doctitle (and contextbar) tools are stored as plain id strings, never\n // [toolId, docId] tuples: the frame always points them at the selected\n // main-view doc, so a tuple's docid would be ignored anyway.\n const setDoctitle = (next: string[]) =>\n threepaneHandle()?.change((doc) => {\n doc.doctitle.tools = next.slice();\n });\n\n const setField = <K extends keyof TinyPatchworkLayoutDoc>(\n key: K,\n value: TinyPatchworkLayoutDoc[K]\n ) => {\n props.handle.change((doc: any) => {\n doc[key] = value as any;\n });\n };\n\n return (\n <Show\n when={accountDoc()}\n fallback={<div class=\"configurator loading\">Loading configuration...</div>}\n >\n <div class=\"configurator\">\n <PreviewCardGrid\n label=\"Frame Tool\"\n value={accountDoc()!.frameToolId}\n onChange={(v) => {\n setField(\"frameToolId\", v as any);\n setTimeout(async () => {\n await props.element.repo.flush().catch(() => null);\n window.location.reload();\n }, FRAME_RELOAD_DELAY_MS);\n }}\n options={frameOptions()}\n docUrl={docUrl}\n />\n\n <Show\n when={threepaneDoc()}\n fallback={\n <p class=\"empty-message\">Preparing layout configuration…</p>\n }\n >\n <ToolbarStrip\n label=\"Doc Titlebar\"\n values={doctitleIds()}\n setValues={setDoctitle}\n allOptions={documentToolbarOptions()}\n docUrl={docUrl}\n />\n </Show>\n <Show when={(accountDoc() as any)?.toolStorage?.[\"theme-preferences\"]}>\n {(themePreferencesUrl) => (\n <div class=\"config-section\">\n <div class=\"section-label\">Theme</div>\n <div class=\"theme-embed\">\n <patchwork-view\n doc-url={themePreferencesUrl()}\n tool-id=\"theme-picker\"\n />\n </div>\n </div>\n )}\n </Show>\n </div>\n </Show>\n );\n}\n\nexport function renderFrameConfigurator(\n handle: DocHandle<TinyPatchworkLayoutDoc>,\n element: ToolElement\n) {\n const dispose = render(\n () => (\n <RepoContext.Provider value={element.repo}>\n <FrameConfiguratorUI handle={handle} element={element} />\n </RepoContext.Provider>\n ),\n element\n );\n return () => dispose();\n}\n\nexport { FrameConfiguratorUI as FrameConfigurator };\n"],"names":["s","m","h","d","w","y","ms","val","options","type","parse","fmtLong","fmtShort","str","match","n","msAbs","plural","name","isPlural","setup","env","createDebug","coerce","disable","enable","enabled","require$$0","destroy","key","selectColor","namespace","hash","i","prevTime","enableOverride","namespacesCache","enabledCache","debug","args","self","curr","index","format","formatter","extend","v","delimiter","newDebug","namespaces","split","ns","matchesTemplate","search","template","searchIndex","templateIndex","starIndex","matchIndex","skip","common","exports","formatArgs","save","load","useColors","localstorage","warned","module","c","lastC","r","define_process_env_default","formatters","error","log","pojo","target","BLOCK_MARKER","apply","rest","path","range","p","RANGE_ARRAY","start","end","ZERO_LENGTH","DELETE","INSERT","APPEND","REPLACE","seq","a","b","nextkey","get","obj","fromAutomerge","autopatch","payload","autoproduce","doc","patch","cache","makeDocumentProjection","handle","onCleanup","item","set","createStore","ondelete","reconcile","produce","access","createDocumentProjection","createMemo","RepoContext","createContext","useDocHandle","url","contextRepo","useContext","repo","getExistingHandle","unwrappedURL","state","mutate","createResource","url2","createEffect","useDocument","FRAME_RELOAD_DELAY_MS","useDescriptions","registry","getRegistry","items","setItems","all","map","update","dispose","on","filterToolsByTag","tools","tag","filter","t","unlisted","tags","includes","id","sort","localeCompare","PlusIcon","_tmpl$","CloseIcon","props","size","_el$2","_tmpl$2","_$effect","_p$","_v$","_v$2","e","_$setAttribute","undefined","CheckIcon","_tmpl$3","AddPopover","customId","setCustomId","createSignal","addCustom","trim","onAdd","_el$4","_tmpl$4","_el$5","firstChild","_el$6","_el$7","nextSibling","_el$8","_$insert","_$createComponent","For","each","available","children","_el$9","_tmpl$5","$$click","opt","$$keydown","$$input","currentTarget","value","onClose","_v$3","customPlaceholder","_v$4","disabled","nullSelectedDocRef","el","addEventListener","event","detail","selector","accept","respond","PreviewCardGrid","_el$0","_tmpl$7","_el$1","label","Show","when","length","fallback","_tmpl$8","_el$10","_tmpl$6","_ref$","_$use","_el$12","_tmpl$9","_el$13","_el$14","_el$15","_el$16","_el$17","_el$18","onChange","_$owner","_$getOwner","_v$5","_v$6","docUrl","_v$7","toolId","itemDragClass","dragFrom","dropTo","ToolbarStrip","showAdd","setShowAdd","dragIndex","setDragIndex","dropIndex","setDropIndex","lastDropIndex","values","currentIds","Set","allOptions","o","has","nameOf","find","removeAt","setValues","_","add","updateDropIndex","handleDragEnd","from","to","arr","moved","splice","_el$19","_tmpl$0","_el$20","_el$21","_el$22","_el$23","_ref$2","_el$24","_tmpl$1","_el$25","_el$26","_el$27","_el$28","preventDefault","dataTransfer","dropEffect","effectAllowed","idx","requestAnimationFrame","stopPropagation","_v$8","_v$9","_v$0","_$className","FrameConfiguratorUI","accountDoc","threepaneDoc","threepaneHandle","allTools","frameOptions","documentToolbarOptions","slotId","slot","doctitleIds","doctitle","setDoctitle","next","change","slice","setField","_tmpl$11","_el$29","_tmpl$10","frameToolId","setTimeout","element","flush","catch","window","location","reload","_tmpl$12","toolStorage","_el$32","_tmpl$13","_el$33","_el$34","_el$35","themePreferencesUrl","renderFrameConfigurator","render","Provider","_$delegateEvents"],"mappings":"yrBAIA,IAAIA,EAAI,IACJC,EAAID,EAAI,GACRE,EAAID,EAAI,GACRE,EAAID,EAAI,GACRE,EAAID,EAAI,EACRE,EAAIF,EAAI,OAgBZG,EAAiB,SAAUC,EAAKC,EAAS,CACvCA,EAAUA,GAAW,CAAA,EACrB,IAAIC,EAAO,OAAOF,EAClB,GAAIE,IAAS,UAAYF,EAAI,OAAS,EACpC,OAAOG,EAAMH,CAAG,EACX,GAAIE,IAAS,UAAY,SAASF,C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gF,EAAAA,CAAc,EAAA,IACpB9E,UAAQ,CAAA,OAAAuG,GAAAA,CAAA,EAAA,IAAArI,UAAA,CAAA,OAAAJ,EAIP2D,GAAY,CACX7B,MAAK,eAAA,IACLqC,QAAM,CAAA,OAAEoD,EAAAA,CAAa,EACrB3C,UAAW6C,EAAW,IACtBnD,YAAU,CAAA,OAAE8C,EAAAA,CAAwB,EACpC/D,OAAAA,CAAAA,CAAc,CAAA,CAAA,CAAA,EAAA,IAAA,EAAAtD,EAAAgI,EAAA/H,EAGjB+B,EAAI,CAAA,IAACC,MAAI,CAAA,OAAG+E,EAAAA,GAAsB2B,cAAc,mBAAmB,CAAC,EAAAtI,aAC9C,IAAA,CAAA,IAAAuI,EAAAC,KAAAC,EAAAF,EAAAjJ,WAAAoJ,EAAAD,EAAAhJ,YAAAkJ,EAAAD,EAAApJ,WAAAqJ,OAAAA,EAAA9F,QAAAC,EAAAA,EAAA3E,MAAAwK,EAAA1F,OAKJ2F,EAAAA,CAAqB,EAAAL,CAAA,GAAA,CAAA,CAKrC,EAAA,IAAA,EAAAZ,CAAA,CAAA,CAAA,CAKX,CAEO,SAASkB,GACdjO,EACAmN,EACA,CACA,MAAMhL,EAAU+L,GACd,IAAAlJ,EACGrE,GAAYwN,SAAQ,CAAA,IAACvI,OAAK,CAAA,OAAEuH,EAAQlM,IAAI,EAAA,IAAAmE,UAAA,CAAA,OAAAJ,EACtC8G,GAAmB,CAAC9L,OAAAA,EAAgBmN,QAAAA,CAAAA,CAAgB,CAAA,CAAA,CAAA,EAGzDA,CACF,EACA,MAAO,IAAMhL,EAAAA,CACf,CAEoDiM,GAAA,CAAA,QAAA,UAAA,OAAA,CAAA","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10]}
1
+ {"version":3,"file":"FrameConfigurator-eip19KvL.js","sources":["../../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js","../../../node_modules/.pnpm/debug@4.4.3_supports-color@7.2.0/node_modules/debug/src/common.js","../../../node_modules/.pnpm/debug@4.4.3_supports-color@7.2.0/node_modules/debug/src/browser.js","../../../node_modules/.pnpm/cabbages@0.2.8_supports-color@7.2.0/node_modules/cabbages/output/cabbages.js","../../../node_modules/.pnpm/solid-automerge@2.0.0_@automerge+automerge-repo@2.6.0-subduction.39_supports-color@7.2._8e15862855dc1049500b068e056c0726/node_modules/solid-automerge/out/autoproduce.js","../../../node_modules/.pnpm/solid-automerge@2.0.0_@automerge+automerge-repo@2.6.0-subduction.39_supports-color@7.2._8e15862855dc1049500b068e056c0726/node_modules/solid-automerge/out/makeDocumentProjection.js","../../../node_modules/.pnpm/@solid-primitives+utils@6.4.1_solid-js@1.9.14/node_modules/@solid-primitives/utils/dist/index.js","../../../node_modules/.pnpm/solid-automerge@2.0.0_@automerge+automerge-repo@2.6.0-subduction.39_supports-color@7.2._8e15862855dc1049500b068e056c0726/node_modules/solid-automerge/out/createDocumentProjection.js","../../../node_modules/.pnpm/solid-automerge@2.0.0_@automerge+automerge-repo@2.6.0-subduction.39_supports-color@7.2._8e15862855dc1049500b068e056c0726/node_modules/solid-automerge/out/context.js","../../../node_modules/.pnpm/solid-automerge@2.0.0_@automerge+automerge-repo@2.6.0-subduction.39_supports-color@7.2._8e15862855dc1049500b068e056c0726/node_modules/solid-automerge/out/useDocHandle.js","../../../node_modules/.pnpm/solid-automerge@2.0.0_@automerge+automerge-repo@2.6.0-subduction.39_supports-color@7.2._8e15862855dc1049500b068e056c0726/node_modules/solid-automerge/out/useDocument.js","../../src/FrameConfigurator.tsx"],"sourcesContent":["/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '')\n\t\t\t.trim()\n\t\t\t.replace(/\\s+/g, ',')\n\t\t\t.split(',')\n\t\t\t.filter(Boolean);\n\n\t\tfor (const ns of split) {\n\t\t\tif (ns[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(ns.slice(1));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(ns);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given string matches a namespace template, honoring\n\t * asterisks as wildcards.\n\t *\n\t * @param {String} search\n\t * @param {String} template\n\t * @return {Boolean}\n\t */\n\tfunction matchesTemplate(search, template) {\n\t\tlet searchIndex = 0;\n\t\tlet templateIndex = 0;\n\t\tlet starIndex = -1;\n\t\tlet matchIndex = 0;\n\n\t\twhile (searchIndex < search.length) {\n\t\t\tif (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {\n\t\t\t\t// Match character or proceed with wildcard\n\t\t\t\tif (template[templateIndex] === '*') {\n\t\t\t\t\tstarIndex = templateIndex;\n\t\t\t\t\tmatchIndex = searchIndex;\n\t\t\t\t\ttemplateIndex++; // Skip the '*'\n\t\t\t\t} else {\n\t\t\t\t\tsearchIndex++;\n\t\t\t\t\ttemplateIndex++;\n\t\t\t\t}\n\t\t\t} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition\n\t\t\t\t// Backtrack to the last '*' and try to match more characters\n\t\t\t\ttemplateIndex = starIndex + 1;\n\t\t\t\tmatchIndex++;\n\t\t\t\tsearchIndex = matchIndex;\n\t\t\t} else {\n\t\t\t\treturn false; // No match\n\t\t\t}\n\t\t}\n\n\t\t// Handle trailing '*' in template\n\t\twhile (templateIndex < template.length && template[templateIndex] === '*') {\n\t\t\ttemplateIndex++;\n\t\t}\n\n\t\treturn templateIndex === template.length;\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names,\n\t\t\t...createDebug.skips.map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tfor (const skip of createDebug.skips) {\n\t\t\tif (matchesTemplate(name, skip)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (const ns of createDebug.names) {\n\t\t\tif (matchesTemplate(name, ns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t// eslint-disable-next-line no-return-assign\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","// cabbages.ts\nimport debug from \"debug\";\nvar log = debug(\"cabbages\");\nfunction pojo(target) {\n return typeof target == \"object\" && typeof target != null && Object.getPrototypeOf(target) == Object.prototype;\n}\nvar BLOCK_MARKER = \"\\uFFFC\";\nfunction apply(target, ...rest) {\n if (rest.length == 0) {\n log(\"empty patch\");\n return;\n }\n const [path, range, val] = rest;\n let p = [...path];\n while (true) {\n let key = p.shift();\n if (!p.length) {\n const RANGE_ARRAY = Array.isArray(range);\n if (pojo(target) && RANGE_ARRAY && typeof key == \"undefined\" && typeof range[0] == \"string\") {\n delete target[range[0]];\n return;\n }\n if (RANGE_ARRAY || typeof range == \"number\") {\n if (typeof key == \"undefined\") {\n throw new Error(\"cant treat top level as a seq\");\n }\n key = key;\n let [start, end] = Array.isArray(range) ? range : [range, range + 1];\n const ZERO_LENGTH = Array.isArray(range) && range.length == 0;\n if (!ZERO_LENGTH && (start == null || end == null)) {\n throw new RangeError(\"it's all or nothing, no half measures\");\n }\n const DELETE = typeof val == \"undefined\";\n const INSERT = start === end && !DELETE;\n const APPEND = ZERO_LENGTH && !DELETE;\n const REPLACE = !INSERT && !DELETE && !APPEND;\n if (typeof target[key] == \"undefined\") {\n if (typeof target == \"string\") {\n return;\n } else if (typeof val == \"string\") {\n target[key] = \"\";\n } else {\n target[key] = [];\n }\n }\n let seq = target[key];\n if (Array.isArray(seq)) {\n if (APPEND) {\n Array.isArray(val) ? seq.push(...val) : seq.push(val);\n return;\n }\n if (INSERT || REPLACE) {\n Array.isArray(val) ? seq.splice(start, end - start, ...val) : seq.splice(start, end - start, val);\n return;\n }\n if (DELETE) {\n seq.splice(start, end - start);\n return;\n }\n throw new Error(\"i don't know what happened\");\n }\n if (typeof seq == \"string\") {\n if (APPEND) {\n target[key] = seq + val;\n return;\n }\n if (REPLACE || INSERT) {\n target[key] = seq.slice(0, start) + (typeof val == \"string\" ? val : val.map(\n (n) => typeof n == \"string\" ? n : BLOCK_MARKER\n ).join(\"\")) + seq.slice(end);\n return;\n }\n if (DELETE) {\n target[key] = seq.slice(0, start) + seq.slice(end);\n return;\n }\n throw new Error(\"i don't know what happened\");\n }\n if (pojo(seq) && RANGE_ARRAY && typeof range[0] == \"string\") {\n delete seq[range[0]];\n return;\n }\n throw new Error(\"not implemented\");\n }\n if (typeof key == \"undefined\") {\n if (typeof range != \"string\") {\n throw new Error(`can't index top-level map with ${range}`);\n }\n if (typeof val == \"undefined\") {\n delete target[range];\n } else {\n target[range] = val;\n }\n return;\n }\n if (typeof target[key] == \"undefined\") {\n target[key] = {};\n }\n if (RANGE_ARRAY) {\n let [a, b] = range;\n if (a != null && b != null) {\n if (typeof val == \"undefined\" && a != null && b != null) {\n delete target[key][a || b];\n } else {\n target[key][a || b] = val;\n }\n }\n } else {\n if (typeof val == \"undefined\") {\n delete target[key][range];\n } else if (typeof target[key] == \"string\") {\n return;\n } else {\n target[key][range] = val;\n }\n }\n return;\n }\n if (typeof key == \"undefined\") {\n throw new Error(\"cant treat top level as a seq\");\n }\n key = key;\n let nextkey = p[0];\n if (typeof target[key] == \"undefined\") {\n if (typeof nextkey == \"string\") {\n target[key] = {};\n } else if (typeof nextkey == \"number\") {\n target[key] = [];\n } else {\n throw new Error(`can't go down this road ${target}.${key}.${nextkey}`);\n }\n }\n target = target[key];\n }\n}\nvar patch = apply;\nfunction get(obj, key) {\n for (let p = 0; p < key.length; p++) {\n obj = obj ? obj[key[p]] : void 0;\n }\n return obj;\n}\nfunction fromAutomerge(autopatch, payload) {\n const path = autopatch.path.slice(0, -1);\n const key = autopatch.path[autopatch.path.length - 1];\n switch (autopatch.action) {\n case \"mark\":\n case \"unmark\":\n log(\n `skipping ${autopatch.action} because it doesn't affect material reality`\n );\n return [];\n case \"inc\":\n if (payload) {\n return [path, key, get(payload.patchInfo.after, autopatch.path)];\n } else {\n throw new Error(\n `can't apply ${autopatch.action} without payload argument`\n );\n }\n case \"conflict\":\n if (payload) {\n return [path, key, get(payload.patchInfo.after, autopatch.path)];\n } else {\n throw new Error(\n `can't apply ${autopatch.action} without payload argument`\n );\n }\n case \"del\": {\n return typeof key == \"string\" ? [path, key] : [path, [key, key + (autopatch.length || 1)]];\n }\n case \"insert\": {\n return [path, [key, key], autopatch.values];\n }\n case \"splice\": {\n return [path, [key, key], [autopatch.value]];\n }\n case \"put\": {\n return [path, key, autopatch.value];\n }\n }\n}\nexport {\n apply,\n fromAutomerge,\n patch,\n pojo\n};\n","\"use strict\";\nimport { apply, fromAutomerge } from \"cabbages\";\nexport default function autoproduce(payload) {\n return (doc) => {\n for (let patch of payload.patches) {\n apply(doc, ...fromAutomerge(patch, payload));\n }\n };\n}\n//# sourceMappingURL=autoproduce.js.map\n","\"use strict\";\nimport { onCleanup } from \"solid-js\";\nimport autoproduce from \"./autoproduce.js\";\nimport { createStore, produce, reconcile } from \"solid-js/store\";\nconst cache = /* @__PURE__ */ new WeakMap();\nexport default function makeDocumentProjection(handle) {\n onCleanup(() => {\n const item = cache.get(handle);\n if (!item) return;\n if (!item.refs--) {\n item.cleanup();\n }\n });\n if (cache.has(handle)) {\n const item = cache.get(handle);\n item.refs++;\n return item.store;\n }\n const [doc, set] = createStore(handle.doc());\n cache.set(handle, {\n refs: 0,\n store: doc,\n cleanup() {\n handle.off(\"change\", patch);\n handle.off(\"delete\", ondelete);\n cache.delete(handle);\n }\n });\n function patch(payload) {\n if (payload.scopeReplaced) {\n set(reconcile(payload.doc ?? {}));\n return;\n }\n set(produce(autoproduce(payload)));\n }\n function ondelete() {\n set(reconcile({}));\n }\n handle.on(\"change\", patch);\n handle.on(\"delete\", ondelete);\n handle.whenReady().then(() => {\n set(handle.doc());\n });\n return doc;\n}\n//# sourceMappingURL=makeDocumentProjection.js.map\n","import { getOwner, onCleanup, createSignal, untrack, sharedConfig, onMount, DEV, equalFn, } from \"solid-js\";\nimport { isServer } from \"solid-js/web\";\nexport * from \"./types.js\";\n//\n// GENERAL HELPERS:\n//\nexport { isServer };\nexport const isClient = !isServer;\nexport const isDev = isClient && !!DEV;\nexport const isProd = !isDev;\n/** no operation */\nexport const noop = (() => void 0);\nexport const trueFn = () => true;\nexport const falseFn = () => false;\n/** @deprecated use {@link equalFn} from \"solid-js\" */\nexport const defaultEquals = equalFn;\nexport const EQUALS_FALSE_OPTIONS = { equals: false };\nexport const INTERNAL_OPTIONS = { internal: true };\n/**\n * Check if the value is an instance of ___\n */\nexport const ofClass = (v, c) => v instanceof c || (v && v.constructor === c);\n/** Check if value is typeof \"object\" or \"function\" */\nexport function isObject(value) {\n return value !== null && (typeof value === \"object\" || typeof value === \"function\");\n}\nexport const isNonNullable = (i) => i != null;\nexport const filterNonNullable = (arr) => arr.filter(isNonNullable);\nexport const compare = (a, b) => (a < b ? -1 : a > b ? 1 : 0);\n/**\n * Check shallow array equality\n */\nexport const arrayEquals = (a, b) => a === b || (a.length === b.length && a.every((e, i) => e === b[i]));\n/**\n * Returns a function that will call all functions in the order they were chained with the same arguments.\n */\nexport function chain(callbacks) {\n return (...args) => {\n for (const callback of callbacks)\n callback && callback(...args);\n };\n}\n/**\n * Returns a function that will call all functions in the reversed order with the same arguments.\n */\nexport function reverseChain(callbacks) {\n return (...args) => {\n for (let i = callbacks.length - 1; i >= 0; i--) {\n const callback = callbacks[i];\n callback && callback(...args);\n }\n };\n}\nexport const clamp = (n, min, max) => Math.min(Math.max(n, min), max);\n/**\n * Accesses the value of a MaybeAccessor\n * @example\n * ```ts\n * access(\"foo\") // => \"foo\"\n * access(() => \"foo\") // => \"foo\"\n * ```\n */\nexport const access = (v) => typeof v === \"function\" && !v.length ? v() : v;\nexport const asArray = (value) => Array.isArray(value) ? value : value ? [value] : [];\n/**\n * Access an array of MaybeAccessors\n * @example\n * const list = [1, 2, () => 3)] // T: MaybeAccessor<number>[]\n * const newList = accessArray(list) // T: number[]\n */\nexport const accessArray = (list) => list.map(v => access(v));\n/**\n * Run the function if the accessed value is not `undefined` nor `null`\n * @param value\n * @param fn\n */\nexport const withAccess = (value, fn) => {\n const _value = access(value);\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n typeof _value != null && fn(_value);\n};\nexport const asAccessor = (v) => (typeof v === \"function\" ? v : () => v);\n/** If value is a function – call it with a given arguments – otherwise get the value as is */\nexport function accessWith(valueOrFn, ...args) {\n return typeof valueOrFn === \"function\" ? valueOrFn(...args) : valueOrFn;\n}\nexport function defer(deps, fn, initialValue) {\n const isArray = Array.isArray(deps);\n let prevInput;\n let shouldDefer = true;\n return prevValue => {\n let input;\n if (isArray) {\n input = Array(deps.length);\n for (let i = 0; i < deps.length; i++)\n input[i] = deps[i]();\n }\n else\n input = deps();\n if (shouldDefer) {\n shouldDefer = false;\n prevInput = input;\n return initialValue;\n }\n const result = untrack(() => fn(input, prevInput, prevValue));\n prevInput = input;\n return result;\n };\n}\n/**\n * Get entries of an object\n */\nexport const entries = Object.entries;\n/**\n * Get keys of an object\n */\nexport const keys = Object.keys;\n/**\n * Solid's `onCleanup` that doesn't warn in development if used outside of a component.\n */\nexport const tryOnCleanup = isDev\n ? fn => (getOwner() ? onCleanup(fn) : fn)\n : onCleanup;\nexport const createCallbackStack = () => {\n let stack = [];\n const clear = () => (stack = []);\n return {\n push: (...callbacks) => stack.push(...callbacks),\n execute(arg0, arg1, arg2, arg3) {\n stack.forEach(cb => cb(arg0, arg1, arg2, arg3));\n clear();\n },\n clear,\n };\n};\n/**\n * Group synchronous function calls.\n * @param fn\n * @returns `fn`\n */\nexport function createMicrotask(fn) {\n let calls = 0;\n let args;\n onCleanup(() => (calls = 0));\n return (...a) => {\n (args = a), calls++;\n queueMicrotask(() => --calls === 0 && fn(...args));\n };\n}\n/**\n * A hydratable version of the {@link createSignal}. It will use the serverValue on the server and the update function on the client. If initialized during hydration it will use serverValue as the initial value and update it once hydration is complete.\n *\n * @param serverValue initial value of the state on the server\n * @param update called once on the client or on hydration to initialize the value\n * @param options {@link SignalOptions}\n * @returns\n * ```ts\n * [state: Accessor<T>, setState: Setter<T>]\n * ```\n * @see {@link createSignal}\n */\nexport function createHydratableSignal(serverValue, update, options) {\n if (isServer) {\n return createSignal(serverValue, options);\n }\n if (sharedConfig.context) {\n const [state, setState] = createSignal(serverValue, options);\n onMount(() => setState(() => update()));\n return [state, setState];\n }\n return createSignal(update(), options);\n}\n/** @deprecated use {@link createHydratableSignal} instead */\nexport const createHydrateSignal = createHydratableSignal;\n/**\n * Handle items removed and added to the array by diffing it by refference.\n *\n * @param current new array instance\n * @param prev previous array copy\n * @param handleAdded called once for every added item to array\n * @param handleRemoved called once for every removed from array\n */\nexport function handleDiffArray(current, prev, handleAdded, handleRemoved) {\n const currLength = current.length;\n const prevLength = prev.length;\n let i = 0;\n if (!prevLength) {\n for (; i < currLength; i++)\n handleAdded(current[i]);\n return;\n }\n if (!currLength) {\n for (; i < prevLength; i++)\n handleRemoved(prev[i]);\n return;\n }\n for (; i < prevLength; i++) {\n if (prev[i] !== current[i])\n break;\n }\n let prevEl;\n let currEl;\n prev = prev.slice(i);\n current = current.slice(i);\n for (prevEl of prev) {\n if (!current.includes(prevEl))\n handleRemoved(prevEl);\n }\n for (currEl of current) {\n if (!prev.includes(currEl))\n handleAdded(currEl);\n }\n}\n// ─── String transforms ────────────────────────────────────────────────────────\n/**\n * Parse a string as a single JSON value.\n *\n * ```ts\n * const { data } = createSSE<{ status: string }>(url, { transform: json });\n * ```\n */\nexport const json = (raw) => JSON.parse(raw);\n/**\n * Parse a string as newline-delimited JSON (NDJSON / JSON Lines).\n *\n * Each non-empty line is parsed as a separate JSON value and returned as an array.\n *\n * ```ts\n * const { data } = createSSE<TickEvent[]>(url, { transform: ndjson });\n * // data() === [{ id: 1, type: \"tick\" }, { id: 2, type: \"tick\" }]\n * ```\n */\nexport const ndjson = (raw) => raw\n .split(\"\\n\")\n .filter(line => line !== \"\")\n .map(line => JSON.parse(line));\n/**\n * Split a string into individual lines, returning a `string[]`. Empty lines are filtered out.\n *\n * ```ts\n * const { data } = createSSE<string[]>(url, { transform: lines });\n * // data() === [\"line one\", \"line two\"]\n * ```\n */\nexport const lines = (raw) => raw.split(\"\\n\").filter(line => line !== \"\");\n/**\n * Parse a string as a number using `Number()` semantics.\n *\n * Note: `\"\"` → `0`, non-numeric strings → `NaN`.\n *\n * ```ts\n * const { data } = createSSE<number>(url, { transform: number });\n * // data() === 42\n * ```\n */\nexport const number = (raw) => Number(raw);\nexport function safe(transform, fallback) {\n return (raw) => {\n try {\n return transform(raw);\n }\n catch {\n return fallback;\n }\n };\n}\n/**\n * Compose two transforms into one: the output of `a` is passed as the input of `b`.\n *\n * ```ts\n * const { data } = createSSE<RawEvent[]>(url, {\n * transform: pipe(ndjson<RawEvent>, rows => rows.filter(r => r.type === \"tick\")),\n * });\n * ```\n */\nexport function pipe(a, b) {\n return (raw) => b(a(raw));\n}\n","\"use strict\";\nimport { createMemo } from \"solid-js\";\nimport makeDocumentProjection from \"./makeDocumentProjection.js\";\nimport { access } from \"@solid-primitives/utils\";\nexport default function createDocumentProjection(handle) {\n const projection = createMemo(\n () => access(handle) && makeDocumentProjection(access(handle))\n );\n return projection;\n}\n//# sourceMappingURL=createDocumentProjection.js.map\n","\"use strict\";\nimport { createContext } from \"solid-js\";\nexport const RepoContext = createContext(\n null\n);\n//# sourceMappingURL=context.js.map\n","\"use strict\";\nimport { createEffect, createResource, useContext } from \"solid-js\";\nimport { access } from \"@solid-primitives/utils\";\nimport { RepoContext } from \"./context.js\";\nexport default function useDocHandle(url, options) {\n const contextRepo = useContext(RepoContext);\n if (!options?.repo && !contextRepo) {\n throw new Error(\"use outside <RepoContext> requires options.repo\");\n }\n const repo = options?.repo || contextRepo;\n function getExistingHandle() {\n if (options?.[\"~skipInitialValue\"]) return void 0;\n const unwrappedURL = access(url);\n if (!unwrappedURL) return void 0;\n const state = repo.findWithProgress(unwrappedURL).peek();\n return state.state === \"ready\" ? state.handle : void 0;\n }\n const [handle, { mutate }] = createResource(\n url,\n (url2) => repo.findWithProgress(url2).whenReady(),\n {\n initialValue: getExistingHandle()\n }\n );\n createEffect(() => {\n if (!access(url)) {\n mutate();\n }\n });\n return handle;\n}\n//# sourceMappingURL=useDocHandle.js.map\n","\"use strict\";\nimport createDocumentProjection from \"./createDocumentProjection.js\";\nimport useDocHandle from \"./useDocHandle.js\";\nexport default function useDocument(url, options) {\n const handle = useDocHandle(url, options);\n return [createDocumentProjection(handle), handle];\n}\n//# sourceMappingURL=useDocument.js.map\n","import \"./styles.css\";\nimport type { DocHandle } from \"@automerge/automerge-repo/slim\";\nimport type { ToolElement } from \"@inkandswitch/patchwork-plugins\";\nimport { getRegistry } from \"@inkandswitch/patchwork-plugins\";\nimport { accept, type SubscribeEvent } from \"@inkandswitch/patchwork-providers\";\nimport {\n useDocument,\n RepoContext,\n} from \"solid-automerge\";\nimport {\n createSignal,\n createMemo,\n For,\n Show,\n onCleanup,\n} from \"solid-js\";\nimport { createStore, reconcile } from \"solid-js/store\";\nimport { render } from \"solid-js/web\";\nimport type {\n TinyPatchworkLayoutDoc,\n ThreepaneConfigDoc,\n ToolSlot,\n} from \"./types\";\n\ntype ModuleOption = {\n id: string;\n name: string;\n};\n\nconst FRAME_RELOAD_DELAY_MS = 250;\n\n// Minimal shape shared by tool and component descriptions — all we need to\n// build the add-popover options.\ntype Describable = {\n id: string;\n name?: string;\n tags?: string[];\n unlisted?: boolean;\n};\n\n// Subscribe to a plugin registry (e.g. \"patchwork:tool\" or\n// \"patchwork:component\") and keep a reactive list of its descriptions.\nfunction useDescriptions(type: string) {\n const registry = getRegistry(type);\n const [items, setItems] = createStore<Describable[]>(\n (registry.all?.() ?? []).map((p) => p as unknown as Describable)\n );\n const update = () => {\n const all = (registry.all?.() ?? []).map(\n (p) => p as unknown as Describable\n );\n setItems(reconcile(all));\n };\n update();\n const dispose = registry.on(\"changed\", update);\n onCleanup(dispose);\n return items;\n}\n\nfunction filterToolsByTag(tools: Describable[], tag: string): ModuleOption[] {\n return tools\n .filter((t) => !t.unlisted && (t.tags ?? []).includes(tag))\n .map((t) => ({ id: t.id, name: t.name || t.id }))\n .sort((a, b) => a.name.localeCompare(b.name));\n}\n\n/* ── Shared icons ── */\n\nconst PlusIcon = () => (\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n stroke=\"var(--studio-chrome-line)\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n >\n <line x1=\"7\" y1=\"3\" x2=\"7\" y2=\"11\" />\n <line x1=\"3\" y1=\"7\" x2=\"11\" y2=\"7\" />\n </svg>\n);\n\nconst CloseIcon = (props: { size?: number }) => {\n const s = () => props.size ?? 10;\n return (\n <svg\n width={s()}\n height={s()}\n viewBox=\"0 0 10 10\"\n fill=\"none\"\n stroke=\"var(--studio-chrome-line)\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n >\n <line x1=\"2\" y1=\"2\" x2=\"8\" y2=\"8\" />\n <line x1=\"8\" y1=\"2\" x2=\"2\" y2=\"8\" />\n </svg>\n );\n};\n\nconst CheckIcon = () => (\n <svg\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n stroke=\"var(--studio-chrome-line)\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"2.5 6 5 8.5 9.5 3.5\" />\n </svg>\n);\n\n/* ── Add Popover (shared by toolbar + context tabs) ── */\n\nfunction AddPopover(props: {\n available: ModuleOption[];\n onAdd: (id: string) => void;\n onClose: () => void;\n customPlaceholder?: string;\n}) {\n const [customId, setCustomId] = createSignal(\"\");\n\n const addCustom = () => {\n const id = customId().trim();\n if (!id) return;\n props.onAdd(id);\n setCustomId(\"\");\n };\n\n return (\n <div class=\"add-popover\">\n <For each={props.available}>\n {(opt) => (\n <button class=\"add-popover-option\" onClick={() => props.onAdd(opt.id)}>\n <PlusIcon />\n {opt.name}\n </button>\n )}\n </For>\n <div class=\"add-popover-custom\">\n <input\n type=\"text\"\n class=\"add-popover-custom-input\"\n placeholder={props.customPlaceholder ?? \"tool-id\"}\n value={customId()}\n onInput={(e) => setCustomId(e.currentTarget.value)}\n onKeyDown={(e) => e.key === \"Enter\" && addCustom()}\n />\n <button\n class=\"add-popover-custom-btn\"\n onClick={addCustom}\n disabled={!customId().trim()}\n >\n <PlusIcon />\n </button>\n </div>\n <button class=\"add-popover-done\" onClick={() => props.onClose()}>\n Done\n </button>\n </div>\n );\n}\n\n/* ── Null selected-doc boundary ── */\n\n/**\n * Intercepts patchwork:subscribe events for selected-doc / selected-view\n * and responds with empty values, preventing descendant patchwork-views\n * from picking up the real selection (which would cause the frame\n * configurator to infinitely render itself).\n */\nfunction nullSelectedDocRef(el: HTMLElement) {\n el.addEventListener(\"patchwork:subscribe\", ((event: SubscribeEvent) => {\n if (event.detail.selector.type === \"patchwork:selected-doc\") {\n accept<string[]>(event, (respond) => {\n respond([]);\n });\n } else if (event.detail.selector.type === \"patchwork:selected-view\") {\n accept<null>(event, (respond) => {\n respond(null);\n });\n }\n }) as EventListener, true);\n}\n\n/* ── Preview Card Grid (frame / sidebar single-select) ── */\n\nfunction PreviewCardGrid(props: {\n label: string;\n value: string | undefined;\n onChange: (v: string) => void;\n options: ModuleOption[];\n}) {\n return (\n <div class=\"config-section\">\n <div class=\"section-label\">{props.label}</div>\n <Show\n when={props.options.length > 0}\n fallback={<p class=\"empty-message\">No tools available</p>}\n >\n <div class=\"preview-grid\" ref={nullSelectedDocRef}>\n <For each={props.options}>\n {(opt) => (\n <button\n class=\"preview-card\"\n aria-checked={props.value === opt.id}\n onClick={() => props.onChange(opt.id)}\n >\n <div class=\"preview-card-label\">\n <span>{opt.name}</span>\n <span class=\"preview-card-check\">\n <CheckIcon />\n </span>\n </div>\n </button>\n )}\n </For>\n </div>\n </Show>\n </div>\n );\n}\n\n/* ── Drag helpers ── */\n\nfunction itemDragClass(\n i: number,\n dragFrom: number | null,\n dropTo: number | null\n): string {\n if (dragFrom === null || dropTo === null) return \"\";\n if (i === dragFrom) return \" dragging\";\n if (dropTo === dragFrom) return \"\";\n // Items between source and target shift to make room\n if (dragFrom < dropTo && i > dragFrom && i <= dropTo) return \" shift-left\";\n if (dragFrom > dropTo && i < dragFrom && i >= dropTo) return \" shift-right\";\n return \"\";\n}\n\nfunction ToolbarStrip(props: {\n label: string;\n values: string[] | undefined;\n setValues: (next: string[]) => void;\n allOptions: ModuleOption[];\n}) {\n const [showAdd, setShowAdd] = createSignal(false);\n const [dragIndex, setDragIndex] = createSignal<number | null>(null);\n const [dropIndex, setDropIndex] = createSignal<number | null>(null);\n let lastDropIndex: number | null = null;\n\n // The configured ids, verbatim. We deliberately do NOT filter these down to\n // ids whose plugin is currently registered: the configurator's plugin host\n // loads tools asynchronously, so early after mount `allOptions` is a partial\n // set. Rebuilding the array from a registered-only subset on every mutation\n // would silently drop not-yet-loaded tools — that was the \"adding one tool\n // wipes the rest / only one tool sticks\" bug. Every edit rebuilds from the\n // full list, so an unknown/still-loading id survives (shown by its raw id\n // until its plugin registers).\n const values = createMemo(() => props.values ?? []);\n const currentIds = createMemo(() => new Set(values()));\n const available = createMemo(() =>\n props.allOptions.filter((o) => !currentIds().has(o.id))\n );\n const nameOf = (id: string) =>\n props.allOptions.find((o) => o.id === id)?.name ?? id;\n\n const removeAt = (index: number) => {\n props.setValues(values().filter((_, i) => i !== index));\n };\n\n const add = (id: string) => {\n props.setValues([...values(), id]);\n };\n\n const updateDropIndex = (i: number) => {\n lastDropIndex = i;\n setDropIndex(i);\n };\n\n const handleDragEnd = () => {\n const from = dragIndex();\n const to = lastDropIndex;\n setDragIndex(null);\n setDropIndex(null);\n lastDropIndex = null;\n if (from == null || to == null || from === to) return;\n const arr = [...values()];\n const [moved] = arr.splice(from, 1);\n arr.splice(to, 0, moved);\n props.setValues(arr);\n };\n\n return (\n <div class=\"config-section\">\n <div class=\"section-label\">{props.label}</div>\n <div\n class={`toolbar-strip${dragIndex() !== null ? \" is-dragging\" : \"\"}`}\n ref={nullSelectedDocRef}\n >\n <For each={values()}>\n {(id, index) => (\n <div\n class={`toolbar-box${itemDragClass(index(), dragIndex(), dropIndex())}`}\n draggable={true}\n onDragStart={(e) => {\n e.dataTransfer!.effectAllowed = \"move\";\n const idx = index();\n requestAnimationFrame(() => {\n setDragIndex(idx);\n updateDropIndex(idx);\n });\n }}\n onDragOver={(e) => {\n e.preventDefault();\n e.dataTransfer!.dropEffect = \"move\";\n updateDropIndex(index());\n }}\n onDragEnd={() => handleDragEnd()}\n >\n <div class=\"toolbar-box-label\">{nameOf(id)}</div>\n <button\n class=\"toolbar-box-remove\"\n onClick={(e) => {\n e.stopPropagation();\n removeAt(index());\n }}\n aria-label={`Remove ${nameOf(id)}`}\n >\n <CloseIcon size={8} />\n </button>\n </div>\n )}\n </For>\n <div class=\"add-popover-anchor\">\n <button\n class=\"toolbar-add-btn\"\n onClick={() => setShowAdd(!showAdd())}\n aria-label=\"Add doc titlebar tool\"\n >\n <PlusIcon />\n </button>\n <Show when={showAdd()}>\n <AddPopover\n available={available()}\n onAdd={add}\n onClose={() => setShowAdd(false)}\n />\n </Show>\n </div>\n </div>\n </div>\n );\n}\n\n/* ── Main UI ── */\n\nfunction FrameConfiguratorUI(props: {\n handle: DocHandle<TinyPatchworkLayoutDoc>;\n element: ToolElement;\n}) {\n const [accountDoc] = useDocument<TinyPatchworkLayoutDoc>(\n () => props.handle.url\n );\n\n // The doctitle config lives in the threepane config doc; we edit it here.\n // Entries are [toolId, docId] pairs — the docid is the account doc (a\n // placeholder; the frame feeds doctitle the selected doc). The context\n // sidebar and system tray are registry-driven now (every\n // `patchwork:component` tagged `\"context-tool\"` / `\"system-tray\"`), so\n // there's nothing left here to configure for them.\n const [threepaneDoc, threepaneHandle] = useDocument<ThreepaneConfigDoc>(\n () => accountDoc()?.tools?.[\"threepane\"]\n );\n\n const allTools = useDescriptions(\"patchwork:tool\");\n\n const frameOptions = createMemo(() =>\n filterToolsByTag([...allTools], \"frame-tool\")\n );\n const documentToolbarOptions = createMemo(() =>\n filterToolsByTag([...allTools], \"titlebar-tool\")\n );\n\n // Lane entries may be bare component ids (strings) as well as [toolId, docId]\n // tuples; the strip UI works in ids either way.\n const slotId = (slot: ToolSlot) => (typeof slot === \"string\" ? slot : slot[0]);\n\n const doctitleIds = () => threepaneDoc()?.doctitle?.tools?.map(slotId);\n\n // doctitle (and contextbar) tools are stored as plain id strings, never\n // [toolId, docId] tuples: the frame always points them at the selected\n // main-view doc, so a tuple's docid would be ignored anyway.\n const setDoctitle = (next: string[]) =>\n threepaneHandle()?.change((doc) => {\n doc.doctitle.tools = next.slice();\n });\n\n const setField = <K extends keyof TinyPatchworkLayoutDoc>(\n key: K,\n value: TinyPatchworkLayoutDoc[K]\n ) => {\n props.handle.change((doc: any) => {\n doc[key] = value as any;\n });\n };\n\n return (\n <Show\n when={accountDoc()}\n fallback={<div class=\"configurator loading\">Loading configuration...</div>}\n >\n <div class=\"configurator\">\n <PreviewCardGrid\n label=\"Frame Tool\"\n value={accountDoc()!.frameToolId}\n onChange={(v) => {\n setField(\"frameToolId\", v as any);\n setTimeout(async () => {\n await props.element.repo.flush().catch(() => null);\n window.location.reload();\n }, FRAME_RELOAD_DELAY_MS);\n }}\n options={frameOptions()}\n />\n\n <Show\n when={threepaneDoc()}\n fallback={\n <p class=\"empty-message\">Preparing layout configuration…</p>\n }\n >\n <ToolbarStrip\n label=\"Doc Titlebar\"\n values={doctitleIds()}\n setValues={setDoctitle}\n allOptions={documentToolbarOptions()}\n />\n </Show>\n <Show when={(accountDoc() as any)?.toolStorage?.[\"theme-preferences\"]}>\n {(themePreferencesUrl) => (\n <div class=\"config-section\">\n <div class=\"section-label\">Theme</div>\n <div class=\"theme-embed\">\n <patchwork-view\n doc-url={themePreferencesUrl()}\n tool-id=\"theme-picker\"\n />\n </div>\n </div>\n )}\n </Show>\n </div>\n </Show>\n );\n}\n\nexport function renderFrameConfigurator(\n handle: DocHandle<TinyPatchworkLayoutDoc>,\n element: ToolElement\n) {\n const dispose = render(\n () => (\n <RepoContext.Provider value={element.repo}>\n <FrameConfiguratorUI handle={handle} element={element} />\n </RepoContext.Provider>\n ),\n element\n );\n return () => dispose();\n}\n\nexport { FrameConfiguratorUI as FrameConfigurator };\n"],"names":["s","m","h","d","w","y","ms","val","options","type","parse","fmtLong","fmtShort","str","match","n","msAbs","plural","name","isPlural","setup","env","createDebug","coerce","disable","enable","enabled","require$$0","destroy","key","selectColor","namespace","hash","i","prevTime","enableOverride","namespacesCache","enabledCache","debug","args","self","curr","index","format","formatter","extend","v","delimiter","newDebug","namespaces","split","ns","matchesTemplate","search","template","searchIndex","templateIndex","starIndex","matchIndex","skip","common","exports","formatArgs","save","load","useColors","localstorage","warned","module","c","lastC","r","define_process_env_default","formatters","error","log","pojo","target","BLOCK_MARKER","apply","rest","path","range","p","RANGE_ARRAY","start","end","ZERO_LENGTH","DELETE","INSERT","APPEND","REPLACE","seq","a","b","nextkey","get","obj","fromAutomerge","autopatch","payload","autoproduce","doc","patch","cache","makeDocumentProjection","handle","onCleanup","item","set","createStore","ondelete","reconcile","produce","access","createDocumentProjection","createMemo","RepoContext","createContext","useDocHandle","url","contextRepo","useContext","repo","getExistingHandle","unwrappedURL","state","mutate","createResource","url2","createEffect","useDocument","FRAME_RELOAD_DELAY_MS","useDescriptions","registry","getRegistry","items","setItems","all","map","update","dispose","on","filterToolsByTag","tools","tag","filter","t","unlisted","tags","includes","id","sort","localeCompare","PlusIcon","_tmpl$","CloseIcon","props","size","_el$2","_tmpl$2","_$effect","_p$","_v$","_v$2","e","_$setAttribute","undefined","CheckIcon","_tmpl$3","AddPopover","customId","setCustomId","createSignal","addCustom","trim","onAdd","_el$4","_tmpl$4","_el$5","firstChild","_el$6","_el$7","nextSibling","_el$8","_$insert","_$createComponent","For","each","available","children","_el$9","_tmpl$5","$$click","opt","$$keydown","$$input","currentTarget","value","onClose","_v$3","customPlaceholder","_v$4","disabled","nullSelectedDocRef","el","addEventListener","event","detail","selector","accept","respond","PreviewCardGrid","_el$0","_tmpl$7","_el$1","label","Show","when","length","fallback","_tmpl$8","_el$10","_tmpl$6","_ref$","_$use","_el$12","_tmpl$9","_el$13","_el$14","_el$15","onChange","itemDragClass","dragFrom","dropTo","ToolbarStrip","showAdd","setShowAdd","dragIndex","setDragIndex","dropIndex","setDropIndex","lastDropIndex","values","currentIds","Set","allOptions","o","has","nameOf","find","removeAt","setValues","_","add","updateDropIndex","handleDragEnd","from","to","arr","moved","splice","_el$16","_tmpl$0","_el$17","_el$18","_el$19","_el$20","_ref$2","_el$21","_tmpl$1","_el$22","_el$23","preventDefault","dataTransfer","dropEffect","effectAllowed","idx","requestAnimationFrame","stopPropagation","_v$5","_v$6","_$className","FrameConfiguratorUI","accountDoc","threepaneDoc","threepaneHandle","allTools","frameOptions","documentToolbarOptions","slotId","slot","doctitleIds","doctitle","setDoctitle","next","change","slice","setField","_tmpl$11","_el$24","_tmpl$10","frameToolId","setTimeout","element","flush","catch","window","location","reload","_tmpl$12","toolStorage","_el$27","_tmpl$13","_el$28","_el$29","_el$30","_$owner","_$getOwner","docUrl","themePreferencesUrl","renderFrameConfigurator","render","Provider","_$delegateEvents"],"mappings":"0rBAIA,IAAIA,EAAI,IACJC,EAAID,EAAI,GACRE,EAAID,EAAI,GACRE,EAAID,EAAI,GACRE,EAAID,EAAI,EACRE,EAAIF,EAAI,OAgBZG,EAAiB,SAAUC,EAAKC,EAAS,CACvCA,EAAUA,GAAW,CAAA,EACrB,IAAIC,EAAO,OAAOF,EAClB,GAAIE,IAAS,UAAYF,EAAI,OAAS,EACpC,OAAOG,EAAMH,CAAG,EACX,GAAIE,IAAS,UAAY,SAASF,CAAG,EAC1C,OAAOC,EAAQ,KAAOG,EAAQJ,CAAG,EAAIK,EAASL,CAAG,EAEnD,MAAM,IAAI,MACR,wDACE,KAAK,UAAUA,CAAG,EAExB,EAUA,SAASG,EAAMG,EAAK,CAElB,GADAA,EAAM,OAAOA,CAAG,EACZ,EAAAA,EAAI,OAAS,KAGjB,KAAIC,EAAQ,mIAAmI,KAC7ID,GAEF,GAAKC,EAGL,KAAIC,EAAI,WAAWD,EAAM,CAAC,CAAC,EACvBL,GAAQK,EAAM,CAAC,GAAK,MAAM,YAAW,EACzC,OAAQL,EAAI,CACV,IAAK,QACL,IAAK,OACL,IAAK,MACL,IAAK,KACL,IAAK,IACH,OAAOM,EAAIV,EACb,IAAK,QACL,IAAK,OACL,IAAK,IACH,OAAOU,EAAIX,EACb,IAAK,OACL,IAAK,MACL,IAAK,IACH,OAAOW,EAAIZ,EACb,IAAK,QACL,IAAK,OACL,IAAK,MACL,IAAK,KACL,IAAK,IACH,OAAOY,EAAIb,EACb,IA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AxH,UAAA,CAAA,OAAAJ,EAIPiD,GAAY,CACXnB,MAAK,eAAA,IACL2B,QAAM,CAAA,OAAEiD,EAAAA,CAAa,EACrBxC,UAAW0C,EAAW,IACtBhD,YAAU,CAAA,OAAE2C,EAAAA,CAAwB,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,IAAA,EAAAxG,EAAAmH,EAAAlH,EAGvC+B,EAAI,CAAA,IAACC,MAAI,CAAA,OAAGkE,EAAAA,GAAsB2B,cAAc,mBAAmB,CAAC,EAAAzH,aAC9C,IAAA,CAAA,IAAA0H,EAAAC,KAAAC,EAAAF,EAAApI,WAAAuI,EAAAD,EAAAnI,YAAAqI,EAAAD,EAAAvI,WAAAwI,OAAAA,EAAAC,QAAAC,GAAAA,EAAA7J,MAAA2J,EAAAG,OAKJC,EAAAA,CAAqB,EAAAR,CAAA,GAAA,CAAA,CAKrC,EAAA,IAAA,EAAAZ,CAAA,CAAA,CAAA,CAKX,CAEO,SAASqB,GACdvN,EACAsM,EACA,CACA,MAAMnK,EAAUqL,GACd,IAAAxI,EACGrE,GAAY8M,SAAQ,CAAA,IAAC7H,OAAK,CAAA,OAAE0G,EAAQrL,IAAI,EAAA,IAAAmE,UAAA,CAAA,OAAAJ,EACtCiG,GAAmB,CAACjL,OAAAA,EAAgBsM,QAAAA,CAAAA,CAAgB,CAAA,CAAA,CAAA,EAGzDA,CACF,EACA,MAAO,IAAMnK,EAAAA,CACf,CAEoDuL,GAAA,CAAA,QAAA,UAAA,OAAA,CAAA","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10]}
@@ -1,2 +1,2 @@
1
- const y="modulepreload",v=function(i,s){return new URL(i,s).href},p={},E=function(s,u,f){let d=Promise.resolve();if(u&&u.length>0){let g=function(e){return Promise.all(e.map(o=>Promise.resolve(o).then(c=>({status:"fulfilled",value:c}),c=>({status:"rejected",reason:c}))))};const r=document.getElementsByTagName("link"),t=document.querySelector("meta[property=csp-nonce]"),h=t?.nonce||t?.getAttribute("nonce");d=g(u.map(e=>{if(e=v(e,f),e in p)return;p[e]=!0;const o=e.endsWith(".css"),c=o?'[rel="stylesheet"]':"";if(f)for(let a=r.length-1;a>=0;a--){const l=r[a];if(l.href===e&&(!o||l.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${e}"]${c}`))return;const n=document.createElement("link");if(n.rel=o?"stylesheet":y,o||(n.as="script"),n.crossOrigin="",n.href=e,h&&n.setAttribute("nonce",h),document.head.appendChild(n),o)return new Promise((a,l)=>{n.addEventListener("load",a),n.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${e}`)))})}))}function m(r){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=r,window.dispatchEvent(t),!t.defaultPrevented)throw r}return d.then(r=>{for(const t of r||[])t.status==="rejected"&&m(t.reason);return s().catch(m)})},w=[{type:"patchwork:tool",id:"frame-configurator",name:"Frame Configurator",icon:"Settings",supportedDatatypes:["account"],async load(){const{renderFrameConfigurator:i}=await E(async()=>{const{renderFrameConfigurator:s}=await import("./assets/FrameConfigurator-CIgJ8HSh.js");return{renderFrameConfigurator:s}},[],import.meta.url);return i}}];export{w as plugins};
1
+ const y="modulepreload",v=function(i,s){return new URL(i,s).href},p={},E=function(s,u,f){let d=Promise.resolve();if(u&&u.length>0){let g=function(e){return Promise.all(e.map(o=>Promise.resolve(o).then(c=>({status:"fulfilled",value:c}),c=>({status:"rejected",reason:c}))))};const r=document.getElementsByTagName("link"),t=document.querySelector("meta[property=csp-nonce]"),h=t?.nonce||t?.getAttribute("nonce");d=g(u.map(e=>{if(e=v(e,f),e in p)return;p[e]=!0;const o=e.endsWith(".css"),c=o?'[rel="stylesheet"]':"";if(f)for(let a=r.length-1;a>=0;a--){const l=r[a];if(l.href===e&&(!o||l.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${e}"]${c}`))return;const n=document.createElement("link");if(n.rel=o?"stylesheet":y,o||(n.as="script"),n.crossOrigin="",n.href=e,h&&n.setAttribute("nonce",h),document.head.appendChild(n),o)return new Promise((a,l)=>{n.addEventListener("load",a),n.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${e}`)))})}))}function m(r){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=r,window.dispatchEvent(t),!t.defaultPrevented)throw r}return d.then(r=>{for(const t of r||[])t.status==="rejected"&&m(t.reason);return s().catch(m)})},w=[{type:"patchwork:tool",id:"frame-configurator",name:"Frame Configurator",icon:"Settings",supportedDatatypes:["account"],async load(){const{renderFrameConfigurator:i}=await E(async()=>{const{renderFrameConfigurator:s}=await import("./assets/FrameConfigurator-eip19KvL.js");return{renderFrameConfigurator:s}},[],import.meta.url);return i}}];export{w as plugins};
2
2
  //# sourceMappingURL=index.js.map